@succinctlabs/react-native-zcam1 0.2.5

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.
Files changed (139) hide show
  1. package/README.md +61 -0
  2. package/Zcam1Sdk.podspec +157 -0
  3. package/app.plugin.js +11 -0
  4. package/cpp/generated/zcam1_c2pa_utils.cpp +4091 -0
  5. package/cpp/generated/zcam1_c2pa_utils.hpp +367 -0
  6. package/cpp/generated/zcam1_certs_utils.cpp +1799 -0
  7. package/cpp/generated/zcam1_certs_utils.hpp +72 -0
  8. package/cpp/generated/zcam1_verify_utils.cpp +1857 -0
  9. package/cpp/generated/zcam1_verify_utils.hpp +79 -0
  10. package/cpp/proving/generated/zcam1_proving_utils.cpp +3661 -0
  11. package/cpp/proving/generated/zcam1_proving_utils.hpp +275 -0
  12. package/cpp/proving/zcam1-proving.cpp +16 -0
  13. package/cpp/proving/zcam1-proving.h +15 -0
  14. package/cpp/zcam1-sdk.cpp +20 -0
  15. package/cpp/zcam1-sdk.h +15 -0
  16. package/ios/Zcam1Camera.swift +2945 -0
  17. package/ios/Zcam1CameraFilmStyle.swift +191 -0
  18. package/ios/Zcam1CameraViewManager.m +86 -0
  19. package/ios/Zcam1Capture.h +13 -0
  20. package/ios/Zcam1Capture.mm +500 -0
  21. package/ios/Zcam1DepthData.swift +417 -0
  22. package/ios/Zcam1Sdk.h +16 -0
  23. package/ios/Zcam1Sdk.mm +66 -0
  24. package/ios/proving/Zcam1Proving.h +16 -0
  25. package/ios/proving/Zcam1Proving.mm +66 -0
  26. package/lib/module/NativeZcam1Capture.js +12 -0
  27. package/lib/module/NativeZcam1Capture.js.map +1 -0
  28. package/lib/module/NativeZcam1Sdk.js +7 -0
  29. package/lib/module/NativeZcam1Sdk.js.map +1 -0
  30. package/lib/module/bindings.js +51 -0
  31. package/lib/module/bindings.js.map +1 -0
  32. package/lib/module/camera.js +522 -0
  33. package/lib/module/camera.js.map +1 -0
  34. package/lib/module/capture.js +120 -0
  35. package/lib/module/capture.js.map +1 -0
  36. package/lib/module/common.js +35 -0
  37. package/lib/module/common.js.map +1 -0
  38. package/lib/module/generated/zcam1_c2pa_utils-ffi.js +43 -0
  39. package/lib/module/generated/zcam1_c2pa_utils-ffi.js.map +1 -0
  40. package/lib/module/generated/zcam1_c2pa_utils.js +1202 -0
  41. package/lib/module/generated/zcam1_c2pa_utils.js.map +1 -0
  42. package/lib/module/generated/zcam1_certs_utils-ffi.js +43 -0
  43. package/lib/module/generated/zcam1_certs_utils-ffi.js.map +1 -0
  44. package/lib/module/generated/zcam1_certs_utils.js +399 -0
  45. package/lib/module/generated/zcam1_certs_utils.js.map +1 -0
  46. package/lib/module/generated/zcam1_proving_utils-ffi.js +43 -0
  47. package/lib/module/generated/zcam1_proving_utils-ffi.js.map +1 -0
  48. package/lib/module/generated/zcam1_proving_utils.js +515 -0
  49. package/lib/module/generated/zcam1_proving_utils.js.map +1 -0
  50. package/lib/module/generated/zcam1_verify_utils-ffi.js +43 -0
  51. package/lib/module/generated/zcam1_verify_utils-ffi.js.map +1 -0
  52. package/lib/module/generated/zcam1_verify_utils.js +252 -0
  53. package/lib/module/generated/zcam1_verify_utils.js.map +1 -0
  54. package/lib/module/index.js +31 -0
  55. package/lib/module/index.js.map +1 -0
  56. package/lib/module/package.json +1 -0
  57. package/lib/module/picker.js +222 -0
  58. package/lib/module/picker.js.map +1 -0
  59. package/lib/module/proving/NativeZcam1Proving.js +7 -0
  60. package/lib/module/proving/NativeZcam1Proving.js.map +1 -0
  61. package/lib/module/proving/bindings.js +46 -0
  62. package/lib/module/proving/bindings.js.map +1 -0
  63. package/lib/module/proving/index.js +5 -0
  64. package/lib/module/proving/index.js.map +1 -0
  65. package/lib/module/proving/prove.js +346 -0
  66. package/lib/module/proving/prove.js.map +1 -0
  67. package/lib/module/utils.js +27 -0
  68. package/lib/module/utils.js.map +1 -0
  69. package/lib/module/verify.js +82 -0
  70. package/lib/module/verify.js.map +1 -0
  71. package/lib/typescript/package.json +1 -0
  72. package/lib/typescript/src/NativeZcam1Capture.d.ts +280 -0
  73. package/lib/typescript/src/NativeZcam1Capture.d.ts.map +1 -0
  74. package/lib/typescript/src/NativeZcam1Sdk.d.ts +8 -0
  75. package/lib/typescript/src/NativeZcam1Sdk.d.ts.map +1 -0
  76. package/lib/typescript/src/bindings.d.ts +14 -0
  77. package/lib/typescript/src/bindings.d.ts.map +1 -0
  78. package/lib/typescript/src/camera.d.ts +300 -0
  79. package/lib/typescript/src/camera.d.ts.map +1 -0
  80. package/lib/typescript/src/capture.d.ts +59 -0
  81. package/lib/typescript/src/capture.d.ts.map +1 -0
  82. package/lib/typescript/src/common.d.ts +10 -0
  83. package/lib/typescript/src/common.d.ts.map +1 -0
  84. package/lib/typescript/src/generated/zcam1_c2pa_utils-ffi.d.ts +175 -0
  85. package/lib/typescript/src/generated/zcam1_c2pa_utils-ffi.d.ts.map +1 -0
  86. package/lib/typescript/src/generated/zcam1_c2pa_utils.d.ts +811 -0
  87. package/lib/typescript/src/generated/zcam1_c2pa_utils.d.ts.map +1 -0
  88. package/lib/typescript/src/generated/zcam1_certs_utils-ffi.d.ts +82 -0
  89. package/lib/typescript/src/generated/zcam1_certs_utils-ffi.d.ts.map +1 -0
  90. package/lib/typescript/src/generated/zcam1_certs_utils.d.ts +413 -0
  91. package/lib/typescript/src/generated/zcam1_certs_utils.d.ts.map +1 -0
  92. package/lib/typescript/src/generated/zcam1_proving_utils-ffi.d.ts +153 -0
  93. package/lib/typescript/src/generated/zcam1_proving_utils-ffi.d.ts.map +1 -0
  94. package/lib/typescript/src/generated/zcam1_proving_utils.d.ts +321 -0
  95. package/lib/typescript/src/generated/zcam1_proving_utils.d.ts.map +1 -0
  96. package/lib/typescript/src/generated/zcam1_verify_utils-ffi.d.ts +84 -0
  97. package/lib/typescript/src/generated/zcam1_verify_utils-ffi.d.ts.map +1 -0
  98. package/lib/typescript/src/generated/zcam1_verify_utils.d.ts +286 -0
  99. package/lib/typescript/src/generated/zcam1_verify_utils.d.ts.map +1 -0
  100. package/lib/typescript/src/index.d.ts +29 -0
  101. package/lib/typescript/src/index.d.ts.map +1 -0
  102. package/lib/typescript/src/picker.d.ts +103 -0
  103. package/lib/typescript/src/picker.d.ts.map +1 -0
  104. package/lib/typescript/src/proving/NativeZcam1Proving.d.ts +8 -0
  105. package/lib/typescript/src/proving/NativeZcam1Proving.d.ts.map +1 -0
  106. package/lib/typescript/src/proving/bindings.d.ts +8 -0
  107. package/lib/typescript/src/proving/bindings.d.ts.map +1 -0
  108. package/lib/typescript/src/proving/index.d.ts +3 -0
  109. package/lib/typescript/src/proving/index.d.ts.map +1 -0
  110. package/lib/typescript/src/proving/prove.d.ts +74 -0
  111. package/lib/typescript/src/proving/prove.d.ts.map +1 -0
  112. package/lib/typescript/src/utils.d.ts +2 -0
  113. package/lib/typescript/src/utils.d.ts.map +1 -0
  114. package/lib/typescript/src/verify.d.ts +45 -0
  115. package/lib/typescript/src/verify.d.ts.map +1 -0
  116. package/package.json +118 -0
  117. package/src/NativeZcam1Capture.ts +335 -0
  118. package/src/NativeZcam1Sdk.ts +10 -0
  119. package/src/bindings.tsx +49 -0
  120. package/src/camera.tsx +705 -0
  121. package/src/capture.tsx +165 -0
  122. package/src/common.tsx +46 -0
  123. package/src/generated/zcam1_c2pa_utils-ffi.ts +456 -0
  124. package/src/generated/zcam1_c2pa_utils.ts +1866 -0
  125. package/src/generated/zcam1_certs_utils-ffi.ts +187 -0
  126. package/src/generated/zcam1_certs_utils.ts +549 -0
  127. package/src/generated/zcam1_proving_utils-ffi.ts +374 -0
  128. package/src/generated/zcam1_proving_utils.ts +804 -0
  129. package/src/generated/zcam1_verify_utils-ffi.ts +196 -0
  130. package/src/generated/zcam1_verify_utils.ts +372 -0
  131. package/src/index.ts +73 -0
  132. package/src/picker.tsx +342 -0
  133. package/src/proving/NativeZcam1Proving.ts +10 -0
  134. package/src/proving/bindings.tsx +50 -0
  135. package/src/proving/index.ts +8 -0
  136. package/src/proving/prove.tsx +492 -0
  137. package/src/utils.ts +38 -0
  138. package/src/verify.tsx +119 -0
  139. package/turbo.json +27 -0
@@ -0,0 +1,811 @@
1
+ import { type UniffiByteArray, type UniffiRustArcPtr, type UnsafeMutableRawPointer, FfiConverterObject, RustBuffer, UniffiAbstractObject, destructorGuardSymbol, pointerLiteralSymbol, uniffiTypeNameSymbol, variantOrdinalSymbol } from "uniffi-bindgen-react-native";
2
+ export declare function authenticityStatus(path: string, asyncOpts_?: {
3
+ signal: AbortSignal;
4
+ }): Promise<AuthenticityStatus>;
5
+ /**
6
+ * Compute the hash for a file.
7
+ *
8
+ * Note: the file should **not** have a C2PA manifest embedded.
9
+ */
10
+ export declare function computeHash(path: string): ArrayBuffer;
11
+ export declare function computeHashFromBuffer(buffer: ArrayBuffer, format: string): ArrayBuffer;
12
+ export declare function extractManifest(path: string): ManifestStoreInterface;
13
+ /**
14
+ * Return a MIME type given a file path.
15
+ *
16
+ * This function will use the file extension to determine the MIME type.
17
+ */
18
+ export declare function formatFromPath(path: string): string | undefined;
19
+ export type AuthenticityData = {
20
+ isJailBroken: boolean;
21
+ isLocationSpoofingAvailable: boolean;
22
+ };
23
+ /**
24
+ * Generated factory for {@link AuthenticityData} record objects.
25
+ */
26
+ export declare const AuthenticityData: Readonly<{
27
+ /**
28
+ * Create a frozen instance of {@link AuthenticityData}, with defaults specified
29
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
30
+ */
31
+ create: (partial: Partial<AuthenticityData> & Required<Omit<AuthenticityData, never>>) => AuthenticityData;
32
+ /**
33
+ * Create a frozen instance of {@link AuthenticityData}, with defaults specified
34
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
35
+ */
36
+ new: (partial: Partial<AuthenticityData> & Required<Omit<AuthenticityData, never>>) => AuthenticityData;
37
+ /**
38
+ * Defaults specified in the {@link zcam1_c2pa_utils} crate.
39
+ */
40
+ defaults: () => Partial<AuthenticityData>;
41
+ }>;
42
+ export type Claim = {
43
+ signature: string;
44
+ };
45
+ /**
46
+ * Generated factory for {@link Claim} record objects.
47
+ */
48
+ export declare const Claim: Readonly<{
49
+ /**
50
+ * Create a frozen instance of {@link Claim}, with defaults specified
51
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
52
+ */
53
+ create: (partial: Partial<Claim> & Required<Omit<Claim, never>>) => Claim;
54
+ /**
55
+ * Create a frozen instance of {@link Claim}, with defaults specified
56
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
57
+ */
58
+ new: (partial: Partial<Claim> & Required<Omit<Claim, never>>) => Claim;
59
+ /**
60
+ * Defaults specified in the {@link zcam1_c2pa_utils} crate.
61
+ */
62
+ defaults: () => Partial<Claim>;
63
+ }>;
64
+ export type DepthData = {
65
+ width: number;
66
+ height: number;
67
+ pixelFormat: string;
68
+ statistics: DepthDataStatistics;
69
+ accuracy: string;
70
+ };
71
+ /**
72
+ * Generated factory for {@link DepthData} record objects.
73
+ */
74
+ export declare const DepthData: Readonly<{
75
+ /**
76
+ * Create a frozen instance of {@link DepthData}, with defaults specified
77
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
78
+ */
79
+ create: (partial: Partial<DepthData> & Required<Omit<DepthData, never>>) => DepthData;
80
+ /**
81
+ * Create a frozen instance of {@link DepthData}, with defaults specified
82
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
83
+ */
84
+ new: (partial: Partial<DepthData> & Required<Omit<DepthData, never>>) => DepthData;
85
+ /**
86
+ * Defaults specified in the {@link zcam1_c2pa_utils} crate.
87
+ */
88
+ defaults: () => Partial<DepthData>;
89
+ }>;
90
+ export type DepthDataStatistics = {
91
+ min: string;
92
+ max: string;
93
+ mean: string;
94
+ stdDev: string;
95
+ validPixelCount: number;
96
+ sampleStride: number;
97
+ };
98
+ /**
99
+ * Generated factory for {@link DepthDataStatistics} record objects.
100
+ */
101
+ export declare const DepthDataStatistics: Readonly<{
102
+ /**
103
+ * Create a frozen instance of {@link DepthDataStatistics}, with defaults specified
104
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
105
+ */
106
+ create: (partial: Partial<DepthDataStatistics> & Required<Omit<DepthDataStatistics, never>>) => DepthDataStatistics;
107
+ /**
108
+ * Create a frozen instance of {@link DepthDataStatistics}, with defaults specified
109
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
110
+ */
111
+ new: (partial: Partial<DepthDataStatistics> & Required<Omit<DepthDataStatistics, never>>) => DepthDataStatistics;
112
+ /**
113
+ * Defaults specified in the {@link zcam1_c2pa_utils} crate.
114
+ */
115
+ defaults: () => Partial<DepthDataStatistics>;
116
+ }>;
117
+ export type DeviceBindings = {
118
+ appId: string;
119
+ deviceKeyId: string;
120
+ attestation: string;
121
+ assertion: string;
122
+ };
123
+ /**
124
+ * Generated factory for {@link DeviceBindings} record objects.
125
+ */
126
+ export declare const DeviceBindings: Readonly<{
127
+ /**
128
+ * Create a frozen instance of {@link DeviceBindings}, with defaults specified
129
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
130
+ */
131
+ create: (partial: Partial<DeviceBindings> & Required<Omit<DeviceBindings, never>>) => DeviceBindings;
132
+ /**
133
+ * Create a frozen instance of {@link DeviceBindings}, with defaults specified
134
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
135
+ */
136
+ new: (partial: Partial<DeviceBindings> & Required<Omit<DeviceBindings, never>>) => DeviceBindings;
137
+ /**
138
+ * Defaults specified in the {@link zcam1_c2pa_utils} crate.
139
+ */
140
+ defaults: () => Partial<DeviceBindings>;
141
+ }>;
142
+ export type Exclusion = {
143
+ start: bigint;
144
+ length: bigint;
145
+ };
146
+ /**
147
+ * Generated factory for {@link Exclusion} record objects.
148
+ */
149
+ export declare const Exclusion: Readonly<{
150
+ /**
151
+ * Create a frozen instance of {@link Exclusion}, with defaults specified
152
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
153
+ */
154
+ create: (partial: Partial<Exclusion> & Required<Omit<Exclusion, never>>) => Exclusion;
155
+ /**
156
+ * Create a frozen instance of {@link Exclusion}, with defaults specified
157
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
158
+ */
159
+ new: (partial: Partial<Exclusion> & Required<Omit<Exclusion, never>>) => Exclusion;
160
+ /**
161
+ * Defaults specified in the {@link zcam1_c2pa_utils} crate.
162
+ */
163
+ defaults: () => Partial<Exclusion>;
164
+ }>;
165
+ /**
166
+ * Film style (filter) information captured at the time of photo/video creation.
167
+ */
168
+ export type FilmStyleInfo = {
169
+ /**
170
+ * Name of the film style (e.g. "mellow", "bw", or a custom name).
171
+ */
172
+ name: string;
173
+ /**
174
+ * Whether this is a built-in preset, an overridden preset, or a custom style.
175
+ * One of "builtin", "override", or "custom".
176
+ */
177
+ source: string;
178
+ /**
179
+ * The recipe that was applied, serialized as a JSON array of effects.
180
+ */
181
+ recipe: string;
182
+ };
183
+ /**
184
+ * Generated factory for {@link FilmStyleInfo} record objects.
185
+ */
186
+ export declare const FilmStyleInfo: Readonly<{
187
+ /**
188
+ * Create a frozen instance of {@link FilmStyleInfo}, with defaults specified
189
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
190
+ */
191
+ create: (partial: Partial<FilmStyleInfo> & Required<Omit<FilmStyleInfo, never>>) => FilmStyleInfo;
192
+ /**
193
+ * Create a frozen instance of {@link FilmStyleInfo}, with defaults specified
194
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
195
+ */
196
+ new: (partial: Partial<FilmStyleInfo> & Required<Omit<FilmStyleInfo, never>>) => FilmStyleInfo;
197
+ /**
198
+ * Defaults specified in the {@link zcam1_c2pa_utils} crate.
199
+ */
200
+ defaults: () => Partial<FilmStyleInfo>;
201
+ }>;
202
+ export type PhotoMetadataInfo = {
203
+ deviceMake: string;
204
+ deviceModel: string;
205
+ softwareVersion: string;
206
+ xResolution: number;
207
+ yResolution: number;
208
+ orientation: number;
209
+ iso: string;
210
+ exposureTime: number;
211
+ depthOfField: number;
212
+ focalLength: number;
213
+ authenticityData: AuthenticityData;
214
+ depthData: DepthData | undefined;
215
+ filmStyle: FilmStyleInfo | undefined;
216
+ };
217
+ /**
218
+ * Generated factory for {@link PhotoMetadataInfo} record objects.
219
+ */
220
+ export declare const PhotoMetadataInfo: Readonly<{
221
+ /**
222
+ * Create a frozen instance of {@link PhotoMetadataInfo}, with defaults specified
223
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
224
+ */
225
+ create: (partial: Partial<PhotoMetadataInfo> & Required<Omit<PhotoMetadataInfo, never>>) => PhotoMetadataInfo;
226
+ /**
227
+ * Create a frozen instance of {@link PhotoMetadataInfo}, with defaults specified
228
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
229
+ */
230
+ new: (partial: Partial<PhotoMetadataInfo> & Required<Omit<PhotoMetadataInfo, never>>) => PhotoMetadataInfo;
231
+ /**
232
+ * Defaults specified in the {@link zcam1_c2pa_utils} crate.
233
+ */
234
+ defaults: () => Partial<PhotoMetadataInfo>;
235
+ }>;
236
+ export type Proof = {
237
+ data: string;
238
+ vkHash: string;
239
+ };
240
+ /**
241
+ * Generated factory for {@link Proof} record objects.
242
+ */
243
+ export declare const Proof: Readonly<{
244
+ /**
245
+ * Create a frozen instance of {@link Proof}, with defaults specified
246
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
247
+ */
248
+ create: (partial: Partial<Proof> & Required<Omit<Proof, never>>) => Proof;
249
+ /**
250
+ * Create a frozen instance of {@link Proof}, with defaults specified
251
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
252
+ */
253
+ new: (partial: Partial<Proof> & Required<Omit<Proof, never>>) => Proof;
254
+ /**
255
+ * Defaults specified in the {@link zcam1_c2pa_utils} crate.
256
+ */
257
+ defaults: () => Partial<Proof>;
258
+ }>;
259
+ export type VideoMetadataInfo = {
260
+ deviceMake: string;
261
+ deviceModel: string;
262
+ softwareVersion: string;
263
+ format: string;
264
+ hasAudio: boolean;
265
+ durationSeconds: number;
266
+ fileSizeBytes: number;
267
+ width: number;
268
+ height: number;
269
+ rotationDegrees: number;
270
+ frameRate: number;
271
+ videoCodec: string | undefined;
272
+ audioCodec: string | undefined;
273
+ audioSampleRate: /*u32*/ number | undefined;
274
+ audioChannels: /*u32*/ number | undefined;
275
+ authenticityData: AuthenticityData;
276
+ filmStyle: FilmStyleInfo | undefined;
277
+ };
278
+ /**
279
+ * Generated factory for {@link VideoMetadataInfo} record objects.
280
+ */
281
+ export declare const VideoMetadataInfo: Readonly<{
282
+ /**
283
+ * Create a frozen instance of {@link VideoMetadataInfo}, with defaults specified
284
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
285
+ */
286
+ create: (partial: Partial<VideoMetadataInfo> & Required<Omit<VideoMetadataInfo, never>>) => VideoMetadataInfo;
287
+ /**
288
+ * Create a frozen instance of {@link VideoMetadataInfo}, with defaults specified
289
+ * in Rust, in the {@link zcam1_c2pa_utils} crate.
290
+ */
291
+ new: (partial: Partial<VideoMetadataInfo> & Required<Omit<VideoMetadataInfo, never>>) => VideoMetadataInfo;
292
+ /**
293
+ * Defaults specified in the {@link zcam1_c2pa_utils} crate.
294
+ */
295
+ defaults: () => Partial<VideoMetadataInfo>;
296
+ }>;
297
+ export declare enum AuthenticityStatus {
298
+ Unknown = 0,
299
+ NoManifest = 1,
300
+ InvalidManifest = 2,
301
+ Bindings = 3,
302
+ Proof = 4
303
+ }
304
+ export declare enum C2paError_Tags {
305
+ C2pa = "C2pa",
306
+ Json = "Json",
307
+ Io = "Io",
308
+ Base64 = "Base64",
309
+ NoActiveManifest = "NoActiveManifest",
310
+ NoHash = "NoHash",
311
+ FormatNotSupported = "FormatNotSupported",
312
+ Poisoned = "Poisoned"
313
+ }
314
+ export declare const C2paError: {
315
+ C2pa: {
316
+ new (message: string): {
317
+ readonly tag: C2paError_Tags.C2pa;
318
+ /**
319
+ * @private
320
+ * This field is private and should not be used.
321
+ */
322
+ readonly [uniffiTypeNameSymbol]: string;
323
+ /**
324
+ * @private
325
+ * This field is private and should not be used.
326
+ */
327
+ readonly [variantOrdinalSymbol]: 1;
328
+ name: string;
329
+ message: string;
330
+ stack?: string;
331
+ cause?: unknown;
332
+ };
333
+ instanceOf(e: any): e is {
334
+ readonly tag: C2paError_Tags.C2pa;
335
+ /**
336
+ * @private
337
+ * This field is private and should not be used.
338
+ */
339
+ readonly [uniffiTypeNameSymbol]: string;
340
+ /**
341
+ * @private
342
+ * This field is private and should not be used.
343
+ */
344
+ readonly [variantOrdinalSymbol]: 1;
345
+ name: string;
346
+ message: string;
347
+ stack?: string;
348
+ cause?: unknown;
349
+ };
350
+ isError(error: unknown): error is Error;
351
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
352
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
353
+ stackTraceLimit: number;
354
+ };
355
+ Json: {
356
+ new (message: string): {
357
+ readonly tag: C2paError_Tags.Json;
358
+ /**
359
+ * @private
360
+ * This field is private and should not be used.
361
+ */
362
+ readonly [uniffiTypeNameSymbol]: string;
363
+ /**
364
+ * @private
365
+ * This field is private and should not be used.
366
+ */
367
+ readonly [variantOrdinalSymbol]: 2;
368
+ name: string;
369
+ message: string;
370
+ stack?: string;
371
+ cause?: unknown;
372
+ };
373
+ instanceOf(e: any): e is {
374
+ readonly tag: C2paError_Tags.Json;
375
+ /**
376
+ * @private
377
+ * This field is private and should not be used.
378
+ */
379
+ readonly [uniffiTypeNameSymbol]: string;
380
+ /**
381
+ * @private
382
+ * This field is private and should not be used.
383
+ */
384
+ readonly [variantOrdinalSymbol]: 2;
385
+ name: string;
386
+ message: string;
387
+ stack?: string;
388
+ cause?: unknown;
389
+ };
390
+ isError(error: unknown): error is Error;
391
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
392
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
393
+ stackTraceLimit: number;
394
+ };
395
+ Io: {
396
+ new (message: string): {
397
+ readonly tag: C2paError_Tags.Io;
398
+ /**
399
+ * @private
400
+ * This field is private and should not be used.
401
+ */
402
+ readonly [uniffiTypeNameSymbol]: string;
403
+ /**
404
+ * @private
405
+ * This field is private and should not be used.
406
+ */
407
+ readonly [variantOrdinalSymbol]: 3;
408
+ name: string;
409
+ message: string;
410
+ stack?: string;
411
+ cause?: unknown;
412
+ };
413
+ instanceOf(e: any): e is {
414
+ readonly tag: C2paError_Tags.Io;
415
+ /**
416
+ * @private
417
+ * This field is private and should not be used.
418
+ */
419
+ readonly [uniffiTypeNameSymbol]: string;
420
+ /**
421
+ * @private
422
+ * This field is private and should not be used.
423
+ */
424
+ readonly [variantOrdinalSymbol]: 3;
425
+ name: string;
426
+ message: string;
427
+ stack?: string;
428
+ cause?: unknown;
429
+ };
430
+ isError(error: unknown): error is Error;
431
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
432
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
433
+ stackTraceLimit: number;
434
+ };
435
+ Base64: {
436
+ new (message: string): {
437
+ readonly tag: C2paError_Tags.Base64;
438
+ /**
439
+ * @private
440
+ * This field is private and should not be used.
441
+ */
442
+ readonly [uniffiTypeNameSymbol]: string;
443
+ /**
444
+ * @private
445
+ * This field is private and should not be used.
446
+ */
447
+ readonly [variantOrdinalSymbol]: 4;
448
+ name: string;
449
+ message: string;
450
+ stack?: string;
451
+ cause?: unknown;
452
+ };
453
+ instanceOf(e: any): e is {
454
+ readonly tag: C2paError_Tags.Base64;
455
+ /**
456
+ * @private
457
+ * This field is private and should not be used.
458
+ */
459
+ readonly [uniffiTypeNameSymbol]: string;
460
+ /**
461
+ * @private
462
+ * This field is private and should not be used.
463
+ */
464
+ readonly [variantOrdinalSymbol]: 4;
465
+ name: string;
466
+ message: string;
467
+ stack?: string;
468
+ cause?: unknown;
469
+ };
470
+ isError(error: unknown): error is Error;
471
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
472
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
473
+ stackTraceLimit: number;
474
+ };
475
+ NoActiveManifest: {
476
+ new (message: string): {
477
+ readonly tag: C2paError_Tags.NoActiveManifest;
478
+ /**
479
+ * @private
480
+ * This field is private and should not be used.
481
+ */
482
+ readonly [uniffiTypeNameSymbol]: string;
483
+ /**
484
+ * @private
485
+ * This field is private and should not be used.
486
+ */
487
+ readonly [variantOrdinalSymbol]: 5;
488
+ name: string;
489
+ message: string;
490
+ stack?: string;
491
+ cause?: unknown;
492
+ };
493
+ instanceOf(e: any): e is {
494
+ readonly tag: C2paError_Tags.NoActiveManifest;
495
+ /**
496
+ * @private
497
+ * This field is private and should not be used.
498
+ */
499
+ readonly [uniffiTypeNameSymbol]: string;
500
+ /**
501
+ * @private
502
+ * This field is private and should not be used.
503
+ */
504
+ readonly [variantOrdinalSymbol]: 5;
505
+ name: string;
506
+ message: string;
507
+ stack?: string;
508
+ cause?: unknown;
509
+ };
510
+ isError(error: unknown): error is Error;
511
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
512
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
513
+ stackTraceLimit: number;
514
+ };
515
+ NoHash: {
516
+ new (message: string): {
517
+ readonly tag: C2paError_Tags.NoHash;
518
+ /**
519
+ * @private
520
+ * This field is private and should not be used.
521
+ */
522
+ readonly [uniffiTypeNameSymbol]: string;
523
+ /**
524
+ * @private
525
+ * This field is private and should not be used.
526
+ */
527
+ readonly [variantOrdinalSymbol]: 6;
528
+ name: string;
529
+ message: string;
530
+ stack?: string;
531
+ cause?: unknown;
532
+ };
533
+ instanceOf(e: any): e is {
534
+ readonly tag: C2paError_Tags.NoHash;
535
+ /**
536
+ * @private
537
+ * This field is private and should not be used.
538
+ */
539
+ readonly [uniffiTypeNameSymbol]: string;
540
+ /**
541
+ * @private
542
+ * This field is private and should not be used.
543
+ */
544
+ readonly [variantOrdinalSymbol]: 6;
545
+ name: string;
546
+ message: string;
547
+ stack?: string;
548
+ cause?: unknown;
549
+ };
550
+ isError(error: unknown): error is Error;
551
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
552
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
553
+ stackTraceLimit: number;
554
+ };
555
+ FormatNotSupported: {
556
+ new (message: string): {
557
+ readonly tag: C2paError_Tags.FormatNotSupported;
558
+ /**
559
+ * @private
560
+ * This field is private and should not be used.
561
+ */
562
+ readonly [uniffiTypeNameSymbol]: string;
563
+ /**
564
+ * @private
565
+ * This field is private and should not be used.
566
+ */
567
+ readonly [variantOrdinalSymbol]: 7;
568
+ name: string;
569
+ message: string;
570
+ stack?: string;
571
+ cause?: unknown;
572
+ };
573
+ instanceOf(e: any): e is {
574
+ readonly tag: C2paError_Tags.FormatNotSupported;
575
+ /**
576
+ * @private
577
+ * This field is private and should not be used.
578
+ */
579
+ readonly [uniffiTypeNameSymbol]: string;
580
+ /**
581
+ * @private
582
+ * This field is private and should not be used.
583
+ */
584
+ readonly [variantOrdinalSymbol]: 7;
585
+ name: string;
586
+ message: string;
587
+ stack?: string;
588
+ cause?: unknown;
589
+ };
590
+ isError(error: unknown): error is Error;
591
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
592
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
593
+ stackTraceLimit: number;
594
+ };
595
+ Poisoned: {
596
+ new (message: string): {
597
+ readonly tag: C2paError_Tags.Poisoned;
598
+ /**
599
+ * @private
600
+ * This field is private and should not be used.
601
+ */
602
+ readonly [uniffiTypeNameSymbol]: string;
603
+ /**
604
+ * @private
605
+ * This field is private and should not be used.
606
+ */
607
+ readonly [variantOrdinalSymbol]: 8;
608
+ name: string;
609
+ message: string;
610
+ stack?: string;
611
+ cause?: unknown;
612
+ };
613
+ instanceOf(e: any): e is {
614
+ readonly tag: C2paError_Tags.Poisoned;
615
+ /**
616
+ * @private
617
+ * This field is private and should not be used.
618
+ */
619
+ readonly [uniffiTypeNameSymbol]: string;
620
+ /**
621
+ * @private
622
+ * This field is private and should not be used.
623
+ */
624
+ readonly [variantOrdinalSymbol]: 8;
625
+ name: string;
626
+ message: string;
627
+ stack?: string;
628
+ cause?: unknown;
629
+ };
630
+ isError(error: unknown): error is Error;
631
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
632
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
633
+ stackTraceLimit: number;
634
+ };
635
+ instanceOf: (e: any) => e is C2paError;
636
+ };
637
+ export type C2paError = InstanceType<(typeof C2paError)[keyof Omit<typeof C2paError, "instanceOf">]>;
638
+ export interface ManifestInterface {
639
+ bindings(): DeviceBindings | undefined;
640
+ captureMetadataAction(): string | undefined;
641
+ proof(): Proof | undefined;
642
+ }
643
+ export declare class Manifest extends UniffiAbstractObject implements ManifestInterface {
644
+ readonly [uniffiTypeNameSymbol] = "Manifest";
645
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
646
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
647
+ private constructor();
648
+ bindings(): DeviceBindings | undefined;
649
+ captureMetadataAction(): string | undefined;
650
+ proof(): Proof | undefined;
651
+ /**
652
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
653
+ */
654
+ uniffiDestroy(): void;
655
+ static instanceOf(obj: any): obj is Manifest;
656
+ }
657
+ export interface ManifestEditorInterface {
658
+ addAssertion(label: string, data: string): void;
659
+ addPhotoMetadataAction(parameters: PhotoMetadataInfo, when: string): string;
660
+ addTitle(title: string): void;
661
+ addVideoMetadataAction(parameters: VideoMetadataInfo, when: string): string;
662
+ embedManifestToFile(destination: string, format: string, asyncOpts_?: {
663
+ signal: AbortSignal;
664
+ }): Promise<void>;
665
+ removeAssertion(label: string): boolean;
666
+ }
667
+ export declare class ManifestEditor extends UniffiAbstractObject implements ManifestEditorInterface {
668
+ readonly [uniffiTypeNameSymbol] = "ManifestEditor";
669
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
670
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
671
+ constructor(path: string, keyTag: ArrayBuffer, certs: string);
672
+ /**
673
+ * Creates a builder from a file that is expected to contain an existing C2PA manifest.
674
+ *
675
+ * The metadata included in the manifest are kept.
676
+ */
677
+ static fromManifest(path: string, keyTag: ArrayBuffer, certs: string): ManifestEditorInterface;
678
+ addAssertion(label: string, data: string): void;
679
+ addPhotoMetadataAction(parameters: PhotoMetadataInfo, when: string): string;
680
+ addTitle(title: string): void;
681
+ addVideoMetadataAction(parameters: VideoMetadataInfo, when: string): string;
682
+ embedManifestToFile(destination: string, format: string, asyncOpts_?: {
683
+ signal: AbortSignal;
684
+ }): Promise<void>;
685
+ removeAssertion(label: string): boolean;
686
+ /**
687
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
688
+ */
689
+ uniffiDestroy(): void;
690
+ static instanceOf(obj: any): obj is ManifestEditor;
691
+ }
692
+ export interface ManifestStoreInterface {
693
+ activeManifest(): ManifestInterface;
694
+ }
695
+ export declare class ManifestStore extends UniffiAbstractObject implements ManifestStoreInterface {
696
+ readonly [uniffiTypeNameSymbol] = "ManifestStore";
697
+ readonly [destructorGuardSymbol]: UniffiRustArcPtr;
698
+ readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
699
+ private constructor();
700
+ activeManifest(): ManifestInterface;
701
+ /**
702
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
703
+ */
704
+ uniffiDestroy(): void;
705
+ static instanceOf(obj: any): obj is ManifestStore;
706
+ }
707
+ /**
708
+ * This should be called before anything else.
709
+ *
710
+ * It is likely that this is being done for you by the library's `index.ts`.
711
+ *
712
+ * It checks versions of uniffi between when the Rust scaffolding was generated
713
+ * and when the bindings were generated.
714
+ *
715
+ * It also initializes the machinery to enable Rust to talk back to Javascript.
716
+ */
717
+ declare function uniffiEnsureInitialized(): void;
718
+ declare const _default: Readonly<{
719
+ initialize: typeof uniffiEnsureInitialized;
720
+ converters: {
721
+ FfiConverterTypeAuthenticityData: {
722
+ read(from: RustBuffer): AuthenticityData;
723
+ write(value: AuthenticityData, into: RustBuffer): void;
724
+ allocationSize(value: AuthenticityData): number;
725
+ lift(value: UniffiByteArray): AuthenticityData;
726
+ lower(value: AuthenticityData): UniffiByteArray;
727
+ };
728
+ FfiConverterTypeAuthenticityStatus: {
729
+ read(from: RustBuffer): AuthenticityStatus;
730
+ write(value: AuthenticityStatus, into: RustBuffer): void;
731
+ allocationSize(value: AuthenticityStatus): number;
732
+ lift(value: UniffiByteArray): AuthenticityStatus;
733
+ lower(value: AuthenticityStatus): UniffiByteArray;
734
+ };
735
+ FfiConverterTypeC2paError: {
736
+ read(from: RustBuffer): C2paError;
737
+ write(value: C2paError, into: RustBuffer): void;
738
+ allocationSize(value: C2paError): number;
739
+ lift(value: UniffiByteArray): C2paError;
740
+ lower(value: C2paError): UniffiByteArray;
741
+ };
742
+ FfiConverterTypeClaim: {
743
+ read(from: RustBuffer): Claim;
744
+ write(value: Claim, into: RustBuffer): void;
745
+ allocationSize(value: Claim): number;
746
+ lift(value: UniffiByteArray): Claim;
747
+ lower(value: Claim): UniffiByteArray;
748
+ };
749
+ FfiConverterTypeDepthData: {
750
+ read(from: RustBuffer): DepthData;
751
+ write(value: DepthData, into: RustBuffer): void;
752
+ allocationSize(value: DepthData): number;
753
+ lift(value: UniffiByteArray): DepthData;
754
+ lower(value: DepthData): UniffiByteArray;
755
+ };
756
+ FfiConverterTypeDepthDataStatistics: {
757
+ read(from: RustBuffer): DepthDataStatistics;
758
+ write(value: DepthDataStatistics, into: RustBuffer): void;
759
+ allocationSize(value: DepthDataStatistics): number;
760
+ lift(value: UniffiByteArray): DepthDataStatistics;
761
+ lower(value: DepthDataStatistics): UniffiByteArray;
762
+ };
763
+ FfiConverterTypeDeviceBindings: {
764
+ read(from: RustBuffer): DeviceBindings;
765
+ write(value: DeviceBindings, into: RustBuffer): void;
766
+ allocationSize(value: DeviceBindings): number;
767
+ lift(value: UniffiByteArray): DeviceBindings;
768
+ lower(value: DeviceBindings): UniffiByteArray;
769
+ };
770
+ FfiConverterTypeExclusion: {
771
+ read(from: RustBuffer): Exclusion;
772
+ write(value: Exclusion, into: RustBuffer): void;
773
+ allocationSize(value: Exclusion): number;
774
+ lift(value: UniffiByteArray): Exclusion;
775
+ lower(value: Exclusion): UniffiByteArray;
776
+ };
777
+ FfiConverterTypeFilmStyleInfo: {
778
+ read(from: RustBuffer): FilmStyleInfo;
779
+ write(value: FilmStyleInfo, into: RustBuffer): void;
780
+ allocationSize(value: FilmStyleInfo): number;
781
+ lift(value: UniffiByteArray): FilmStyleInfo;
782
+ lower(value: FilmStyleInfo): UniffiByteArray;
783
+ };
784
+ FfiConverterTypeManifest: FfiConverterObject<ManifestInterface>;
785
+ FfiConverterTypeManifestEditor: FfiConverterObject<ManifestEditorInterface>;
786
+ FfiConverterTypeManifestStore: FfiConverterObject<ManifestStoreInterface>;
787
+ FfiConverterTypePhotoMetadataInfo: {
788
+ read(from: RustBuffer): PhotoMetadataInfo;
789
+ write(value: PhotoMetadataInfo, into: RustBuffer): void;
790
+ allocationSize(value: PhotoMetadataInfo): number;
791
+ lift(value: UniffiByteArray): PhotoMetadataInfo;
792
+ lower(value: PhotoMetadataInfo): UniffiByteArray;
793
+ };
794
+ FfiConverterTypeProof: {
795
+ read(from: RustBuffer): Proof;
796
+ write(value: Proof, into: RustBuffer): void;
797
+ allocationSize(value: Proof): number;
798
+ lift(value: UniffiByteArray): Proof;
799
+ lower(value: Proof): UniffiByteArray;
800
+ };
801
+ FfiConverterTypeVideoMetadataInfo: {
802
+ read(from: RustBuffer): VideoMetadataInfo;
803
+ write(value: VideoMetadataInfo, into: RustBuffer): void;
804
+ allocationSize(value: VideoMetadataInfo): number;
805
+ lift(value: UniffiByteArray): VideoMetadataInfo;
806
+ lower(value: VideoMetadataInfo): UniffiByteArray;
807
+ };
808
+ };
809
+ }>;
810
+ export default _default;
811
+ //# sourceMappingURL=zcam1_c2pa_utils.d.ts.map