1 | import { Networkish } from "@ethersproject/networks";
|
2 | import { JsonRpcProvider } from "./json-rpc-provider";
|
3 | export declare type ExternalProvider = {
|
4 | isMetaMask?: boolean;
|
5 | isStatus?: boolean;
|
6 | host?: string;
|
7 | path?: string;
|
8 | sendAsync?: (request: {
|
9 | method: string;
|
10 | params?: Array<any>;
|
11 | }, callback: (error: any, response: any) => void) => void;
|
12 | send?: (request: {
|
13 | method: string;
|
14 | params?: Array<any>;
|
15 | }, callback: (error: any, response: any) => void) => void;
|
16 | request?: (request: {
|
17 | method: string;
|
18 | params?: Array<any>;
|
19 | }) => Promise<any>;
|
20 | };
|
21 | export declare type JsonRpcFetchFunc = (method: string, params?: Array<any>) => Promise<any>;
|
22 | export declare class Web3Provider extends JsonRpcProvider {
|
23 | readonly provider: ExternalProvider;
|
24 | readonly jsonRpcFetchFunc: JsonRpcFetchFunc;
|
25 | constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish);
|
26 | send(method: string, params: Array<any>): Promise<any>;
|
27 | }
|
28 | //# sourceMappingURL=web3-provider.d.ts.map |
\ | No newline at end of file |