@fuel-ts/account .HDWallet
• new HDWallet(config
): HDWallet
HDWallet is a implementation of the BIP-0044 and BIP-0032, Multi-Account Hierarchy for Deterministic Wallets
Name | Type | Description |
---|---|---|
config | HDWalletConfig | Wallet configurations |
packages/account/src/hdwallet/hdwallet.ts:80
• chainCode: BytesLike
packages/account/src/hdwallet/hdwallet.ts:73
• depth: number
= 0
packages/account/src/hdwallet/hdwallet.ts:67
• fingerprint: string
packages/account/src/hdwallet/hdwallet.ts:69
• index: number
= 0
packages/account/src/hdwallet/hdwallet.ts:68
• parentFingerprint: string
packages/account/src/hdwallet/hdwallet.ts:70
• Optional
privateKey: string
packages/account/src/hdwallet/hdwallet.ts:71
• publicKey: string
packages/account/src/hdwallet/hdwallet.ts:72
• get
extendedKey(): string
string
packages/account/src/hdwallet/hdwallet.ts:104
▸ deriveIndex(index
): HDWallet
Derive the current HDWallet instance navigating only on the index.
Ex.: m/44'/0 -> Ex.: m/44'/1 -> m/44'/2
. Learn more
Name | Type | Description |
---|---|---|
index | number | Index of the child HDWallet. |
A new instance of HDWallet on the derived index
packages/account/src/hdwallet/hdwallet.ts:115
▸ derivePath(path
): HDWallet
Derive the current HDWallet instance to the path. Learn more
Name | Type | Description |
---|---|---|
path | string | The string representation of the child HDWallet. Ex.: m/44'/0'/0'/0/0 |
A new instance of HDWallet on the derived path
packages/account/src/hdwallet/hdwallet.ts:174
▸ toExtendedKey(isPublic?
, testnet?
): string
Get the extendKey as defined on BIP-32 from the provided seed
Name | Type | Default value | Description |
---|---|---|---|
isPublic | boolean | false | enable to export public extendedKey, it not required when HDWallet didn't have the privateKey. |
testnet | boolean | false | Inform if should use testnet or mainnet prefix, default value is true (mainnet ). |
string
BIP-32 extended private key
packages/account/src/hdwallet/hdwallet.ts:187
▸ fromExtendedKey(extendedKey
): HDWallet
Name | Type |
---|---|
extendedKey | string |
packages/account/src/hdwallet/hdwallet.ts:223
▸ fromSeed(seed
): HDWallet
Create HDWallet instance from seed
Name | Type | Description |
---|---|---|
seed | string | Seed |
A new instance of HDWallet