Releases: TrustNXT/c2pa-ts
Releases · TrustNXT/c2pa-ts
v0.11.0
Minor Changes
-
b3c0102: # Large Asset Support - Asset Abstraction
⚠️ Breaking API Changes — Several methods are now async. Addawaitwhere needed.What's New
-
Blob support: Assets accept
Uint8ArrayorBlob— enables streaming large files (multi-GB) without loading into memory -
writeToFile(path): Streams output directly to disk (preferred for large files) -
getBlob(): Returns underlying Blob if availableBreaking Changes
Asset Creation & Interface
The
AssetTypeinterface has been updated to support async creation andBlobsources. Usecreate()instead ofnew.// Before const asset = new JPEG(data); const canRead = JPEG.canRead(data); // After const asset = await JPEG.create(data); const canRead = await JPEG.canRead(data);
Async Methods
These methods are now async:
Method Now returns canRead()Promise<boolean>create()Promise<Asset>getManifestJUMBF()Promise<Uint8Array | undefined>ensureManifestSpace()Promise<void>writeManifestJUMBF()Promise<void>
-