import { type Abi, type Address, type Hex, type PublicClient } from 'viem'; import type { CrossChainAddress, OperatorVotingPower, OperatorWithKeys } from './types/index.js'; import type { BlockTagPreference } from './utils/core.js'; /** @notice Single multicall request entry. */ export type MulticallRequest = { address: Address; abi: Abi; functionName: string; args: readonly unknown[]; }; type DriverReadMethod = 'getCurrentEpoch' | 'getCurrentEpochDuration' | 'getCurrentEpochStart' | 'getNextEpoch' | 'getNextEpochDuration' | 'getNextEpochStart' | 'getEpochStart' | 'getEpochDuration' | 'getEpochIndex'; type DriverReadArgsMap = { getCurrentEpoch: []; getCurrentEpochDuration: []; getCurrentEpochStart: []; getNextEpoch: []; getNextEpochDuration: []; getNextEpochStart: []; getEpochStart: [number]; getEpochDuration: [number]; getEpochIndex: [number]; }; export declare const DRIVER_METHOD: { readonly CURRENT_EPOCH: "getCurrentEpoch"; readonly CURRENT_EPOCH_DURATION: "getCurrentEpochDuration"; readonly CURRENT_EPOCH_START: "getCurrentEpochStart"; readonly NEXT_EPOCH: "getNextEpoch"; readonly NEXT_EPOCH_DURATION: "getNextEpochDuration"; readonly NEXT_EPOCH_START: "getNextEpochStart"; readonly EPOCH_START: "getEpochStart"; readonly EPOCH_DURATION: "getEpochDuration"; readonly EPOCH_INDEX: "getEpochIndex"; }; /** @notice Build a map of PublicClient instances keyed by chainId from RPC URLs. */ export declare const buildClientMap: (rpcUrls: readonly string[]) => Promise>; /** @notice Retrieve a client by chainId or throw if it is missing. */ export declare const getClientOrThrow: (clients: Map, chainId: number) => PublicClient; export declare const readDriverNumber: ({ client, driver, method, blockTag, args, }: { client: PublicClient; driver: CrossChainAddress; method: M; blockTag: BlockTagPreference; args?: DriverReadArgsMap[M]; }) => Promise; export declare const readDriverNumbersBatch: ({ client, driver, method, blockTag, argsList, }: { client: PublicClient; driver: CrossChainAddress; method: M; blockTag: BlockTagPreference; argsList: readonly DriverReadArgsMap[M][]; }) => Promise; export declare const readDriverConfigAt: (client: PublicClient, driver: CrossChainAddress, epochStart: number, blockTag: BlockTagPreference) => Promise; export declare const readDriverConfigAtBatch: (client: PublicClient, driver: CrossChainAddress, epochStarts: readonly number[], blockTag: BlockTagPreference) => Promise; /** @notice Execute multicall requests using viem batching defaults. */ export declare const executeChunkedMulticall: ({ client, requests, blockTag, }: { client: PublicClient; requests: readonly MulticallRequest[]; blockTag: BlockTagPreference; }) => Promise; export declare const fetchNetworkIdentifiers: ({ client, driver, blockTag, }: { client: PublicClient; driver: CrossChainAddress; blockTag: BlockTagPreference; }) => Promise<{ network: Address; subnetwork: Hex; }>; export declare const fetchSettlementDomain: ({ client, settlement, blockTag, }: { client: PublicClient; settlement: CrossChainAddress; blockTag: BlockTagPreference; }) => Promise<{ fields: string; name: string; version: string; chainId: bigint; verifyingContract: Address; salt: Hex; extensions: bigint[]; }>; export declare const fetchVotingPowers: ({ client, provider, blockTag, timestamp, useMulticall, }: { client: PublicClient; provider: CrossChainAddress; blockTag: BlockTagPreference; timestamp: bigint; useMulticall: boolean; }) => Promise; export declare const fetchVotingPowersBatch: ({ client, provider, blockTag, timestamps, useMulticall, }: { client: PublicClient; provider: CrossChainAddress; blockTag: BlockTagPreference; timestamps: readonly bigint[]; useMulticall: boolean; }) => Promise; export declare const fetchKeysAt: ({ client, provider, blockTag, timestamp, useMulticall, }: { client: PublicClient; provider: CrossChainAddress; blockTag: BlockTagPreference; timestamp: bigint; useMulticall: boolean; }) => Promise; export declare const fetchKeysAtBatch: ({ client, provider, blockTag, timestamps, useMulticall, }: { client: PublicClient; provider: CrossChainAddress; blockTag: BlockTagPreference; timestamps: readonly bigint[]; useMulticall: boolean; }) => Promise; export type { DriverReadArgsMap, DriverReadMethod }; //# sourceMappingURL=client.d.ts.map