Module

Contract.Crypto.Secp256k1.Utils

#hashMessageSha256

hashMessageSha256 :: ByteArray -> Aff MessageHash

Hash a byte array using sha256, for use with signEcdsaSecp256k1 and verifyEcdsaSecp256k1Signature.

#deriveSecp256k1PrivateKey

deriveSecp256k1PrivateKey :: ByteArray -> Maybe Secp256k1PrivateKey

Deterministically derive a private key given an array of bytes. Array size must be between 40 and 1024 bytes.

Normally, the input bytes should be kept secret and shouldn't be easily reconstructible.

#mkSecp256k1PrivateKey

mkSecp256k1PrivateKey :: ByteArray -> Maybe Secp256k1PrivateKey

Attempt to convert a byte array containing a byte-representation of a private key to a private key. Invalid values will be rejected.

Modules