@blockchaincommons/sskr - v1.0.0-beta.3
    Preparing search index...

    Class Spec

    groupThreshold of groups must each meet their member threshold. Instances and their groups array are frozen.

    Index
    groupThreshold: number

    Groups needed to recover.

    groups: readonly GroupSpec[]

    The groups, in order; a frozen copy of what was passed.

    • get groupCount(): number

      Number of groups.

      Returns number

    • get shareCount(): number

      Total shares across all groups.

      Returns number

    • Type guard for a Spec, including one from another copy of this package.

      Parameters

      • value: unknown

      Returns value is Spec

    • A validated spec over a frozen copy of groups. The fields are read once and groups is snapshotted by index, so what is checked is what is stored; a GroupSpec from another copy of this package is rebuilt through this copy's factory.

      Parameters

      Returns Spec

      InvalidParameter unless options is an object, groupThreshold a usize and groups an array of GroupSpec; then GroupThresholdInvalid (0 or > groups), GroupCountInvalid (> 16), in the reference's order.

    • Same group threshold and pairwise equal groups; false for anything that is not a Spec (one from another copy of this package compares by its fields).

      Parameters

      • other: unknown

      Returns boolean