/**
 * Shared types and helpers used by every per-protocol LST reader.
 *
 * Each reader contributes a slice of the orchestrator's multicall
 * payload (`calls` + matching `abis`) and a `parse` function that
 * consumes exactly `calls.length` results back. The shape is uniform
 * regardless of protocol so the orchestrator can flatten the work
 * into a single multicall.
 */
/** 10**18 — used to call rate-by-amount getters (e.g. `mETHToETH(1e18)`,
 *  `convertToAssets(1e18)`) and to scale exchange rates. Every LST in
 *  the registry today has 18 decimals; if that ever changes, swap to
 *  `10n ** BigInt(entry.decimals)` per call site. */
export declare const ONE_E18: bigint;
/** Rescale a raw integer amount from `fromDec` to `toDec` decimals.
 *  Used by readers whose `totalAssets` is naturally share-denominated
 *  (computed from `totalSupply`) but must be reported in the *underlying*
 *  asset's decimals when share ≠ underlying (e.g. 18-dec SolvBTC over
 *  8-dec WBTC). A no-op when the two coincide. */
export declare const rescaleDecimals: (v: bigint, fromDec: number, toDec: number) => bigint;
/** Canonical Multicall3 address (same on ~all EVM chains). `getEthBalance`
 *  lets us read a contract's *native* balance inside the same multicall —
 *  used for instant-exit buffers held as native coin (e.g. EtherFi's
 *  LiquidityPool ETH, native-underlying ERC-4626 LSTs). Absent on a few
 *  non-standard chains (e.g. XDC) — the call then fails under `allowFailure`
 *  and the buffer degrades to 0. */
export declare const MULTICALL3_ADDRESS = "0xcA11bde05977b3631167028862bE2a173976CA11";
/** Minimal Multicall3 surface — native balance of any address. */
export declare const Multicall3BalanceAbi: readonly [{
    readonly name: "getEthBalance";
    readonly type: "function";
    readonly stateMutability: "view";
    readonly inputs: readonly [{
        readonly name: "addr";
        readonly type: "address";
    }];
    readonly outputs: readonly [{
        readonly type: "uint256";
    }];
}];
/** One multicall item — matches the shape the existing vault providers
 *  pass to `multicallRetry` (`{ address, name, params }` with a
 *  parallel ABI array). */
export interface LstCall {
    address: string;
    name: string;
    params: readonly unknown[];
    /** Optional override — when set, the orchestrator dispatches this
     *  call to a multicall on the named chain instead of the request's
     *  chain. Used for cross-chain entries whose user-facing token
     *  lives on one chain (e.g. MaticX on Polygon) but whose rate
     *  getter lives on another (Ethereum home contract). */
    chainId?: string;
}
/** What a reader produces after consuming its multicall slice. */
export interface LstOnChainState {
    /** Total underlying held, raw. */
    totalAssets: bigint;
    /** Total shares minted, raw. */
    totalSupply: bigint;
    /** 1e18-scaled exchange rate: 1 share → X underlying. */
    exchangeRate: bigint;
    /** Instant-exit liquidity buffer estimate, raw. Undefined when the
     *  protocol exposes none. */
    liquidity?: bigint;
}
/**
 * Produced by per-protocol readers — a self-contained slice of the
 * multicall payload plus a parser that consumes exactly `calls.length`
 * results.
 */
export interface LstReader {
    /** Multicall items contributed by this LST. */
    calls: LstCall[];
    /** Matching ABI per call slot. `any[]` to accept the `as const`
     *  fragments from `../abis` without per-call casting — the
     *  downstream multicall API is itself `any`-typed. */
    abis: any[];
    /** Parses the slice of multicall results corresponding to this
     *  reader's calls. Returns `undefined` on parse failure so the
     *  orchestrator can skip the entry without poisoning the rest. */
    parse: (slice: unknown[]) => LstOnChainState | undefined;
}
/**
 * Safely coerce a multicall return cell to `bigint`. Multicall
 * failures surface as `undefined` (or wrapped objects when
 * `allowFailure` is on) — returning `undefined` lets the parser bail
 * on the whole entry without poisoning the batch.
 */
export declare const toBigInt: (v: unknown) => bigint | undefined;
//# sourceMappingURL=shared.d.ts.map