Skip to content

Commit 79e29d7

Browse files
committed
Merge PR #179 from 'nodech/update-v7'
2 parents 13f8146 + 622cdf0 commit 79e29d7

File tree

8 files changed

+661
-443
lines changed

8 files changed

+661
-443
lines changed

src/api-docs/source/includes/_node.md

Lines changed: 68 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44

55
Complete list of commands:
66

7-
Command |cURL method | Description
8-
----------------------------|---------------|------------
9-
[`/`](#get-server-info) | `GET` | get info
10-
[`/coin/address/:address`](#get-coins-by-address) | `GET` | UTXO by address
11-
[`/coin/:hash/:index`](#get-coin-by-outpoint) | `GET` | UTXO by txid
12-
[`/coin/address`](#get-coins-by-addresses) | `POST` | Bulk read UTXOs
13-
[`/tx/:hash`](#get-tx-by-txhash) | `GET` | TX by hash
14-
[`/tx/address/:address`](#get-tx-by-address) | `GET` | TX by address
15-
[`/tx/address`](#get-tx-by-addresses) | `POST` | Bulk read TXs
16-
[`/block/:block`](#get-block-by-hash-or-height) | `GET` | Block by hash or height
17-
[`/header/:block`](#get-header-by-hash-or-height) | `GET` | Header by hash or height
18-
[`/mempool`](#get-mempool-snapshot) | `GET` | Mempool snapshot
19-
[`/mempool/invalid`](#get-mempool-rejects-filter) | `GET` | Mempool rejects filter
20-
[`/mempool/invalid/:hash`](#test-mempool-rejects-filter) | `GET` | Test mempool rejects filter
21-
[`/broadcast`](#broadcast-transaction) | `POST` | Broadcast TX
22-
[`/claim`](#broadcast-claim) | `POST` | Broadcast Claim
23-
[`/fee`](#estimate-fee) | `GET` | Estimate fee
24-
[`/reset`](#reset-blockchain) | `POST` | Reset chain to specific height
7+
method | Command | Description
8+
------- | -------------------------------------------------------- | ------------
9+
`GET` | [`/`](#get-server-info) | Get info
10+
`GET` | [`/coin/address/:address`](#get-coins-by-address) | UTXO by address
11+
`GET` | [`/coin/:hash/:index`](#get-coin-by-outpoint) | UTXO by txid
12+
`POST` | [`/coin/address`](#get-coins-by-addresses) | Bulk read UTXOs
13+
`GET` | [`/tx/:hash`](#get-tx-by-txhash) | TX by hash
14+
`GET` | [`/tx/address/:address`](#get-tx-by-address) | TX by address
15+
`POST` | [`/tx/address`](#get-tx-by-addresses) | Bulk read TXs
16+
`GET` | [`/block/:block`](#get-block-by-hash-or-height) | Block by hash or height
17+
`GET` | [`/header/:block`](#get-header-by-hash-or-height) | Header by hash or height
18+
`GET` | [`/mempool`](#get-mempool-snapshot) | Mempool snapshot
19+
`GET` | [`/mempool/invalid`](#get-mempool-rejects-filter) | Mempool rejects filter
20+
`GET` | [`/mempool/invalid/:hash`](#test-mempool-rejects-filter) | Test mempool rejects filter
21+
`POST` | [`/broadcast`](#broadcast-transaction) | Broadcast TX
22+
`POST` | [`/claim`](#broadcast-claim) | Broadcast Claim
23+
`GET` | [`/fee`](#estimate-fee) | Estimate fee
24+
`POST` | [`/reset`](#reset-blockchain) | Reset chain to specific height
2525

2626

2727

@@ -57,28 +57,51 @@ const client = new NodeClient(clientOptions);
5757
5858
```json
5959
{
60-
"version": "2.0.1",
60+
"version": "7.99.0",
6161
"network": "regtest",
6262
"chain": {
63-
"height": 1,
64-
"tip": "6b054a7a561fdfa7c2f11550db4d5341d101be044df24dd58c465b2abac94c3f",
63+
"height": 0,
64+
"tip": "ae3895cf597eff05b19e02a70ceeeecb9dc72dbfe6504a50e9343a72f06a87c5",
6565
"treeRoot": "0000000000000000000000000000000000000000000000000000000000000000",
66-
"progress": 0.6125905181398805,
66+
"treeRootHeight": 0,
67+
"progress": 0,
68+
"indexers": {
69+
"indexTX": false,
70+
"indexAddress": false
71+
},
72+
"options": {
73+
"spv": false,
74+
"prune": false
75+
},
76+
"treeCompaction": {
77+
"compacted": false,
78+
"compactOnInit": false,
79+
"compactInterval": null,
80+
"lastCompaction": null,
81+
"nextCompaction": null
82+
},
6783
"state": {
68-
"tx": 2,
69-
"coin": 1360,
70-
"value": 237416588368270,
84+
"tx": 1,
85+
"coin": 1,
86+
"value": 2002210000,
7187
"burned": 0
7288
}
7389
},
7490
"pool": {
7591
"host": "0.0.0.0",
7692
"port": 14038,
93+
"brontidePort": 46806,
7794
"identitykey": "aorsxa4ylaacshipyjkfbvzfkh3jhh4yowtoqdt64nzemqtiw2whk",
78-
"agent": "/hsd:2.0.1/",
95+
"agent": "/hsd:7.99.0/",
7996
"services": "1",
8097
"outbound": 0,
81-
"inbound": 0
98+
"inbound": 0,
99+
"public": {
100+
"listen": false,
101+
"host": null,
102+
"port": null,
103+
"brontidePort": null
104+
}
82105
},
83106
"mempool": {
84107
"tx": 0,
@@ -88,17 +111,17 @@ const client = new NodeClient(clientOptions);
88111
"orphans": 0
89112
},
90113
"time": {
91-
"uptime": 3,
92-
"system": 1581299165,
93-
"adjusted": 1581299165,
114+
"uptime": 268,
115+
"system": 1736238026,
116+
"adjusted": 1736238026,
94117
"offset": 0
95118
},
96119
"memory": {
97-
"total": 78,
98-
"jsHeap": 11,
99-
"jsHeapTotal": 29,
100-
"nativeHeap": 49,
101-
"external": 14
120+
"total": 112,
121+
"jsHeap": 16,
122+
"jsHeapTotal": 18,
123+
"nativeHeap": 93,
124+
"external": 13
102125
}
103126
}
104127
```
@@ -200,7 +223,7 @@ Get mempool rejects filter (a Bloom filter used to store rejected TX hashes).
200223

201224
Parameter | Description
202225
--------- | -----------
203-
verbose | _(bool)_ Returns entire Bloom Filter in `filter` property, hex-encoded.
226+
verbose | _(bool)_ Returns entire Bloom Filter in `filter` property, hex-encoded.
204227

205228

206229
## Test mempool rejects filter
@@ -235,7 +258,7 @@ Test a TX hash against the mempool rejects filter.
235258

236259
Parameter | Description
237260
--------- | -----------
238-
:hash | Transaction hash
261+
:hash | Transaction hash
239262

240263

241264
## Get block by hash or height
@@ -347,8 +370,8 @@ Returns block info by block hash or height.
347370

348371
### URL Parameters
349372

350-
Parameter | Description
351-
--------- | -----------
373+
Parameter | Description
374+
------------------ | -----------
352375
:blockhashOrHeight | Hash or Height of block
353376

354377
## Get Header by hash or height
@@ -404,8 +427,8 @@ Returns block header by block hash or height.
404427

405428
### URL Parameters
406429

407-
Parameter | Description
408-
--------- | -----------
430+
Parameter | Description
431+
------------------ | -----------
409432
:blockhashOrHeight | Hash or Height of header
410433

411434
## Broadcast transaction
@@ -462,7 +485,7 @@ Broadcast a transaction by adding it to the node's mempool. If mempool verificat
462485
### POST Parameters (JSON)
463486
Parameter | Description
464487
--------- | -----------
465-
tx | raw transaction in hex
488+
tx | Raw transaction in hex
466489

467490

468491
## Broadcast claim
@@ -519,7 +542,7 @@ Broadcast a claim by adding it to the node's mempool.
519542
### POST Parameters (JSON)
520543
Parameter | Description
521544
--------- | -----------
522-
claim | raw claim in hex
545+
claim | raw claim in hex
523546

524547

525548
## Estimate fee
@@ -573,7 +596,7 @@ Estimate the fee required (in dollarydoos per kB) for a transaction to be confir
573596
### GET Parameters
574597
Parameter | Description
575598
--------- | -----------
576-
blocks | Number of blocks to target confirmation
599+
blocks | Number of blocks to target confirmation
577600

578601

579602
## Reset blockchain
@@ -633,5 +656,5 @@ way to rescan the blockchain is to re-request [merkle]blocks from peers.
633656
### POST Parameters (JSON)
634657
Parameter | Description
635658
--------- | -----------
636-
height | block height to reset chain to
659+
height | block height to reset chain to
637660

0 commit comments

Comments
 (0)