Returns if the underlying cryptographic library is of the Node.js C++ Addon type
Returns the underlying cryptographic library name
Returns the underlying cryptographic library type
Static
external_Static
is_Returns if the underlying cryptographic library is of the Node.js C++ Addon type
Static
library_Returns the underlying cryptographic library name
Static
library_Returns the underlying cryptographic library type
Decrypts the data from the provided hexidecimal encoded encrypted string using the supplied password
Optional
iterations: numberEncrypts the provides string using the supplied password into a hexadecimal encoded string
Optional
iterations: numberHashes the input data using Argon2d and returns the resulting hash value
Hashes the input data using Argon2i and returns the resulting hash value
Hashes the input data using Argon2id and returns the resulting hash value
Decodes a Base58 encoded string
Decodes a Base58 encoded string after verifying the checksum value included
Encodes the value specified into Base58
Encodes the value specified into Base58 and appends a checksum to the result
Hashes the input data using Blake2b and returns the resulting hash value
Calculates the exponent of 2^e that matches the target value
Checks a borromean ring signature to verify that it was created by one of the candidate public keys
Checks that a Bulletproof proof is valid
Checks that a Bulletproof+ proof is valid
Checks a CLSAG ring signature to verify that it was created by one of the candidate public keys.
Optional
commitments: string[]Verifies that the sum of output pedersen commitments plus a pedersen commitment of the transaction fee are equal to the sum of pseudo pedersen commitments
Verifies the proof provides using the public ephemerals by decoding the Base58 proof, extracting the key images, the signatures, and then verifying if those signatures are all valid, in which case, the key images are returned
Checks if the value provided is a valid ED25519 point
Checks an ED25519 RFC8032 signature to verify that it was created with the secret key of the public key specified
Checks if the value provided is a valid ED25519 scalar
Checks a simple ED25519 signature to verify that it was created with the secret key of the public key specified
Checks a Triptych ring signature to verify that it was created by one of the candidate public keys.
Decodes a CryptoNote Base58 string
Decodes a CryptoNote Base58 encoded string after verifying the checkvalue value included
Encodes the specified value into CryptoNote Base58
Encodes the value specified into CryptoNote Base58 and appends a checksum to the result
Completes a previously prepared borromean ring signature
Completes a previously prepared CLSAG ring signature
Completes a previously prepared signature
Completes a previously prepared Triptych ring signature
Derives a public ephemeral from a derivation scalar and a public key
Note: P = [(Ds * G) + B] mod l
Derives a secret ephemeral from a derivation scalar and a secret key
Note: p = (Ds + b) mod l
Recovers entropy from a mnemonic phrase or a list of mnemonic phrase words
Generates the amount mask for the given deriviation scalar
Generates a borromean ring signature for the message digest using the secret key specified and the list of all possible public key signing candidates
Generates a Bulletproof Zero-Knowledge proof of the amount(s) specified
Generates a Bulletproof+ Zero-Knowledge proof of the amount(s) specified
Generates a Hierarchical Deterministic Key Pair using the provided path
Optional
purposeOrPath: string | numberthe purpose (numeric) or path (e.g. m/44'/0'/1/3)
Optional
coin_type: numberOptional
account: numberOptional
change: numberOptional
address_index: numberGenerates a CLSAG ring signature for the message digest using the secret key specified and the list of all possible public key signing candidates.
Optionally, we also include proof that we have the real values of the values hidden within pedersen commitments
Optional
input_blinding_factor: stringOptional
public_commitments: string[]Optional
pseudo_blinding_factor: stringOptional
pseudo_commitment: stringGenerates the commitment blinding factor for the given derivation scalar
Generates a key derivation
Note: D = (a * B) mod l
Generates a key derivation scalar value
Note: Ds = H(D || output_index) mod l
Generates a key image from the public and secret ephemeral
Generates a V2 key image from the secret ephemeral
Generates a secret & public key pair
Generates a list pf secret & public keys
Generates proof of having the secret ephemerals specified by generating the relevant public keys, key_images, and signature for each and encoding the necessary information into a Base58 encoded string that can be provided to a verified that already has the public ephemerals
Generates a pedersen commitment for the supplied blinding factor and amount
Note: C = (y * G) + (a * H) mod l
Generates a list of random blinding factors and pseudo output commitments from the list of input amounts and the output commitments while proving them to a zero-sum
Generates an ED25519 RFC8032 signature for the message using the secret key specified
Generates a BIP-39 seed from the provided entropy
Generates a simple ED25519 signature for the message digest using the secret key specified
Generates a pedersen commitment for a transaction fee
Generates a Triptych ring signature for the message digest using the secret key specified and the list of all possible public key signing candidates.
Optionally, we also include proof that we have the real values of the values hidden within pedersen commitments
Generates an ED25519 point by hashing the provided data and turning it into a point on the ED25519 curve
Generates an ED25519 scalar by hashing the provided data and reducing it to an ED25519 scalar value
Returns a list of the supported languages
Generates a hardened Hierarchical Deterministic Key path
Optional
purposeOrPath: string | numberthe purpose (numeric) or path (e.g. m/44'/0'/1/3)
Optional
coin_type: numberOptional
account: numberOptional
change: numberOptional
address_index: numberDecodes a mnemonic phrase or list of mnenomic words into as seed value
Encodes the supplied seed into a list of mnemonic words
Returns the index number of the specified mnemonic word
Prepares a borromean ring signature for the message digest such that it can be completed in later stages of signature construction
Prepares a CLSAG ring signature for the message digest such that it can be completed in later stages of signature construction
Optional
input_blinding_factor: stringOptional
public_commitments: string[]Optional
pseudo_blinding_factor: stringOptional
pseudo_commitment: stringPrepares a signature for the message digest such that it can be completed in later stages of the signature construction
Prepares a Triptych ring signature for the message digest such that it can be completed in later stages of signature construction
Calculates the secret scalar and public key for the provided ED25519 private key (aka seed)
Generates a random entropy value
Optional
entropy: stringGenerates a random hash value
Generates a list of random hashes
Generates a random ED25519 point value
Generates a list of random ED25519 points
Generates a random ED25519 scalar value
Generates a list of random ED25519 scalars
Generates the root Merkle tree hash using the list of hashes
Reduces the input value to an ED25519 scalar value
Calculates the public key of the given secret key
Hashes the input data using sha256 and returns the resulting hash value
Hashes the input data using sha3 and returns the resulting hash value
Hashes the input data using a simple SHA3 KDF function and returns the resulting hash value
Hashes the input data using sha384 and returns the resulting hash value
Hashes the input data using sha512 and returns the resulting hash value
Toggles an amount from unmasked/masked to the inverse state of masked/unmasked using the provided amount mask
Generates Merkle tree branch from the list of hashes
Calculates the depth of the Merkle tree based upon how many hashes the tree contains
Much like derive_public_key() but calculates the public_key used from the public ephemeral
Note: B = P - [H(D || output_index) mod l]
Returns the list of mnemonic words
Returns the list of mnemonic words that have been trimmed to the minimum number of characters per word
Static
force_Forces the library to use the Javascript ASM.js underlying cryptographic library if it can
Static
force_Forces the library to use the WASM underlying cryptographic library if it can
Static
initStatic
languageReturns the common lanague name for the specified language
Static
make_Constructs a Module Result
Note: This is typically only used by external cryptographic library calls so that it mimics our underlying library call results
The string returned should always be a raw type, whether it be a string, a number, or an object as expected by the module.
If you are using external libraries for the underlying cryptographic library, it is highly recommended that you read the source code of this module to make sure that you are returning a result of the proper structure.
This method will JSON.stringify()
whatever result you supply so that our
module understands it within it's private execute()
method
Optional
error_message: stringProtected
Static
typeProtected
Returns the library name from the specified library type
We cannot create a new instance using this method as we need to await the loading of an underlying module, hence, we need to await the static init() method on this class to receive an instance of the class