Quick Overview
The Helius SDK provides simple methods to handle the complete SOL staking lifecycle programmatically. Perfect for building staking interfaces, DeFi protocols, or automated staking strategies.Create & Delegate
Monitor & Manage
Withdraw & Redeem
Installation & Setup
Staking Basics
How Solana Staking Works
How Solana Staking Works
Why Choose Helius Validator
Why Choose Helius Validator
- 0% Commission: Keep 100% of your staking rewards
- High Performance: Reliable block production and minimal downtime
- Easy Integration: Optimized for the Helius SDK with built-in helpers
Timing & Epochs
Timing & Epochs
- Activation: Stakes become active at the start of the next epoch (~2 days)
- Deactivation: Takes effect at the end of the current epoch
- Cooldown: Deactivated stakes can be withdrawn immediately after epoch end
Getting Started
- Quick Start
- Complete Example
1.5 parameter is the amount in SOL you want to stake.SDK Methods Reference
createStakeTransaction(owner, amount)
createStakeTransaction(owner, amount)
owner(PublicKey): The wallet that will own the stake accountamount(number): Amount of SOL to stake
getStakeInstructions(owner, amount)
getStakeInstructions(owner, amount)
getHeliusStakeAccounts(wallet)
getHeliusStakeAccounts(wallet)
createUnstakeTransaction(owner, stakeAccount)
createUnstakeTransaction(owner, stakeAccount)
getWithdrawableAmount(stakeAccount, includeRent?)
getWithdrawableAmount(stakeAccount, includeRent?)
includeRent(boolean): Whether to include rent-exempt amount
createWithdrawTransaction(owner, stakeAccount, destination, amount)
createWithdrawTransaction(owner, stakeAccount, destination, amount)
Complete Staking Workflow
Create and Delegate
Monitor Your Stakes
Deactivate (Start Unstaking)
Withdraw SOL
Advanced Patterns
- Browser Integration
- Batch Operations
- Smart Transactions