import { Assertion, AssertionLabel, IAssertionData } from './assertions/Assertion'; import { IIngredientData, Ingredient } from './Ingredient'; import { IAssetData, Asset } from './Asset'; import type { ImageProvenance } from './ImageProvenance'; import type { IError } from './lib/types'; export interface ISignatureData { issuer: string; time: string; } interface ISignature { /** * The entity that issued the signature used to sign the C2PA manifest */ issuer: string; /** * The JavaScript `Date` representation corresponding to the signature time (in the local time zone) */ date: Date; /** * The original ISO-8601 date string that was parsed from the signature (in UTC) */ isoDateString: string; } /** * Interface of the claim data structure returned from the toolkit */ export interface IClaimData { assertions: IAssertionData[]; asset: IAssetData; ingredients: IIngredientData[]; /** * A string, compatible with XMP's `stEvt:softwareAgent`, for including the name and version of the claims recorder * that created the claim. */ recorder: string; signature: ISignatureData; /** * Domain name type organization identifier (i.e. `adobe`) */ vendor: string; /** * Errors on this claim (from the toolkit) */ errors: IError[] | null | undefined; } export declare enum RecorderFormat { Raw = 0, ProgramNameAndVersion = 1 } /** * Class that represents a claim in the asset's provenance data. * * @see {@link https://c2pa.org/public-draft/#_overview_4} * * @public */ export declare class Claim { readonly provenance: ImageProvenance; /** * An identifier string for this claim that is unique per provenance chain */ readonly id: string; /** * The underlying data for this claim, provided by the toolkit */ readonly data: IClaimData; /** * The collection of assertions linked to this claim */ readonly assertions: Map; /** * The collection of ingredients that this claim includes */ readonly ingredients: Ingredient[]; /** * The acquisition asset for this claim if it exists */ readonly asset: Asset | undefined; /** * Create a new `Claim` object. Typically these will be created by the SDK. * * @param provenance - The provenance instance this claim belongs to * @param data - The raw data for this claim from the toolkit * * @internal */ constructor(provenance: ImageProvenance, id: string, data: IClaimData); /** * Searches the claim's assertions for one matching the supplied label * * @param label - The label of the assertion you want to retrieve */ findAssertion(label: AssertionLabel | string): Assertion | null; /** * Gets the parent of this claim * * @remarks * This will give the claim that contains the ingredient that this claim belongs to */ get parent(): Claim | undefined; /** * Gets the acquisition thumbnail for this claim if it exists */ get thumbnail(): import("./Asset").IThumbnailData | null | undefined; /** * Returns the string used to identify the item that recorded this claim (application, device, etc.) */ get recorder(): string; /** * Formats the `recorder` string * * @param format - The format to parse the string into * @returns The formatted string, if specified */ formatRecorder(format?: RecorderFormat): string; /** * Gets the title of the acquisition asset for this claim if it exists (e.g. filename) */ get title(): string | undefined; /** * Gets the signature information (issuer, date) for this claim */ get signature(): ISignature; /** * Any errors coming back from the toolkit */ get errors(): IError[]; } export {}; //# sourceMappingURL=Claim.d.ts.map