New API call for signatures.

This commit is contained in:
Daniel A. Nagy
2015-05-08 16:17:19 +02:00
parent 15bfae52d2
commit e94aa421c6
3 changed files with 37 additions and 0 deletions

View File

@ -158,6 +158,17 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
v := api.xethAtStateNum(args.BlockNumber).CodeAtBytes(args.Address)
*reply = newHexData(v)
case "eth_sign":
args := new(NewSigArgs)
if err := json.Unmarshal(req.Params, &args); err != nil {
return err
}
v, err := api.xeth.Sign(args.From, args.Data)
if err != nil {
return err
}
*reply = v
case "eth_sendTransaction", "eth_transact":
args := new(NewTxArgs)
if err := json.Unmarshal(req.Params, &args); err != nil {