aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api/net_js.go
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2015-06-10 17:29:52 +0800
committerBas van Kervel <basvankervel@gmail.com>2015-06-11 20:01:41 +0800
commitbd38428f33b127e9c60d26127695e50c55798fcd (patch)
tree9bb838822fc3d1b28775f57223a30a243d4df9f2 /rpc/api/net_js.go
parent87b62f75a7b9c15c17f3352f1b50ad88966e7070 (diff)
downloaddexon-bd38428f33b127e9c60d26127695e50c55798fcd.tar
dexon-bd38428f33b127e9c60d26127695e50c55798fcd.tar.gz
dexon-bd38428f33b127e9c60d26127695e50c55798fcd.tar.bz2
dexon-bd38428f33b127e9c60d26127695e50c55798fcd.tar.lz
dexon-bd38428f33b127e9c60d26127695e50c55798fcd.tar.xz
dexon-bd38428f33b127e9c60d26127695e50c55798fcd.tar.zst
dexon-bd38428f33b127e9c60d26127695e50c55798fcd.zip
cleanup of javascript API
Diffstat (limited to 'rpc/api/net_js.go')
-rw-r--r--rpc/api/net_js.go24
1 files changed, 10 insertions, 14 deletions
diff --git a/rpc/api/net_js.go b/rpc/api/net_js.go
index 75f6c89f3..1677d9fa6 100644
--- a/rpc/api/net_js.go
+++ b/rpc/api/net_js.go
@@ -13,25 +13,11 @@ web3._extend({
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
})
]
});