@limboai/verifox-sdk-verifier 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,42 @@
1
1
  /* auto-generated by NAPI-RS */
2
2
  /* eslint-disable */
3
3
  export declare class AssetSdk {
4
- static create(trustAnchors: Array<string>, registry?: string | undefined | null): AssetSdk
4
+ static create(options: AssetVerifierOptions): AssetSdk
5
5
  verify(input: Bytes | string, binding?: RecoverBinding | undefined | null): import('@contentauth/c2pa-types').ManifestStore[]
6
6
  recover(input: Bytes | string): Promise<Json>
7
7
  }
8
8
  export type AssetSdkJs = AssetSdk
9
9
 
10
10
  export declare class StreamSdk {
11
- static create(trustAnchors: Array<string>, ledger: any): StreamSdk
11
+ static create(ledger: any, options: StreamVerifierOptions): StreamSdk
12
12
  validate(streamId: string, data: Bytes): Promise<Json>
13
13
  stop(streamId: string): Promise<void>
14
14
  }
15
15
  export type StreamSdkJs = StreamSdk
16
16
 
17
+ /**
18
+ * r" Construction options for [`Sdk::new`] (and the `AssetSdk.create` JS
19
+ * r" binding). `trust_c2pa_anchors` defaults to `true` when omitted.
20
+ */
21
+ export interface AssetVerifierOptions {
22
+ /** r" PEM trust anchors for the caller's own issuers. */
23
+ trustAnchors: Array<string>
24
+ /**
25
+ * r" Registry base URL (`https://api.trylimbo.com`) enabling recovery in
26
+ * r" `verify`. Omit for a verifier that only checks embedded manifests.
27
+ */
28
+ registry?: string
29
+ /**
30
+ * r" Also trust the bundled official C2PA anchors on top of `trust_anchors`.
31
+ * r" Defaults to `true`; set `false` to trust only `trust_anchors`.
32
+ */
33
+ trustC2PaAnchors?: boolean
34
+ }
35
+
36
+ export declare function C2PA_TRUST_LIST(): string
37
+
38
+ export declare function C2PA_TSA_TRUST_LIST(): string
39
+
17
40
  export declare function DEV_CA(): string
18
41
 
19
42
  export declare const enum ErrorKind {
@@ -44,14 +67,29 @@ export interface LedgerHandle {
44
67
  }
45
68
 
46
69
  /**
47
- * A soft binding handed in from the JS boundary — e.g. the `binding` object
48
- * from the deployment's `/manifest/recover`.
70
+ * r" A soft binding handed in from the JS boundary — e.g. the `binding` object
71
+ * r" from the deployment's `/manifest/recover`.
49
72
  */
50
73
  export interface RecoverBinding {
51
74
  alg: string
52
75
  value: string
53
76
  }
54
77
 
78
+ /**
79
+ * r" Construction options for [`StreamSdk::new`] (and the `StreamSdk.create`
80
+ * r" JS binding, where the ledger stays a separate argument).
81
+ * r" `trust_c2pa_anchors` defaults to `true` when omitted.
82
+ */
83
+ export interface StreamVerifierOptions {
84
+ /** r" PEM trust anchors for the caller's own issuers. */
85
+ trustAnchors: Array<string>
86
+ /**
87
+ * r" Also trust the bundled official C2PA anchors on top of `trust_anchors`.
88
+ * r" Defaults to `true`; set `false` to trust only `trust_anchors`.
89
+ */
90
+ trustC2PaAnchors?: boolean
91
+ }
92
+
55
93
  export interface ValidationError {
56
94
  kind: ErrorKind
57
95
  message: string
package/gen/napi/index.js CHANGED
@@ -81,8 +81,8 @@ function requireNative() {
81
81
  try {
82
82
  const binding = require('@limboai/verifox-sdk-verifier-android-arm64')
83
83
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-android-arm64/package.json').version
84
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
85
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
84
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
85
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
86
86
  }
87
87
  return binding
88
88
  } catch (e) {
@@ -97,8 +97,8 @@ function requireNative() {
97
97
  try {
98
98
  const binding = require('@limboai/verifox-sdk-verifier-android-arm-eabi')
99
99
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-android-arm-eabi/package.json').version
100
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
101
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
100
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
101
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
102
102
  }
103
103
  return binding
104
104
  } catch (e) {
@@ -118,8 +118,8 @@ function requireNative() {
118
118
  try {
119
119
  const binding = require('@limboai/verifox-sdk-verifier-win32-x64-gnu')
120
120
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-win32-x64-gnu/package.json').version
121
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
122
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
121
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
122
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
123
123
  }
124
124
  return binding
125
125
  } catch (e) {
@@ -134,8 +134,8 @@ function requireNative() {
134
134
  try {
135
135
  const binding = require('@limboai/verifox-sdk-verifier-win32-x64-msvc')
136
136
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-win32-x64-msvc/package.json').version
137
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
138
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
137
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
138
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
139
139
  }
140
140
  return binding
141
141
  } catch (e) {
@@ -151,8 +151,8 @@ function requireNative() {
151
151
  try {
152
152
  const binding = require('@limboai/verifox-sdk-verifier-win32-ia32-msvc')
153
153
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-win32-ia32-msvc/package.json').version
154
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
155
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
154
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
155
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
156
156
  }
157
157
  return binding
158
158
  } catch (e) {
@@ -167,8 +167,8 @@ function requireNative() {
167
167
  try {
168
168
  const binding = require('@limboai/verifox-sdk-verifier-win32-arm64-msvc')
169
169
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-win32-arm64-msvc/package.json').version
170
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
170
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
172
  }
173
173
  return binding
174
174
  } catch (e) {
@@ -186,8 +186,8 @@ function requireNative() {
186
186
  try {
187
187
  const binding = require('@limboai/verifox-sdk-verifier-darwin-universal')
188
188
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-darwin-universal/package.json').version
189
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
190
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
189
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
190
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
191
191
  }
192
192
  return binding
193
193
  } catch (e) {
@@ -202,8 +202,8 @@ function requireNative() {
202
202
  try {
203
203
  const binding = require('@limboai/verifox-sdk-verifier-darwin-x64')
204
204
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-darwin-x64/package.json').version
205
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
206
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
205
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
206
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
207
207
  }
208
208
  return binding
209
209
  } catch (e) {
@@ -218,8 +218,8 @@ function requireNative() {
218
218
  try {
219
219
  const binding = require('@limboai/verifox-sdk-verifier-darwin-arm64')
220
220
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-darwin-arm64/package.json').version
221
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
222
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
221
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
222
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
223
223
  }
224
224
  return binding
225
225
  } catch (e) {
@@ -238,8 +238,8 @@ function requireNative() {
238
238
  try {
239
239
  const binding = require('@limboai/verifox-sdk-verifier-freebsd-x64')
240
240
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-freebsd-x64/package.json').version
241
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
241
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
243
243
  }
244
244
  return binding
245
245
  } catch (e) {
@@ -254,8 +254,8 @@ function requireNative() {
254
254
  try {
255
255
  const binding = require('@limboai/verifox-sdk-verifier-freebsd-arm64')
256
256
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-freebsd-arm64/package.json').version
257
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
258
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
257
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
258
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
259
259
  }
260
260
  return binding
261
261
  } catch (e) {
@@ -275,8 +275,8 @@ function requireNative() {
275
275
  try {
276
276
  const binding = require('@limboai/verifox-sdk-verifier-linux-x64-musl')
277
277
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-linux-x64-musl/package.json').version
278
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
279
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
278
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
279
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
280
280
  }
281
281
  return binding
282
282
  } catch (e) {
@@ -291,8 +291,8 @@ function requireNative() {
291
291
  try {
292
292
  const binding = require('@limboai/verifox-sdk-verifier-linux-x64-gnu')
293
293
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-linux-x64-gnu/package.json').version
294
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
295
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
294
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
295
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
296
296
  }
297
297
  return binding
298
298
  } catch (e) {
@@ -309,8 +309,8 @@ function requireNative() {
309
309
  try {
310
310
  const binding = require('@limboai/verifox-sdk-verifier-linux-arm64-musl')
311
311
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-linux-arm64-musl/package.json').version
312
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
313
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
312
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
313
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
314
314
  }
315
315
  return binding
316
316
  } catch (e) {
@@ -325,8 +325,8 @@ function requireNative() {
325
325
  try {
326
326
  const binding = require('@limboai/verifox-sdk-verifier-linux-arm64-gnu')
327
327
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-linux-arm64-gnu/package.json').version
328
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
328
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
330
330
  }
331
331
  return binding
332
332
  } catch (e) {
@@ -343,8 +343,8 @@ function requireNative() {
343
343
  try {
344
344
  const binding = require('@limboai/verifox-sdk-verifier-linux-arm-musleabihf')
345
345
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-linux-arm-musleabihf/package.json').version
346
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
347
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
346
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
347
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
348
348
  }
349
349
  return binding
350
350
  } catch (e) {
@@ -359,8 +359,8 @@ function requireNative() {
359
359
  try {
360
360
  const binding = require('@limboai/verifox-sdk-verifier-linux-arm-gnueabihf')
361
361
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-linux-arm-gnueabihf/package.json').version
362
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
363
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
362
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
363
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
364
364
  }
365
365
  return binding
366
366
  } catch (e) {
@@ -377,8 +377,8 @@ function requireNative() {
377
377
  try {
378
378
  const binding = require('@limboai/verifox-sdk-verifier-linux-loong64-musl')
379
379
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-linux-loong64-musl/package.json').version
380
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
381
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
380
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
381
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
382
382
  }
383
383
  return binding
384
384
  } catch (e) {
@@ -393,8 +393,8 @@ function requireNative() {
393
393
  try {
394
394
  const binding = require('@limboai/verifox-sdk-verifier-linux-loong64-gnu')
395
395
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-linux-loong64-gnu/package.json').version
396
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
397
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
396
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
397
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
398
398
  }
399
399
  return binding
400
400
  } catch (e) {
@@ -411,8 +411,8 @@ function requireNative() {
411
411
  try {
412
412
  const binding = require('@limboai/verifox-sdk-verifier-linux-riscv64-musl')
413
413
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-linux-riscv64-musl/package.json').version
414
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
415
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
414
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
415
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
416
416
  }
417
417
  return binding
418
418
  } catch (e) {
@@ -427,8 +427,8 @@ function requireNative() {
427
427
  try {
428
428
  const binding = require('@limboai/verifox-sdk-verifier-linux-riscv64-gnu')
429
429
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-linux-riscv64-gnu/package.json').version
430
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
431
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
430
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
431
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
432
432
  }
433
433
  return binding
434
434
  } catch (e) {
@@ -444,8 +444,8 @@ function requireNative() {
444
444
  try {
445
445
  const binding = require('@limboai/verifox-sdk-verifier-linux-ppc64-gnu')
446
446
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-linux-ppc64-gnu/package.json').version
447
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
448
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
447
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
448
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
449
449
  }
450
450
  return binding
451
451
  } catch (e) {
@@ -460,8 +460,8 @@ function requireNative() {
460
460
  try {
461
461
  const binding = require('@limboai/verifox-sdk-verifier-linux-s390x-gnu')
462
462
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-linux-s390x-gnu/package.json').version
463
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
464
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
463
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
464
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
465
465
  }
466
466
  return binding
467
467
  } catch (e) {
@@ -480,8 +480,8 @@ function requireNative() {
480
480
  try {
481
481
  const binding = require('@limboai/verifox-sdk-verifier-openharmony-arm64')
482
482
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-openharmony-arm64/package.json').version
483
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
484
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
483
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
484
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
485
485
  }
486
486
  return binding
487
487
  } catch (e) {
@@ -496,8 +496,8 @@ function requireNative() {
496
496
  try {
497
497
  const binding = require('@limboai/verifox-sdk-verifier-openharmony-x64')
498
498
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-openharmony-x64/package.json').version
499
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
500
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
499
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
500
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
501
501
  }
502
502
  return binding
503
503
  } catch (e) {
@@ -512,8 +512,8 @@ function requireNative() {
512
512
  try {
513
513
  const binding = require('@limboai/verifox-sdk-verifier-openharmony-arm')
514
514
  const bindingPackageVersion = require('@limboai/verifox-sdk-verifier-openharmony-arm/package.json').version
515
- if (bindingPackageVersion !== '0.0.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
516
- throw new Error(`Native binding package version mismatch, expected 0.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
515
+ if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
516
+ throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
517
517
  }
518
518
  return binding
519
519
  } catch (e) {
@@ -579,10 +579,12 @@ if (!nativeBinding) {
579
579
  throw new Error(`Failed to load native binding`)
580
580
  }
581
581
 
582
- const { AssetSdk, AssetSdkJs, StreamSdk, StreamSdkJs, DEV_CA, ErrorKind } = nativeBinding
582
+ const { AssetSdk, AssetSdkJs, StreamSdk, StreamSdkJs, C2PA_TRUST_LIST, C2PA_TSA_TRUST_LIST, DEV_CA, ErrorKind } = nativeBinding
583
583
  export { AssetSdk }
584
584
  export { AssetSdkJs }
585
585
  export { StreamSdk }
586
586
  export { StreamSdkJs }
587
+ export { C2PA_TRUST_LIST }
588
+ export { C2PA_TSA_TRUST_LIST }
587
589
  export { DEV_CA }
588
590
  export { ErrorKind }
@@ -5,11 +5,15 @@ export class AssetSdk {
5
5
  private constructor();
6
6
  free(): void;
7
7
  [Symbol.dispose](): void;
8
- static create(trust_anchors: string[], registry?: string | null): AssetSdk;
8
+ static create(options: any): AssetSdk;
9
9
  recover(_data: Uint8Array): Promise<any>;
10
10
  verify(data: Uint8Array, binding: any): Promise<import('@contentauth/c2pa-types').ManifestStore[]>;
11
11
  }
12
12
 
13
+ export function C2PA_TRUST_LIST(): string;
14
+
15
+ export function C2PA_TSA_TRUST_LIST(): string;
16
+
13
17
  export function DEV_CA(): string;
14
18
 
15
19
  export enum ErrorKind {
@@ -28,7 +32,7 @@ export class StreamSdk {
28
32
  private constructor();
29
33
  free(): void;
30
34
  [Symbol.dispose](): void;
31
- static create(trust_anchors: string[], ledger: VerifierLedger): StreamSdk;
35
+ static create(ledger: VerifierLedger, options: any): StreamSdk;
32
36
  stop(stream_id: string): Promise<void>;
33
37
  validate(stream_id: string, data: Uint8Array): Promise<SegmentValidation>;
34
38
  }
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./verifox_sdk_verifier_bg.js";
5
5
  __wbg_set_wasm(wasm);
6
6
  wasm.__wbindgen_start();
7
7
  export {
8
- AssetSdk, DEV_CA, ErrorKind, StreamSdk, ValidationError, ValidationFailureCode, init_panic_hook
8
+ AssetSdk, C2PA_TRUST_LIST, C2PA_TSA_TRUST_LIST, DEV_CA, ErrorKind, StreamSdk, ValidationError, ValidationFailureCode, init_panic_hook
9
9
  } from "./verifox_sdk_verifier_bg.js";
@@ -16,16 +16,11 @@ export class AssetSdk {
16
16
  wasm.__wbg_assetsdk_free(ptr, 0);
17
17
  }
18
18
  /**
19
- * @param {string[]} trust_anchors
20
- * @param {string | null} [registry]
19
+ * @param {any} options
21
20
  * @returns {AssetSdk}
22
21
  */
23
- static create(trust_anchors, registry) {
24
- const ptr0 = passArrayJsValueToWasm0(trust_anchors, wasm.__wbindgen_malloc);
25
- const len0 = WASM_VECTOR_LEN;
26
- var ptr1 = isLikeNone(registry) ? 0 : passStringToWasm0(registry, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
27
- var len1 = WASM_VECTOR_LEN;
28
- const ret = wasm.assetsdk_create(ptr0, len0, ptr1, len1);
22
+ static create(options) {
23
+ const ret = wasm.assetsdk_create(options);
29
24
  if (ret[2]) {
30
25
  throw takeFromExternrefTable0(ret[1]);
31
26
  }
@@ -55,6 +50,38 @@ export class AssetSdk {
55
50
  }
56
51
  if (Symbol.dispose) AssetSdk.prototype[Symbol.dispose] = AssetSdk.prototype.free;
57
52
 
53
+ /**
54
+ * @returns {string}
55
+ */
56
+ export function C2PA_TRUST_LIST() {
57
+ let deferred1_0;
58
+ let deferred1_1;
59
+ try {
60
+ const ret = wasm.C2PA_TRUST_LIST();
61
+ deferred1_0 = ret[0];
62
+ deferred1_1 = ret[1];
63
+ return getStringFromWasm0(ret[0], ret[1]);
64
+ } finally {
65
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
66
+ }
67
+ }
68
+
69
+ /**
70
+ * @returns {string}
71
+ */
72
+ export function C2PA_TSA_TRUST_LIST() {
73
+ let deferred1_0;
74
+ let deferred1_1;
75
+ try {
76
+ const ret = wasm.C2PA_TSA_TRUST_LIST();
77
+ deferred1_0 = ret[0];
78
+ deferred1_1 = ret[1];
79
+ return getStringFromWasm0(ret[0], ret[1]);
80
+ } finally {
81
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
82
+ }
83
+ }
84
+
58
85
  /**
59
86
  * @returns {string}
60
87
  */
@@ -104,14 +131,12 @@ export class StreamSdk {
104
131
  wasm.__wbg_streamsdk_free(ptr, 0);
105
132
  }
106
133
  /**
107
- * @param {string[]} trust_anchors
108
134
  * @param {VerifierLedger} ledger
135
+ * @param {any} options
109
136
  * @returns {StreamSdk}
110
137
  */
111
- static create(trust_anchors, ledger) {
112
- const ptr0 = passArrayJsValueToWasm0(trust_anchors, wasm.__wbindgen_malloc);
113
- const len0 = WASM_VECTOR_LEN;
114
- const ret = wasm.streamsdk_create(ptr0, len0, ledger);
138
+ static create(ledger, options) {
139
+ const ret = wasm.streamsdk_create(ledger, options);
115
140
  if (ret[2]) {
116
141
  throw takeFromExternrefTable0(ret[1]);
117
142
  }
@@ -328,7 +353,7 @@ export function __wbg_fetch_9dad4fe911207b37(arg0) {
328
353
  const ret = fetch(arg0);
329
354
  return ret;
330
355
  }
331
- export function __wbg_forget_d791af91a625bf37() { return handleError(function (arg0, arg1, arg2) {
356
+ export function __wbg_forget_bf008fe81806769f() { return handleError(function (arg0, arg1, arg2) {
332
357
  const ret = arg0.forget(getStringFromWasm0(arg1, arg2));
333
358
  return ret;
334
359
  }, arguments); }
@@ -340,12 +365,12 @@ export function __wbg_getTime_ef2e115ede346a26(arg0) {
340
365
  const ret = arg0.getTime();
341
366
  return ret;
342
367
  }
343
- export function __wbg_get_44e98e27bda25b5b() { return handleError(function (arg0, arg1) {
344
- const ret = Reflect.get(arg0, arg1);
368
+ export function __wbg_get_2e5523a43d58f630() { return handleError(function (arg0, arg1, arg2) {
369
+ const ret = arg0.get(getStringFromWasm0(arg1, arg2));
345
370
  return ret;
346
371
  }, arguments); }
347
- export function __wbg_get_4c0235a407a06215() { return handleError(function (arg0, arg1, arg2) {
348
- const ret = arg0.get(getStringFromWasm0(arg1, arg2));
372
+ export function __wbg_get_44e98e27bda25b5b() { return handleError(function (arg0, arg1) {
373
+ const ret = Reflect.get(arg0, arg1);
349
374
  return ret;
350
375
  }, arguments); }
351
376
  export function __wbg_get_52a8a619f7b88df6() { return handleError(function (arg0, arg1) {
@@ -495,7 +520,7 @@ export function __wbg_parse_a5c06e19bc1187fd(arg0, arg1) {
495
520
  export function __wbg_prototypesetcall_956c7493c68e29b4(arg0, arg1, arg2) {
496
521
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
497
522
  }
498
- export function __wbg_put_16ef41250619d5d5() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
523
+ export function __wbg_put_96e4dfd5bd94ad57() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
499
524
  var v0 = getArrayU8FromWasm0(arg3, arg4).slice();
500
525
  wasm.__wbindgen_free(arg3, arg4 * 1, 1);
501
526
  const ret = arg0.put(getStringFromWasm0(arg1, arg2), v0);
@@ -606,12 +631,12 @@ export function __wbg_value_3d3defe09fb1ffca(arg0) {
606
631
  return ret;
607
632
  }
608
633
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
609
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1691, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
634
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1694, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
610
635
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd9b417d7eb72bae4);
611
636
  return ret;
612
637
  }
613
638
  export function __wbindgen_cast_0000000000000002(arg0, arg1) {
614
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1346, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
639
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1349, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
615
640
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd892d6a6211634ef);
616
641
  return ret;
617
642
  }
@@ -830,16 +855,6 @@ function passArray8ToWasm0(arg, malloc) {
830
855
  return ptr;
831
856
  }
832
857
 
833
- function passArrayJsValueToWasm0(array, malloc) {
834
- const ptr = malloc(array.length * 4, 4) >>> 0;
835
- for (let i = 0; i < array.length; i++) {
836
- const add = addToExternrefTable0(array[i]);
837
- getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
838
- }
839
- WASM_VECTOR_LEN = array.length;
840
- return ptr;
841
- }
842
-
843
858
  function passStringToWasm0(arg, malloc, realloc) {
844
859
  if (realloc === undefined) {
845
860
  const buf = cachedTextEncoder.encode(arg);
@@ -1,16 +1,18 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const C2PA_TRUST_LIST: () => [number, number];
5
+ export const C2PA_TSA_TRUST_LIST: () => [number, number];
4
6
  export const DEV_CA: () => [number, number];
5
7
  export const __wbg_assetsdk_free: (a: number, b: number) => void;
6
8
  export const __wbg_get_validationerror_kind: (a: number) => number;
7
9
  export const __wbg_get_validationerror_message: (a: number) => [number, number];
8
10
  export const __wbg_streamsdk_free: (a: number, b: number) => void;
9
11
  export const __wbg_validationerror_free: (a: number, b: number) => void;
10
- export const assetsdk_create: (a: number, b: number, c: number, d: number) => [number, number, number];
12
+ export const assetsdk_create: (a: any) => [number, number, number];
11
13
  export const assetsdk_recover: (a: number, b: number, c: number) => any;
12
14
  export const assetsdk_verify: (a: number, b: number, c: number, d: any) => any;
13
- export const streamsdk_create: (a: number, b: number, c: any) => [number, number, number];
15
+ export const streamsdk_create: (a: any, b: any) => [number, number, number];
14
16
  export const streamsdk_stop: (a: number, b: number, c: number) => any;
15
17
  export const streamsdk_validate: (a: number, b: number, c: number, d: number, e: number) => any;
16
18
  export const init_panic_hook: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limboai/verifox-sdk-verifier",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "license": "UNLICENSED",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,15 +44,15 @@
44
44
  "prepublishOnly": "napi prepublish -t npm --no-gh-release --skip-optional-publish"
45
45
  },
46
46
  "dependencies": {
47
- "@contentauth/c2pa-types": "^0.4.4"
47
+ "@contentauth/c2pa-types": "^0.7.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@napi-rs/cli": "^3.6.2"
51
51
  },
52
52
  "optionalDependencies": {
53
- "@limboai/verifox-sdk-verifier-darwin-arm64": "0.0.3",
54
- "@limboai/verifox-sdk-verifier-darwin-x64": "0.0.3",
55
- "@limboai/verifox-sdk-verifier-linux-x64-gnu": "0.0.3",
56
- "@limboai/verifox-sdk-verifier-linux-arm64-gnu": "0.0.3"
53
+ "@limboai/verifox-sdk-verifier-darwin-arm64": "0.0.4",
54
+ "@limboai/verifox-sdk-verifier-darwin-x64": "0.0.4",
55
+ "@limboai/verifox-sdk-verifier-linux-x64-gnu": "0.0.4",
56
+ "@limboai/verifox-sdk-verifier-linux-arm64-gnu": "0.0.4"
57
57
  }
58
58
  }
package/types/asset.d.ts CHANGED
@@ -2,21 +2,39 @@
2
2
 
3
3
  import type { Reader } from "./shared.js";
4
4
 
5
+ /** Construction options for {@link AssetSdk.create}. */
6
+ export interface AssetVerifierOptions {
7
+ /** PEM trust anchors used to decide which credentials to honor. */
8
+ trustAnchors: string[];
9
+ /**
10
+ * Base URL of the Verifox registry — `https://api.trylimbo.com`. Configured
11
+ * once here, it enables content recovery in {@link AssetSdk.verify}. Omit it
12
+ * for a verifier that only checks embedded manifests.
13
+ */
14
+ registry?: string;
15
+ /**
16
+ * Whether to also trust the official C2PA Conformance Program anchors
17
+ * ({@link C2PA_TRUST_LIST} + {@link C2PA_TSA_TRUST_LIST}) on top of
18
+ * `trustAnchors`. Defaults to `true`; set `false` to trust only
19
+ * `trustAnchors`.
20
+ */
21
+ trustC2paAnchors?: boolean;
22
+ }
23
+
5
24
  export declare class AssetSdk {
6
25
  /**
7
- * @param trustAnchors PEM trust anchors used to decide which credentials to
8
- * honor.
9
- * @param registry Base URL of the Verifox registry — `https://api.trylimbo.com`.
10
- * Configured once here, it enables content recovery in
11
- * {@link AssetSdk.verify}. Omit it for a verifier that only checks
12
- * embedded manifests.
26
+ * @param options {@link AssetVerifierOptions} — trust anchors plus optional
27
+ * registry and C2PA-trust toggle.
13
28
  *
14
29
  * @example
15
30
  * ```ts
16
- * const sdk = AssetSdk.create([trustAnchorPem], "https://api.trylimbo.com");
31
+ * const sdk = AssetSdk.create({
32
+ * trustAnchors: [trustAnchorPem],
33
+ * registry: "https://api.trylimbo.com",
34
+ * });
17
35
  * ```
18
36
  */
19
- static create(trustAnchors: string[], registry?: string): AssetSdk;
37
+ static create(options: AssetVerifierOptions): AssetSdk;
20
38
  /**
21
39
  * Verify an asset and return **every** credential found for it.
22
40
  *
package/types/shared.d.ts CHANGED
@@ -28,3 +28,19 @@ export declare class ValidationError {
28
28
  * credentials; use your production trust anchors otherwise.
29
29
  */
30
30
  export declare function DEV_CA(): string;
31
+
32
+ /**
33
+ * The official C2PA Conformance Program trust anchors (signing CAs), bundled
34
+ * from `c2pa-org/conformance-public`. Trusted by default by
35
+ * {@link AssetSdk.create} / {@link StreamSdk.create} (pass
36
+ * `trustC2paAnchors: false` to opt out). Exposed for callers who want to inspect
37
+ * or combine the list explicitly. Refreshed periodically; may be stale.
38
+ */
39
+ export declare function C2PA_TRUST_LIST(): string;
40
+
41
+ /**
42
+ * The official C2PA time-stamping-authority (TSA) trust anchors, bundled from
43
+ * `c2pa-org/conformance-public`. Applied together with {@link C2PA_TRUST_LIST}
44
+ * under the same default-on trust policy so timestamp certificates validate.
45
+ */
46
+ export declare function C2PA_TSA_TRUST_LIST(): string;
package/types/stream.d.ts CHANGED
@@ -57,8 +57,25 @@ export interface UnknownSegment {
57
57
 
58
58
  export type SegmentValidation = InitValidation | MediaValidation | UnknownSegment;
59
59
 
60
+ /** Construction options for {@link StreamSdk.create}. */
61
+ export interface StreamVerifierOptions {
62
+ /** PEM trust anchors used to decide which credentials to honor. */
63
+ trustAnchors: string[];
64
+ /**
65
+ * Whether to also trust the official C2PA Conformance Program anchors on top
66
+ * of `trustAnchors`. Defaults to `true`; set `false` to trust only
67
+ * `trustAnchors`.
68
+ */
69
+ trustC2paAnchors?: boolean;
70
+ }
71
+
60
72
  export declare class StreamSdk {
61
- static create(trustAnchors: string[], ledger: VerifierLedger): StreamSdk;
73
+ /**
74
+ * @param ledger The caller-provided {@link VerifierLedger} for per-stream state.
75
+ * @param options {@link StreamVerifierOptions} — trust anchors plus the
76
+ * C2PA-trust toggle. Always the last argument.
77
+ */
78
+ static create(ledger: VerifierLedger, options: StreamVerifierOptions): StreamSdk;
62
79
  validate(streamId: string, data: Uint8Array): Promise<SegmentValidation>;
63
80
  stop(streamId: string): Promise<void>;
64
81
  }