Links

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
curl --location --request POST 'https://us-central1-changedev-3b21a.cloudfunctions.net/api/v1/issue' \
--header 'walletid: walletId' \
--header 'Content-Type: application/json' \
--header 'protocol: STAS' \
--header 'Authorization: Bearer authToken' \
--data-raw '{
"name": "Store Bonus Points",
"protocolId": "STAS",
"symbol": "SBP",
"description": "A supermarket bonus point.",
"image": "https://upload.wikimedia.org/wikipedia/en/9/95/Test_image.jpg",
"tokenSupply": 3,
"decimals": 0,
"satsPerToken": 1500,
"properties": {
"legal": {
"terms": "Your token terms and description.",
"licenceId": "T3ST-2"
},
"issuer": {
"organisation": "Vaionex Corp.",
"legalForm": "Limited",
"governingLaw": "US",
"issuerCountry": "US",
"jurisdiction": "US",
"email": "[email protected]"
},
"meta": {
"schemaId": "NFT1.0/MA",
"website": "vaionex.com",
"legal": {
"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"
},
"media": [
{
"URI": "string",
"type": "string",
"altURI": "string"
}
]
}
},
"splitable": true
}'
curl --location --request POST 'https://us-central1-changedev-3b21a.cloudfunctions.net/api/v1/issue' \
--header 'uid: uid' \
--header 'apikey: apikey' \
--header 'walletid: walletId' \
--header 'Content-Type: application/json' \
--header 'protocol: protocol' \
--data-raw '{
"name": "Store Bonus Points",
"protocolId": "STAS",
"symbol": "SBP",
"description": "A supermarket bonus point.",
"image": "https://upload.wikimedia.org/wikipedia/en/9/95/Test_image.jpg",
"tokenSupply": 3,
"decimals": 0,
"satsPerToken": 1500,
"properties": {
"legal": {
"terms": "Your token terms and description.",
"licenceId": "T3ST-2"
},
"issuer": {
"organisation": "Vaionex Corp.",
"legalForm": "Limited",
"governingLaw": "US",
"issuerCountry": "US",
"jurisdiction": "US",
"email": "[email protected]"
},
"meta": {
"schemaId": "NFT1.0/MA",
"website": "vaionex.com",
"legal": {
"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"
},
"media": [
{
"URI": "string",
"type": "string",
"altURI": "string"
}
]
}
},
"splitable": true
}'

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
curl --location --request POST 'https://us-central1-changedev-3b21a.cloudfunctions.net/api/v1/redeem' \
--header 'walletid: walletId' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer authToken' \
--data-raw '
{
"dataArray": [
{
"amount": 0.00004,
"tokenId": "tokenId",
"sn": 0
}
]
}'
curl --location --request POST 'https://us-central1-changedev-3b21a.cloudfunctions.net/api/v1/redeem' \
--header 'uid: uid' \
--header 'apikey: apikey' \
--header 'walletid: walletId' \
--header 'Content-Type: application/json' \
--data-raw '
{
"dataArray": [
{
"amount": 0.00004,
"tokenId": "tokenId",
"sn": 0
}
]
}'