From a2c3eb918c8c385e6ece21c07a91f121200b55d1 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Mon, 15 Jul 2019 10:01:03 -0700 Subject: [PATCH] Added BITBOX docs for getNetworkInfo() --- src/data/docs/bitbox/control.md | 74 ++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 14 deletions(-) diff --git a/src/data/docs/bitbox/control.md b/src/data/docs/bitbox/control.md index 1ac900d0..b69b7849 100644 --- a/src/data/docs/bitbox/control.md +++ b/src/data/docs/bitbox/control.md @@ -6,7 +6,8 @@ ordinal: 8 ### `getInfo` -Returns an object containing various state info. +Returns an object containing various state info. Deprecated in ABC +full node v0.19.08 #### Result @@ -35,6 +36,64 @@ info `Promise` // relayfee: 0.00001, // errors: '' } +### `getNetworkInfo` + +Returns the full node version and other network information. + +#### Result + +info `Promise` + +#### Examples + + (async () => { + try { + let getNetworkInfo = await bitbox.Control.getNetworkInfo(); + console.log(getNetworkInfo); + } catch(error) { + console.error(error) + } + })() + + ``` + { + "version": 190500, + "subversion": "/Bitcoin ABC:0.19.5(EB32.0)/", + "protocolversion": 70015, + "localservices": "0000000000000425", + "localrelay": true, + "timeoffset": 0, + "networkactive": true, + "connections": 19, + "networks": [ + { + "name": "ipv4", + "limited": false, + "reachable": true, + "proxy": "", + "proxy_randomize_credentials": false + }, + { + "name": "ipv6", + "limited": false, + "reachable": true, + "proxy": "", + "proxy_randomize_credentials": false + }, + { + "name": "onion", + "limited": true, + "reachable": false, + "proxy": "", + "proxy_randomize_credentials": false + } + ], + "relayfee": 0.00001, + "excessutxocharge": 0, + "warnings": "Warning: Unknown block versions being mined! It's possible unknown rules are in effect" + } + ``` + ## Interfaces ### NodeInfo @@ -52,16 +111,3 @@ info `Promise` relayfee: number errors: string } - -