SummaryAccounts have 5 fields: lamports, data, owner, executable, and rent_epoch.
Each account is identified by a unique 32-byte address. Accounts must hold a
minimum lamport balance proportional to their data size to stay onchain.
Account address
Every account address is a 32-byte value, displayed as a base58-encoded string. An address can be one of two types:- Public key: corresponds to an Ed25519 keypair (has a private key)
- Program-derived address (PDA): deterministically derived from a program ID and seeds (no private key)
Public key
AKeypair consists of a public key (used as the account address) and a
private key (used to sign transactions). The following example generates a
keypair using the Solana SDK.
The Rust tabs on this page use the 2.x Solana crates. Install the
dependencies with (tested with Rust 1.89 and 1.98):
@solana/web3.js 1.x is no longer actively maintainedIt receives critical fixes only. Use Kit for new code. To migrate existing code, follow the Kit upgrade guide, or the web3.js v3 migration guide to keep the class-based API.To run this code, install 1.x with npm install @solana/web3.js@1. A plain npm install @solana/web3.js installs v3, which this code doesn’t run on.Program-derived address
A program-derived address (PDA) is deterministically derived from a program ID and one or more optional seeds. PDAs do not have a corresponding private key. The following example derives a PDA using the Solana SDK.@solana/web3.js 1.x is no longer actively maintainedIt receives critical fixes only. Use Kit for new code. To migrate existing code, follow the Kit upgrade guide, or the web3.js v3 migration guide to keep the class-based API.To run this code, install 1.x with npm install @solana/web3.js@1. A plain npm install @solana/web3.js installs v3, which this code doesn’t run on.Account fields
EveryAccount
has a maximum size of
MAX_ACCOUNT_DATA_LEN
(10 MiB, equivalent to MAX_PERMITTED_DATA_LENGTH) and contains five
fields:
| Field | Type | Description |
|---|---|---|
lamports | u64 | Balance in lamports. Owner can debit; any program can credit. |
data | Vec<u8> | Account state or program bytecode. Max 10 MiB. Owner-writable only. |
owner | Pubkey | Program with write access. Reassignable only when data is zeroed. |
executable | bool | True = program account. |
rent_epoch | Epoch | Deprecated. Set to u64::MAX for rent-exempt accounts. |
Account
1
Lamports
The See
lamports field holds the account’s balance in
lamports (1 SOL = 1,000,000,000
lamports).Every account must maintain a minimum lamport balance to keep its data stored
onchain. This refundable storage balance is proportional to the account’s data
size.The runtime and RPC method names call this the “rent-exempt minimum,” but
ongoing rent collection is disabled. Treat the balance as a refundable account
storage deposit: the full balance can be recovered when the account is closed.
minimum_balance()
and the rent
constants.In the examples, the 82-byte mint holds exactly its minimum balance (1,066,800
lamports on Mainnet in November 2026). The Token Program account, read from
Mainnet, holds more than the 833,120-lamport minimum for its 36 bytes,
because anyone can send lamports to an address.2
Data
The
data field stores an arbitrary byte array. Its contents depend on the
account type:- Program accounts: Contains executable bytecode or the address of a program data account that stores the bytecode.
- Data accounts: Contains program-defined state data. The owning program defines the serialization format.
- Fetch the account by its address.
- Deserialize the
datafield from raw bytes into the program-defined data structure.
Program tag and the
address of the program data account that stores its bytecode.3
Owner
The
owner field contains the program ID (public key) of the program that owns
this account.The owner program is the only program that can:- Modify the account’s
datafield - Deduct lamports from the account’s
lamportsfield
4
Executable
The
executable field is a boolean that determines whether the account is a
program account or a
data account:true= program account (contains executable code)false= data account (stores state)
5
Rent epoch
The
rent_epoch field is deprecated.Previously tracked when an account would automatically have lamports deducted to
pay for maintaining its data onchain. Since ongoing rent collection is disabled,
rent_epoch is set to u64::MAX for all new accounts that meet the minimum
storage balance.