2021-06-24 02:13:06 -04:00
|
|
|
import { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider";
|
2020-10-18 23:19:16 -04:00
|
|
|
import { BigNumber, BigNumberish } from "@ethersproject/bignumber";
|
|
|
|
import { Bytes, BytesLike } from "@ethersproject/bytes";
|
2020-06-01 05:04:12 -04:00
|
|
|
import { Deferrable } from "@ethersproject/properties";
|
2020-10-18 23:19:16 -04:00
|
|
|
export interface TypedDataDomain {
|
|
|
|
name?: string;
|
|
|
|
version?: string;
|
|
|
|
chainId?: BigNumberish;
|
|
|
|
verifyingContract?: string;
|
|
|
|
salt?: BytesLike;
|
|
|
|
}
|
|
|
|
export interface TypedDataField {
|
|
|
|
name: string;
|
|
|
|
type: string;
|
|
|
|
}
|
2019-05-14 18:48:48 -04:00
|
|
|
export interface ExternallyOwnedAccount {
|
|
|
|
readonly address: string;
|
|
|
|
readonly privateKey: string;
|
|
|
|
}
|
2020-10-18 23:19:16 -04:00
|
|
|
export interface TypedDataSigner {
|
|
|
|
_signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
|
|
|
|
}
|
2019-05-14 18:48:48 -04:00
|
|
|
export declare abstract class Signer {
|
|
|
|
readonly provider?: Provider;
|
|
|
|
abstract getAddress(): Promise<string>;
|
|
|
|
abstract signMessage(message: Bytes | string): Promise<string>;
|
2020-06-01 05:04:12 -04:00
|
|
|
abstract signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
2019-05-14 18:48:48 -04:00
|
|
|
abstract connect(provider: Provider): Signer;
|
2019-06-11 17:57:04 -04:00
|
|
|
readonly _isSigner: boolean;
|
2019-05-14 18:48:48 -04:00
|
|
|
constructor();
|
|
|
|
getBalance(blockTag?: BlockTag): Promise<BigNumber>;
|
|
|
|
getTransactionCount(blockTag?: BlockTag): Promise<number>;
|
2020-06-01 05:04:12 -04:00
|
|
|
estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
|
|
call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag): Promise<string>;
|
|
|
|
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
|
2019-05-14 18:48:48 -04:00
|
|
|
getChainId(): Promise<number>;
|
|
|
|
getGasPrice(): Promise<BigNumber>;
|
2021-06-24 02:13:06 -04:00
|
|
|
getFeeData(): Promise<FeeData>;
|
2019-05-14 18:48:48 -04:00
|
|
|
resolveName(name: string): Promise<string>;
|
2020-06-01 05:04:12 -04:00
|
|
|
checkTransaction(transaction: Deferrable<TransactionRequest>): Deferrable<TransactionRequest>;
|
|
|
|
populateTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionRequest>;
|
2019-05-14 18:48:48 -04:00
|
|
|
_checkProvider(operation?: string): void;
|
2019-06-11 17:57:04 -04:00
|
|
|
static isSigner(value: any): value is Signer;
|
2019-05-14 18:48:48 -04:00
|
|
|
}
|
2020-10-18 23:19:16 -04:00
|
|
|
export declare class VoidSigner extends Signer implements TypedDataSigner {
|
2019-05-14 18:48:48 -04:00
|
|
|
readonly address: string;
|
|
|
|
constructor(address: string, provider?: Provider);
|
|
|
|
getAddress(): Promise<string>;
|
|
|
|
_fail(message: string, operation: string): Promise<any>;
|
|
|
|
signMessage(message: Bytes | string): Promise<string>;
|
2020-06-01 05:04:12 -04:00
|
|
|
signTransaction(transaction: Deferrable<TransactionRequest>): 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
|
|
|
connect(provider: Provider): VoidSigner;
|
|
|
|
}
|
2021-01-19 05:22:54 -05:00
|
|
|
//# sourceMappingURL=index.d.ts.map
|