contentauth / c2pa-js

JavaScript SDK for displaying and validating C2PA data
https://opensource.contentauthenticity.org
MIT License
74 stars 40 forks source link

Exposing createManifestStore #88

Closed 0xbxmb closed 1 year ago

0xbxmb commented 1 year ago

Changes in this pull request

We'd like to use rust sdk manifests generated on backend with ManifestSummary WebComponent from c2pa-wc. Since, the ManifestSummary expects an object of a certain shape to be passed in, the manifest json should be preprocessed. According to the documentation createManifestStore can do this work.

Creates a facade object with convenience methods over manifest store data returned from the toolkit.

Unfortunately, the createManifestStore is not currently exposed and this PR makes it available for the client code.

Types of changes

Checklist

0xbxmb commented 1 year ago

Hi @dkozma @emensch, what do you think about exposing this method?

emensch commented 1 year ago

Closing this as there's no current need - as it stands, we want to discourage people from separating metadata from the file itself, and I can't currently envision any use for this API beyond that purpose. If it becomes a need in the future, we can absolutely re-consider adding this to the public API.