aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web3ext/web3ext.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/web3ext/web3ext.go')
-rw-r--r--internal/web3ext/web3ext.go78
1 files changed, 73 insertions, 5 deletions
diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go
index 23112c1f1..72c2bd996 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,
@@ -27,6 +28,7 @@ var Modules = map[string]string{
"personal": Personal_JS,
"rpc": RPC_JS,
"shh": Shh_JS,
+ "swarmfs": SWARMFS_JS,
"txpool": TxPool_JS,
}
@@ -62,6 +64,54 @@ 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: 'getSnapshotAtHash',
+ call: 'clique_getSnapshotAtHash',
+ params: 1
+ }),
+ new web3._extend.Method({
+ name: 'getSigners',
+ call: 'clique_getSigners',
+ params: 1,
+ inputFormatter: [null]
+ }),
+ new web3._extend.Method({
+ name: 'getSignersAtHash',
+ call: 'clique_getSignersAtHash',
+ params: 1
+ }),
+ 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',
@@ -94,11 +144,6 @@ web3._extend({
params: 2
}),
new web3._extend.Method({
- name: 'setSolc',
- call: 'admin_setSolc',
- params: 1
- }),
- new web3._extend.Method({
name: 'startRPC',
call: 'admin_startRPC',
params: 4,
@@ -486,6 +531,29 @@ web3._extend({
]
});
`
+const SWARMFS_JS = `
+web3._extend({
+ property: 'swarmfs',
+ methods:
+ [
+ new web3._extend.Method({
+ name: 'mount',
+ call: 'swarmfs_mount',
+ params: 2
+ }),
+ new web3._extend.Method({
+ name: 'unmount',
+ call: 'swarmfs_unmount',
+ params: 1
+ }),
+ new web3._extend.Method({
+ name: 'listmounts',
+ call: 'swarmfs_listmounts',
+ params: 0
+ })
+ ]
+});
+`
const TxPool_JS = `
web3._extend({