Bip340 class

Constructors

Bip340()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

generatePrivateKey() KeyPair
generates a new private key with a secure random generator
getPublicKey(String privateKey) String
privateKey is a 32-bytes hex-encoded string returns the public key in form of 32-bytes hex-encoded string
sign(String message, String privateKey) String
message is a hex string privateKey is a 32-bytes hex encoded string returns a hex string
verify(String message, String signature, String? publicKey) bool
message is a hex string signature is a hex string publicKey is a 32-bytes hex-encoded string true if the signature is valid otherwise false