Marmot-TS
    Preparing search index...

    Class GroupMediaService<TMedia>

    Source-bound v2 encryption and verified plaintext cache writes. Retained state is bounded by the existing session rollback policy.

    Type Parameters

    Index
    media: TMedia
    • Decrypt using the sourceParent supplied on the accepted application-message result. Omission selects the current state only. Missing retained material makes the attachment unavailable; it does not invalidate its message. Cache contents never bypass cryptographic or metadata validation.

      Parameters

      • encrypted: Uint8Array
      • attachment: MediaAttachment
      • sourceParent: string = ...

      Returns Promise<StoredMedia>

    • Encrypts a blob for sharing in a group message. The returned attachment has its hashes, nonce, media type, and filename set but no locators — the caller uploads encrypted to a blob store, adds a MediaAttachment locator, then serializes it with encodeMediaImetaTag.

      Parameters

      Returns Promise<
          {
              attachment: MediaAttachment;
              encrypted: Uint8Array;
              expectedParent: string;
          },
      >