SchnorrkelSecretKey class
The SchnorrkelSecretKey
class represents a Schnorrkel secret key used for cryptographic operations.
A Schnorrkel secret key consists of two components: a secret key and a nonce.
Members:
_key
: AList<int>
containing the secret key component._nonce
: AList<int>
containing the nonce component.
This class provides a constructor for creating Schnorrkel secret keys, validating the input components, and ensuring the canonical form of the key.
Constructors
-
SchnorrkelSecretKey(List<
int> key, List<int> nonce) -
Creates a
SchnorrkelSecretKey
instance from provided secret key and nonce components.factory -
SchnorrkelSecretKey.fromBytes(List<
int> secretKeyBytes) -
Creates a
SchnorrkelSecretKey
instance from a byte representation of a secret key.factory -
SchnorrkelSecretKey.fromEd25519(List<
int> secretKeyBytes) -
Creates a
SchnorrkelSecretKey
instance from a byte representation of an Ed25519 secret key.factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dleqProve(
VRFInOut out, {bool kusamaVRF = true, GenerateRandom? nonceGenerator, MerlinTranscript? verifyScript}) → VRFProof - Generates a Discrete Logarithm Equality Proof (DLEQ) for a Verifiable Random Function (VRF) output.
-
hardDerive(
List< int> chainCode, {List<int> ? message, ExpansionMode mode = ExpansionMode.ed25519}) → Tuple<SchnorrkelSecretKey, List< int> > - Derives a new Schnorrkel secret key and chain code from the current secret key, chain code, and an optional message.
-
key(
) → List< int> -
The
key
method returns the secret key component of the Schnorrkel secret key. -
nonce(
) → List< int> -
The
nonce
method returns the nonce component of the Schnorrkel secret key. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
publicKey(
) → SchnorrkelPublicKey -
The
publicKey
method derives the corresponding public key from the Schnorrkel secret key. -
sign(
MerlinTranscript signingContextScript, {GenerateRandom? nonceGenerator}) → SchnorrkelSignature - Signs a message using the Schnorrkel secret key and a specified signing context script.
-
softDerive(
List< int> chainCode, {List<int> ? message, GenerateRandom? nonceGenerator}) → Tuple<SchnorrkelSecretKey, List< int> > - Derives a new Schnorrkel secret key and chain code from the current secret key, chain code, and an optional message.
-
toBytes(
) → List< int> -
The
toBytes
method converts the Schnorrkel secret key into a byte representation. -
toEd25519Bytes(
) → List< int> -
The
toEd25519Bytes
method converts the Schnorrkel secret key into a byte representation following the Ed25519 format, suitable for use in Ed25519 operations. -
toString(
) → String -
A string representation of this object.
inherited
-
vrfSign(
MerlinTranscript script, {GenerateRandom? nonceGenerator, bool kusamaVRF = true, MerlinTranscript? verifyScript}) → Tuple< VRFInOut, VRFProof> - Generates a Verifiable Random Function (VRF) output and its proof for a given transcript.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override