diff --git a/docs/manifest/json-ref/builder-ref.mdx b/docs/manifest/json-ref/builder-ref.mdx
new file mode 100644
index 00000000..3054e6b8
--- /dev/null
+++ b/docs/manifest/json-ref/builder-ref.mdx
@@ -0,0 +1,13 @@
+---
+id: builder-schema
+title: Builder reference
+hide_table_of_contents: true
+---
+
+:::danger Warning
+This is a beta release of this reference. It is a work in progress and may have issues or errors.
+:::
+
+import SchemaReference from '@site/src/components/SchemaReference';
+
+
diff --git a/docs/manifest/json-ref/cai-addon.css b/docs/manifest/json-ref/cai-addon.css
deleted file mode 100644
index 88b5b14f..00000000
--- a/docs/manifest/json-ref/cai-addon.css
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Added by Rand - moved from custom-cai.css */
-div.highlighter-rouge {
- background-color: #f6f8fa;
- padding: 5px 10px;
-}
-
-.comment {
- font-style: italic;
-}
-
-.manifest-object {
- display: inline-block;
- background-color: #e6f2ff;
- padding: 5px;
- border: 1px solid #024384;
- width: fit-content;
- border-radius: 10px;
- font-size: 90%;
-}
-
-/* Table styling */
-
-th.manifest-ref-table,
-td.manifest-ref-table {
- border: 1px solid #ccc;
- padding: 10px;
- font-size: 0.9em;
- text-align: left;
-}
-
-th.manifest-ref-table {
- background: #e6e6e6;
-}
-
-.top-scroll-btn {
- float: right;
- margin-right: 50px;
- border: 1px solid #ddd;
- background-color: #ccc; /* Set a background color */
- color: black; /* Text color */
- cursor: pointer; /* Add a mouse pointer on hover */
- padding: 10px; /* Some padding */
- border-radius: 10px; /* Rounded corners */
- font-size: 12px; /* Increase font size */
-}
-
-.top-scroll-btn:hover {
- background-color: #555; /* Add a dark-grey background on hover */
- color: white;
-}
diff --git a/docs/manifest/json-ref/index.md b/docs/manifest/json-ref/index.md
index d94e92db..81539ad0 100644
--- a/docs/manifest/json-ref/index.md
+++ b/docs/manifest/json-ref/index.md
@@ -1,11 +1,22 @@
---
id: index
-title: Manifest JSON reference
+title: JSON manifest reference
hide_table_of_contents: true
-pagination_next: null
-pagination_prev: null
---
-Please see:
-- [ManifestDefinition JSON reference](manifest-def.mdx)
-- [Reader JSON reference](reader.mdx)
\ No newline at end of file
+:::danger Warning
+This is a beta release of these references. It is a work in progress and may have issues or errors.
+:::
+
+The [C2PA specification](https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_manifests) describes a manifest with a binary structure in JPEG universal metadata box format ([JUMBF](https://www.iso.org/standard/84635.html)) that includes JSON as well as binary data for things like encryption keys and thumbnail images. Because the binary structure is hard to understand and program to, the SDK defines a JSON manifest structure that's a declarative language for representing and creating a binary manifest.
+
+The JSON manifest is an abstract translation layer that's easier to understand than the binary format. It can describe everything in the underlying binary format except for binary data such as thumbnails that are included by a structure called a _resource reference_. To generate a binary manifest, the SDK assembles all the JSON objects, resource references, and ingredients defined, and then converts them into different assertions and other objects as required.
+
+- [Builder](builder-ref.mdx) - Use to add a signed manifest to an asset.
+- [Reader](reader-ref.mdx) - Use to read and validate a manifest store.
+- [ManifestDefinition](manifest-def.mdx) - Use to define a manifest (a collection of ingredients and assertions) that can be added to a manifest store, signed, and embedded into a file.
+- [Settings](settings-ref.mdx) - Use to define all aspects of code for working with Content Credentials.
+
+
+
+
diff --git a/docs/manifest/json-ref/manifest-def.html b/docs/manifest/json-ref/manifest-def.html
deleted file mode 100644
index 09098c5a..00000000
--- a/docs/manifest/json-ref/manifest-def.html
+++ /dev/null
@@ -1,4499 +0,0 @@
-
-
-
-
- Use a ManifestDefinition to define a manifest and to build a manifest store.
- A manifest is a collection of ingredients and assertions used to define a
- claim that can be signed and embedded into a file.
-
-
-
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | assertions |
-
-
-
-
-
-
-
- An array of
- AssertionDefinition
- |
-
-
- A list of assertions |
-
-
-
-
- NO
- |
-
-
-
- Empty array
- |
-
-
-
- | claim_generator_info |
-
-
-
-
-
-
-
- An array of
- ClaimGeneratorInfo
- |
-
-
-
- Claim Generator Info is always required with at least one entry
- |
-
-
-
-
- NO
- |
-
-
-
-
- Object with properties:
-
- - name - c2pa-rs
-
- - version - 0.49.5
-
- |
-
-
-
- | claim_version |
-
-
-
-
-
-
- Integer
-
- (uint8) Minimum: 0.0
-
-
-
-
- |
-
-
-
- The version of the claim. Defaults to 1.
- |
-
-
-
-
- NO
- |
-
-
-
-
- N/A
- |
-
-
-
- | format |
-
-
-
-
-
-
- String
- |
-
-
-
- The format of the source file as a MIME type.
- |
-
-
-
-
- NO
- |
-
-
-
-
- application/octet-stream
- |
-
-
-
- | ingredients |
-
-
-
-
-
-
-
- An array of
- Ingredient
- |
-
-
- A List of ingredients |
-
-
-
-
- NO
- |
-
-
-
- Empty array
- |
-
-
-
- | instance_id |
-
-
-
-
-
-
- String
- |
-
-
-
-
- Instance ID from
- xmpMM:InstanceID
- in XMP metadata.
-
- |
-
-
-
-
- NO
- |
-
-
-
-
- xmp:iid:dde3986c-d7b2-4256-b5dd-acc8ed9aada3
- |
-
-
-
- | label |
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- Allows you to pre-define the manifest label, which must be unique. Not
- intended for general use. If not set, it will be assigned
- automatically.
-
- |
-
-
-
-
- NO
- |
-
-
-
-
- N/A
- |
-
-
-
- | metadata |
-
-
-
-
-
-
- Array of
-
- Metadata
-
-
-
-
- |
-
-
-
-
- Optional manifest metadata. This will be deprecated in the future; not
- recommended to use.
-
- |
-
-
-
-
- NO
- |
-
-
-
-
- N/A
- |
-
-
-
- | redactions |
-
-
-
-
-
-
- Array of string
-
-
-
-
- |
-
-
-
- A list of redactions - URIs to redacted assertions.
- |
-
-
-
-
- NO
- |
-
-
-
-
- N/A
- |
-
-
-
- | thumbnail |
-
-
-
-
- ResourceRef
-
-
- |
-
-
-
-
- An optional ResourceRef to a thumbnail image that represents the asset
- that was signed. Must be available when the manifest is signed.
-
- |
-
-
-
-
- NO
- |
-
-
-
-
- N/A
- |
-
-
-
- | title |
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
- A human-readable title, generally source filename.
- |
-
-
-
-
- NO
- |
-
-
-
-
- N/A
- |
-
-
-
- | vendor |
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- Optional prefix added to the generated Manifest Label This is
- typically a reverse domain name.
-
- |
-
-
-
-
- NO
- |
-
-
-
-
- N/A
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-Identifies a person responsible for an action.
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | credentials |
-
-
-
-
-
-
-
- Array of
-
- HashedUri
-
-
-
-
- |
-
-
-
-
- List of references to W3C Verifiable Credentials.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | identifier |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- An identifier for a human actor, used when the “type” is
- humanEntry.identified.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
-
- This allows the assertion to be expressed as CBOR or JSON. The default is
- CBOR unless you specify that an assertion should be JSON.
-
-
-Any of the following:
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- Defines an assertion that consists of a label that can be either a
- C2PA-defined assertion label or a custom label in reverse domain format.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | data |
-
-
-
-
-
-
-
- AssertionData
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | label |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | type |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | version |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- Description of the claim generator, or the software used in generating the
- claim. This structure is also used for actions softwareAgent
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | icon |
-
-
-
-
-
- UriOrResource
-
-
- |
-
-
-
-
- hashed URI to the icon (either embedded or remote)
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | name |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- A human readable string naming the claim_generator
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | operating_system |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- A human readable string of the OS the claim generator is running on
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | version |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- A human readable string of the product’s version
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
-
-
- NOTE: This object can have any number of additional user-defined properties.
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- An x, y coordinate used for specifying vertices in polygons.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | x |
-
-
-
-
-
-
-
- Number / double
- |
-
-
-
- The coordinate along the x-axis.
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | y |
-
-
-
-
-
-
-
- Number / double
- |
-
-
-
- The coordinate along the y-axis.
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-A description of the source for assertion data
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | actors |
-
-
-
-
-
-
-
- Array of
-
- Actor
-
-
-
-
- |
-
-
-
-
- A list of actors associated with this source.
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | details |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- A human-readable string giving details about the source of the
- assertion data.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | type |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
-
- A value from among the enumerated list indicating the source of the
- assertion.
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A frame range representing starting and ending frames or pages. If both
- start and
- end are missing, the
- frame will span the entire asset.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | end |
-
-
-
-
-
-
-
- Integer
-
- (int32)
-
-
-
-
- |
-
-
-
-
-
- The end of the frame inclusive or the end of the asset if not
- present.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | start |
-
-
-
-
-
-
-
- Integer
-
- (int32)
-
-
-
-
- |
-
-
-
-
- The start of the frame or the end of the asset if not present.
-
- The first frame/page starts at 0.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A HashedUri provides
- a reference to content available within the same manifest store. This is
- described in
- §8.3, URI References
- of the C2PA Technical Specification.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | alg |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- A string identifying the cryptographic hash algorithm used to
- compute the hash
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | hash |
-
-
-
-
-
-
-
-
- An array of
- integer
- |
-
-
-
-
- Byte string containing the hash value
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | url |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- An Ingredient is any
- external asset that has been used in the creation of an asset.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | active_manifest |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The active manifest label (if one exists).
-
-
- If this ingredient has a manifest store, this is the label of the
- active manifest.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | data |
-
-
-
-
-
- ResourceRef
-
-
- |
-
-
-
-
- A reference to the actual data of the ingredient.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | data_types |
-
-
-
-
-
-
-
- Array of
-
- AssetType
-
-
-
-
- |
-
-
-
-
-
- Additional information about the data’s type to the ingredient V2
- structure.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | description |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- Additional description of the ingredient.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | document_id |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- Document ID from
- xmpMM:DocumentID
- in XMP metadata.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | format |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The format of the source file as a MIME type.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | hash |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- An optional hash of the asset to prevent duplicates.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | informational_URI |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- URI to an informational page about the ingredient or its data.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | instance_id |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- Instance ID from
- xmpMM:InstanceID
- in XMP metadata.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | label |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The ingredient’s label as assigned in the manifest.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | manifest_data |
-
-
-
-
-
- ResourceRef
-
-
- |
-
-
-
-
-
- A manifest store from the source asset extracted as a binary C2PA
- blob.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | metadata |
-
-
-
-
-
- Metadata
-
-
- |
-
-
-
-
-
- Any additional
- Metadata
- as defined in the C2PA spec.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | provenance |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- URI from
- dcterms:provenance
- in XMP metadata.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | relationship |
-
-
-
-
-
- Relationship
-
-
- |
-
-
-
-
-
- Set to
- ParentOf
- if this is the parent ingredient.
-
-
- There can only be one parent ingredient in the ingredients.
-
- |
-
-
- NO |
-
-
- componentOf |
-
-
-
- | thumbnail |
-
-
-
-
-
- ResourceRef
-
-
- |
-
-
-
-
-
- A thumbnail image capturing the visual state at the time of import.
-
-
-
- A tuple of thumbnail MIME format (for example
- image/jpeg) and binary bits of the image.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | title |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- A human-readable title, generally source filename.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | validation_results |
-
-
-
-
-
- ValidationResults
-
-
- |
-
-
-
- Validation results (Ingredient.V3)
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | validation_status |
-
-
-
-
-
-
-
- Array of
-
- ValidationStatus
-
-
-
-
- |
-
-
-
-
- Validation status (Ingredient v1 & v2)
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- Represents any changes or deltas between the current and previous validation
- results for an ingredient’s manifest.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | ingredientAssertionURI |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- JUMBF URI reference to the ingredient assertion
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | validationDeltas |
-
-
-
-
-
- StatusCodes
-
-
- |
-
-
-
-
- Validation results for the ingredient’s active manifest
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-Description of the boundaries of an identified range.
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | identifier |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
-
- The container-specific term used to identify items, such as
- “track_id” for MP4 or “item_ID” for HEIF.
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | value |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
-
- The value of the identifier, e.g. a value of “2” for an identifier
- of “track_id” would imply track 2 of the asset.
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- The Metadata structure can be used as part of other assertions or on its own
- to reference others
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | dataSource |
-
-
-
-
-
- DataSource
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | dateTime |
-
-
-
-
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | reference |
-
-
-
-
-
- HashedUri
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | regionOfInterest |
-
-
-
-
-
- RegionOfInterest
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | reviewRatings |
-
-
-
-
-
-
-
- Array of
-
- ReviewRating
-
-
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
-
-
- NOTE: This object can have any number of additional user-defined properties.
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A spatial, temporal, frame, or textual range describing the region of
- interest.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | frame |
-
-
-
-
-
- Frame
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | item |
-
-
-
-
-
- Item
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | shape |
-
-
-
-
-
- Shape
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | text |
-
-
-
-
-
- Text
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | time |
-
-
-
-
-
- Time
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | type |
-
-
-
-
-
- RangeType
-
-
- |
-
-
-
- The type of range of interest.
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-The type of range for the region of interest.
-
-
-
-
- | RangeType |
- Type |
- Description |
-
-
-
-
-
- | spatial |
- string |
-
-
-
- A spatial range. See
- Shape
- for more details.
-
-
- |
-
-
- | temporal |
- string |
-
-
-
- A temporal range. See
- Time
- for more details.
-
-
- |
-
-
- | frame |
- string |
-
-
-
- A spatial range. See
- Frame
- for more details.
-
-
- |
-
-
- | textual |
- string |
-
-
-
- A textual range. See
- Text for
- more details.
-
-
- |
-
-
- | identified |
- string |
-
-
-
- A range identified by a specific identifier and value. See
- Item for
- more details.
-
-
- |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A region of interest within an asset describing the change. This struct can be
- used from
- Action::changes
- or
- Metadata::region_of_interest
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | description |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | identifier |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- A free-text string representing a machine-readable, unique to this
- assertion, identifier for the region.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | metadata |
-
-
-
-
-
- Metadata
-
-
- |
-
-
-
-
- Additional information about the asset.
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | name |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- A free-text string representing a human-readable name for the region
- which might be used in a user interface.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | region |
-
-
-
-
-
-
-
-
- An array of
- Range
- |
-
-
-
-
-
- A range describing the region of interest for the specific asset.
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | role |
-
-
-
-
-
- Role
-
-
- |
-
-
-
-
-
- A value from our controlled vocabulary or an entity-specific value
- (e.g., com.litware.coolArea) that represents the role of a region
- among other regions.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | type |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- A value from a controlled vocabulary such as
- https://cv.iptc.org/newscodes/imageregiontype/
- or an entity-specific value (e.g., com.litware.newType) that
- represents the type of thing(s) depicted by a region.
-
-
-
- Note this field serializes/deserializes into the name
- type.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-A string that is one of the following:
-
-
- - “parentOf”
- - “componentOf”
- - “inputTo”
-
-
-
- Definitions
-
-
-
-
-
-
-
- A reference to a resource to be used in JSON serialization. The underlying
- data can be read as a stream via
- Reader::resource_to_stream .
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | alg |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The algorithm used to hash the resource (if applicable).
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | data_types |
-
-
-
-
-
-
-
- Array of
-
- AssetType
-
-
-
-
- |
-
-
-
-
- More detailed data types as defined in the C2PA spec.
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | format |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- The mime type of the referenced resource.
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | hash |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The hash of the resource (if applicable).
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | identifier |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
-
- A URI that identifies the resource as referenced from the manifest.
-
-
-
- This may be a JUMBF URI, a file path, a URL or any other string.
- Relative JUMBF URIs will be resolved with the manifest label.
- Relative file paths will be resolved with the base path if provided.
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A rating on an Assertion. See
- https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html#_claim_review.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | code |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | explanation |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | value |
-
-
-
-
-
-
-
- Integer (uint8)
- Minimum: 0.0
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-A role describing the region.
-
-
-
-
- | Role |
- Type |
- Description |
-
-
-
-
-
- | c2pa.areaOfInterest |
- string |
-
- Arbitrary area worth identifying.
- |
-
-
- | c2pa.cropped |
- string |
-
-
- This area is all that is left after a crop action.
-
- |
-
-
- | c2pa.edited |
- string |
-
-
- This area has had edits applied to it.
-
- |
-
-
- | c2pa.placed |
- string |
-
-
- The area where an ingredient was placed/added.
-
- |
-
-
- | c2pa.redacted |
- string |
-
- Something in this area was redacted.
- |
-
-
- | c2pa.subjectArea |
- string |
-
-
- Area specific to a subject (human or not).
-
- |
-
-
- | c2pa.deleted |
- string |
-
-
- A range of information was removed/deleted.
-
- |
-
-
- | c2pa.styled |
- string |
-
- Styling was applied to this area.
- |
-
-
- | c2pa.watermarked |
- string |
-
-
-
- Invisible watermarking was applied to this area for the purpose of
- soft binding.
-
-
- |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A spatial range representing rectangle, circle, or a polygon.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | height |
-
-
-
-
-
-
-
- Number
-
- (double)
-
-
-
-
- |
-
-
-
-
- The height of a rectnagle.
-
- This field can be ignored for circles and polygons.
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | inside |
-
-
-
-
-
-
-
- Boolean
-
-
-
-
-
- |
-
-
-
-
- If the range is inside the shape.
-
- The default value is true.
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | origin |
-
-
-
-
-
- Coordinate
-
-
- |
-
-
-
-
- THe origin of the coordinate in the shape.
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | type |
-
-
-
-
-
- ShapeType
-
-
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | unit |
-
-
-
-
-
- UnitType
-
-
- |
-
-
-
-
- The type of unit for the shape range.
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | vertices |
-
-
-
-
-
-
-
- Array of
-
- Coordinate
-
-
-
-
- |
-
-
-
-
- The vertices of the polygon.
-
- This field can be ignored for rectangles and circles.
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | width |
-
-
-
-
-
-
-
- Number
-
- (double)
-
-
-
-
- |
-
-
-
-
- The width for rectangles or diameter for circles.
-
- This field can be ignored for polygons.
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-The type of shape for the range.
-
-
-
-
- | ShapeType |
- Type |
- Description |
-
-
-
-
-
- | rectangle |
- string |
-
-
- |
-
-
- | circle |
- string |
-
-
- |
-
-
- | polygon |
- string |
-
-
- |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- Contains a set of success, informational, and failure validation status codes.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | failure |
-
-
-
-
-
-
-
-
- An array of
- ValidationStatus
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | informational |
-
-
-
-
-
-
-
-
- An array of
- ValidationStatus
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | success |
-
-
-
-
-
-
-
-
- An array of
- ValidationStatus
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-Text
-
-
-
-
- A textual range representing multiple (possibly discontinuous) ranges of text.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | selectors |
-
-
-
-
-
-
-
-
- An array of
- TextSelectorRange
- |
-
-
-
- The ranges of text to select.
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-TextSelector
-
-
-
-
- Selects a range of text via a fragment identifier. This is modeled after the
- W3C Web Annotation selector model.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | end |
-
-
-
-
-
-
-
- Integer
-
- (int32)
-
-
-
-
- |
-
-
-
-
-
- The end character offset or the end of the fragment if not present.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | fragment |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
-
- Fragment identifier as per RFC3023 (XML) or ISO 32000-2 (PDF), Annex
- O.
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | start |
-
-
-
-
-
-
-
- Integer
-
- (int32)
-
-
-
-
- |
-
-
-
-
-
- The start character offset or the start of the fragment if not
- present.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-TextSelectorRange
-
-
-
-
- One or two TextSelectors identifiying the range to
- select.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | end |
-
-
-
-
-
- TextSelector
-
-
- |
-
-
-
- The end of the text range.
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | selector |
-
-
-
-
-
- TextSelector
-
-
- |
-
-
-
- The start (or entire) text range.
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A temporal range representing a starting time to an ending time.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | end |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The end time or the end of the asset if not present.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | start |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The start time or the start of the asset if not present.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | type |
-
-
-
-
-
- TimeType
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- npt |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-The type of time.
-
-
-
-
- | TimeType |
- Type |
- Description |
-
-
-
-
-
- | npt |
- string |
-
-
-
- Times are described using Normal Play Time (npt) as described in RFC
- 2326.
-
-
- |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-The type of unit for the range.
-
-
-
-
- | UnitType |
- Type |
- Description |
-
-
-
-
-
- | pixel |
- string |
-
-
- |
-
-
- | percent |
- string |
-
-
- |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
-Any of the following:
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A map of validation results for a manifest store. The map contains the
- validation results for the active manifest and any ingredient deltas. It is
- normal for there to be many
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | activeManifest |
-
-
-
-
-
- StatusCodes
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | ingredientDeltas |
-
-
-
-
-
-
-
- Array of
-
- IngredientDeltaValidationResult
-
-
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A
- ValidationStatus
- struct describes the validation status of a specific part of a manifest. See
- https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html#_existing_manifests.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | code |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | explanation |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | success |
-
-
-
-
-
-
-
- Boolean
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | url |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
-
-
-
-
-
-
diff --git a/docs/manifest/json-ref/manifest-def.mdx b/docs/manifest/json-ref/manifest-def.mdx
index 95a88b98..158c1b8b 100644
--- a/docs/manifest/json-ref/manifest-def.mdx
+++ b/docs/manifest/json-ref/manifest-def.mdx
@@ -1,17 +1,13 @@
---
-id: manifest-def
-title: ManifestDefinition JSON reference
+id: manifest-definition-schema
+title: ManifestDefinition reference
hide_table_of_contents: true
---
-import ManifestReference from './manifest-ref.js';
-
:::danger Warning
-This is a beta release of this reference. It is a work in progress and may not be accurate or complete. It was generated from the unmodified JSON schema generated from c2pa-rs on 05/09/2025.
+This is a beta release of this reference. It is a work in progress and may have issues or errors.
:::
-The [C2PA specification](https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_manifests) describes a manifest with a binary structure in JPEG universal metadata box format ([JUMBF](https://www.iso.org/standard/84635.html)) that includes JSON as well as binary data for things like encryption keys and thumbnail images. Because the binary structure is hard to understand and program to, the SDK defines a JSON manifest structure that's a declarative language for representing and creating a binary manifest.
-
-The JSON manifest is an abstract translation layer that's easier to understand than the binary format. It can describe everything in the underlying binary format except for binary data such as thumbnails that are included by a structure called a _resource reference_. To generate a binary manifest, the SDK assembles all the JSON objects, resource references, and ingredients defined, and then converts them into different assertions and other objects as required.
+import SchemaReference from '@site/src/components/SchemaReference';
-
+
diff --git a/docs/manifest/json-ref/manifest-json-schema.md b/docs/manifest/json-ref/manifest-json-schema.md
deleted file mode 100644
index 9890c92a..00000000
--- a/docs/manifest/json-ref/manifest-json-schema.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-id: manifest-json-schema
-title: Manifest store JSON schema
-hide_table_of_contents: true
-pagination_next: null
-pagination_prev: null
----
-
-This is the JSON schema for a Manifest store. For a more readable reference based on this schema, see [Manifest store reference](./manifest-ref).
-
-
diff --git a/docs/manifest/json-ref/manifest-ref.js b/docs/manifest/json-ref/manifest-ref.js
deleted file mode 100644
index f0d3a4b3..00000000
--- a/docs/manifest/json-ref/manifest-ref.js
+++ /dev/null
@@ -1,54 +0,0 @@
-import BrowserOnly from '@docusaurus/BrowserOnly';
-import React, { useEffect, useRef, useState } from 'react';
-import './cai-addon.css';
-
-// Import all possible HTML files statically
-const htmlFiles = {
- './manifest-def.html': require('!!raw-loader!./manifest-def.html')?.default,
- './reader.html': require('!!raw-loader!./reader.html')?.default,
- // Add other HTML files here as needed
-};
-
-const ManifestReference = ({ htmlPath }) => {
- const myRef = useRef(null);
- const [refAquired, setRefAquired] = useState(false);
- const [htmlContent, setHtmlContent] = useState('');
-
- useEffect(() => {
- setRefAquired(true);
- }, []);
-
- useEffect(() => {
- // Get the HTML content from our static imports
- const content = htmlFiles[htmlPath];
- if (content) {
- setHtmlContent(content);
- } else {
- console.error(`HTML file not found: ${htmlPath}`);
- setHtmlContent('Error: HTML file not found
');
- }
- }, [htmlPath]);
-
- useEffect(() => {
- if (myRef.current) {
- for (const link of myRef.current.querySelectorAll('a')) {
- if (link.hasAttribute('href')) {
- let linkStr = link.getAttribute('href');
- if (linkStr.startsWith('crate::')) {
- link.setAttribute('href', '#' + linkStr.substring(7).toLowerCase());
- }
- }
- }
- }
- }, [refAquired, htmlContent]);
-
- return (
-
- {() => (
-
- )}
-
- );
-};
-
-export default ManifestReference;
diff --git a/docs/manifest/json-ref/reader-ref.mdx b/docs/manifest/json-ref/reader-ref.mdx
new file mode 100644
index 00000000..97f5216d
--- /dev/null
+++ b/docs/manifest/json-ref/reader-ref.mdx
@@ -0,0 +1,13 @@
+---
+id: reader-schema
+title: Reader reference
+hide_table_of_contents: true
+---
+
+:::danger Warning
+This is a beta release of this reference. It is a work in progress and may have issues or errors.
+:::
+
+import SchemaReference from '@site/src/components/SchemaReference';
+
+
diff --git a/docs/manifest/json-ref/reader.html b/docs/manifest/json-ref/reader.html
deleted file mode 100644
index 363b4c8c..00000000
--- a/docs/manifest/json-ref/reader.html
+++ /dev/null
@@ -1,5329 +0,0 @@
-
-
-A reader for the manifest store.
-
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | active_manifest |
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
- A label for the active (most recent) manifest in the store
- |
-
-
-
- NO
- |
-
-
-
-
- N/A
- |
-
-
-
- | manifests |
-
- Object |
-
-
-
- A HashMap of Manifests
-
- See
- Manifest
- |
-
-
-
- YES
- |
-
-
-
-
- N/A
- |
-
-
-
- | validation_results |
-
-
-
-
- ValidationResults
-
-
- |
-
-
-
-
- ValidationStatus generated when loading the ManifestStore from an
- asset
-
- |
-
-
-
- NO
- |
-
-
-
-
- N/A
- |
-
-
-
- | validation_state |
-
-
-
-
- ValidationState
-
-
- |
-
-
-
- The validation state of the manifest store
- |
-
-
-
- NO
- |
-
-
-
-
- N/A
- |
-
-
-
- | validation_status |
-
-
-
-
-
-
- Array of
-
- ValidationStatus
-
-
-
-
- |
-
-
-
-
- ValidationStatus generated when loading the ManifestStore from an
- asset
-
- |
-
-
-
- NO
- |
-
-
-
-
- N/A
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-Identifies a person responsible for an action.
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | credentials |
-
-
-
-
-
-
-
- Array of
-
- HashedUri
-
-
-
-
- |
-
-
-
-
- List of references to W3C Verifiable Credentials.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | identifier |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- An identifier for a human actor, used when the “type” is
- humanEntry.identified.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | type |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | version |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- Description of the claim generator, or the software used in generating the
- claim. This structure is also used for actions softwareAgent
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | icon |
-
-
-
-
-
- UriOrResource
-
-
- |
-
-
-
-
- hashed URI to the icon (either embedded or remote)
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | name |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- A human readable string naming the claim_generator
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | operating_system |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- A human readable string of the OS the claim generator is running on
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | version |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- A human readable string of the product’s version
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
-
-
- NOTE: This object can have any number of additional user-defined properties.
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- An x, y coordinate used for specifying vertices in polygons.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | x |
-
-
-
-
-
-
-
- Number / double
- |
-
-
-
- The coordinate along the x-axis.
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | y |
-
-
-
-
-
-
-
- Number / double
- |
-
-
-
- The coordinate along the y-axis.
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-A description of the source for assertion data
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | actors |
-
-
-
-
-
-
-
- Array of
-
- Actor
-
-
-
-
- |
-
-
-
-
-
- A list of [Actor]s associated with this source.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | details |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- A human-readable string giving details about the source of the
- assertion data.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | type |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
-
- A value from among the enumerated list indicating the source of the
- assertion.
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-A string.
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A frame range representing starting and ending frames or pages. If both
- start and
- end are missing, the
- frame will span the entire asset.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | end |
-
-
-
-
-
-
-
- Integer
-
- (int32)
-
-
-
-
- |
-
-
-
-
-
- The end of the frame inclusive or the end of the asset if not
- present.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | start |
-
-
-
-
-
-
-
- Integer
-
- (int32)
-
-
-
-
- |
-
-
-
-
- The start of the frame or the end of the asset if not present.
-
- The first frame/page starts at 0.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A HashedUri provides
- a reference to content available within the same manifest store. This is
- described in [§8.3, URI References], of the C2PA Technical Specification.
- [§8.3, URI References]:
- https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_uri_references
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | alg |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- A string identifying the cryptographic hash algorithm used to
- compute the hash
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | hash |
-
-
-
-
-
-
-
-
- An array of
- integer
- |
-
-
-
-
- Byte string containing the hash value
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | url |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- An Ingredient is any
- external asset that has been used in the creation of an asset.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | active_manifest |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The active manifest label (if one exists).
-
-
- If this ingredient has a [ManifestStore], this will hold the label of the active
- Manifest.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | data |
-
-
-
-
-
- ResourceRef
-
-
- |
-
-
-
-
- A reference to the actual data of the ingredient.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | data_types |
-
-
-
-
-
-
-
- Array of
-
- AssetType
-
-
-
-
- |
-
-
-
-
-
- Additional information about the data’s type to the ingredient V2
- structure.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | description |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- Additional description of the ingredient.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | document_id |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- Document ID from
- xmpMM:DocumentID
- in XMP metadata.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | format |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The format of the source file as a MIME type.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | hash |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- An optional hash of the asset to prevent duplicates.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | informational_URI |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- URI to an informational page about the ingredient or its data.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | instance_id |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- Instance ID from
- xmpMM:InstanceID
- in XMP metadata.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | label |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The ingredient’s label as assigned in the manifest.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | manifest_data |
-
-
-
-
-
- ResourceRef
-
-
- |
-
-
-
-
-
- A
- ManifestStore
- from the source asset extracted as a binary C2PA blob.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | metadata |
-
-
-
-
-
- Metadata
-
-
- |
-
-
-
-
-
- Any additional
- Metadata
- as defined in the C2PA spec.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | provenance |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- URI from
- dcterms:provenance
- in XMP metadata.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | relationship |
-
-
-
-
-
- Relationship
-
-
- |
-
-
-
-
-
- Set to
- ParentOf
- if this is the parent ingredient.
-
-
- There can only be one parent ingredient in the ingredients.
-
- |
-
-
- NO |
-
-
- componentOf |
-
-
-
- | resources |
-
-
-
-
-
- ResourceStore
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | thumbnail |
-
-
-
-
-
- ResourceRef
-
-
- |
-
-
-
-
-
- A thumbnail image capturing the visual state at the time of import.
-
-
-
- A tuple of thumbnail MIME format (for example
- image/jpeg) and binary bits of the image.
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | title |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- A human-readable title, generally source filename.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | validation_results |
-
-
-
-
-
- ValidationResults
-
-
- |
-
-
-
- Validation results (Ingredient.V3)
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | validation_status |
-
-
-
-
-
-
-
- Array of
-
- ValidationStatus
-
-
-
-
- |
-
-
-
-
- Validation status (Ingredient v1 & v2)
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- Represents any changes or deltas between the current and previous validation
- results for an ingredient’s manifest.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | ingredientAssertionURI |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- JUMBF URI reference to the ingredient assertion
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | validationDeltas |
-
-
-
-
-
- StatusCodes
-
-
- |
-
-
-
-
- Validation results for the ingredient’s active manifest
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-Description of the boundaries of an identified range.
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | identifier |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
-
- The container-specific term used to identify items, such as
- “track_id” for MP4 or “item_ID” for HEIF.
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | value |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
-
- The value of the identifier, e.g. a value of “2” for an identifier
- of “track_id” would imply track 2 of the asset.
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A Manifest represents all the information in a c2pa manifest
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | assertions |
-
-
-
-
-
-
-
-
- An array of
- ManifestAssertion
- |
-
-
-
-
- |
-
-
- NO |
-
-
- Empty array |
-
-
-
- | claim_generator |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- A User Agent formatted string identifying the
- software/hardware/system produced this claim Spaces are not allowed
- in names, versions can be specified with product/1.0 syntax
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | claim_generator_info |
-
-
-
-
-
-
-
- Array of
-
- ClaimGeneratorInfo
-
-
-
-
- |
-
-
-
-
-
- A list of claim generator info data identifying the
- software/hardware/system produced this claim
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | credentials |
-
-
-
-
-
-
-
- Array of true
-
-
-
-
- |
-
-
-
- A List of verified credentials
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | format |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The format of the source file as a MIME type.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | ingredients |
-
-
-
-
-
-
-
-
- An array of
- Ingredient
- |
-
-
-
-
- |
-
-
- NO |
-
-
- Empty array |
-
-
-
- | instance_id |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
-
- Instance ID from
- xmpMM:InstanceID
- in XMP metadata.
-
-
- |
-
-
- NO |
-
-
-
- xmp:iid:424afed8-279d-4793-a279-b80a00b8c32b
- |
-
-
-
- | label |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | metadata |
-
-
-
-
-
-
-
- Array of
-
- Metadata
-
-
-
-
- |
-
-
-
-
- A list of user metadata for this claim
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | redactions |
-
-
-
-
-
-
-
- Array of string
-
-
-
-
- |
-
-
-
-
- A list of redactions - URIs to a redacted assertions
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | resources |
-
-
-
-
-
- ResourceStore
-
-
- |
-
-
-
-
- container for binary assets (like thumbnails)
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | signature_info |
-
-
-
-
-
- SignatureInfo
-
-
- |
-
-
-
-
- Signature data (only used for reporting)
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | thumbnail |
-
-
-
-
-
- ResourceRef
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | title |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- A human-readable title, generally source filename.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | vendor |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- Optional prefix added to the generated Manifest Label This is
- typically Internet domain name for the vendor (i.e.
- adobe)
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A labeled container for an Assertion value in a Manifest
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | data |
-
-
-
-
-
- ManifestData
-
-
- |
-
-
-
- The data of the assertion as Value
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | instance |
-
-
-
-
-
-
-
- Integer
-
- (uint) Minimum: 0.0
-
-
-
-
- |
-
-
-
-
- There can be more than one assertion for any label
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | kind |
-
-
-
-
-
- ManifestAssertionKind
-
-
- |
-
-
-
-
-
- The [ManifestAssertionKind] for this assertion (as stored in c2pa
- content)
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | label |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- An assertion label in reverse domain format
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-A string that is one of the following:
-
-
- - “Cbor”
- - “Json”
- - “Binary”
- - “Uri”
-
-
-
- Definitions
-
-
-
-
-
-
-
-Any of the following:
-
-
-
- - true
-
-
- - type: integer, format: uint8, minimum: 0.0
-
-
-
- Definitions
-
-
-
-
-
-
-
- The Metadata structure can be used as part of other assertions or on its own
- to reference others
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | dataSource |
-
-
-
-
-
- DataSource
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | dateTime |
-
-
-
-
-
- DateT
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | reference |
-
-
-
-
-
- HashedUri
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | regionOfInterest |
-
-
-
-
-
- RegionOfInterest
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | reviewRatings |
-
-
-
-
-
-
-
- Array of
-
- ReviewRating
-
-
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
-
-
- NOTE: This object can have any number of additional user-defined properties.
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A spatial, temporal, frame, or textual range describing the region of
- interest.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | frame |
-
-
-
-
-
- Frame
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | item |
-
-
-
-
-
- Item
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | shape |
-
-
-
-
-
- Shape
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | text |
-
-
-
-
-
- Text
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | time |
-
-
-
-
-
- Time
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | type |
-
-
-
-
-
- RangeType
-
-
- |
-
-
-
- The type of range of interest.
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-The type of range for the region of interest.
-
-
-
-
- | RangeType |
- Type |
- Description |
-
-
-
-
-
- | spatial |
- string |
-
-
-
- A spatial range, see [Shape] for more details.
-
-
- |
-
-
- | temporal |
- string |
-
-
-
- A temporal range, see [Time] for more details.
-
-
- |
-
-
- | frame |
- string |
-
-
-
- A spatial range, see [Frame] for more details.
-
-
- |
-
-
- | textual |
- string |
-
-
-
- A textual range, see [Text] for more details.
-
-
- |
-
-
- | identified |
- string |
-
-
-
- A range identified by a specific identifier and value, see [Item] for more details.
-
-
- |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A region of interest within an asset describing the change. This struct can be
- used from [Action::changes][crate::assertions::Action::changes] or [Metadata::region_of_interest][crate::assertions::Metadata::region_of_interest].
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | description |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | identifier |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- A free-text string representing a machine-readable, unique to this
- assertion, identifier for the region.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | metadata |
-
-
-
-
-
- Metadata
-
-
- |
-
-
-
-
- Additional information about the asset.
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | name |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- A free-text string representing a human-readable name for the region
- which might be used in a user interface.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | region |
-
-
-
-
-
-
-
-
- An array of
- Range
- |
-
-
-
-
-
- A range describing the region of interest for the specific asset.
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | role |
-
-
-
-
-
- Role
-
-
- |
-
-
-
-
-
- A value from our controlled vocabulary or an entity-specific value
- (e.g., com.litware.coolArea) that represents the role of a region
- among other regions.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | type |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
-
- A value from a controlled vocabulary such as
- https://cv.iptc.org/newscodes/imageregiontype/
- or an entity-specific value (e.g., com.litware.newType) that
- represents the type of thing(s) depicted by a region.
-
-
-
- Note this field serializes/deserializes into the name
- type.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-A string that is one of the following:
-
-
- - “parentOf”
- - “componentOf”
- - “inputTo”
-
-
-
- Definitions
-
-
-
-
-
-
-
- A reference to a resource to be used in JSON serialization. The underlying
- data can be read as a stream via [Reader::resource_to_stream][crate::Reader::resource_to_stream].
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | alg |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The algorithm used to hash the resource (if applicable).
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | data_types |
-
-
-
-
-
-
-
- Array of
-
- AssetType
-
-
-
-
- |
-
-
-
-
- More detailed data types as defined in the C2PA spec.
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | format |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- The mime type of the referenced resource.
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | hash |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The hash of the resource (if applicable).
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | identifier |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
-
- A URI that identifies the resource as referenced from the manifest.
-
-
-
- This may be a JUMBF URI, a file path, a URL or any other string.
- Relative JUMBF URIs will be resolved with the manifest label.
- Relative file paths will be resolved with the base path if provided.
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- Resource store to contain binary objects referenced from JSON serializable
- structures
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | base_path |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | label |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | resources |
-
-
-
-
-
-
-
- (Object)
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A rating on an Assertion. See
- https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html#_claim_review.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | code |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | explanation |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | value |
-
-
-
-
-
-
-
- Integer (uint8)
- Minimum: 0.0
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-A role describing the region.
-
-
-
-
- | Role |
- Type |
- Description |
-
-
-
-
-
- | c2pa.areaOfInterest |
- string |
-
- Arbitrary area worth identifying.
- |
-
-
- | c2pa.cropped |
- string |
-
-
- This area is all that is left after a crop action.
-
- |
-
-
- | c2pa.edited |
- string |
-
-
- This area has had edits applied to it.
-
- |
-
-
- | c2pa.placed |
- string |
-
-
- The area where an ingredient was placed/added.
-
- |
-
-
- | c2pa.redacted |
- string |
-
- Something in this area was redacted.
- |
-
-
- | c2pa.subjectArea |
- string |
-
-
- Area specific to a subject (human or not).
-
- |
-
-
- | c2pa.deleted |
- string |
-
-
- A range of information was removed/deleted.
-
- |
-
-
- | c2pa.styled |
- string |
-
- Styling was applied to this area.
- |
-
-
- | c2pa.watermarked |
- string |
-
-
-
- Invisible watermarking was applied to this area for the purpose of
- soft binding.
-
-
- |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A spatial range representing rectangle, circle, or a polygon.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | height |
-
-
-
-
-
-
-
- Number
-
- (double)
-
-
-
-
- |
-
-
-
-
- The height of a rectnagle.
-
- This field can be ignored for circles and polygons.
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | inside |
-
-
-
-
-
-
-
- Boolean
-
-
-
-
-
- |
-
-
-
-
- If the range is inside the shape.
-
- The default value is true.
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | origin |
-
-
-
-
-
- Coordinate
-
-
- |
-
-
-
-
- THe origin of the coordinate in the shape.
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | type |
-
-
-
-
-
- ShapeType
-
-
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | unit |
-
-
-
-
-
- UnitType
-
-
- |
-
-
-
-
- The type of unit for the shape range.
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | vertices |
-
-
-
-
-
-
-
- Array of
-
- Coordinate
-
-
-
-
- |
-
-
-
-
- The vertices of the polygon.
-
- This field can be ignored for rectangles and circles.
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | width |
-
-
-
-
-
-
-
- Number
-
- (double)
-
-
-
-
- |
-
-
-
-
- The width for rectangles or diameter for circles.
-
- This field can be ignored for polygons.
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-The type of shape for the range.
-
-
-
-
- | ShapeType |
- Type |
- Description |
-
-
-
-
-
- | rectangle |
- string |
-
-
- |
-
-
- | circle |
- string |
-
-
- |
-
-
- | polygon |
- string |
-
-
- |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-Holds information about a signature
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | alg |
-
-
-
-
-
- SigningAlg
-
-
- |
-
-
-
-
- Human-readable issuing authority for this signature.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | cert_serial_number |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The serial number of the certificate.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | issuer |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- Human-readable issuing authority for this signature.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | revocation_status |
-
-
-
-
-
-
-
- Boolean
-
-
-
-
-
- |
-
-
-
-
- Revocation status of the certificate.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | time |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
- The time the signature was created.
- |
-
-
- NO |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-Describes the digital signature algorithms allowed by the C2PA spec.
-
-
- Per
- §13.2, “Digital Signatures”:
-
-
-
-
- All digital signatures applied as per the technical requirements of this
- > specification shall be generated using one of the digital signature
- > algorithms and key types listed as described in this section.
-
-
-
-
-
-
- | SigningAlg |
- Type |
- Description |
-
-
-
-
-
- | Es256 |
- string |
-
-
- |
-
-
- | Es384 |
- string |
-
-
- |
-
-
- | Es512 |
- string |
-
-
- |
-
-
- | Ps256 |
- string |
-
-
- RSASSA-PSS using SHA-256 and MGF1 with SHA-256
-
- |
-
-
- | Ps384 |
- string |
-
-
- RSASSA-PSS using SHA-384 and MGF1 with SHA-384
-
- |
-
-
- | Ps512 |
- string |
-
-
- RSASSA-PSS using SHA-512 and MGF1 with SHA-512
-
- |
-
-
- | Ed25519 |
- string |
-
-
- Edwards-Curve DSA (Ed25519 instance only)
-
- |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- Contains a set of success, informational, and failure validation status codes.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | failure |
-
-
-
-
-
-
-
-
- An array of
- ValidationStatus
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | informational |
-
-
-
-
-
-
-
-
- An array of
- ValidationStatus
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | success |
-
-
-
-
-
-
-
-
- An array of
- ValidationStatus
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-Text
-
-
-
-
- A textual range representing multiple (possibly discontinuous) ranges of text.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | selectors |
-
-
-
-
-
-
-
-
- An array of
- TextSelectorRange
- |
-
-
-
- The ranges of text to select.
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-TextSelector
-
-
-
-
- Selects a range of text via a fragment identifier. This is modeled after the
- W3C Web Annotation selector model.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | end |
-
-
-
-
-
-
-
- Integer
-
- (int32)
-
-
-
-
- |
-
-
-
-
-
- The end character offset or the end of the fragment if not present.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | fragment |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
-
- Fragment identifier as per RFC3023 (XML) or ISO 32000-2 (PDF), Annex
- O.
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | start |
-
-
-
-
-
-
-
- Integer
-
- (int32)
-
-
-
-
- |
-
-
-
-
-
- The start character offset or the start of the fragment if not
- present.
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-TextSelectorRange
-
-
-
-
- One or two [TextSelector][TextSelector] identifiying the range to select.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | end |
-
-
-
-
-
- TextSelector
-
-
- |
-
-
-
- The end of the text range.
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | selector |
-
-
-
-
-
- TextSelector
-
-
- |
-
-
-
- The start (or entire) text range.
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A temporal range representing a starting time to an ending time.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | end |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The end time or the end of the asset if not present.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | start |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- The start time or the start of the asset if not present.
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | type |
-
-
-
-
-
- TimeType
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- npt |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-The type of time.
-
-
-
-
- | TimeType |
- Type |
- Description |
-
-
-
-
-
- | npt |
- string |
-
-
-
- Times are described using Normal Play Time (npt) as described in RFC
- 2326.
-
-
- |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-The type of unit for the range.
-
-
-
-
- | UnitType |
- Type |
- Description |
-
-
-
-
-
- | pixel |
- string |
-
-
- |
-
-
- | percent |
- string |
-
-
- |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
-Any of the following:
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A map of validation results for a manifest store. The map contains the
- validation results for the active manifest and any ingredient deltas. It is
- normal for there to be many
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | activeManifest |
-
-
-
-
-
- StatusCodes
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
- | ingredientDeltas |
-
-
-
-
-
-
-
- Array of
-
- IngredientDeltaValidationResult
-
-
-
-
- |
-
-
-
-
- |
-
-
- NO |
-
-
- N/A |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-Indicates if the manifest store is valid and trusted.
-
-
- The Trusted state implies the manifest store is valid and the active signature
- is trusted.
-
-
-
-
-
- | ValidationState |
- Type |
- Description |
-
-
-
-
-
- | Invalid |
- string |
-
-
- Errors were found in the manifest store.
-
- |
-
-
- | Valid |
- string |
-
-
-
- No errors were found in validation, but the active signature is not
- trusted.
-
-
- |
-
-
- | Trusted |
- string |
-
-
-
- The manifest store is valid and the active signature is trusted.
-
-
- |
-
-
-
-
-
-
-
- Definitions
-
-
-
-
-
-
-
- A
- ValidationStatus
- struct describes the validation status of a specific part of a manifest. See
- https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html#_existing_manifests.
-
-
-
-
-
- | Property |
- Type |
- Description |
- Required? |
- Default Value |
-
-
-
-
-
- | code |
-
-
-
-
-
-
-
- String
- |
-
-
-
-
- |
-
-
-
- YES
- |
-
-
- N/A |
-
-
-
- | explanation |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | success |
-
-
-
-
-
-
-
- Boolean
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
- | url |
-
-
-
-
-
-
-
- String
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- NO
- |
-
-
- N/A |
-
-
-
-
-
-
-
-
-
diff --git a/docs/manifest/json-ref/reader.mdx b/docs/manifest/json-ref/reader.mdx
deleted file mode 100644
index c1085af8..00000000
--- a/docs/manifest/json-ref/reader.mdx
+++ /dev/null
@@ -1,17 +0,0 @@
----
-id: reader
-title: Reader JSON reference
-hide_table_of_contents: true
----
-
-import ManifestReference from './manifest-ref.js';
-
-:::danger Warning
-This is a beta release of this reference. It is a work in progress and may not be accurate or complete. It was generated from the unmodified JSON schema generated from c2pa-rs on 05/09/2025.
-:::
-
-The [C2PA specification](https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_manifests) describes a manifest with a binary structure in JPEG universal metadata box format ([JUMBF](https://www.iso.org/standard/84635.html)) that includes JSON as well as binary data for things like encryption keys and thumbnail images. Because the binary structure is hard to understand and program to, the SDK defines a JSON manifest structure that's a declarative language for representing and creating a binary manifest.
-
-The JSON manifest is an abstract translation layer that's easier to understand than the binary format. It can describe everything in the underlying binary format except for binary data such as thumbnails that are included by a structure called a _resource reference_. To generate a binary manifest, the SDK assembles all the JSON objects, resource references, and ingredients defined, and then converts them into different assertions and other objects as required.
-
-
diff --git a/docs/manifest/json-ref/settings-ref.mdx b/docs/manifest/json-ref/settings-ref.mdx
new file mode 100644
index 00000000..cd54b5e0
--- /dev/null
+++ b/docs/manifest/json-ref/settings-ref.mdx
@@ -0,0 +1,13 @@
+---
+id: settings-schema
+title: Settings reference
+hide_table_of_contents: true
+---
+
+:::danger Warning
+This is a beta release of this reference. It is a work in progress and may have issues or errors.
+:::
+
+import SchemaReference from '@site/src/components/SchemaReference';
+
+
diff --git a/sidebars.js b/sidebars.js
index 506b235d..7b855bf4 100644
--- a/sidebars.js
+++ b/sidebars.js
@@ -55,10 +55,6 @@ const sidebars = {
type: 'doc',
id: 'manifest/reading/manifest-validation',
},
- {
- type: 'doc',
- id: 'manifest/json-ref/reader',
- },
],
},
{
@@ -75,9 +71,33 @@ const sidebars = {
type: 'doc',
id: 'manifest/writing/assertions-actions',
},
+ ],
+ },
+ {
+ type: 'category',
+ label: 'JSON manifest reference',
+ link: { type: 'doc', id: 'manifest/json-ref/index' },
+ collapsed: true,
+ items: [
+ {
+ type: 'doc',
+ id: 'manifest/json-ref/reader-schema',
+ label: 'Reader',
+ },
+ {
+ type: 'doc',
+ id: 'manifest/json-ref/builder-schema',
+ label: 'Builder',
+ },
+ {
+ type: 'doc',
+ id: 'manifest/json-ref/manifest-definition-schema',
+ label: 'ManifestDefinition',
+ },
{
type: 'doc',
- id: 'manifest/json-ref/manifest-def',
+ id: 'manifest/json-ref/settings-schema',
+ label: 'Settings',
},
],
},
diff --git a/src/components/SchemaReference.js b/src/components/SchemaReference.js
new file mode 100644
index 00000000..277d010e
--- /dev/null
+++ b/src/components/SchemaReference.js
@@ -0,0 +1,497 @@
+import React, { useEffect, useMemo, useState } from 'react';
+
+const slugify = (text) =>
+ String(text || '')
+ .toLowerCase()
+ .replace(/[^a-z0-9]+/g, '')
+ .trim();
+
+const isObject = (v) => v && typeof v === 'object' && !Array.isArray(v);
+
+function formatType(cellSchema) {
+ if (!cellSchema) return 'N/A';
+
+ // $ref
+ if (cellSchema.$ref) {
+ const ref = cellSchema.$ref;
+ const name = ref.startsWith('#/$defs/') ? ref.replace('#/$defs/', '') : ref;
+ return `${name}`;
+ }
+
+ // enum
+ if (Array.isArray(cellSchema.enum)) {
+ return `Enum (${cellSchema.enum.join(', ')})`;
+ }
+
+ // oneOf / anyOf
+ if (Array.isArray(cellSchema.oneOf) || Array.isArray(cellSchema.anyOf)) {
+ const list = (cellSchema.oneOf || cellSchema.anyOf).map((s) =>
+ formatType(s),
+ );
+ return `Either ${list.join(' or ')}`;
+ }
+
+ // array
+ if (cellSchema.type === 'array' || isObject(cellSchema.items)) {
+ if (cellSchema.items) {
+ const inner = formatType(cellSchema.items);
+ return `Array of ${inner}`;
+ }
+ return 'Array';
+ }
+
+ // primitive or union of primitives
+ if (Array.isArray(cellSchema.type)) {
+ const types = cellSchema.type
+ .filter((t) => t !== 'null')
+ .map((t) => (typeof t === 'string' ? t : String(t)));
+ return types.map(capitalizeType).join(' or ');
+ }
+
+ if (typeof cellSchema.type === 'string') {
+ if (cellSchema.type === 'object') return 'Object';
+ return capitalizeType(cellSchema.type);
+ }
+
+ return 'N/A';
+}
+
+function capitalizeType(t) {
+ if (!t) return '';
+ switch (t) {
+ case 'string':
+ return 'String';
+ case 'number':
+ return 'Number';
+ case 'integer':
+ return 'Integer';
+ case 'boolean':
+ return 'Boolean';
+ case 'object':
+ return 'Object';
+ case 'array':
+ return 'Array';
+ default:
+ return String(t).charAt(0).toUpperCase() + String(t).slice(1);
+ }
+}
+
+function HTML({ html }) {
+ // Safe enough for our constrained formatting output
+ return ;
+}
+
+function markdownToHtml(text) {
+ if (!text) return '';
+ let html = String(text);
+
+ const escapeHtml = (s) =>
+ String(s)
+ .replace(/&/g, '&')
+ .replace(//g, '>')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''');
+
+ // Remove fenced code blocks delimited by triple backticks (```), with optional language
+ html = html.replace(/```[^\n]*\n[\s\S]*?```/g, '');
+
+ // Remove reference-style link definition blocks that follow a blank line
+ // e.g. "\n\n[`Builder`]: crate::Builder" or "\n\n[label]: https://..."
+ html = html.replace(/(?:\r?\n){2}(?:\s*\[[^\]]+\]:[^\n]*\r?\n?)+/g, '');
+
+ // Also remove any remaining single-line reference definitions
+ html = html.replace(/^\s*\[[^\]]+\]:\s*[^\n]+$/gm, '');
+
+ // Resolve Rust doc-style code references like [`Type`] or [`Type::member`]
+ const TYPE_MODULE_HINTS = {
+ Verify: 'settings',
+ MerkleMap: 'assertions',
+ BmffHash: 'assertions',
+ Builder: '',
+ };
+ const resolveDocsUrl = (codeRef) => {
+ let refStr = codeRef.replace(/^crate::/, '');
+
+ const parts = refStr.split('::');
+ let moduleParts = [];
+ let typeName = '';
+ let member = '';
+
+ if (parts.length === 1) {
+ // Single type name; use hints for module placement, default to crate root
+ typeName = parts[0];
+ const hinted = TYPE_MODULE_HINTS[typeName];
+ if (hinted) {
+ moduleParts = hinted ? [hinted] : [];
+ } else {
+ moduleParts = [];
+ }
+ } else if (parts.length >= 2) {
+ const last = parts[parts.length - 1];
+ const prev = parts[parts.length - 2];
+ const isLastType = /^[A-Z]/.test(last);
+ if (isLastType) {
+ typeName = last;
+ moduleParts = parts.slice(0, parts.length - 1);
+ } else {
+ member = last;
+ typeName = prev;
+ moduleParts = parts.slice(0, parts.length - 2);
+ }
+ }
+
+ if (moduleParts.length === 0 && typeName) {
+ const hinted = TYPE_MODULE_HINTS[typeName];
+ if (hinted !== undefined) moduleParts = hinted ? [hinted] : [];
+ }
+
+ const modulePath = moduleParts.length ? moduleParts.join('/') + '/' : '';
+ let url = `https://docs.rs/c2pa/latest/c2pa/${modulePath}struct.${typeName}.html`;
+
+ if (member) {
+ const anchor = /_/.test(member)
+ ? `structfield.${member}`
+ : `method.${member}`;
+ url += `#${anchor}`;
+ }
+ return url;
+ };
+
+ // Convert [`CodeRef`] to links to docs.rs, preserving code formatting
+ html = html.replace(/\[`([^`]+)`\]/g, (m, codeRef) => {
+ const url = resolveDocsUrl(codeRef);
+ return `${escapeHtml(
+ codeRef,
+ )}`;
+ });
+
+ // Links: [text](url)
+ html = html.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (m, label, url) => {
+ const safeUrl = url.replace(/"/g, '"');
+ return `${label}`;
+ });
+
+ // Autolinks:
+ html = html.replace(/<((?:https?:\/\/|mailto:)[^>]+)>/g, (m, url) => {
+ const safeUrl = url.replace(/"/g, '"');
+ return `${url}`;
+ });
+
+ // Bold and italics
+ html = html.replace(/\*\*([^*]+)\*\*/g, '$1');
+ html = html.replace(/(^|[^*])\*([^*]+)\*(?!\*)/g, '$1$2');
+
+ // Inline code
+ html = html.replace(/`([^`]+)`/g, '$1');
+
+ // Remove reference-style link definitions (already inlined)
+ html = html.replace(/^\s*\[`[^`]+`\]:\s*[^\n]+$/gm, '');
+
+ // Paragraphs: split on double newlines, single newline ->
+ const parts = html
+ .split(/\n\n+/)
+ .map((para) => `${para.replace(/\n/g, '
')}
`);
+ return parts.join('');
+}
+
+function Markdown({ text }) {
+ return ;
+}
+
+function PropertiesTable({ title, description, properties, required }) {
+ if (!properties || Object.keys(properties).length === 0) return null;
+
+ return (
+ <>
+ {title ? (
+
+ {title}
+
+ ) : null}
+
+ {description ? (
+
+
+
+ ) : null}
+
+
+
+
+ | Property |
+ Type |
+ Description |
+ Required? |
+ Default Value |
+
+
+
+ {Object.entries(properties).map(([name, schema]) => {
+ const typeHtml = formatType(schema);
+ const isRequired = Array.isArray(required)
+ ? required.includes(name)
+ : false;
+ const defaultValue =
+ schema && Object.prototype.hasOwnProperty.call(schema, 'default')
+ ? JSON.stringify(schema.default)
+ : 'N/A';
+
+ return (
+
+ | {name} |
+
+ |
+
+
+ {schema && schema.description ? (
+
+
+
+ ) : (
+ N/A
+ )}
+ |
+
+ {isRequired ? 'YES' : 'NO'}
+ |
+ {defaultValue} |
+
+ );
+ })}
+
+
+ >
+ );
+}
+
+function DefinitionsTOC({ defs }) {
+ const names = useMemo(
+ () =>
+ Object.keys(defs || {}).sort((a, b) =>
+ a.localeCompare(b, undefined, { sensitivity: 'base' }),
+ ),
+ [defs],
+ );
+ if (names.length === 0) return null;
+
+ const colCount = 4;
+ const perCol = Math.ceil(names.length / colCount);
+ const cols = Array.from({ length: colCount }, (_, idx) =>
+ names.slice(idx * perCol, (idx + 1) * perCol),
+ );
+
+ return (
+ <>
+
+ Definitions
+
+
+
+
+ {cols.map((col, i) => (
+ |
+ {col.map((n) => (
+
+ ))}
+ |
+ ))}
+
+
+
+ >
+ );
+}
+
+function getUnionOptions(schema) {
+ if (!schema) return [];
+ const union = Array.isArray(schema.oneOf)
+ ? schema.oneOf
+ : Array.isArray(schema.anyOf)
+ ? schema.anyOf
+ : null;
+ if (!Array.isArray(union)) return [];
+ return union.filter((opt) => opt && typeof opt === 'object');
+}
+
+function UnionOptionsTable({ options }) {
+ if (!options || options.length === 0) return null;
+
+ const getTypeLabel = (opt) => {
+ if (!opt) return 'N/A';
+ if (typeof opt.type === 'string') return capitalizeType(opt.type);
+ if (Array.isArray(opt.type))
+ return opt.type.map(capitalizeType).join(' or ');
+ if (opt.$ref) {
+ const name = opt.$ref.startsWith('#/$defs/')
+ ? opt.$ref.replace('#/$defs/', '')
+ : opt.$ref;
+ return name;
+ }
+ return 'N/A';
+ };
+
+ return (
+
+
+
+ | Type |
+ Description |
+ Value |
+
+
+
+ {options.map((opt, idx) => (
+
+ | {getTypeLabel(opt)} |
+
+ {opt.description ? (
+
+
+
+ ) : (
+ 'N/A'
+ )}
+ |
+
+ {Object.prototype.hasOwnProperty.call(opt, 'const')
+ ? String(opt.const)
+ : 'N/A'}
+ |
+
+ ))}
+
+
+ );
+}
+
+function DefinitionSection({ name, schema }) {
+ const titleId = slugify(name);
+ const isObjectType =
+ (schema && schema.type === 'object') ||
+ (schema && isObject(schema.properties));
+ const unionOptions = getUnionOptions(schema);
+
+ return (
+ <>
+
+ {name}
+
+ {/* anchor spacing / end of oneOf entity */}
+ {schema && schema.description ? (
+
+
+
+ ) : null}
+
+ {unionOptions.length > 0 ? (
+
+ ) : isObjectType ? (
+
+ ) : (
+ // Fallback simple table for non-object schemas
+
+
+
+ | Property |
+ Type |
+ Description |
+ Required? |
+ Default Value |
+
+
+
+
+ | type |
+
+ |
+
+
+ {schema && schema.description ? (
+
+
+
+ ) : (
+ 'N/A'
+ )}
+ |
+ NO |
+ N/A |
+
+
+
+ )}
+ >
+ );
+}
+
+export default function SchemaReference({ schemaUrl }) {
+ const [schema, setSchema] = useState(null);
+ const [error, setError] = useState(null);
+ const [loading, setLoading] = useState(true);
+
+ useEffect(() => {
+ let cancelled = false;
+ async function run() {
+ setLoading(true);
+ setError(null);
+ try {
+ const res = await fetch(schemaUrl);
+ if (!res.ok) throw new Error(`Failed to fetch schema: ${schemaUrl}`);
+ const json = await res.json();
+ if (!cancelled) setSchema(json);
+ } catch (e) {
+ if (!cancelled) setError(e.message || String(e));
+ } finally {
+ if (!cancelled) setLoading(false);
+ }
+ }
+ run();
+ return () => {
+ cancelled = true;
+ };
+ }, [schemaUrl]);
+
+ if (loading) return Loading schema…
;
+ if (error) return {error}
;
+ if (!schema) return No schema loaded.
;
+
+ const defs = schema.$defs || schema.definitions || {};
+ const title = schema.title || 'Schema';
+ const titleId = slugify(title);
+
+ return (
+
+
+ {title}
+
+ {schema.description ? (
+
+
+
+ ) : null}
+
+
+ Properties
+
+
+
+
+
+ {Object.entries(defs).map(([name, defSchema]) => (
+
+ ))}
+
+ );
+}
diff --git a/src/css/custom.css b/src/css/custom.css
index 2701d835..69b2bf54 100644
--- a/src/css/custom.css
+++ b/src/css/custom.css
@@ -431,3 +431,15 @@ body:not(.is-scrolling) .navbar {
.scroll-target {
scroll-margin-top: 130px; /* Slightly more than title bar */
}
+
+.warning {
+ background-color: rgb(250, 56, 62, 0.15);
+ padding: 0 10px;
+ border-radius: 5px;
+ border: 1px solid rgb(122, 2, 2);
+}
+
+.warning::before {
+ content: '⚠️ WARNING: ';
+ margin-right: 10px;
+}
diff --git a/src/pages/schema-reference.js b/src/pages/schema-reference.js
new file mode 100644
index 00000000..ad9d2956
--- /dev/null
+++ b/src/pages/schema-reference.js
@@ -0,0 +1,45 @@
+import React from 'react';
+import { useLocation } from '@docusaurus/router';
+import SchemaReference from '../components/SchemaReference';
+
+function useQuery() {
+ const { search } = useLocation();
+ return React.useMemo(() => new URLSearchParams(search), [search]);
+}
+
+const AVAILABLE_SCHEMAS = [
+ 'Reader.schema.json',
+ 'Builder.schema.json',
+ 'ManifestDefinition.schema.json',
+ 'Settings.schema.json',
+];
+
+export default function SchemaReferencePage() {
+ const query = useQuery();
+ const file = query.get('file');
+
+ if (!file) {
+ return (
+
+
Schema Reference
+
Select a schema to view its reference documentation:
+
+
+ );
+ }
+
+ const schemaUrl = `/schemas/${file}`;
+ return (
+
+
+
+ );
+}
diff --git a/static/schemas/Builder.schema.json b/static/schemas/Builder.schema.json
new file mode 100644
index 00000000..36bcede0
--- /dev/null
+++ b/static/schemas/Builder.schema.json
@@ -0,0 +1,1173 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "title": "Builder",
+ "description": "Use a Builder to add a signed manifest to an asset.\n\n# Example: Building and signing a manifest\n\n```ignore-wasm32\nuse c2pa::Result;\nuse std::path::PathBuf;\n\nuse c2pa::{create_signer, Builder, SigningAlg};\nuse serde::Serialize;\nuse serde_json::json;\nuse tempfile::tempdir;\n\n#[derive(Serialize)]\nstruct Test {\n my_tag: usize,\n}\n\n# fn main() -> Result<()> {\n#[cfg(feature = \"file_io\")]\n{\n let manifest_json = json!({\n \"claim_generator_info\": [\n {\n \"name\": \"c2pa_test\",\n \"version\": \"1.0.0\"\n }\n ],\n \"title\": \"Test_Manifest\"\n }).to_string();\n\n let mut builder = Builder::from_json(&manifest_json)?;\n builder.add_assertion(\"org.contentauth.test\", &Test { my_tag: 42 })?;\n\n let source = PathBuf::from(\"tests/fixtures/C.jpg\");\n let dir = tempdir()?;\n let dest = dir.path().join(\"test_file.jpg\");\n\n // Create a ps256 signer using certs and key files. TO DO: Update example.\n let signcert_path = \"tests/fixtures/certs/ps256.pub\";\n let pkey_path = \"tests/fixtures/certs/ps256.pem\";\n let signer = create_signer::from_files(signcert_path, pkey_path, SigningAlg::Ps256, None)?;\n\n // embed a manifest using the signer\n builder.sign_file(\n signer.as_ref(),\n &source,\n &dest)?;\n }\n# Ok(())\n# }\n```",
+ "type": "object",
+ "properties": {
+ "claim_version": {
+ "description": "The version of the claim. Defaults to 2.",
+ "type": ["integer", "null"],
+ "format": "uint8",
+ "minimum": 0,
+ "maximum": 255
+ },
+ "vendor": {
+ "description": "Optional prefix added to the generated Manifest Label\nThis is typically a reverse domain name.",
+ "type": ["string", "null"]
+ },
+ "claim_generator_info": {
+ "description": "Claim Generator Info is always required with an entry",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ClaimGeneratorInfo"
+ },
+ "default": [
+ {
+ "name": "c2pa-rs",
+ "version": "0.68.0"
+ }
+ ]
+ },
+ "metadata": {
+ "description": "Optional manifest metadata. This will be deprecated in the future; not recommended to use.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/AssertionMetadata"
+ }
+ },
+ "title": {
+ "description": "A human-readable title, generally source filename.",
+ "type": ["string", "null"]
+ },
+ "format": {
+ "description": "The format of the source file as a MIME type.",
+ "type": "string",
+ "default": "application/octet-stream"
+ },
+ "instance_id": {
+ "description": "Instance ID from `xmpMM:InstanceID` in XMP metadata.",
+ "type": "string",
+ "default": "xmp:iid:cbc5aac9-e80b-4392-ac82-263aa746cce1"
+ },
+ "thumbnail": {
+ "description": "An optional ResourceRef to a thumbnail image that represents the asset that was signed.\nMust be available when the manifest is signed.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ingredients": {
+ "description": "A List of ingredients",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Ingredient"
+ },
+ "default": []
+ },
+ "assertions": {
+ "description": "A list of assertions",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/AssertionDefinition"
+ },
+ "default": []
+ },
+ "redactions": {
+ "description": "A list of redactions - URIs to redacted assertions.",
+ "type": ["array", "null"],
+ "items": {
+ "type": "string"
+ }
+ },
+ "label": {
+ "description": "Allows you to pre-define the manifest label, which must be unique.\nNot intended for general use. If not set, it will be assigned automatically.",
+ "type": ["string", "null"]
+ },
+ "remote_url": {
+ "description": "Optional remote URL for the manifest",
+ "type": ["string", "null"]
+ },
+ "no_embed": {
+ "description": "If true, the manifest store will not be embedded in the asset on sign",
+ "type": "boolean"
+ },
+ "base_path": {
+ "description": "Base path to search for resources.",
+ "type": ["string", "null"],
+ "deprecated": true
+ },
+ "intent": {
+ "description": "A builder should construct a created, opened or updated manifest.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BuilderIntent"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["no_embed"],
+ "$defs": {
+ "ClaimGeneratorInfo": {
+ "description": "Description of the claim generator, or the software used in generating the claim.\n\nThis structure is also used for actions softwareAgent",
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "A human readable string naming the claim_generator",
+ "type": "string"
+ },
+ "version": {
+ "description": "A human readable string of the product's version",
+ "type": ["string", "null"]
+ },
+ "icon": {
+ "description": "hashed URI to the icon (either embedded or remote)",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/UriOrResource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "operating_system": {
+ "description": "A human readable string of the OS the claim generator is running on",
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["name"],
+ "additionalProperties": true
+ },
+ "UriOrResource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "$ref": "#/$defs/HashedUri"
+ }
+ ]
+ },
+ "ResourceRef": {
+ "description": "A reference to a resource to be used in JSON serialization.\n\nThe underlying data can be read as a stream via [`Reader::resource_to_stream`][crate::Reader::resource_to_stream].",
+ "type": "object",
+ "properties": {
+ "format": {
+ "description": "The mime type of the referenced resource.",
+ "type": "string"
+ },
+ "identifier": {
+ "description": "A URI that identifies the resource as referenced from the manifest.\n\nThis may be a JUMBF URI, a file path, a URL or any other string.\nRelative JUMBF URIs will be resolved with the manifest label.\nRelative file paths will be resolved with the base path if provided.",
+ "type": "string"
+ },
+ "data_types": {
+ "description": "More detailed data types as defined in the C2PA spec.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/AssetType"
+ }
+ },
+ "alg": {
+ "description": "The algorithm used to hash the resource (if applicable).",
+ "type": ["string", "null"]
+ },
+ "hash": {
+ "description": "The hash of the resource (if applicable).",
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["format", "identifier"]
+ },
+ "AssetType": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "version": {
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["type"]
+ },
+ "HashedUri": {
+ "description": "A `HashedUri` provides a reference to content available within the same\nmanifest store.\n\nThis is described in [§8.3, URI References], of the C2PA Technical\nSpecification.\n\n[§8.3, URI References]: https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_uri_references",
+ "type": "object",
+ "properties": {
+ "url": {
+ "description": "JUMBF URI reference",
+ "type": "string"
+ },
+ "alg": {
+ "description": "A string identifying the cryptographic hash algorithm used to compute\nthe hash",
+ "type": ["string", "null"]
+ },
+ "hash": {
+ "description": "Byte string containing the hash value",
+ "type": "array",
+ "items": {
+ "type": "integer",
+ "format": "uint8",
+ "minimum": 0,
+ "maximum": 255
+ }
+ }
+ },
+ "required": ["url", "hash"]
+ },
+ "AssertionMetadata": {
+ "description": "The AssertionMetadata structure can be used as part of other assertions or on its own to reference others",
+ "type": "object",
+ "properties": {
+ "reviewRatings": {
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/ReviewRating"
+ }
+ },
+ "dateTime": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/DateT"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "reference": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HashedUri"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "dataSource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/DataSource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "localizations": {
+ "type": ["array", "null"],
+ "items": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "regionOfInterest": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/RegionOfInterest"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ }
+ },
+ "ReviewRating": {
+ "description": "A rating on an Assertion.\n\nSee .",
+ "type": "object",
+ "properties": {
+ "explanation": {
+ "type": "string"
+ },
+ "code": {
+ "type": ["string", "null"]
+ },
+ "value": {
+ "type": "integer",
+ "format": "uint8",
+ "minimum": 0,
+ "maximum": 255
+ }
+ },
+ "required": ["explanation", "value"]
+ },
+ "DateT": {
+ "type": "string"
+ },
+ "DataSource": {
+ "description": "A description of the source for assertion data",
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "A value from among the enumerated list indicating the source of the assertion.",
+ "type": "string"
+ },
+ "details": {
+ "description": "A human-readable string giving details about the source of the assertion data.",
+ "type": ["string", "null"]
+ },
+ "actors": {
+ "description": "A list of [`Actor`]s associated with this source.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/Actor"
+ }
+ }
+ },
+ "required": ["type"]
+ },
+ "Actor": {
+ "description": "Identifies a person responsible for an action.",
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "description": "An identifier for a human actor, used when the \"type\" is `humanEntry.identified`.",
+ "type": ["string", "null"]
+ },
+ "credentials": {
+ "description": "List of references to W3C Verifiable Credentials.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/HashedUri"
+ }
+ }
+ }
+ },
+ "RegionOfInterest": {
+ "description": "A region of interest within an asset describing the change.\n\nThis struct can be used from [`Action::changes`][crate::assertions::Action::changes],\n[`AssertionMetadata::region_of_interest`][crate::assertions::AssertionMetadata::region_of_interest], or\n[`SoftBindingScope::region`][crate::assertions::soft_binding::SoftBindingScope::region].",
+ "type": "object",
+ "properties": {
+ "region": {
+ "description": "A range describing the region of interest for the specific asset.",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Range"
+ }
+ },
+ "name": {
+ "description": "A free-text string representing a human-readable name for the region which might be used in a user interface.",
+ "type": ["string", "null"]
+ },
+ "identifier": {
+ "description": "A free-text string representing a machine-readable, unique to this assertion, identifier for the region.",
+ "type": ["string", "null"]
+ },
+ "type": {
+ "description": "A value from a controlled vocabulary such as or an entity-specific\nvalue (e.g., com.litware.newType) that represents the type of thing(s) depicted by a region.\n\nNote this field serializes/deserializes into the name `type`.",
+ "type": ["string", "null"]
+ },
+ "role": {
+ "description": "A value from our controlled vocabulary or an entity-specific value (e.g., com.litware.coolArea) that represents\nthe role of a region among other regions.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Role"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "description": {
+ "description": "A free-text string.",
+ "type": ["string", "null"]
+ },
+ "metadata": {
+ "description": "Additional information about the asset.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AssertionMetadata"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["region"]
+ },
+ "Range": {
+ "description": "A spatial, temporal, frame, or textual range describing the region of interest.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "The type of range of interest.",
+ "$ref": "#/$defs/RangeType"
+ },
+ "shape": {
+ "description": "A spatial range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Shape"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "time": {
+ "description": "A temporal range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Time"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "frame": {
+ "description": "A frame range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Frame"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "text": {
+ "description": "A textual range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Text"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "item": {
+ "description": "A item identifier.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Item"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["type"]
+ },
+ "RangeType": {
+ "description": "The type of range for the region of interest.",
+ "oneOf": [
+ {
+ "description": "A spatial range, see [`Shape`] for more details.",
+ "type": "string",
+ "const": "spatial"
+ },
+ {
+ "description": "A temporal range, see [`Time`] for more details.",
+ "type": "string",
+ "const": "temporal"
+ },
+ {
+ "description": "A spatial range, see [`Frame`] for more details.",
+ "type": "string",
+ "const": "frame"
+ },
+ {
+ "description": "A textual range, see [`Text`] for more details.",
+ "type": "string",
+ "const": "textual"
+ },
+ {
+ "description": "A range identified by a specific identifier and value, see [`Item`] for more details.",
+ "type": "string",
+ "const": "identified"
+ }
+ ]
+ },
+ "Shape": {
+ "description": "A spatial range representing rectangle, circle, or a polygon.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "The type of shape.",
+ "$ref": "#/$defs/ShapeType"
+ },
+ "unit": {
+ "description": "The type of unit for the shape range.",
+ "$ref": "#/$defs/UnitType"
+ },
+ "origin": {
+ "description": "THe origin of the coordinate in the shape.",
+ "$ref": "#/$defs/Coordinate"
+ },
+ "width": {
+ "description": "The width for rectangles or diameter for circles.\n\nThis field can be ignored for polygons.",
+ "type": ["number", "null"],
+ "format": "double"
+ },
+ "height": {
+ "description": "The height of a rectnagle.\n\nThis field can be ignored for circles and polygons.",
+ "type": ["number", "null"],
+ "format": "double"
+ },
+ "inside": {
+ "description": "If the range is inside the shape.\n\nThe default value is true.",
+ "type": ["boolean", "null"]
+ },
+ "vertices": {
+ "description": "The vertices of the polygon.\n\nThis field can be ignored for rectangles and circles.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/Coordinate"
+ }
+ }
+ },
+ "required": ["type", "unit", "origin"]
+ },
+ "ShapeType": {
+ "description": "The type of shape for the range.",
+ "oneOf": [
+ {
+ "description": "A rectangle.",
+ "type": "string",
+ "const": "rectangle"
+ },
+ {
+ "description": "A circle.",
+ "type": "string",
+ "const": "circle"
+ },
+ {
+ "description": "A polygon.",
+ "type": "string",
+ "const": "polygon"
+ }
+ ]
+ },
+ "UnitType": {
+ "description": "The type of unit for the range.",
+ "oneOf": [
+ {
+ "description": "Use pixels.",
+ "type": "string",
+ "const": "pixel"
+ },
+ {
+ "description": "Use percentage.",
+ "type": "string",
+ "const": "percent"
+ }
+ ]
+ },
+ "Coordinate": {
+ "description": "An x, y coordinate used for specifying vertices in polygons.",
+ "type": "object",
+ "properties": {
+ "x": {
+ "description": "The coordinate along the x-axis.",
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "description": "The coordinate along the y-axis.",
+ "type": "number",
+ "format": "double"
+ }
+ },
+ "required": ["x", "y"]
+ },
+ "Time": {
+ "description": "A temporal range representing a starting time to an ending time.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "The type of time.",
+ "$ref": "#/$defs/TimeType",
+ "default": "npt"
+ },
+ "start": {
+ "description": "The start time or the start of the asset if not present.",
+ "type": ["string", "null"]
+ },
+ "end": {
+ "description": "The end time or the end of the asset if not present.",
+ "type": ["string", "null"]
+ }
+ }
+ },
+ "TimeType": {
+ "description": "The type of time.",
+ "oneOf": [
+ {
+ "description": "Times are described using Normal Play Time (npt) as described in RFC 2326.",
+ "type": "string",
+ "const": "npt"
+ }
+ ]
+ },
+ "Frame": {
+ "description": "A frame range representing starting and ending frames or pages.\n\nIf both `start` and `end` are missing, the frame will span the entire asset.",
+ "type": "object",
+ "properties": {
+ "start": {
+ "description": "The start of the frame or the end of the asset if not present.\n\nThe first frame/page starts at 0.",
+ "type": ["integer", "null"],
+ "format": "int32"
+ },
+ "end": {
+ "description": "The end of the frame inclusive or the end of the asset if not present.",
+ "type": ["integer", "null"],
+ "format": "int32"
+ }
+ }
+ },
+ "Text": {
+ "description": "A textual range representing multiple (possibly discontinuous) ranges of text.",
+ "type": "object",
+ "properties": {
+ "selectors": {
+ "description": "The ranges of text to select.",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TextSelectorRange"
+ }
+ }
+ },
+ "required": ["selectors"]
+ },
+ "TextSelectorRange": {
+ "description": "One or two [`TextSelector`][TextSelector] identifiying the range to select.",
+ "type": "object",
+ "properties": {
+ "selector": {
+ "description": "The start (or entire) text range.",
+ "$ref": "#/$defs/TextSelector"
+ },
+ "end": {
+ "description": "The end of the text range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TextSelector"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["selector"]
+ },
+ "TextSelector": {
+ "description": "Selects a range of text via a fragment identifier.\n\nThis is modeled after the W3C Web Annotation selector model.",
+ "type": "object",
+ "properties": {
+ "fragment": {
+ "description": "Fragment identifier as per RFC3023 (XML) or ISO 32000-2 (PDF), Annex O.",
+ "type": "string"
+ },
+ "start": {
+ "description": "The start character offset or the start of the fragment if not present.",
+ "type": ["integer", "null"],
+ "format": "int32"
+ },
+ "end": {
+ "description": "The end character offset or the end of the fragment if not present.",
+ "type": ["integer", "null"],
+ "format": "int32"
+ }
+ },
+ "required": ["fragment"]
+ },
+ "Item": {
+ "description": "Description of the boundaries of an identified range.",
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "description": "The container-specific term used to identify items, such as \"track_id\" for MP4 or \"item_ID\" for HEIF.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The value of the identifier, e.g. a value of \"2\" for an identifier of \"track_id\" would imply track 2 of the asset.",
+ "type": "string"
+ }
+ },
+ "required": ["identifier", "value"]
+ },
+ "Role": {
+ "description": "A role describing the region.",
+ "oneOf": [
+ {
+ "description": "Arbitrary area worth identifying.",
+ "type": "string",
+ "const": "c2pa.areaOfInterest"
+ },
+ {
+ "description": "This area is all that is left after a crop action.",
+ "type": "string",
+ "const": "c2pa.cropped"
+ },
+ {
+ "description": "This area has had edits applied to it.",
+ "type": "string",
+ "const": "c2pa.edited"
+ },
+ {
+ "description": "The area where an ingredient was placed/added.",
+ "type": "string",
+ "const": "c2pa.placed"
+ },
+ {
+ "description": "Something in this area was redacted.",
+ "type": "string",
+ "const": "c2pa.redacted"
+ },
+ {
+ "description": "Area specific to a subject (human or not).",
+ "type": "string",
+ "const": "c2pa.subjectArea"
+ },
+ {
+ "description": "A range of information was removed/deleted.",
+ "type": "string",
+ "const": "c2pa.deleted"
+ },
+ {
+ "description": "Styling was applied to this area.",
+ "type": "string",
+ "const": "c2pa.styled"
+ },
+ {
+ "description": "Invisible watermarking was applied to this area for the purpose of soft binding.",
+ "type": "string",
+ "const": "c2pa.watermarked"
+ }
+ ]
+ },
+ "Ingredient": {
+ "description": "An `Ingredient` is any external asset that has been used in the creation of an asset.",
+ "type": "object",
+ "properties": {
+ "title": {
+ "description": "A human-readable title, generally source filename.",
+ "type": ["string", "null"]
+ },
+ "format": {
+ "description": "The format of the source file as a MIME type.",
+ "type": ["string", "null"]
+ },
+ "document_id": {
+ "description": "Document ID from `xmpMM:DocumentID` in XMP metadata.",
+ "type": ["string", "null"]
+ },
+ "instance_id": {
+ "description": "Instance ID from `xmpMM:InstanceID` in XMP metadata.",
+ "type": ["string", "null"]
+ },
+ "provenance": {
+ "description": "URI from `dcterms:provenance` in XMP metadata.",
+ "type": ["string", "null"]
+ },
+ "thumbnail": {
+ "description": "A thumbnail image capturing the visual state at the time of import.\n\nA tuple of thumbnail MIME format (for example `image/jpeg`) and binary bits of the image.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "hash": {
+ "description": "An optional hash of the asset to prevent duplicates.",
+ "type": ["string", "null"]
+ },
+ "relationship": {
+ "description": "Set to `ParentOf` if this is the parent ingredient.\n\nThere can only be one parent ingredient in the ingredients.",
+ "$ref": "#/$defs/Relationship",
+ "default": "componentOf"
+ },
+ "active_manifest": {
+ "description": "The active manifest label (if one exists).\n\nIf this ingredient has a [`ManifestStore`],\nthis will hold the label of the active [`Manifest`].\n\n[`Manifest`]: crate::Manifest\n[`ManifestStore`]: crate::ManifestStore",
+ "type": ["string", "null"]
+ },
+ "validation_status": {
+ "description": "Validation status (Ingredient v1 & v2)",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/ValidationStatus"
+ }
+ },
+ "validation_results": {
+ "description": "Validation results (Ingredient.V3)",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ValidationResults"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "data": {
+ "description": "A reference to the actual data of the ingredient.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "description": {
+ "description": "Additional description of the ingredient.",
+ "type": ["string", "null"]
+ },
+ "informational_URI": {
+ "description": "URI to an informational page about the ingredient or its data.",
+ "type": ["string", "null"]
+ },
+ "metadata": {
+ "description": "Any additional [`Metadata`] as defined in the C2PA spec.\n\n[`Metadata`]: crate::Metadata",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AssertionMetadata"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "data_types": {
+ "description": "Additional information about the data's type to the ingredient V2 structure.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/AssetType"
+ }
+ },
+ "manifest_data": {
+ "description": "A [`ManifestStore`] from the source asset extracted as a binary C2PA blob.\n\n[`ManifestStore`]: crate::ManifestStore",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "label": {
+ "description": "The ingredient's label as assigned in the manifest.",
+ "type": ["string", "null"]
+ },
+ "ocsp_responses": {
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/ResourceRef"
+ }
+ }
+ }
+ },
+ "Relationship": {
+ "description": "The relationship of the ingredient to the current asset.",
+ "oneOf": [
+ {
+ "description": "The current asset is derived from this ingredient.",
+ "type": "string",
+ "const": "parentOf"
+ },
+ {
+ "description": "The current asset is a part of this ingredient.",
+ "type": "string",
+ "const": "componentOf"
+ },
+ {
+ "description": "The ingredient was used as an input to a computational process to create or modify the asset.",
+ "type": "string",
+ "const": "inputTo"
+ }
+ ]
+ },
+ "ValidationStatus": {
+ "description": "A `ValidationStatus` struct describes the validation status of a\nspecific part of a manifest.\n\nSee .",
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string"
+ },
+ "url": {
+ "type": ["string", "null"]
+ },
+ "explanation": {
+ "type": ["string", "null"]
+ },
+ "success": {
+ "type": ["boolean", "null"],
+ "writeOnly": true
+ }
+ },
+ "required": ["code"]
+ },
+ "ValidationResults": {
+ "description": "A map of validation results for a manifest store.\n\nThe map contains the validation results for the active manifest and any ingredient deltas.\nIt is normal for there to be many",
+ "type": "object",
+ "properties": {
+ "activeManifest": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/StatusCodes"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ingredientDeltas": {
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/IngredientDeltaValidationResult"
+ }
+ }
+ }
+ },
+ "StatusCodes": {
+ "description": "Contains a set of success, informational, and failure validation status codes.",
+ "type": "object",
+ "properties": {
+ "success": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ValidationStatus"
+ }
+ },
+ "informational": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ValidationStatus"
+ }
+ },
+ "failure": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ValidationStatus"
+ }
+ }
+ },
+ "required": ["success", "informational", "failure"]
+ },
+ "IngredientDeltaValidationResult": {
+ "description": "Represents any changes or deltas between the current and previous validation results for an ingredient's manifest.",
+ "type": "object",
+ "properties": {
+ "ingredientAssertionURI": {
+ "description": "JUMBF URI reference to the ingredient assertion",
+ "type": "string"
+ },
+ "validationDeltas": {
+ "description": "Validation results for the ingredient's active manifest",
+ "$ref": "#/$defs/StatusCodes"
+ }
+ },
+ "required": ["ingredientAssertionURI", "validationDeltas"]
+ },
+ "AssertionDefinition": {
+ "description": "Defines an assertion that consists of a label that can be either\na C2PA-defined assertion label or a custom label in reverse domain format.",
+ "type": "object",
+ "properties": {
+ "label": {
+ "description": "An assertion label in reverse domain format",
+ "type": "string"
+ },
+ "data": {
+ "description": "The assertion data",
+ "$ref": "#/$defs/AssertionData"
+ },
+ "kind": {
+ "description": "The kind of assertion data, either Cbor or Json (defaults to Cbor)",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ManifestAssertionKind"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "created": {
+ "description": "True if this assertion is attributed to the signer (defaults to false)",
+ "type": "boolean"
+ }
+ },
+ "required": ["label", "data"]
+ },
+ "AssertionData": {
+ "description": "This allows the assertion to be expressed as CBOR or JSON.\nThe default is CBOR unless you specify that an assertion should be JSON.",
+ "anyOf": [true]
+ },
+ "ManifestAssertionKind": {
+ "description": "Assertions in C2PA can be stored in several formats",
+ "type": "string",
+ "enum": ["Cbor", "Json", "Binary", "Uri"]
+ },
+ "BuilderIntent": {
+ "description": "Represents the type of builder flow being used.\n\nThis determines how the builder will be used, such as creating a new asset, opening an existing asset,\nor updating an existing asset.",
+ "oneOf": [
+ {
+ "description": "This is a new digital creation, a DigitalSourceType is required.\n\nThe Manifest must not have have a parent ingredient.\nA `c2pa.created` action will be added if not provided.",
+ "type": "object",
+ "properties": {
+ "create": {
+ "$ref": "#/$defs/DigitalSourceType"
+ }
+ },
+ "required": ["create"],
+ "additionalProperties": false
+ },
+ {
+ "description": "This is an edit of a pre-existing parent asset.\n\nThe Manifest must have a parent ingredient.\nA parent ingredient will be generated from the source stream if not otherwise provided.\nA `c2pa.opened action will be tied to the parent ingredient.",
+ "type": "string",
+ "const": "edit"
+ },
+ {
+ "description": "A restricted version of Edit for non-editorial changes.\n\nThere must be only one ingredient, as a parent.\nNo changes can be made to the hashed content of the parent.\nThere are additional restrictions on the types of changes that can be made.",
+ "type": "string",
+ "const": "update"
+ }
+ ]
+ },
+ "DigitalSourceType": {
+ "description": "Description of the source of an asset.\n\nThe full list of possible digital source types are found below:\n\n",
+ "anyOf": [
+ {
+ "description": "Media whose digital content is effectively empty, such as a blank canvas or zero-length video.",
+ "type": "string",
+ "const": "http://c2pa.org/digitalsourcetype/empty"
+ },
+ {
+ "description": "Data that is the result of algorithmically using a model derived from sampled content and data.\nDiffers from trainedAlgorithmicMedia in that\nthe result isn’t a media type (e.g., image or video) but is a data format (e.g., CSV, pickle).",
+ "type": "string",
+ "const": "http://c2pa.org/digitalsourcetype/trainedAlgorithmicData"
+ },
+ {
+ "description": "The media was captured from a real-life source using a digital camera or digital recording device.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture"
+ },
+ {
+ "description": "The media is the result of capturing multiple frames from a real-life source using a digital camera\nor digital recording device, then automatically merging them into a single frame using digital signal\nprocessing techniques and/or non-generative AI. Includes High Dynamic Range (HDR) processing common in\nsmartphone camera apps.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/computationalCapture"
+ },
+ {
+ "description": "The media was digitised from a negative on film or other transparent medium.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/negativeFilm"
+ },
+ {
+ "description": "The media was digitised from a positive on a transparency or other transparent medium.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/positiveFilm"
+ },
+ {
+ "description": "The media was digitised from a non-transparent medium such as a photographic print.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/print"
+ },
+ {
+ "description": "Minor augmentation or correction by a human, such as a digitally-retouched photo used in a magazine.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/minorHumanEdits",
+ "deprecated": true
+ },
+ {
+ "description": "Augmentation, correction or enhancement by one or more humans using non-generative tools.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/humanEdits"
+ },
+ {
+ "description": "Augmentation, correction or enhancement using a Generative AI model, such as with inpainting or\noutpainting operations.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/compositeWithTrainedAlgorithmicMedia"
+ },
+ {
+ "description": "Modification or correction by algorithm without changing the main content of the media, initiated\nor configured by a human, such as sharpening or applying noise reduction.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/algorithmicallyEnhanced"
+ },
+ {
+ "description": "The digital image was created by computer software.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/softwareImage",
+ "deprecated": true
+ },
+ {
+ "description": "Media created by a human using digital tools.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/digitalArt",
+ "deprecated": true
+ },
+ {
+ "description": "Media created by a human using non-generative tools.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/digitalCreation"
+ },
+ {
+ "description": "Digital media representation of data via human programming or creativity.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/dataDrivenMedia"
+ },
+ {
+ "description": "Digital media created algorithmically using an Artificial Intelligence model trained on captured\ncontent.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/trainedAlgorithmicMedia"
+ },
+ {
+ "description": "Media created purely by an algorithm not based on any sampled training data, e.g. an image created\nby software using a mathematical formula.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/algorithmicMedia"
+ },
+ {
+ "description": "A capture of the contents of the screen of a computer or mobile device.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/screenCapture"
+ },
+ {
+ "description": "Live recording of virtual event based on Generative AI and/or captured elements.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/virtualRecording"
+ },
+ {
+ "description": "Mix or composite of several elements, any of which may or may not be generative AI.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/composite"
+ },
+ {
+ "description": "Mix or composite of several elements that are all captures of real life.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/compositeCapture"
+ },
+ {
+ "description": "Mix or composite of several elements, at least one of which is Generative AI.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/compositeSynthetic"
+ },
+ {
+ "description": "An unknown digital source type.",
+ "type": "string"
+ }
+ ]
+ }
+ }
+}
diff --git a/static/schemas/ManifestDefinition.schema.json b/static/schemas/ManifestDefinition.schema.json
new file mode 100644
index 00000000..246ebef7
--- /dev/null
+++ b/static/schemas/ManifestDefinition.schema.json
@@ -0,0 +1,1000 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "title": "ManifestDefinition",
+ "description": "Use a ManifestDefinition to define a manifest and to build a `ManifestStore`.\nA manifest is a collection of ingredients and assertions\nused to define a claim that can be signed and embedded into a file.",
+ "type": "object",
+ "properties": {
+ "claim_version": {
+ "description": "The version of the claim. Defaults to 2.",
+ "type": ["integer", "null"],
+ "format": "uint8",
+ "minimum": 0,
+ "maximum": 255
+ },
+ "vendor": {
+ "description": "Optional prefix added to the generated Manifest Label\nThis is typically a reverse domain name.",
+ "type": ["string", "null"]
+ },
+ "claim_generator_info": {
+ "description": "Claim Generator Info is always required with an entry",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ClaimGeneratorInfo"
+ },
+ "default": [
+ {
+ "name": "c2pa-rs",
+ "version": "0.68.0"
+ }
+ ]
+ },
+ "metadata": {
+ "description": "Optional manifest metadata. This will be deprecated in the future; not recommended to use.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/AssertionMetadata"
+ }
+ },
+ "title": {
+ "description": "A human-readable title, generally source filename.",
+ "type": ["string", "null"]
+ },
+ "format": {
+ "description": "The format of the source file as a MIME type.",
+ "type": "string",
+ "default": "application/octet-stream"
+ },
+ "instance_id": {
+ "description": "Instance ID from `xmpMM:InstanceID` in XMP metadata.",
+ "type": "string",
+ "default": "xmp:iid:2ebfbc43-ba18-40bf-81e2-d3f1487750c0"
+ },
+ "thumbnail": {
+ "description": "An optional ResourceRef to a thumbnail image that represents the asset that was signed.\nMust be available when the manifest is signed.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ingredients": {
+ "description": "A List of ingredients",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Ingredient"
+ },
+ "default": []
+ },
+ "assertions": {
+ "description": "A list of assertions",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/AssertionDefinition"
+ },
+ "default": []
+ },
+ "redactions": {
+ "description": "A list of redactions - URIs to redacted assertions.",
+ "type": ["array", "null"],
+ "items": {
+ "type": "string"
+ }
+ },
+ "label": {
+ "description": "Allows you to pre-define the manifest label, which must be unique.\nNot intended for general use. If not set, it will be assigned automatically.",
+ "type": ["string", "null"]
+ }
+ },
+ "$defs": {
+ "ClaimGeneratorInfo": {
+ "description": "Description of the claim generator, or the software used in generating the claim.\n\nThis structure is also used for actions softwareAgent",
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "A human readable string naming the claim_generator",
+ "type": "string"
+ },
+ "version": {
+ "description": "A human readable string of the product's version",
+ "type": ["string", "null"]
+ },
+ "icon": {
+ "description": "hashed URI to the icon (either embedded or remote)",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/UriOrResource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "operating_system": {
+ "description": "A human readable string of the OS the claim generator is running on",
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["name"],
+ "additionalProperties": true
+ },
+ "UriOrResource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "$ref": "#/$defs/HashedUri"
+ }
+ ]
+ },
+ "ResourceRef": {
+ "description": "A reference to a resource to be used in JSON serialization.\n\nThe underlying data can be read as a stream via [`Reader::resource_to_stream`][crate::Reader::resource_to_stream].",
+ "type": "object",
+ "properties": {
+ "format": {
+ "description": "The mime type of the referenced resource.",
+ "type": "string"
+ },
+ "identifier": {
+ "description": "A URI that identifies the resource as referenced from the manifest.\n\nThis may be a JUMBF URI, a file path, a URL or any other string.\nRelative JUMBF URIs will be resolved with the manifest label.\nRelative file paths will be resolved with the base path if provided.",
+ "type": "string"
+ },
+ "data_types": {
+ "description": "More detailed data types as defined in the C2PA spec.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/AssetType"
+ }
+ },
+ "alg": {
+ "description": "The algorithm used to hash the resource (if applicable).",
+ "type": ["string", "null"]
+ },
+ "hash": {
+ "description": "The hash of the resource (if applicable).",
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["format", "identifier"]
+ },
+ "AssetType": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "version": {
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["type"]
+ },
+ "HashedUri": {
+ "description": "A `HashedUri` provides a reference to content available within the same\nmanifest store.\n\nThis is described in [§8.3, URI References], of the C2PA Technical\nSpecification.\n\n[§8.3, URI References]: https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_uri_references",
+ "type": "object",
+ "properties": {
+ "url": {
+ "description": "JUMBF URI reference",
+ "type": "string"
+ },
+ "alg": {
+ "description": "A string identifying the cryptographic hash algorithm used to compute\nthe hash",
+ "type": ["string", "null"]
+ },
+ "hash": {
+ "description": "Byte string containing the hash value",
+ "type": "array",
+ "items": {
+ "type": "integer",
+ "format": "uint8",
+ "minimum": 0,
+ "maximum": 255
+ }
+ }
+ },
+ "required": ["url", "hash"]
+ },
+ "AssertionMetadata": {
+ "description": "The AssertionMetadata structure can be used as part of other assertions or on its own to reference others",
+ "type": "object",
+ "properties": {
+ "reviewRatings": {
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/ReviewRating"
+ }
+ },
+ "dateTime": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/DateT"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "reference": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HashedUri"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "dataSource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/DataSource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "localizations": {
+ "type": ["array", "null"],
+ "items": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "regionOfInterest": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/RegionOfInterest"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ }
+ },
+ "ReviewRating": {
+ "description": "A rating on an Assertion.\n\nSee .",
+ "type": "object",
+ "properties": {
+ "explanation": {
+ "type": "string"
+ },
+ "code": {
+ "type": ["string", "null"]
+ },
+ "value": {
+ "type": "integer",
+ "format": "uint8",
+ "minimum": 0,
+ "maximum": 255
+ }
+ },
+ "required": ["explanation", "value"]
+ },
+ "DateT": {
+ "type": "string"
+ },
+ "DataSource": {
+ "description": "A description of the source for assertion data",
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "A value from among the enumerated list indicating the source of the assertion.",
+ "type": "string"
+ },
+ "details": {
+ "description": "A human-readable string giving details about the source of the assertion data.",
+ "type": ["string", "null"]
+ },
+ "actors": {
+ "description": "A list of [`Actor`]s associated with this source.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/Actor"
+ }
+ }
+ },
+ "required": ["type"]
+ },
+ "Actor": {
+ "description": "Identifies a person responsible for an action.",
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "description": "An identifier for a human actor, used when the \"type\" is `humanEntry.identified`.",
+ "type": ["string", "null"]
+ },
+ "credentials": {
+ "description": "List of references to W3C Verifiable Credentials.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/HashedUri"
+ }
+ }
+ }
+ },
+ "RegionOfInterest": {
+ "description": "A region of interest within an asset describing the change.\n\nThis struct can be used from [`Action::changes`][crate::assertions::Action::changes],\n[`AssertionMetadata::region_of_interest`][crate::assertions::AssertionMetadata::region_of_interest], or\n[`SoftBindingScope::region`][crate::assertions::soft_binding::SoftBindingScope::region].",
+ "type": "object",
+ "properties": {
+ "region": {
+ "description": "A range describing the region of interest for the specific asset.",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Range"
+ }
+ },
+ "name": {
+ "description": "A free-text string representing a human-readable name for the region which might be used in a user interface.",
+ "type": ["string", "null"]
+ },
+ "identifier": {
+ "description": "A free-text string representing a machine-readable, unique to this assertion, identifier for the region.",
+ "type": ["string", "null"]
+ },
+ "type": {
+ "description": "A value from a controlled vocabulary such as or an entity-specific\nvalue (e.g., com.litware.newType) that represents the type of thing(s) depicted by a region.\n\nNote this field serializes/deserializes into the name `type`.",
+ "type": ["string", "null"]
+ },
+ "role": {
+ "description": "A value from our controlled vocabulary or an entity-specific value (e.g., com.litware.coolArea) that represents\nthe role of a region among other regions.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Role"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "description": {
+ "description": "A free-text string.",
+ "type": ["string", "null"]
+ },
+ "metadata": {
+ "description": "Additional information about the asset.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AssertionMetadata"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["region"]
+ },
+ "Range": {
+ "description": "A spatial, temporal, frame, or textual range describing the region of interest.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "The type of range of interest.",
+ "$ref": "#/$defs/RangeType"
+ },
+ "shape": {
+ "description": "A spatial range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Shape"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "time": {
+ "description": "A temporal range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Time"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "frame": {
+ "description": "A frame range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Frame"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "text": {
+ "description": "A textual range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Text"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "item": {
+ "description": "A item identifier.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Item"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["type"]
+ },
+ "RangeType": {
+ "description": "The type of range for the region of interest.",
+ "oneOf": [
+ {
+ "description": "A spatial range, see [`Shape`] for more details.",
+ "type": "string",
+ "const": "spatial"
+ },
+ {
+ "description": "A temporal range, see [`Time`] for more details.",
+ "type": "string",
+ "const": "temporal"
+ },
+ {
+ "description": "A spatial range, see [`Frame`] for more details.",
+ "type": "string",
+ "const": "frame"
+ },
+ {
+ "description": "A textual range, see [`Text`] for more details.",
+ "type": "string",
+ "const": "textual"
+ },
+ {
+ "description": "A range identified by a specific identifier and value, see [`Item`] for more details.",
+ "type": "string",
+ "const": "identified"
+ }
+ ]
+ },
+ "Shape": {
+ "description": "A spatial range representing rectangle, circle, or a polygon.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "The type of shape.",
+ "$ref": "#/$defs/ShapeType"
+ },
+ "unit": {
+ "description": "The type of unit for the shape range.",
+ "$ref": "#/$defs/UnitType"
+ },
+ "origin": {
+ "description": "THe origin of the coordinate in the shape.",
+ "$ref": "#/$defs/Coordinate"
+ },
+ "width": {
+ "description": "The width for rectangles or diameter for circles.\n\nThis field can be ignored for polygons.",
+ "type": ["number", "null"],
+ "format": "double"
+ },
+ "height": {
+ "description": "The height of a rectnagle.\n\nThis field can be ignored for circles and polygons.",
+ "type": ["number", "null"],
+ "format": "double"
+ },
+ "inside": {
+ "description": "If the range is inside the shape.\n\nThe default value is true.",
+ "type": ["boolean", "null"]
+ },
+ "vertices": {
+ "description": "The vertices of the polygon.\n\nThis field can be ignored for rectangles and circles.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/Coordinate"
+ }
+ }
+ },
+ "required": ["type", "unit", "origin"]
+ },
+ "ShapeType": {
+ "description": "The type of shape for the range.",
+ "oneOf": [
+ {
+ "description": "A rectangle.",
+ "type": "string",
+ "const": "rectangle"
+ },
+ {
+ "description": "A circle.",
+ "type": "string",
+ "const": "circle"
+ },
+ {
+ "description": "A polygon.",
+ "type": "string",
+ "const": "polygon"
+ }
+ ]
+ },
+ "UnitType": {
+ "description": "The type of unit for the range.",
+ "oneOf": [
+ {
+ "description": "Use pixels.",
+ "type": "string",
+ "const": "pixel"
+ },
+ {
+ "description": "Use percentage.",
+ "type": "string",
+ "const": "percent"
+ }
+ ]
+ },
+ "Coordinate": {
+ "description": "An x, y coordinate used for specifying vertices in polygons.",
+ "type": "object",
+ "properties": {
+ "x": {
+ "description": "The coordinate along the x-axis.",
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "description": "The coordinate along the y-axis.",
+ "type": "number",
+ "format": "double"
+ }
+ },
+ "required": ["x", "y"]
+ },
+ "Time": {
+ "description": "A temporal range representing a starting time to an ending time.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "The type of time.",
+ "$ref": "#/$defs/TimeType",
+ "default": "npt"
+ },
+ "start": {
+ "description": "The start time or the start of the asset if not present.",
+ "type": ["string", "null"]
+ },
+ "end": {
+ "description": "The end time or the end of the asset if not present.",
+ "type": ["string", "null"]
+ }
+ }
+ },
+ "TimeType": {
+ "description": "The type of time.",
+ "oneOf": [
+ {
+ "description": "Times are described using Normal Play Time (npt) as described in RFC 2326.",
+ "type": "string",
+ "const": "npt"
+ }
+ ]
+ },
+ "Frame": {
+ "description": "A frame range representing starting and ending frames or pages.\n\nIf both `start` and `end` are missing, the frame will span the entire asset.",
+ "type": "object",
+ "properties": {
+ "start": {
+ "description": "The start of the frame or the end of the asset if not present.\n\nThe first frame/page starts at 0.",
+ "type": ["integer", "null"],
+ "format": "int32"
+ },
+ "end": {
+ "description": "The end of the frame inclusive or the end of the asset if not present.",
+ "type": ["integer", "null"],
+ "format": "int32"
+ }
+ }
+ },
+ "Text": {
+ "description": "A textual range representing multiple (possibly discontinuous) ranges of text.",
+ "type": "object",
+ "properties": {
+ "selectors": {
+ "description": "The ranges of text to select.",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TextSelectorRange"
+ }
+ }
+ },
+ "required": ["selectors"]
+ },
+ "TextSelectorRange": {
+ "description": "One or two [`TextSelector`][TextSelector] identifiying the range to select.",
+ "type": "object",
+ "properties": {
+ "selector": {
+ "description": "The start (or entire) text range.",
+ "$ref": "#/$defs/TextSelector"
+ },
+ "end": {
+ "description": "The end of the text range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TextSelector"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["selector"]
+ },
+ "TextSelector": {
+ "description": "Selects a range of text via a fragment identifier.\n\nThis is modeled after the W3C Web Annotation selector model.",
+ "type": "object",
+ "properties": {
+ "fragment": {
+ "description": "Fragment identifier as per RFC3023 (XML) or ISO 32000-2 (PDF), Annex O.",
+ "type": "string"
+ },
+ "start": {
+ "description": "The start character offset or the start of the fragment if not present.",
+ "type": ["integer", "null"],
+ "format": "int32"
+ },
+ "end": {
+ "description": "The end character offset or the end of the fragment if not present.",
+ "type": ["integer", "null"],
+ "format": "int32"
+ }
+ },
+ "required": ["fragment"]
+ },
+ "Item": {
+ "description": "Description of the boundaries of an identified range.",
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "description": "The container-specific term used to identify items, such as \"track_id\" for MP4 or \"item_ID\" for HEIF.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The value of the identifier, e.g. a value of \"2\" for an identifier of \"track_id\" would imply track 2 of the asset.",
+ "type": "string"
+ }
+ },
+ "required": ["identifier", "value"]
+ },
+ "Role": {
+ "description": "A role describing the region.",
+ "oneOf": [
+ {
+ "description": "Arbitrary area worth identifying.",
+ "type": "string",
+ "const": "c2pa.areaOfInterest"
+ },
+ {
+ "description": "This area is all that is left after a crop action.",
+ "type": "string",
+ "const": "c2pa.cropped"
+ },
+ {
+ "description": "This area has had edits applied to it.",
+ "type": "string",
+ "const": "c2pa.edited"
+ },
+ {
+ "description": "The area where an ingredient was placed/added.",
+ "type": "string",
+ "const": "c2pa.placed"
+ },
+ {
+ "description": "Something in this area was redacted.",
+ "type": "string",
+ "const": "c2pa.redacted"
+ },
+ {
+ "description": "Area specific to a subject (human or not).",
+ "type": "string",
+ "const": "c2pa.subjectArea"
+ },
+ {
+ "description": "A range of information was removed/deleted.",
+ "type": "string",
+ "const": "c2pa.deleted"
+ },
+ {
+ "description": "Styling was applied to this area.",
+ "type": "string",
+ "const": "c2pa.styled"
+ },
+ {
+ "description": "Invisible watermarking was applied to this area for the purpose of soft binding.",
+ "type": "string",
+ "const": "c2pa.watermarked"
+ }
+ ]
+ },
+ "Ingredient": {
+ "description": "An `Ingredient` is any external asset that has been used in the creation of an asset.",
+ "type": "object",
+ "properties": {
+ "title": {
+ "description": "A human-readable title, generally source filename.",
+ "type": ["string", "null"]
+ },
+ "format": {
+ "description": "The format of the source file as a MIME type.",
+ "type": ["string", "null"]
+ },
+ "document_id": {
+ "description": "Document ID from `xmpMM:DocumentID` in XMP metadata.",
+ "type": ["string", "null"]
+ },
+ "instance_id": {
+ "description": "Instance ID from `xmpMM:InstanceID` in XMP metadata.",
+ "type": ["string", "null"]
+ },
+ "provenance": {
+ "description": "URI from `dcterms:provenance` in XMP metadata.",
+ "type": ["string", "null"]
+ },
+ "thumbnail": {
+ "description": "A thumbnail image capturing the visual state at the time of import.\n\nA tuple of thumbnail MIME format (for example `image/jpeg`) and binary bits of the image.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "hash": {
+ "description": "An optional hash of the asset to prevent duplicates.",
+ "type": ["string", "null"]
+ },
+ "relationship": {
+ "description": "Set to `ParentOf` if this is the parent ingredient.\n\nThere can only be one parent ingredient in the ingredients.",
+ "$ref": "#/$defs/Relationship",
+ "default": "componentOf"
+ },
+ "active_manifest": {
+ "description": "The active manifest label (if one exists).\n\nIf this ingredient has a [`ManifestStore`],\nthis will hold the label of the active [`Manifest`].\n\n[`Manifest`]: crate::Manifest\n[`ManifestStore`]: crate::ManifestStore",
+ "type": ["string", "null"]
+ },
+ "validation_status": {
+ "description": "Validation status (Ingredient v1 & v2)",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/ValidationStatus"
+ }
+ },
+ "validation_results": {
+ "description": "Validation results (Ingredient.V3)",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ValidationResults"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "data": {
+ "description": "A reference to the actual data of the ingredient.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "description": {
+ "description": "Additional description of the ingredient.",
+ "type": ["string", "null"]
+ },
+ "informational_URI": {
+ "description": "URI to an informational page about the ingredient or its data.",
+ "type": ["string", "null"]
+ },
+ "metadata": {
+ "description": "Any additional [`Metadata`] as defined in the C2PA spec.\n\n[`Metadata`]: crate::Metadata",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AssertionMetadata"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "data_types": {
+ "description": "Additional information about the data's type to the ingredient V2 structure.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/AssetType"
+ }
+ },
+ "manifest_data": {
+ "description": "A [`ManifestStore`] from the source asset extracted as a binary C2PA blob.\n\n[`ManifestStore`]: crate::ManifestStore",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "label": {
+ "description": "The ingredient's label as assigned in the manifest.",
+ "type": ["string", "null"]
+ },
+ "ocsp_responses": {
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/ResourceRef"
+ }
+ }
+ }
+ },
+ "Relationship": {
+ "description": "The relationship of the ingredient to the current asset.",
+ "oneOf": [
+ {
+ "description": "The current asset is derived from this ingredient.",
+ "type": "string",
+ "const": "parentOf"
+ },
+ {
+ "description": "The current asset is a part of this ingredient.",
+ "type": "string",
+ "const": "componentOf"
+ },
+ {
+ "description": "The ingredient was used as an input to a computational process to create or modify the asset.",
+ "type": "string",
+ "const": "inputTo"
+ }
+ ]
+ },
+ "ValidationStatus": {
+ "description": "A `ValidationStatus` struct describes the validation status of a\nspecific part of a manifest.\n\nSee .",
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string"
+ },
+ "url": {
+ "type": ["string", "null"]
+ },
+ "explanation": {
+ "type": ["string", "null"]
+ },
+ "success": {
+ "type": ["boolean", "null"],
+ "writeOnly": true
+ }
+ },
+ "required": ["code"]
+ },
+ "ValidationResults": {
+ "description": "A map of validation results for a manifest store.\n\nThe map contains the validation results for the active manifest and any ingredient deltas.\nIt is normal for there to be many",
+ "type": "object",
+ "properties": {
+ "activeManifest": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/StatusCodes"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ingredientDeltas": {
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/IngredientDeltaValidationResult"
+ }
+ }
+ }
+ },
+ "StatusCodes": {
+ "description": "Contains a set of success, informational, and failure validation status codes.",
+ "type": "object",
+ "properties": {
+ "success": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ValidationStatus"
+ }
+ },
+ "informational": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ValidationStatus"
+ }
+ },
+ "failure": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ValidationStatus"
+ }
+ }
+ },
+ "required": ["success", "informational", "failure"]
+ },
+ "IngredientDeltaValidationResult": {
+ "description": "Represents any changes or deltas between the current and previous validation results for an ingredient's manifest.",
+ "type": "object",
+ "properties": {
+ "ingredientAssertionURI": {
+ "description": "JUMBF URI reference to the ingredient assertion",
+ "type": "string"
+ },
+ "validationDeltas": {
+ "description": "Validation results for the ingredient's active manifest",
+ "$ref": "#/$defs/StatusCodes"
+ }
+ },
+ "required": ["ingredientAssertionURI", "validationDeltas"]
+ },
+ "AssertionDefinition": {
+ "description": "Defines an assertion that consists of a label that can be either\na C2PA-defined assertion label or a custom label in reverse domain format.",
+ "type": "object",
+ "properties": {
+ "label": {
+ "description": "An assertion label in reverse domain format",
+ "type": "string"
+ },
+ "data": {
+ "description": "The assertion data",
+ "$ref": "#/$defs/AssertionData"
+ },
+ "kind": {
+ "description": "The kind of assertion data, either Cbor or Json (defaults to Cbor)",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ManifestAssertionKind"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "created": {
+ "description": "True if this assertion is attributed to the signer (defaults to false)",
+ "type": "boolean"
+ }
+ },
+ "required": ["label", "data"]
+ },
+ "AssertionData": {
+ "description": "This allows the assertion to be expressed as CBOR or JSON.\nThe default is CBOR unless you specify that an assertion should be JSON.",
+ "anyOf": [true]
+ },
+ "ManifestAssertionKind": {
+ "description": "Assertions in C2PA can be stored in several formats",
+ "type": "string",
+ "enum": ["Cbor", "Json", "Binary", "Uri"]
+ }
+ }
+}
diff --git a/static/schemas/Reader.schema.json b/static/schemas/Reader.schema.json
new file mode 100644
index 00000000..db1535ea
--- /dev/null
+++ b/static/schemas/Reader.schema.json
@@ -0,0 +1,1164 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "title": "Reader",
+ "description": "Use a Reader to read and validate a manifest store.",
+ "type": "object",
+ "properties": {
+ "active_manifest": {
+ "description": "A label for the active (most recent) manifest in the store",
+ "type": ["string", "null"]
+ },
+ "manifests": {
+ "description": "A HashMap of Manifests",
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/$defs/Manifest"
+ }
+ },
+ "validation_status": {
+ "description": "ValidationStatus generated when loading the ManifestStore from an asset",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/ValidationStatus"
+ }
+ },
+ "validation_results": {
+ "description": "ValidationStatus generated when loading the ManifestStore from an asset",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ValidationResults"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "validation_state": {
+ "description": "The validation state of the manifest store",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ValidationState"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["manifests"],
+ "$defs": {
+ "Manifest": {
+ "description": "A Manifest represents all the information in a c2pa manifest",
+ "type": "object",
+ "properties": {
+ "vendor": {
+ "description": "Optional prefix added to the generated Manifest label.\nThis is typically an internet domain name for the vendor (i.e. `adobe`).",
+ "type": ["string", "null"]
+ },
+ "claim_generator": {
+ "description": "A User Agent formatted string identifying the software/hardware/system produced this claim\nSpaces are not allowed in names, versions can be specified with product/1.0 syntax.",
+ "type": ["string", "null"]
+ },
+ "claim_generator_info": {
+ "description": "A list of claim generator info data identifying the software/hardware/system produced this claim.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/ClaimGeneratorInfo"
+ }
+ },
+ "metadata": {
+ "description": "A list of user metadata for this claim.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/AssertionMetadata"
+ }
+ },
+ "title": {
+ "description": "A human-readable title, generally source filename.",
+ "type": ["string", "null"]
+ },
+ "format": {
+ "description": "The format of the source file as a MIME type.",
+ "type": ["string", "null"]
+ },
+ "instance_id": {
+ "description": "Instance ID from `xmpMM:InstanceID` in XMP metadata.",
+ "type": "string",
+ "default": "xmp:iid:3322badc-e259-4ed7-a106-b81135ba8f52"
+ },
+ "thumbnail": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ingredients": {
+ "description": "A List of ingredients",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Ingredient"
+ },
+ "default": []
+ },
+ "credentials": {
+ "description": "A List of verified credentials",
+ "type": ["array", "null"],
+ "items": true
+ },
+ "assertions": {
+ "description": "A list of assertions",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ManifestAssertion"
+ },
+ "default": []
+ },
+ "redactions": {
+ "description": "A list of redactions - URIs to a redacted assertions",
+ "type": ["array", "null"],
+ "items": {
+ "type": "string"
+ }
+ },
+ "signature_info": {
+ "description": "Signature data (only used for reporting)",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SignatureInfo"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "label": {
+ "type": ["string", "null"]
+ }
+ }
+ },
+ "ClaimGeneratorInfo": {
+ "description": "Description of the claim generator, or the software used in generating the claim.\n\nThis structure is also used for actions softwareAgent",
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "A human readable string naming the claim_generator",
+ "type": "string"
+ },
+ "version": {
+ "description": "A human readable string of the product's version",
+ "type": ["string", "null"]
+ },
+ "icon": {
+ "description": "hashed URI to the icon (either embedded or remote)",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/UriOrResource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "operating_system": {
+ "description": "A human readable string of the OS the claim generator is running on",
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["name"],
+ "additionalProperties": true
+ },
+ "UriOrResource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "$ref": "#/$defs/HashedUri"
+ }
+ ]
+ },
+ "ResourceRef": {
+ "description": "A reference to a resource to be used in JSON serialization.\n\nThe underlying data can be read as a stream via [`Reader::resource_to_stream`][crate::Reader::resource_to_stream].",
+ "type": "object",
+ "properties": {
+ "format": {
+ "description": "The mime type of the referenced resource.",
+ "type": "string"
+ },
+ "identifier": {
+ "description": "A URI that identifies the resource as referenced from the manifest.\n\nThis may be a JUMBF URI, a file path, a URL or any other string.\nRelative JUMBF URIs will be resolved with the manifest label.\nRelative file paths will be resolved with the base path if provided.",
+ "type": "string"
+ },
+ "data_types": {
+ "description": "More detailed data types as defined in the C2PA spec.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/AssetType"
+ }
+ },
+ "alg": {
+ "description": "The algorithm used to hash the resource (if applicable).",
+ "type": ["string", "null"]
+ },
+ "hash": {
+ "description": "The hash of the resource (if applicable).",
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["format", "identifier"]
+ },
+ "AssetType": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "version": {
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["type"]
+ },
+ "HashedUri": {
+ "description": "A `HashedUri` provides a reference to content available within the same\nmanifest store.\n\nThis is described in [§8.3, URI References], of the C2PA Technical\nSpecification.\n\n[§8.3, URI References]: https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_uri_references",
+ "type": "object",
+ "properties": {
+ "url": {
+ "description": "JUMBF URI reference",
+ "type": "string"
+ },
+ "alg": {
+ "description": "A string identifying the cryptographic hash algorithm used to compute\nthe hash",
+ "type": ["string", "null"]
+ },
+ "hash": {
+ "description": "Byte string containing the hash value",
+ "type": "array",
+ "items": {
+ "type": "integer",
+ "format": "uint8",
+ "minimum": 0,
+ "maximum": 255
+ }
+ }
+ },
+ "required": ["url", "hash"]
+ },
+ "AssertionMetadata": {
+ "description": "The AssertionMetadata structure can be used as part of other assertions or on its own to reference others",
+ "type": "object",
+ "properties": {
+ "reviewRatings": {
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/ReviewRating"
+ }
+ },
+ "dateTime": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/DateT"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "reference": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/HashedUri"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "dataSource": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/DataSource"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "localizations": {
+ "type": ["array", "null"],
+ "items": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "regionOfInterest": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/RegionOfInterest"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ }
+ },
+ "ReviewRating": {
+ "description": "A rating on an Assertion.\n\nSee .",
+ "type": "object",
+ "properties": {
+ "explanation": {
+ "type": "string"
+ },
+ "code": {
+ "type": ["string", "null"]
+ },
+ "value": {
+ "type": "integer",
+ "format": "uint8",
+ "minimum": 0,
+ "maximum": 255
+ }
+ },
+ "required": ["explanation", "value"]
+ },
+ "DateT": {
+ "type": "string"
+ },
+ "DataSource": {
+ "description": "A description of the source for assertion data",
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "A value from among the enumerated list indicating the source of the assertion.",
+ "type": "string"
+ },
+ "details": {
+ "description": "A human-readable string giving details about the source of the assertion data.",
+ "type": ["string", "null"]
+ },
+ "actors": {
+ "description": "A list of [`Actor`]s associated with this source.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/Actor"
+ }
+ }
+ },
+ "required": ["type"]
+ },
+ "Actor": {
+ "description": "Identifies a person responsible for an action.",
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "description": "An identifier for a human actor, used when the \"type\" is `humanEntry.identified`.",
+ "type": ["string", "null"]
+ },
+ "credentials": {
+ "description": "List of references to W3C Verifiable Credentials.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/HashedUri"
+ }
+ }
+ }
+ },
+ "RegionOfInterest": {
+ "description": "A region of interest within an asset describing the change.\n\nThis struct can be used from [`Action::changes`][crate::assertions::Action::changes],\n[`AssertionMetadata::region_of_interest`][crate::assertions::AssertionMetadata::region_of_interest], or\n[`SoftBindingScope::region`][crate::assertions::soft_binding::SoftBindingScope::region].",
+ "type": "object",
+ "properties": {
+ "region": {
+ "description": "A range describing the region of interest for the specific asset.",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Range"
+ }
+ },
+ "name": {
+ "description": "A free-text string representing a human-readable name for the region which might be used in a user interface.",
+ "type": ["string", "null"]
+ },
+ "identifier": {
+ "description": "A free-text string representing a machine-readable, unique to this assertion, identifier for the region.",
+ "type": ["string", "null"]
+ },
+ "type": {
+ "description": "A value from a controlled vocabulary such as or an entity-specific\nvalue (e.g., com.litware.newType) that represents the type of thing(s) depicted by a region.\n\nNote this field serializes/deserializes into the name `type`.",
+ "type": ["string", "null"]
+ },
+ "role": {
+ "description": "A value from our controlled vocabulary or an entity-specific value (e.g., com.litware.coolArea) that represents\nthe role of a region among other regions.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Role"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "description": {
+ "description": "A free-text string.",
+ "type": ["string", "null"]
+ },
+ "metadata": {
+ "description": "Additional information about the asset.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AssertionMetadata"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["region"]
+ },
+ "Range": {
+ "description": "A spatial, temporal, frame, or textual range describing the region of interest.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "The type of range of interest.",
+ "$ref": "#/$defs/RangeType"
+ },
+ "shape": {
+ "description": "A spatial range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Shape"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "time": {
+ "description": "A temporal range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Time"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "frame": {
+ "description": "A frame range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Frame"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "text": {
+ "description": "A textual range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Text"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "item": {
+ "description": "A item identifier.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/Item"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["type"]
+ },
+ "RangeType": {
+ "description": "The type of range for the region of interest.",
+ "oneOf": [
+ {
+ "description": "A spatial range, see [`Shape`] for more details.",
+ "type": "string",
+ "const": "spatial"
+ },
+ {
+ "description": "A temporal range, see [`Time`] for more details.",
+ "type": "string",
+ "const": "temporal"
+ },
+ {
+ "description": "A spatial range, see [`Frame`] for more details.",
+ "type": "string",
+ "const": "frame"
+ },
+ {
+ "description": "A textual range, see [`Text`] for more details.",
+ "type": "string",
+ "const": "textual"
+ },
+ {
+ "description": "A range identified by a specific identifier and value, see [`Item`] for more details.",
+ "type": "string",
+ "const": "identified"
+ }
+ ]
+ },
+ "Shape": {
+ "description": "A spatial range representing rectangle, circle, or a polygon.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "The type of shape.",
+ "$ref": "#/$defs/ShapeType"
+ },
+ "unit": {
+ "description": "The type of unit for the shape range.",
+ "$ref": "#/$defs/UnitType"
+ },
+ "origin": {
+ "description": "THe origin of the coordinate in the shape.",
+ "$ref": "#/$defs/Coordinate"
+ },
+ "width": {
+ "description": "The width for rectangles or diameter for circles.\n\nThis field can be ignored for polygons.",
+ "type": ["number", "null"],
+ "format": "double"
+ },
+ "height": {
+ "description": "The height of a rectnagle.\n\nThis field can be ignored for circles and polygons.",
+ "type": ["number", "null"],
+ "format": "double"
+ },
+ "inside": {
+ "description": "If the range is inside the shape.\n\nThe default value is true.",
+ "type": ["boolean", "null"]
+ },
+ "vertices": {
+ "description": "The vertices of the polygon.\n\nThis field can be ignored for rectangles and circles.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/Coordinate"
+ }
+ }
+ },
+ "required": ["type", "unit", "origin"]
+ },
+ "ShapeType": {
+ "description": "The type of shape for the range.",
+ "oneOf": [
+ {
+ "description": "A rectangle.",
+ "type": "string",
+ "const": "rectangle"
+ },
+ {
+ "description": "A circle.",
+ "type": "string",
+ "const": "circle"
+ },
+ {
+ "description": "A polygon.",
+ "type": "string",
+ "const": "polygon"
+ }
+ ]
+ },
+ "UnitType": {
+ "description": "The type of unit for the range.",
+ "oneOf": [
+ {
+ "description": "Use pixels.",
+ "type": "string",
+ "const": "pixel"
+ },
+ {
+ "description": "Use percentage.",
+ "type": "string",
+ "const": "percent"
+ }
+ ]
+ },
+ "Coordinate": {
+ "description": "An x, y coordinate used for specifying vertices in polygons.",
+ "type": "object",
+ "properties": {
+ "x": {
+ "description": "The coordinate along the x-axis.",
+ "type": "number",
+ "format": "double"
+ },
+ "y": {
+ "description": "The coordinate along the y-axis.",
+ "type": "number",
+ "format": "double"
+ }
+ },
+ "required": ["x", "y"]
+ },
+ "Time": {
+ "description": "A temporal range representing a starting time to an ending time.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "The type of time.",
+ "$ref": "#/$defs/TimeType",
+ "default": "npt"
+ },
+ "start": {
+ "description": "The start time or the start of the asset if not present.",
+ "type": ["string", "null"]
+ },
+ "end": {
+ "description": "The end time or the end of the asset if not present.",
+ "type": ["string", "null"]
+ }
+ }
+ },
+ "TimeType": {
+ "description": "The type of time.",
+ "oneOf": [
+ {
+ "description": "Times are described using Normal Play Time (npt) as described in RFC 2326.",
+ "type": "string",
+ "const": "npt"
+ }
+ ]
+ },
+ "Frame": {
+ "description": "A frame range representing starting and ending frames or pages.\n\nIf both `start` and `end` are missing, the frame will span the entire asset.",
+ "type": "object",
+ "properties": {
+ "start": {
+ "description": "The start of the frame or the end of the asset if not present.\n\nThe first frame/page starts at 0.",
+ "type": ["integer", "null"],
+ "format": "int32"
+ },
+ "end": {
+ "description": "The end of the frame inclusive or the end of the asset if not present.",
+ "type": ["integer", "null"],
+ "format": "int32"
+ }
+ }
+ },
+ "Text": {
+ "description": "A textual range representing multiple (possibly discontinuous) ranges of text.",
+ "type": "object",
+ "properties": {
+ "selectors": {
+ "description": "The ranges of text to select.",
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TextSelectorRange"
+ }
+ }
+ },
+ "required": ["selectors"]
+ },
+ "TextSelectorRange": {
+ "description": "One or two [`TextSelector`][TextSelector] identifiying the range to select.",
+ "type": "object",
+ "properties": {
+ "selector": {
+ "description": "The start (or entire) text range.",
+ "$ref": "#/$defs/TextSelector"
+ },
+ "end": {
+ "description": "The end of the text range.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TextSelector"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["selector"]
+ },
+ "TextSelector": {
+ "description": "Selects a range of text via a fragment identifier.\n\nThis is modeled after the W3C Web Annotation selector model.",
+ "type": "object",
+ "properties": {
+ "fragment": {
+ "description": "Fragment identifier as per RFC3023 (XML) or ISO 32000-2 (PDF), Annex O.",
+ "type": "string"
+ },
+ "start": {
+ "description": "The start character offset or the start of the fragment if not present.",
+ "type": ["integer", "null"],
+ "format": "int32"
+ },
+ "end": {
+ "description": "The end character offset or the end of the fragment if not present.",
+ "type": ["integer", "null"],
+ "format": "int32"
+ }
+ },
+ "required": ["fragment"]
+ },
+ "Item": {
+ "description": "Description of the boundaries of an identified range.",
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "description": "The container-specific term used to identify items, such as \"track_id\" for MP4 or \"item_ID\" for HEIF.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The value of the identifier, e.g. a value of \"2\" for an identifier of \"track_id\" would imply track 2 of the asset.",
+ "type": "string"
+ }
+ },
+ "required": ["identifier", "value"]
+ },
+ "Role": {
+ "description": "A role describing the region.",
+ "oneOf": [
+ {
+ "description": "Arbitrary area worth identifying.",
+ "type": "string",
+ "const": "c2pa.areaOfInterest"
+ },
+ {
+ "description": "This area is all that is left after a crop action.",
+ "type": "string",
+ "const": "c2pa.cropped"
+ },
+ {
+ "description": "This area has had edits applied to it.",
+ "type": "string",
+ "const": "c2pa.edited"
+ },
+ {
+ "description": "The area where an ingredient was placed/added.",
+ "type": "string",
+ "const": "c2pa.placed"
+ },
+ {
+ "description": "Something in this area was redacted.",
+ "type": "string",
+ "const": "c2pa.redacted"
+ },
+ {
+ "description": "Area specific to a subject (human or not).",
+ "type": "string",
+ "const": "c2pa.subjectArea"
+ },
+ {
+ "description": "A range of information was removed/deleted.",
+ "type": "string",
+ "const": "c2pa.deleted"
+ },
+ {
+ "description": "Styling was applied to this area.",
+ "type": "string",
+ "const": "c2pa.styled"
+ },
+ {
+ "description": "Invisible watermarking was applied to this area for the purpose of soft binding.",
+ "type": "string",
+ "const": "c2pa.watermarked"
+ }
+ ]
+ },
+ "Ingredient": {
+ "description": "An `Ingredient` is any external asset that has been used in the creation of an asset.",
+ "type": "object",
+ "properties": {
+ "title": {
+ "description": "A human-readable title, generally source filename.",
+ "type": ["string", "null"]
+ },
+ "format": {
+ "description": "The format of the source file as a MIME type.",
+ "type": ["string", "null"]
+ },
+ "document_id": {
+ "description": "Document ID from `xmpMM:DocumentID` in XMP metadata.",
+ "type": ["string", "null"]
+ },
+ "instance_id": {
+ "description": "Instance ID from `xmpMM:InstanceID` in XMP metadata.",
+ "type": ["string", "null"]
+ },
+ "provenance": {
+ "description": "URI from `dcterms:provenance` in XMP metadata.",
+ "type": ["string", "null"]
+ },
+ "thumbnail": {
+ "description": "A thumbnail image capturing the visual state at the time of import.\n\nA tuple of thumbnail MIME format (for example `image/jpeg`) and binary bits of the image.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "hash": {
+ "description": "An optional hash of the asset to prevent duplicates.",
+ "type": ["string", "null"]
+ },
+ "relationship": {
+ "description": "Set to `ParentOf` if this is the parent ingredient.\n\nThere can only be one parent ingredient in the ingredients.",
+ "$ref": "#/$defs/Relationship",
+ "default": "componentOf"
+ },
+ "active_manifest": {
+ "description": "The active manifest label (if one exists).\n\nIf this ingredient has a [`ManifestStore`],\nthis will hold the label of the active [`Manifest`].\n\n[`Manifest`]: crate::Manifest\n[`ManifestStore`]: crate::ManifestStore",
+ "type": ["string", "null"]
+ },
+ "validation_status": {
+ "description": "Validation status (Ingredient v1 & v2)",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/ValidationStatus"
+ }
+ },
+ "validation_results": {
+ "description": "Validation results (Ingredient.V3)",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ValidationResults"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "data": {
+ "description": "A reference to the actual data of the ingredient.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "description": {
+ "description": "Additional description of the ingredient.",
+ "type": ["string", "null"]
+ },
+ "informational_URI": {
+ "description": "URI to an informational page about the ingredient or its data.",
+ "type": ["string", "null"]
+ },
+ "metadata": {
+ "description": "Any additional [`Metadata`] as defined in the C2PA spec.\n\n[`Metadata`]: crate::Metadata",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AssertionMetadata"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "data_types": {
+ "description": "Additional information about the data's type to the ingredient V2 structure.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/AssetType"
+ }
+ },
+ "manifest_data": {
+ "description": "A [`ManifestStore`] from the source asset extracted as a binary C2PA blob.\n\n[`ManifestStore`]: crate::ManifestStore",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "label": {
+ "description": "The ingredient's label as assigned in the manifest.",
+ "type": ["string", "null"]
+ },
+ "ocsp_responses": {
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/ResourceRef"
+ }
+ }
+ }
+ },
+ "Relationship": {
+ "description": "The relationship of the ingredient to the current asset.",
+ "oneOf": [
+ {
+ "description": "The current asset is derived from this ingredient.",
+ "type": "string",
+ "const": "parentOf"
+ },
+ {
+ "description": "The current asset is a part of this ingredient.",
+ "type": "string",
+ "const": "componentOf"
+ },
+ {
+ "description": "The ingredient was used as an input to a computational process to create or modify the asset.",
+ "type": "string",
+ "const": "inputTo"
+ }
+ ]
+ },
+ "ValidationStatus": {
+ "description": "A `ValidationStatus` struct describes the validation status of a\nspecific part of a manifest.\n\nSee .",
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string"
+ },
+ "url": {
+ "type": ["string", "null"]
+ },
+ "explanation": {
+ "type": ["string", "null"]
+ },
+ "success": {
+ "type": ["boolean", "null"],
+ "writeOnly": true
+ }
+ },
+ "required": ["code"]
+ },
+ "ValidationResults": {
+ "description": "A map of validation results for a manifest store.\n\nThe map contains the validation results for the active manifest and any ingredient deltas.\nIt is normal for there to be many",
+ "type": "object",
+ "properties": {
+ "activeManifest": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/StatusCodes"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "ingredientDeltas": {
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/IngredientDeltaValidationResult"
+ }
+ }
+ }
+ },
+ "StatusCodes": {
+ "description": "Contains a set of success, informational, and failure validation status codes.",
+ "type": "object",
+ "properties": {
+ "success": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ValidationStatus"
+ }
+ },
+ "informational": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ValidationStatus"
+ }
+ },
+ "failure": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/ValidationStatus"
+ }
+ }
+ },
+ "required": ["success", "informational", "failure"]
+ },
+ "IngredientDeltaValidationResult": {
+ "description": "Represents any changes or deltas between the current and previous validation results for an ingredient's manifest.",
+ "type": "object",
+ "properties": {
+ "ingredientAssertionURI": {
+ "description": "JUMBF URI reference to the ingredient assertion",
+ "type": "string"
+ },
+ "validationDeltas": {
+ "description": "Validation results for the ingredient's active manifest",
+ "$ref": "#/$defs/StatusCodes"
+ }
+ },
+ "required": ["ingredientAssertionURI", "validationDeltas"]
+ },
+ "ManifestAssertion": {
+ "description": "A labeled container for an Assertion value in a Manifest",
+ "type": "object",
+ "properties": {
+ "label": {
+ "description": "An assertion label in reverse domain format",
+ "type": "string"
+ },
+ "data": {
+ "description": "The data of the assertion as Value",
+ "$ref": "#/$defs/ManifestData"
+ },
+ "instance": {
+ "description": "There can be more than one assertion for any label",
+ "type": ["integer", "null"],
+ "format": "uint",
+ "minimum": 0
+ },
+ "kind": {
+ "description": "The [ManifestAssertionKind] for this assertion (as stored in c2pa content)",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ManifestAssertionKind"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "created": {
+ "description": "True if this assertion is attributed to the signer\nThis maps to a created vs a gathered assertion. (defaults to false)",
+ "type": "boolean"
+ }
+ },
+ "required": ["label", "data"]
+ },
+ "ManifestData": {
+ "anyOf": [
+ true,
+ {
+ "type": "array",
+ "items": {
+ "type": "integer",
+ "format": "uint8",
+ "minimum": 0,
+ "maximum": 255
+ }
+ }
+ ]
+ },
+ "ManifestAssertionKind": {
+ "description": "Assertions in C2PA can be stored in several formats",
+ "type": "string",
+ "enum": ["Cbor", "Json", "Binary", "Uri"]
+ },
+ "SignatureInfo": {
+ "description": "Holds information about a signature",
+ "type": "object",
+ "properties": {
+ "alg": {
+ "description": "Human-readable issuing authority for this signature.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SigningAlg"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "issuer": {
+ "description": "Human-readable issuing authority for this signature.",
+ "type": ["string", "null"]
+ },
+ "common_name": {
+ "description": "Human-readable for common name of this certificate.",
+ "type": ["string", "null"]
+ },
+ "cert_serial_number": {
+ "description": "The serial number of the certificate.",
+ "type": ["string", "null"]
+ },
+ "time": {
+ "description": "The time the signature was created.",
+ "type": ["string", "null"]
+ },
+ "revocation_status": {
+ "description": "Revocation status of the certificate.",
+ "type": ["boolean", "null"]
+ }
+ }
+ },
+ "SigningAlg": {
+ "description": "Describes the digital signature algorithms allowed by the C2PA spec.\n\nPer [§13.2, “Digital Signatures”]:\n\n> All digital signatures applied as per the technical requirements of this\n> specification shall be generated using one of the digital signature\n> algorithms and key types listed as described in this section.\n\n[§13.2, “Digital Signatures”]: https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_digital_signatures",
+ "oneOf": [
+ {
+ "description": "ECDSA with SHA-256",
+ "type": "string",
+ "const": "Es256"
+ },
+ {
+ "description": "ECDSA with SHA-384",
+ "type": "string",
+ "const": "Es384"
+ },
+ {
+ "description": "ECDSA with SHA-512",
+ "type": "string",
+ "const": "Es512"
+ },
+ {
+ "description": "RSASSA-PSS using SHA-256 and MGF1 with SHA-256",
+ "type": "string",
+ "const": "Ps256"
+ },
+ {
+ "description": "RSASSA-PSS using SHA-384 and MGF1 with SHA-384",
+ "type": "string",
+ "const": "Ps384"
+ },
+ {
+ "description": "RSASSA-PSS using SHA-512 and MGF1 with SHA-512",
+ "type": "string",
+ "const": "Ps512"
+ },
+ {
+ "description": "Edwards-Curve DSA (Ed25519 instance only)",
+ "type": "string",
+ "const": "Ed25519"
+ }
+ ]
+ },
+ "ValidationState": {
+ "description": "Indicates if the manifest store is valid and trusted.\n\nThe Trusted state implies the manifest store is valid and the active signature is trusted.",
+ "oneOf": [
+ {
+ "description": "Errors were found in the manifest store.",
+ "type": "string",
+ "const": "Invalid"
+ },
+ {
+ "description": "No errors were found in validation, but the active signature is not trusted.",
+ "type": "string",
+ "const": "Valid"
+ },
+ {
+ "description": "The manifest store is valid and the active signature is trusted.",
+ "type": "string",
+ "const": "Trusted"
+ }
+ ]
+ }
+ }
+}
diff --git a/static/schemas/Settings.schema.json b/static/schemas/Settings.schema.json
new file mode 100644
index 00000000..f0f570b7
--- /dev/null
+++ b/static/schemas/Settings.schema.json
@@ -0,0 +1,798 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "title": "Settings",
+ "description": "Settings for configuring all aspects of c2pa-rs.\n\n[Settings::default] will be set thread-locally by default. Any settings set via\n[Settings::from_toml] or [Settings::from_file] will also be thread-local.",
+ "type": "object",
+ "properties": {
+ "version": {
+ "description": "Version of the configuration.",
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "trust": {
+ "description": "Settings for configuring the C2PA trust lists.",
+ "$ref": "#/$defs/Trust"
+ },
+ "cawg_trust": {
+ "description": "Settings for configuring the CAWG trust lists.",
+ "$ref": "#/$defs/Trust"
+ },
+ "core": {
+ "description": "Settings for configuring core features.",
+ "$ref": "#/$defs/Core"
+ },
+ "verify": {
+ "description": "Settings for configuring verification.",
+ "$ref": "#/$defs/Verify"
+ },
+ "builder": {
+ "description": "Settings for configuring the [`Builder`].\n\n[`Builder`]: crate::Builder",
+ "$ref": "#/$defs/BuilderSettings"
+ },
+ "signer": {
+ "description": "Settings for configuring the base C2PA signer, accessible via [`Settings::signer`].",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SignerSettings"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cawg_x509_signer": {
+ "description": "Settings for configuring the CAWG x509 signer, accessible via [`Settings::signer`].",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/SignerSettings"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["version", "trust", "cawg_trust", "core", "verify", "builder"],
+ "$defs": {
+ "Trust": {
+ "description": "Settings to configure the trust list.",
+ "type": "object",
+ "properties": {
+ "verify_trust_list": {
+ "description": "Whether to verify certificates against the trust lists specified in [`Trust`]. This\noption is ONLY applicable to CAWG.\n\nThe default value is true.\n\n\nVerifying trust is REQUIRED by the CAWG spec. This option should only be used for development or testing.\n
",
+ "type": "boolean"
+ },
+ "user_anchors": {
+ "description": "List of additional user-provided trust anchor root certificates as a PEM bundle.",
+ "type": ["string", "null"]
+ },
+ "trust_anchors": {
+ "description": "List of default trust anchor root certificates as a PEM bundle.\n\nNormally this option contains the official C2PA-recognized trust anchors found here:\n",
+ "type": ["string", "null"]
+ },
+ "trust_config": {
+ "description": "List of allowed extended key usage (EKU) object identifiers (OID) that\ncertificates must have.",
+ "type": ["string", "null"]
+ },
+ "allowed_list": {
+ "description": "List of explicitly allowed certificates as a PEM bundle.",
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["verify_trust_list"]
+ },
+ "Core": {
+ "description": "Settings to configure core features.",
+ "type": "object",
+ "properties": {
+ "merkle_tree_chunk_size_in_kb": {
+ "description": "Size of the [`BmffHash`] merkle tree chunks in kilobytes.\n\nThis option is associated with the [`MerkleMap::fixed_block_size`] field.\n\nSee more information in the spec here:\n\n\n[`MerkleMap::fixed_block_size`]: crate::assertions::MerkleMap::fixed_block_size\n[`BmffHash`]: crate::assertions::BmffHash",
+ "type": ["integer", "null"],
+ "format": "uint",
+ "minimum": 0
+ },
+ "merkle_tree_max_proofs": {
+ "description": "Maximum number of proofs when validating or writing a [`BmffHash`] merkle tree.\n\nThis option defaults to 5.\n\nSee more information in the spec here:\n\n\n[`BmffHash`]: crate::assertions::BmffHash",
+ "type": "integer",
+ "format": "uint",
+ "minimum": 0
+ },
+ "backing_store_memory_threshold_in_mb": {
+ "description": "Maximum amount of data in megabytes that will be loaded into memory before\nbeing stored in temporary files on the disk.\n\nThis option defaults to 512MB and can result in noticeable performance improvements.",
+ "type": "integer",
+ "format": "uint",
+ "minimum": 0
+ },
+ "decode_identity_assertions": {
+ "description": "Whether to decode CAWG [`IdentityAssertion`]s during reading in the [`Reader`].\n\nThis option defaults to true.\n\n[`IdentityAssertion`]: crate::identity::IdentityAssertion\n[`Reader`]: crate::Reader",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "merkle_tree_max_proofs",
+ "backing_store_memory_threshold_in_mb",
+ "decode_identity_assertions"
+ ]
+ },
+ "Verify": {
+ "description": "Settings to configure the verification process.",
+ "type": "object",
+ "properties": {
+ "verify_after_reading": {
+ "description": "Whether to verify the manifest after reading in the [`Reader`].\n\nThe default value is true.\n\n\nDisabling validation can improve reading performance, BUT it carries the risk of reading an invalid\nmanifest.\n
\n\n[`Reader`]: crate::Reader",
+ "type": "boolean"
+ },
+ "verify_after_sign": {
+ "description": "Whether to verify the manifest after signing in the [`Builder`].\n\nThe default value is true.\n\n\nDisabling validation can improve signing performance, BUT it carries the risk of signing an invalid\nmanifest.\n
\n\n[`Builder`]: crate::Builder",
+ "type": "boolean"
+ },
+ "verify_trust": {
+ "description": "Whether to verify certificates against the trust lists specified in [`Trust`]. To configure\ntimestamp certificate verification, see [`Verify::verify_timestamp_trust`].\n\nThe default value is true.\n\n\nVerifying trust is REQUIRED by the C2PA spec. This option should only be used for development or testing.\n
",
+ "type": "boolean"
+ },
+ "verify_timestamp_trust": {
+ "description": "Whether to verify the timestamp certificates against the trust lists specified in [`Trust`].\n\nThe default value is true.\n\n\nVerifying timestamp trust is REQUIRED by the C2PA spec. This option should only be used for development or testing.\n
",
+ "type": "boolean"
+ },
+ "ocsp_fetch": {
+ "description": "Whether to fetch the certificates OCSP status during validation.\n\nRevocation status is checked in the following order:\n1. The OCSP staple stored in the COSE claim of the manifest\n2. Otherwise if `ocsp_fetch` is enabled, it fetches a new OCSP status\n3. Otherwise if `ocsp_fetch` is disabled, it checks [`CertificateStatus`] assertions\n\nThe default value is false.\n\n[`CertificateStatus`]: crate::assertions::CertificateStatus",
+ "type": "boolean"
+ },
+ "remote_manifest_fetch": {
+ "description": "Whether to fetch remote manifests in the following scenarios:\n- Constructing a [`Reader`]\n- Constructing an [`Ingredient`]\n- Adding an [`Ingredient`] to the [`Builder`]\n\nThe default value is true.\n\n\nThis setting is only applicable if the crate is compiled with the `fetch_remote_manifests` feature.\n
\n\n[`Reader`]: crate::Reader\n[`Ingredient`]: crate::Ingredient\n[`Builder`]: crate::Builder",
+ "type": "boolean"
+ },
+ "check_ingredient_trust": {
+ "description": "Whether to verify ingredient certificates against the trust lists specific in [`Trust`].\n\nThe default value is true.",
+ "type": "boolean"
+ },
+ "skip_ingredient_conflict_resolution": {
+ "description": "Whether to skip ingredient conflict resolution when multiple ingredients have the same\nmanifest identifier. This settings is only applicable for C2PA v2 validation.\n\nThe default value is false.\n\nSee more information in the spec here:\n",
+ "type": "boolean"
+ },
+ "strict_v1_validation": {
+ "description": "Whether to do strictly C2PA v1 validation or otherwise the latest validation.\n\nThe default value is false.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "verify_after_reading",
+ "verify_after_sign",
+ "verify_trust",
+ "verify_timestamp_trust",
+ "ocsp_fetch",
+ "remote_manifest_fetch",
+ "check_ingredient_trust",
+ "skip_ingredient_conflict_resolution",
+ "strict_v1_validation"
+ ]
+ },
+ "BuilderSettings": {
+ "description": "Settings for the [Builder][crate::Builder].",
+ "type": "object",
+ "properties": {
+ "claim_generator_info": {
+ "description": "Claim generator info that is automatically added to the builder.\n\nNote that this information will prepend any claim generator info\nprovided explicitly to the builder.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ClaimGeneratorInfoSettings"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "thumbnail": {
+ "description": "Various settings for configuring automatic thumbnail generation.",
+ "$ref": "#/$defs/ThumbnailSettings"
+ },
+ "actions": {
+ "description": "Settings for configuring fields in an [Actions][crate::assertions::Actions] assertion.\n\nFor more information on the reasoning behind this field see [ActionsSettings].",
+ "$ref": "#/$defs/ActionsSettings"
+ },
+ "certificate_status_fetch": {
+ "description": "Whether to create [`CertificateStatus`] assertions for manifests to store certificate revocation\nstatus. The assertion can be fetched for the active manifest or for all manifests (including\ningredients).\n\nThe default is to not fetch them at all.\n\nSee more information in the spec here:\n\n\n[`CertificateStatus`]: crate::assertions::CertificateStatus",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/OcspFetchScope"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "certificate_status_should_override": {
+ "description": "Whether to only use [`CertificateStatus`] assertions to check certificate revocation status. If there\nis a stapled OCSP in the COSE claim of the manifest, it will be ignored. If [`Verify::ocsp_fetch`] is\nenabled, it will also be ignored.\n\nThe default value is false.\n\n[`CertificateStatus`]: crate::assertions::CertificateStatus\n[`Verify::ocsp_fetch`]: crate::settings::Verify::ocsp_fetch",
+ "type": ["boolean", "null"]
+ },
+ "intent": {
+ "description": "The default [`BuilderIntent`] for the [`Builder`].\n\nSee [`BuilderIntent`] for more information.\n\n[`BuilderIntent`]: crate::BuilderIntent\n[`Builder`]: crate::Builder",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/BuilderIntent"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "created_assertion_labels": {
+ "description": "Assertions with a base label included in this list will be automatically marked as a created assertion.\nAssertions not in this list will be automatically marked as gathered.\n\nNote that the label should be a **base label**, not including the assertion version nor instance.\n\nSee more information on the difference between created vs gathered assertions in the spec here:\n",
+ "type": ["array", "null"],
+ "items": {
+ "type": "string"
+ }
+ },
+ "generate_c2pa_archive": {
+ "description": "Whether to generate a C2PA archive (instead of zip) when writing the manifest builder.\nThis will eventually become the default behavior.",
+ "type": ["boolean", "null"]
+ }
+ },
+ "required": ["thumbnail", "actions"]
+ },
+ "ClaimGeneratorInfoSettings": {
+ "description": "Settings for the claim generator info.",
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "A human readable string naming the claim_generator.",
+ "type": "string"
+ },
+ "version": {
+ "description": "A human readable string of the product's version.",
+ "type": ["string", "null"]
+ },
+ "icon": {
+ "description": "Reference to an icon.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "operating_system": {
+ "description": "Settings for the claim generator info's operating system field.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ClaimGeneratorInfoOperatingSystem"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["name"],
+ "additionalProperties": true
+ },
+ "ResourceRef": {
+ "description": "A reference to a resource to be used in JSON serialization.\n\nThe underlying data can be read as a stream via [`Reader::resource_to_stream`][crate::Reader::resource_to_stream].",
+ "type": "object",
+ "properties": {
+ "format": {
+ "description": "The mime type of the referenced resource.",
+ "type": "string"
+ },
+ "identifier": {
+ "description": "A URI that identifies the resource as referenced from the manifest.\n\nThis may be a JUMBF URI, a file path, a URL or any other string.\nRelative JUMBF URIs will be resolved with the manifest label.\nRelative file paths will be resolved with the base path if provided.",
+ "type": "string"
+ },
+ "data_types": {
+ "description": "More detailed data types as defined in the C2PA spec.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/AssetType"
+ }
+ },
+ "alg": {
+ "description": "The algorithm used to hash the resource (if applicable).",
+ "type": ["string", "null"]
+ },
+ "hash": {
+ "description": "The hash of the resource (if applicable).",
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["format", "identifier"]
+ },
+ "AssetType": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "version": {
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["type"]
+ },
+ "ClaimGeneratorInfoOperatingSystem": {
+ "anyOf": [
+ {
+ "description": "Whether or not to automatically infer the operating system.\n\nThis option will attempt to following the [LLVM \"triples\"] conventions. For more information,\nsee [`ClaimGeneratorInfoOperatingSystem::Other`].\n\n[LLVM \"triples\"]: https://clang.llvm.org/docs/CrossCompilation.html#target-triple",
+ "type": "null"
+ },
+ {
+ "description": "The name of the operating system.\n\nIt is recommended to follow the [LLVM \"triples\"] conventions to define the operating system,\nwith the format `---`. For instance:\n- `x86_64-unknown-linux-gnu`\n- `x86_64-pc-windows-msvc`\n- `arm64-apple-darwin`\n\n[LLVM \"triples\"]: https://clang.llvm.org/docs/CrossCompilation.html#target-triple",
+ "type": "string"
+ }
+ ]
+ },
+ "ThumbnailSettings": {
+ "description": "Settings for controlling automatic thumbnail generation.",
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "description": "Whether or not to automatically generate thumbnails.\n\nThe default value is true.\n\n\nThis setting is only applicable if the crate is compiled with the `add_thumbnails` feature.\n
",
+ "type": "boolean"
+ },
+ "ignore_errors": {
+ "description": "Whether to ignore thumbnail generation errors.\n\nThis may occur, for instance, if the thumbnail media type or color layout isn't\nsupported.\n\nThe default value is true.",
+ "type": "boolean"
+ },
+ "long_edge": {
+ "description": "The size of the longest edge of the thumbnail.\n\nThis function will resize the input to preserve aspect ratio.\n\nThe default value is 1024.",
+ "type": "integer",
+ "format": "uint32",
+ "minimum": 0
+ },
+ "format": {
+ "description": "Format of the thumbnail.\n\nIf this field isn't specified, the thumbnail format will correspond to the\ninput format.\n\nThe default value is None.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ThumbnailFormat"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "prefer_smallest_format": {
+ "description": "Whether or not to prefer a smaller sized media format for the thumbnail.\n\nNote that [ThumbnailSettings::format] takes precedence over this field. In addition,\nif the output format is unsupported, it will default to the smallest format regardless\nof the value of this field.\n\nFor instance, if the source input type is a PNG, but it doesn't have an alpha channel,\nthe image will be converted to a JPEG of smaller size.\n\nThe default value is true.",
+ "type": "boolean"
+ },
+ "quality": {
+ "description": "The output quality of the thumbnail.\n\nThis setting contains sensible defaults for things like quality, compression, and\nalgorithms for various formats.\n\nThe default value is [`ThumbnailQuality::Medium`].",
+ "$ref": "#/$defs/ThumbnailQuality"
+ }
+ },
+ "required": [
+ "enabled",
+ "ignore_errors",
+ "long_edge",
+ "prefer_smallest_format",
+ "quality"
+ ]
+ },
+ "ThumbnailFormat": {
+ "description": "Possible output types for automatic thumbnail generation.\n\nThese formats are a combination of types supported in [image-rs](https://docs.rs/image/latest/image/enum.ImageFormat.html)\nand types defined by the [IANA registry media type](https://www.iana.org/assignments/media-types/media-types.xhtml) (as defined in the spec).",
+ "oneOf": [
+ {
+ "description": "An image in PNG format.",
+ "type": "string",
+ "const": "png"
+ },
+ {
+ "description": "An image in JPEG format.",
+ "type": "string",
+ "const": "jpeg"
+ },
+ {
+ "description": "An image in GIF format.",
+ "type": "string",
+ "const": "gif"
+ },
+ {
+ "description": "An image in WEBP format.",
+ "type": "string",
+ "const": "webp"
+ },
+ {
+ "description": "An image in TIFF format.",
+ "type": "string",
+ "const": "tiff"
+ }
+ ]
+ },
+ "ThumbnailQuality": {
+ "description": "Quality of the thumbnail.",
+ "oneOf": [
+ {
+ "description": "Low quality.",
+ "type": "string",
+ "const": "low"
+ },
+ {
+ "description": "Medium quality.",
+ "type": "string",
+ "const": "medium"
+ },
+ {
+ "description": "High quality.",
+ "type": "string",
+ "const": "high"
+ }
+ ]
+ },
+ "ActionsSettings": {
+ "description": "Settings for configuring the \"base\" [Actions][crate::assertions::Actions] assertion.\n\nThe reason this setting exists only for an [Actions][crate::assertions::Actions] assertion\nis because of its mandations and reusable fields.",
+ "type": "object",
+ "properties": {
+ "all_actions_included": {
+ "description": "Whether or not to set the [Actions::all_actions_included][crate::assertions::Actions::all_actions_included]\nfield.",
+ "type": ["boolean", "null"]
+ },
+ "templates": {
+ "description": "Templates to be added to the [Actions::templates][crate::assertions::Actions::templates] field.",
+ "type": ["array", "null"],
+ "items": {
+ "$ref": "#/$defs/ActionTemplateSettings"
+ }
+ },
+ "auto_created_action": {
+ "description": "Whether to automatically generate a c2pa.created [Action] assertion or error that it doesn't already exist.\n\nFor more information about the mandatory conditions for a c2pa.created action assertion, see here:\n",
+ "$ref": "#/$defs/AutoActionSettings"
+ },
+ "auto_opened_action": {
+ "description": "Whether to automatically generate a c2pa.opened [Action] assertion or error that it doesn't already exist.\n\nFor more information about the mandatory conditions for a c2pa.opened action assertion, see here:\n",
+ "$ref": "#/$defs/AutoActionSettings"
+ },
+ "auto_placed_action": {
+ "description": "Whether to automatically generate a c2pa.placed [Action] assertion or error that it doesn't already exist.\n\nFor more information about the mandatory conditions for a c2pa.placed action assertion, see:\n",
+ "$ref": "#/$defs/AutoActionSettings"
+ }
+ },
+ "required": [
+ "auto_created_action",
+ "auto_opened_action",
+ "auto_placed_action"
+ ]
+ },
+ "ActionTemplateSettings": {
+ "description": "Settings for an action template.",
+ "type": "object",
+ "properties": {
+ "action": {
+ "description": "The label associated with this action. See ([c2pa_action][crate::assertions::actions::c2pa_action]).",
+ "type": "string"
+ },
+ "software_agent": {
+ "description": "The software agent that performed the action.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ClaimGeneratorInfoSettings"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "software_agent_index": {
+ "description": "0-based index into the softwareAgents array",
+ "type": ["integer", "null"],
+ "format": "uint",
+ "minimum": 0
+ },
+ "source_type": {
+ "description": "One of the defined URI values at ``",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/DigitalSourceType"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "icon": {
+ "description": "Reference to an icon.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ResourceRef"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "description": {
+ "description": "Description of the template.",
+ "type": ["string", "null"]
+ },
+ "template_parameters": {
+ "description": "Additional parameters for the template",
+ "type": ["object", "null"],
+ "additionalProperties": true
+ }
+ },
+ "required": ["action"]
+ },
+ "DigitalSourceType": {
+ "description": "Description of the source of an asset.\n\nThe full list of possible digital source types are found below:\n\n",
+ "anyOf": [
+ {
+ "description": "Media whose digital content is effectively empty, such as a blank canvas or zero-length video.",
+ "type": "string",
+ "const": "http://c2pa.org/digitalsourcetype/empty"
+ },
+ {
+ "description": "Data that is the result of algorithmically using a model derived from sampled content and data.\nDiffers from trainedAlgorithmicMedia in that\nthe result isn’t a media type (e.g., image or video) but is a data format (e.g., CSV, pickle).",
+ "type": "string",
+ "const": "http://c2pa.org/digitalsourcetype/trainedAlgorithmicData"
+ },
+ {
+ "description": "The media was captured from a real-life source using a digital camera or digital recording device.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture"
+ },
+ {
+ "description": "The media is the result of capturing multiple frames from a real-life source using a digital camera\nor digital recording device, then automatically merging them into a single frame using digital signal\nprocessing techniques and/or non-generative AI. Includes High Dynamic Range (HDR) processing common in\nsmartphone camera apps.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/computationalCapture"
+ },
+ {
+ "description": "The media was digitised from a negative on film or other transparent medium.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/negativeFilm"
+ },
+ {
+ "description": "The media was digitised from a positive on a transparency or other transparent medium.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/positiveFilm"
+ },
+ {
+ "description": "The media was digitised from a non-transparent medium such as a photographic print.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/print"
+ },
+ {
+ "description": "Minor augmentation or correction by a human, such as a digitally-retouched photo used in a magazine.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/minorHumanEdits",
+ "deprecated": true
+ },
+ {
+ "description": "Augmentation, correction or enhancement by one or more humans using non-generative tools.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/humanEdits"
+ },
+ {
+ "description": "Augmentation, correction or enhancement using a Generative AI model, such as with inpainting or\noutpainting operations.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/compositeWithTrainedAlgorithmicMedia"
+ },
+ {
+ "description": "Modification or correction by algorithm without changing the main content of the media, initiated\nor configured by a human, such as sharpening or applying noise reduction.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/algorithmicallyEnhanced"
+ },
+ {
+ "description": "The digital image was created by computer software.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/softwareImage",
+ "deprecated": true
+ },
+ {
+ "description": "Media created by a human using digital tools.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/digitalArt",
+ "deprecated": true
+ },
+ {
+ "description": "Media created by a human using non-generative tools.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/digitalCreation"
+ },
+ {
+ "description": "Digital media representation of data via human programming or creativity.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/dataDrivenMedia"
+ },
+ {
+ "description": "Digital media created algorithmically using an Artificial Intelligence model trained on captured\ncontent.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/trainedAlgorithmicMedia"
+ },
+ {
+ "description": "Media created purely by an algorithm not based on any sampled training data, e.g. an image created\nby software using a mathematical formula.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/algorithmicMedia"
+ },
+ {
+ "description": "A capture of the contents of the screen of a computer or mobile device.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/screenCapture"
+ },
+ {
+ "description": "Live recording of virtual event based on Generative AI and/or captured elements.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/virtualRecording"
+ },
+ {
+ "description": "Mix or composite of several elements, any of which may or may not be generative AI.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/composite"
+ },
+ {
+ "description": "Mix or composite of several elements that are all captures of real life.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/compositeCapture"
+ },
+ {
+ "description": "Mix or composite of several elements, at least one of which is Generative AI.",
+ "type": "string",
+ "const": "http://cv.iptc.org/newscodes/digitalsourcetype/compositeSynthetic"
+ },
+ {
+ "description": "An unknown digital source type.",
+ "type": "string"
+ }
+ ]
+ },
+ "AutoActionSettings": {
+ "description": "Settings for the auto actions (e.g. created, opened, placed).",
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "description": "Whether to enable this auto action or not.",
+ "type": "boolean"
+ },
+ "source_type": {
+ "description": "The default source type for the auto action.",
+ "anyOf": [
+ {
+ "$ref": "#/$defs/DigitalSourceType"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["enabled"]
+ },
+ "OcspFetchScope": {
+ "description": "The scope of which manifests to fetch for OCSP.",
+ "oneOf": [
+ {
+ "description": "Fetch OCSP for all manifests.",
+ "type": "string",
+ "const": "all"
+ },
+ {
+ "description": "Fetch OCSP for the active manifest only.",
+ "type": "string",
+ "const": "active"
+ }
+ ]
+ },
+ "BuilderIntent": {
+ "description": "Represents the type of builder flow being used.\n\nThis determines how the builder will be used, such as creating a new asset, opening an existing asset,\nor updating an existing asset.",
+ "oneOf": [
+ {
+ "description": "This is a new digital creation, a DigitalSourceType is required.\n\nThe Manifest must not have have a parent ingredient.\nA `c2pa.created` action will be added if not provided.",
+ "type": "object",
+ "properties": {
+ "create": {
+ "$ref": "#/$defs/DigitalSourceType"
+ }
+ },
+ "required": ["create"],
+ "additionalProperties": false
+ },
+ {
+ "description": "This is an edit of a pre-existing parent asset.\n\nThe Manifest must have a parent ingredient.\nA parent ingredient will be generated from the source stream if not otherwise provided.\nA `c2pa.opened action will be tied to the parent ingredient.",
+ "type": "string",
+ "const": "edit"
+ },
+ {
+ "description": "A restricted version of Edit for non-editorial changes.\n\nThere must be only one ingredient, as a parent.\nNo changes can be made to the hashed content of the parent.\nThere are additional restrictions on the types of changes that can be made.",
+ "type": "string",
+ "const": "update"
+ }
+ ]
+ },
+ "SignerSettings": {
+ "description": "Settings for configuring a local or remote [`Signer`].\n\nA [`Signer`] can be obtained by calling the [`signer()`] function.\n\n[`Signer`]: crate::Signer\n[`signer()`]: crate::settings::Settings::signer",
+ "oneOf": [
+ {
+ "description": "A signer configured locally.",
+ "type": "object",
+ "properties": {
+ "local": {
+ "type": "object",
+ "properties": {
+ "alg": {
+ "$ref": "#/$defs/SigningAlg"
+ },
+ "sign_cert": {
+ "type": "string"
+ },
+ "private_key": {
+ "type": "string"
+ },
+ "tsa_url": {
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["alg", "sign_cert", "private_key"]
+ }
+ },
+ "required": ["local"],
+ "additionalProperties": false
+ },
+ {
+ "description": "A signer configured remotely.",
+ "type": "object",
+ "properties": {
+ "remote": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "alg": {
+ "$ref": "#/$defs/SigningAlg"
+ },
+ "sign_cert": {
+ "type": "string"
+ },
+ "tsa_url": {
+ "type": ["string", "null"]
+ }
+ },
+ "required": ["url", "alg", "sign_cert"]
+ }
+ },
+ "required": ["remote"],
+ "additionalProperties": false
+ }
+ ]
+ },
+ "SigningAlg": {
+ "description": "Describes the digital signature algorithms allowed by the C2PA spec.\n\nPer [§13.2, “Digital Signatures”]:\n\n> All digital signatures applied as per the technical requirements of this\n> specification shall be generated using one of the digital signature\n> algorithms and key types listed as described in this section.\n\n[§13.2, “Digital Signatures”]: https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_digital_signatures",
+ "oneOf": [
+ {
+ "description": "ECDSA with SHA-256",
+ "type": "string",
+ "const": "Es256"
+ },
+ {
+ "description": "ECDSA with SHA-384",
+ "type": "string",
+ "const": "Es384"
+ },
+ {
+ "description": "ECDSA with SHA-512",
+ "type": "string",
+ "const": "Es512"
+ },
+ {
+ "description": "RSASSA-PSS using SHA-256 and MGF1 with SHA-256",
+ "type": "string",
+ "const": "Ps256"
+ },
+ {
+ "description": "RSASSA-PSS using SHA-384 and MGF1 with SHA-384",
+ "type": "string",
+ "const": "Ps384"
+ },
+ {
+ "description": "RSASSA-PSS using SHA-512 and MGF1 with SHA-512",
+ "type": "string",
+ "const": "Ps512"
+ },
+ {
+ "description": "Edwards-Curve DSA (Ed25519 instance only)",
+ "type": "string",
+ "const": "Ed25519"
+ }
+ ]
+ }
+ }
+}