Using the TypeScript SDK
Installation
pnpm add @ignitionfi/fogo-stake-pool @solana/web3.jsnpm install @ignitionfi/fogo-stake-pool @solana/web3.jsBasic Setup
import { Connection, PublicKey, Keypair, clusterApiUrl } from '@solana/web3.js';
import {
getStakePoolAccount,
getStakePoolAccounts,
STAKE_POOL_PROGRAM_ID,
} from '@ignitionfi/fogo-stake-pool';
// Connect to cluster
const connection = new Connection('https://mainnet.fogo.io', 'confirmed');
// Load your keypair
const payer = Keypair.fromSecretKey(
Buffer.from(JSON.parse(process.env.PRIVATE_KEY || '[]'))
);Finding Stake Pools
Deposit Operations
Deposit SOL
Deposit Existing Stake Account
Withdraw Operations
Withdraw SOL
Withdraw Stake
Session-Based Operations (Gasless Transactions)
Setup with Fogo Sessions
Deposit with Session
Withdraw with Session
Validator Management Operations
Add Validator to Pool
Remove Validator from Pool
Increase Validator Stake
Decrease Validator Stake
Pool Maintenance and Information
Update Stake Pool
Get Stake Pool Information
Last updated
