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

Commit 0ce5fde

Browse files
authored
Merge pull request #211 from Bitcoin-com/stage
v3.7.1
2 parents 00d6168 + a1b03e2 commit 0ce5fde

3 files changed

Lines changed: 151 additions & 42 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.7.0",
4+
"version": "3.7.1",
55
"author": "Peter <peter@bitcoin.com> and Gabriel Cardona <gabriel@bitcoin.com>",
66
"dependencies": {
77
"badger-components-react": "^0.3.0",

src/data/docs/rest/rawtransactions.md

Lines changed: 69 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Return a JSON object representing the serialized, hex-encoded transaction.
1616

1717
#### URL Parameters
1818

19-
1. hex encoded `String` required
19+
1. hex encoded `String` (required)
2020

2121
#### Result
2222

@@ -166,9 +166,9 @@ decoded `Array` containing the decoded transaction data
166166
}
167167
]
168168

169-
## Decode Script
169+
## Decode Single Script
170170

171-
Decode a hex-encoded script.
171+
Decode a single hex-encoded script.
172172

173173
**URL** : `v2/rawtransactions/decodeScript/{hex}`
174174

@@ -178,7 +178,7 @@ Decode a hex-encoded script.
178178

179179
#### URL Parameters
180180

181-
1. hex encoded `String` required
181+
1. hex encoded `String` (required)
182182

183183
#### Result
184184

@@ -195,6 +195,42 @@ Decode a hex-encoded script.
195195
"p2sh": "bitcoincash:pqwndulzwft8dlmqrteqyc9hf823xr3lcc7ypt74ts"
196196
}
197197

198+
## Bulk Decode Script
199+
200+
Decode an array of hex-encoded scripts.
201+
202+
**URL** : `v2/rawtransactions/decodeScript`
203+
204+
**Method** : `POST`
205+
206+
**Auth required** : NO
207+
208+
#### Body Parameters
209+
210+
1. hexes `Array` of encoded strings (required)
211+
212+
#### Result
213+
214+
`Array` of objects containing the decoded script data
215+
216+
#### Examples
217+
218+
curl -X POST "https://rest.bitcoin.com/v2/rawtransactions/decodeScript" -H "accept: */*" -H "Content-Type: application/json" -d "{\"hexes\":[\"01000000013ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000006a4730440220540986d1c58d6e76f8f05501c520c38ce55393d0ed7ed3c3a82c69af04221232022058ea43ed6c05fec0eccce749a63332ed4525460105346f11108b9c26df93cd72012103083dfc5a0254613941ddc91af39ff90cd711cdcde03a87b144b883b524660c39ffffffff01807c814a000000001976a914d7e7c4e0b70eaa67ceff9d2823d1bbb9f6df9a5188ac00000000\",\"01000000013ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000006a4730440220540986d1c58d6e76f8f05501c520c38ce55393d0ed7ed3c3a82c69af04221232022058ea43ed6c05fec0eccce749a63332ed4525460105346f11108b9c26df93cd72012103083dfc5a0254613941ddc91af39ff90cd711cdcde03a87b144b883b524660c39ffffffff01807c814a000000001976a914d7e7c4e0b70eaa67ceff9d2823d1bbb9f6df9a5188ac00000000\"]}"
219+
220+
// returns
221+
[
222+
{
223+
"asm": "0 0 0 59 OP_MIN OP_UNKNOWN OP_UNKNOWN OP_ROLL OP_ROT b27ac72c3e67768f617fc81bc3888a51323a OP_LESSTHAN OP_NOP9 OP_HASH256 1e5e4a000000006a4730440220540986d1c58d6e76f8f05501c520c38ce55393d0ed7ed3c3a82c69af04221232022058ea43ed6c05fec0eccce749a63332ed4525460105346f11108b9c26 OP_UNKNOWN OP_ADD OP_UNKNOWN OP_2SWAP 33 -8142088 10 24916 41ddc91af39ff90cd711cdcde03a87b144b883b524660c39ffffffff01807c814a000000001976a914d7e7c4e0b70eaa67ceff9d2823d1bbb9 OP_UNKNOWN OP_UNKNOWN OP_BOOLAND 1 OP_EQUALVERIFY OP_CHECKSIG 0 0 0 0",
224+
"type": "nonstandard",
225+
"p2sh": "bitcoincash:pp2jmzk695tg8dxnvxln5ppsrnggw6c8hg0sl8nrxf"
226+
},
227+
{
228+
"asm": "0 0 0 59 OP_MIN OP_UNKNOWN OP_UNKNOWN OP_ROLL OP_ROT b27ac72c3e67768f617fc81bc3888a51323a OP_LESSTHAN OP_NOP9 OP_HASH256 1e5e4a000000006a4730440220540986d1c58d6e76f8f05501c520c38ce55393d0ed7ed3c3a82c69af04221232022058ea43ed6c05fec0eccce749a63332ed4525460105346f11108b9c26 OP_UNKNOWN OP_ADD OP_UNKNOWN OP_2SWAP 33 -8142088 10 24916 41ddc91af39ff90cd711cdcde03a87b144b883b524660c39ffffffff01807c814a000000001976a914d7e7c4e0b70eaa67ceff9d2823d1bbb9 OP_UNKNOWN OP_UNKNOWN OP_BOOLAND 1 OP_EQUALVERIFY OP_CHECKSIG 0 0 0 0",
229+
"type": "nonstandard",
230+
"p2sh": "bitcoincash:pp2jmzk695tg8dxnvxln5ppsrnggw6c8hg0sl8nrxf"
231+
}
232+
]
233+
198234
## Get Raw Transaction
199235

200236
return the raw transaction data. If verbose is 'true', returns an Object with information about 'txid'. If verbose is 'false' or omitted, returns a string that is serialized, hex-encoded data for 'txid'.
@@ -207,7 +243,7 @@ return the raw transaction data. If verbose is 'true', returns an Object with in
207243

208244
#### URL Parameters
209245

210-
1. hex encoded txid `String` required
246+
1. hex encoded txid `String` (required)
211247

212248
#### Query Parameters
213249

@@ -274,6 +310,33 @@ return the raw transaction data. If verbose is 'true', returns an Object with in
274310
"blocktime": 1545086356
275311
}
276312

313+
## Send Single Raw Transaction
314+
315+
Send single raw transactions to network.
316+
317+
**URL** : `v2/rawtransactions/sendRawTransaction`
318+
319+
**Method** : `GET`
320+
321+
**Auth required** : NO
322+
323+
#### URL Parameters
324+
325+
1. hex `String`. (required)
326+
327+
#### Result
328+
329+
txids `String` containing the txid of the transaction
330+
331+
#### Examples
332+
333+
curl -X GET "https://rest.bitcoin.com/v2/rawtransactions/sendRawTransaction/01000000013ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000006a4730440220540986d1c58d6e76f8f05501c520c38ce55393d0ed7ed3c3a82c69af04221232022058ea43ed6c05fec0eccce749a63332ed4525460105346f11108b9c26df93cd72012103083dfc5a0254613941ddc91af39ff90cd711cdcde03a87b144b883b524660c39ffffffff01807c814a000000001976a914d7e7c4e0b70eaa67ceff9d2823d1bbb9f6df9a5188ac00000000" -H "accept: */*"
334+
335+
// returns
336+
[
337+
"5159ae0f5327294c16267ae4ddbdbbe167b8c57c1aed37c50ed7439aa573d66a"
338+
]
339+
277340
## Send Bulk Raw Transactions
278341

279342
Send bulk raw transactions to network.
@@ -286,7 +349,7 @@ Send bulk raw transactions to network.
286349

287350
#### Body Parameters
288351

289-
1. hexes `Array`. required
352+
1. hexes `Array`. (required)
290353

291354
#### Result
292355

src/data/docs/rest/slp.md

Lines changed: 81 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ List details about single SLP token by tokenId
5858

5959
#### URL Parameters
6060

61-
1. tokenId `String` required
61+
1. tokenId `String` (required)
6262

6363
#### Result
6464

@@ -80,6 +80,52 @@ token `Object`
8080
"initialTokenQty": 1000
8181
}
8282

83+
## List bulk
84+
85+
List details about several SLP tokens,e by tokenId
86+
87+
**URL** : `v2/slp/list`
88+
89+
**Method** : `POST`
90+
91+
**Auth required** : NO
92+
93+
#### BODY Parameters
94+
95+
1. tokenIds `Array` of token ID strings (required)
96+
97+
#### Result
98+
99+
`Array` of token objects.
100+
101+
#### Examples
102+
103+
curl -X POST "https://rest.bitcoin.com/v2/slp/list" -H "accept: */*" -H "Content-Type: application/json" -d "{\"tokenIds\":[\"259908ae44f46ef585edef4bcc1e50dc06e4c391ac4be929fae27235b8158cf1\",\"7dd083dbec32133c78afd17f2a7550516202c7e9bf98e570edd91d06aebb54ad\"]}"
104+
105+
// returns
106+
[
107+
{
108+
"id": "259908ae44f46ef585edef4bcc1e50dc06e4c391ac4be929fae27235b8158cf1",
109+
"timestamp": "2018-10-11 02:39",
110+
"symbol": "BROC",
111+
"name": "Broccoli",
112+
"documentUri": "broccoli.cash",
113+
"documentHash": "",
114+
"decimals": 2,
115+
"initialTokenQty": 1000
116+
},
117+
{
118+
"id": "7dd083dbec32133c78afd17f2a7550516202c7e9bf98e570edd91d06aebb54ad",
119+
"timestamp": "2019-02-25 17:04",
120+
"symbol": "HN",
121+
"name": "Rambo Test Token",
122+
"documentUri": "test",
123+
"documentHash": "",
124+
"decimals": 2,
125+
"initialTokenQty": 8888
126+
}
127+
]
128+
83129
<!-- ## Convert address
84130
85131
Convert an address to cash, legacy and simpleledger format
@@ -121,7 +167,7 @@ Validate multiple SLP transactions by txid.
121167

122168
#### Body Parameters
123169

124-
1. txids `Array` required
170+
1. txids `Array` (required)
125171

126172
#### Result
127173

@@ -157,17 +203,17 @@ Note this endpoint is only live w/ a `NON_JS_FRAMEWORK` environment variable
157203

158204
#### URL Parameters
159205

160-
1. fundingAddress `String` required
161-
2. fundingWif `String` required
162-
3. tokenReceiverAddress `String` required
163-
4. batonReceiverAddress `String` required
164-
5. bchChangeReceiverAddress `String` required
165-
6. decimals `String` required
166-
7. name `String` required. This cannot have any spaces. It must be URL encoded
167-
8. symbol `String` required
168-
9. documentUri `String` required
169-
10. documentHash `String` required
170-
11. initialTokenQty `String` required
206+
1. fundingAddress `String` (required)
207+
2. fundingWif `String` (required)
208+
3. tokenReceiverAddress `String` (required)
209+
4. batonReceiverAddress `String` (required)
210+
5. bchChangeReceiverAddress `String` (required)
211+
6. decimals `String` (required)
212+
7. name `String` (required). This cannot have any spaces. It must be URL encoded
213+
8. symbol `String` (required)
214+
9. documentUri `String` (required)
215+
10. documentHash `String` (required)
216+
11. initialTokenQty `String` (required)
171217

172218
#### Result
173219

@@ -194,13 +240,13 @@ Note this endpoint is only live w/ a `NON_JS_FRAMEWORK` environment variable
194240

195241
#### URL Parameters
196242

197-
1. fundingAddress `String` required
198-
2. fundingWif `String` required
199-
3. tokenReceiverAddress `String` required
200-
4. batonReceiverAddress `String` required
201-
5. bchChangeReceiverAddress `String` required
202-
6. tokenId `String` required
203-
7. additionalTokenQty `String` required
243+
1. fundingAddress `String` (required)
244+
2. fundingWif `String` (required)
245+
3. tokenReceiverAddress `String` (required)
246+
4. batonReceiverAddress `String` (required)
247+
5. bchChangeReceiverAddress `String` (required)
248+
6. tokenId `String` (required)
249+
7. additionalTokenQty `String` (required)
204250

205251
#### Result
206252

@@ -227,12 +273,12 @@ Note this endpoint is only live w/ a `NON_JS_FRAMEWORK` environment variable
227273

228274
#### URL Parameters
229275

230-
1. fundingAddress `String` required
231-
2. fundingWif `String` required
232-
3. tokenReceiverAddress `String` required
233-
4. bchChangeReceiverAddress `String` required
234-
5. tokenId `String` required
235-
6. amount`String` required
276+
1. fundingAddress `String` (required)
277+
2. fundingWif `String` (required)
278+
3. tokenReceiverAddress `String` (required)
279+
4. bchChangeReceiverAddress `String` (required)
280+
5. tokenId `String` (required)
281+
6. amount`String` (required)
236282

237283
#### Result
238284

@@ -259,11 +305,11 @@ Note this endpoint is only live w/ a `NON_JS_FRAMEWORK` environment variable
259305

260306
#### URL Parameters
261307

262-
1. fundingAddress `String` required
263-
2. fundingWif `String` required
264-
3. bchChangeReceiverAddress `String` required
265-
4. tokenId `String` required
266-
5. amount`String` required
308+
1. fundingAddress `String` (required)
309+
2. fundingWif `String` (required)
310+
3. bchChangeReceiverAddress `String` (required)
311+
4. tokenId `String` (required)
312+
5. amount`String` (required)
267313

268314
#### Result
269315

@@ -290,10 +336,10 @@ Note this endpoint is only live w/ a `NON_JS_FRAMEWORK` environment variable
290336

291337
#### URL Parameters
292338

293-
1. fundingAddress `String` required
294-
2. fundingWif `String` required
295-
3. bchChangeReceiverAddress `String` required
296-
4. tokenId `String` required
339+
1. fundingAddress `String` (required)
340+
2. fundingWif `String` (required)
341+
3. bchChangeReceiverAddress `String` (required)
342+
4. tokenId `String` (required)
297343

298344
#### Result
299345

0 commit comments

Comments
 (0)