Use this file to discover all available pages before exploring further.
This walks through staking 1 SOL into raSOL using only curl and a Solana keypair. The same shape applies to native staking and USDC Earn.
You need a funded Solana wallet (at least the amount you want to stake plus a few thousand lamports for safety; Hubra covers gas, but you need the asset to stake itself). And a way to sign transactions locally.
import { VersionedTransaction, Keypair } from "@solana/web3.js";const tx = VersionedTransaction.deserialize( Buffer.from(buildResponse.transaction, "base64"),);tx.sign([wallet]); // wallet is a Keypair you holdconst signed = Buffer.from(tx.serialize()).toString("base64");
For native staking, tx.sign([wallet]) only fills your wallet’s slot. The stake-account slot is pre-signed by Hubra’s server.
The shape is identical for all three strategies. What changes:
Native stake (sol-native-stake): the response includes a fresh stakeAccount pubkey. Save it; you need it to deactivate or instant-unstake later. Broadcast via route: "rpc" for stake, route: "sanctum" for instant unstake.