p2p/protocols: accounting metrics rpc (#18336)
* p2p/protocols: accounting metrics rpc added (#847) * p2p/protocols: accounting api documentation added (#847) * p2p/protocols: accounting api doc updated (#847) * p2p/protocols: accounting api doc update (#847) * p2p/protocols: accounting api doc update (#847) * p2p/protocols: fix file is not gofmted * fix lint error * updated comments after review * add account balance to rpc * naming changed after review
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
package web3ext
|
||||
|
||||
var Modules = map[string]string{
|
||||
"accounting": Accounting_JS,
|
||||
"admin": Admin_JS,
|
||||
"chequebook": Chequebook_JS,
|
||||
"clique": Clique_JS,
|
||||
@ -704,3 +705,47 @@ web3._extend({
|
||||
]
|
||||
});
|
||||
`
|
||||
|
||||
const Accounting_JS = `
|
||||
web3._extend({
|
||||
property: 'accounting',
|
||||
methods: [
|
||||
new web3._extend.Property({
|
||||
name: 'balance',
|
||||
getter: 'account_balance'
|
||||
}),
|
||||
new web3._extend.Property({
|
||||
name: 'balanceCredit',
|
||||
getter: 'account_balanceCredit'
|
||||
}),
|
||||
new web3._extend.Property({
|
||||
name: 'balanceDebit',
|
||||
getter: 'account_balanceDebit'
|
||||
}),
|
||||
new web3._extend.Property({
|
||||
name: 'bytesCredit',
|
||||
getter: 'account_bytesCredit'
|
||||
}),
|
||||
new web3._extend.Property({
|
||||
name: 'bytesDebit',
|
||||
getter: 'account_bytesDebit'
|
||||
}),
|
||||
new web3._extend.Property({
|
||||
name: 'msgCredit',
|
||||
getter: 'account_msgCredit'
|
||||
}),
|
||||
new web3._extend.Property({
|
||||
name: 'msgDebit',
|
||||
getter: 'account_msgDebit'
|
||||
}),
|
||||
new web3._extend.Property({
|
||||
name: 'peerDrops',
|
||||
getter: 'account_peerDrops'
|
||||
}),
|
||||
new web3._extend.Property({
|
||||
name: 'selfDrops',
|
||||
getter: 'account_selfDrops'
|
||||
}),
|
||||
]
|
||||
});
|
||||
`
|
||||
|
Reference in New Issue
Block a user