mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
internal/web3ext: add Istanbul JS RPC API
This commit is contained in:
parent
72ae3ec221
commit
3718bc0160
1 changed files with 49 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ var Modules = map[string]string{
|
||||||
"shh": Shh_JS,
|
"shh": Shh_JS,
|
||||||
"swarmfs": SWARMFS_JS,
|
"swarmfs": SWARMFS_JS,
|
||||||
"txpool": TxPool_JS,
|
"txpool": TxPool_JS,
|
||||||
|
"istanbul": Istanbul_JS,
|
||||||
}
|
}
|
||||||
|
|
||||||
const Chequebook_JS = `
|
const Chequebook_JS = `
|
||||||
|
|
@ -631,3 +632,51 @@ web3._extend({
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
`
|
`
|
||||||
|
|
||||||
|
const Istanbul_JS = `
|
||||||
|
web3._extend({
|
||||||
|
property: 'istanbul',
|
||||||
|
methods:
|
||||||
|
[
|
||||||
|
new web3._extend.Method({
|
||||||
|
name: 'getSnapshot',
|
||||||
|
call: 'istanbul_getSnapshot',
|
||||||
|
params: 1,
|
||||||
|
inputFormatter: [null]
|
||||||
|
}),
|
||||||
|
new web3._extend.Method({
|
||||||
|
name: 'getSnapshotAtHash',
|
||||||
|
call: 'istanbul_getSnapshotAtHash',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new web3._extend.Method({
|
||||||
|
name: 'getValidators',
|
||||||
|
call: 'istanbul_getValidators',
|
||||||
|
params: 1,
|
||||||
|
inputFormatter: [null]
|
||||||
|
}),
|
||||||
|
new web3._extend.Method({
|
||||||
|
name: 'getValidatorsAtHash',
|
||||||
|
call: 'istanbul_getValidatorsAtHash',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new web3._extend.Method({
|
||||||
|
name: 'propose',
|
||||||
|
call: 'istanbul_propose',
|
||||||
|
params: 2
|
||||||
|
}),
|
||||||
|
new web3._extend.Method({
|
||||||
|
name: 'discard',
|
||||||
|
call: 'istanbul_discard',
|
||||||
|
params: 1
|
||||||
|
})
|
||||||
|
],
|
||||||
|
properties:
|
||||||
|
[
|
||||||
|
new web3._extend.Property({
|
||||||
|
name: 'candidates',
|
||||||
|
getter: 'istanbul_candidates'
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
});
|
||||||
|
`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue