Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit 1bc9c84

Browse files
authored
Merge pull request #133 from Bitcoin-com/stage
Update Address.utxo docs.
2 parents 942c181 + 7aad4ff commit 1bc9c84

4 files changed

Lines changed: 100 additions & 15 deletions

File tree

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "developer.bitcoin.com",
33
"description": "Bitcoin.com developer resources and documentation",
4-
"version": "3.0.0",
4+
"version": "3.0.1",
55
"author": "Peter <peter@bitcoin.com> and Gabriel Cardona <gabriel@bitcoin.com>",
66
"dependencies": {
77
"gatsby": "^2.0.50",

src/data/docs/bitbox/address.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -637,8 +637,8 @@ Return list of uxto for address
637637
#### Result
638638

639639
- utxo:
640-
- utxo `Object`: containing `utxo` array of utxos, plus `legacyAddress` and
641-
`cashAddress` properties.
640+
- utxo `Object`: containing `utxo` array of utxos, plus `legacyAddress`,
641+
`cashAddress` and `scriptPubKey` properties.
642642
- utxos `Array`: Array of utxo Objects.
643643

644644
#### Examples
@@ -655,28 +655,25 @@ Return list of uxto for address
655655
// {
656656
// "utxos": [
657657
// {
658-
// "address": "1M1FYu4zuVaxRPWLZG5CnP8qQrZaqu6c2L",
659658
// "txid": "27ec8512c1a9ee9e9ae9b98eb60375f1d2bd60e2e76a1eff5a45afdbc517cf9c",
660659
// "vout": 0,
661-
// "scriptPubKey": "76a914db6ea94fa26b7272dc5e1487c35f258391e0f38788ac",
662660
// "amount": 0.001,
663661
// "satoshis": 100000,
664662
// "height": 560430,
665663
// "confirmations": 5163
666664
// },
667665
// {
668-
// "address": "1M1FYu4zuVaxRPWLZG5CnP8qQrZaqu6c2L",
669666
// "txid": "6e1ae1bf7db6de799ec1c05ab2816ac65549bd80141567af088e6f291385b07d",
670667
// "vout": 0,
671-
// "scriptPubKey": "76a914db6ea94fa26b7272dc5e1487c35f258391e0f38788ac",
672668
// "amount": 0.0013,
673669
// "satoshis": 130000,
674670
// "height": 560039,
675671
// "confirmations": 5554
676672
// }
677673
// ],
678674
// "legacyAddress": "1M1FYu4zuVaxRPWLZG5CnP8qQrZaqu6c2L",
679-
// "cashAddress": "bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf"
675+
// "cashAddress": "bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf",
676+
// "scriptPubKey": "76a914db6ea94fa26b7272dc5e1487c35f258391e0f38788ac"
680677
// }
681678

682679
(async () => {
@@ -695,28 +692,25 @@ Return list of uxto for address
695692
// {
696693
// "utxos": [
697694
// {
698-
// "address": "1M1FYu4zuVaxRPWLZG5CnP8qQrZaqu6c2L",
699695
// "txid": "27ec8512c1a9ee9e9ae9b98eb60375f1d2bd60e2e76a1eff5a45afdbc517cf9c",
700696
// "vout": 0,
701-
// "scriptPubKey": "76a914db6ea94fa26b7272dc5e1487c35f258391e0f38788ac",
702697
// "amount": 0.001,
703698
// "satoshis": 100000,
704699
// "height": 560430,
705700
// "confirmations": 5163
706701
// },
707702
// {
708-
// "address": "1M1FYu4zuVaxRPWLZG5CnP8qQrZaqu6c2L",
709703
// "txid": "6e1ae1bf7db6de799ec1c05ab2816ac65549bd80141567af088e6f291385b07d",
710704
// "vout": 0,
711-
// "scriptPubKey": "76a914db6ea94fa26b7272dc5e1487c35f258391e0f38788ac",
712705
// "amount": 0.0013,
713706
// "satoshis": 130000,
714707
// "height": 560039,
715708
// "confirmations": 5554
716709
// }
717710
// ],
718711
// "legacyAddress": "1M1FYu4zuVaxRPWLZG5CnP8qQrZaqu6c2L",
719-
// "cashAddress": "bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf"
712+
// "cashAddress": "bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf",
713+
// "scriptPubKey": "76a914db6ea94fa26b7272dc5e1487c35f258391e0f38788ac"
720714
// },
721715
// {
722716
// "utxos": [],

src/data/docs/rest/address.md

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,45 @@ Returns the list of utxo for an address
8888

8989
#### Result
9090

91-
array `Array` of JSON Objects
91+
utxo `Object`
9292

9393
#### Examples
9494

9595
curl -X GET "https://rest.bitcoin.com/v2/address/utxo/bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c" -H "accept: application/json"
9696

97+
// returns
98+
{
99+
"utxos": [
100+
{
101+
"txid": "eea57285462dd70dadcd431fc814857b3f81fe4d0a059a8c02c12fd7d33c02d1",
102+
"vout": 0,
103+
"amount": 0.01,
104+
"satoshis": 1000000,
105+
"height": 566900,
106+
"confirmations": 760
107+
},
108+
{
109+
"txid": "282b3b296b6aed7122586ed69f7a57d35584eaf94a4d1b1ad7d1b05d36cb79d1",
110+
"vout": 0,
111+
"amount": 0.01,
112+
"satoshis": 1000000,
113+
"height": 563858,
114+
"confirmations": 3802
115+
},
116+
{
117+
"txid": "ac444896b3e32d17824fa6573eed3b89768c5c9085b7a71f3ba88e9d5ba67355",
118+
"vout": 13,
119+
"amount": 0.01,
120+
"satoshis": 1000000,
121+
"height": 558992,
122+
"confirmations": 8668
123+
}
124+
],
125+
"legacyAddress": "1Fg4r9iDrEkCcDmHTy2T79EusNfhyQpu7W",
126+
"cashAddress": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c",
127+
"scriptPubKey": "76a914a0f531f4ff810a415580c12e54a7072946bb927e88ac"
128+
}
129+
97130
## Address utxos bulk
98131

99132
Returns the utxo of multiple addresses
@@ -116,6 +149,64 @@ array `Array` of JSON Objects
116149

117150
curl -X POST "https://rest.bitcoin.com/v2/address/utxo" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"addresses\":[\"bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c\",\"bitcoincash:qrehqueqhw629p6e57994436w730t4rzasnly00ht0\"]}"
118151

152+
// returns
153+
[
154+
{
155+
"utxos": [
156+
{
157+
"txid": "eea57285462dd70dadcd431fc814857b3f81fe4d0a059a8c02c12fd7d33c02d1",
158+
"vout": 0,
159+
"amount": 0.01,
160+
"satoshis": 1000000,
161+
"height": 566900,
162+
"confirmations": 760
163+
},
164+
{
165+
"txid": "282b3b296b6aed7122586ed69f7a57d35584eaf94a4d1b1ad7d1b05d36cb79d1",
166+
"vout": 0,
167+
"amount": 0.01,
168+
"satoshis": 1000000,
169+
"height": 563858,
170+
"confirmations": 3802
171+
},
172+
{
173+
"txid": "ac444896b3e32d17824fa6573eed3b89768c5c9085b7a71f3ba88e9d5ba67355",
174+
"vout": 13,
175+
"amount": 0.01,
176+
"satoshis": 1000000,
177+
"height": 558992,
178+
"confirmations": 8668
179+
}
180+
],
181+
"legacyAddress": "1Fg4r9iDrEkCcDmHTy2T79EusNfhyQpu7W",
182+
"cashAddress": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c",
183+
"scriptPubKey": "76a914a0f531f4ff810a415580c12e54a7072946bb927e88ac"
184+
},
185+
{
186+
"utxos": [
187+
{
188+
"txid": "1afcc63b244182647909539ebe3f4a44b8ea4120a95edb8d9eebe5347b9491bb",
189+
"vout": 1,
190+
"amount": 0.00531373,
191+
"satoshis": 531373,
192+
"height": 562106,
193+
"confirmations": 5554
194+
},
195+
{
196+
"txid": "b3792d28377b975560e1b6f09e48aeff8438d4c6969ca578bd406393bd50bd7d",
197+
"vout": 0,
198+
"amount": 0.00051061,
199+
"satoshis": 51061,
200+
"height": 560615,
201+
"confirmations": 7045
202+
}
203+
],
204+
"legacyAddress": "1PCBukyYULnmraUpMy2hW1Y1ngEQTN8DtF",
205+
"cashAddress": "bitcoincash:qrehqueqhw629p6e57994436w730t4rzasnly00ht0",
206+
"scriptPubKey": "76a914f3707320bbb4a28759a78a5ad63a77a2f5d462ec88ac"
207+
}
208+
]
209+
119210
## Unconfirmed transactions single
120211

121212
Returns the list of unconfirmed transactions for an address

0 commit comments

Comments
 (0)