Skip to main content

c2pa

Home > c2pa

c2pa package

Functions

FunctionDescription
createC2pa(config)Creates a c2pa object that can be used to read c2pa metadata from an image.
createL2ManifestStore(manifestStore)Creates a manifest store representation suitable for use with c2pa-wc.
createManifestStore(manifestStoreData, cawgData)Creates a facade object with convenience methods over manifest store data returned from the toolkit. Merges a manifest store with a CAWG report from the toolkit such that each manifest has its associated CAWG data attached.
generateVerifyUrl(assetUrl)Generates a URL that pre-loads the assetUrl into the Content Authenticity Verify site for deeper inspection by users.
getC2paCategorizedActions(actionsAssertion, locale)Gets a list of action categories, derived from the provided manifest's c2pa.action assertion. This will also handle translations by providing a locale. This works for standard C2PA action assertion data only.
isHandmade(manifestStore)
isHandmadeManifest(manifest)
parseGenerator(value)Parses a generator string into a human-readable format
registerLocaleForEditsAndActivities(bcp47, data)
selectDoNotTrain(manifest)
selectEditsAndActivity(manifest, locale, iconVariant)Gets a list of categorized actions, derived from the provided manifest's c2pa.action assertion and a dictionary assertion, if available. If a dictionary is incuded, this function will initiate an HTTP request to fetch the dictionary data.
selectFormattedGenerator(manifest)
selectGenerativeInfo(manifest)Gets any generative AI information from the manifest.
selectGenerativeSoftwareAgents(generativeInfo)Returns a set of software agents
selectGenerativeType(generativeInfo)Returns the generative type (trained , legacy or composite)
selectProducer(manifest)Gets the producer of this manifest, derived from its stds.schema-org.CreativeWork assertion, if available
selectSocialAccounts(manifest)Gets any social accounts associated with the producer of this manifest, derived from its stds.schema-org.CreativeWork assertion, if available

Interfaces

InterfaceDescription
AssertionAccessor
BlobUrlData
C2paMain interface for reading c2pa data contained within an asset.
C2paConfig
C2paReadOptions
C2paReadResult
DownloaderOptions
ExtendedAssertions
GenerativeInfo
Ingredient
L2ClaimGenerator
L2ManifestStoreManifest representation suitable for use with c2pa-wc.
L2Producer
L2Signature
L2SocialAccount
L2Web3
Manifest
ManifestMap
ManifestStore
Source
SourceMetadata
Thumbnail
ToolkitSettings
TranslatedDictionaryCategory

Type Aliases

Type AliasDescription
C2paSourceType
DisposableBlobUrl
DisposableL2ManifestStore
ErrorStatus
IconVariant