Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Network describes an extended key prefix of 4 bytes. This object is defined by public and private fields containing the unsigned integer value of the prefix.

For the BITCOIN protocol, the prefixes result to xprv and xpub for the mainnet network.

For the CATAPULT protocol, we will be using the same prefixes and extended key sizes and formats.

see

https://github.com/bitcoinjs/bip32/blob/master/src/bip32.js#L19

see

https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki

see

https://github.com/bitcoinjs/bip32

see

https://github.com/nemtech/NIP/issues/12

since

0.1.0

Hierarchy

  • Network

Index

Constructors

constructor

  • Construct an Network object out of its' base58 payload.

    Result in Base58 notation to xpub and xprv.

    Parameters

    • publicKeyPrefix: number
    • privateKeyPrefix: number
    • curve: CurveAlgorithm = CurveAlgorithm.secp256k1

    Returns Network

Properties

Readonly curve

curve: CurveAlgorithm = CurveAlgorithm.secp256k1

Readonly privateKeyPrefix

privateKeyPrefix: number

Readonly publicKeyPrefix

publicKeyPrefix: number

Static Readonly BITCOIN

BITCOIN: Network = ...

BITCOIN protocol extended key prefixes

Result in Base58 notation to xpub and xprv.

see

https://github.com/bitcoinjs/bip32/blob/master/src/bip32.js#L19

var

{Network}

Static Readonly SYMBOL

SYMBOL: Network = ...

SYMBOL public network protocol extended key prefixes

Result in Base58 notation to xpub and xprv.

var

{Network}

Methods

equals

  • Checks whether current network instance is identical to given b network instance.

    Parameters

    • b: Network

      The network object to compare against

    Returns boolean

    Returns whether the two objects are identical

Generated using TypeDoc