Token Issuance

Create a STAS token

Creating a token requires you to first create a 'default' wallet to issue it to the wallet. If you didnt create one, you can jump back to the wallet section.

pageWallets

The token issuance endpoint takes care of all the rest (including paying the mining fee to mint the token). All you need is to add the parameters to specify the type of STAS token you want.

ParameterDescriptionProperty

Name

The token name

UTF-8 standard, up to 32 characters in length.

Symbol

The token symbol

1-9 alphanumeric characters

Description

The token description

up to 512 characters

Image

The mini icon image

250x250 pixels, type image

Token Supply

The amount of tokens to mint in the issuance

Any integer

Decimals

Decimals indicate the formatting, e.g. decimals 2 for a dollar token with cents.

Integer not bigger than 8

Sats Per Token

Satoshis to be used for each token.

Integer

Splitable

Tokens are split table and merge able, NFTs are not.

Boolean [true/false]

Data

Custom data string(s) to be added to the issued tokens

Object<Array>

Meta

Any extra data to indicate legals and terms.

RFC 3986 JSON formatted

Above stated are the main inputs for each STAS token, the extended schema can be found in below code example. There is only one STAS format but various settings that make it behave according to its purpose and use case.

Issuance function

To issue a STAS token, create a variable with all parameters, and trigger relysia.issue().

var parameters = {
    serviceId: 'optional',
    protocol: 'optional',
    data: {
      "name": "Bonus Point Token",
      "protocolId": "STAS",
      "symbol": "BPT",
      "description": "A supermarket bonus point token to be used ay https://yourproject.com",
      "image": "https://firebasestorage.googleapis.com/v0/b/nftdev/o/nftTemp%2FWL1DdD?alt=media",
      "tokenSupply": 30,
      "decimals": 0,
      "satsPerToken": 1,
      "splitable": true,
      "data" : {"1" : ["custom data 1", "custom data 2"]},
      "properties": {
        "legal": {
          "terms": "STAS, Inc. retains all rights to the token script.  Use is subject to terms at https://stastoken.com/license.",
          "licenceId": "stastoken.com"
        },
        "issuer": {
          "organisation": "vaionex corp.",
          "legalForm": "Limited",
          "governingLaw": "US",
          "issuerCountry": "US",
          "jurisdiction": "US",
          "email": "info@vaionex.com"
        },
        "meta": {
          "schemaId": "STAS1.0",
          "website": "https://yourProject.com",
          "legal": {
            "terms": "Your personal token terms"
          }
        }
      }
    }
}
const response = await relysia.contracts.v1.issue(parameters);

Custom Data Field for Tokens

Incorporating personalized data into your Tokens can significantly enhance its functionality. The "data" field allows for the inclusion of an object value, which will be assigned as a numbered string key with an accompanying array property. Each element in the array will be added to the token script as its own data chunk.

"data" : {"1" : ["custom data 1", "custom data 2"]},

Mint a Token.

POST https://api.relysia.com/v1/issue

Mint a token with given specifications (can be both token or NFT). More on docs.relysia.com.

Headers

NameTypeDescription

protocol

string

walletID

string

Request Body

NameTypeDescription

name

string

protocolId

string

symbol

string

description

string

image

string

tokenSupply

number

decimals

number

satsPerToken

number

properties

object

splitable

boolean

{
  "statusCode": 200,
  "data": {
    "status": "success",
    "msg": "Contract created successfully",
    "tokenId": "7791e1839f705e2813ec744a15fd10d355ff99b2-Han-2022",
    "tokenObj": {
      "name": "Han solo",
      "protocolId": "STAS",
      "symbol": "Han-2022",
      "description": "Starwars addition",
      "image": "https://images.unsplash.com/photo-1663454455454-49cf9e3d87f6?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxMHx8fGVufDB8fHx8&auto=format&fit=crop&w=500&q=60",
      "totalSupply": 3,
      "decimals": 0,
      "satsPerToken": 1,
      "properties": {
        "legal": {
          "terms": "Your token terms and description.",
          "licenceId": "T3ST-2"
        },
        "issuer": {
          "organisation": "Vaionex Corp.",
          "legalForm": "Limited",
          "governingLaw": "US",
          "issuerCountry": "US",
          "jurisdiction": "US",
          "email": "info@vaionex.com"
        },
        "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,
      "contractTxid": "bc6dd15cb063163dfe7a9707a02a6365301fb95d4365cc79a6c4fa3018064a6b",
      "issueTxid": "c776daaaabbbf61b9ca97bfbd3580600b69806ee2b9b224b5b570e704d639b8c",
      "intialSupply": 3,
      "contractAddress": "1BuEAp4mjJdeDGcpw6XdvtA9fWmHNF2mMX",
      "creationDate": "1663823369759",
      "userId": "JZzO1ySdhkPkBYQLXa66EbXDUFD2",
      "updationDate": "1663823369760"
    }
  }
}

Last updated