Mint tokens.
POST/wallet/mint-tokens
Mint tokens.
Request
Header Parameters
x-wallet-id stringrequired
Defines the key of the wallet on which the request will be executed.
- application/json
Body
required
Data to mint tokens.
token stringrequired
UID of the token to mint.
address stringrequired
Destination address of the minted tokens.
amount integerrequired
The amount of tokens to mint. It must be an integer with the value in cents, i.e., 123 means 1.23.
change_address string
Optional address to send the change amount.
mint_authority_address string
Optional address to send the new mint authority output created.
allow_external_mint_authority_address boolean
If the mint authority address is allowed to be from another wallet. Default is false.
Responses
- 200
Mint tokens.
- 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": "0072abb9f3f98aa9d9a4e46d6c4f07c16258dbc963f89213f9f4d03dff5977bc",
"nonce": 2,
"timestamp": 1610730780,
"version": 1,
"weight": 8.000001,
"parents": [
"00c9b977ddb2d0256db38e6c846eac84e0cf7ab8eded2f37119d84ee6edd4277",
"006814ba6ac14d8dc69a888dcf79e3c9ad597b31449edd086a82160698ea229d"
],
"inputs": [
{
"tx_id": "00c6fe8179e6f93d220707a58b94fa876d81eb0d7caaa713e865ba4a5b24a03e",
"index": 0,
"data": "RjBEAiBsR2Yv7g9juMwLjgt+XUbuRGRb9BLyHQVQZSPX4pFToQIgES1EO8QHewCiPTg5T228++eZk8CdzkJ3itvxsVuAcV0hA7IyIrBze747iYFS43sEUszBb2Ga9Qv4qZg+vU3R+XzD"
},
{
"tx_id": "00c9b977ddb2d0256db38e6c846eac84e0cf7ab8eded2f37119d84ee6edd4277",
"index": 2,
"data": "RjBEAiAD3Iq6Uy5y+phl9j6Q2wU+zEqWHXt4YgTvBXkQrBZYAQIgKBXSf8pDZwA6Trl+OVtRRoTNFTbQYK6300aZ0IPNuJEhA9jOwwMvZUEgKSQnarS0hLYt2px6eas4E03c4pJpRGfH"
}
],
"outputs": [
{
"value": 90,
"token_data": 0,
"script": "dqkUeAmBO6S3tT7y/HyCXrqOWXkOETWIrA=="
},
{
"value": 1000,
"token_data": 1,
"script": "dqkUeAmBO6S3tT7y/HyCXrqOWXkOETWIrA=="
},
{
"value": 1,
"token_data": 129,
"script": "dqkUPqMYv+My2kCjdYqx6nHNxLVtRpSIrA=="
}
],
"tokens": [
"00c9b977ddb2d0256db38e6c846eac84e0cf7ab8eded2f37119d84ee6edd4277"
]
}
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."
}
Loading...