Modules§
- account_
map - A type that stores a map (dictionary) from public key to some value
T. - accounts
- Contains a utility macro that makes it safer to work with lists of accounts.
- balance
- Logic for keeping the stake pool balanced.
- error
- Error types
- instruction
- metrics
- Data structures for tracking metrics on-chain.
- processor
- Program state processor
- stake_
account - Utilities for dealing with stake accounts.
- state
- State transition types
- token
- Types to make working with token balances safer.
- util
Macros§
- accounts_
struct - Generates two structs for passing accounts by name.
- accounts_
struct_ meta - Implementation detail of [
accounts_struct].
Constants§
- MAXIMUM_
UNSTAKE_ ACCOUNTS - The maximum number of unstake accounts that a validator can have simultaneously.
- MINIMUM_
STAKE_ ACCOUNT_ BALANCE - The minimum amount to put in a stake account (1 SOL).
- MINT_
AUTHORITY - Mint authority, mints StSol.
- RESERVE_
ACCOUNT - Seed for reserve account that holds SOL.
- REWARDS_
WITHDRAW_ AUTHORITY - Authority responsible for withdrawing the stake rewards.
- STAKE_
AUTHORITY - Seed for managing the stake.
- VALIDATOR_
STAKE_ ACCOUNT - Additional seed for active/activating validator stake accounts.
- VALIDATOR_
UNSTAKE_ ACCOUNT - Additional seed for inactive/deactivating validator stake accounts.
Functions§
- find_
authority_ program_ address - Finds the public key and bump seed for a given authority. Since this
function can take some time to run, it’s preferred to use
Pubkey::create_program_address(seeds, program_id)inside programs.