import { Connection } from '@solana/web3.js'; import { type JsonRpcApiProvider, type TransactionReceipt } from 'ethers'; /** * Load providers from a list of RPC endpoints * * This class manages concurrent access to providers, racing them as soon as they are created for * the `getTxReceipt` method, or managing a singleton promise requested with `forChainId` method, * resolved to the first RPC responding for that chainId, even before the chainIds of all * providers are known. * It also ensures that all providers are destroyed when the instance is destroyed. * * @param argv - Object with either `rpcs` or `rpcs-file` property * @returns instance of Providers manager class * @throws Error if no providers are found **/ export declare class Providers { #private; destroyed: Promise; completed: true | Promise; constructor(argv: { rpcs: string[]; } | { 'rpcs-file': string; }); destroy(): void; /** * Get Solana transaction from available Solana RPCs * @param signature - Solana transaction signature * @returns Promise for the transaction details with connection */ getSolanaTransaction(signature: string): Promise<{ parsedTransaction: import("@solana/web3.js").ParsedTransactionWithMeta; connection: Connection; rpc: string; }>; /** * Ask for a provider for a given chainId, or wait for it to be available * @param chainId - chainId to get a provider for * @returns Promise for a provider for the given chainId **/ forChainId(chainId: number | string): Promise; /** * Get transaction receipt from any of the providers; * Races them even before network is known, returning first to respond. * Continues populating the list of providers in the background after resolved. * @param txHash - transaction hash to get receipt for * @returns Promise for the transaction receipt, with provider in TransactionReceipt.provider **/ getTxReceipt(txHash: string): Promise; } //# sourceMappingURL=providers.d.ts.map