Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BIP44

This BIP defines a logical hierarchy for deterministic wallets.

Hierarchy

  • BIP44

Index

Constructors

Properties

Methods

Constructors

constructor

  • new BIP44(purpose: number, coinType: number, change?: number): BIP44
  • Parameters

    • purpose: number
    • coinType: number
    • Default value change: number = 0

    Returns BIP44

Properties

change

change: number

Constant 0 is used for external chain and constant 1 for internal chain (also known as change addresses). External chain is used for addresses that are meant to be visible outside of the wallet (e.g. for receiving payments). Internal chain is used for addresses which are not meant to be visible outside of the wallet and is used for return transaction change.

coinType

coinType: number

One master node (seed) can be used for unlimited number of independent cryptocoins such as Bitcoin, Litecoin or Namecoin. However, sharing the same space for various cryptocoins has some disadvantages. This level creates a separate subtree for every cryptocoin, avoiding reusing addresses across cryptocoins and improving privacy issues. Coin type is a constant, set for each cryptocoin. Cryptocoin developers may ask for registering unused number for their project. The list of already allocated coin types is in the chapter "Registered coin types" below. Hardened derivation is used at this level.

purpose

purpose: number

Purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation. It indicates that the subtree of this node is used according to this specification. Hardened derivation is used at this level.

Methods

path

  • path(account: number, index: number): number[]
  • Return path

    Parameters

    • account: number

      Accounts are numbered from index 0 in sequentially increasing manner. This number is used as child index in BIP32 derivation. Public derivation is used at this level.

    • index: number

      Addresses are numbered from index 0 in sequentially increasing manner. This number is used as child index in BIP32 derivation. Public derivation is used at this level.

    Returns number[]

pathString

  • pathString(account: number, index: number): string
  • Parameters

    • account: number
    • index: number

    Returns string

withChange

  • withChange(change: number): BIP44

Generated using TypeDoc