Documentation Index
Fetch the complete documentation index at: https://0xcaptain.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
VaultClient wraps the ERC-4626 AgentBankVaultV2 contract. Access it via client.vault on the AgentBankClient.
Methods
deposit
Deposit assets into the vault and receive shares.DepositParams):
| Field | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | Human-readable amount (e.g. "1000.5") |
receiver | Address | No | Share recipient; defaults to connected wallet |
Promise<Hash> — transaction hash
withdraw
Withdraw a specific asset amount from the vault (burns the required shares).Promise<Hash>
redeem
Burn a specific number of shares and receive the proportional assets.Promise<Hash>
getShares
Get the vault share balance for any address.Promise<string> — formatted share balance
getTVL
Get total assets locked in the vault.Promise<string>
getAPY
Estimate current APY from share price appreciation (simplified model).This is a simplified heuristic based on current share price vs 1:1 ratio. For production, integrate with off-chain oracle data or historical share price comparison.
Promise<string> — APY percentage with 4 decimal places
getUnderlyingAsset
Get the address of the vault’s underlying asset.Promise<Address>