ethers.js/packages/providers/lib/json-rpc-provider.d.ts

54 lines
2.8 KiB
TypeScript
Raw Permalink Normal View History

2019-05-14 18:48:48 -04:00
import { Provider, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider";
2020-10-18 23:19:16 -04:00
import { Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from "@ethersproject/abstract-signer";
2019-05-14 18:48:48 -04:00
import { Bytes } from "@ethersproject/bytes";
2020-05-03 17:53:58 -04:00
import { Network, Networkish } from "@ethersproject/networks";
2020-06-01 05:04:12 -04:00
import { Deferrable } from "@ethersproject/properties";
2021-03-30 15:22:45 -04:00
import { AccessList } from "@ethersproject/transactions";
2019-05-14 18:48:48 -04:00
import { ConnectionInfo } from "@ethersproject/web";
2020-03-12 19:14:50 +01:00
import { BaseProvider, Event } from "./base-provider";
2020-10-18 23:19:16 -04:00
export declare class JsonRpcSigner extends Signer implements TypedDataSigner {
2019-05-14 18:48:48 -04:00
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 05:04:12 -04:00
sendUncheckedTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
2019-05-14 18:48:48 -04:00
signMessage(message: Bytes | string): Promise<string>;
2021-10-16 02:29:27 -04:00
_legacySignMessage(message: Bytes | string): Promise<string>;
2020-10-18 23:19:16 -04:00
_signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
2019-05-14 18:48:48 -04:00
unlock(password: string): Promise<boolean>;
}
declare class UncheckedJsonRpcSigner extends JsonRpcSigner {
2020-06-01 05:04:12 -04:00
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
2019-05-14 18:48:48 -04:00
}
export declare class JsonRpcProvider extends BaseProvider {
readonly connection: ConnectionInfo;
_pendingFilter: Promise<number>;
2019-05-24 18:15:42 -04:00
_nextId: number;
2021-04-17 22:41:09 -04:00
_eventLoopCache: Record<string, Promise<any>>;
2021-04-19 21:30:28 -04:00
get _cache(): Record<string, Promise<any>>;
2019-05-14 18:48:48 -04:00
constructor(url?: ConnectionInfo | string, network?: Networkish);
2020-03-12 19:14:50 +01:00
static defaultUrl(): string;
2020-05-03 17:53:58 -04:00
detectNetwork(): Promise<Network>;
2021-04-17 22:41:09 -04:00
_uncachedDetectNetwork(): Promise<Network>;
2019-05-14 18:48:48 -04:00
getSigner(addressOrIndex?: string | number): JsonRpcSigner;
getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner;
listAccounts(): Promise<Array<string>>;
2020-02-10 15:51:58 -05:00
send(method: string, params: Array<any>): Promise<any>;
2020-03-21 12:48:22 -04:00
prepareRequest(method: string, params: any): [string, Array<any>];
2019-05-14 18:48:48 -04:00
perform(method: string, params: any): Promise<any>;
2020-03-12 19:14:50 +01:00
_startEvent(event: Event): void;
2019-05-14 18:48:48 -04:00
_startPending(): void;
2020-03-12 19:14:50 +01:00
_stopEvent(event: Event): void;
2019-05-14 18:48:48 -04:00
static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: {
[key: string]: boolean;
}): {
2021-03-30 15:22:45 -04:00
[key: string]: string | AccessList;
2019-05-14 18:48:48 -04:00
};
}
export {};
//# sourceMappingURL=json-rpc-provider.d.ts.map