Version: 0.14.0

Class: WalletFromEthers

"wallets/WalletFromEthers".WalletFromEthers

This is a wrapper class for ethers.Wallet. It allows us to customize some of the methods provided by ethers.Wallet. We also use this to add some conversion methods adapted to our internal types.

Hierarchy#

  • Wallet

    WalletFromEthers

Constructors#

constructor#

+ new WalletFromEthers(privateKey: string, mnemonic?: string): WalletFromEthers

Overrides void

Defined in src/wallets/WalletFromEthers.ts:46

Parameters:#

NameType
privateKeystring
mnemonic?string

Returns: WalletFromEthers

Properties#

address#

Readonly address: string

Inherited from WalletFromEthers.address

Defined in node_modules/ethers/wallet.d.ts:14


mnemonic#

Readonly mnemonic: string

Inherited from WalletFromEthers.mnemonic

Defined in node_modules/ethers/wallet.d.ts:15


path#

Readonly path: string

Inherited from WalletFromEthers.path

Defined in node_modules/ethers/wallet.d.ts:16


privateKey#

Readonly privateKey: string

Inherited from WalletFromEthers.privateKey

Defined in node_modules/ethers/wallet.d.ts:17


provider#

Readonly provider: Provider

Inherited from WalletFromEthers.provider

Overrides void

Defined in node_modules/ethers/wallet.d.ts:11

Methods#

connect#

connect(provider: Provider): Wallet

Inherited from WalletFromEthers.connect

Defined in node_modules/ethers/wallet.d.ts:21

Create a new instance of this Wallet connected to provider.

Parameters:#

NameType
providerProvider

Returns: Wallet


encrypt#

encrypt(password: Arrayish | string, options?: any, progressCallback?: ProgressCallback): Promise<string>

Inherited from WalletFromEthers.encrypt

Defined in node_modules/ethers/wallet.d.ts:28

Parameters:#

NameType
passwordArrayish | string
options?any
progressCallback?ProgressCallback

Returns: Promise<string>


getAddress#

getAddress(): Promise<string>

Inherited from WalletFromEthers.getAddress

Overrides void

Defined in node_modules/ethers/wallet.d.ts:22

Returns: Promise<string>


getBalance#

getBalance(blockTag?: BlockTag): Promise<BigNumber>

Inherited from WalletFromEthers.getBalance

Defined in node_modules/ethers/wallet.d.ts:25

Parameters:#

NameType
blockTag?BlockTag

Returns: Promise<BigNumber>


getTransactionCount#

getTransactionCount(blockTag?: BlockTag): Promise<number>

Inherited from WalletFromEthers.getTransactionCount

Defined in node_modules/ethers/wallet.d.ts:26

Parameters:#

NameType
blockTag?BlockTag

Returns: Promise<number>


sendTransaction#

sendTransaction(transaction: TransactionRequest): Promise<TransactionResponse>

Inherited from WalletFromEthers.sendTransaction

Overrides void

Defined in node_modules/ethers/wallet.d.ts:27

Parameters:#

NameType
transactionTransactionRequest

Returns: Promise<TransactionResponse>


sign#

sign(transaction: TransactionRequest): Promise<string>

Inherited from WalletFromEthers.sign

Defined in node_modules/ethers/wallet.d.ts:23

Parameters:#

NameType
transactionTransactionRequest

Returns: Promise<string>


signMessage#

signMessage(message: Arrayish | string): Promise<string>

Inherited from WalletFromEthers.signMessage

Overrides void

Defined in node_modules/ethers/wallet.d.ts:24

Parameters:#

NameType
messageArrayish | string

Returns: Promise<string>


toEthersWalletData#

toEthersWalletData(): EthersWalletData

Defined in src/wallets/WalletFromEthers.ts:57

Returns: EthersWalletData


toIdentityWalletData#

toIdentityWalletData(identityAddress: string): IdentityWalletData

Defined in src/wallets/WalletFromEthers.ts:71

Parameters:#

NameType
identityAddressstring

Returns: IdentityWalletData


createRandom#

StaticcreateRandom(): WalletFromEthers

Overrides void

Defined in src/wallets/WalletFromEthers.ts:25

Returns: WalletFromEthers


fromEncryptedJson#

StaticfromEncryptedJson(encryptedJson: string, password: string, progressCallback?: (progress: number) => any): Promise<WalletFromEthers>

Overrides void

Defined in src/wallets/WalletFromEthers.ts:30

Parameters:#

NameType
encryptedJsonstring
passwordstring
progressCallback?(progress: number) => any

Returns: Promise<WalletFromEthers>


fromMnemonic#

StaticfromMnemonic(mnemonic: string): WalletFromEthers

Overrides void

Defined in src/wallets/WalletFromEthers.ts:43

Parameters:#

NameType
mnemonicstring

Returns: WalletFromEthers


fromWalletData#

StaticfromWalletData(walletData: EthersWalletData | IdentityWalletData): WalletFromEthers

Defined in src/wallets/WalletFromEthers.ts:17

Parameters:#

NameType
walletDataEthersWalletData | IdentityWalletData

Returns: WalletFromEthers


isSigner#

StaticisSigner(value: any): value is Signer

Inherited from WalletFromEthers.isSigner

Defined in node_modules/ethers/abstract-signer.d.ts:10

Parameters:#

NameType
valueany

Returns: value is Signer