quorum/rpc/api/net_js.go

48 lines
1.0 KiB
Go
Raw Normal View History

2015-06-08 05:50:11 -07:00
package api
const Net_JS = `
2015-06-10 00:42:14 -07:00
web3._extend({
2015-06-08 05:50:11 -07:00
property: 'network',
methods:
[
2015-06-10 00:42:14 -07:00
new web3._extend.Method({
2015-06-09 07:06:51 -07:00
name: 'addPeer',
call: 'net_addPeer',
params: 1,
2015-06-10 00:42:14 -07:00
inputFormatter: [web3._extend.utils.formatInputString],
outputFormatter: web3._extend.formatters.formatOutputBool
2015-06-09 07:06:51 -07:00
}),
2015-06-10 00:42:14 -07:00
new web3._extend.Method({
2015-06-08 05:50:11 -07:00
name: 'getPeerCount',
call: 'net_peerCount',
params: 0,
inputFormatter: [],
2015-06-10 00:42:14 -07:00
outputFormatter: web3._extend.formatters.formatOutputString
2015-06-08 05:50:11 -07:00
})
],
properties:
[
2015-06-10 00:42:14 -07:00
new web3._extend.Property({
2015-06-08 05:50:11 -07:00
name: 'listening',
getter: 'net_listening',
2015-06-10 00:42:14 -07:00
outputFormatter: web3._extend.formatters.formatOutputBool
2015-06-08 05:50:11 -07:00
}),
2015-06-10 00:42:14 -07:00
new web3._extend.Property({
2015-06-08 05:50:11 -07:00
name: 'peerCount',
getter: 'net_peerCount',
2015-06-10 00:42:14 -07:00
outputFormatter: web3._extend.utils.toDecimal
2015-06-10 02:29:52 -07:00
}),
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
2015-06-08 05:50:11 -07:00
})
]
});
`