import { Address, PublicClient } from 'viem'; import { AllOffchainParamsData, OnSkippedOffchainParamsVersion, PegInConfiguration, ProtocolParamsReader, TBVProtocolParams, VersionedOffchainParams } from './types'; /** * Concrete protocol params reader using viem. * * Every read method runs the matching validator from * `protocol-params-validation` before returning, so callers don't have to * remember to validate. * * Usage: * ```ts * const reader = new ViemProtocolParamsReader(publicClient, protocolParamsAddress); * const config = await reader.getPegInConfiguration(); * ``` */ export declare class ViemProtocolParamsReader implements ProtocolParamsReader { private publicClient; private contractAddress; constructor(publicClient: PublicClient, contractAddress: Address); getTBVProtocolParams(): Promise; getLatestOffchainParams(): Promise; getOffchainParamsByVersion(version: number): Promise; getLatestOffchainParamsVersion(): Promise; getTimelockPeginByVersion(version: number): Promise; /** * Returned as `bigint` with no `Number` narrowing: the registry compares it * against `block.number`, so callers must do the same arithmetic the * contract does. `0` is the documented "disabled" case and is returned as * `0n`. A missing getter or a non-bigint payload throws — never coerced to * `0`, which would fail open and skip the observation window. * * @throws If the deployment does not expose `peginActivationDelay()`, or * the decoded payload is not a `bigint`. */ getPeginActivationDelay(): Promise; /** * Read TBV protocol params, latest offchain params, and the latest version * label atomically via multicall. The version is paired with the params so * that a governance update between separate reads cannot let JS build BTC * scripts with version N params while the contract registers the vault * under version N+1. */ getPegInConfiguration(): Promise; /** * Fetch every historical offchain params version in a single multicall. * Iterates 1..latestVersion and calls `getOffchainParamsByVersion` for each. * Versions whose payload fails validation are skipped (not included in the * returned map) so a single bad historical version doesn't block the * lookup of the rest. * * @param onSkippedVersion - optional observer invoked once per skipped * version. Use to log/telemeter without coupling the SDK to a logger. */ fetchAllOffchainParams(onSkippedVersion?: OnSkippedOffchainParamsVersion): Promise; } //# sourceMappingURL=protocol-params-reader.d.ts.map