SPL 代币基础部分涵盖了与 SPL 代币交互的基本指令,重点介绍原始 Token Program 和 Token Extensions Program(Token 2022)共享的功能。
有关如何为 SPL 代币添加元数据的更多信息,请参阅 Metaplex 文档。
Create a Token Mint
Create a token mint and configure the mint's decimals, mint authority, and freeze authority.
Create a Token Account
Create token accounts and associated token accounts for a specific mint and owner.
Mint Tokens
Mint new token units to a token account with the mint authority.
Transfer Tokens
Move tokens between token accounts for the same mint with Token Program transfer instructions.
Approve Delegate
Authorize another address to transfer or burn a limited amount of tokens from a token account.
Revoke Delegate
Remove a token account's current delegate and clear its remaining delegated allowance.
Set Authority
Change or revoke authority roles on a mint or token account, including mint, freeze, owner, and close authority.
Burn Tokens
Burn tokens from a token account and reduce the mint's total supply.
Sync Native
Update a wrapped SOL token account amount after transferring SOL into the account.
Close Token Account
Close a token account and return the account's lamports to a destination account.
Freeze Account
Freeze a token account with the mint's freeze authority to block transfers, burns, and delegate changes.
Thaw Account
Thaw a frozen token account so transfers, burns, and delegate changes can resume.
Is this page helpful?