Mints new tokens to increase the circulating supply for the IssuerSparkWallet.
Method Signature
async mintTokens({
tokenAmount,
tokenIdentifier,
}: {
tokenAmount: bigint;
tokenIdentifier: Bech32mTokenIdentifier;
}): Promise<string>
Parameters
The amount to mint (e.g., 1000n)
tokenIdentifier
Bech32mTokenIdentifier
required
The token identifier to mint.
Returns
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);