The SSKRSpec instance defining group/member thresholds
The SSKRSecret to be split into shares
Nested array of SSKRShare instances (groups × members)
import { SSKRSecret, SSKRSpec, SSKRGroupSpec, sskrGenerateShares } from '@bcts/components';
const secret = SSKRSecret.new(new Uint8Array(16).fill(0x42));
const group = SSKRGroupSpec.new(2, 3); // 2 of 3
const spec = SSKRSpec.new(1, [group]); // 1 group required
const shares = sskrGenerateShares(spec, secret);
// shares[0] contains 3 SSKRShare instances
Generates SSKR shares for the given spec and secret.
This function matches the Rust
sskr_generateAPI by returning wrapped SSKRShare objects instead of raw byte arrays.