import type { PublicClient, WalletClient, Chain, Transport, Account } from 'viem'; /** Configuration for the AgreementKeeper */ export interface AgreementKeeperConfig { /** Public client for on-chain reads */ publicClient: PublicClient; /** Wallet client for gas settlement (facilitator wallet) */ walletClient: WalletClient; /** PaymentAgreementModule contract address */ moduleAddress: `0x${string}`; /** How often to scan for due agreements (ms). Default: 60_000 */ scanIntervalMs?: number; /** Maximum executions per scan cycle. Default: 20 */ maxExecutionsPerScan?: number; } /** AgreementKeeper — executes due payment agreements so services receive recurring revenue. * * The keeper is notified when x402Storage.hasPaid() discovers an on-chain agreement. * It periodically checks if tracked agreements are due for execution and calls * executeAgreement() on the PaymentAgreementModule. * * executeAgreement() is permissionless — anyone can call it — so the facilitator * wallet only pays gas, not the agreement amount. */ export declare class AgreementKeeper { private timer; private readonly trackedAgreements; private readonly config; private readonly scanIntervalMs; private readonly maxExecutionsPerScan; constructor(config: AgreementKeeperConfig); /** Register an agreement for periodic execution. * Called by x402Storage.hasPaid() when an agreement is discovered. */ trackAgreement(account: `0x${string}`, agreementId: bigint): void; /** Number of tracked agreements */ get trackedCount(): number; /** Start the periodic scan loop */ start(): void; /** Stop the keeper (for graceful shutdown) */ stop(): void; /** Run a single scan: check + execute due agreements */ scan(): Promise; } //# sourceMappingURL=agreement-keeper.d.ts.map