ValidatedSr25519SigningApi class

Validates argument lengths before delegating to the inner backend.

Implemented types

Properties

hashCode → int
The hash code for this object.
no setterinherited
inner → Sr25519SigningApi
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

derivePublic({required List<int> publicKey, required List<int> chainCode32, List<int>? message}) → (BuBytes, BuBytes)
Public HDKD derive from 32-byte publicKey and 32-byte chainCode32 with optional message. Returns (publicKey32, chainCode32). Throws on invalid lengths.
override
dleqProve({required List<int> seedOrSk, required List<int> inout64, required List<int> nonce64, List<int>? extra, bool fromSeed = true, bool uniform = false, bool kusamaVrf = true}) → BuBytes
DLEQ proof (c‖s = 64). inout64 = input‖output.
override
dleqVerify({required List<int> publicKey, required List<int> inout64, required List<int> proof64, List<int>? extra, bool kusamaVrf = true}) → bool
Verifies 64-byte DLEQ proof64 over 64-byte inout64 (input‖output) for 32-byte publicKey with optional extra. Returns true on valid, false on invalid, throws on bad lengths.
override
hardDerive({required List<int> seedOrSk, required List<int> chainCode32, List<int>? message, bool fromSeed = true, bool uniform = false}) → (BuBytes, BuBytes)
Hard HDKD derive from seedOrSk (32-byte seed when fromSeed else 64-byte secret) and 32-byte chainCode32 with optional message. Returns (secret64, chainCode32). Throws on invalid lengths.
override
isValidPublicKey(List<int> pk32) → bool
True if 32-byte pk32 is a valid Ristretto-compressed public key, else false, never throws for bad length.
override
isValidSecretKey(List<int> sk) → bool
True if sk (32-byte seed or 64-byte secret) has a canonical key part, else false, never throws for bad length.
override
normalizePublicKey(List<int> publicKey) → BuBytes?
Validates 32-byte publicKey and returns its canonical base encoding, or null when invalid (bad length, range, curve membership, or identity).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publicKeyFromSecret(List<int> sk64) → BuBytes
Derives 32-byte public key from 64-byte sk64. Throws on invalid secret length.
override
publicKeyFromSeed(List<int> seed32, {bool uniform = false}) → BuBytes
Derives 32-byte public key from 32-byte seed32; uniform selects ExpandSecretKeys expansion over ed25519 expansion. Throws on invalid seed length.
override
secretFromSeed(List<int> seed, {bool uniform = false}) → BuBytes
Expands 32-byte seed into 64-byte secret (key‖nonce); uniform selects ExpandSecretKeys expansion. Throws on invalid seed length.
override
sign({required List<int> seedOrSk, required List<int> message, required List<int> nonce64, bool fromSeed = true, bool uniform = false, List<int>? context}) → BuBytes
64-byte Schnorrkel signature over message with 64-byte nonce64; seedOrSk is 32-byte seed when fromSeed else 64-byte secret, uniform selects expansion, optional context. Throws on invalid lengths.
override
softDerive({required List<int> seedOrSk, required List<int> chainCode32, required List<int> newNonce32, List<int>? message, bool fromSeed = true, bool uniform = false}) → (BuBytes, BuBytes)
Soft HDKD derive from seedOrSk (32-byte seed when fromSeed else 64-byte secret), 32-byte chainCode32 and 32-byte newNonce32 with optional message. Returns (secret64, chainCode32). Throws on invalid lengths.
override
toEd25519Bytes(List<int> sk64) → BuBytes
Converts 64-byte sr25519 secret sk64 to 64-byte ed25519-expanded bytes (scalar multiplied by cofactor). Throws on invalid length.
override
toString() → String
A string representation of this object.
inherited
verify({required List<int> publicKey, required List<int> message, required List<int> signature, List<int>? context}) → bool
Verifies 64-byte signature over message for 32-byte publicKey with optional context. Returns true on valid, false on invalid, throws on bad lengths.
override
vrfHash({required List<int> publicKey, required List<int> message, List<int>? context}) → BuBytes
VRF input point H from SigningContext + message + pk.
override
vrfInOut({required List<int> seedOrSk, required List<int> message, bool fromSeed = true, bool uniform = false, List<int>? context}) → BuBytes
VRF (input32‖output32).
override
vrfSign({required List<int> seedOrSk, required List<int> message, required List<int> nonce64, List<int>? extra, bool fromSeed = true, bool uniform = false, List<int>? context, bool kusamaVrf = true}) → BuBytes
96-byte VRF signature (preOut32‖proof64) over message with 64-byte nonce64; seedOrSk is 32-byte seed when fromSeed else 64-byte secret, optional context/extra, kusamaVrf selects transcript variant. Throws on invalid lengths.
override
vrfVerify({required List<int> publicKey, required List<int> message, required List<int> preOut32, required List<int> proof64, List<int>? context, List<int>? extra, bool kusamaVrf = true}) → bool
Verifies VRF proof64 and 32-byte preOut32 over message for 32-byte publicKey with optional context/extra. Returns true on valid, false on invalid, throws on bad lengths.
override

Operators

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