new: add bor apis

This commit is contained in:
Jaynti Kanani 2020-11-20 11:48:55 +05:30
parent b8c1fd2916
commit 236ec15f1b
No known key found for this signature in database
GPG key ID: 4396982C976BAE5E
2 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,53 @@
package web3ext
// BorJs bor related apis
const BorJs = `
web3._extend({
property: 'bor',
methods: [
new web3._extend.Method({
name: 'getSnapshot',
call: 'bor_getSnapshot',
params: 1,
inputFormatter: [null]
}),
new web3._extend.Method({
name: 'getAuthor',
call: 'bor_getAuthor',
params: 1,
inputFormatter: [null]
}),
new web3._extend.Method({
name: 'getSnapshotAtHash',
call: 'bor_getSnapshotAtHash',
params: 1
}),
new web3._extend.Method({
name: 'getSigners',
call: 'bor_getSigners',
params: 1,
inputFormatter: [null]
}),
new web3._extend.Method({
name: 'getSignersAtHash',
call: 'bor_getSignersAtHash',
params: 1
}),
new web3._extend.Method({
name: 'getCurrentProposer',
call: 'bor_getCurrentProposer',
params: 0
}),
new web3._extend.Method({
name: 'getCurrentValidators',
call: 'bor_getCurrentValidators',
params: 0
}),
new web3._extend.Method({
name: 'getRootHash',
call: 'bor_getRootHash',
params: 2,
}),
]
});
`

View file

@ -34,6 +34,9 @@ var Modules = map[string]string{
"txpool": TxpoolJs,
"les": LESJs,
"lespay": LESPayJs,
// Bor related apis
"bor": BorJs,
}
const ChequebookJs = `