ethers.js/packages/providers/lib/web3-provider.d.ts
2019-11-20 18:57:38 +09:00

16 lines
628 B
TypeScript

import { Networkish } from "@ethersproject/networks";
import { JsonRpcProvider } from "./json-rpc-provider";
export declare type AsyncSendable = {
isMetaMask?: boolean;
host?: string;
path?: string;
sendAsync?: (request: any, callback: (error: any, response: any) => void) => void;
send?: (request: any, callback: (error: any, response: any) => void) => void;
};
export declare class Web3Provider extends JsonRpcProvider {
readonly provider: AsyncSendable;
private _sendAsync;
constructor(web3Provider: AsyncSendable, network?: Networkish);
send(method: string, params: any): Promise<any>;
}