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

Commit 4f2952e

Browse files
authored
Merge pull request #205 from Bitcoin-com/slp-functionality
Slp functionality
2 parents 529615f + 83413aa commit 4f2952e

2 files changed

Lines changed: 164 additions & 1 deletion

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.6.0",
4+
"version": "3.7.0",
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/slp.md

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,166 @@ valid `Array` of txid strings
142142
"valid": true
143143
}
144144
]
145+
146+
## Create TokenType1
147+
148+
Create an SLP token class of TokenType1.
149+
150+
**URL** : `v2/slp/createTokenType1/:fundingAddress/:fundingWif/:tokenReceiverAddress/:batonReceiverAddress/:bchChangeReceiverAddress/:decimals/:name/:symbol/:documentUri/:documentHash/:initialTokenQty`
151+
152+
**Method** : `GET`
153+
154+
**Auth required** : NO
155+
156+
Note this endpoint is only live w/ a `NON_JS_FRAMEWORK` environment variable
157+
158+
#### URL Parameters
159+
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
171+
172+
#### Result
173+
174+
txid `String`
175+
176+
#### Examples
177+
178+
curl -X GET "http://localhost:3000/v2/slp/createTokenType1/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/cMsGTGBgS4qsbPNVbp8fwgTCN6YAgjxY6VQrixDxPRZ5x92F5oc4/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/0/Burner%20Coins%20Rule/BURN/documentUri/1010101010101010101010101010101010101010101010101010101010101010/100000000" -H "accept: */*"
179+
180+
// returns
181+
946e43c71ff8917687793897d3c4e8b96a12a4f83575dfb45cedd870a0a90c69
182+
183+
## Mint TokenType1
184+
185+
Mint an SLP token class by tokenId.
186+
187+
**URL** : `v2/slp/mintTokenType1/:fundingAddress/:fundingWif/:tokenReceiverAddress/:batonReceiverAddress/:bchChangeReceiverAddress/:tokenId/:additionalTokenQty`
188+
189+
**Method** : `GET`
190+
191+
**Auth required** : NO
192+
193+
Note this endpoint is only live w/ a `NON_JS_FRAMEWORK` environment variable
194+
195+
#### URL Parameters
196+
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
204+
205+
#### Result
206+
207+
txid `String`
208+
209+
#### Examples
210+
211+
curl -X GET "http://localhost:3000/v2/slp/mintTokenType1/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/cMsGTGBgS4qsbPNVbp8fwgTCN6YAgjxY6VQrixDxPRZ5x92F5oc4/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/946e43c71ff8917687793897d3c4e8b96a12a4f83575dfb45cedd870a0a90c69/123" -H "accept: */*"
212+
213+
// returns
214+
5dc4ca831acd571963d767e296d84b92effd57c757aab8e39ed3bb59cb2b2e94
215+
216+
## Send TokenType1
217+
218+
Send an amount of tokens by tokenId.
219+
220+
**URL** : `v2/slp/sendTokenType1/:fundingAddress/:fundingWif/:tokenReceiverAddress/:bchChangeReceiverAddress/:tokenId/:amount",`
221+
222+
**Method** : `GET`
223+
224+
**Auth required** : NO
225+
226+
Note this endpoint is only live w/ a `NON_JS_FRAMEWORK` environment variable
227+
228+
#### URL Parameters
229+
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
236+
237+
#### Result
238+
239+
txid `String`
240+
241+
#### Examples
242+
243+
curl -X GET "http://localhost:3000/v2/slp/sendTokenType1/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/cMsGTGBgS4qsbPNVbp8fwgTCN6YAgjxY6VQrixDxPRZ5x92F5oc4/bchtest:qza06mmt6zxfgq2yv6jxaq3juffhzvmv9cxayyqlfp/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/946e43c71ff8917687793897d3c4e8b96a12a4f83575dfb45cedd870a0a90c69/123" -H "accept: */*"
244+
245+
// returns
246+
b76daf1f2627f253aecc09a19eafe8422d79e6b59b2536493e1025e92a4d75dd
247+
248+
## Burn TokenType1
249+
250+
Burn an amount of tokens by tokenId.
251+
252+
**URL** : `v2/slp/burnTokenType1/:fundingAddress/:fundingWif/:bchChangeReceiverAddress/:tokenId/:amount",`
253+
254+
**Method** : `GET`
255+
256+
**Auth required** : NO
257+
258+
Note this endpoint is only live w/ a `NON_JS_FRAMEWORK` environment variable
259+
260+
#### URL Parameters
261+
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
267+
268+
#### Result
269+
270+
txid `String`
271+
272+
#### Examples
273+
274+
curl -X GET "http://localhost:3000/v2/slp/burnTokenType1/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/cMsGTGBgS4qsbPNVbp8fwgTCN6YAgjxY6VQrixDxPRZ5x92F5oc4/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/946e43c71ff8917687793897d3c4e8b96a12a4f83575dfb45cedd870a0a90c69/123" -H "accept: */*"
275+
276+
// returns
277+
902b139b201940a5b726d4ef636a3b2225a64220fb150a6f5bde697180b6c758
278+
279+
## Burn All TokenType1
280+
281+
Burn all tokens by tokenId.
282+
283+
**URL** : `v2/slp/burnAllTokenType1/:fundingAddress/:fundingWif/:bchChangeReceiverAddress/:tokenId",`
284+
285+
**Method** : `GET`
286+
287+
**Auth required** : NO
288+
289+
Note this endpoint is only live w/ a `NON_JS_FRAMEWORK` environment variable
290+
291+
#### URL Parameters
292+
293+
1. fundingAddress `String` required
294+
2. fundingWif `String` required
295+
3. bchChangeReceiverAddress `String` required
296+
4. tokenId `String` required
297+
298+
#### Result
299+
300+
txid `String`
301+
302+
#### Examples
303+
304+
curl -X GET "http://localhost:3000/v2/slp/burnAllTokenType1/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/cMsGTGBgS4qsbPNVbp8fwgTCN6YAgjxY6VQrixDxPRZ5x92F5oc4/bchtest:qqm2nq9cv9gw66zn5xa0udpxnysknm2x4c95yw59pd/946e43c71ff8917687793897d3c4e8b96a12a4f83575dfb45cedd870a0a90c69" -H "accept: */*"
305+
306+
// returns
307+
7e9ff2924355f890ac45151dbb9aca0802d2b84fd478cc35ad62474d12a93b6b

0 commit comments

Comments
 (0)