What changed
postguard-js#67 (merged 2026-05-13) changes the return shape of Opened.decrypt({ uuid }).
Previously, Opened.decrypt({ uuid }) always returned DecryptFileResult ({ files, sender, blob, download() }). After the fix, the SDK inspects the inner zip central directory: if the entries are exactly ['data.bin'] (the shape produced by Sealed.upload({ data })), the entry is unwrapped and the call returns DecryptDataResult ({ plaintext, sender }). Otherwise behaviour is unchanged.
This makes the round-trip pg.encrypt({ data }).upload() → pg.open({ uuid }).decrypt() actually yield plaintext as the encrypt-side API implies.
Docs that need updating
docs/sdk/js-decryption.md:
- The section "Decrypt from Cryptify UUID" currently states the result is
DecryptFileResult. That is only true when the payload was uploaded with Sealed.upload({ files }). When uploaded with Sealed.upload({ data }) the result is now DecryptDataResult.
- The two-input table at the top (
{ uuid } vs { data }) should note that { uuid } mirrors whichever mode produced the upload.
- A short note (or TypeScript union) explaining how to discriminate between the two result shapes (e.g.
'plaintext' in result) would be useful for consumers writing if/else over the result.
docs/repos/postguard-js.md snippets that show opened.decrypt({ uuid }) returning a blob should keep the file-upload framing but acknowledge the data-mode alternative.
Source
Verify against the SDK source before writing — the PR description is accurate but the published API types are the binding reference.
What changed
postguard-js#67 (merged 2026-05-13) changes the return shape of
Opened.decrypt({ uuid }).Previously,
Opened.decrypt({ uuid })always returnedDecryptFileResult({ files, sender, blob, download() }). After the fix, the SDK inspects the inner zip central directory: if the entries are exactly['data.bin'](the shape produced bySealed.upload({ data })), the entry is unwrapped and the call returnsDecryptDataResult({ plaintext, sender }). Otherwise behaviour is unchanged.This makes the round-trip
pg.encrypt({ data }).upload()→pg.open({ uuid }).decrypt()actually yieldplaintextas the encrypt-side API implies.Docs that need updating
docs/sdk/js-decryption.md:DecryptFileResult. That is only true when the payload was uploaded withSealed.upload({ files }). When uploaded withSealed.upload({ data })the result is nowDecryptDataResult.{ uuid }vs{ data }) should note that{ uuid }mirrors whichever mode produced the upload.'plaintext' in result) would be useful for consumers writingif/elseover the result.docs/repos/postguard-js.mdsnippets that showopened.decrypt({ uuid })returning ablobshould keep the file-upload framing but acknowledge the data-mode alternative.Source
extractZipEntry).['data.bin']").Verify against the SDK source before writing — the PR description is accurate but the published API types are the binding reference.