Icon HelpCircleForumIcon Link

⌘K

Icon HelpCircleForumIcon Link

@fuel-ts/account v0.95.0 Docs


Icon LinkClass: HDWallet

Icon LinkConstructors

Icon Linknew HDWallet()

Icon InfoCircle

new HDWallet(config): HDWallet

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

Icon LinkParameters

config: HDWalletConfig

Wallet configurations

Icon LinkReturns

HDWallet

Icon LinkDefined in

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

Icon LinkProperties

Icon LinkchainCode

Icon InfoCircle

chainCode: BytesLike

Icon LinkDefined in

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


Icon Linkdepth

Icon InfoCircle

depth: number = 0

Icon LinkDefined in

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


Icon Linkfingerprint

Icon InfoCircle

fingerprint: string

Icon LinkDefined in

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


Icon Linkindex

Icon InfoCircle

index: number = 0

Icon LinkDefined in

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


Icon LinkparentFingerprint

Icon InfoCircle

parentFingerprint: string

Icon LinkDefined in

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


Icon LinkprivateKey?

Icon InfoCircle

optional privateKey: string

Icon LinkDefined in

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


Icon LinkpublicKey

Icon InfoCircle

publicKey: string

Icon LinkDefined in

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

Icon LinkAccessors

Icon LinkextendedKey

Icon InfoCircle

get extendedKey(): string

Icon LinkReturns

string

Icon LinkDefined in

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

Icon LinkMethods

Icon LinkderiveIndex()

Icon InfoCircle

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

index: number

Index 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()

Icon InfoCircle

derivePath(path): HDWallet

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

Icon LinkParameters

path: string

The string representation of the child HDWallet. Ex.: m/4./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()

Icon InfoCircle

toExtendedKey(isPublic, testnet): string

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

Icon LinkParameters

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).

Icon LinkReturns

string

BIP-32 extended private key

Icon LinkDefined in

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


Icon LinkfromExtendedKey()

Icon InfoCircle

static fromExtendedKey(extendedKey): HDWallet

Icon LinkParameters

extendedKey: string

Icon LinkReturns

HDWallet

Icon LinkDefined in

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


Icon LinkfromSeed()

Icon InfoCircle

static fromSeed(seed): HDWallet

Create HDWallet instance from seed

Icon LinkParameters

seed: string

Seed

Icon LinkReturns

HDWallet

A new instance of HDWallet

Icon LinkDefined in

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