
Token Management Overview
Once you’ve created your token, you can perform various management operations to control its supply, distribution, and behavior on the Spark network.Mint Tokens
Create new tokens to increase supply
Freeze/Unfreeze
Control token transfers for specific addresses
Burn Tokens
Permanently remove tokens from circulation
Mint Tokens
Minting on Spark is available immediately after your token is created. ThemintTokens function lets you create new tokens, either to set the initial supply or to mint more over time as needed.
mintTokens(tokenAmount)
Mints new tokens directly to the issuer’s Spark address.
What You Need to Know
Only Creator Can Mint
Only the creator wallet can mint tokens
Minted to Creator
Tokens are minted directly to the creator’s Spark address
Base Units Required
Amount must be specified in base units
Instant Transaction
Minting is a single, instant transaction
Minting Examples
Initial Supply Minting
Ongoing Minting
Where Are Tokens Minted?
When you mint tokens on Spark, they’re credited directly to your issuer’s Spark address derived from:Freeze & Unfreeze Tokens
The freeze functionality allows token issuers to freeze and unfreeze tokens at specific Spark Addresses, only available for tokens created withisFreezable: true.
Freeze Tokens
freezeTokens(sparkAddress)
Freezes tokens for a specific Spark address, preventing them from sending or receiving your token.
Unfreeze Tokens
unfreezeTokens(sparkAddress)
Unfreezes tokens for a specific Spark address, restoring their ability to send and receive your token.
Freeze Requirements
Token Must Be Freezable
Token must be created with
isFreezable: trueOnly Issuer Can Freeze
Only the issuer can freeze or unfreeze addresses
Issuer Cannot Be Frozen
Issuer’s own address cannot be frozen
Instant Effect
Freeze takes effect instantly across the network
Freeze Examples
Burn Tokens
TheburnTokens function permanently removes tokens from circulation, reducing total supply. Burned tokens are sent to an inaccessible dead address, making them unrecoverable.
burnTokens(tokenAmount)
Burns existing tokens, permanently removing them from circulation.
What You Need to Know
Irreversible Action
Burning is irreversible. Tokens cannot be recovered
Only Own Tokens
You can only burn tokens from your own wallet
Base Units Required
Amount must be specified in base units
Reduces Supply
Burned tokens permanently reduce total supply
Burning Examples
Burn Excess Supply
Deflationary Token
Transfer Tokens
Transfer tokens to other Spark addresses for distribution or trading.transferTokens(params)
Transfers tokens to another Spark Address.
Batch Transfer Tokens
batchTransferTokens(params)
Transfers tokens to multiple recipients in a single transaction.
Monitor Token Activity
Get Token Balance
getIssuerTokenBalance(sparkAddress?)
Gets the token balance of a specific wallet or the issuer wallet.
Query Token Transactions
queryTokenTransactions(params)
Retrieves token transactions from the network with flexible filtering options.
Token Management Best Practices
Supply Management
- Plan Your Supply: Decide on initial supply and future minting strategy before creating your token
- Monitor Max Supply: Keep track of your token’s max supply to avoid minting beyond limits
- Consider Deflation: Implement burning mechanisms to create deflationary pressure if desired
Freeze Management
- Use Sparingly: Only freeze addresses when absolutely necessary for compliance or security
- Document Reasons: Keep records of why addresses were frozen
- Regular Review: Periodically review frozen addresses and unfreeze when appropriate
Transfer Management
- Verify Addresses: Always double-check recipient addresses before transferring
- Use Batch Transfers: For multiple recipients, use batch transfers to save on fees
- Monitor Transactions: Track all transfers for accounting and compliance purposes
Security Considerations
- Protect Private Keys: Keep your issuer wallet’s private keys secure
- Test on Regtest: Always test token management operations on regtest first
- Backup Metadata: Keep records of your token’s metadata and configuration
