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

    Class SskrError

    Thrown for invalid specs and secrets, malformed or inconsistent share sets, an unmet quorum, Shamir failures (Shamir, with the ShamirError as cause), and (JS-only) an argument outside its domain or of the wrong type (InvalidParameter). Messages match the Rust reference where a variant exists; branch on code.

    Instances come from the static factories only.

    try {
    combineShares(shares);
    } catch (e) {
    if (SskrError.isSskrError(e) && e.is("NotEnoughGroups")) {
    // more groups needed
    }
    }

    Hierarchy

    • Error
      • SskrError
    Index
    name: "SskrError"

    Always "SskrError"; the cross-copy identity SskrError.isSskrError checks.

    The discriminant; equals details.code.

    The structured payload, discriminated by code.

    • Type guard for an SskrError, including one from another copy of this package.

      Parameters

      • value: unknown

      Returns value is SskrError

    • A Shamir failure surfaced through SSKR; cause is the ShamirError.

      Parameters

      • cause: ShamirError

      Returns SskrError

    • parameter is outside its domain: expected says what it must be ("an integer in [0, 15]"), and value is what was received; the message renders it exactly (2n, 18446744073709551616, "2").

      Parameters

      Returns SskrError