Documentation Index
Fetch the complete documentation index at: https://docs.hubra.app/llms.txt
Use this file to discover all available pages before exploring further.
route: "sanctum" (with sanctumKind and sanctum_order) forwards to Sanctum’s execute endpoint, which adds MEV protection and smarter retries. Use it when broadcasting transactions that came back from /stake or /unstake with route: "sanctum".
hubra_token is required on every call. Without a matching token, the endpoint rejects the request with 403 forbidden.Request
| Field | Type | Required | Description |
|---|---|---|---|
signed_tx | string | yes | Base64-encoded fully signed transaction. |
hubra_token | string | yes | Token from the matching /stake or /unstake response. HMAC over the unsigned message bytes. Tokens expire ~2 minutes after issue. |
route | "rpc" | "sanctum" | optional | Defaults to "rpc". Use "sanctum" for Sanctum-routed swap flows. |
sanctumKind | "token" | "depositStake" | "depositSol" | "withdrawStake" | conditional | Required when route="sanctum". Pass through the value from the /stake or /unstake response. |
sanctum_order | object | conditional | Required when route="sanctum". Pass through the sanctum_order object from the /stake or /unstake response. Sanctum’s execute endpoint validates the signed transaction against this. |
Response
| Field | Type | Description |
|---|---|---|
signature | string | Base58 on-chain transaction signature. |
explorer | string | Pre-built Solscan link for the signature. |
When to use Sanctum routing
| You came from | Use |
|---|---|
/stake sol-liquid-stake | route: "sanctum" |
/stake sol-native-stake | route: "rpc" |
/stake usdc-earn | route: "rpc" |
/unstake sol-native-stake instant | route: "sanctum" |
/unstake sol-native-stake deactivate | route: "rpc" |
/unstake sol-liquid-stake instant | route: "sanctum" |
/unstake sol-liquid-stake slow | route: "sanctum" |
/unstake usdc-earn instant | route: "rpc" |
/withdraw | route: "rpc" |
route: "sanctum", broadcast with route: "sanctum" and forward the Sanctum-specific fields.
Sanctum’s broadcaster adds MEV protection and smarter retries. Plain RPC works for any signed transaction; the chain itself does not distinguish.
Signing example (Node + @solana/web3.js)
sol-native-stake, tx.sign([wallet]) only fills the wallet’s slot. The stake-account slot is pre-signed by Hubra’s server.
Errors
| Status | Slug | When |
|---|---|---|
400 | invalid_request | Missing signed_tx, missing hubra_token, missing sanctum_order (when route="sanctum"), or invalid route / sanctumKind. |
403 | forbidden | hubra_token does not match this transaction, is malformed, or has expired. Rebuild via /stake or /unstake to get a fresh token. |
502 | upstream_error | RPC or Sanctum rejected the broadcast (invalid blockhash, signature failure, simulation failure, insufficient funds). |
See also
Hubra token
The HMAC mechanism in detail.
POST /stake
Build a stake transaction.
POST /unstake
Build an unstake transaction.
Errors
Problem-details and slugs.