Skip to main content
Mints new tokens to increase the circulating supply for the IssuerSparkWallet.

Method Signature

async mintTokens({
  tokenAmount,
  tokenIdentifier,
}: {
  tokenAmount: bigint;
  tokenIdentifier: Bech32mTokenIdentifier;
}): Promise<string>

Parameters

tokenAmount
bigint
required
The amount to mint (e.g., 1000n)
tokenIdentifier
Bech32mTokenIdentifier
required
The token identifier to mint.

Returns

txId
string
required
Transaction ID

Example

const tokenIdentifiers = await issuerWallet.getIssuerTokenIdentifiers();
const tokenId = tokenIdentifiers[0];
if (!tokenId) {
  throw new Error("No issuer token found");
}

const txId = await issuerWallet.mintTokens({
  tokenAmount: 5000n,
  tokenIdentifier: tokenId,
});

console.log("Tokens minted:", txId);