GlamProvider
Main provider component that sets up the GLAM client and manages vault state.Dependencies
Must be wrapped by:@solana/wallet-adapter-reactproviders (WalletProvider,ConnectionProvider)@tanstack/react-queryprovider (QueryClientProvider)ClusterProvider(from@glam/sdk/react)
Context value
Access viauseGlam() hook:
Configured GLAM client instance
Current vault balances and token accounts
Priced vault holdings (positions across protocols)
Currently selected vault state
List of vaults accessible to connected wallet (as owner or delegate)
Delegate access control lists for active vault
Integration access control lists for active vault
All vault states on the network
Jupiter token list with metadata and prices (mainnet only)
Drift market configurations (mainnet only)
WebSocket connection status for vault balance subscriptions
Sets the active vault
Refreshes active vault data from onchain
Refetches all vault states
ClusterProvider
Manages Solana cluster/network configuration.Context value
Access viauseCluster() hook:
Current active cluster
Available clusters
Adds a custom cluster
Deletes a custom cluster
Sets the active cluster
Generates Solscan explorer URL for the current cluster
Cluster type
Cluster name (e.g., “mainnet-beta”, “devnet”)
RPC endpoint URL
Network enum value
Whether this cluster is currently active
Types
Vault
Vault PDA
SOL balance in lamports
SOL balance in SOL (with decimals)
Token accounts owned by vault
Drift user accounts (mainnet only)
GlamStateCache
State account address as base58 string
State account public key
Vault owner
Unique identifier for vault
Vault name
Vault product type