2018-07-30 18:59:52 -04:00
|
|
|
import { JsonRpcProvider } from './json-rpc-provider';
|
|
|
|
import { Networkish } from '../utils/networks';
|
|
|
|
export declare type AsyncSendable = {
|
|
|
|
isMetaMask?: boolean;
|
|
|
|
host?: string;
|
|
|
|
path?: string;
|
2018-07-30 23:15:36 -04:00
|
|
|
sendAsync?: (request: any, callback: (error: any, response: any) => void) => void;
|
|
|
|
send?: (request: any, callback: (error: any, response: any) => void) => void;
|
2018-07-30 18:59:52 -04:00
|
|
|
};
|
|
|
|
export declare class Web3Provider extends JsonRpcProvider {
|
|
|
|
readonly _web3Provider: AsyncSendable;
|
2018-07-30 23:15:36 -04:00
|
|
|
private _sendAsync;
|
2018-07-30 18:59:52 -04:00
|
|
|
constructor(web3Provider: AsyncSendable, network?: Networkish);
|
|
|
|
send(method: string, params: any): Promise<any>;
|
|
|
|
}
|