The burnTokens function allows you to permanently remove tokens from circulation, reducing the total supply. When tokens are burned, they’re sent to a special dead address that no one can access — making them permanently unrecoverable.

Things to know

  • Burning is irreversible — tokens cannot be recovered
  • You can only burn tokens held by your own address
  • Amount must be provided in base units (accounting for token decimals)

Prerequisites

  • An initialized wallet
  • Previously minted tokens

Burning tokens

To burn tokens, simply call the burnTokens method with the amount you want to destroy.

const transactionId = await wallet.burnTokens(
  100000n // amountToBurn
);

console.log("Spark Transaction ID:", transactionId);

Once confirmed, the specified tokens are removed from your balance and can no longer be used.