NostrKeyPairs class

This class is responsible for generating, handling and signing keys. It is used by the NostrClient to sign messages.

Constructors

NostrKeyPairs({required String private})
This class is responsible for generating, handling and signing keys. It is used by the NostrClient to sign messages.
factory
NostrKeyPairs.generate()
This class is responsible for generating, handling and signing keys. It is used by the NostrClient to sign messages. Instantiate a NostrKeyPairs from random bytes.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
private String
This is the private generate Key, hex-encoded (64 chars)
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
public String
This is the public generate Key, hex-encoded (64 chars)
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sign(String message) String
This will sign a message with the private key and return the signature.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

isValidPrivateKey(String privateKey) bool
verify(String? pubkey, String message, String signature) bool
This will verify a signature for a message with the public key.