From 6ea05f5a54c2db009e4379ce917590568b950f42 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Sat, 15 Aug 2015 23:51:31 +0200 Subject: rpc/api, xeth: added signTransaction method SignTransaction creates a transaction but does submit it to the network. SignTransaction returns a structure which includes the transaction object details as well as the RLP encoded transaction that could possibly be submitted by the SendRawTransaction method. --- rpc/api/eth_js.go | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'rpc/api/eth_js.go') diff --git a/rpc/api/eth_js.go b/rpc/api/eth_js.go index 75c103c9d..dfc104ad8 100644 --- a/rpc/api/eth_js.go +++ b/rpc/api/eth_js.go @@ -36,11 +36,23 @@ web3._extend({ params: 3, inputFormatter: [web3._extend.formatters.inputTransactionFormatter, web3._extend.utils.fromDecimal, web3._extend.utils.fromDecimal] }), - new web3._extend.Method({ - name: 'getNatSpec', - call: 'eth_getNatSpec', - params: 1, - inputFormatter: [web3._extend.formatters.inputTransactionFormatter] + new web3._extend.Method({ + name: 'getNatSpec', + call: 'eth_getNatSpec', + params: 1, + inputFormatter: [web3._extend.formatters.inputTransactionFormatter] + }), + new web3._extend.Method({ + name: 'signTransaction', + call: 'eth_signTransaction', + params: 1, + inputFormatter: [web3._extend.formatters.inputTransactionFormatter] + }), + new web3._extend.Method({ + name: 'submitTransaction', + call: 'eth_submitTransaction', + params: 1, + inputFormatter: [web3._extend.formatters.inputTransactionFormatter] }) ], properties: -- cgit v1.2.3