diff options
author | Ales Katona <ales@coinbase.com> | 2016-04-26 01:23:40 +0800 |
---|---|---|
committer | Ales Katona <ales@coinbase.com> | 2016-04-28 23:11:40 +0800 |
commit | 572da73d4d475db0443f457d9383a3d513f189ee (patch) | |
tree | e5a13000b505ebc2576e58e6c371da8838d56f40 /internal | |
parent | 70b8b54cd2413fb01e279890b2ddb5eb9bc227c2 (diff) | |
download | dexon-572da73d4d475db0443f457d9383a3d513f189ee.tar.gz dexon-572da73d4d475db0443f457d9383a3d513f189ee.tar.zst dexon-572da73d4d475db0443f457d9383a3d513f189ee.zip |
eth: add personal_importRawKey for runtime private key import
Diffstat (limited to 'internal')
-rw-r--r-- | internal/web3ext/web3ext.go | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index bc1e46921..14700b05c 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -18,12 +18,13 @@ package web3ext var Modules = map[string]string{ - "txpool": TxPool_JS, - "admin": Admin_JS, - "eth": Eth_JS, - "miner": Miner_JS, - "debug": Debug_JS, - "net": Net_JS, + "txpool": TxPool_JS, + "admin": Admin_JS, + "personal": Personal_JS, + "eth": Eth_JS, + "miner": Miner_JS, + "debug": Debug_JS, + "net": Net_JS, } const TxPool_JS = ` @@ -175,6 +176,20 @@ web3._extend({ }); ` +const Personal_JS = ` +web3._extend({ + property: 'personal', + methods: + [ + new web3._extend.Method({ + name: 'importRawKey', + call: 'personal_importRawKey', + params: 2 + }) + ] +}); +` + const Eth_JS = ` web3._extend({ property: 'eth', |