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

    Function expectTaggedContent

    • Extract content if has specific tag, throwing if not (the reference's try_into_expected_tagged_value).

      The WrongTag error names the expected tag as it was given (a Tag keeps its name; a number or bigint stays unnamed) and the actual tag as the node carries it.

      Parameters

      • cbor: Cbor

        CBOR value

      • tag: number | bigint | Tag

        Expected tag value, or a Tag

      Returns Cbor

      Tagged content

      WrongType if cbor is not tagged; WrongTag (with details.expectedTag and details.actualTag) if the tag doesn't match