Minting on Spark is available immediately after your token is created. The mintTokens function lets you create new tokens on Spark, either to set the initial supply or to mint more over time as needed.

What you need to know

  • Only the creator wallet can mint
  • Tokens are minted directly to the creator’s Spark address
  • The amount must be in base units
  • Minting is a single, instant transaction

Mint tokens

Minting only requires an amount. Here’s how to do it:
const transactionId = await wallet.mintTokens(1000000n);

console.log("Spark Transaction ID:" + transactionId);
  • Minting is limited by the max supply if one was defined during the token creation.
  • Amounts must be specified in base units, accounting for your token’s decimals (e.g. 1.5 tokens = 1_500_000 for 6 decimals).

Where are tokens minted to?

When you mint tokens on Spark, they’re credited directly to your issuer’s Spark address derived from:
sp + <token_public_key>
This address is bech32m-encoded and generated automatically when you create your wallet. All minted supply is sent here by default. You can’t specify a different destination when minting. Transfers must happen in a separate step.