Skip to main content

Release notes

Refer to the CHANGELOG for detailed changes derived from Git commit history.

New API

The current release has a new API that replaces the previous methods of reading and writing C2PA data, which are still supported but will be deprecated. The new API is now the default. Previously, you had to use the unstable_api feature to use it; but this feature is no longer used.

The new API focuses on streaming I/O and supports the following structs:

API Changes for C2PA 2.1

Reader has some new methods:

  • validation_state() returns ValidationState, which can be Invalid, Valid or Trusted. Use this method instead of checking for validation_status() = None.
  • validation_results() returns ValidationResults, which is a more complete form of ValidationStatus and returns success, informational, and failure codes for the active manifest and ingredients. ValidationStatus is deprecated in favor of ValidationResults.

Ingredient now supports a validation_results() method and a validation_results field.

An AssetType assertion is now supported.

C2PA v2 claims

The library now supports claims as described in the C2PA 2.1 specification, however development is still in progress and it is not fully implemented yet.

A claim_version field is now allowed in a manifest definition for Builder and, if set to 2 will generate v2 claims.

The title() and format() methods of both Manifest and Ingredient objects now return an Option<String> because in v2 claims, title is optional and format does not exist.

In v2 claims, the first action must be c2pa.created or c2pa.opened.

There are many more checks and status codes added for v2 claims.

Using the old API

To use the old deprecated API, enable the v1_api feature; for example:

c2pa = {version="0.45.2", features=["v1_api"]}

Language binding support

ModuleMethodC++PythonWASMNode
Builder
new
from_jsonXXX
set_claim_generator_info
set_format
set_remote_urlX
set_no_embedX
set_thumbnail
add_assertion
add_assertion_json
add_ingredient_from_streamXX
add_ingredient_from_stream_async
add_ingredient
add_resourceXX
to_archiveXX
from_archiveXX
data_hashed_placeholder
sign_data_hashed_embeddable
sign_data_hashed_embeddable_async
sign_box_hashed_embeddable
sign_box_hashed_embeddable_async
signXX
sign_async
sign_fragmented_files
sign_fileXX
Reader
from_streamX
from_stream_async
from_fileX
from_file_async
from_json
from_manifest_data_and_streamX
from_manifest_data_and_stream_async
from_fragment
from_fragment_async
from_fragmented_files
json
validation_status
active_manifestX
active_label
iter_manifests
get_manifestX
resource_to_streamXX
to_folder
CallbackSigner
new
set_tsa_url
set_context
ed25519_sign