What Is Account in Solana?
An account is the fundamental storage unit on Solana. Every piece of data on-chain — wallet balances, token holdings, program state, and even executable programs — is stored in an account. Each account has a unique 32-byte address (public key) and is owned by a program.
Account fields
| Field | Description |
|---|---|
lamports | Balance in lamports (1 SOL = 1,000,000,000 lamports) |
owner | The program that owns this account and can modify its data |
data | Arbitrary byte array storing the account’s state |
executable | Whether this account contains a deployed program |
rentEpoch | The epoch at which rent was last collected (historical; all accounts are now rent-exempt) |
Account ownership
Every account is owned by exactly one program. Only the owning program can modify the account’s data or debit its lamports. Wallet accounts are owned by the System Program. Token accounts are owned by the Token Program. Program accounts are owned by the BPF Loader.
Rent
Accounts must maintain a minimum lamport balance to remain on-chain, known as the rent-exempt minimum. This balance scales with the account’s data size. Accounts below this threshold are removed by the runtime.
FAQ
What is the maximum account size?
10 MiB (10,485,760 bytes). The realloc instruction can resize an account up to this limit.
Can I delete an account? Only the owning program can close an account. Closing transfers the remaining lamports to a specified recipient and zeroes the data. The System Program cannot close accounts directly — only programs like the Token Program provide close instructions.
How do I read an account? Use getAccountInfo to fetch an account’s data, owner, lamports, and executable flag by its address.
Updated: