import type { Logger } from 'pino'; import { ProtocolType } from '@hyperlane-xyz/utils'; export type InflightRebalanceQueryParams = { bridges: string[]; routersByDomain: Record; txSender: string; limit?: number; }; export type UserTransferQueryParams = { routersByDomain: Record; excludeTxSenders: string[]; limit?: number; }; export type RebalanceActionQueryParams = { bridges: string[]; routersByDomain: Record; rebalancerAddress: string; inventorySignerAddresses?: string[]; limit?: number; }; export type ExplorerMessage = { msg_id: string; origin_domain_id: number; destination_domain_id: number; sender: string; recipient: string; origin_tx_hash: string; origin_tx_sender: string; origin_tx_recipient: string; is_delivered: boolean; message_body: string; send_occurred_at: string | null; }; export interface IExplorerClient { getInflightUserTransfers(params: UserTransferQueryParams, logger: Logger): Promise; getInflightRebalanceActions(params: RebalanceActionQueryParams, logger: Logger): Promise; } export declare class ExplorerClient implements IExplorerClient { private readonly baseUrl; private readonly getProtocol; constructor(baseUrl: string, getProtocol: (domainId: number) => ProtocolType); /** * Convert an address to PostgreSQL bytea format (\\x-prefixed hex). * When `domain` is provided, resolves the chain's protocol to encode * non-EVM addresses (e.g. base58 Solana, 32-byte Starknet) correctly * via `addressToByteHexString`. Without `domain`, assumes the address * is already EVM-format hex (used for bridges, txSender, etc. which * are always EVM addresses). */ private toBytea; /** * Normalize all hex fields in Explorer response from PostgreSQL bytea format (\\x) to standard hex (0x) */ private normalizeExplorerMessage; hasUndeliveredRebalance(params: InflightRebalanceQueryParams, logger: Logger): Promise; /** * Query inflight user transfers from the Explorer. * Returns transfers where sender/recipient are routers, excluding rebalancer's own transactions. */ getInflightUserTransfers(params: UserTransferQueryParams, logger: Logger): Promise; /** * Query inflight rebalance actions from the Explorer. * Returns messages where sender/recipient are bridges, tx sender is the rebalancer, * and origin_tx_recipient is one of this warp route's routers. */ getInflightRebalanceActions(params: RebalanceActionQueryParams, logger: Logger): Promise; } //# sourceMappingURL=ExplorerClient.d.ts.map