Icon HelpCircleForumIcon Link

⌘K

Icon HelpCircleForumIcon Link

Icon LinkClass: HDWallet

@fuel-ts/account .HDWallet

Icon LinkConstructors

Icon Linkconstructor

new HDWallet(config): HDWallet

HDWallet is a implementation of the BIP-0044 and BIP-0032, Multi-Account Hierarchy for Deterministic Wallets

Icon LinkParameters

NameTypeDescription
configHDWalletConfigWallet configurations

Icon LinkReturns

HDWallet

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:80 Icon Link

Icon LinkProperties

Icon LinkchainCode

chainCode: BytesLike

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:73 Icon Link


Icon Linkdepth

depth: number = 0

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:67 Icon Link


Icon Linkfingerprint

fingerprint: string

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:69 Icon Link


Icon Linkindex

index: number = 0

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:68 Icon Link


Icon LinkparentFingerprint

parentFingerprint: string

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:70 Icon Link


Icon LinkprivateKey

Optional privateKey: string

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:71 Icon Link


Icon LinkpublicKey

publicKey: string

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:72 Icon Link

Icon LinkAccessors

Icon LinkextendedKey

get extendedKey(): string

Icon LinkReturns

string

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:104 Icon Link

Icon LinkMethods

Icon LinkderiveIndex

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 Icon Link

Icon LinkParameters

NameTypeDescription
indexnumberIndex of the child HDWallet.

Icon LinkReturns

HDWallet

A new instance of HDWallet on the derived index

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:115 Icon Link


Icon LinkderivePath

derivePath(path): HDWallet

Derive the current HDWallet instance to the path. Learn more Icon Link

Icon LinkParameters

NameTypeDescription
pathstringThe string representation of the child HDWallet. Ex.: m/44'/0'/0'/0/0

Icon LinkReturns

HDWallet

A new instance of HDWallet on the derived path

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:174 Icon Link


Icon LinktoExtendedKey

toExtendedKey(isPublic?, testnet?): string

Get the extendKey as defined on BIP-32 from the provided seed

Icon LinkParameters

NameTypeDefault valueDescription
isPublicbooleanfalseenable to export public extendedKey, it not required when HDWallet didn't have the privateKey.
testnetbooleanfalseInform if should use testnet or mainnet prefix, default value is true (mainnet).

Icon LinkReturns

string

BIP-32 extended private key

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:187 Icon Link


Icon LinkfromExtendedKey

fromExtendedKey(extendedKey): HDWallet

Icon LinkParameters

NameType
extendedKeystring

Icon LinkReturns

HDWallet

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:223 Icon Link


Icon LinkfromSeed

fromSeed(seed): HDWallet

Create HDWallet instance from seed

Icon LinkParameters

NameTypeDescription
seedstringSeed

Icon LinkReturns

HDWallet

A new instance of HDWallet

Icon LinkDefined in

packages/account/src/hdwallet/hdwallet.ts:214 Icon Link