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.
Pick sol-liquid-stake. (For raSOL Max, the entry is live but the stake / unstake builders aren’t wired through the agent API yet — route users to hubra.app/c/leverage. See Strategies → sol-leveraged-stake.)
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 the three agent-callable 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.
USDC Earn (usdc-earn): broadcast via route: "rpc". No sanctum_order to forward.
Leveraged raSOL Max (sol-leveraged-stake): listed by the registry with live APY and NAV-per-LP, but actions.stake / actions.unstake are null — the deposit / burn builders aren’t agent-callable yet. Hand off to hubra.app/c/leverage for the actual transaction.
See the per-endpoint references for the response shapes: