Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HdPaths

Hierarchy

  • HdPaths

Index

Methods

Static bip44

  • bip44(coinType: number, account: number, change: number, address: number): keyof Slip10RawIndex[]
  • Only use this for the real BIP-0044 with

    • 5 component path (m / purpose' / coin_type' / account' / change / address_index)
    • no ed25519 support (due to the use of unhardened path components)

    Don't be misled by people calling their path BIP44 in cases where it is not.

    Parameters

    • coinType: number
    • account: number
    • change: number
    • address: number

    Returns keyof Slip10RawIndex[]

Static bip44Like

  • bip44Like(coinType: number, account: number): keyof Slip10RawIndex[]
  • BIP44-like HD paths for account based coins

    This is following Trezor's recommendation that

    If the coin is UTXO-based the path should have all five parts, precisely as defined in BIP-32. If it is account-based we follow Stellar's SEP-0005 - paths have only three parts 44'/c'/a'.

    Example paths to use this for

    m/44'/234'/a'   IOV
    m/44'/134'/a'   Lisk
    m/44'/1120'/a'  RISE
    m/44'/148'/a'   Stellar

    This is called "BIP44-like" because it follows the idea of BIP44 but is not compatible to the 5 component BIP44 standard.

    Parameters

    • coinType: number
    • account: number

    Returns keyof Slip10RawIndex[]

Static ethereum

  • ethereum(account: number): keyof Slip10RawIndex[]

Static iov

  • iov(account: number): keyof Slip10RawIndex[]
  • An IOV HD path in the form m/44'/234'/a'

    Parameters

    • account: number

      The account index a starting at 0

    Returns keyof Slip10RawIndex[]

Static iovFaucet

  • iovFaucet(coinType?: number, instanceIndex?: number, accountIndex?: number): keyof Slip10RawIndex[]
  • An IOV faucet HD path in the form m/1229936198'/coinType'/instanceIndex'/accountIndex'

    see

    https://github.com/iov-one/iov-faucet/tree/v0.8.1#faucet-hd-wallet

    Parameters

    • Default value coinType: number = HdPaths.coinTypes.testnet

      A SLIP-0044 coin. Defaults to 1 (i.e. "Testnet (all coins)") when unset.

    • Default value instanceIndex: number = 0

      0-based index of the faucet instance. Defaults to 0 when unset.

    • Default value accountIndex: number = 0

      0-based index of the account. Account 0 is the token holder and accounts >= 1 are the distributor accounts. Defaults to 0 when unset.

    Returns keyof Slip10RawIndex[]

Generated using TypeDoc