Create a token.
POST/wallet/create-token
Create a token.
Request
Header Parameters
Defines the key of the wallet on which the request will be executed.
- application/json
Body
required
Data to create the token.
Name of the token.
Symbol of the token.
The amount of tokens to mint. It must be an integer with the value in cents, i.e., 123 means 1.23.
Destination address of the minted tokens.
Optional address to send the change amount.
If should create mint authority for the created token. Default is true.
Optional address to send the mint authority output created.
If the mint authority address is allowed to be from another wallet. Default is false.
If should create melt authority for the created token. Default is true.
Optional address to send the melt authority output created.
If the melt authority address is allowed to be from another wallet. Default is false.
List of utf-8 encoded strings to create a data output for each.
Responses
- 200
Create the token
- application/json
- Schema
- error
- success
- wallet-not-ready
- no-wallet-id
- invalid-wallet-id
Schema
any
Insuficient amount of tokens
{
"success": false,
"error": "Don't have enough HTR funds to mint this amount."
}
Success
{
"hash": "00c9b977ddb2d0256db38e6c846eac84e0cf7ab8eded2f37119d84ee6edd4277",
"nonce": 200,
"timestamp": 1610730485,
"version": 2,
"weight": 8.000001,
"parents": [
"006814ba6ac14d8dc69a888dcf79e3c9ad597b31449edd086a82160698ea229d",
"001ac1d7ff68e9bf4bf67b81fee517f08b06be564d7a28b13e41fea158b4cf54"
],
"inputs": [
{
"tx_id": "00efbc1f99dc50a3c7ff7e7193ebfaa3df28eec467bcd0555eaf703ae773ab5c",
"index": 1,
"data": "RzBFAiEAxFEPpgauWvPzCoM3zknUdOsWL2RwBu8JSOS6yKGufRICIAOf/mKgLka73wiwXUzVLC/kMYXKmqYSnA2oki6pm9qBIQOyMiKwc3u+O4mBUuN7BFLMwW9hmvUL+KmYPr1N0fl8ww=="
}
],
"outputs": [
{
"value": 6290,
"token_data": 0,
"script": "dqkUPzRQOMrZ7k25txm/8V0PVr7dGwSIrA=="
},
{
"value": 1000,
"token_data": 1,
"script": "dqkUPzRQOMrZ7k25txm/8V0PVr7dGwSIrA=="
},
{
"value": 1,
"token_data": 129,
"script": "dqkUL2o1cHLbOQZfj+yVFP0rof9S+WGIrA=="
},
{
"value": 2,
"token_data": 129,
"script": "dqkUVawHzE0m6oUvfyzz2cAUdvYlP/SIrA=="
}
],
"tokens": [],
"token_name": "Test",
"token_symbol": "TST",
"configurationString": "[Test:TST:00c9b977ddb2d0256db38e6c846eac84e0cf7ab8eded2f37119d84ee6edd4277:a233sac]"
}
Wallet is not ready yet
{
"success": false,
"message": "Wallet is not ready.",
"state": 1
}
No wallet id parameter
{
"success": false,
"message": "Parameter 'wallet-id' is required."
}
Wallet id parameter is invalid
{
"success": false,
"message": "Invalid wallet-id parameter."
}