Construct a NodeEd25519
object.
The chain code of the node (32 bytes).
The network of the node
Getter for the depth
of the key.
Getter for the fingerprint
of the key.
The fingerprint are the first 4 bytes of the identifier of the key.
Getter for the identifier
of the key.
The identifier is build as follows:
Getter for the index
(account index) of the key.
Getter for the parentFingerprint
parent fingerprint of the key.
Getter for the privateKey
of the key.
Getter for the publicKey
of the key.
In case the publicKey is not set, this method should derive from private key.
Derive a child node with index
.
When the node is not neutered, an extended private key will be created and when the node is neutered, an extended public key will be created.
This method is an overload of the bitcoinjs/bip32
package's derive
method adapted to use our child
key derivation functions CKDPriv
and CKDPub
.
Hardened child derivation (derives private key).
Generic child derivation.
This method reads the derivation paths and uses derive
and deriveHardened
accordingly.
Derivation paths starting with m/
are only possible
with master nodes (for example created from seed).
Getter for private field __D
.
This method is added to explicitely expose the
__D
field to allow sub-classes to make
use of it.
The __D
field represents the private key.
Getter for private field depth
.
This method is added to explicitely expose the
depth
field to allow sub-classes to make
use of it.
Getter for private field index
.
This method is added to explicitely expose the
index
field to allow sub-classes to make
use of it.
Getter for private field parentFingerprint
.
This method is added to explicitely expose the
parentFingerprint
field to allow sub-classes to make
use of it.
Getter for private field __Q
.
This method is added to explicitely expose the
__Q
field to allow sub-classes to make
use of it.
The __Q
field represents the public key.
Return whether the node is neutered or not.
Neutered keys = Extended Public Keys Non-Neutered keys = Extended Private Keys
Get the neutered node.
Sign binary data with current node.
Overloads the bitcoinjs/bip32
method named sign
in order to
be ED25519 compliant and use tweetnacl
with ed25519 instead
of secp256k1.
The binary data to sign.
Get the Base58 representation of said key.
This method is modified to use the Network
class to
determine privateKey and publicKey prefixes (version field).
The Base58 representation is laid on 78 bytes with following
specification (with ||
concatenation operator) :
version || depth || parent || index || chain code || priv/pub
Private keys are prepended with 0x00
, public keys are encoded
in X9.62 format.
Verify a signature signature
for data
hash
with the current node.
Overloads the bitcoinjs/bip32
method named verify
in order to
be ED25519 compliant and use tweetnacl
with ed25519 instead
of secp256k1.
The binary data that was supposedly signed.
The signature binary data that needs to be verified.
Returns true for a valid signature, false otherwise.
Generated using TypeDoc
Class
DeterministicKey
describes hierarchical deterministic keys that are compatible with thebitcoinjs/bip32
implementation.This class is used to provide with compatibility for both schemes: BIP32 and NIP6.
https://github.com/nemtech/NIP/issues/12
0.2.0