Lib Nexa
Functions
Calculates the block hash given a serialized header. Note that by convention hashes are displayed in byte-reverse order (as if a little-endian number was being displayed). This return value is not reversed. (hash.reversed().toHex() == "hex header from explorer") -> true
Given an array of items, creates a bloom filter and returns it serialized. Typical items are addresses (just the raw 20 bytes), transaction hashes, and outpoints
Decodes a private key provided in Satoshi's original fnormat
AES256 decryption if you encrypted with encryptAES256.
AES256 decryption if you KNOW the message length is a multiple of 16 (and you encrypted with encryptAES256by16) For variable sized messages, use decryptAES256.
This function calculates the BIP44 key from the specified path. BIP44 requires that purpose, coinType and account are "hardened". This function will automatically harden those parameters if you pass unhardened values. Therefore this function cannot be used for generalized (non-BIP44) child key derivation.
AES256 encryption of arbitrary length messages. A random initialization vector (IV) is generated and included with the ciphertext. For the maximum size efficiency when the IV can be inferred or calculated and the size is known use encryptAES256by16
AES256 encryption if you KNOW the message length is a multiple of 16. This is a lower level API that offers greater size efficiency if you know what you are doing. For variable sized messages, use encryptAES256.
Given a private key, return the corresponding (secp256k1) public key -- that is the privKey*G where G is the group generator
Returns the work -- that is the expected number of hashes to find a solution -- given the difficulty expressed in Bitcoin's "bits" notation
Calculates the RIPEMD160 of the SHA256 of data. Result is 20 bytes
Returns the double sha256 of data. Result is 32 bytes
Returns the minimum amount of native coins (finest unit) that must be in every UTXO for the passed blockchain
Returns the sha256 of data. Result is 32 bytes
Sign the passed 32 byte cryptographic hash of some data using secp256k1 EC Schnorr. Note, it is INSECURE to pass unhashed data to this function!!!
Sign the passed 32 byte cryptographic hash of some data using secp256k1 EC Schnorr, using the passed private nonce. Note, it is INSECURE to pass unhashed data to this function!!!
Sign a message using the same algorithm as the original bitcoin wallet's signmessage functionality
Verify a message using the same algorithm as the original bitcoin wallet's signmessage functionality
Calculates the sha256 of the passed data array, then verifies the signature
Verify the schnorr signature of the passed 32 byte cryptographic hash of some data. Note, it is INSECURE to pass unhashed data to this function!!!