{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ManifestDefinition",
"description": "Use a ManifestDefinition to define a manifest and to build a `ManifestStore`. A manifest is a collection of ingredients and assertions used to define a claim that can be signed and embedded into a file.",
"type": "object",
"properties": {
"assertions": {
"description": "A list of assertions",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/AssertionDefinition"
}
},
"claim_generator_info": {
"description": "Claim Generator Info is always required with at least one entry",
"default": [
{
"name": "c2pa-rs",
"version": "0.49.5"
}
],
"type": "array",
"items": {
"$ref": "#/definitions/ClaimGeneratorInfo"
}
},
"claim_version": {
"description": "The version of the claim. Defaults to 1.",
"type": [
"integer",
"null"
],
"format": "uint8",
"minimum": 0.0
},
"format": {
"description": "The format of the source file as a MIME type.",
"default": "application/octet-stream",
"type": "string"
},
"ingredients": {
"description": "A List of ingredients",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/Ingredient"
}
},
"instance_id": {
"description": "Instance ID from `xmpMM:InstanceID` in XMP metadata.",
"default": "xmp:iid:dde3986c-d7b2-4256-b5dd-acc8ed9aada3",
"type": "string"
},
"label": {
"description": "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.",
"type": [
"string",
"null"
]
},
"metadata": {
"description": "Optional manifest metadata. This will be deprecated in the future; not recommended to use.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Metadata"
}
},
"redactions": {
"description": "A list of redactions - URIs to redacted assertions.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"thumbnail": {
"description": "An optional ResourceRef to a thumbnail image that represents the asset that was signed. Must be available when the manifest is signed.",
"anyOf": [
{
"$ref": "#/definitions/ResourceRef"
},
{
"type": "null"
}
]
},
"title": {
"description": "A human-readable title, generally source filename.",
"type": [
"string",
"null"
]
},
"vendor": {
"description": "Optional prefix added to the generated Manifest Label This is typically a reverse domain name.",
"type": [
"string",
"null"
]
}
},
"definitions": {
"Actor": {
"description": "Identifies a person responsible for an action.",
"type": "object",
"properties": {
"credentials": {
"description": "List of references to W3C Verifiable Credentials.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/HashedUri"
}
},
"identifier": {
"description": "An identifier for a human actor, used when the \"type\" is `humanEntry.identified`.",
"type": [
"string",
"null"
]
}
}
},
"AssertionData": {
"description": "This allows the assertion to be expressed as CBOR or JSON. The default is CBOR unless you specify that an assertion should be JSON.",
"anyOf": [
true
]
},
"AssertionDefinition": {
"description": "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.",
"type": "object",
"required": [
"data",
"label"
],
"properties": {
"data": {
"$ref": "#/definitions/AssertionData"
},
"label": {
"type": "string"
}
}
},
"AssetType": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string"
},
"version": {
"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",
"required": [
"name"
],
"properties": {
"icon": {
"description": "hashed URI to the icon (either embedded or remote)",
"anyOf": [
{
"$ref": "#/definitions/UriOrResource"
},
{
"type": "null"
}
]
},
"name": {
"description": "A human readable string naming the claim_generator",
"type": "string"
},
"operating_system": {
"description": "A human readable string of the OS the claim generator is running on",
"type": [
"string",
"null"
]
},
"version": {
"description": "A human readable string of the product's version",
"type": [
"string",
"null"
]
}
},
"additionalProperties": true
},
"Coordinate": {
"description": "An x, y coordinate used for specifying vertices in polygons.",
"type": "object",
"required": [
"x",
"y"
],
"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"
}
}
},
"DataSource": {
"description": "A description of the source for assertion data",
"type": "object",
"required": [
"type"
],
"properties": {
"actors": {
"description": "A list of [`Actor`]s associated with this source.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Actor"
}
},
"details": {
"description": "A human-readable string giving details about the source of the assertion data.",
"type": [
"string",
"null"
]
},
"type": {
"description": "A value from among the enumerated list indicating the source of the assertion.",
"type": "string"
}
}
},
"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": {
"end": {
"description": "The end of the frame inclusive or the end of the asset if not present.",
"type": [
"integer",
"null"
],
"format": "int32"
},
"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"
}
}
},
"HashedUri": {
"description": "A `HashedUri` provides a reference to content available within the same manifest store.\n\nThis is described in [§8.3, URI References], of the C2PA Technical Specification.\n\n[§8.3, URI References]: https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_uri_references",
"type": "object",
"required": [
"hash",
"url"
],
"properties": {
"alg": {
"description": "A string identifying the cryptographic hash algorithm used to compute the hash",
"type": [
"string",
"null"
]
},
"hash": {
"description": "Byte string containing the hash value",
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
},
"url": {
"description": "JUMBF URI reference",
"type": "string"
}
}
},
"Ingredient": {
"description": "An `Ingredient` is any external asset that has been used in the creation of an asset.",
"type": "object",
"properties": {
"active_manifest": {
"description": "The active manifest label (if one exists).\n\nIf this ingredient has a [`ManifestStore`], this will hold the label of the active [`Manifest`].\n\n[`Manifest`]: crate::Manifest [`ManifestStore`]: crate::ManifestStore",
"type": [
"string",
"null"
]
},
"data": {
"description": "A reference to the actual data of the ingredient.",
"anyOf": [
{
"$ref": "#/definitions/ResourceRef"
},
{
"type": "null"
}
]
},
"data_types": {
"description": "Additional information about the data's type to the ingredient V2 structure.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AssetType"
}
},
"description": {
"description": "Additional description of the ingredient.",
"type": [
"string",
"null"
]
},
"document_id": {
"description": "Document ID from `xmpMM:DocumentID` in XMP metadata.",
"type": [
"string",
"null"
]
},
"format": {
"description": "The format of the source file as a MIME type.",
"type": [
"string",
"null"
]
},
"hash": {
"description": "An optional hash of the asset to prevent duplicates.",
"type": [
"string",
"null"
]
},
"informational_URI": {
"description": "URI to an informational page about the ingredient or its data.",
"type": [
"string",
"null"
]
},
"instance_id": {
"description": "Instance ID from `xmpMM:InstanceID` in XMP metadata.",
"type": [
"string",
"null"
]
},
"label": {
"description": "The ingredient's label as assigned in the manifest.",
"type": [
"string",
"null"
]
},
"manifest_data": {
"description": "A [`ManifestStore`] from the source asset extracted as a binary C2PA blob.\n\n[`ManifestStore`]: crate::ManifestStore",
"anyOf": [
{
"$ref": "#/definitions/ResourceRef"
},
{
"type": "null"
}
]
},
"metadata": {
"description": "Any additional [`Metadata`] as defined in the C2PA spec.\n\n[`Metadata`]: crate::Metadata",
"anyOf": [
{
"$ref": "#/definitions/Metadata"
},
{
"type": "null"
}
]
},
"provenance": {
"description": "URI from `dcterms:provenance` in XMP metadata.",
"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.",
"default": "componentOf",
"allOf": [
{
"$ref": "#/definitions/Relationship"
}
]
},
"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": "#/definitions/ResourceRef"
},
{
"type": "null"
}
]
},
"title": {
"description": "A human-readable title, generally source filename.",
"type": [
"string",
"null"
]
},
"validation_results": {
"description": "Validation results (Ingredient.V3)",
"anyOf": [
{
"$ref": "#/definitions/ValidationResults"
},
{
"type": "null"
}
]
},
"validation_status": {
"description": "Validation status (Ingredient v1 & v2)",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/ValidationStatus"
}
}
}
},
"IngredientDeltaValidationResult": {
"description": "Represents any changes or deltas between the current and previous validation results for an ingredient's manifest.",
"type": "object",
"required": [
"ingredientAssertionURI",
"validationDeltas"
],
"properties": {
"ingredientAssertionURI": {
"description": "JUMBF URI reference to the ingredient assertion",
"type": "string"
},
"validationDeltas": {
"description": "Validation results for the ingredient's active manifest",
"allOf": [
{
"$ref": "#/definitions/StatusCodes"
}
]
}
}
},
"Item": {
"description": "Description of the boundaries of an identified range.",
"type": "object",
"required": [
"identifier",
"value"
],
"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"
}
}
},
"Metadata": {
"description": "The Metadata structure can be used as part of other assertions or on its own to reference others",
"type": "object",
"properties": {
"dataSource": {
"anyOf": [
{
"$ref": "#/definitions/DataSource"
},
{
"type": "null"
}
]
},
"dateTime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reference": {
"anyOf": [
{
"$ref": "#/definitions/HashedUri"
},
{
"type": "null"
}
]
},
"regionOfInterest": {
"anyOf": [
{
"$ref": "#/definitions/RegionOfInterest"
},
{
"type": "null"
}
]
},
"reviewRatings": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/ReviewRating"
}
}
},
"additionalProperties": true
},
"Range": {
"description": "A spatial, temporal, frame, or textual range describing the region of interest.",
"type": "object",
"required": [
"type"
],
"properties": {
"frame": {
"description": "A frame range.",
"anyOf": [
{
"$ref": "#/definitions/Frame"
},
{
"type": "null"
}
]
},
"item": {
"description": "A item identifier.",
"anyOf": [
{
"$ref": "#/definitions/Item"
},
{
"type": "null"
}
]
},
"shape": {
"description": "A spatial range.",
"anyOf": [
{
"$ref": "#/definitions/Shape"
},
{
"type": "null"
}
]
},
"text": {
"description": "A textual range.",
"anyOf": [
{
"$ref": "#/definitions/Text"
},
{
"type": "null"
}
]
},
"time": {
"description": "A temporal range.",
"anyOf": [
{
"$ref": "#/definitions/Time"
},
{
"type": "null"
}
]
},
"type": {
"description": "The type of range of interest.",
"allOf": [
{
"$ref": "#/definitions/RangeType"
}
]
}
}
},
"RangeType": {
"description": "The type of range for the region of interest.",
"oneOf": [
{
"description": "A spatial range, see [`Shape`] for more details.",
"type": "string",
"enum": [
"spatial"
]
},
{
"description": "A temporal range, see [`Time`] for more details.",
"type": "string",
"enum": [
"temporal"
]
},
{
"description": "A spatial range, see [`Frame`] for more details.",
"type": "string",
"enum": [
"frame"
]
},
{
"description": "A textual range, see [`Text`] for more details.",
"type": "string",
"enum": [
"textual"
]
},
{
"description": "A range identified by a specific identifier and value, see [`Item`] for more details.",
"type": "string",
"enum": [
"identified"
]
}
]
},
"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] or [`Metadata::region_of_interest`][crate::assertions::Metadata::region_of_interest].",
"type": "object",
"required": [
"region"
],
"properties": {
"description": {
"description": "A free-text string.",
"type": [
"string",
"null"
]
},
"identifier": {
"description": "A free-text string representing a machine-readable, unique to this assertion, identifier for the region.",
"type": [
"string",
"null"
]
},
"metadata": {
"description": "Additional information about the asset.",
"anyOf": [
{
"$ref": "#/definitions/Metadata"
},
{
"type": "null"
}
]
},
"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"
]
},
"region": {
"description": "A range describing the region of interest for the specific asset.",
"type": "array",
"items": {
"$ref": "#/definitions/Range"
}
},
"role": {
"description": "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.",
"anyOf": [
{
"$ref": "#/definitions/Role"
},
{
"type": "null"
}
]
},
"type": {
"description": "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.\n\nNote this field serializes/deserializes into the name `type`.",
"type": [
"string",
"null"
]
}
}
},
"Relationship": {
"type": "string",
"enum": [
"parentOf",
"componentOf",
"inputTo"
]
},
"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",
"required": [
"format",
"identifier"
],
"properties": {
"alg": {
"description": "The algorithm used to hash the resource (if applicable).",
"type": [
"string",
"null"
]
},
"data_types": {
"description": "More detailed data types as defined in the C2PA spec.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AssetType"
}
},
"format": {
"description": "The mime type of the referenced resource.",
"type": "string"
},
"hash": {
"description": "The hash of the resource (if applicable).",
"type": [
"string",
"null"
]
},
"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. Relative JUMBF URIs will be resolved with the manifest label. Relative file paths will be resolved with the base path if provided.",
"type": "string"
}
}
},
"ReviewRating": {
"description": "A rating on an Assertion.\n\nSee <https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html#_claim_review>.",
"type": "object",
"required": [
"explanation",
"value"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"explanation": {
"type": "string"
},
"value": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
}
},
"Role": {
"description": "A role describing the region.",
"oneOf": [
{
"description": "Arbitrary area worth identifying.",
"type": "string",
"enum": [
"c2pa.areaOfInterest"
]
},
{
"description": "This area is all that is left after a crop action.",
"type": "string",
"enum": [
"c2pa.cropped"
]
},
{
"description": "This area has had edits applied to it.",
"type": "string",
"enum": [
"c2pa.edited"
]
},
{
"description": "The area where an ingredient was placed/added.",
"type": "string",
"enum": [
"c2pa.placed"
]
},
{
"description": "Something in this area was redacted.",
"type": "string",
"enum": [
"c2pa.redacted"
]
},
{
"description": "Area specific to a subject (human or not).",
"type": "string",
"enum": [
"c2pa.subjectArea"
]
},
{
"description": "A range of information was removed/deleted.",
"type": "string",
"enum": [
"c2pa.deleted"
]
},
{
"description": "Styling was applied to this area.",
"type": "string",
"enum": [
"c2pa.styled"
]
},
{
"description": "Invisible watermarking was applied to this area for the purpose of soft binding.",
"type": "string",
"enum": [
"c2pa.watermarked"
]
}
]
},
"Shape": {
"description": "A spatial range representing rectangle, circle, or a polygon.",
"type": "object",
"required": [
"origin",
"type",
"unit"
],
"properties": {
"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"
]
},
"origin": {
"description": "THe origin of the coordinate in the shape.",
"allOf": [
{
"$ref": "#/definitions/Coordinate"
}
]
},
"type": {
"description": "The type of shape.",
"allOf": [
{
"$ref": "#/definitions/ShapeType"
}
]
},
"unit": {
"description": "The type of unit for the shape range.",
"allOf": [
{
"$ref": "#/definitions/UnitType"
}
]
},
"vertices": {
"description": "The vertices of the polygon.\n\nThis field can be ignored for rectangles and circles.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Coordinate"
}
},
"width": {
"description": "The width for rectangles or diameter for circles.\n\nThis field can be ignored for polygons.",
"type": [
"number",
"null"
],
"format": "double"
}
}
},
"ShapeType": {
"description": "The type of shape for the range.",
"oneOf": [
{
"description": "A rectangle.",
"type": "string",
"enum": [
"rectangle"
]
},
{
"description": "A circle.",
"type": "string",
"enum": [
"circle"
]
},
{
"description": "A polygon.",
"type": "string",
"enum": [
"polygon"
]
}
]
},
"StatusCodes": {
"description": "Contains a set of success, informational, and failure validation status codes.",
"type": "object",
"required": [
"failure",
"informational",
"success"
],
"properties": {
"failure": {
"type": "array",
"items": {
"$ref": "#/definitions/ValidationStatus"
}
},
"informational": {
"type": "array",
"items": {
"$ref": "#/definitions/ValidationStatus"
}
},
"success": {
"type": "array",
"items": {
"$ref": "#/definitions/ValidationStatus"
}
}
}
},
"Text": {
"description": "A textual range representing multiple (possibly discontinuous) ranges of text.",
"type": "object",
"required": [
"selectors"
],
"properties": {
"selectors": {
"description": "The ranges of text to select.",
"type": "array",
"items": {
"$ref": "#/definitions/TextSelectorRange"
}
}
}
},
"TextSelector": {
"description": "Selects a range of text via a fragment identifier.\n\nThis is modeled after the W3C Web Annotation selector model.",
"type": "object",
"required": [
"fragment"
],
"properties": {
"end": {
"description": "The end character offset or the end of the fragment if not present.",
"type": [
"integer",
"null"
],
"format": "int32"
},
"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"
}
}
},
"TextSelectorRange": {
"description": "One or two [`TextSelector`][TextSelector] identifiying the range to select.",
"type": "object",
"required": [
"selector"
],
"properties": {
"end": {
"description": "The end of the text range.",
"anyOf": [
{
"$ref": "#/definitions/TextSelector"
},
{
"type": "null"
}
]
},
"selector": {
"description": "The start (or entire) text range.",
"allOf": [
{
"$ref": "#/definitions/TextSelector"
}
]
}
}
},
"Time": {
"description": "A temporal range representing a starting time to an ending time.",
"type": "object",
"properties": {
"end": {
"description": "The end time or the end of the asset if not present.",
"type": [
"string",
"null"
]
},
"start": {
"description": "The start time or the start of the asset if not present.",
"type": [
"string",
"null"
]
},
"type": {
"description": "The type of time.",
"default": "npt",
"allOf": [
{
"$ref": "#/definitions/TimeType"
}
]
}
}
},
"TimeType": {
"description": "The type of time.",
"oneOf": [
{
"description": "Times are described using Normal Play Time (npt) as described in RFC 2326.",
"type": "string",
"enum": [
"npt"
]
}
]
},
"UnitType": {
"description": "The type of unit for the range.",
"oneOf": [
{
"description": "Use pixels.",
"type": "string",
"enum": [
"pixel"
]
},
{
"description": "Use percentage.",
"type": "string",
"enum": [
"percent"
]
}
]
},
"UriOrResource": {
"anyOf": [
{
"$ref": "#/definitions/ResourceRef"
},
{
"$ref": "#/definitions/HashedUri"
}
]
},
"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. It is normal for there to be many",
"type": "object",
"properties": {
"activeManifest": {
"anyOf": [
{
"$ref": "#/definitions/StatusCodes"
},
{
"type": "null"
}
]
},
"ingredientDeltas": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/IngredientDeltaValidationResult"
}
}
}
},
"ValidationStatus": {
"description": "A `ValidationStatus` struct describes the validation status of a specific part of a manifest.\n\nSee <https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html#_existing_manifests>.",
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string"
},
"explanation": {
"type": [
"string",
"null"
]
},
"success": {
"writeOnly": true,
"type": [
"boolean",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
}
}
}
}
}