Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

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

minnumber, optional. Inclusive lower bound (converted to string before sending).

maxnumber, optional. Inclusive upper bound (converted to string).

heightnumber, optional. Block height for the query itself. Default 0 (latest).

Returns

Record<string, VaultSnapshot> — keyed by block height. Each snapshot is { equity, shareSupply }.

See also