2019-05-15 01:48:48 +03:00
|
|
|
import { Provider, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider";
|
|
|
|
import { Signer } from "@ethersproject/abstract-signer";
|
|
|
|
import { Bytes } from "@ethersproject/bytes";
|
2020-05-04 00:53:58 +03:00
|
|
|
import { Network, Networkish } from "@ethersproject/networks";
|
2020-06-01 12:04:12 +03:00
|
|
|
import { Deferrable } from "@ethersproject/properties";
|
2019-05-15 01:48:48 +03:00
|
|
|
import { ConnectionInfo } from "@ethersproject/web";
|
2020-03-12 21:14:50 +03:00
|
|
|
import { BaseProvider, Event } from "./base-provider";
|
2019-05-15 01:48:48 +03:00
|
|
|
export declare class JsonRpcSigner extends Signer {
|
|
|
|
readonly provider: JsonRpcProvider;
|
|
|
|
_index: number;
|
|
|
|
_address: string;
|
|
|
|
constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number);
|
|
|
|
connect(provider: Provider): JsonRpcSigner;
|
|
|
|
connectUnchecked(): JsonRpcSigner;
|
|
|
|
getAddress(): Promise<string>;
|
2020-06-01 12:04:12 +03:00
|
|
|
sendUncheckedTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
|
|
signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
|
|
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
|
2019-05-15 01:48:48 +03:00
|
|
|
signMessage(message: Bytes | string): Promise<string>;
|
|
|
|
unlock(password: string): Promise<boolean>;
|
|
|
|
}
|
|
|
|
declare class UncheckedJsonRpcSigner extends JsonRpcSigner {
|
2020-06-01 12:04:12 +03:00
|
|
|
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
|
2019-05-15 01:48:48 +03:00
|
|
|
}
|
|
|
|
export declare class JsonRpcProvider extends BaseProvider {
|
|
|
|
readonly connection: ConnectionInfo;
|
|
|
|
_pendingFilter: Promise<number>;
|
2019-05-25 01:15:42 +03:00
|
|
|
_nextId: number;
|
2019-05-15 01:48:48 +03:00
|
|
|
constructor(url?: ConnectionInfo | string, network?: Networkish);
|
2020-03-12 21:14:50 +03:00
|
|
|
static defaultUrl(): string;
|
2020-05-04 00:53:58 +03:00
|
|
|
detectNetwork(): Promise<Network>;
|
2019-05-15 01:48:48 +03:00
|
|
|
getSigner(addressOrIndex?: string | number): JsonRpcSigner;
|
|
|
|
getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner;
|
|
|
|
listAccounts(): Promise<Array<string>>;
|
2020-02-10 23:51:58 +03:00
|
|
|
send(method: string, params: Array<any>): Promise<any>;
|
2020-03-21 19:48:22 +03:00
|
|
|
prepareRequest(method: string, params: any): [string, Array<any>];
|
2019-05-15 01:48:48 +03:00
|
|
|
perform(method: string, params: any): Promise<any>;
|
2020-03-12 21:14:50 +03:00
|
|
|
_startEvent(event: Event): void;
|
2019-05-15 01:48:48 +03:00
|
|
|
_startPending(): void;
|
2020-03-12 21:14:50 +03:00
|
|
|
_stopEvent(event: Event): void;
|
2019-05-15 01:48:48 +03:00
|
|
|
static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: {
|
|
|
|
[key: string]: boolean;
|
|
|
|
}): {
|
|
|
|
[key: string]: string;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
export {};
|