cleanup of javascript API
This commit is contained in:
committed by
Bas van Kervel
parent
87b62f75a7
commit
bd38428f33
@ -12,26 +12,12 @@ web3._extend({
|
||||
inputFormatter: [web3._extend.utils.formatInputString],
|
||||
outputFormatter: web3._extend.formatters.formatOutputBool
|
||||
}),
|
||||
new web3._extend.Method({
|
||||
name: 'id',
|
||||
call: 'net_id',
|
||||
params: 0,
|
||||
inputFormatter: [],
|
||||
outputFormatter: web3._extend.formatters.formatOutputString
|
||||
}),
|
||||
new web3._extend.Method({
|
||||
name: 'getPeerCount',
|
||||
call: 'net_peerCount',
|
||||
params: 0,
|
||||
inputFormatter: [],
|
||||
outputFormatter: web3._extend.formatters.formatOutputString
|
||||
}),
|
||||
new web3._extend.Method({
|
||||
name: 'peers',
|
||||
call: 'net_peers',
|
||||
params: 0,
|
||||
inputFormatter: [],
|
||||
outputFormatter: function(obj) { return obj; }
|
||||
})
|
||||
],
|
||||
properties:
|
||||
@ -45,6 +31,16 @@ web3._extend({
|
||||
name: 'peerCount',
|
||||
getter: 'net_peerCount',
|
||||
outputFormatter: web3._extend.utils.toDecimal
|
||||
}),
|
||||
new web3._extend.Property({
|
||||
name: 'peers',
|
||||
getter: 'net_peers',
|
||||
outputFormatter: function(obj) { return obj; }
|
||||
}),
|
||||
new web3._extend.Property({
|
||||
name: 'version',
|
||||
getter: 'net_version',
|
||||
outputFormatter: web3._extend.formatters.formatOutputString
|
||||
})
|
||||
]
|
||||
});
|
||||
|
Reference in New Issue
Block a user