Skip to content

CLI Reference

This guide documents command-line operations for advanced users: deposits/withdrawals to the stake pool, and managing validator bonds via CLI.

SDK alternative

To perform these operations programmatically in a TypeScript application, see the TypeScript SDK.

WARNING

Always fetch the current JPool stake pool address from the JPool frontend or official support channels. Never use an address from unofficial sources.

Prerequisites

The deposit and withdrawal commands use the spl-stake-pool CLI from the Solana Program Library. Install it with Cargo:

sh
cargo install spl-stake-pool-cli

You also need the Solana CLI configured with your keypair and RPC URL:

sh
solana config set --url https://api.mainnet-beta.solana.com
solana config set --keypair ~/.config/solana/id.json

The examples below use <POOL_ADDRESS> as a placeholder. Replace it with the actual JPool stake pool address.

Deposits

Deposit SOL

Converts SOL into JSOL. The deposited SOL is allocated to validators through the Smart Delegation Strategy.

sh
spl-stake-pool deposit-sol <POOL_ADDRESS> <AMOUNT>
  • <POOL_ADDRESS>: JPool stake pool address
  • <AMOUNT>: Amount of SOL to deposit

By default, minted JSOL tokens are sent to your associated token account. To send them to a different SPL token account, create the account ahead of time and transfer tokens after minting.

Example: deposit 100 SOL into the pool:

sh
spl-stake-pool deposit-sol <POOL_ADDRESS> 100

Deposit existing stake account

If you already have a delegated stake account, you can deposit it directly into the pool instead of unstaking first. The pool mints JSOL proportional to the stake account's balance.

sh
spl-stake-pool deposit-stake <POOL_ADDRESS> <STAKE_ACCOUNT_PUBKEY> [--token-receiver <TOKEN_ACCOUNT_PUBKEY>] [--withdraw-authority <KEYPAIR_FILE>]
  • <POOL_ADDRESS>: JPool stake pool address
  • <STAKE_ACCOUNT_PUBKEY>: Public key of your activated stake account
  • --token-receiver: (optional) SPL token account to receive JSOL instead of your default associated token account
  • --withdraw-authority: (optional) keypair file for the stake account's withdraw authority, if it differs from the fee payer's keypair

Example: deposit a stake account, sending JSOL to a specific token account:

sh
spl-stake-pool deposit-stake <POOL_ADDRESS> <STAKE_ACCOUNT_PUBKEY> --token-receiver <TOKEN_ACCOUNT_PUBKEY> --withdraw-authority authority.json

INFO

The pool updates balances automatically after deposits, so your new JSOL balance will appear soon after transaction confirmation. A small deposit fee may apply. Check the pool info page for current fees.

Withdrawals

There are two ways to withdraw from the pool. Withdraw SOL pulls liquid SOL from the pool reserve immediately. Withdraw Stake returns an activated stake account that you then deactivate and wait for the cooldown before the SOL is available. A withdrawal fee may apply to both methods. Check the pool info page for current fees.

UI equivalent

In the JPool web app, Unstake Instantly corresponds to withdraw-sol (immediate, higher fee) and Unstake with Delay corresponds to withdraw-stake (end of epoch, lower fee). See the Liquid Staking guide for UI steps.

Withdraw SOL

Burns JSOL and sends liquid SOL directly from the pool reserve to your wallet. This is the simplest withdrawal method with no waiting period, but the available amount depends on how much SOL the pool reserve currently holds. JPool maintains a minimum reserve of 0.5% of TVL (at least 5,000 SOL) to ensure withdrawals are always possible.

sh
spl-stake-pool withdraw-sol <POOL_ADDRESS> <RECIPIENT_SOL_PUBKEY> <AMOUNT>
  • <POOL_ADDRESS>: JPool stake pool address
  • <RECIPIENT_SOL_PUBKEY>: Wallet address to receive the withdrawn SOL
  • <AMOUNT>: Amount of JSOL to burn (you receive the equivalent SOL value)

Example: withdraw 2 JSOL worth of SOL to your wallet:

sh
spl-stake-pool withdraw-sol <POOL_ADDRESS> <YOUR_WALLET_PUBKEY> 2

Withdraw stake

Burns JSOL and returns an activated stake account instead of liquid SOL. This is the standard way to recover your SOL plus accrued staking rewards from the pool. The resulting stake account is delegated to a validator, so you will need to deactivate the stake and wait for the cooldown period (roughly one epoch, or ~2 days) before the SOL becomes available for withdrawal.

sh
spl-stake-pool withdraw-stake <POOL_ADDRESS> <AMOUNT> [--amount <SOL_AMOUNT>] [--vote-account <VOTE_ACCOUNT_PUBKEY>] [--stake-receiver <STAKE_ACCOUNT_PUBKEY>] [--pool-account <TOKEN_ACCOUNT>] [--use-reserve]
  • <POOL_ADDRESS>: JPool stake pool address
  • <AMOUNT>: Number of JSOL to burn (positional argument)
  • --amount <SOL_AMOUNT>: Specify the withdrawal in SOL instead of JSOL (use one or the other, not both)
  • --vote-account <VOTE_ACCOUNT_PUBKEY>: Withdraw from a specific validator's stake. Without this flag, the CLI picks the largest validator stake accounts automatically.
  • --stake-receiver <STAKE_ACCOUNT_PUBKEY>: Receive stake into an existing (uninitialized) stake account instead of creating a new one. This avoids the rent-exemption cost of creating a new account.
  • --pool-account <TOKEN_ACCOUNT>: Source JSOL from a specific token account instead of your default associated token account
  • --use-reserve: Withdraw from the pool's reserve stake rather than from validator stake accounts. Only works when the reserve has sufficient balance.

Examples:

Withdraw 5 JSOL as a stake account (CLI picks the validator):

sh
spl-stake-pool withdraw-stake <POOL_ADDRESS> 5

Withdraw 0.5 SOL from a specific validator into an existing stake account:

sh
spl-stake-pool withdraw-stake <POOL_ADDRESS> --amount 0.5 --vote-account <VOTE_ACCOUNT_PUBKEY> --stake-receiver <STAKE_ACCOUNT_PUBKEY>

INFO

By default, the CLI creates a new stake account for each withdrawal. This costs a small amount of SOL for the stake account rent exemption. To avoid this cost, use --stake-receiver with an existing uninitialized stake account. After the withdrawal, deactivate the stake (solana deactivate-stake), wait for the cooldown epoch, then withdraw the SOL to your wallet (solana withdraw-stake).

Bond operations

The @jpool/bond-cli tool provides command-line access to validator bond accounts. Bonds secure delegations and guarantee staker yields. For background on how bonds work, see Bonds.

Install bond CLI

sh
npm install @jpool/bond-cli -g

Top up bond

Add SOL to a validator bond balance. If the bond account does not exist yet, this command creates it.

WARNING

The first deposit must be at least 1 SOL. After that, you can top up with any amount.

sh
jbond topup <vote-account> <amount> -k <keypair-path> -c <cluster>

Arguments:

  • <vote-account>: validator's vote account (required)
  • <amount>: amount of SOL to add (required)

Options:

  • -k, --keypair <keypair-path>: Path to validator identity keypair (default: ~/.config/solana/id.json)
  • -c, --cluster <cluster>: Solana cluster (mainnet-beta or devnet)

Withdraw bond

Withdraw SOL from a validator bond balance.

sh
jbond withdraw <vote-account> <destination> <amount> -k <keypair-path> -c <cluster>

Arguments:

  • <vote-account>: validator's vote account (required)
  • <destination>: address to receive withdrawn SOL (required)
  • <amount>: amount of SOL to withdraw (required)

Options:

  • -k, --keypair <keypair-path>: Path to withdrawal authority keypair (default: ~/.config/solana/id.json)
  • -c, --cluster <cluster>: Solana cluster (mainnet-beta or devnet)

Requirements:

  • Only the validator identity or current withdrawal authority can make withdrawals.
  • Validator bond account must have sufficient balance.

Set or remove withdrawal authority

By default, only the validator identity keypair can withdraw from a bond. This command lets you delegate withdrawal rights to a separate keypair, which is useful for operational setups where the identity key is kept offline.

sh
jbond set-withdraw-authority <vote-account> -k <keypair-path> -w <pubkey> -c <cluster>

Arguments:

  • <vote-account>: validator's vote account

Options:

  • -k, --keypair <keypair-path>: Path to identity keypair
  • -w, --new-authority <pubkey>: New withdrawal authority public key (omit to remove custom authority)
  • -c, --cluster <cluster>: Solana cluster

Requirements:

  • Only the validator identity can set/update the withdrawal authority.
  • If a withdrawal authority is set, only that authority or the validator identity can withdraw.
  • Omitting --new-authority removes authority, reverting to identity-only.

Examples:

Set:

sh
jbond set-withdraw-authority <vote-account> -k <keypair-path> -w <pubkey> -c mainnet-beta

Remove (revert to identity-only withdrawals):

sh
jbond set-withdraw-authority <vote-account> -k <keypair-path> -c mainnet-beta

For more info and CLI troubleshooting, see JPool validator docs or reach out on Discord.