import type { Address } from "viem"; import type { LucidlyClient } from "./client.js"; import type { TxResult } from "./types.js"; export type NavHolding = { kind: "idle"; token: Address; label?: string; } | { kind: "shareToken"; token: Address; accountant: Address; decimals?: number; label?: string; } | { kind: "adapter"; adapter: Address; label?: string; }; export interface NavConfig { vault: Address; accountant: Address; baseAsset: Address; baseDecimals?: number; holdings: NavHolding[]; /** Refuse-to-push bounds; MUST match the Accountant's allowedExchangeRateChange*. */ maxUpBps?: number; maxDownBps?: number; } export interface NavBreakdownItem { label: string; valueInBase: bigint; } export interface NavResult { aum: bigint; totalSupply: bigint; currentRate: bigint; newRate: bigint; withinBounds: boolean; breakdown: NavBreakdownItem[]; baseDecimals: number; } export declare class NavModule { private readonly c; constructor(c: LucidlyClient); private decimalsOf; private balanceOf; /** Value one holding in base-asset units. */ private valueHolding; /** Compute NAV + the rate it implies. Read-only; never sends a transaction. */ compute(cfg: NavConfig): Promise; /** * Compute then push the new rate via Accountant.updateExchangeRate — but only if within bounds. * Returns {pushed:false} when out of bounds (the caller should investigate; pushing would PAUSE * the vault). Requires the client to hold a signer with UPDATE_EXCHANGE_RATE_ROLE. */ push(cfg: NavConfig): Promise<{ pushed: boolean; result: NavResult; tx?: TxResult; reason?: string; }>; }