https://github.com/contentauth/c2pa-js
https://github.com/contentauth/c2pa-js
c2pa metadata sdk
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/contentauth/c2pa-js
- Owner: contentauth
- License: mit
- Created: 2025-07-11T20:36:12.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-11-14T20:36:25.000Z (about 1 month ago)
- Last Synced: 2025-11-15T10:00:01.036Z (about 1 month ago)
- Language: TypeScript
- Size: 907 KB
- Stars: 6
- Watchers: 0
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - contentauth/c2pa-js - JavaScript SDK for displaying and validating C2PA data (TypeScript)
README
# c2pa-js
> [!NOTE]
> Looking for the old `c2pa-js` repo? It's available [here](https://github.com/contentauth/c2pa-js-legacy) as `c2pa-js-legacy`. Those packages are now deprecated and implementors wishing to interact with C2PA metadata on the web should use the libraries in this repo instead.
A collection of libraries and tools that enable interaction with [C2PA metadata](https://c2pa.org/) in JavaScript. Part of the [Content Authenticity Initiative](https://contentauthenticity.org/).
## Using This Monorepo
This monorepo is managed by [NX](https://nx.dev/getting-started/intro) and [pnpm](https://pnpm.io/). As a prerequisite for any interaction, both must be installed:
```sh
npm install -g pnpm
pnpm install
```
Commands are run in the following format: `nx [target] [project]`, e.g.:
```sh
nx build c2pa-web # This will build c2pa-web and all of its dependencies
```
## Packages
Please see the individual package directories for more detailed information.
### `packages/`
Published libraries intended for production use.
#### [c2pa-web](https://github.com/contentauth/c2pa-js/tree/main/packages/c2pa-web)
The SDK for interacting with [C2PA metadata](https://c2pa.org/) on the web.
#### [c2pa-wasm](https://github.com/contentauth/c2pa-js/tree/main/packages/c2pa-wasm)
The WebAssembly wrapper for [c2pa-rs](https://github.com/contentauth/c2pa-rs) that powers c2pa-web, built with [wasm-bindgen](https://github.com/wasm-bindgen/wasm-bindgen). While these bindings can be used directly, most users will prefer the convenience of c2pa-web.
#### [c2pa-types](https://github.com/contentauth/c2pa-js/tree/main/packages/c2pa-types)
Exports TypeScript types autogenerated from [c2pa-rs](https://github.com/contentauth/c2pa-rs) structs, used by c2pa-web.
### `tools/`
Other tools that provide utilities for local development.
#### [testbed](https://github.com/contentauth/c2pa-js/tree/main/tools/testbed)
A minimal website that can be used to view c2pa-web output and as a sandbox for local development.
#### [nx-wasm-bindgen](https://github.com/contentauth/c2pa-js/tree/main/tools/nx-wasm-bindgen)
A custom [NX executor](https://nx.dev/concepts/executors-and-configurations) that contains the logic for building c2pa-wasm using [wasm-bindgen](https://github.com/wasm-bindgen/wasm-bindgen).
## License
This project is licensed under the terms of the [MIT license](https://github.com/contentauth/c2pa-js-v2/blob/main/LICENSE).