Creates a new token on Spark using Spark Native Tokens for the IssuerSparkWallet.
Method Signature
async function createToken({
tokenName: string,
tokenTicker: string,
decimals: number,
maxSupply: bigint,
isFreezable: boolean
}): Promise<string>;
Parameters
Name of the token (eg: SparkCoin)
Token ticker (eg: SPARKC)
The precision the token supports (eg: 8 for BTC)
The maximum supply for this token (use 0n for unlimited supply)
Whether or not the Issuer can freeze this token
Returns
Example
const txId = await issuerWallet.createToken({
tokenName: "SparkCoin",
tokenTicker: "SPARKC",
decimals: 8,
maxSupply: 1000000n,
isFreezable: true
});
console.log("Token created:", txId);