Account Types
Anchor Account Type Examples
Minimal reference examples for Anchor account types.
See the account types source code for implementation details.
Account Types
Account<'info, T>
Description: Account container that checks ownership on deserialization
Examples: Github
|
Solpg
AccountInfo<'info>
Description: AccountInfo can be used as a type but Unchecked Account should be
used instead
Examples: Github
|
Solpg
AccountLoader<'info, T>
Description: Type facilitating on demand zero copy deserialization
Examples: Github
|
Solpg
Box<Account<'info, T>>
Description: Box type to save stack space
Examples: Github
|
Solpg
Interface<'info, T>
Description: Type validating that the account is one of a set of given
Programs
Examples: Github
|
Solpg
InterfaceAccount<'info, T>
Description: Account container that checks ownership on deserialization
Examples: Github
|
Solpg
Option<Account<'info, T>>
Description: Option type for optional accounts
Examples: Github
|
Solpg
Program<'info, T>
Description: Type validating that the account is the given Program
Examples: Github
|
Solpg
Signer<'info>
Description: Type validating that the account signed the transaction
Examples: Github
|
Solpg
SystemAccount<'info>
Description: Type validating that the account is owned by the system program
Examples: Github
|
Solpg
Sysvar<'info, T>
Description: Type validating that the account is a sysvar and deserializing it
Examples: Github
|
Solpg
UncheckedAccount<'info>
Description: Explicit wrapper for AccountInfo types to emphasize that no checks
are performed
Examples: Github
|
Solpg