Creates an instance of Keys. Must provide a at least a secret key. Can optionally provide both a private and public key, but must be a valid pair.
The secret key object
Get the Keys in multibase format.
The SecretKey in multibase format
Get the Keys as a raw key pair.
The Keys as a raw key pair
JSON representation of a Keys.
The Keys as a JSON object
Static
equalsCompares two Keys objects for equality.
The main keys.
The other keys to compare.
True if the public key and secret key are equal, false otherwise.
Static
fromJSONStatic method creates a new Keys from a JSON object.
The JSON object to initialize the Keys.
The initialized Keys object.
Static
fromStatic method creates a new SchnorrKeyPair from a SecretKey object or secret key bytes.
The secret key bytes
A new SchnorrKeyPair object
Static
fromStatic method creates a new Keys (SecretKey/PublicKey) bigint secret.
The secret key secret
A new Keys object
Static
generateStatic method to generate a new random SchnorrKeyPair instance.
A new SecretKey object.
Static
toConverts key bytes to a hex string.
The key bytes (private or public).
The key bytes as a hex string.
Encapsulates a PublicKey and a SecretKey object as a single Keys object. SchnorrKeyPair