Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/getting-started/verify.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The [example-assets](https://contentauth.github.io/example-assets/) repository c
The code for the Verify site is open source and is available at https://github.com/contentauth/verify-site/.

:::warning Warning
Verify uses the [legacy JavaScript library](js-sdk/getting-started/overview.mdx), which is deprecated and unsupported. For new projects, use the [new JavaScript library](c2pa-js/readme.md) instead.
Verify uses the [legacy JavaScript library](../legacy-js-sdk/overview.mdx), which is deprecated and unsupported. For new projects, use the [new JavaScript library](c2pa-js/readme.md) instead.
:::

## Information displayed
Expand Down
115 changes: 4 additions & 111 deletions docs/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ The CAI open-source SDK consist of:
- Display a report of JSON manifest data attached to an asset.
- Attach a manifest data to an asset.
- Add a manifest to to the associated manifest store if the asset already has an associated manifest data.
- [**JavaScript library**](c2pa-js/readme.md) that enables web pages to verify and read manifest data using client JavaScript. Use it to add user interface elements to your website that display manifest data while following the [C2PA user experience recommendations](https://c2pa.org/specifications/specifications/1.0/ux/UX_Recommendations.html).
- **[C/C++](c2pa-c/readme.md), [Python](c2pa-python/readme.md), [Node.js](c2pa-node/readme.md) libraries** that enable applications to read and validate manifest data, create and sign manifest data and embed it supported asset files.
- [**JavaScript library**](c2pa-js/readme.md) that enables web pages to to read, validate, create, and sign manifest data, and embed it in supported asset files using client JavaScript. Use it to add user interface elements to your website that display manifest data while following the [C2PA user experience recommendations](https://c2pa.org/specifications/specifications/1.0/ux/UX_Recommendations.html).
- **[C/C++](c2pa-c/readme.md), [Python](c2pa-python/readme.md), [Node.js](c2pa-node/readme.md) libraries** that enable applications to read and validate manifest data, create and sign manifest data, and embed it supported asset files.
- [**Mobile libraries**](mobile.md) that enable mobile applications for iOS and Android to to read and generate manifest data.
- [**The Rust library**](rust-sdk/readme.md) that generates the other language bindings and can also be used directly to read and generate manifest data. The Rust library is the fundamental system underlying everything else.

To see a summary of what each tool and library can do, see [Which tool is right for you?](#which-tool-is-right-for-you).

The following diagram provides a high-level view of the SDK.

<img src={cai_open_source} width="800" />
Expand All @@ -37,8 +35,7 @@ The following diagram provides a high-level view of the SDK.

Applications can use the CAI SDK in several different ways:

- Web pages can use the JavaScript library to display Content Credentials.
- Applications written in C++, Python, or Node.js can use the corresponding language libraries to:
- Applications written in C++, Python, Node.js, or client JavaScript can use the corresponding language libraries to:
- Create, modify, and sign manifests.
- Embed manifests into media files.
- Parse and validate manifests.
Expand All @@ -47,111 +44,7 @@ Applications can use the CAI SDK in several different ways:

Native applications can also use Rust's _Foreign Function Interface_ (FFI) to call functions in the Rust library. The FFI enables interoperability between Rust and code written in other languages. For example, a Windows application can use the FFI to call Rust functions from languages such as C++ or C#. For an example, see the [c2c2pa repository](https://github.com/contentauth/c2c2pa).

An embedded application can use the Rust FFI (foreign function interface) to call Rust functions from languages such as C or C++, similarly to a native application. Embedded applications have unique constraints tied to the devices on which they run, including small memory footprint, low-powered hardware, intermittent network access, unique operating systems, or the lack of an operating system OS (running on bare metal). For these reasons, if you want to develop a CAI-enabled embedded application, please contact the CAI team directly.

## Which tool is right for you?

import green_check from '@site/static/img/green_check.png';

<table>
<thead>
<tr>
<th style={{ textAlign: 'left' }}>Use To...</th>
<th style={{ textAlign: 'left' }}>JavaScript Library </th>
<th style={{ textAlign: 'left' }}>C2PA Tool</th>
<th style={{ textAlign: 'left' }}>Python, C++, and Node.js Libraries </th>
<th style={{ textAlign: 'left' }}>Rust Library</th>
</tr>
</thead>
<tbody>
<tr>
<td style={{ textAlign: 'left' }}>
Display C2PA data on your site or app
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
</tr>
<tr>
<td style={{ textAlign: 'left' }}>
Link C2PA data displayed on your site to Verify
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
</tr>
<tr>
<td style={{ textAlign: 'left' }}>Write C2PA data into files</td>
<td style={{ textAlign: 'center' }}></td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
</tr>
<tr>
<td style={{ textAlign: 'left' }}>
Quickly create and inspect C2PA data
</td>
<td style={{ textAlign: 'center' }}></td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
</tr>
<tr>
<td style={{ textAlign: 'left' }}>
Customize displaying and creating C2PA data
</td>
<td style={{ textAlign: 'center' }}></td>
<td style={{ textAlign: 'center' }}></td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
</tr>
<tr>
<td style={{ textAlign: 'left' }}>Deploy on web, mobile, and desktop</td>
<td style={{ textAlign: 'center' }}></td>
<td style={{ textAlign: 'center' }}></td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
<td style={{ textAlign: 'center' }}>
<img src={green_check} width="30" />
</td>
</tr>
</tbody>
</table>
An embedded application can use the Rust FFI (foreign function interface) to call Rust functions from languages such as C or C++, similarly to a native application. Embedded applications have unique constraints tied to the devices on which they run, including small memory footprint, low-powered hardware, intermittent network access, unique operating systems, or the lack of an operating system OS (running on bare metal). For these reasons, if you want to develop an embedded application, please contact the CAI team directly.

## More information

Expand Down
5 changes: 0 additions & 5 deletions docs/js-sdk/deprecation-notice.md

This file was deleted.

10 changes: 0 additions & 10 deletions docs/js-sdk/js-landing.md

This file was deleted.

16 changes: 16 additions & 0 deletions docs/js-sdk/js-landing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
id: js-landing
title: JavaScript library
---

import Readme from '../c2pa-js/readme.md';

**Sept 2025**: The new JavaScript library, [c2pa-js](https://github.com/contentauth/c2pa-js) has been released. You're encouraged to move to the new library as soon as possible.

:::note
The legacy JavaScript library has been moved to the [c2pa-js-legacy](https://github.com/contentauth/c2pa-js-legacy) repository.

You can continue to install and use the old library, but it will no longer be updated or supported. The [Legacy JavaScript library documentation](../legacy-js-sdk/overview.mdx) is also still available for reference.
:::

<Readme components={{ h1: () => null }} />
14 changes: 14 additions & 0 deletions docs/legacy-js-sdk/deprecation-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:::danger Warning
This is documentation for the deprecated legacy JavaScript library, [c2pa-js-legacy](https://github.com/contentauth/c2pa-js-legacy). **This library is no longer maintained or supported**. Instead use the [new JavaScript web library](/docs/js-sdk/js-landing.mdx).
:::


:::note Legacy JavaScript library documentation
- [Quick start](/docs/legacy-js-sdk/getting-started/quick-start)
- [Architecture](/docs/legacy-js-sdk/getting-started/architecture.mdx)
- [Examples](/docs/legacy-js-sdk/guides/examples.mdx)
- [Hosting assets](/docs/legacy-js-sdk/guides/hosting.mdx)
- [Viewing manifest data](/docs/legacy-js-sdk/guides/viewing-provenance.mdx)
- [Selectors](/docs/legacy-js-sdk/guides/selectors.mdx)
- [Validation](/docs/legacy-js-sdk/guides/validation.mdx)
:::
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: architecture
title: Architecture
title: 'Legacy JavaScript library: Architecture'
hide_table_of_contents: true
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: quick-start
title: Quick start
title: 'Legacy JavaScript library: Quick start'
---

import Tabs from '@theme/Tabs';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: examples
title: JavaScript examples
title: Legacy JavaScript examples
---

import Deprecation from '../deprecation-notice.md';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: hosting
title: Hosting C2PA assets
title: 'Legacy JavaScript library: Hosting C2PA assets'
---

import Deprecation from '../deprecation-notice.md';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: selectors
title: Selectors
title: 'Legacy JavaScript library: Selectors'
---

import Deprecation from '../deprecation-notice.md';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: validation
title: Validation & errors
title: 'Legacy JavaScript library: Validation & errors'
---

import Deprecation from '../deprecation-notice.md';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: viewing-manifest-data
title: Viewing manifest data
title: 'Legacy JavaScript library: Viewing manifest data'
---

import Deprecation from '../deprecation-notice.md';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ id: old-js-overview
title: Legacy JavaScript library
---

import Deprecation from '../deprecation-notice.md';
import Deprecation from './deprecation-notice.md';

<Deprecation name="deprecation" />

The CAI JavaScript library (sometimes referred to as the "JavaScript SDK") enables client JavaScript applications to view and verify [C2PA](https://c2pa.org/) data. It performs only **read** operations on C2PA manifests.
The CAI legacy JavaScript library performs only **read** operations on C2PA manifests.

## What you should already know

Expand Down Expand Up @@ -59,7 +59,7 @@ Key features of the JavaScript library include:
The JavaScript library uses several [modern browser technologies](#technologies-that-the-library-uses).
Because of these requirements, **the library is not supported on any version of Internet Explorer and on a few less-used mobile browsers**. The chart below from [caniuse.com](https://caniuse.com/wasm,webworkers,cryptography,typedarrays,fetch) summarizes the browsers and versions that support the library.

![CAI JavaScript library browser support](../../../static/img/caniuse.png)
![CAI JavaScript library browser support](../../static/img/caniuse.png)

:::info
This chart is accurate as of July, 2025. For the most up-to-date browser support information, see [caniuse.com](https://caniuse.com/wasm,webworkers,cryptography,typedarrays,fetch).
Expand Down
File renamed without changes.
6 changes: 5 additions & 1 deletion docs/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ id: node-landing
title: Node.js library
---

import Readme from './c2pa-node-v2/readme.md';

**Sept 2025**: A new Node.js library has been released. We are working on adding documentation for the new library. Please bear with us!

:::note
You can continue to [install and use the old library](c2pa-node/readme.md) the same as before, but it will no longer be updated or supported.
:::
:::

<Readme components={{ h1: () => null }} />
15 changes: 15 additions & 0 deletions scripts/fetch-readme.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,23 @@ const readmes = [
{
dest: resolve(__dirname, '../docs/c2pa-js/readme.md'),
repo: 'contentauth/c2pa-js',
path: 'README.md',
},
{
dest: resolve(__dirname, '../docs/c2pa-js/c2pa-web-readme.md'),
repo: 'contentauth/c2pa-js',
path: 'packages/c2pa-web/README.md',
},
{
dest: resolve(__dirname, '../docs/c2pa-js/c2pa-types-readme.md'),
repo: 'contentauth/c2pa-js',
path: 'packages/c2pa-types/README.md',
},
{
dest: resolve(__dirname, '../docs/c2pa-js/c2pa-wasm-readme.md'),
repo: 'contentauth/c2pa-js',
path: 'packages/c2pa-wasm/README.md',
},
// c2patool
{
dest: resolve(__dirname, '../docs/c2patool/readme.md'),
Expand Down
Loading