Skip to main content
Creating a token registers it on the network and locks in its properties. Once created, the token exists immediately and you can start minting. All token properties (name, ticker, decimals, max supply, freezability) are permanent and cannot be changed after creation.
Create Token

Create Your Token

import { IssuerSparkWallet } from "@buildonspark/issuer-sdk";

const { wallet } = await IssuerSparkWallet.initialize({
  options: { network: "REGTEST" }
});

const { tokenIdentifier, transactionHash } = await wallet.createToken({
  tokenName: "Acme Dollar",
  tokenTicker: "ACME",
  decimals: 6,
  maxSupply: 0n,
  isFreezable: true,
  returnIdentifierForCreate: true
});

console.log("Token created:", tokenIdentifier); // btkn1q...
console.log("Announcement tx:", transactionHash);

Token Properties

All properties are permanent. Choose carefully.

Name and Ticker

Display name and symbol shown in wallets and explorers.
tokenName: "Acme Dollar"
tokenTicker: "ACME"

Decimals

Defines the smallest unit. If decimals: 6, then 1000000 base units = 1 token.
DecimalsSmallest UnitCommon Usage
60.000001Stablecoins
80.00000001Bitcoin-style

Max Supply

0n for unlimited. Any other value caps total supply forever.
// Unlimited
maxSupply: 0n

// Capped at 21 million (8 decimals)
maxSupply: 21_000_000_00000000n

Freezable

If true, you can freeze addresses from transacting your token. If false, you lose this ability permanently.
This cannot be changed. If you set isFreezable: false, you can never freeze tokens.

Get Token Info

After creation, retrieve your token’s metadata and identifier:
const [tokenIdentifier] = await wallet.getIssuerTokenIdentifiers();
if (!tokenIdentifier) throw new Error("No token identifiers found for this issuer");

const [metadata] = await wallet.getIssuerTokensMetadata([tokenIdentifier]);
if (!metadata) throw new Error(`No metadata found for token ${tokenIdentifier}`);

console.log(metadata.tokenName);    // "Acme Dollar"
console.log(metadata.tokenTicker);  // "ACME"
console.log(metadata.decimals);     // 6
console.log(metadata.maxSupply);    // 0n
console.log(metadata.isFreezable);  // true

console.log(tokenIdentifier); // btkn1q...

Vanity Identifiers

Token identifiers are derived from your wallet keys. Want a custom suffix like btkn1...usdc? Use the vanity generator.