Mint currency tokens

Mints (produces) tokens of a currency.


Call URL

/currencies/(currencyAddress)/tokens

Type : POST


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
amountToMint number (in string) Required The number of tokens to mint Any number in a string format

Sample Call Request

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

Parameters:

{
   "amountToMint":"100"
}

Call responses

Success response

Field Type Description Respond Values
status string Status of the API call. "success"
message string Information about the status. "mint-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 amoutToMint" amountToMint was not provided as the parameters in the API call body.
"invalid amountToMint" amountToMint provided was not in the correct format.
"mint over limit" To mint the amount requested would exceed the currency token supply limit. Please mint a smaller amount, or adjust the currency token supply limit higher.

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

Sample Call Response

{
   "status":"success",
   "message":"mint-currency-token initiated",
   "transactionHash":"0xe8ca509c0ddb137c269951832123a2dc8ccd7ca5b8b706bcf0f58b44d7d159da"
}

results matching ""

    No results matching ""