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

53 lines
2.7 KiB
TypeScript
Raw Normal View History

2019-05-15 01:48:48 +03:00
import { Provider, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider";
2020-10-19 06:19:16 +03:00
import { Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from "@ethersproject/abstract-signer";
2019-05-15 01:48:48 +03:00
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";
2021-03-30 22:22:45 +03:00
import { AccessList } from "@ethersproject/transactions";
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";
2020-10-19 06:19:16 +03:00
export declare class JsonRpcSigner extends Signer implements TypedDataSigner {
2019-05-15 01:48:48 +03: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 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>;
2020-10-19 06:19:16 +03:00
_signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
2019-05-15 01:48:48 +03:00
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;
2021-04-18 05:41:09 +03:00
_eventLoopCache: Record<string, Promise<any>>;
2021-04-20 04:30:28 +03:00
get _cache(): Record<string, Promise<any>>;
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>;
2021-04-18 05:41:09 +03:00
_uncachedDetectNetwork(): 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;
}): {
2021-03-30 22:22:45 +03:00
[key: string]: string | AccessList;
2019-05-15 01:48:48 +03:00
};
}
export {};
//# sourceMappingURL=json-rpc-provider.d.ts.map