import type { Common } from '../internal/common.js'; import type { Logger } from '../internal/logger.js'; import type { Chain, SyncBlock, SyncBlockHeader } from '../internal/types.js'; import { type EIP1193Parameters, type Hash, type PublicRpcSchema, type RpcTransactionReceipt } from "viem"; import type { DebugRpcSchema } from "../utils/debug.js"; export type RpcSchema = [ ...PublicRpcSchema, ...DebugRpcSchema, /** * @description Returns the receipts of a block specified by hash * * @example * provider.request({ method: 'eth_getBlockReceipts', params: ['0x...'] }) * // => [{ ... }, { ... }] */ { Method: "eth_getBlockReceipts"; Parameters: [hash: Hash]; ReturnType: RpcTransactionReceipt[] | null; } ]; export type RequestParameters = EIP1193Parameters; export type RequestReturnType["method"]> = Extract["ReturnType"]; export type Rpc = { hostnames: string[]; request: (parameters: TParameters, context?: { logger?: Logger; retryNullBlockRequest?: boolean; }) => Promise>; subscribe: (params: { onBlock: (block: SyncBlock | SyncBlockHeader) => Promise; onError: (error: Error) => void; }) => void; unsubscribe: () => Promise; }; export declare const createRpc: ({ common, chain, concurrency, }: { common: Common; chain: Chain; concurrency?: number | undefined; }) => Rpc; //# sourceMappingURL=index.d.ts.map