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

Commit 55baa0b

Browse files
authored
Merge pull request #166 from Bitcoin-com/stage
Updates to REST docs
2 parents acccf97 + 919375d commit 55baa0b

3 files changed

Lines changed: 66 additions & 26 deletions

File tree

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.2.1",
4+
"version": "3.2.2",
55
"author": "Peter <peter@bitcoin.com> and Gabriel Cardona <gabriel@bitcoin.com>",
66
"dependencies": {
77
"badger-components-react": "^0.1.3",

src/data/docs/rest/address.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,3 +294,32 @@ array `Array` of JSON Objects
294294
#### Examples
295295

296296
curl -X POST "https://rest.bitcoin.com/v2/address/transactions" -H "accept: */*" -H "Content-Type: application/json" -d "{\"addresses\":[\"bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c\",\"bitcoincash:qrehqueqhw629p6e57994436w730t4rzasnly00ht0\"]}"
297+
298+
## FromXPub
299+
300+
Return cash and legacy address from xpub and optional hdpath
301+
302+
**URL** : `v2/address/fromXPub/{xpub}`
303+
304+
**Method** : `GET`
305+
306+
**Auth required** : NO
307+
308+
#### URL Parameters
309+
310+
1. xpub `string` required
311+
2. hdPath `string` optional. Defaults to '0'
312+
313+
#### Result
314+
315+
addresses `Object`
316+
317+
#### Examples
318+
319+
curl -X GET "https://rest.bitcoin.com/v2/address/fromXPub/xpub661MyMwAqRbcG4CnhNYoK1r1TKLwQQ1UdC3LHoWFK61rsnzh7Hx35qQ9Z53ucYcE5WvA7GEDXhqqKjSY2e6Y8n7WNVLYHpXCuuX945VPuYn?hdPath=0%2F1%2F2%2F3%2F4%2F5" -H "accept: */*"
320+
321+
// returns
322+
{
323+
"cashAddress": "bitcoincash:qquzx5j5d6u9pge0u7tcurhnk8te3xt0rqlessqhpw",
324+
"legacyAddress": "167q9vxiL43xkn3gHCMfg7UbriX1VfdfG5"
325+
}

src/data/docs/rest/slp.md

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,29 @@ List all SLP tokens
2020

2121
#### Examples
2222

23-
curl -X GET "https://rest.bitcoin.com/v2/slp/list" -H "accept: */*"
23+
curl -X GET "https://trest.bitcoin.com/v2/slp/list" -H "accept: */*"
2424

2525
// returns
2626
[
27-
{
28-
"id": "545cba6f72a08cbcb08c7d4e8166267942e8cb9a611328805c62fa538e861ba4",
29-
"timestamp": "2018-08-14 13:42",
30-
"symbol": "",
31-
"name": "",
32-
"document": ""
33-
},
34-
{
35-
"id": "83bfe019fcf976142c55e7c0ad4a429f4be1bc2cb138bd8d0bab8dd4cd4758c4",
36-
"timestamp": "2018-08-14 13:57",
37-
"symbol": "",
38-
"name": "",
39-
"document": ""
27+
{
28+
"id": "24686f336975796253be67ab3d6b1b304905f0f5d81fa934c581aba4da606f38",
29+
"timestamp": "2019-02-05 10:17",
30+
"symbol": "TESTNET1",
31+
"name": "SLP SDK Testnet Token 1",
32+
"documentUri": "badger@bitcoin.com",
33+
"documentHash": "",
34+
"decimals": 8,
35+
"initialTokenQty": 1000
4036
},
4137
{
42-
"id": "323a1e35ae0b356316093d20f2d9fbc995d19314b5c0148b78dc8d9c0dab9d35",
43-
"timestamp": "2018-08-14 17:53",
44-
"symbol": "",
45-
"name": "",
46-
"document": ""
38+
"id": "78d57a82a0dd9930cc17843d9d06677f267777dd6b25055bad0ae43f1b884091",
39+
"timestamp": "2019-02-04 12:43",
40+
"symbol": "SLPSDK",
41+
"name": "Awesome SLP SDK Token",
42+
"documentUri": "badger@bitcoin.com",
43+
"documentHash": "",
44+
"decimals": 2,
45+
"initialTokenQty": 1000000
4746
}
4847
]
4948

@@ -72,13 +71,16 @@ token `Object`
7271
// returns
7372
{
7473
"id": "259908ae44f46ef585edef4bcc1e50dc06e4c391ac4be929fae27235b8158cf1",
75-
"timestamp": "2018-10-11 00:39",
74+
"timestamp": "2018-10-11 02:39",
7675
"symbol": "BROC",
7776
"name": "Broccoli",
78-
"document": "broccoli.cash"
77+
"documentUri": "broccoli.cash",
78+
"documentHash": "",
79+
"decimals": 2,
80+
"initialTokenQty": 1000
7981
}
8082

81-
## Convert address
83+
<!-- ## Convert address
8284
8385
Convert an address to cash, legacy and simpleledger format
8486
@@ -105,7 +107,7 @@ conversion `Object`
105107
"slpAddress": "simpleledger:qz9tzs6d5097ejpg279rg0rnlhz546q4fsnck9wh5m",
106108
"cashAddress": "bitcoincash:qz9tzs6d5097ejpg279rg0rnlhz546q4fslra7mh29",
107109
"legacyAddress": "1DeLbv5EMzLEFDvQ8wZiKeSuPGGtSSz5HP"
108-
}
110+
} -->
109111

110112
## Validate Bulk
111113

@@ -127,7 +129,16 @@ valid `Array` of txid strings
127129

128130
#### Examples
129131

130-
curl -X POST "https://rest.bitcoin.com/v2/slp/validate" -H "accept: */*" -H "Content-Type: application/json" -d "{\"txids\":[\"a5f972572ee1753e2fd2457dd61ce5f40fa2f8a30173d417e49feef7542c96a1\",\"5165dc531aad05d1149bb0f0d9b7bda99c73e2f05e314bcfb5b4bb9ca5e1af5e\"]}"
132+
curl -X POST "https://rest.bitcoin.com/v2/slp/validateTxid" -H "accept: */*" -H "Content-Type: application/json" -d "{\"txids\":[\"88b121101d71b73599dfc7d79eead599031912b2c48298bf5c1f37f4dd743ffa\",\"fb0eeaa501a6e1acb721669c62a3f70741f48ae0fd7f4b8e1d72088785c51952\"]}""
131133

132134
// returns
133-
[]
135+
[
136+
{
137+
"txid": "88b121101d71b73599dfc7d79eead599031912b2c48298bf5c1f37f4dd743ffa",
138+
"valid": true
139+
},
140+
{
141+
"txid": "fb0eeaa501a6e1acb721669c62a3f70741f48ae0fd7f4b8e1d72088785c51952",
142+
"valid": true
143+
}
144+
]

0 commit comments

Comments
 (0)