Skip to main content
Launch a Token
Create and launch your first token on Spark in minutes. This quickstart will walk you through setting up your wallet, issuing a token, minting supply, and sending your first transfer. All on Spark, without touching L1 or waiting for confirmations.

Setup: Run the CLI

Clone and launch the Spark CLI, powered by the Spark SDK:
CLI
# Clone the Spark SDK repo
git clone https://github.com/buildonspark/spark.git

# Navigate to the JS folder
cd spark/sdks/js

# Install dependencies and build the SDK
yarn && yarn build

# Navigate to the JS CLI example
cd examples/spark-cli

# Start the CLI
yarn cli

Initialize your wallet

Create a wallet to serve as the issuer of your token:
CLI
> initwallet
Example output:
CLI
Mnemonic: rhythm torch mistake reopen device surround cabin wish snake better blind draft
Network: REGTEST
Important: Keep your mnemonic safe and offline. The wallet you create here becomes the root of trust for your token. It’s the only wallet authorized to mint or burn supply.

Create a token

Launch your token directly on Spark:
CLI
> createtoken <tokenName> <tokenTicker> <decimals> <maxSupply> <isFreezable>
# Example:
> createtoken MyToken MTK 6 1000000 false
name
string
required
Human-readable name of the token.
ticker
string
required
Short symbol for the token (typically 3–6 characters).
decimals
number
required
Decimal precision used for display and arithmetic.
maxSupply
number
required
Hard cap on total mintable supply.
freezable
boolean
required
Whether the issuer can freeze or unfreeze token balances.
CLI
TxID: 9c5d17acb7fe203ab6342b3f556b4e5f3b4dabe1bca3b0b98b1b3d9cf7d92c4d
Token ID: btkn1qv6cps0n0ttm3p4gx62rzty4rjhzqwe5eqv2wlt
txId
string
required
Spark transaction ID of the token creation.
tokenId
string
required
Bech32m token identifier (e.g., btkn1…) used in later operations.
Your token now exists on Spark. It’s ready for minting and transfers.

Mint tokens

Bring new tokens into circulation. Only the issuer wallet can mint, up to the max you set before.
CLI
> minttokens 500000
Example response:
CLI
Minted: 500000 MTK
Remaining mintable: 500000 MTK
You can verify the token balance:
CLI
> gettokenbalance
Token: MTK
Balance: 500000

Send tokens

Tokens on Spark move instantly and cost nothing. You can choose to create a new wallet to find a sender.
CLI
# Wallet 2
> initwallet
Mnemonic: explain bullet cradle segment lava enable someone lemon bracket fossil invite crash
> getsparkaddress
sparkrt1pgw6rrt6s4y3xghx6cl5v4mm08eylktaygff62mg8uk3u5zqq2zwqf9t9d0
Then send tokens from your issuer wallet:
CLI
# Wallet 1 (Issuer)
> transfertokens btkn1qv6cps0n0ttm3p4gx62rzty4rjhzqwe5eqv2wlt 100000 sparkrt1pgw6rrt6s4y3xghx6cl5v4mm08eylktaygff62mg8uk3u5zqq2zwqf9t9d0
That’s it. The transfer settles instantly on Spark.