SPL Token Basics
Learn how to integrate SPL Tokens into your Solana programs using the Anchor framework.
This section covers the basics for interacting with SPL Tokens in Anchor programs, focusing on the most commonly used instructions.
All examples in this section work identically with both the original Token Program and the Token Extension Program (Token 2022), as they share the same base implementation.
Below are the most common instructions you'll see when interacting with SPL Tokens:
Create a Token Mint
Learn how to create and initialize token mint accounts in Solana programs using Anchor. Covers creating mint accounts with generated keypairs or PDAs with code examples.
Create a Token Account
Learn how to create and initialize token accounts in Solana programs using Anchor. Covers creating Associated Token Accounts (ATAs) and Program Derived Address (PDA) token accounts with code examples.
Mint Tokens
Learn how to mint tokens in Solana programs using Anchor. Covers creating new tokens via cross program invocations (CPI) to the Token Program with code examples.
Transfer Tokens
Learn how to transfer tokens between token accounts through cross program invocations (CPIs) in Anchor.