NativeFrostApi class

FrostApi backed by a native (FFI/platform) implementation.

Every call maps onto the matching BuFrostApi endpoint via unwrapOrThrowCryptoError, exactly like NativeMuSig2Api maps onto BuMusig2Api. The k1* methods drive the secp256k1 suite (33-byte points), the ed* methods the Ed25519 suite (32-byte points). Key shares cross as [id:u32 LE][share:32] records and commitments as [id:u32 LE][hiding][binding] records, mirroring BuFrostShare and BuFrostCommitment.

Implemented types

Constructors

NativeFrostApi(BuFrostApi api)
const

Properties

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

Methods

edAggregate({required List<FrostCommitment> commitments, required List<int> message, required List<int> groupPublicKey, required List<List<int>> shares}) → FrostThresholdSignature
Aggregate signature shares → (R, z) (Ed25519 suite).
override
edCombine(List<FrostKeyShare> shares, {bool isScalar = true}) → BuBytes
Combine share records → 32-byte secret (Ed25519 suite).
override
edCommit({required List<int> secretShare, List<int>? hidingRandomness, List<int>? bindingRandomness, bool isScalar = true}) → FrostNoncePair
Round-1 commit (Ed25519 suite).
override
edGroupFromMembers({required List<int> ids, required List<int> pubsConcat, required int threshold}) → BuBytes
Group key from member points (Ed25519 suite): ids + pubsConcat (n x 32 B). threshold: 0 = additive sum, else Lagrange at zero.
override
edGroupInfo({required List<int> vssConcat, required int nComms, required int max}) → FrostGroupInfo
Group key + max member keys from a VSS commitment (Ed25519 suite).
override
edPrepareShares({required List<FrostKeyShare> shares, required int threshold, bool isScalar = true}) → BuBytes
Signing-share preparation (Ed25519 suite): expand seeds when isScalar is false, then additive-rescale like k1PrepareShares.
override
edReshare({required List<int> ids, required List<int> seedsConcat, required List<int> coeffSeedsConcat, required int threshold}) → FrostReshare
Threshold reshare (additive, Ed25519 suite): ids + seedsConcat (n 32-byte RFC 8032 seeds, expanded in the backend) + coeffSeedsConcat (n * (threshold - 1) 32-byte seeds) → fresh shares, member pubs and group key. Requires n >= 2, 2 <= threshold <= n.
override
edShard({required List<int> secret, required List<int> coefficients, required int maxParticipants, bool isScalar = true}) → FrostDealerShard
Dealer shard (Ed25519 suite): same shapes, 32-byte points. isScalar: true (default) = canonical scalars, false = RFC 8032 seeds expanded in the backend.
override
edSign({required int identifier, required List<int> secretShare, required List<int> groupPublicKey, required FrostNoncePair nonces, required List<FrostCommitment> commitments, required List<int> message, bool isScalar = true}) → BuBytes
Round-2 signature share (Ed25519 suite).
override
edVerify({required List<int> commitment, required List<int> z, required List<int> groupPublicKey, required List<int> message}) → bool
Verify a final (R, z) signature (Ed25519 suite).
override
edVerifyShare({required int identifier, required List<int> participantPublicKey, required FrostCommitment commitment, required List<int> share, required List<FrostCommitment> commitments, required List<int> groupPublicKey, required List<int> message}) → bool
Verify one participant's signature share (Ed25519 suite).
override
edVssCommit({required List<int> coeffsConcat, required int nCoeffs}) → BuBytes
Feldman VSS commitment (Ed25519 suite): nCoeffs scalars → nCoeffs 32-byte points.
override
k1Aggregate({required List<FrostCommitment> commitments, required List<int> message, required List<int> groupPublicKey, required List<List<int>> shares}) → FrostThresholdSignature
Aggregate signature shares → (R, z).
override
k1Combine(List<FrostKeyShare> shares) → BuBytes
Combine share records → 32-byte secret (Lagrange at zero).
override
k1Commit({required List<int> secretShare, List<int>? hidingRandomness, List<int>? bindingRandomness}) → FrostNoncePair
Round-1 commit: 32-byte secretShare + caller 32-byte hidingRandomness/bindingRandomness (or fresh randomness when null) → nonce scalars + commitments.
override
k1GroupFromMembers({required List<int> ids, required List<int> pubsConcat, required int threshold}) → BuBytes
Group key from member points: ids + pubsConcat (n x 33 B). threshold: 0 = additive sum, else Lagrange interpolation at zero. Pure public-key math inside the backend.
override
k1GroupInfo({required List<int> vssConcat, required int nComms, required int max}) → FrostGroupInfo
Group key + max member keys from a VSS commitment (nComms concatenated 33-byte points, secret commitment first).
override
k1PrepareShares({required List<FrostKeyShare> shares, required int threshold}) → BuBytes
Signing-share preparation: expand + additive-rescale shares ([id:u32 LE][share:32] records) → n 32-byte scalars, same order. threshold: 0 = additive full-set rescale, else Shamir passthrough. All secret math happens inside the backend; shape errors throw.
override
k1Reshare({required List<int> ids, required List<int> secretsConcat, required List<int> coeffsConcat, required int threshold}) → FrostReshare
Threshold reshare (additive): ids (n participant identifiers) + secretsConcat (n 32-byte scalars) + coeffsConcat (n * (threshold - 1) 32-byte scalars, row-major) → fresh shares, member pubs and group key. Requires n >= 2, 2 <= threshold <= n.
override
k1Shard({required List<int> secret, required List<int> coefficients, required int maxParticipants}) → FrostDealerShard
Dealer shard: 32-byte secret + concatenated 32-byte polynomial coefficients (secret excluded) → one share record per participant (1..=[maxParticipants]).
override
k1Sign({required int identifier, required List<int> secretShare, required List<int> groupPublicKey, required FrostNoncePair nonces, required List<FrostCommitment> commitments, required List<int> message}) → BuBytes
Round-2 signature share (32 bytes) for identifier.
override
k1Verify({required List<int> commitment, required List<int> z, required List<int> groupPublicKey, required List<int> message}) → bool
Verify a final (R, z) signature (Appendix B Schnorr).
override
k1VerifyShare({required int identifier, required List<int> participantPublicKey, required FrostCommitment commitment, required List<int> share, required List<FrostCommitment> commitments, required List<int> groupPublicKey, required List<int> message}) → bool
Verify one participant's signature share.
override
k1VssCommit({required List<int> coeffsConcat, required int nCoeffs}) → BuBytes
Feldman VSS commitment: nCoeffs scalars → nCoeffs 33-byte points.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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