NFT Issuance
Create your first NFT
Non fungible tokens (NFTs) are a way to reward your fans, create collectors, distribute art and declare ownership. NFTs can also be used in extended use as access token or ticket to a festival, which enables countless business opportunities. The issuance of NFTs with the STAS protocol is very similar to normal tokens, with an extended metadata format (to store media files) and other freely customizable attributes.
The general issuance format is the same as the STAS token:
Parameter | Description | Property |
---|---|---|
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 |
This endpoint will issue a STAS token in your wallet, depending on the parameters you assign.
NFTs need to be issued with splittable = false tag. While a token (splittable = true) can also be used as NFT, there is a risk of getting merged or split and thus destroying the value of the NFT.
var parameters = {
serviceId: 'optional',
protocol: 'optional',
data: {
"name": "Football Card 21",
"protocolId": "STAS",
"symbol": "FC21",
"description": "A FC 21 season nft",
"image": "https://firebasestorage.googleapis.com/v0/b/nftdev/o/nftTemp%2FWL1DdD?alt=media",
"tokenSupply": 21,
"decimals": 0,
"satsPerToken": 1,
"splitable": false,
"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": "[email protected]"
},
"meta": {
"schemaId": "NFT1.0",
"website": "https://football21.com",
"legal": {
"terms": "the terms of your nft"
},
"media": [
{
"URI": "string",
"type": "string",
"altURI": "string"
}
]
}
},
},
}
const response = await relysia.contracts.v1.issue(parameters);
Incorporating personalized data into your NFT 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. In this method below it will add the same data to each of the NFTs in a collection
"data" : {"1" : ["custom data 1", "custom data 2"]},
When building a collection of NFTs, you have the ability to incorporate distinct custom data into each of them using the following approach. In this method, each object key corresponds to the specific NFT number to which you are attaching the data.
"data" : {"1" : ["custom data"], "2" : ["custom data 1", "custom data 2"]},
When adding different custom data for each of your NFT collection it is required that the number of keys matches the number of NFTs in the collection.
post
https://api.relysia.com
/v1/issue
Mint a Token.
Last modified 4mo ago