6
6
7
7
# Class: Builder
8
8
9
- Defined in: [ Builder.ts:17 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L17 )
9
+ Defined in: [ Builder.ts:29 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L29 )
10
10
11
11
## Implements
12
12
13
- - ` Builder `
13
+ - [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md )
14
14
15
15
## Methods
16
16
17
17
### addAssertion()
18
18
19
19
> ** addAssertion** (` label ` , ` assertion ` , ` assertionKind? ` ): ` void `
20
20
21
- Defined in: [ Builder.ts:52 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L52 )
21
+ Defined in: [ Builder.ts:64 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L64 )
22
22
23
23
Add CBOR assertion to the builder
24
24
@@ -46,15 +46,15 @@ The CBOR encoded assertion
46
46
47
47
#### Implementation of
48
48
49
- ` neon.Builder. addAssertion`
49
+ [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md ) . [ ` addAssertion ` ] ( ../interfaces/BuilderInterface.md#addassertion )
50
50
51
51
***
52
52
53
53
### addIngredient()
54
54
55
55
> ** addIngredient** (` ingredientJson ` , ` ingredient ` ): ` Promise ` \< ` void ` \>
56
56
57
- Defined in: [ Builder.ts:69 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L69 )
57
+ Defined in: [ Builder.ts:81 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L81 )
58
58
59
59
Add an ingredient from a buffer or file
60
60
@@ -78,15 +78,15 @@ The source and format of the ingredient
78
78
79
79
#### Implementation of
80
80
81
- ` neon.Builder. addIngredient`
81
+ [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md ) . [ ` addIngredient ` ] ( ../interfaces/BuilderInterface.md#addingredient )
82
82
83
83
***
84
84
85
85
### addResource()
86
86
87
87
> ** addResource** (` uri ` , ` resource ` ): ` Promise ` \< ` void ` \>
88
88
89
- Defined in: [ Builder.ts:65 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L65 )
89
+ Defined in: [ Builder.ts:77 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L77 )
90
90
91
91
Add a resource from a buffer or file
92
92
@@ -110,15 +110,15 @@ The source and format of the resource
110
110
111
111
#### Implementation of
112
112
113
- ` neon.Builder. addResource`
113
+ [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md ) . [ ` addResource ` ] ( ../interfaces/BuilderInterface.md#addresource )
114
114
115
115
***
116
116
117
117
### getManifestDefinition()
118
118
119
119
> ** getManifestDefinition** (): [ ` ManifestDefinition ` ] ( ../interfaces/ManifestDefinition.md )
120
120
121
- Defined in: [ Builder.ts:184 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L184 )
121
+ Defined in: [ Builder.ts:196 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L196 )
122
122
123
123
Getter for the builder's manifest definition
124
124
@@ -130,15 +130,15 @@ The manifest definition
130
130
131
131
#### Implementation of
132
132
133
- ` neon.Builder. getManifestDefinition`
133
+ [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md ) . [ ` getManifestDefinition ` ] ( ../interfaces/BuilderInterface.md#getmanifestdefinition )
134
134
135
135
***
136
136
137
137
### identitySignAsync()
138
138
139
139
> ** identitySignAsync** (` signer ` , ` input ` , ` output ` ): ` Promise ` \< ` Buffer ` \< ` ArrayBufferLike ` \>\>
140
140
141
- Defined in: [ Builder.ts:158 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L158 )
141
+ Defined in: [ Builder.ts:170 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L170 )
142
142
143
143
Sign an asset from a buffer or file asynchronously, using an
144
144
IdentityAssertionSigner
@@ -167,15 +167,15 @@ the bytes of the c2pa_manifest that was embedded
167
167
168
168
#### Implementation of
169
169
170
- ` neon.Builder. identitySignAsync`
170
+ [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md ) . [ ` identitySignAsync ` ] ( ../interfaces/BuilderInterface.md#identitysignasync )
171
171
172
172
***
173
173
174
174
### setNoEmbed()
175
175
176
176
> ** setNoEmbed** (` noEmbed ` ): ` void `
177
177
178
- Defined in: [ Builder.ts:44 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L44 )
178
+ Defined in: [ Builder.ts:56 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L56 )
179
179
180
180
Set the no embed flag of the manifest
181
181
@@ -193,15 +193,15 @@ The no embed flag of the manifest
193
193
194
194
#### Implementation of
195
195
196
- ` neon.Builder. setNoEmbed`
196
+ [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md ) . [ ` setNoEmbed ` ] ( ../interfaces/BuilderInterface.md#setnoembed )
197
197
198
198
***
199
199
200
200
### setRemoteUrl()
201
201
202
202
> ** setRemoteUrl** (` remoteUrl ` ): ` void `
203
203
204
- Defined in: [ Builder.ts:48 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L48 )
204
+ Defined in: [ Builder.ts:60 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L60 )
205
205
206
206
Set the remote URL of the manifest
207
207
@@ -217,23 +217,23 @@ Set the remote URL of the manifest
217
217
218
218
#### Implementation of
219
219
220
- ` neon.Builder. setRemoteUrl`
220
+ [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md ) . [ ` setRemoteUrl ` ] ( ../interfaces/BuilderInterface.md#setremoteurl )
221
221
222
222
***
223
223
224
224
### sign()
225
225
226
226
> ** sign** (` signer ` , ` input ` , ` output ` ): ` Buffer `
227
227
228
- Defined in: [ Builder.ts:88 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L88 )
228
+ Defined in: [ Builder.ts:100 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L100 )
229
229
230
230
Sign an asset from a buffer or file
231
231
232
232
#### Parameters
233
233
234
234
##### signer
235
235
236
- [ ` LocalSigner ` ] ( LocalSigner .md)
236
+ [ ` LocalSignerInterface ` ] ( ../interfaces/LocalSignerInterface .md)
237
237
238
238
The local signer to use
239
239
@@ -253,15 +253,15 @@ the bytes of the c2pa_manifest that was embedded
253
253
254
254
#### Implementation of
255
255
256
- ` neon.Builder. sign`
256
+ [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md ) . [ ` sign ` ] ( ../interfaces/BuilderInterface.md#sign )
257
257
258
258
***
259
259
260
260
### signAsync()
261
261
262
262
> ** signAsync** (` signer ` , ` input ` , ` output ` ): ` Promise ` \< ` Buffer ` \< ` ArrayBufferLike ` \>\>
263
263
264
- Defined in: [ Builder.ts:132 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L132 )
264
+ Defined in: [ Builder.ts:144 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L144 )
265
265
266
266
Sign an asset from a buffer or file asynchronously, using a
267
267
CallbackSigner
@@ -270,7 +270,7 @@ CallbackSigner
270
270
271
271
##### signer
272
272
273
- [ ` CallbackSigner ` ] ( CallbackSigner .md)
273
+ [ ` CallbackSignerInterface ` ] ( ../interfaces/CallbackSignerInterface .md)
274
274
275
275
##### input
276
276
@@ -288,15 +288,15 @@ the bytes of the c2pa_manifest that was embedded
288
288
289
289
#### Implementation of
290
290
291
- ` neon.Builder. signAsync`
291
+ [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md ) . [ ` signAsync ` ] ( ../interfaces/BuilderInterface.md#signasync )
292
292
293
293
***
294
294
295
295
### signConfigAsync()
296
296
297
297
> ** signConfigAsync** (` callback ` , ` signerConfig ` , ` input ` , ` output ` ): ` Promise ` \< ` Buffer ` \< ` ArrayBufferLike ` \>\>
298
298
299
- Defined in: [ Builder.ts:105 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L105 )
299
+ Defined in: [ Builder.ts:117 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L117 )
300
300
301
301
Sign an asset from a buffer or file asynchronously, using a callback
302
302
and not passing a private key
@@ -331,23 +331,23 @@ the bytes of the c2pa_manifest that was embedded
331
331
332
332
#### Implementation of
333
333
334
- ` neon.Builder. signConfigAsync`
334
+ [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md ) . [ ` signConfigAsync ` ] ( ../interfaces/BuilderInterface.md#signconfigasync )
335
335
336
336
***
337
337
338
338
### signFile()
339
339
340
340
> ** signFile** (` signer ` , ` filePath ` , ` output ` ): ` Buffer `
341
341
342
- Defined in: [ Builder.ts:96 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L96 )
342
+ Defined in: [ Builder.ts:108 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L108 )
343
343
344
344
Embed a signed manifest into a stream using the LocalSigner
345
345
346
346
#### Parameters
347
347
348
348
##### signer
349
349
350
- [ ` LocalSigner ` ] ( LocalSigner .md)
350
+ [ ` LocalSignerInterface ` ] ( ../interfaces/LocalSignerInterface .md)
351
351
352
352
The local signer to use
353
353
@@ -367,15 +367,15 @@ the bytes of the c2pa_manifest that was embedded
367
367
368
368
#### Implementation of
369
369
370
- ` neon.Builder. signFile`
370
+ [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md ) . [ ` signFile ` ] ( ../interfaces/BuilderInterface.md#signfile )
371
371
372
372
***
373
373
374
374
### toArchive()
375
375
376
376
> ** toArchive** (` asset ` ): ` Promise ` \< ` void ` \>
377
377
378
- Defined in: [ Builder.ts:80 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L80 )
378
+ Defined in: [ Builder.ts:92 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L92 )
379
379
380
380
Convert the Builder into a archive formatted buffer or file
381
381
@@ -393,15 +393,15 @@ The file or buffer for the archive
393
393
394
394
#### Implementation of
395
395
396
- ` neon.Builder. toArchive`
396
+ [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md ) . [ ` toArchive ` ] ( ../interfaces/BuilderInterface.md#toarchive )
397
397
398
398
***
399
399
400
400
### updateManifestProperty()
401
401
402
402
> ** updateManifestProperty** (` property ` , ` value ` ): ` void `
403
403
404
- Defined in: [ Builder.ts:188 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L188 )
404
+ Defined in: [ Builder.ts:200 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L200 )
405
405
406
406
Update a string property of the manifest
407
407
@@ -423,15 +423,15 @@ The manifest definition
423
423
424
424
#### Implementation of
425
425
426
- ` neon.Builder. updateManifestProperty`
426
+ [ ` BuilderInterface ` ] ( ../interfaces/BuilderInterface.md ) . [ ` updateManifestProperty ` ] ( ../interfaces/BuilderInterface.md#updatemanifestproperty )
427
427
428
428
***
429
429
430
430
### fromArchive()
431
431
432
432
> ` static ` ** fromArchive** (` asset ` ): ` Promise ` \< ` Builder ` \>
433
433
434
- Defined in: [ Builder.ts:84 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L84 )
434
+ Defined in: [ Builder.ts:96 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L96 )
435
435
436
436
#### Parameters
437
437
@@ -449,7 +449,7 @@ Defined in: [Builder.ts:84](https://github.com/contentauth/c2pa-node-v2/blob/1df
449
449
450
450
> ` static ` ** new** (): ` Builder `
451
451
452
- Defined in: [ Builder.ts:20 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L20 )
452
+ Defined in: [ Builder.ts:32 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L32 )
453
453
454
454
#### Returns
455
455
@@ -461,7 +461,7 @@ Defined in: [Builder.ts:20](https://github.com/contentauth/c2pa-node-v2/blob/1df
461
461
462
462
> ` static ` ** withJson** (` json ` ): ` Builder `
463
463
464
- Defined in: [ Builder.ts:25 ] ( https://github.com/contentauth/c2pa-node-v2/blob/1df68df861d38a8c4eb7c634a613532727ec72d3 /js-src/Builder.ts#L25 )
464
+ Defined in: [ Builder.ts:37 ] ( https://github.com/contentauth/c2pa-node-v2/blob/280e70a4878b95c480efb475988df1206fe5da39 /js-src/Builder.ts#L37 )
465
465
466
466
#### Parameters
467
467
0 commit comments