@@ -7,16 +7,16 @@ Supported API
7
7
-------------
8
8
9
9
####Transactions
10
- ` GET /rest/tx/TX-HASH.{ bin|hex|json} `
10
+ ` GET /rest/tx/< TX-HASH>.< bin|hex|json> `
11
11
12
12
Given a transaction hash,
13
13
Returns a transaction, in binary, hex-encoded binary or JSON formats.
14
14
15
15
For full TX query capability, one must enable the transaction index via "txindex=1" command line / configuration option.
16
16
17
17
####Blocks
18
- ` GET /rest/block/BLOCK-HASH.{ bin|hex|json} `
19
- ` GET /rest/block/notxdetails/BLOCK-HASH.{ bin|hex|json} `
18
+ ` GET /rest/block/< BLOCK-HASH>.< bin|hex|json> `
19
+ ` GET /rest/block/notxdetails/< BLOCK-HASH>.< bin|hex|json> `
20
20
21
21
Given a block hash,
22
22
Returns a block, in binary, hex-encoded binary or JSON formats.
@@ -46,12 +46,38 @@ Only supports JSON as output format.
46
46
* verificationprogress : (numeric) estimate of verification progress [ 0..1]
47
47
* chainwork : (string) total amount of work in active chain, in hexadecimal
48
48
49
- ` GET /rest/getutxos `
49
+ ####Query UTXO set
50
+ ` GET /rest/getutxos.<bin|hex|json> `
50
51
51
- The getutxo command allows querying of the UTXO set given a set of of outpoints.
52
+ The getutxo command allows querying of the UTXO set given a set of outpoints.
52
53
See BIP64 for input and output serialisation:
53
54
https://github.com/bitcoin/bips/blob/master/bip-0064.mediawiki
54
55
56
+ Example:
57
+ ```
58
+ $ curl --data '{"checkmempool":true,"outpoints":[{"txid":"b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75","n":0}]}' localhost:18332/rest/getutxos.json 2>/dev/null | json_pp
59
+ {
60
+ "chaintipHash" : "00000000fb01a7f3745a717f8caebee056c484e6e0bfe4a9591c235bb70506fb",
61
+ "chainHeight" : 325347,
62
+ "utxos" : [
63
+ {
64
+ "scriptPubKey" : {
65
+ "addresses" : [
66
+ "mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD"
67
+ ],
68
+ "type" : "pubkeyhash",
69
+ "hex" : "76a9141c7cebb529b86a04c683dfa87be49de35bcf589e88ac",
70
+ "reqSigs" : 1,
71
+ "asm" : "OP_DUP OP_HASH160 1c7cebb529b86a04c683dfa87be49de35bcf589e OP_EQUALVERIFY OP_CHECKSIG"
72
+ },
73
+ "value" : 8.8687,
74
+ "height" : 2147483647,
75
+ "txvers" : 1
76
+ }
77
+ ],
78
+ "bitmap" : "1"
79
+ }
80
+ ```
55
81
56
82
Risks
57
83
-------------
0 commit comments