Version: 0.17.1

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

Implements#

  • ExternallyOwnedAccount
  • TypedDataSigner

Constructors#

constructor#

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

Overrides void

Defined in src/wallets/WalletFromEthers.ts:53

Parameters:#

NameType
privateKeystring
mnemonic?string

Returns: WalletFromEthers

Properties#

_isSigner#

Readonly _isSigner: boolean

Inherited from WalletFromEthers._isSigner

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:29


_mnemonic#

Readonly _mnemonic: () => Mnemonic

Inherited from WalletFromEthers._mnemonic

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:12


_signingKey#

Readonly _signingKey: () => SigningKey

Inherited from WalletFromEthers._signingKey

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:11


address#

Readonly address: string

Inherited from WalletFromEthers.address

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:9


provider#

Readonly provider: Provider

Inherited from WalletFromEthers.provider

Overrides void

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:10

Accessors#

mnemonic#

• get mnemonic(): Mnemonic

Inherited from WalletFromEthers.mnemonic

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:14

Returns: Mnemonic


privateKey#

• get privateKey(): string

Inherited from WalletFromEthers.privateKey

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:15

Returns: string


publicKey#

• get publicKey(): string

Inherited from WalletFromEthers.publicKey

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:16

Returns: string

Methods#

_checkProvider#

_checkProvider(operation?: string): void

Inherited from WalletFromEthers._checkProvider

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:42

Parameters:#

NameType
operation?string

Returns: void


_signTypedData#

_signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>

Inherited from WalletFromEthers._signTypedData

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:21

Parameters:#

NameType
domainTypedDataDomain
typesRecord<string, Array<TypedDataField>>
valueRecord<string, any>

Returns: Promise<string>


call#

call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag): Promise<string>

Inherited from WalletFromEthers.call

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:34

Parameters:#

NameType
transactionDeferrable<TransactionRequest>
blockTag?BlockTag

Returns: Promise<string>


checkTransaction#

checkTransaction(transaction: Deferrable<TransactionRequest>): Deferrable<TransactionRequest>

Inherited from WalletFromEthers.checkTransaction

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:40

Parameters:#

NameType
transactionDeferrable<TransactionRequest>

Returns: Deferrable<TransactionRequest>


connect#

connect(provider: Provider): Wallet

Inherited from WalletFromEthers.connect

Overrides void

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:18

Parameters:#

NameType
providerProvider

Returns: Wallet


encrypt#

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

Inherited from WalletFromEthers.encrypt

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:22

Parameters:#

NameType
passwordBytes | string
options?any
progressCallback?ProgressCallback

Returns: Promise<string>


estimateGas#

estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>

Inherited from WalletFromEthers.estimateGas

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:33

Parameters:#

NameType
transactionDeferrable<TransactionRequest>

Returns: Promise<BigNumber>


getAddress#

getAddress(): Promise<string>

Inherited from WalletFromEthers.getAddress

Overrides void

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:17

Returns: Promise<string>


getBalance#

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

Inherited from WalletFromEthers.getBalance

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:31

Parameters:#

NameType
blockTag?BlockTag

Returns: Promise<BigNumber>


getChainId#

getChainId(): Promise<number>

Inherited from WalletFromEthers.getChainId

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:36

Returns: Promise<number>


getFeeData#

getFeeData(): Promise<FeeData>

Inherited from WalletFromEthers.getFeeData

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:38

Returns: Promise<FeeData>


getGasPrice#

getGasPrice(): Promise<BigNumber>

Inherited from WalletFromEthers.getGasPrice

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:37

Returns: Promise<BigNumber>


getTransactionCount#

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

Inherited from WalletFromEthers.getTransactionCount

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:32

Parameters:#

NameType
blockTag?BlockTag

Returns: Promise<number>


populateTransaction#

populateTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionRequest>

Inherited from WalletFromEthers.populateTransaction

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:41

Parameters:#

NameType
transactionDeferrable<TransactionRequest>

Returns: Promise<TransactionRequest>


resolveName#

resolveName(name: string): Promise<string>

Inherited from WalletFromEthers.resolveName

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:39

Parameters:#

NameType
namestring

Returns: Promise<string>


sendTransaction#

sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>

Inherited from WalletFromEthers.sendTransaction

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:35

Parameters:#

NameType
transactionDeferrable<TransactionRequest>

Returns: Promise<TransactionResponse>


signMessage#

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

Inherited from WalletFromEthers.signMessage

Overrides void

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:20

Parameters:#

NameType
messageBytes | string

Returns: Promise<string>


signTransaction#

signTransaction(transaction: TransactionRequest): Promise<string>

Inherited from WalletFromEthers.signTransaction

Overrides void

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:19

Parameters:#

NameType
transactionTransactionRequest

Returns: Promise<string>


toEthersWalletData#

toEthersWalletData(): EthersWalletData

Defined in src/wallets/WalletFromEthers.ts:75

Returns: EthersWalletData


toIdentityWalletData#

toIdentityWalletData(identityAddress: string): IdentityWalletData

Defined in src/wallets/WalletFromEthers.ts:89

Parameters:#

NameType
identityAddressstring

Returns: IdentityWalletData


toSafeWalletData#

toSafeWalletData(safeAddress: string): any

Defined in src/wallets/WalletFromEthers.ts:103

Parameters:#

NameType
safeAddressstring

Returns: any


createRandom#

StaticcreateRandom(): WalletFromEthers

Overrides void

Defined in src/wallets/WalletFromEthers.ts:32

Returns: WalletFromEthers


fromEncryptedJson#

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

Overrides void

Defined in src/wallets/WalletFromEthers.ts:37

Parameters:#

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

Returns: Promise<WalletFromEthers>


fromEncryptedJsonSync#

StaticfromEncryptedJsonSync(json: string, password: Bytes | string): Wallet

Inherited from WalletFromEthers.fromEncryptedJsonSync

Defined in node_modules/@ethersproject/wallet/lib/index.d.ts:28

Parameters:#

NameType
jsonstring
passwordBytes | string

Returns: Wallet


fromMnemonic#

StaticfromMnemonic(mnemonic: string): WalletFromEthers

Overrides void

Defined in src/wallets/WalletFromEthers.ts:50

Parameters:#

NameType
mnemonicstring

Returns: WalletFromEthers


fromWalletData#

StaticfromWalletData(walletData: EthersWalletData | IdentityWalletData | SafeWalletData): WalletFromEthers

Defined in src/wallets/WalletFromEthers.ts:24

Parameters:#

NameType
walletDataEthersWalletData | IdentityWalletData | SafeWalletData

Returns: WalletFromEthers


isSigner#

StaticisSigner(value: any): value is Signer

Inherited from WalletFromEthers.isSigner

Defined in node_modules/@ethersproject/abstract-signer/lib/index.d.ts:43

Parameters:#

NameType
valueany

Returns: value is Signer