Official Go implementation of the Ethereum protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-ethereum/rpc/api/net_js.go

52 lines
1.1 KiB

10 years ago
package api
const Net_JS = `
web3._extend({
10 years ago
property: 'network',
methods:
[
new web3._extend.Method({
10 years ago
name: 'addPeer',
call: 'net_addPeer',
params: 1,
inputFormatter: [web3._extend.utils.formatInputString],
outputFormatter: web3._extend.formatters.formatOutputBool
10 years ago
}),
new web3._extend.Method({
10 years ago
name: 'id',
call: 'net_id',
params: 0,
inputFormatter: [],
outputFormatter: web3._extend.formatters.formatOutputString
10 years ago
}),
new web3._extend.Method({
10 years ago
name: 'getPeerCount',
call: 'net_peerCount',
params: 0,
inputFormatter: [],
outputFormatter: web3._extend.formatters.formatOutputString
10 years ago
}),
new web3._extend.Method({
10 years ago
name: 'peers',
call: 'net_peers',
params: 0,
inputFormatter: [],
outputFormatter: function(obj) { return obj; }
})
],
properties:
[
new web3._extend.Property({
10 years ago
name: 'listening',
getter: 'net_listening',
outputFormatter: web3._extend.formatters.formatOutputBool
10 years ago
}),
new web3._extend.Property({
10 years ago
name: 'peerCount',
getter: 'net_peerCount',
outputFormatter: web3._extend.utils.toDecimal
10 years ago
})
]
});
`