Icon HelpCircleForumIcon Link

⌘K

Icon HelpCircleForumIcon Link

Icon LinkClass: 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

Icon LinkDefined in

Icon LinkProperties

Icon LinkchainCode

chainCode: BytesLike

Icon LinkDefined in


Icon Linkdepth

depth: number = 0

Icon LinkDefined in


Icon Linkfingerprint

fingerprint: string

Icon LinkDefined in


Icon Linkindex

index: number = 0

Icon LinkDefined in


Icon LinkparentFingerprint

parentFingerprint: string

Icon LinkDefined in


Icon LinkprivateKey

Optional privateKey: string

Icon LinkDefined in


Icon LinkpublicKey

publicKey: string

Icon LinkDefined in

Icon LinkAccessors

Icon LinkextendedKey

get extendedKey(): string

Icon LinkReturns

string

Icon LinkDefined in

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

A new instance of HDWallet on the derived index

Icon LinkDefined in


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

A new instance of HDWallet on the derived path

Icon LinkDefined in


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


Icon LinkfromExtendedKey

fromExtendedKey(extendedKey): HDWallet

Icon LinkParameters

NameType
extendedKeystring

Icon LinkReturns

Icon LinkDefined in


Icon LinkfromSeed

fromSeed(seed): HDWallet
Create HDWallet instance from seed

Icon LinkParameters

NameTypeDescription
seedstringSeed

Icon LinkReturns

A new instance of HDWallet

Icon LinkDefined in