getVaultSnapshots
Read historical vault equity and share supply snapshots over a height range.
Signature
function getVaultSnapshots(
client: Client,
parameters?: {
min?: number
max?: number
height?: number
},
): Promise<Record<string, VaultSnapshot>>Example
import { createPublicClient, createTransport, testnet } from "@left-curve/sdk"
const client = createPublicClient({ chain: testnet, transport: createTransport() })
const snapshots = await client.getVaultSnapshots({ min: 1_000, max: 5_000 })Parameters
min — number, optional. Inclusive lower bound (converted to string before sending).
max — number, optional. Inclusive upper bound (converted to string).
height — number, optional. Block height for the query itself. Default 0 (latest).
Returns
Record<string, VaultSnapshot> — keyed by block height. Each snapshot is { equity, shareSupply }.