Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BIP32

BIP32 represents a BIP32-compatible hierarchical deterministic wallet (or 'HD Wallet').

BIP32 wallets are crypto-wallets which can be shared partially or entirely with different systems, each with or without the ability to access coins/data. This implementation is based on a derivation (and extraction for modularity) of the HDWallet/HDNode written and tested by bitcoinjs-lib contributors since 2014.

Copyright (c) 2011-2018 bitcoinjs-lib contributors

constructor
param

The account's private key

param

The account's public key

param

The chain code

Hierarchy

  • BIP32

Index

Constructors

constructor

  • new BIP32(privateKey: Buffer, chainCode: Buffer): BIP32
  • Parameters

    • privateKey: Buffer
    • chainCode: Buffer

    Returns BIP32

Properties

Q

Q: Buffer

chainCode

chainCode: Buffer

d

d: Buffer

depth

depth: number

index

index: number

parentFingerprint

parentFingerprint: number

Accessors

fingerprint

  • get fingerprint(): Buffer

identifier

  • get identifier(): Buffer

privateKey

  • get privateKey(): Buffer

publicKey

  • get publicKey(): Buffer

Methods

derive

  • derive(index: number): BIP32

deriveHardened

  • deriveHardened(index: number): BIP32

derivePath

  • derivePath(path: string): BIP32

sign

  • sign(hash: Buffer): Buffer
  • Parameters

    • hash: Buffer

    Returns Buffer

verify

  • verify(hash: Buffer, signature: Buffer): boolean
  • Parameters

    • hash: Buffer
    • signature: Buffer

    Returns boolean

Static fromPrivateKey

  • fromPrivateKey(privateKey: Buffer, chainCode: Buffer): BIP32
  • Parameters

    • privateKey: Buffer
    • chainCode: Buffer

    Returns BIP32

Static fromSeed

  • fromSeed(seed: string): BIP32