Get the hex representation of a melt tokens transaction without input data.
POST/wallet/tx-proposal/melt-tokens
Get the hex representation of a melt tokens transaction without input data.
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 melt tokens.
token stringrequired
UID of the token to melt.
amount integerrequired
The amount of tokens to melt. It must be an integer with the value in cents, i.e., 123 means 1.23.
deposit_address string
Optional deposit_address to send the deposit HTR received after the melt.
change_address string
Optional address to send the change amount of custom tokens after melt.
melt_authority_address string
Optional address to send the new melt authority output created.
allow_external_melt_authority_address boolean
If the melt authority address is allowed to be from another wallet. Default is false.
Responses
- 200
Melt tokens.
- application/json
- Schema
- error
- success
- wallet-not-ready
- no-wallet-id
- invalid-wallet-id
Schema
any
Insuficient amount of tokens
{
"success": false,
"error": "There aren't enough tokens in the inputs to melt."
}
Success
{
"success": true,
"txHex": "0001010201000016392ed330ed99ff0f74e4169a8d257fd1d07d3b38c4f8ecf21a78f10efa000016392ed330ed99ff0f74e4169a8d257fd1d07d3b38c4f8ecf21a78f10efa030069463044022011ebd6bfa5e49d504542e58b55dc79cea70e97069546eae2d4b7f470f7b9d6d302203cb7739de69eded37a5ef15e1d669768057a68d4b6089911ee63d746100a6a1b2102a5c1b462ccdcd8b4bb2cf672e0672576420c3102ecbe74da15b2cf56cf49b4a5000016392ed330ed99ff0f74e4169a8d257fd1d07d3b38c4f8ecf21a78f10efa010069463044022011ebd6bfa5e49d504542e58b55dc79cea70e97069546eae2d4b7f470f7b9d6d302203cb7739de69eded37a5ef15e1d669768057a68d4b6089911ee63d746100a6a1b2102a5c1b462ccdcd8b4bb2cf672e0672576420c3102ecbe74da15b2cf56cf49b4a500000002810017a91462d397b360118b99a8d35892366074fe16fa6f09874031fc9b86a7279e649b63f60000000000"
}
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...