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

    Class GroupSpec

    memberThreshold-of-memberCount within one group. Instances are frozen.

    Index
    memberThreshold: number

    Members needed to recover the group's share.

    memberCount: number

    Members in the group.

    DEFAULT: GroupSpec = ...

    1-of-1.

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

      Parameters

      • value: unknown

      Returns value is GroupSpec

    • A validated memberThreshold-of-memberCount. Each field is read once.

      Parameters

      Returns GroupSpec

      InvalidParameter unless options is an object and both fields are usizes (a non-negative integer number up to 2^64, or a bigint in [0, 2^64 - 1]); then, in the reference's order, MemberCountInvalid (0 or > 16), MemberThresholdInvalid (> count). A threshold of 0 passes, as it does in GroupSpec::new; generating with it fails as Shamir (cause InvalidThreshold).

    • Parse "<threshold>-of-<count>"; each side is digits with an optional leading +, nothing else, up to u64::MAX.

      Parameters

      • text: string

      Returns GroupSpec

      InvalidParameter unless text is a string; GroupSpecInvalid, then the from codes.

    • Same threshold and count; false for anything that is not a GroupSpec (one from another copy of this package compares by its fields).

      Parameters

      • other: unknown

      Returns boolean

    • "<threshold>-of-<count>"

      Returns string