diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/web3ext/web3ext.go | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index 4a8425d5c..dd325100f 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -20,6 +20,7 @@ package web3ext var Modules = map[string]string{ "admin": Admin_JS, "chequebook": Chequebook_JS, + "clique": Clique_JS, "debug": Debug_JS, "eth": Eth_JS, "miner": Miner_JS, @@ -29,8 +30,10 @@ var Modules = map[string]string{ "shh": Shh_JS, "swarmfs": SWARMFS_JS, "txpool": TxPool_JS, + } + const Chequebook_JS = ` web3._extend({ property: 'chequebook', @@ -63,6 +66,44 @@ web3._extend({ }); ` +const Clique_JS = ` +web3._extend({ + property: 'clique', + methods: + [ + new web3._extend.Method({ + name: 'getSnapshot', + call: 'clique_getSnapshot', + params: 1, + inputFormatter: [null] + }), + new web3._extend.Method({ + name: 'getSigners', + call: 'clique_getSigners', + params: 1, + inputFormatter: [null] + }), + new web3._extend.Method({ + name: 'propose', + call: 'clique_propose', + params: 2 + }), + new web3._extend.Method({ + name: 'discard', + call: 'clique_discard', + params: 1 + }) + ], + properties: + [ + new web3._extend.Property({ + name: 'proposals', + getter: 'clique_proposals' + }), + ] +}); +` + const Admin_JS = ` web3._extend({ property: 'admin', |