@fuel-ts/account v0.94.2 • Docs
new HDWallet(
config
):HDWallet
HDWallet is a implementation of the BIP-0044 and BIP-0032, Multi-Account Hierarchy for Deterministic Wallets
• 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
• 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
• path: string
The string representation of the child HDWallet. Ex.: m/4./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
• 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
static
fromExtendedKey(extendedKey
):HDWallet
• extendedKey: string
packages/account/src/hdwallet/hdwallet.ts:223
static
fromSeed(seed
):HDWallet
Create HDWallet instance from seed
• seed: string
Seed
A new instance of HDWallet