SchnorrkelPublicKey class
Represents a Schnorrkel public key used for verifying signatures.
A Schnorrkel public key is a cryptographic key used for signature verification. This class encapsulates the functionality to create and work with Schnorrkel public keys.
Usage:
// Create a Schnorrkel public key from bytes.
List<int> publicKeyBytes = ...;
SchnorrkelPublicKey publicKey = SchnorrkelPublicKey(publicKeyBytes);
The SchnorrkelPublicKey
class allows you to create a Schnorrkel public key from bytes and provides methods for
key validation.
Constructors
-
SchnorrkelPublicKey(List<
int> keyBytes) -
Creates a
SchnorrkelPublicKey
from the given byte representation.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
-
derive(
List< int> chainCode, [List<int> ? message]) → Tuple<SchnorrkelPublicKey, List< int> > - Derives a new Schnorrkel public key and chain code using hierarchical deterministic key derivation (HDKD).
-
dleqVerify(
MerlinTranscript script, VRFInOut out, VRFProof proof, {bool isKusamaVRF = true}) → bool - Verifies a Discrete Logarithm Equality (DLEQ) proof for a Verifiable Random Function (VRF) output.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBytes(
) → List< int> - Converts the Schnorrkel public key to a byte representation.
-
toPoint(
) → RistrettoPoint - Converts the Schnorrkel public key to a RistrettoPoint point.
-
toString(
) → String -
A string representation of this object.
inherited
-
verify(
SchnorrkelSignature signature, MerlinTranscript signingContextScript) → bool - Verifies a Schnorrkel signature using the public key and a transcript.
-
vrfHash(
MerlinTranscript script) → RistrettoPoint - Computes a VRF (Verifiable Random Function) hash using a transcript.
-
vrfVerify(
MerlinTranscript script, VRFPreOut output, VRFProof proof, {MerlinTranscript? verifyScript}) → bool - Verifies a Verifiable Random Function (VRF) output and its proof.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
vrfHash2(
MerlinTranscript script, List< int> keyBytes) → RistrettoPoint