@blockchaincommons/components - v1.0.0-beta.4
    Preparing search index...

    Class SskrShare

    An SSKR share: the raw share bytes, with a CBOR and UR form.

    Implements

    • ToCbor
    • ToUR
    Index
    • get share(): SskrShare

      The parsed share (sskr's parseShare over the bytes); a malformed share is an Sskr failure.

      Returns SskrShare

    • get bytes(): Uint8Array

      A copy of the share bytes.

      Returns Uint8Array

    • get identifier(): number

      The 16-bit identifier (data[0..2]).

      Returns number

    • get groupThreshold(): number

      The group threshold (data[2] >> 4, plus one).

      Returns number

    • get groupCount(): number

      The group count (data[2] & 0xf, plus one).

      Returns number

    • get groupIndex(): number

      The group index (data[3] >> 4).

      Returns number

    • get memberThreshold(): number

      The member threshold (data[3] & 0xf, plus one).

      Returns number

    • get memberIndex(): number

      The member index (data[4] & 0xf).

      Returns number

    • get value(): Uint8Array

      The share value: the bytes after the five header bytes.

      Returns Uint8Array

    • From the share's bytes (copied, never parsed: as SSKRShare::from_data) or from a parsed share of the sskr package, whose bytes are those shareBytes produces (a malformed parsed share is an Sskr failure).

      Parameters

      • share: Uint8Array<ArrayBufferLike> | SskrShare

      Returns SskrShare

    • sskr_generate_using: the groups of shares for secret under spec.

      Parameters

      • spec: Spec
      • secret: Secret
      • Optionaloptions: RngOptions

      Returns SskrShare[][]

    • sskr_combine: the secret behind a quorum of shares. The bytes go to sskr's combineShares as they are; its SskrError is not wrapped.

      Parameters

      Returns Secret

    • The share bytes in hex.

      Returns string

    • The identifier's two bytes in hex.

      Returns string

    • A summary of the header; a share too short for it is an InvalidData failure.

      Returns string

    • The CBOR tags this type decodes from; the first one is used to encode.

      Returns Tag[]

    • The untagged CBOR: the share bytes.

      Returns Cbor

    • The tagged CBOR form.

      Returns Cbor

    • As ur:sskr.

      Returns UR