vault-sdk/ts-client source and tests. They focus on transaction construction and state reads. For the full method catalog, see the SDK Reference.
Setup
Fetch Vault State
getVaultSupply() returns vault.vaultState.totalLpSupply when vault.vaultState.version is 1, and the LP mint supply when vault.vaultState.version is 0. Pass that value to getAmountByShare and getUnmintAmount.
Convert LP To Underlying
Convert Desired Output To LP Burn
Deposit
Withdraw
Batch Load Vaults
Batch Load User LP Balances
Derive Vault PDAs
Create A Permissionless Vault Instruction
initialize instruction and derives the vault, token vault, and LP mint PDAs.
Affiliate Flow
affiliateId, deposit and withdraw use the affiliate program wrapper and derive affiliate user LP token accounts internally.
