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

    Reassembles a UR from part strings in any order, as the reference's MultipartDecoder over ur::Decoder::receive does.

    Parts are case-sensitive: the reference's receive never lower-cases (only UR::from_ur_string does), so lower-case a QR payload before add. Every string is checked in full, before and after completion: the scheme, the type against the first part's, the seqNum-seqLen header, the bytewords and the part CBOR. The header is otherwise informational: the fountain fields come from the part's CBOR. done follows the fountain decoder, and result reassembles and decodes the message when first read after completion.

    Index
    • get done(): boolean

      Whether the message is reassembled: the fountain decoder's done.

      Returns boolean

    • get result(): UR | undefined

      The UR once done, else undefined. The message is reassembled and decoded when first read after completion; that outcome, the UR or the error, is kept and returned or thrown again, as the decoder does not change once done.

      Returns UR | undefined

      Decoder for what the fountain decoder's result rejects ("expected item", "invalid padding"); Cbor when the message is not valid dCBOR.

    • Feed a part. Returns whether it added information: false for a repeated index set and once done.

      Parameters

      • part: string

      Returns boolean

      In the reference's order: InvalidScheme (no ur:, an upper-case scheme included), InvalidType (the first component), UnexpectedType when the type differs from the first part's, then Decoder for what ur::decode and the fountain decoder reject: "No type specified" (no slash after the type), "Invalid indices" (a header that is not two u16s), the bytewords failure ("invalid word", "invalid checksum", …), "Can't decode single-part UR as multi-part" (no header, once its bytewords decoded), the part codec's messages, "expected non-empty part" and "part is inconsistent with previous ones". InvalidParameter for a non-string.