Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • HDNode

Index

Constructors

constructor

  • new HDNode(depth: number, index: number, chainCode: Uint8Array, publicKey: Uint8Array, privateKey?: Uint8Array, parentFingerprint?: number): HDNode
  • Parameters

    • depth: number
    • index: number
    • chainCode: Uint8Array
    • publicKey: Uint8Array
    • Optional privateKey: Uint8Array
    • parentFingerprint: number = 0

    Returns HDNode

Properties

Readonly chainCode

chainCode: Uint8Array

Readonly depth

depth: number

Readonly fingerprint

fingerprint: number

Readonly index

index: number

Readonly parentFingerprint

parentFingerprint: number = 0

Optional Readonly privateKey

privateKey: Uint8Array

Readonly publicKey

publicKey: Uint8Array

Accessors

address

  • get address(): string

extendedPrivateKey

  • get extendedPrivateKey(): string
  • Extended private key serialised as base58 string.

    Returns string

extendedPublicKey

  • get extendedPublicKey(): string
  • Extended public key serialised as base58 string.

    Returns string

Methods

derive

  • derive(path: string): HDNode
  • Derive a child key from this node. If the path is 'm' or 'M", the same HDNode is returned.

    Parameters

    • path: string

    Returns HDNode

Private deriveChild

  • deriveChild(index: number): HDNode

Private getChildData

  • getChildData(index: number): Uint8Array
  • Get child data used for derivation of child keys.

    Parameters

    • index: number

    Returns Uint8Array

Private serialise

  • serialise(version: number, key: Uint8Array): string
  • Serialise the node as base58 string.

    Parameters

    • version: number
    • key: Uint8Array

    Returns string

Static fromExtendedKey

  • fromExtendedKey(extendedKey: string): HDNode
  • Get an instance of HDNode from an extended public or private key.

    Parameters

    • extendedKey: string

    Returns HDNode

Static fromMnemonicPhrase

  • fromMnemonicPhrase(mnemonicPhrase: string, passphrase?: string): HDNode
  • Get an instance of HDNode from a mnemonic phrase.

    Parameters

    • mnemonicPhrase: string
    • Optional passphrase: string

    Returns HDNode

Static fromParentChildKey

Static fromSeed

  • fromSeed(seed: string | ArrayBufferLike): HDNode
  • Get an instance of HDNode from an arbitrary seed.

    Parameters

    • seed: string | ArrayBufferLike

    Returns HDNode

Generated using TypeDoc