import type { Chain, PublicClient, Transport } from 'viem'; /** Decoded `ITrustL2Reader.L2ChainConfig` */ export interface L2ChainConfigResult { chainId: bigint; stateRootSource: `0x${string}`; reputationModule: `0x${string}`; rollupType: number; gameType: number; active: boolean; } /** Decoded `ITrustL2Reader.ProvenDelta` with the canonical pair attached */ export interface ProvenDeltaResult { account0: `0x${string}`; account1: `0x${string}`; chainId: bigint; /** int256, positive = account0 net-paid account1 (18-dec USD WAD) */ usdDelta: bigint; l2BlockNumber: bigint; provenAt: bigint; /** provenAt > 0n */ proven: boolean; } /** One per-chain row of an L1-proven cross-chain reputation breakdown */ export interface ChainNetPaidBreakdown { chainId: bigint; /** SUPPORTED_CHAINS match by id, else `chain ${id}` */ chainName: string; /** Clamped ≥ 0 (contract semantics — negative directions read as 0) */ netPaidUSD: bigint; proven: boolean; l2BlockNumber: bigint; provenAt: bigint; } /** Composite result for cross-chain reputation reads */ export interface CrossChainReputationResult { from: `0x${string}`; to: `0x${string}`; /** Sum of per-chain clamped values (== getAggregateNetPaidUSD) */ totalNetPaidUSD: bigint; chains: ChainNetPaidBreakdown[]; registeredChainIds: bigint[]; } /** Get the L1-proven net USD `from` has paid `to` on a single L2 chain. * * Direction-aware: call with NATURAL payer/payee order — the contract * re-canonicalizes internally and clamps negative directions to 0. */ export declare function getProvenNetPaidUSD(l1Client: PublicClient, readerAddress: `0x${string}`, from: `0x${string}`, to: `0x${string}`, chainId: bigint): Promise; /** Get the L1-proven net USD `from` has paid `to` aggregated across L2 chains. * * @param chainIds - Chains to aggregate. Default: `getRegisteredChainIds()`. */ export declare function getAggregateNetPaidUSD(l1Client: PublicClient, readerAddress: `0x${string}`, from: `0x${string}`, to: `0x${string}`, chainIds?: bigint[]): Promise; /** Get the cached proven delta for a pair on one L2 chain. * * Accepts any order; canonicalizes internally before the readContract call. * `proven: false` (provenAt === 0) means no proof has been submitted yet. */ export declare function getProvenDelta(l1Client: PublicClient, readerAddress: `0x${string}`, accountA: `0x${string}`, accountB: `0x${string}`, chainId: bigint): Promise; /** Get all L2 chain ids registered on the TrustL2Reader */ export declare function getRegisteredChainIds(l1Client: PublicClient, readerAddress: `0x${string}`): Promise; /** Get the registered L2 chain configuration from the TrustL2Reader */ export declare function getL2ChainConfig(l1Client: PublicClient, readerAddress: `0x${string}`, chainId: bigint): Promise; /** Composite cross-chain reputation read for `from` → `to`: * registered chains → per-chain getProvenNetPaidUSD + getProvenDelta metadata; * total = local sum of the per-chain clamped values (== getAggregateNetPaidUSD). */ export declare function getCrossChainReputation(l1Client: PublicClient, readerAddress: `0x${string}`, from: `0x${string}`, to: `0x${string}`): Promise; //# sourceMappingURL=read.d.ts.map