crypto/secp256k1 library

Functions

derivePublicKey(BigInt privateKey, bool compressed) Uint8List
Generates a public key for the given private key. @param privateKey is a BigInt @param compressed The output public key is compressed or not.
derivePublicKeyFromBytes(Uint8List privateKey, bool compressed) Uint8List
Generates a public key for the given private key. @param privateKey is a Uint8List @param compressed The output public key is compressed or not.
generatePrivateKey() BigInt
Generates a new private key
isValidMessageHash(Uint8List messageHash) bool
If the message hash is of valid length or format.
isValidPrivateKey(Uint8List privateKey) bool
Test if the private key is valid.
recover(Uint8List messageHash, ThorSignature signature) Uint8List
sign(Uint8List messageHash, Uint8List privateKey) ThorSignature
Signs the hashed data in messageHash using the given private key and returns a ThorSignature.