import type * as Db from '../../db/Db.js'; import * as FundingDeposits from '../../db/tables/fundingDeposits.js'; /** Active reusable address watched by one chain-and-token observer shard. */ export type Route = { /** Provider-owned reusable address. */ address: string; /** Funding deposit address id. */ id: string; }; /** Verified source transfer discovered directly from an EVM log. */ export type Observation = { /** Funding deposit address that received the transfer. */ addressId: string; /** Source token quantity in base units. */ amount: string; /** Confirmed source block containing the transfer. */ blockNumber: bigint; /** Source chain CAIP-2 id. */ chainId: string; /** Source-chain sender. */ sender: string; /** Source token contract. */ tokenAddress: string; /** Source transaction hash. */ transactionHash: string; /** Transfer log position within the source transaction. */ transferIndex: number; }; /** Scans confirmed EVM blocks for transfers into active reusable addresses. */ export declare function scan(options: scan.Options): Promise; export declare namespace scan { /** EVM shard state and scan bounds. */ type Options = { /** Initial confirmed-block backfill when no cursor exists. */ backfillBlocks?: bigint | undefined; /** Source chain CAIP-2 id. */ chainId: string; /** Required block confirmations. */ confirmations?: number | undefined; /** Last confirmed block processed by the shard. */ cursor?: bigint | undefined; /** Fetch implementation override. */ fetch?: typeof globalThis.fetch | undefined; /** Maximum confirmed blocks processed in one invocation. */ maximumBlocks?: bigint | undefined; /** Active reusable addresses in the shard. */ routes: readonly Route[]; /** Ordered source-chain RPC endpoints. */ rpcUrls: readonly string[]; /** Source token contract. */ tokenAddress: string; }; /** Confirmed cursor and verified transfers produced by one scan. */ type Result = { /** Last confirmed block processed by the shard. */ cursor: bigint; /** Latest block satisfying the confirmation policy. */ head: bigint; /** Verified transfers into active addresses. */ observations: readonly Observation[]; }; } /** Lists the active Relay addresses assigned to one source observer shard. */ export declare function listRoutes(db: Db.Db, options: listRoutes.Options): Promise; export declare namespace listRoutes { /** Provider and source asset identifying one observer shard. */ type Options = { /** Funding provider that owns the deposit addresses. */ providerId: string; /** Source chain CAIP-2 id. */ sourceChainId: string; /** Source token key. */ sourceTokenKey: string; }; } /** Persists one verified source transfer before provider indexing. */ export declare function observe(db: Db.Db, input: observe.Input): Promise; export declare namespace observe { /** Verified source transfer and route identity. */ type Input = { /** Funding deposit address id. */ addressId: string; /** Source token quantity in base units. */ amount: string; /** Source chain CAIP-2 id. */ chainId: string; /** Detection time override. */ now?: Date | undefined; /** Provider-owned reusable address that received the transfer. */ recipient: string; /** Source-chain sender. */ sender: string; /** Source token contract. */ tokenAddress: string; /** Source transaction hash. */ transactionHash: string; /** Transfer log position within the source transaction. */ transferIndex: number; }; /** Persistence outcome for one chain-observed source transfer. */ type Result = { record: FundingDeposits.Record; type: 'created' | 'existing'; } | { type: 'ignored'; }; } //# sourceMappingURL=SourceObservation.d.ts.map