import { providers } from "ethers";
import { RPCProvider, RPCTransport } from "./types";
/**
 * Type predicate for RPCProvider type.
 * @param provider Provider string (ALCHEMY, INFURA, ...).
 * @returns True if the provider string is a supported provider.
 */
export declare function isSupportedProvider(provider: string): provider is RPCProvider;
/**
 * Produce an RPC for a given RPC provider, chainId API key and transport.
 * @param provider RPC provider identifier (ALCHEMY, INFURA, ...)
 * @param chainId Chain ID to obtain a URL for.
 * @param apiKey API key for provider.
 * @param transport Optional transport specifier (HTTPS or WSS).
 * @returns An RPC URL confirming to the specified inputs.
 */
export declare function getURL(provider: RPCProvider, chainId: number, apiKey: string, transport?: RPCTransport): string;
export declare function compareResultsAndFilterIgnoredKeys(ignoredKeys: string[], _objA: Record<string, unknown>, _objB: Record<string, unknown>): boolean;
export declare function compareArrayResultsWithIgnoredKeys(ignoredKeys: string[], objA: unknown[], objB: unknown[]): boolean;
/**
 * This is the type we pass to define a request "task".
 */
export interface RateLimitTask {
    sendArgs: [string, Array<unknown>];
    resolve: (result: unknown) => void;
    reject: (err: unknown) => void;
}
/**
 * A helper function to format an error message for a provider.
 * @param provider The provider that failed.
 * @param rawErrorText The raw error text.
 * @returns The formatted error message.
 */
export declare function formatProviderError(provider: providers.StaticJsonRpcProvider, rawErrorText: string): string;
export declare function createSendErrorWithMessage(message: string, sendError: Record<string, unknown>): {
    name: string;
    message: string;
    stack?: string | undefined;
    cause?: unknown;
};
/**
 * Compares two RPC results, filtering out fields that are known to differ between providers.
 * Note: this function references `IGNORED_ERROR_CODES` which is a record of error codes that correspond to fields
 *       that should be ignored when comparing RPC results.
 * @param method The method that was called - conditionally filters out fields based on the method.
 * @param rpcResultA The first RPC result.
 * @param rpcResultB The second RPC result.
 * @returns True if the results are equal, false otherwise.
 */
export declare function compareRpcResults(method: string, rpcResultA: unknown, rpcResultB: unknown): boolean;
export declare enum CacheType {
    NONE = 0,
    WITH_TTL = 1,
    NO_TTL = 2,
    DECIDE_TTL_POST_SEND = 3
}
