Skip to main content
Minting creates new tokens and deposits them directly into your issuer wallet. From there, you can transfer them to users or hold them in reserve. Only the issuer wallet that created the token can mint.
Mint Tokens

Mint

// Mint 10,000 tokens (6 decimals)
await wallet.mintTokens(BigInt(10_000_000000));
The amount is in base units. If your token has 6 decimals, multiply the human-readable amount by 1,000,000.
function toBaseUnits(amount: number, decimals: number): bigint {
  return BigInt(Math.floor(amount * Math.pow(10, decimals)));
}

await wallet.mintTokens(toBaseUnits(10000, 6));

Check Your Balance

After minting, tokens appear in your wallet immediately:
const balance = await wallet.getIssuerTokenBalance();
console.log("Your balance:", balance.balance);

Max Supply

If you set a maxSupply when creating your token, minting fails once you reach it. With unlimited supply (maxSupply: 0), you can mint indefinitely.
const metadata = await wallet.getIssuerTokenMetadata();

if (metadata.maxSupply === BigInt(0)) {
  console.log("Unlimited supply");
} else {
  console.log("Max supply:", metadata.maxSupply);
}