@fuel-ts/account v0.94.6 • Docs
Class: HDWallet
Constructors
new HDWallet()
new HDWallet(
config
):HDWallet
HDWallet is a implementation of the BIP-0044 and BIP-0032, Multi-Account Hierarchy for Deterministic Wallets
Parameters
• config: HDWalletConfig
Wallet configurations
Returns
Defined in
packages/account/src/hdwallet/hdwallet.ts:80
Properties
chainCode
chainCode:
BytesLike
Defined in
packages/account/src/hdwallet/hdwallet.ts:73
depth
depth:
number
=0
Defined in
packages/account/src/hdwallet/hdwallet.ts:67
fingerprint
fingerprint:
string
Defined in
packages/account/src/hdwallet/hdwallet.ts:69
index
index:
number
=0
Defined in
packages/account/src/hdwallet/hdwallet.ts:68
parentFingerprint
parentFingerprint:
string
Defined in
packages/account/src/hdwallet/hdwallet.ts:70
privateKey?
optional
privateKey:string
Defined in
packages/account/src/hdwallet/hdwallet.ts:71
publicKey
publicKey:
string
Defined in
packages/account/src/hdwallet/hdwallet.ts:72
Accessors
extendedKey
get
extendedKey():string
Returns
string
Defined in
packages/account/src/hdwallet/hdwallet.ts:104
Methods
deriveIndex()
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
Parameters
• index: number
Index of the child HDWallet.
Returns
A new instance of HDWallet on the derived index
Defined in
packages/account/src/hdwallet/hdwallet.ts:115
derivePath()
derivePath(
path
):HDWallet
Derive the current HDWallet instance to the path. Learn more
Parameters
• path: string
The string representation of the child HDWallet. Ex.: m/4./0
Returns
A new instance of HDWallet on the derived path
Defined in
packages/account/src/hdwallet/hdwallet.ts:174
toExtendedKey()
toExtendedKey(
isPublic
,testnet
):string
Get the extendKey as defined on BIP-32 from the provided seed
Parameters
• 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
).
Returns
string
BIP-32 extended private key
Defined in
packages/account/src/hdwallet/hdwallet.ts:187
fromExtendedKey()
static
fromExtendedKey(extendedKey
):HDWallet
Parameters
• extendedKey: string
Returns
Defined in
packages/account/src/hdwallet/hdwallet.ts:223
fromSeed()
static
fromSeed(seed
):HDWallet
Create HDWallet instance from seed
Parameters
• seed: string
Seed
Returns
A new instance of HDWallet
Defined in
packages/account/src/hdwallet/hdwallet.ts:214