Skip to main content
These flows use many instructions. If you hit compute limits, add ComputeBudgetProgram.setComputeUnitLimit({ units: 1_000_000 }) (or higher) as the first instruction in your transaction.
Deposit your stake account into a Single Pool, receive pool tokens, then deposit those tokens into the corresponding Native Staked Vault (nsHELIUS, nsJUPITER, etc.) as collateral. Flow:
  1. Split stake into a new account
  2. Deposit the new stake into Single Pool → receive pool tokens
  3. Deposit pool tokens into vault via getOperateIx

Deposit

1

Import Dependencies

2

Split Stake and Deposit into Single Pool

Use StakeProgram.split and SinglePoolProgram.deposit from @solana/spl-single-pool-classic.
3

Deposit Pool Tokens into Vault

Find the vault by supplyToken = pool mint, then use getOperateIx.
4

Assemble and Execute the Transaction

Build a v0 message with all instructions and address lookup tables, sign with the user keypair and new stake account keypair.
If the user already holds pool tokens, skip the Single Pool steps and only call getOperateIx to deposit into the vault.