Keychain class

A keychain encapsulates a public key and a private key, which are used for tasks such as encrypting and decrypting messages, or creating and verifying digital signatures.

Constructors

Keychain(String private)
Instantiate a Keychain with a private key hex-encoded
Keychain.generate()
Instantiate a Keychain from random bytes

Properties

hashCode int
The hash code for this object.
no setterinherited
private String
An hex-encoded (64 chars) private key used to decrypt messages or create digital signatures, and it must be kept secret.
getter/setter pair
public String
A hex-encoded (64 chars) public key used to encrypt messages or verify digital signatures, and it can be shared with anyone.
getter/setter pair
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
sign(String message) String
Encapsulate dart-bip340 sign() so you don't need to add bip340 as a dependency
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

verify(String? pubkey, String message, String signature) bool
Encapsulate dart-bip340 verify() so you don't need to add bip340 as a dependency