Skip to main content
Creating a token on Spark is instant and free. This is the moment where you define its core parameters [name, symbol, decimals etc.] and commit them to chain.

What you need to know

  • Token creation is one-per-wallet
  • No Bitcoin L1 funding needed
  • Tokens are created instantly
  • Metadata is immutable once set
  • Minting can begin immediately after creation

Prerequisites

Create Your Token

Creating a token on Spark is simple and immediate. Use the createToken method to register your token with the Spark network:
const tokenCreationTx = await wallet.createToken({
  tokenName: "Test Token",
  tokenTicker: "TEST",
  decimals: 8,
  maxSupply: 10000000n,
  isFreezable: true,
});

console.log("Token Creation TX:", tokenCreationTx);

Parameters

The createToken() function accepts the following metadata:
ParameterTypeDescription
tokenNamestringHuman-readable token name (e.g., “USD Coin”)
tokenTickerstringToken symbol (e.g., “USDC”)
decimalsnumberNumber of decimal places (e.g., 6 for USDC, 8 for BTC)
maxSupplybigintMaximum token supply in base units. Set to 0n for unlimited supply
isFreezablebooleanWhether the token can be frozen after issuance

Returns

Promise<string>; // Spark transaction ID of the token creation

Examples

Creating an Unlimited Supply Token

const txId = await wallet.createToken({
  tokenName: "USD Coin",
  tokenTicker: "USDC",
  maxSupply: 0n, // Unlimited supply
  decimals: 6, // 1 USDC = 1_000_000 base units
  isFreezable: true,
});

console.log("Token Creation TX:", txId);

Creating a Fixed Supply Token

// Create a token with max supply of 1 million
const txId = await wallet.createToken({
  tokenName: "My Fixed Token",
  tokenTicker: "MFT",
  maxSupply: 1_000_000_000_000n, // 1,000,000.000000 tokens
  decimals: 6,
  isFreezable: false,
});

console.log("Token Creation TX:", txId);
// Create a token with max 21 million supply and minimum denomination of 0.00000001
const txId = await wallet.createToken({
  tokenName: "Example Bitcoin",
  tokenTicker: "ExBTC",
  maxSupply: 2_100_000_000_000_000n,
  decimals: 8,
  isFreezable: false,
});

console.log("Token Creation TX:", txId);