Documentation Index
Fetch the complete documentation index at: https://docs.voltr.xyz/llms.txt
Use this file to discover all available pages before exploring further.
@voltr/vault-sdk 2.0.0 is a generated client built around instruction builders, PDA helpers, account fetchers, and extension helpers. The default Solana client stack is now @solana/kit.
Installation
@solana/web3.js only when an external dependency still requires it.
Core Model
The v2 SDK does not revolve around aVoltrClient class. Instead you compose:
get*InstructionAsync(...)builders for writesfind*Pda(...)helpers for PDAsfetch*loaders for on-chain accounts- extension helpers for fees, LP economics, positions, and withdrawals
Minimal Setup
Common Instruction Builders
Vault lifecycle
getInitializeVaultInstructionAsyncgetUpdateVaultConfigInstructionAsyncgetCreateLpMetadataInstructionAsync
User flows
getDepositVaultInstructionAsyncgetRequestWithdrawVaultInstructionAsyncgetCancelRequestWithdrawVaultInstructionAsyncgetWithdrawVaultInstructionAsyncgetInstantWithdrawVaultInstructionAsync
Manager and admin flows
getAddAdaptorInstructionAsyncgetInitializeStrategyInstructionAsyncgetDepositStrategyInstructionAsyncgetWithdrawStrategyInstructionAsyncgetDirectWithdrawStrategyInstructionAsyncgetHarvestFeeInstructionAsyncgetCalibrateHighWaterMarkInstructionAsync
PDA Helpers
Most integrations need some combination of:findVaultLpMintPda({ vault })findVaultAssetIdleAuthPda({ vault })findVaultStrategyAuthPda({ vault, strategy })findStrategyInitReceiptPda({ vault, strategy })findRequestWithdrawVaultReceiptPda({ vault, userTransferAuthority })findLpMetadataPda({ vault })findAdaptorAddReceiptPda({ vault, adaptorProgram })
Reads And Extensions
Use a kit RPC client plus explicit helpers:fetchVaultfetchRequestWithdrawVaultReceiptfetchAllStrategyInitReceiptAccountsOfVaultgetPositionAndTotalValuesForVaultgetAccumulatedAdminFeesForVaultgetAccumulatedManagerFeesForVaultgetHighWaterMarkForVaultgetCurrentAssetPerLpForVaultgetVaultLpSupplyBreakdowngetPendingWithdrawalForUser
Updating Vault Config
getUpdateVaultConfigInstructionAsync updates one field at a time, and the payload must already be serialized.
VaultConfigField includes:
MaxCapStartAtTsLockedProfitDegradationDurationWithdrawalWaitingPeriodManagerPerformanceFeeAdminPerformanceFeeManagerManagementFeeAdminManagementFeeRedemptionFeeIssuanceFeeManagerPendingAdminDisabledOperations
Migration From VoltrClient
When upgrading older scripts:
- replace
new VoltrClient(connection)withcreateSolanaRpc(...)plus direct imports - replace
client.create*Ix(...)withget*InstructionAsync(...) - replace
client.find*...withfind*Pda(...) - replace convenience query methods with
fetchVault(...)and extension helpers - replace
BNarguments withbigint
Reference Implementations
For maintained end-to-end examples, use:voltr-spot-scriptsvoltr-trustful-scriptsvoltr-kamino-scripts