- Adding accounts to the wallet heierchy
- Generating addresses for a specific account in any Zone
- Signing and sending transactions for any address in the wallet
- Signing and verifying EIP1193 typed data for any address in the wallet.
- Serializing the wallet to JSON and deserializing it back to a wallet instance.
Example
Extends
AbstractHDWallet<NeuteredAddressInfo>
Constructors
new QuaiHDWallet()
Parameters
Returns
QuaiHDWallet
Overrides
AbstractHDWallet<NeuteredAddressInfo>.constructor
Source
wallet/quai-hdwallet.ts:69Methods
addAddress()
Parameters
Returns
NeuteredAddressInfo
The added address info.
Overrides
AbstractHDWallet.addAddress
Source
wallet/quai-hdwallet.ts:228connect()
Parameters
Returns
void
Inherited from
AbstractHDWallet.connect
Source
wallet/abstract-hdwallet.ts:240getAddressInfo()
Parameters
Returns
null | NeuteredAddressInfo
The address info or null if not found.
Overrides
AbstractHDWallet.getAddressInfo
Source
wallet/quai-hdwallet.ts:350getAddressesForAccount()
Parameters
Returns
NeuteredAddressInfo[]
The addresses for the account.
Overrides
AbstractHDWallet.getAddressesForAccount
Source
wallet/quai-hdwallet.ts:409getAddressesForZone()
Parameters
Returns
NeuteredAddressInfo[]
The addresses for the zone.
Overrides
AbstractHDWallet.getAddressesForZone
Source
wallet/quai-hdwallet.ts:397getNextAddress()
Parameters
Returns
Promise<NeuteredAddressInfo>
The next neutered address information.
Overrides
AbstractHDWallet.getNextAddress
Source
wallet/quai-hdwallet.ts:273getNextAddressSync()
Parameters
Returns
NeuteredAddressInfo
The next neutered address information.
Overrides
AbstractHDWallet.getNextAddressSync
Source
wallet/quai-hdwallet.ts:284getPrivateKey()
Parameters
Returns
string
The private key.
Overrides
AbstractHDWallet.getPrivateKey
Source
wallet/quai-hdwallet.ts:365sendTransaction()
Parameters
Returns
Promise<TransactionResponse>
A promise that resolves to the transaction response.
Throws
If the provider is not set.Source
wallet/quai-hdwallet.ts:103serialize()
Returns
SerializedQuaiHDWallet
An object representing the serialized state of the QuaiHDWallet, including
addresses and other inherited properties from the parent wallet.
Overrides
AbstractHDWallet.serialize
Example
Source
wallet/quai-hdwallet.ts:137signMessage()
Parameters
Returns
Promise<string>
A promise that resolves to the signed message.
Overrides
AbstractHDWallet.signMessage
Source
wallet/quai-hdwallet.ts:120signTransaction()
Parameters
Returns
Promise<string>
A promise that resolves to the signed transaction.
Overrides
AbstractHDWallet.signTransaction
Source
wallet/quai-hdwallet.ts:89signTypedData()
Parameters
Returns
Promise<string>
A promise that resolves to the signed data in string format.
Throws
If the address does not correspond to a valid HD node or if signing fails.Source
wallet/quai-hdwallet.ts:211xPub()
Returns
string
The extended public key.
Source
wallet/quai-hdwallet.ts:79createRandom()
Type parameters
Parameters
Returns
T
The created instance.
Inherited from
AbstractHDWallet.createRandom
Source
wallet/abstract-hdwallet.ts:195deserialize()
Parameters
Returns
Promise<QuaiHDWallet>
A promise that resolves to an instance of QuaiHDWallet.
Overrides
AbstractHDWallet.deserialize
Async
Throws
If validation of the serialized wallet data fails or if deserialization fails.Static
Source
wallet/quai-hdwallet.ts:181fromMnemonic()
Type parameters
Parameters
Returns
T
The created instance.
Inherited from
AbstractHDWallet.fromMnemonic
Source
wallet/abstract-hdwallet.ts:180fromPhrase()
Type parameters
Parameters
Returns
T
The created instance.
Inherited from
AbstractHDWallet.fromPhrase
