diff --git a/package-lock.json b/package-lock.json index 28ece312..37930323 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "developer.bitcoin.com", - "version": "3.0.0", + "version": "3.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index fcce6536..41acd1ca 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "developer.bitcoin.com", "description": "Bitcoin.com developer resources and documentation", - "version": "3.0.0", + "version": "3.0.1", "author": "Peter and Gabriel Cardona ", "dependencies": { "gatsby": "^2.0.50", diff --git a/src/data/docs/bitbox/address.md b/src/data/docs/bitbox/address.md index 441c3aea..f8b80702 100644 --- a/src/data/docs/bitbox/address.md +++ b/src/data/docs/bitbox/address.md @@ -637,8 +637,8 @@ Return list of uxto for address #### Result - utxo: - - utxo `Object`: containing `utxo` array of utxos, plus `legacyAddress` and - `cashAddress` properties. + - utxo `Object`: containing `utxo` array of utxos, plus `legacyAddress`, + `cashAddress` and `scriptPubKey` properties. - utxos `Array`: Array of utxo Objects. #### Examples @@ -655,20 +655,16 @@ Return list of uxto for address // { // "utxos": [ // { - // "address": "1M1FYu4zuVaxRPWLZG5CnP8qQrZaqu6c2L", // "txid": "27ec8512c1a9ee9e9ae9b98eb60375f1d2bd60e2e76a1eff5a45afdbc517cf9c", // "vout": 0, - // "scriptPubKey": "76a914db6ea94fa26b7272dc5e1487c35f258391e0f38788ac", // "amount": 0.001, // "satoshis": 100000, // "height": 560430, // "confirmations": 5163 // }, // { - // "address": "1M1FYu4zuVaxRPWLZG5CnP8qQrZaqu6c2L", // "txid": "6e1ae1bf7db6de799ec1c05ab2816ac65549bd80141567af088e6f291385b07d", // "vout": 0, - // "scriptPubKey": "76a914db6ea94fa26b7272dc5e1487c35f258391e0f38788ac", // "amount": 0.0013, // "satoshis": 130000, // "height": 560039, @@ -676,7 +672,8 @@ Return list of uxto for address // } // ], // "legacyAddress": "1M1FYu4zuVaxRPWLZG5CnP8qQrZaqu6c2L", - // "cashAddress": "bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf" + // "cashAddress": "bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf", + // "scriptPubKey": "76a914db6ea94fa26b7272dc5e1487c35f258391e0f38788ac" // } (async () => { @@ -695,20 +692,16 @@ Return list of uxto for address // { // "utxos": [ // { - // "address": "1M1FYu4zuVaxRPWLZG5CnP8qQrZaqu6c2L", // "txid": "27ec8512c1a9ee9e9ae9b98eb60375f1d2bd60e2e76a1eff5a45afdbc517cf9c", // "vout": 0, - // "scriptPubKey": "76a914db6ea94fa26b7272dc5e1487c35f258391e0f38788ac", // "amount": 0.001, // "satoshis": 100000, // "height": 560430, // "confirmations": 5163 // }, // { - // "address": "1M1FYu4zuVaxRPWLZG5CnP8qQrZaqu6c2L", // "txid": "6e1ae1bf7db6de799ec1c05ab2816ac65549bd80141567af088e6f291385b07d", // "vout": 0, - // "scriptPubKey": "76a914db6ea94fa26b7272dc5e1487c35f258391e0f38788ac", // "amount": 0.0013, // "satoshis": 130000, // "height": 560039, @@ -716,7 +709,8 @@ Return list of uxto for address // } // ], // "legacyAddress": "1M1FYu4zuVaxRPWLZG5CnP8qQrZaqu6c2L", - // "cashAddress": "bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf" + // "cashAddress": "bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf", + // "scriptPubKey": "76a914db6ea94fa26b7272dc5e1487c35f258391e0f38788ac" // }, // { // "utxos": [], diff --git a/src/data/docs/rest/address.md b/src/data/docs/rest/address.md index cb29be0d..e514cfa3 100644 --- a/src/data/docs/rest/address.md +++ b/src/data/docs/rest/address.md @@ -88,12 +88,45 @@ Returns the list of utxo for an address #### Result -array `Array` of JSON Objects +utxo `Object` #### Examples curl -X GET "https://rest.bitcoin.com/v2/address/utxo/bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c" -H "accept: application/json" + // returns + { + "utxos": [ + { + "txid": "eea57285462dd70dadcd431fc814857b3f81fe4d0a059a8c02c12fd7d33c02d1", + "vout": 0, + "amount": 0.01, + "satoshis": 1000000, + "height": 566900, + "confirmations": 760 + }, + { + "txid": "282b3b296b6aed7122586ed69f7a57d35584eaf94a4d1b1ad7d1b05d36cb79d1", + "vout": 0, + "amount": 0.01, + "satoshis": 1000000, + "height": 563858, + "confirmations": 3802 + }, + { + "txid": "ac444896b3e32d17824fa6573eed3b89768c5c9085b7a71f3ba88e9d5ba67355", + "vout": 13, + "amount": 0.01, + "satoshis": 1000000, + "height": 558992, + "confirmations": 8668 + } + ], + "legacyAddress": "1Fg4r9iDrEkCcDmHTy2T79EusNfhyQpu7W", + "cashAddress": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c", + "scriptPubKey": "76a914a0f531f4ff810a415580c12e54a7072946bb927e88ac" + } + ## Address utxos bulk Returns the utxo of multiple addresses @@ -116,6 +149,64 @@ array `Array` of JSON Objects 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\"]}" + // returns + [ + { + "utxos": [ + { + "txid": "eea57285462dd70dadcd431fc814857b3f81fe4d0a059a8c02c12fd7d33c02d1", + "vout": 0, + "amount": 0.01, + "satoshis": 1000000, + "height": 566900, + "confirmations": 760 + }, + { + "txid": "282b3b296b6aed7122586ed69f7a57d35584eaf94a4d1b1ad7d1b05d36cb79d1", + "vout": 0, + "amount": 0.01, + "satoshis": 1000000, + "height": 563858, + "confirmations": 3802 + }, + { + "txid": "ac444896b3e32d17824fa6573eed3b89768c5c9085b7a71f3ba88e9d5ba67355", + "vout": 13, + "amount": 0.01, + "satoshis": 1000000, + "height": 558992, + "confirmations": 8668 + } + ], + "legacyAddress": "1Fg4r9iDrEkCcDmHTy2T79EusNfhyQpu7W", + "cashAddress": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c", + "scriptPubKey": "76a914a0f531f4ff810a415580c12e54a7072946bb927e88ac" + }, + { + "utxos": [ + { + "txid": "1afcc63b244182647909539ebe3f4a44b8ea4120a95edb8d9eebe5347b9491bb", + "vout": 1, + "amount": 0.00531373, + "satoshis": 531373, + "height": 562106, + "confirmations": 5554 + }, + { + "txid": "b3792d28377b975560e1b6f09e48aeff8438d4c6969ca578bd406393bd50bd7d", + "vout": 0, + "amount": 0.00051061, + "satoshis": 51061, + "height": 560615, + "confirmations": 7045 + } + ], + "legacyAddress": "1PCBukyYULnmraUpMy2hW1Y1ngEQTN8DtF", + "cashAddress": "bitcoincash:qrehqueqhw629p6e57994436w730t4rzasnly00ht0", + "scriptPubKey": "76a914f3707320bbb4a28759a78a5ad63a77a2f5d462ec88ac" + } + ] + ## Unconfirmed transactions single Returns the list of unconfirmed transactions for an address