Anchor provides strongly-typed account wrappers for common Solana account patterns.
Account<‘info, T>
Wrapper for program-owned accounts with automatic validation and deserialization.
Checks:
- Account owner is the current program
- Account discriminator matches type T
- Account data deserializes to type T
Signer<‘info>
Verifies an account signed the transaction.
Checks:
SystemAccount<‘info>
Represents a native Solana account owned by the System Program.
Program type
Verifies an account is an executable program.
Checks:
- Account is executable
- Account key matches expected program ID
UncheckedAccount<‘info>
Raw AccountInfo with no automatic checks.
Always add a /// CHECK: comment explaining why no validation is needed.
InterfaceAccount<‘info, T>
For Token-2022 compatibility.
Complete reference
See Accounts for detailed usage examples.