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

43 lines
1.9 KiB
TypeScript
Raw Normal View History

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";
import { Networkish } from "@ethersproject/networks";
import { ConnectionInfo } from "@ethersproject/web";
import { BaseProvider } from "./base-provider";
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>;
sendUncheckedTransaction(transaction: TransactionRequest): Promise<string>;
signTransaction(transaction: TransactionRequest): Promise<string>;
sendTransaction(transaction: TransactionRequest): Promise<TransactionResponse>;
signMessage(message: Bytes | string): Promise<string>;
unlock(password: string): Promise<boolean>;
}
declare class UncheckedJsonRpcSigner extends JsonRpcSigner {
sendTransaction(transaction: TransactionRequest): Promise<TransactionResponse>;
}
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);
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>;
2019-05-15 01:48:48 +03:00
perform(method: string, params: any): Promise<any>;
_startPending(): void;
_stopPending(): void;
static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: {
[key: string]: boolean;
}): {
[key: string]: string;
};
}
export {};