@@ -1330,6 +1330,66 @@ Result:
1330
1330
1331
1331
1332
1332
1333
+ #### getblockchaininfo
1334
+
1335
+ ~~~
1336
+ getblockchaininfo
1337
+ ~~~
1338
+
1339
+ {% autocrossref %}
1340
+
1341
+ Provides information about the current state of the block chain. * This
1342
+ RPC was added in Bitcoin Core 0.9.2.*
1343
+
1344
+ ** Result**
1345
+
1346
+ A JSON object containing several key/value pairs: * chain* telling you
1347
+ whether you're working on the main block chain or a testnet or regtest
1348
+ block chain, the number of * blocks* processed by the node, the * best
1349
+ block hash* (tip of the chain), the current network * difficulty* , an
1350
+ estimate of the * verification progress* (1 for 100% verified), and the
1351
+ total amount of * chain work* seen in the current chain (displayed in
1352
+ hexadecimal). * Note: verificationprogress may exceed 1 (100%) because it's
1353
+ just an estimate.*
1354
+
1355
+ {% endautocrossref %}
1356
+
1357
+ ~~~
1358
+ {
1359
+ "chain": "<name>",
1360
+ "blocks": <integer>,
1361
+ "bestblockhash": "<SHA256 hash>",
1362
+ "difficulty": <decimal difficulty>,
1363
+ "verificationprogress": <decimal>,
1364
+ "chainwork": "<hexadecimal>"
1365
+ }
1366
+ ~~~
1367
+
1368
+ ** Example**
1369
+
1370
+ ~~~
1371
+ bitcoin-cli -testnet getblockchaininfo
1372
+ ~~~
1373
+
1374
+ Result:
1375
+
1376
+ ~~~
1377
+ {
1378
+ "chain" : "testnet3",
1379
+ "blocks" : 272899,
1380
+ "bestblockhash" : "00000000000047021429fb03107900637205c38b6\
1381
+ 4ebd2400bfe5be18f78da5e",
1382
+ "difficulty" : 110221.77693374,
1383
+ "verificationprogress" : 0.99999913,
1384
+ "chainwork" : "000000000000000000000000000000000000000000000\
1385
+ 0001dc6696de16ca6c8"
1386
+ }
1387
+ ~~~
1388
+
1389
+
1390
+
1391
+
1392
+
1333
1393
#### getblockcount
1334
1394
1335
1395
~~~
@@ -1866,6 +1926,11 @@ getinfo
1866
1926
1867
1927
Prints various information about the node and the network.
1868
1928
1929
+ ![ Warning icon] ( /img/icon_warning.svg )
1930
+ ** Warning:** ` getinfo ` will be removed in a later version of Bitcoin
1931
+ Core. Use ` getblockchaininfo ` , ` getnetworkinfo ` , or ` getwalletinfo `
1932
+ instead.
1933
+
1869
1934
{% endautocrossref %}
1870
1935
1871
1936
** Result**
@@ -2106,6 +2171,74 @@ Result:
2106
2171
~~~
2107
2172
2108
2173
2174
+ #### getnetworkinfo
2175
+
2176
+ ~~~
2177
+ getnetworkinfo
2178
+ ~~~
2179
+
2180
+ {% autocrossref %}
2181
+
2182
+ Provides information about the node's connection to the network. * This
2183
+ RPC was added in Bitcoin Core 0.9.2.*
2184
+
2185
+ ** Result**
2186
+
2187
+ A JSON object containing several key/value pairs: the server * version* ,
2188
+ the * protocol version* , the server's * time offset* from the averaged network time,
2189
+ how many * connections* it has to other nodes, information about any
2190
+ * proxy* being used, the smallest * relay fee* per kilobyte this node will accept
2191
+ in order to relay transactions, and a JSON array of IP * addresses* and
2192
+ * port* numbers which the node is listening to along with a * score* for
2193
+ each (with the array with the highest score being the one returned to
2194
+ peers).
2195
+
2196
+ {% endautocrossref %}
2197
+
2198
+ ~~~
2199
+ {
2200
+ "version": <integer>,
2201
+ "protocolversion": <integer>,
2202
+ "timeoffset": <integer seconds>,
2203
+ "connections": <integer>,
2204
+ "proxy": "<host>:<port>",
2205
+ "relayfee": <decimal bitcoins>,
2206
+ "localaddresses": [
2207
+ "address": "<address>",
2208
+ "port": <port>,
2209
+ "score": <integer>
2210
+ ]
2211
+ }
2212
+ ~~~
2213
+
2214
+ ** Example**
2215
+
2216
+
2217
+ ~~~
2218
+ bitcoin-cli -testnet getnetworkinfo
2219
+ ~~~
2220
+
2221
+ Result:
2222
+
2223
+ ~~~
2224
+ {
2225
+ "version" : 90200,
2226
+ "protocolversion" : 70002,
2227
+ "timeoffset" : 0,
2228
+ "connections" : 12,
2229
+ "proxy" : "",
2230
+ "relayfee" : 0.00001000,
2231
+ "localaddresses" : [
2232
+ {
2233
+ "address" : "68.39.150.9",
2234
+ "port" : 18333,
2235
+ "score" : 65
2236
+ }
2237
+ ]
2238
+ }
2239
+ ~~~
2240
+
2241
+
2109
2242
2110
2243
#### getnewaddress
2111
2244
@@ -3024,6 +3157,60 @@ Result (no satoshis unconfirmed):
3024
3157
~~~
3025
3158
3026
3159
3160
+ #### getwalletinfo
3161
+
3162
+ ~~~
3163
+ getwalletinfo
3164
+ ~~~
3165
+
3166
+ {% autocrossref %}
3167
+
3168
+ Provides information about the wallet. * This RPC was added in Bitcoin
3169
+ Core 0.9.2.*
3170
+
3171
+ ** Result**
3172
+
3173
+ A JSON object containing several key/value pairs: the * walletversion*
3174
+ number, the current wallet's * balance* (the same as ` getbalance ` ), the
3175
+ number of transactions made by this wallet (* txcount* ), the oldest
3176
+ pre-generated key in the keypool (* keypoololdest* ), the number of keys
3177
+ in the keypool which have not received a transaction (* keypoolsize* ),
3178
+ the time in seconds since 1 January 1970 (epoch time) when an encrypted wallet
3179
+ will become locked or 0 if the wallet is currently locked
3180
+ (* unlocked_until* )---see ` walletpassphrase ` .
3181
+
3182
+ {% endautocrossref %}
3183
+
3184
+ ~~~
3185
+ {
3186
+ "walletversion" : <integer>,
3187
+ "balance" : <decimal bitcoins>,
3188
+ "txcount" : <integer>,
3189
+ "keypoololdest" : <epoch date>,
3190
+ "keypoolsize" : <integer>,
3191
+ "unlocked_until" : <epoch date>
3192
+ }
3193
+ ~~~
3194
+
3195
+ ** Example**
3196
+
3197
+ ~~~
3198
+ bitcoin-cli -testnet getwalletinfo
3199
+ ~~~
3200
+
3201
+ Result:
3202
+
3203
+ ~~~
3204
+ {
3205
+ "walletversion" : 60000,
3206
+ "balance" : 1.45060000,
3207
+ "txcount" : 17,
3208
+ "keypoololdest" : 1398809500,
3209
+ "keypoolsize" : 196,
3210
+ "unlocked_until" : 0
3211
+ }
3212
+ ~~~
3213
+
3027
3214
3028
3215
#### getwork
3029
3216
0 commit comments