go-pulse/rpc/api/net_js.go

48 lines
1.0 KiB
Go
Raw Normal View History

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