Marmot-TS
    Preparing search index...

    Interface MediaAttachment

    A decoded encrypted-media-v1 attachment (one imeta tag).

    Built by encryptMediaFile (locators are filled in by the caller after upload), serialized with encodeMediaImetaTag, and read back with parseMediaImetaTag.

    interface MediaAttachment {
        ciphertextSha256: string;
        dim?: string;
        filename: string;
        locators: MediaLocator[];
        mediaType: string;
        nonce: string;
        plaintextSha256: string;
        thumbhash?: string;
        version: "encrypted-media-v1";
    }
    Index

    Core - Encrypted Media

    ciphertextSha256: string

    Hex-encoded SHA-256 of the ciphertext (64 hex chars). The preferred content id for blob storage; fetched bytes are verified against it.

    dim?: string

    Optional <width>x<height> render hint.

    filename: string

    Display filename. Feeds the file_key derivation and the AEAD AAD.

    locators: MediaLocator[]

    One or more ordered locators (locator <kind> <value>). Empty only on the attachment returned by encryptMediaFile before the blob is uploaded; a parsed attachment always has at least one.

    mediaType: string

    Canonical media (MIME) type — see canonicalizeMimeType. Feeds the file_key derivation and the AEAD AAD.

    nonce: string

    Hex-encoded 12-byte ChaCha20-Poly1305 nonce (exactly 24 hex chars).

    plaintextSha256: string

    Hex-encoded SHA-256 of the plaintext file (64 hex chars). Feeds the file_key derivation and the AEAD AAD; verified after decryption.

    thumbhash?: string

    Optional thumbhash preview value.

    version: "encrypted-media-v1"