TLDR:Documentation Index
Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
Use this file to discover all available pages before exploring further.
- The Token Extensions Program (Token-2022) is a superset of the original SPL Token Program with optional extensions you enable at mint creation time.
- Extensions add features like transfer fees, on-chain metadata, confidential transfers, non-transferable (soulbound) tokens, permanent delegates, and transfer hooks.
- Token-2022 tokens work with the same RPC methods (
getTokenAccountsByOwner,getTokenSupply, etc.) but require the Token-2022 program ID for filtering. - Most extensions cannot be added after mint creation — plan your token design upfront.
Why Token Extensions matter
The original SPL Token Program covers basic mint, transfer, and burn operations. But real-world token use cases need more:- Transfer fees — protocol-level fee on every transfer, collected automatically on-chain
- Confidential transfers — ZK-encrypted balances and transfer amounts for privacy
- On-chain metadata — store token name, symbol, and URI directly on the mint account (no Metaplex dependency)
- Non-transferable tokens — soulbound credentials, achievements, identity tokens
- Permanent delegate — compliance-oriented freeze/clawback capability
- Transfer hooks — programmable logic that runs on every transfer (royalties, allow-lists, custom validation)
TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb.
Get your own node endpoint today
Start for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.Available extensions
Extensions are enabled at mint or token account creation time. Most cannot be added later.Mint extensions
| Extension | What it does |
|---|---|
| TransferFeeConfig | Automatic fee on every transfer, collected in withheld accounts |
| MintCloseAuthority | Allows closing the mint account to reclaim rent |
| InterestBearingConfig | Tokens accrue interest over time (UI display, not actual minting) |
| PermanentDelegate | An authority that can transfer or burn tokens from any account |
| NonTransferable | Tokens cannot be transferred (soulbound) |
| TransferHook | Calls a custom program on every transfer (CPI-based) |
| MetadataPointer + TokenMetadata | On-chain metadata stored directly on the mint |
| GroupPointer + TokenGroup | Collection-like grouping for tokens |
| ConfidentialTransferMint | Enables ZK-encrypted balances and transfers |
| DefaultAccountState | New token accounts start as frozen (require explicit thaw) |
| Pausable | Admin can pause all transfers globally |
| ScaledUiAmount | Rebasing token display (like stETH) |
Account extensions
| Extension | What it does |
|---|---|
| ImmutableOwner | Token account owner cannot be changed (enabled by default for ATAs) |
| MemoTransfer | Inbound transfers require a memo |
| CpiGuard | Blocks certain token operations when invoked via CPI |
Create a token with extensions
This example creates a mint with transfer fees and on-chain metadata.Prerequisites
Code
Query Token-2022 accounts via RPC
When querying Token-2022 accounts, use the Token-2022 program ID in theprogramId filter:
jsonParsed response for Token-2022 accounts includes an extensions array showing the active extensions and their configuration. This is the same getTokenAccountsByOwner method — the only difference is the program ID filter.
Key considerations
- Plan extensions at creation — most extensions cannot be added after the mint is initialized.
- Incompatible extensions — some combinations don’t work together (e.g.,
NonTransferable+TransferFeeConfig). - Rent costs — extensions increase account size and therefore rent. Calculate space with
getMintLen([...extensions]). - Wallet support — major wallets (Phantom, Backpack, Solflare) support Token-2022 tokens. Some older wallets may not.
- DEX support — Jupiter, Raydium, and Orca support Token-2022 tokens with most extensions.
Additional resources
- Solana Token Extensions documentation
- Token-2022 program source
- Transferring SPL tokens on Solana — for classic SPL Token transfers
- getTokenAccountsByOwner — query token accounts with
jsonParsedencoding