External: Crypto

Crypto

User-defined external cryptography methods
Source:

Methods

(static) CheckRingSignatures(transactionPrefixHash, keyImage, inputKeys, signatures) → {boolean}

A user-defined check ring signatures method
Parameters:
Name Type Description
transactionPrefixHash string the transaction prefix hash
keyImage string the key image to use during the checking process
inputKeys Array.<string> the output keys to use during the checking process
signatures Array.<string> the signatures to verify during the checking process
Source:
Returns:
Whether the signatures are valid
Type
boolean

(static) CheckSignature(hash, publicKey, signature) → {boolean}

A user-defined check signature method
Parameters:
Name Type Description
hash string the hash that was signed
publicKey string the public key that was used in signing
signature string the signature
Source:
Returns:
whether the signature is valid
Type
boolean

(static) CNFastHash(data) → {string}

A user-defined CryptoNight Fast hash method
Parameters:
Name Type Description
data string hexadecimal data to hash
Source:
Returns:
the hexadecimal representation of the hash
Type
string

(static) DerivePublicKey(derivedKey, outputIndex, publicSpendKey) → {string}

A user-defined derive public key method
Parameters:
Name Type Description
derivedKey string the derived key
outputIndex number the index of the output in the transaction
publicSpendKey string the public spend key of the wallet
Source:
Returns:
the public key
Type
string

(static) DeriveSecretKey(derivedKey, outputIndex, privateSpendKey) → {string}

A user-defined derive secret key method
Parameters:
Name Type Description
derivedKey string the derived key
outputIndex number the index of the output in the transaction
privateSpendKey string the private spend key of the wallet
Source:
Returns:
the secret key
Type
string

(static) GenerateDeterministicSubwalletKeys(basePrivateSpendKey, walletIndex) → {CryptoNote.KeyPair}

A user-defined generate deterministic spend keys method
Parameters:
Name Type Description
basePrivateSpendKey string the base wallet private spend key
walletIndex number the subwallet index number
Source:
Returns:
- the subwallet private and public spend keys
Type
CryptoNote.KeyPair

(static) GenerateKeyDerivation(transactionPublicKey, privateViewKey) → {string}

A user-defined generate key derivation method
Parameters:
Name Type Description
transactionPublicKey string the transaction public key
privateViewKey string the private view key of the wallet
Source:
Returns:
the key derivation
Type
string

(static) GenerateKeyImage(publicKey, privateKey) → {string}

A user-defined generate key image method
Parameters:
Name Type Description
publicKey string a public key
privateKey string a private key
Source:
Returns:
the key image
Type
string

(static) GenerateRingSignatures(transactionPrefixHash, keyImage, inputKeys, privateKey, realIndex) → {Array.<string>}

A user-defined generate ring signatures method
Parameters:
Name Type Description
transactionPrefixHash string the transaction prefix hash
keyImage string the key image to use during the signing process
inputKeys Array.<string> the output keys to use during the signing process
privateKey string the private emphermal to use during the signing process
realIndex number the input key index of the real output being spent
Source:
Returns:
the ring signatures
Type
Array.<string>

(static) GenerateSignature(hash, publicKey, privateKey) → {string}

A user-defined generate signature method
Parameters:
Name Type Description
hash string the hash to sign
publicKey string the public key to use in signing
privateKey string the private key to use in signing
Source:
Returns:
the signature
Type
string

(static) SecretKeyToPublicKey(privateKey) → {string}

A user-defined secret key to public key method
Parameters:
Name Type Description
privateKey string the private key to use in this operation
Source:
Returns:
the public key
Type
string

(static) UnderivePublicKey(derivation, outputIndex, outputKey) → {string}

A user-defined underive public key method
Parameters:
Name Type Description
derivation string the derivation
outputIndex number the index of the output in the transaction
outputKey string the output key to underive from
Source:
Returns:
the public key
Type
string