/** * Type definitions for LayerZero Scan operations. */ import type { EvmReadProvider } from "../../types/evm.js"; import type { TokenEntry } from "../../registry/types.js"; /** Configuration for the LayerZero Scan API client. */ export interface LayerZeroScanConfig { /** Base URL for the LayerZero Scan API (e.g. "https://scan.layerzero-api.com/v1/"). */ baseUrl: string; /** Optional API key for authenticated requests. */ apiKey?: string; } /** Factory function that creates a read provider for a given token entry. */ export type CreateReadProvider = (token: TokenEntry) => EvmReadProvider; export interface WalletMessagesParams { limit?: number; start?: string; end?: string; nextToken?: string; } export interface ScanMessagesResponse { data: T[]; nextToken?: string; } export interface LayerZeroScanMessage { status?: { name?: string; message?: string; }; pathway?: { srcEid?: number; dstEid?: number; sender?: LayerZeroEndpoint; receiver?: LayerZeroEndpoint; id?: string; nonce?: number; }; source?: LayerZeroStage; destination?: LayerZeroDestination; verification?: { dvn?: { status?: string; }; }; sealer?: { status?: string; tx?: LayerZeroTxInfo; }; guid?: string; } export interface LayerZeroEndpoint { address?: string; chain?: string; } export interface LayerZeroStage { status?: string; tx?: LayerZeroTxInfo; } export interface LayerZeroTxInfo { txHash?: string; blockHash?: string; blockNumber?: number | string; blockTimestamp?: number | string; from?: string; payload?: string; readinessTimestamp?: number | string; options?: LayerZeroTxOptions; } export interface LayerZeroTxOptions { lzReceive?: { gas?: number | string; value?: number | string; }; compose?: Array<{ index?: number | string; gas?: number | string; value?: number | string; }>; ordered?: boolean; } export interface LayerZeroDestination { status?: string; tx?: LayerZeroDestinationTx; lzCompose?: LayerZeroCompose; nativeDrop?: { status?: string; tx?: LayerZeroDestinationTx; }; payload?: string; } export interface LayerZeroDestinationTx { txHash?: string; blockHash?: string; blockNumber?: number | string; blockTimestamp?: number | string; from?: string; to?: string; } export interface LayerZeroCompose { txs: LayerZeroComposeTx[]; status?: string; failedTx?: Array<{ txHash?: string; txError?: string; }>; } export interface LayerZeroComposeTx { txHash?: string; blockHash?: string; blockNumber?: number | string; blockTimestamp?: number | string; from?: string; to?: string; } export interface BridgeRequestSummary { dstEid?: number; to?: string; refundAddress?: string; minAmountOut?: bigint; } export interface SendPayloadSummary { dstEid?: number; to?: string; amount?: bigint; minAmount?: bigint; compose?: BridgeRequestSummary | null; source: "tx" | "payload"; error?: string; amountSent?: bigint; amountReceived?: bigint; decimals?: number; decimalConversionRate?: bigint; } export interface ComposeFollowupSummary { srcChain: string; dstChain: string; sourceTx: string; destTx: string; success: boolean; amount?: bigint; amountSent?: bigint; amountReceived?: bigint; decimals?: number; } export interface LayerZeroMessageSummary { guid?: string; pathway?: { src?: string; dst?: string; nonce?: number; srcEid?: number; dstEid?: number; }; sourceTx?: string; sourceBlock?: string; destinationTx?: string; send?: SendPayloadSummary | null; composeFollowups?: ComposeFollowupSummary[]; status?: string; raw: LayerZeroScanMessage; } export interface WalletStatusResult { items: LayerZeroMessageSummary[]; nextToken?: string; walletUrl: string; } export interface TokenMetadata { decimals?: number; decimalConversionRate?: bigint; } /** Parameters for the top-level `fetchWalletStatus` function. */ export interface FetchWalletStatusParams { address: string; tokens: TokenEntry[]; scanConfig: LayerZeroScanConfig; createReadProvider: CreateReadProvider; limit?: number; nextToken?: string; filterByToken?: boolean; } //# sourceMappingURL=types.d.ts.map