| Crates.io | fogo-stake-pool-interface |
| lib.rs | fogo-stake-pool-interface |
| version | 0.1.0 |
| created_at | 2026-01-21 17:52:54.398008+00 |
| updated_at | 2026-01-21 17:52:54.398008+00 |
| description | Fogo Stake Pool Interface - State types for deserializing stake pool accounts |
| homepage | |
| repository | https://github.com/Tempest-Finance/fogo-stake-pool |
| max_upload_size | |
| id | 2059793 |
| size | 152,231 |
A stake pool program interface on the Fogo blockchain, usable for liquid staking operations.
This crate provides state types and utilities that integrators can use to deserialize and interact with stake pool accounts.
Full documentation is available at https://github.com/Tempest-Finance/fogo-stake-pool/docs
use fogo_stake_pool_interface::{
StakePool, ValidatorList, Fee, id,
find_withdraw_authority_program_address,
};
use solana_program::borsh1::try_from_slice_unchecked;
// Deserialize a stake pool account
let stake_pool: StakePool = try_from_slice_unchecked(&account_data)?;
// Check the program ID
assert_eq!(stake_pool_account.owner, &id());
// Derive PDAs
let (withdraw_authority, _bump) = find_withdraw_authority_program_address(&id(), &stake_pool_pubkey);
state - Account state types (StakePool, ValidatorList, Fee, etc.)pda - PDA derivation functionserror - Error typesStakePool - Main stake pool stateValidatorList - List of validators in the poolValidatorListHeader - Header portion of validator listValidatorStakeInfo - Per-validator stake informationFee - Fee structure (numerator/denominator)FeeType - Enum of different fee typesFutureEpoch<T> - Epoch-delayed value changes (generic)FutureEpochFee - Epoch-delayed fee changes (concrete type for IDL)AccountType - Account discriminator enumStakeStatus - Validator stake status enumfind_deposit_authority_program_address - Derive deposit authority PDAfind_withdraw_authority_program_address - Derive withdraw authority PDAfind_stake_program_address - Derive validator stake account PDAfind_transient_stake_program_address - Derive transient stake account PDAfind_ephemeral_stake_program_address - Derive ephemeral stake account PDAfind_user_stake_program_address - Derive user stake account PDA (for session withdrawals)check_program_account - Verify program ID matchesMINIMUM_ACTIVE_STAKE - Minimum lamports in a validator stake account (1,000,000)MINIMUM_RESERVE_LAMPORTS - Minimum lamports in reserve (0)MAX_VALIDATORS_TO_UPDATE - Max validators per update instruction (4)MAX_TRANSIENT_STAKE_ACCOUNTS - Max transient accounts per transaction (10)MAX_VALIDATORS_IN_POOL - Maximum validators supported (20,000)MAX_WITHDRAWAL_FEE_INCREASE - Max fee increase factor per epoch (3/2)WITHDRAWAL_BASELINE_FEE - Baseline fee for increase calculations (1/1000)borsh (default) - Enables Borsh serialization/deserializationserde - Enables Serde serializationcodama - Enables IDL generation via CodamaTo generate the Codama IDL:
cargo run --bin generate-idl --features codama
This outputs idl.json in the crate root.
SP1s4uFeTAX9jsXXmwyDs1gxYYf7cdDZ8qHUHVxE1yr