Skip to main content
All vault operations — setup, deposits/withdrawals, and every supported strategy (Kamino, Spot, Trustful) — now live in a single repository: github.com/voltrxyz/sdk-scripts. It replaces the old per-protocol script repos (kamino-scripts, spot-scripts, trustful-scripts, lend-scripts, drift-scripts, client-raydium-clmm-scripts) with two complementary entry points:

CLI

The recommended interface for vault managers and operators. Every operation is one <group>:<action> command driven by a JSON profile and per-call flags. No source edits to change runtime values.

Programmatic examples

Runnable TypeScript for developers embedding the operation builders directly in their own services, bots, or transaction pipelines. One self-contained file per action.
The CLI and examples both wrap the lower-level @voltr/vault-sdk and the protocol adapter packages. Use the CLI for routine operations; drop down to the SDK or examples when you embed Voltr in your own code.
Driving these operations from a coding agent? The Voltr Agent Skill ships vault-manager-cli.md and vault-manager-sdk.md references plus runnable examples/sdk/ flows (create vault, add adaptor + init strategy, allocate, read state).

Repository layout

Install

Validate the bundled example profile. This is fully offline — no RPC, no keypair, no deployed vault — and the quickest way to confirm your checkout works:
pnpm cli -- <args>: the leading -- separates pnpm’s own arguments from the CLI’s. Flags after it (--profile, --mode, …) are parsed normally.

Profiles

A profile is one JSON file describing one vault deployment: its cluster, asset, optional lookup table, and any integration addresses. Routine operational values live in the profile; per-call values are flags; secrets are never in the profile. The profile is validated with zod on load, so a missing or malformed field fails before any RPC call.

Keypairs & roles

Commands sign as one of four roles. Each resolves its keypair path from a flag, falling back to an environment variable — the flag wins. If neither is set, the command fails up front naming both.
No keypair material lives in profiles — only paths, via flag or env. Keep keypair files outside the repo, restrict permissions (chmod 600), and prefer env vars over flags so secret paths don’t land in shell history. The read-only *:query:* commands and check need no keypair.
The RPC URL resolves in this order (first non-empty wins): --rpc-url flag → RPC_URL env → HELIUS_RPC_URL env → rpcUrl in the profile.

Transaction modes — verify before you execute

Every transaction command takes --mode (default print). A command builds first (reading chain state over RPC, and the Jupiter API for swaps), then dispatches the mode — so a reachable RPC is required in every mode except check.
Never execute blind. Preview with --mode print, confirm with --mode simulate, then --mode execute. For a multisig-controlled vault, use --mode multisig --multisig-address <VAULT_SIGNER_PDA> and import the printed payload instead of signing locally.

Global options

Command groups

Commands are grouped by <group>:* prefix. The CLI itself is the authoritative reference for the full command surface and every flag:

Recipes

The following assume RPC_URL and the role keypairs are set in .env. Run each with --mode print then --mode simulate before --mode execute.
vault:init cannot use --mode multisig: a fresh vault keypair must sign initialization, which a multisig payload can’t carry. Use --mode execute.
vault:add-adaptor defaults to the Kamino adaptor; pass --adaptor-program for the others.
These operations use the protocol-admin keypair through --admin-keypair / ADMIN_KEYPAIR, not a vault admin.
Register the Spot adaptor first.
Register the Trustful adaptor first.

Programmatic examples

For automation, bots, and services that embed Voltr directly, the examples/ directory holds runnable TypeScript — one self-contained file per action that imports the public operation builders, inspects a BuiltOperation, and routes it through the shared transaction processor. They are the lower-level programmatic path; the CLI remains the primary interface for routine operations.
Per-run values (amounts, rates) are clearly marked constants at the top of each file. Every setting has both an env var and an equivalent flag (--profile, --rpc-url, --mode, --multisig-address, --yes); --help lists them.
Examples default to print and never send. execute is gated — type yes at the prompt, or set VOLTR_CONFIRM=1 for non-interactive runs. No secrets are committed: addresses come from your profile, keypairs from env vars.

Example catalog

Examples import only documented package exports (@voltr/scripts-core, @voltr/scripts-kamino, @voltr/scripts-spot, @voltr/scripts-trustful). See examples/README.md for the full catalog and the offline pnpm examples:check verification.

Where to go next

Supported Integrations

The adaptors and their CLI command groups

Strategy Setup Guide

Add adaptors and initialize strategies

Fund Allocation

Deploy idle funds into strategies

SDK Reference

The lower-level @voltr/vault-sdk builders