|
|
|
@ -20,7 +20,6 @@ package web3ext |
|
|
|
|
var Modules = map[string]string{ |
|
|
|
|
"admin": AdminJs, |
|
|
|
|
"clique": CliqueJs, |
|
|
|
|
"ethash": EthashJs, |
|
|
|
|
"debug": DebugJs, |
|
|
|
|
"eth": EthJs, |
|
|
|
|
"miner": MinerJs, |
|
|
|
@ -28,8 +27,6 @@ var Modules = map[string]string{ |
|
|
|
|
"personal": PersonalJs, |
|
|
|
|
"rpc": RpcJs, |
|
|
|
|
"txpool": TxpoolJs, |
|
|
|
|
"les": LESJs, |
|
|
|
|
"vflux": VfluxJs, |
|
|
|
|
"dev": DevJs, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -90,34 +87,6 @@ web3._extend({ |
|
|
|
|
}); |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
const EthashJs = ` |
|
|
|
|
web3._extend({ |
|
|
|
|
property: 'ethash', |
|
|
|
|
methods: [ |
|
|
|
|
new web3._extend.Method({ |
|
|
|
|
name: 'getWork', |
|
|
|
|
call: 'ethash_getWork', |
|
|
|
|
params: 0 |
|
|
|
|
}), |
|
|
|
|
new web3._extend.Method({ |
|
|
|
|
name: 'getHashrate', |
|
|
|
|
call: 'ethash_getHashrate', |
|
|
|
|
params: 0 |
|
|
|
|
}), |
|
|
|
|
new web3._extend.Method({ |
|
|
|
|
name: 'submitWork', |
|
|
|
|
call: 'ethash_submitWork', |
|
|
|
|
params: 3, |
|
|
|
|
}), |
|
|
|
|
new web3._extend.Method({ |
|
|
|
|
name: 'submitHashrate', |
|
|
|
|
call: 'ethash_submitHashrate', |
|
|
|
|
params: 2, |
|
|
|
|
}), |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
const AdminJs = ` |
|
|
|
|
web3._extend({ |
|
|
|
|
property: 'admin', |
|
|
|
@ -790,91 +759,6 @@ web3._extend({ |
|
|
|
|
}); |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
const LESJs = ` |
|
|
|
|
web3._extend({ |
|
|
|
|
property: 'les', |
|
|
|
|
methods: |
|
|
|
|
[ |
|
|
|
|
new web3._extend.Method({ |
|
|
|
|
name: 'getCheckpoint', |
|
|
|
|
call: 'les_getCheckpoint', |
|
|
|
|
params: 1 |
|
|
|
|
}), |
|
|
|
|
new web3._extend.Method({ |
|
|
|
|
name: 'clientInfo', |
|
|
|
|
call: 'les_clientInfo', |
|
|
|
|
params: 1 |
|
|
|
|
}), |
|
|
|
|
new web3._extend.Method({ |
|
|
|
|
name: 'priorityClientInfo', |
|
|
|
|
call: 'les_priorityClientInfo', |
|
|
|
|
params: 3 |
|
|
|
|
}), |
|
|
|
|
new web3._extend.Method({ |
|
|
|
|
name: 'setClientParams', |
|
|
|
|
call: 'les_setClientParams', |
|
|
|
|
params: 2 |
|
|
|
|
}), |
|
|
|
|
new web3._extend.Method({ |
|
|
|
|
name: 'setDefaultParams', |
|
|
|
|
call: 'les_setDefaultParams', |
|
|
|
|
params: 1 |
|
|
|
|
}), |
|
|
|
|
new web3._extend.Method({ |
|
|
|
|
name: 'addBalance', |
|
|
|
|
call: 'les_addBalance', |
|
|
|
|
params: 2 |
|
|
|
|
}), |
|
|
|
|
], |
|
|
|
|
properties: |
|
|
|
|
[ |
|
|
|
|
new web3._extend.Property({ |
|
|
|
|
name: 'latestCheckpoint', |
|
|
|
|
getter: 'les_latestCheckpoint' |
|
|
|
|
}), |
|
|
|
|
new web3._extend.Property({ |
|
|
|
|
name: 'checkpointContractAddress', |
|
|
|
|
getter: 'les_getCheckpointContractAddress' |
|
|
|
|
}), |
|
|
|
|
new web3._extend.Property({ |
|
|
|
|
name: 'serverInfo', |
|
|
|
|
getter: 'les_serverInfo' |
|
|
|
|
}), |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
const VfluxJs = ` |
|
|
|
|
web3._extend({ |
|
|
|
|
property: 'vflux', |
|
|
|
|
methods: |
|
|
|
|
[ |
|
|
|
|
new web3._extend.Method({ |
|
|
|
|
name: 'distribution', |
|
|
|
|
call: 'vflux_distribution', |
|
|
|
|
params: 2 |
|
|
|
|
}), |
|
|
|
|
new web3._extend.Method({ |
|
|
|
|
name: 'timeout', |
|
|
|
|
call: 'vflux_timeout', |
|
|
|
|
params: 2 |
|
|
|
|
}), |
|
|
|
|
new web3._extend.Method({ |
|
|
|
|
name: 'value', |
|
|
|
|
call: 'vflux_value', |
|
|
|
|
params: 2 |
|
|
|
|
}), |
|
|
|
|
], |
|
|
|
|
properties: |
|
|
|
|
[ |
|
|
|
|
new web3._extend.Property({ |
|
|
|
|
name: 'requestStats', |
|
|
|
|
getter: 'vflux_requestStats' |
|
|
|
|
}), |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
const DevJs = ` |
|
|
|
|
web3._extend({ |
|
|
|
|
property: 'dev', |
|
|
|
|