2019-05-15 01:48:48 +03:00
|
|
|
import { Provider, TransactionRequest } from "@ethersproject/abstract-provider";
|
2020-10-19 06:19:16 +03:00
|
|
|
import { ExternallyOwnedAccount, Signer, TypedDataDomain, TypedDataField, TypedDataSigner } from "@ethersproject/abstract-signer";
|
2019-05-15 01:48:48 +03:00
|
|
|
import { Bytes, BytesLike, SignatureLike } from "@ethersproject/bytes";
|
2020-01-19 05:48:12 +03:00
|
|
|
import { Mnemonic } from "@ethersproject/hdnode";
|
2019-05-15 01:48:48 +03:00
|
|
|
import { SigningKey } from "@ethersproject/signing-key";
|
|
|
|
import { ProgressCallback } from "@ethersproject/json-wallets";
|
2019-08-25 23:20:34 +03:00
|
|
|
import { Wordlist } from "@ethersproject/wordlists";
|
2020-10-19 06:19:16 +03:00
|
|
|
export declare class Wallet extends Signer implements ExternallyOwnedAccount, TypedDataSigner {
|
2019-05-15 01:48:48 +03:00
|
|
|
readonly address: string;
|
|
|
|
readonly provider: Provider;
|
|
|
|
readonly _signingKey: () => SigningKey;
|
2020-01-19 05:48:12 +03:00
|
|
|
readonly _mnemonic: () => Mnemonic;
|
2019-05-15 01:48:48 +03:00
|
|
|
constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, provider?: Provider);
|
2020-03-22 21:57:17 +03:00
|
|
|
get mnemonic(): Mnemonic;
|
|
|
|
get privateKey(): string;
|
|
|
|
get publicKey(): string;
|
2019-05-15 01:48:48 +03:00
|
|
|
getAddress(): Promise<string>;
|
|
|
|
connect(provider: Provider): Wallet;
|
|
|
|
signTransaction(transaction: TransactionRequest): Promise<string>;
|
|
|
|
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
|
|
|
encrypt(password: Bytes | string, options?: any, progressCallback?: ProgressCallback): Promise<string>;
|
|
|
|
/**
|
|
|
|
* Static methods to create Wallet instances.
|
|
|
|
*/
|
|
|
|
static createRandom(options?: any): Wallet;
|
|
|
|
static fromEncryptedJson(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise<Wallet>;
|
2020-02-27 22:58:05 +03:00
|
|
|
static fromEncryptedJsonSync(json: string, password: Bytes | string): Wallet;
|
2019-05-15 01:48:48 +03:00
|
|
|
static fromMnemonic(mnemonic: string, path?: string, wordlist?: Wordlist): Wallet;
|
|
|
|
}
|
|
|
|
export declare function verifyMessage(message: Bytes | string, signature: SignatureLike): string;
|
2020-10-23 03:01:18 +03:00
|
|
|
export declare function verifyTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>, signature: SignatureLike): string;
|
2021-01-19 13:22:54 +03:00
|
|
|
//# sourceMappingURL=index.d.ts.map
|