Skip to content

@filoz/filecoin-encryption-envelope

Filecoin Encryption Envelope (FIP-1253) - Main Entry Point

import * as fee from '@filoz/filecoin-encryption-envelope'
source.pipeThrough(fee.encrypt({ cek })) // chunked stream, the default
fee.aesGcm.encrypt(plaintext, { cek }) // whole-object, opt-in
fee.constants.ALG_A256KW
NamespaceDescription
aesGcm-
constants-
coseCOSE decode-only inspection surface (FIP-1253): read an untrusted envelope into its typed protected header, unprotected header, and recipient list. See docs/tech-spec.md, “Wire profile” and “CDDL”.
errors-
recipients-
InterfaceDescription
ChunkedEncryptOptionsOptions for one chunked AES-256-GCM STREAM encryption using a direct CEK.
Type AliasDescription
AppMetadataOpaque, string-keyed application metadata. Carried but never interpreted.
CborValueCBOR values supported by this profile.
FunctionDescription
encryptEncrypt a plaintext stream using scheme 2 (chunked AES-256-GCM STREAM) and a direct CEK.