Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HDWallet

An HDWallet inside Muta JS SDK. Nothing special like other HDWallets.

for more information see bip32, bip39 bip44

Here is an example

function example(){
   // use HDWallet to generate random mnemonic
   const mnemonic = Muta.hdWallet.generateMnemonic();

   // use the mnemonic to build an HDWallet
   const wallet = new Muta.hdWallet(mnemonic);

   // derive an account from the HDWallet
   const account = wallet.deriveAccount(1);
}

Hierarchy

  • HDWallet

Implements

Index

Constructors

constructor

  • new HDWallet(mnemonic: string): HDWallet

Properties

Private masterNode

masterNode: HDKey

Private mnemonic

mnemonic: string

Methods

deriveAccount

  • deriveAccount(accountIndex: number): Account

derivePrivateKey

  • derivePrivateKey(accountIndex: number): Buffer

Static generateMnemonic

  • generateMnemonic(): string

Static Private getHDPath

  • getHDPath(accountIndex: number): string

Generated using TypeDoc