2020-01-18 21:48:12 -05:00
|
|
|
import { Provider } from "@ethersproject/abstract-provider";
|
2020-05-03 21:11:18 -04:00
|
|
|
import { Network } from "@ethersproject/networks";
|
2019-05-14 18:48:48 -04:00
|
|
|
import { BaseProvider } from "./base-provider";
|
2020-01-18 21:48:12 -05:00
|
|
|
export interface FallbackProviderConfig {
|
|
|
|
provider: Provider;
|
|
|
|
priority?: number;
|
|
|
|
stallTimeout?: number;
|
|
|
|
weight?: number;
|
|
|
|
}
|
2019-05-14 18:48:48 -04:00
|
|
|
export declare class FallbackProvider extends BaseProvider {
|
2020-02-06 18:21:34 -05:00
|
|
|
readonly providerConfigs: ReadonlyArray<FallbackProviderConfig>;
|
2019-05-14 18:48:48 -04:00
|
|
|
readonly quorum: number;
|
2020-01-18 21:48:12 -05:00
|
|
|
_highestBlockNumber: number;
|
|
|
|
constructor(providers: Array<Provider | FallbackProviderConfig>, quorum?: number);
|
2020-05-03 17:53:58 -04:00
|
|
|
detectNetwork(): Promise<Network>;
|
2019-05-14 18:48:48 -04:00
|
|
|
perform(method: string, params: {
|
|
|
|
[name: string]: any;
|
2020-01-18 21:48:12 -05:00
|
|
|
}): Promise<any>;
|
2019-05-14 18:48:48 -04:00
|
|
|
}
|