import type { Account, Chain, PublicClient, Transport, WalletClient } from 'viem'; import type { L2UsdDeltaProof } from './proof-builder.js'; import { type ProvenDeltaResult } from './read.js'; export interface ProveL2UsdDeltaOptions { /** default false — simulate only */ broadcast?: boolean; /** REQUIRED when broadcast: true (funded L1 EOA) */ l1WalletClient?: WalletClient; /** default true — pre-check cache, short-circuit */ skipIfAlreadyProven?: boolean; /** default true (120_000ms timeout). A wait timeout/RPC failure after a * successful broadcast does NOT throw — the result carries the txHash with * `receiptStatus: 'pending'`. */ waitForReceipt?: boolean; } export type ProveStatus = 'simulated' | 'broadcast' | 'already-proven'; export interface ProveL2UsdDeltaResult { status: ProveStatus; account0: `0x${string}`; account1: `0x${string}`; chainId: bigint; /** value proven/cached (canonical direction) */ usdDelta: bigint; anchorL2BlockNumber: bigint; /** set when broadcast path estimates */ gasEstimate?: bigint; /** status === 'broadcast' only */ txHash?: `0x${string}`; /** status === 'broadcast' only. * 'confirmed' — the receipt landed with status success. * 'pending' — the tx WAS broadcast but the receipt is not confirmed yet: * either `waitForReceipt: false`, or the 120s wait timed out / the RPC failed. * Track `txHash` on the L1 explorer; do NOT re-build and re-submit the proof * (a landed tx makes the second submission revert ProofOutdated). */ receiptStatus?: 'confirmed' | 'pending'; /** status === 'already-proven' only */ cached?: ProvenDeltaResult; } /** Simulate (eth_call) `proveL2UsdDelta`; broadcast ONLY when `options.broadcast === true` * AND a funded L1 wallet client is supplied. * * The broadcast path is a plain, permissionless L1 EOA transaction — no UserOp, * bundler, paymaster, or guardian involvement; only L1 gas leaves the EOA. */ export declare function proveL2UsdDelta(l1Client: PublicClient, readerAddress: `0x${string}`, proof: L2UsdDeltaProof, options?: ProveL2UsdDeltaOptions): Promise; //# sourceMappingURL=prove.d.ts.map