Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NodeEd25519 describes a hierarchical-deterministic BIP32 node implementation, compatible with ed25519 EC-curve.

It is an implementation of BIP32 that is adapted to work with ED25519 ellyptic curve keys rather than secp256k1 keys.

This class uses features provided by the bitcoinjs/bip32 package and therefor is licensed under the BSD-2 Clause License as mentioned here.

see

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

see

https://github.com/satoshilabs/slips/blob/master/slip-0010.md

see

https://github.com/bitcoinjs/bip32

see

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

since

0.2.0

Hierarchy

Implements

Index

Constructors

constructor

  • new NodeEd25519(__D: Buffer | undefined, __Q: Buffer | undefined, chainCode: Buffer, network: Network, __DEPTH?: number, __INDEX?: number, __PARENT_FINGERPRINT?: number): NodeEd25519
  • Construct a NodeEd25519 object.

    Parameters

    • __D: Buffer | undefined
    • __Q: Buffer | undefined
    • chainCode: Buffer

      The chain code of the node (32 bytes).

    • network: Network

      The network of the node

    • Default value __DEPTH: number = 0
    • Default value __INDEX: number = 0
    • Default value __PARENT_FINGERPRINT: number = 0

    Returns NodeEd25519

Properties

chainCode

chainCode: Buffer

The chain code of the node (32 bytes).

network

network: Network

The network of the node

Static HIGHEST_BIT

HIGHEST_BIT: 2147483648 = 2147483648

Hardened key derivation uses HIGHEST_BIT.

var

number

Accessors

fingerprint

  • get fingerprint(): Buffer

identifier

  • get identifier(): Buffer

privateKey

  • get privateKey(): Buffer

publicKey

  • get publicKey(): Buffer

Methods

derive

deriveHardened

derivePath

getD

  • getD(): Buffer | undefined

getDepth

  • getDepth(): number

getIndex

  • getIndex(): number

getParentFingerprint

  • getParentFingerprint(): number

getQ

  • getQ(): Buffer | undefined

isNeutered

  • isNeutered(): boolean

Protected isValidPath

  • isValidPath(path: string): boolean

neutered

sign

  • sign(hash: Buffer): Buffer

toBase58

  • toBase58(): string

toWIF

  • toWIF(): string

verify

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

Static fromBase58

Static fromSeed

  • Create a hierarchical-deterministic ED25519 node from a binary seed.

    Depending on the curve algorithm, the seed is prepended with one of:

    • ed25519 seed for ed25519[-sha512] implementation (Network.SYMBOL)
    • Bitcoin seed for ed25519[-sha512] implementation (Network.ETHEREUM)
    • Bitcoin seed for secp256k1 implementation (Network.BITCOIN)
    see

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

    Parameters

    • seed: Buffer

      The binary seed (64 bytes).

    • network: Network

      One of BITCOIN, SYMBOL or ETHEREUM.

    • Default value macType: MACType = MACType.HMAC

      (Optional) defaults to MACType.HMAC.

    Returns NodeEd25519

Generated using TypeDoc