@apertrue/c2pa-extractor
v0.1.0
Published
C2PA manifest extraction for ZK proof generation
Maintainers
Readme
@apertrue/c2pa-extractor
Extract C2PA (Coalition for Content Provenance and Authenticity) manifests from images and videos for ZK proof generation.
Parses C2PA claims, assertions, certificate chains, and edit history from media files. Supports both browser and Node.js environments.
Installation
npm install @apertrue/c2pa-extractorUsage
import { extractManifest } from '@apertrue/c2pa-extractor';
const manifest = await extractManifest(imageBuffer);
// Returns: claims, assertions, certificate chain, content bindingsBrowser
import { extractManifest } from '@apertrue/c2pa-extractor/browser';Node.js
import { extractManifest } from '@apertrue/c2pa-extractor/node';What It Extracts
- C2PA Claims — authorship assertions, creation tool, capture device
- Certificate Chains — X.509 certificates from the COSE signature
- Content Bindings — hash assertions linking the claim to the media content
- Edit History — action and ingredient assertions for provenance tracking
- COSE Signatures — raw signature bytes for ZK circuit input
Supported Formats
- JPEG (APP11/JUMBF C2PA box)
- PNG (caBX chunk)
- MP4/MOV (uuid box)
Supported Cameras & Tools
Any C2PA-compliant device or application, including:
- Leica M11-P, Q3
- Sony Alpha (A7/A9 series with firmware update)
- Google Pixel (8 Pro+)
- Samsung Galaxy (S24+)
- Adobe Photoshop, Lightroom
- ProofMode (Guardian Project)
- ChatGPT/DALL-E (AI-generated content declarations)
Building
npm run build # Compile TypeScript
npm run test # Run test suite
npm run typecheck # Type checking onlyLicense
Apache 2.0 — see LICENSE.
