vault-sdk/rust-client is a CLI-style helper, not a broad high-level SDK. It demonstrates PDA derivation, account reads, simulation, deposits, and withdrawals with anchor-client.Install
For the current program source, depend on themercurial-vault crate from the same workspace or pin the matching repository revision:
vault-sdk/rust-client depends on the vendored vault-sdk/programs/vault crate by path. The newer mercurial-vault/programs/vault source uses Anchor 0.31.1 and has a newer handler surface. Keep your crate, IDL, and deployed program target aligned.
Program ID
PDA Derivation
VAULT_BASE_KEY.
Read Vault State
Calculate Unlocked Amount
get_unlocked_amount, parse Anchor Program data: logs, and deserialize the TotalAmount event.
Deposit
The Rust client creates or reuses the user’s token and LP ATAs, then buildsDepositWithdrawLiquidity.
Withdraw
Withdraw burns vault LP tokens. Pass the LP amount asunmint_amount.
Rust Client Commands
Fromvault-sdk/rust-client:
Common provider overrides:

