Burn currency tokens

Burns (destroys) currency tokens of a currency held in a wallet.


Call URL

/currencies/(currencyAddress)/tokens

Type : DELETE


Call request header parameters

Field Type Required/Optional Description Accepted values
wallet-address string Required The sender's wallet address. Any valid wallet address
wallet-key string Required The key of the sender's wallet. Any valid wallet key that unlocks the sender's wallet

Call request URL parameters

Field Type Required/Optional Description Accepted values
currencyAddress string Required The address of the involved currency. Any valid currency address

Call request body parameters

Field Type Required/Optional Description Accepted values
amountToBurn number (in string) Required The number of currency tokens to burn Any number in a string format and is bigger than "0".

Sample Call Request

https://api.tetrium.io/tokenize/currencies/0x29341b674091d600c227B137a457b0573515A7A8/tokens

Parameters:

{
   "amountToBurn":"50"
}

Call responses

Success response

Field Type Description Respond Values
status string Status of the API call. "success"
message string Information about the status. "burn-currency-token initiated"
transactionHash string The hash of the transaction. To be used to verify the transaction's sealing status. Any string

Error response

Field Type Description Respond Values
status string Status of the API call. "fail"
error string Information about the error. (See below)

Information contained in error:

Error Messages Description
"missing amountToBurn" amountToBurn was not provided as a parameter in the API call body.
"invalid amountToBurn" amountToBurn provided was not in the correct format.

For any other errors, please refer to List of Common Error Messages

Sample Call Response

{
   "status":"success",
   "message":"transfer-currency-token initiated",
   "transactionHash":"0x74de8a3b7b1f2b6da5f003aa625211cda06a42cd15c3d6ed533e2b4ddb9f9ec2"
}

results matching ""

    No results matching ""