@@ -28,6 +28,29 @@ export interface BuilderFactory {
2828 * Exposes methods for building C2PA manifests and signing assets.
2929 */
3030export interface Builder {
31+ /**
32+ * Sets the remote URL for a remote manifest. The manifest is expected to be available at this location.
33+ *
34+ * @param url URL pointing to the location the remote manifest will be stored.
35+ */
36+ setRemoteUrl : ( url : string ) => Promise < void > ;
37+
38+ /**
39+ * Sets the state of the no_embed flag. To skip embedding a manifest (e.g. for the remote-only case) set this to `true`.
40+ *
41+ * @param noEmbed Value to set the no_embed flag.
42+ * @returns
43+ */
44+ setNoEmbed : ( noEmbed : boolean ) => Promise < void > ;
45+
46+ /**
47+ * Set a thumbnail from a blob to be included in the manifest. The blob should represent the asset being signed.
48+ *
49+ * @param format Format of the thumbnail
50+ * @param blob Blob of the thumbnail bytes
51+ */
52+ setThumbnailFromBlob : ( format : string , blob : Blob ) => Promise < void > ;
53+
3154 /**
3255 * Add an ingredient to the builder from a definition, format, and blob.
3356 * Values specified in the ingredient definition will be merged with the ingredient, and these values take precendence.
@@ -103,6 +126,18 @@ function createBuilder(
103126 const { tx } = worker ;
104127
105128 return {
129+ async setRemoteUrl ( url ) {
130+ await tx . builder_setRemoteUrl ( id , url ) ;
131+ } ,
132+
133+ async setNoEmbed ( noEmbed ) {
134+ await tx . builder_setNoEmbed ( id , noEmbed ) ;
135+ } ,
136+
137+ async setThumbnailFromBlob ( format , blob ) {
138+ await tx . builder_setThumbnailFromBlob ( id , format , blob ) ;
139+ } ,
140+
106141 async addIngredientFromBlob (
107142 ingredientDefinition : Ingredient ,
108143 format : string ,
0 commit comments