Function decodeContentHash

  • Decode a binary contenthash into its MassaContentHash components.

    Validates the codec sequence, extracts all fields, and applies the same semantic rules as encodeContentHash: DeWeb path must start with /, SC targets must start with AS, and MNS targets must be non-empty.

    Parameters

    • data: Uint8Array

      The binary contenthash

    Returns MassaContentHash

    The decoded contenthash components

    Throws

    If the data is malformed, contains unexpected codecs, or fails semantic validation