Solana IDL reference › Solana token account and mint layout
SPL Token and Token-2022 store accounts in a fixed, hand-written layout (not Borsh, no discriminator). The base layout is the same in both programs.
| Field | Type | Offset | Size |
|---|---|---|---|
| mint | pubkey | 0 | 32 |
| owner | pubkey | 32 | 32 |
| amount | u64 | 64 | 8 |
| delegate | COption<pubkey> | 72 | 36 |
| state | AccountState | 108 | 1 |
| is_native | COption<u64> | 109 | 12 |
| delegated_amount | u64 | 121 | 8 |
| close_authority | COption<pubkey> | 129 | 36 |
COption<T> is a 4-byte little-endian tag (0 = none, 1 = some) followed by T, and always takes the full size. state is 0 uninitialized, 1 initialized, 2 frozen. Token account page with filters.
| Field | Type | Offset | Size |
|---|---|---|---|
| mint_authority | COption<pubkey> | 0 | 36 |
| supply | u64 | 36 | 8 |
| decimals | u8 | 44 | 1 |
| is_initialized | bool | 45 | 1 |
| freeze_authority | COption<pubkey> | 46 | 36 |
m (required signers), n (valid signers), is_initialized, then 11 signer public keys.
A Token-2022 account or mint with extensions keeps the base layout, then a 1-byte account type at offset 165 (1 = mint, 2 = token account). Mints are zero-padded from byte 82 to 165 first. After the type byte come TLV entries: a 2-byte little-endian extension type, a 2-byte length, then the value. The decoder lists which extensions are present. To check what a Token-2022 mint's extensions mean for a holder, use the Rugsight token check.
Filter the token program's accounts with dataSize: 165 and a memcmp on owner at offset 32 (or mint at offset 0). Most RPCs also offer getTokenAccountsByOwner, which does this for you.
All programs in the IDL reference · Explain a transaction
Data: solana-idls@1.2.1 (MIT, © Obsidian Protocol) and SPL Token / Token-2022 state layouts (Apache-2.0), snapshot 2026-11-17. Programs can upgrade and an IDL snapshot can lag the deployed program, so check important offsets against current account data.