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

Method Signature

// Single-token issuer (positional parameter)
async mintTokens(amount: bigint): Promise<string>

// Multi-token issuer (object parameters)
async mintTokens({
  tokenAmount,
  tokenIdentifier,
}: {
  tokenAmount: bigint;
  tokenIdentifier: Bech32mTokenIdentifier;
}): Promise<string>

Parameters

Single-token issuer

amount
bigint
required
The amount to mint (e.g., 1000n)

Multi-token issuer

tokenAmount
bigint
required
The amount to mint (e.g., 1000n)
tokenIdentifier
Bech32mTokenIdentifier
required
The token identifier to mint. Required for multi-token issuers.

Returns

txId
string
required
Transaction ID

Example

// Single token issuer (simple positional parameter)
const txId = await issuerWallet.mintTokens(1000n);
console.log("Tokens minted:", txId);

// Multi-token issuer (specify which token with object parameters)
const tokenId = await issuerWallet.getIssuerTokenIdentifier();
const txId2 = await issuerWallet.mintTokens({
  tokenAmount: 5000n,
  tokenIdentifier: tokenId
});