Marmot-TS
    Preparing search index...

    Function deserializeApplicationData

    • Deserializes application data bytes back into a rumor, enforcing the Marmot inner-event encoding rules (foundation/application-messages.md §Encoding).

      Strict decode: the payload MUST be a JSON object carrying exactly the six members id, pubkey, created_at, kind, tags, content (no sig, no unknown members), and its id MUST equal the canonical NIP-01 event id recomputed from the other members (lowercase-hex SHA-256 of [0, pubkey, created_at, kind, tags, content]). A mismatch or extra/missing member is rejected — this is the integrity half of the authorship checks; the verifyApplicationRumorAuthorship layer adds the MLS-sender binding.

      Parameters

      • data: Uint8Array

        The serialized application data

      Returns Rumor

      The deserialized, id-verified Rumor

      if the bytes are not a strictly-conformant, id-consistent rumor