1 | import { JsonRpcRequest, JsonRpcResponse } from 'json-rpc-engine';
|
2 | import SafeEventEmitter from '@metamask/safe-event-emitter';
|
3 | export declare type Payload = Partial<JsonRpcRequest<any[]>>;
|
4 | export interface JsonRpcRequestToCache extends JsonRpcRequest<string[]> {
|
5 | skipCache: boolean;
|
6 | }
|
7 | export declare type BlockData = string | string[];
|
8 | export declare type Block = Record<string, BlockData>;
|
9 | export declare type BlockCache = Record<string, Block>;
|
10 | export declare type Cache = Record<number, BlockCache>;
|
11 | export declare type SendAsyncCallBack<T> = (err: unknown, providerRes: JsonRpcResponse<T>) => void;
|
12 | export declare type SendCallBack = (err: any, providerRes: JsonRpcResponse<any>) => void;
|
13 | export interface SafeEventEmitterProvider extends SafeEventEmitter {
|
14 | sendAsync: <T, U>(req: JsonRpcRequest<T>, cb: SendAsyncCallBack<U>) => void;
|
15 | send: (req: JsonRpcRequest<any>, callback: SendCallBack) => void;
|
16 | }
|