Skip to main content

Environment

View Environment Setup

Display the current CLI configuration including connected wallet, RPC endpoint, and active vault.
glam-cli env

Vault Management

List Vaults

List GLAM vaults accessible to the connected wallet.
  • --owner-only, -o: Only show vaults owned by the connected wallet
  • --all, -a: Show all GLAM vaults
  • --type, -t: Filter by type (vault or tokenizedVault)
glam-cli vault list [--owner-only] [--all] [--type <type>]

Set Active Vault

Set the active GLAM vault for subsequent CLI operations. Saves the vault state to the config file.
glam-cli vault set <state>

View Vault Details

View a GLAM vault by its state pubkey.
  • --compact, -c: Output as compact JSON
  • state: If not provided, the current active vault is used
glam-cli vault view [--compact] [state]

Create a Vault

Create a new GLAM vault from a JSON template file.
glam-cli vault create <path-to-template.json>

Close a Vault

Close a GLAM vault. Only the owner can close a vault. Tokenized vaults cannot be closed if mint supply is greater than 0.
  • state: If not provided, the current active vault is used
  • --yes, -y: Skip confirmation prompt
glam-cli vault close [state] [--yes]

Update Owner

Transfer vault ownership to a new owner.
  • --name, -n: Optionally set a new portfolio manager name
  • --yes, -y: Skip confirmation prompt
glam-cli vault update-owner <new-owner> [--name <name>] [--yes]

Enable/Disable Vault

Enable a GLAM vault.
glam-cli vault enable [--yes]
Disable a GLAM vault.
glam-cli vault disable [--yes]

Extend State Account

Extend the GLAM state account by additional bytes. Useful when the state account needs more space.
glam-cli vault extend <bytes> [--yes]

Asset Management

View Balances

Get token balances for the vault.
  • --all, -a: Show all assets including token accounts with 0 balance
glam-cli vault token-balances [--all]

View Holdings

Get all vault holdings including token balances and positions across integrated protocols.
glam-cli vault holdings

Close Token Accounts

Close vault token accounts by specifying mint addresses, or use --empty to close all zero-balance token accounts.
  • mints: One or more mint addresses of token accounts to close
glam-cli vault close-token-accounts <mints...> [--yes]
glam-cli vault close-token-accounts --empty [--yes]
Token programs prevent closing token accounts with non-zero balances.

List Asset Allowlist

List the vault’s asset allowlist and corresponding token accounts.
glam-cli vault list-assets

Add Asset to Allowlist

Add an asset to the vault’s allowlist.
glam-cli vault allowlist-asset <asset> [--yes]

Remove Asset from Allowlist

Remove an asset from the vault’s allowlist.
glam-cli vault remove-asset <asset> [--yes]

SOL Wrapping

Wrap SOL

Wrap SOL into wSOL.
glam-cli vault wrap <amount> [--yes]

Unwrap wSOL

Unwrap all wSOL back to SOL.
glam-cli vault unwrap [--yes]

Vault Templates

When creating a vault with glam-cli vault create <template>, the template is a JSON file that defines the vault configuration. Templates are available in the CLI templates directory.

Template Structure

A vault template has two top-level sections:
{
  "state": { /* StateModel fields */ },
  "mint": { /* MintModel fields (tokenized vaults only) */ }
}

StateModel Fields

FieldTypeDescription
accountType"vault" | "tokenizedVault" | "singleAssetVault"Vault type
namestringVault display name
enabledbooleanWhether the vault is active
baseAssetMintstringBase asset mint address
assetsstring[]Allowlisted asset mint addresses
uristringVault metadata URI
portfolioManagerNamestringDisplay name of the portfolio manager
borrowablestring[]Assets allowed for borrowing
reduceOnlybooleanIf true, vault can only reduce positions
anyLstbooleanIf true, any LST is accepted for staking
timelockDurationnumberTimelock duration in seconds

MintModel Fields (Tokenized Vaults)

FieldTypeDescription
namestringToken metadata name
symbolstringToken metadata symbol (max 32 chars)
baseAssetMintstringBase asset mint address
maxCapnumberMaximum vault capacity in base units
minSubscriptionnumberMinimum subscription amount in base units
minRedemptionnumberMinimum redemption amount in base units
lockupPeriodnumberLockup period for new shares in seconds
defaultAccountStateFrozenbooleanIf true, new token accounts are frozen by default
feeStructureobjectFee configuration (see below)
notifyAndSettleobjectNotice and settlement periods
allowliststring[]Allowlisted subscriber addresses
blockliststring[]Blocklisted subscriber addresses

Example: Vault

{
  "state": {
    "accountType": "vault",
    "name": "My Treasury",
    "enabled": true,
    "baseAssetMint": "So11111111111111111111111111111111111111112",
    "assets": ["So11111111111111111111111111111111111111112"]
  }
}

Example: Single Asset Vault

{
  "state": {
    "accountType": "singleAssetVault",
    "name": "USDC Vault",
    "enabled": true,
    "baseAssetMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "assets": ["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]
  }
}