Smart Contracts
Token and Smart Contract related APIs only for defined users roles.

Issue

Mint a token with given specifications (can be both token or NFT). Only user having manager role can access this endpoint.
authToken
API Key and UID
1
curl --location --request POST 'https://us-central1-changedev-3b21a.cloudfunctions.net/api/v1/issue' \
2
--header 'walletid: walletId' \
3
--header 'Content-Type: application/json' \
4
--header 'protocol: STAS' \
5
--header 'Authorization: Bearer authToken' \
6
--data-raw '{
7
"name": "Store Bonus Points",
8
"protocolId": "STAS",
9
"symbol": "SBP",
10
"description": "A supermarket bonus point.",
11
"image": "https://upload.wikimedia.org/wikipedia/en/9/95/Test_image.jpg",
12
"tokenSupply": 3,
13
"decimals": 0,
14
"satsPerToken": 1500,
15
"properties": {
16
"legal": {
17
"terms": "Your token terms and description.",
18
"licenceId": "T3ST-2"
19
},
20
"issuer": {
21
"organisation": "Vaionex Corp.",
22
"legalForm": "Limited",
23
"governingLaw": "US",
24
"issuerCountry": "US",
25
"jurisdiction": "US",
26
"email": "[email protected]"
27
},
28
"meta": {
29
"schemaId": "NFT1.0/MA",
30
"website": "vaionex.com",
31
"legal": {
32
"terms": "© 2020 TAAL TECHNOLOGIES SEZC\nALL RIGHTS RESERVED. ANY USE OF THIS SOFTWARE IS SUBJECT TO TERMS AND CONDITIONS OF LICENSE. USE OF THIS SOFTWARE WITHOUT LICENSE CONSTITUTES INFRINGEMENT OF INTELLECTUAL PROPERTY. FOR LICENSE DETAILS OF THE SOFTWARE, PLEASE REFER TO: www.taal.com/stas-token-license-agreement"
33
},
34
"media": [
35
{
36
"URI": "string",
37
"type": "string",
38
"altURI": "string"
39
}
40
]
41
}
42
},
43
"splitable": true
44
}'
Copied!
1
curl --location --request POST 'https://us-central1-changedev-3b21a.cloudfunctions.net/api/v1/issue' \
2
--header 'uid: uid' \
3
--header 'apikey: apikey' \
4
--header 'walletid: walletId' \
5
--header 'Content-Type: application/json' \
6
--header 'protocol: protocol' \
7
--data-raw '{
8
"name": "Store Bonus Points",
9
"protocolId": "STAS",
10
"symbol": "SBP",
11
"description": "A supermarket bonus point.",
12
"image": "https://upload.wikimedia.org/wikipedia/en/9/95/Test_image.jpg",
13
"tokenSupply": 3,
14
"decimals": 0,
15
"satsPerToken": 1500,
16
"properties": {
17
"legal": {
18
"terms": "Your token terms and description.",
19
"licenceId": "T3ST-2"
20
},
21
"issuer": {
22
"organisation": "Vaionex Corp.",
23
"legalForm": "Limited",
24
"governingLaw": "US",
25
"issuerCountry": "US",
26
"jurisdiction": "US",
27
"email": "[email protected]"
28
},
29
"meta": {
30
"schemaId": "NFT1.0/MA",
31
"website": "vaionex.com",
32
"legal": {
33
"terms": "© 2020 TAAL TECHNOLOGIES SEZC\nALL RIGHTS RESERVED. ANY USE OF THIS SOFTWARE IS SUBJECT TO TERMS AND CONDITIONS OF LICENSE. USE OF THIS SOFTWARE WITHOUT LICENSE CONSTITUTES INFRINGEMENT OF INTELLECTUAL PROPERTY. FOR LICENSE DETAILS OF THE SOFTWARE, PLEASE REFER TO: www.taal.com/stas-token-license-agreement"
34
},
35
"media": [
36
{
37
"URI": "string",
38
"type": "string",
39
"altURI": "string"
40
}
41
]
42
}
43
},
44
"splitable": true
45
}'
Copied!

Redeem

This endpoint lets user redeem tokens and thus dissolving the smart contract for satoshis. Only users having manager role can access this endpoint.
authToken
API Key and UID
1
curl --location --request POST 'https://us-central1-changedev-3b21a.cloudfunctions.net/api/v1/redeem' \
2
--header 'walletid: walletId' \
3
--header 'Content-Type: application/json' \
4
--header 'Authorization: Bearer authToken' \
5
--data-raw '
6
{
7
"dataArray": [
8
{
9
"amount": 0.00004,
10
"tokenId": "tokenId",
11
"sn": 0
12
}
13
]
14
}'
Copied!
1
curl --location --request POST 'https://us-central1-changedev-3b21a.cloudfunctions.net/api/v1/redeem' \
2
--header 'uid: uid' \
3
--header 'apikey: apikey' \
4
--header 'walletid: walletId' \
5
--header 'Content-Type: application/json' \
6
--data-raw '
7
{
8
"dataArray": [
9
{
10
"amount": 0.00004,
11
"tokenId": "tokenId",
12
"sn": 0
13
}
14
]
15
}'
Copied!
Copy link
Contents