@succinctlabs/react-native-zcam1 0.3.0 → 0.4.0-alpha.2
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.
- package/Zcam1Sdk.podspec +2 -2
- package/android/CMakeLists.txt +114 -0
- package/android/build.gradle +213 -0
- package/android/cpp-adapter-proving.cpp +35 -0
- package/android/cpp-adapter.cpp +35 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/java/com/succinctlabs/zcam1sdk/Zcam1CaptureModule.kt +156 -0
- package/android/src/main/java/com/succinctlabs/zcam1sdk/Zcam1CapturePackage.kt +38 -0
- package/android/src/main/java/com/succinctlabs/zcam1sdk/Zcam1ProvingModule.kt +43 -0
- package/android/src/main/java/com/succinctlabs/zcam1sdk/Zcam1ProvingPackage.kt +34 -0
- package/android/src/main/java/com/succinctlabs/zcam1sdk/Zcam1SdkModule.kt +43 -0
- package/android/src/main/java/com/succinctlabs/zcam1sdk/Zcam1SdkPackage.kt +34 -0
- package/android/src/main/java/com/succinctlabs/zcam1sdk/camera/CameraUtils.kt +80 -0
- package/android/src/main/java/com/succinctlabs/zcam1sdk/camera/Zcam1CameraService.kt +588 -0
- package/android/src/main/java/com/succinctlabs/zcam1sdk/camera/Zcam1CameraView.kt +107 -0
- package/android/src/main/java/com/succinctlabs/zcam1sdk/camera/Zcam1CameraViewManager.kt +33 -0
- package/android/src/main/java/com/succinctlabs/zcam1sdk/camera/Zcam1OrientationManager.kt +73 -0
- package/cpp/generated/zcam1_c2pa_utils.cpp +170 -365
- package/cpp/generated/zcam1_c2pa_utils.hpp +0 -4
- package/cpp/generated/zcam1_certs_utils.cpp +121 -250
- package/cpp/generated/zcam1_common.cpp +1871 -0
- package/cpp/generated/zcam1_common.hpp +52 -0
- package/cpp/generated/zcam1_verify_utils.cpp +138 -265
- package/cpp/generated/zcam1_verify_utils.hpp +2 -2
- package/cpp/proving/generated/zcam1_common.cpp +1871 -0
- package/cpp/proving/generated/zcam1_common.hpp +52 -0
- package/cpp/proving/generated/zcam1_proving_utils.cpp +355 -417
- package/cpp/proving/generated/zcam1_proving_utils.hpp +13 -17
- package/cpp/proving/zcam1-proving.cpp +2 -0
- package/cpp/zcam1-sdk.cpp +2 -0
- package/lib/module/bindings.js +4 -0
- package/lib/module/bindings.js.map +1 -1
- package/lib/module/camera.js +71 -13
- package/lib/module/camera.js.map +1 -1
- package/lib/module/capture.js +115 -38
- package/lib/module/capture.js.map +1 -1
- package/lib/module/common.js +18 -2
- package/lib/module/common.js.map +1 -1
- package/lib/module/generated/zcam1_c2pa_utils-ffi.js +4 -0
- package/lib/module/generated/zcam1_c2pa_utils-ffi.js.map +1 -1
- package/lib/module/generated/zcam1_c2pa_utils.js +117 -9
- package/lib/module/generated/zcam1_c2pa_utils.js.map +1 -1
- package/lib/module/generated/zcam1_certs_utils-ffi.js +4 -0
- package/lib/module/generated/zcam1_certs_utils-ffi.js.map +1 -1
- package/lib/module/generated/zcam1_certs_utils.js +6 -2
- package/lib/module/generated/zcam1_certs_utils.js.map +1 -1
- package/lib/module/generated/zcam1_common-ffi.js +47 -0
- package/lib/module/generated/zcam1_common-ffi.js.map +1 -0
- package/lib/module/generated/zcam1_common.js +60 -0
- package/lib/module/generated/zcam1_common.js.map +1 -0
- package/lib/module/generated/zcam1_proving_utils-ffi.js +4 -0
- package/lib/module/generated/zcam1_proving_utils-ffi.js.map +1 -1
- package/lib/module/generated/zcam1_proving_utils.js +53 -46
- package/lib/module/generated/zcam1_proving_utils.js.map +1 -1
- package/lib/module/generated/zcam1_verify_utils-ffi.js +4 -0
- package/lib/module/generated/zcam1_verify_utils-ffi.js.map +1 -1
- package/lib/module/generated/zcam1_verify_utils.js +70 -22
- package/lib/module/generated/zcam1_verify_utils.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/proving/NativeZcam1Proving.js +1 -1
- package/lib/module/proving/index.js +1 -1
- package/lib/module/proving/index.js.map +1 -1
- package/lib/module/proving/prove.js +14 -8
- package/lib/module/proving/prove.js.map +1 -1
- package/lib/module/utils.js +19 -14
- package/lib/module/utils.js.map +1 -1
- package/lib/module/verify.js +14 -22
- package/lib/module/verify.js.map +1 -1
- package/lib/typescript/src/bindings.d.ts +3 -0
- package/lib/typescript/src/bindings.d.ts.map +1 -1
- package/lib/typescript/src/camera.d.ts +15 -0
- package/lib/typescript/src/camera.d.ts.map +1 -1
- package/lib/typescript/src/capture.d.ts +40 -1
- package/lib/typescript/src/capture.d.ts.map +1 -1
- package/lib/typescript/src/common.d.ts.map +1 -1
- package/lib/typescript/src/generated/zcam1_c2pa_utils-ffi.d.ts +37 -46
- package/lib/typescript/src/generated/zcam1_c2pa_utils-ffi.d.ts.map +1 -1
- package/lib/typescript/src/generated/zcam1_c2pa_utils.d.ts +110 -8
- package/lib/typescript/src/generated/zcam1_c2pa_utils.d.ts.map +1 -1
- package/lib/typescript/src/generated/zcam1_certs_utils-ffi.d.ts +27 -32
- package/lib/typescript/src/generated/zcam1_certs_utils-ffi.d.ts.map +1 -1
- package/lib/typescript/src/generated/zcam1_certs_utils.d.ts.map +1 -1
- package/lib/typescript/src/generated/zcam1_common-ffi.d.ts +77 -0
- package/lib/typescript/src/generated/zcam1_common-ffi.d.ts.map +1 -0
- package/lib/typescript/src/generated/zcam1_common.d.ts +17 -0
- package/lib/typescript/src/generated/zcam1_common.d.ts.map +1 -0
- package/lib/typescript/src/generated/zcam1_proving_utils-ffi.d.ts +44 -51
- package/lib/typescript/src/generated/zcam1_proving_utils-ffi.d.ts.map +1 -1
- package/lib/typescript/src/generated/zcam1_proving_utils.d.ts +26 -26
- package/lib/typescript/src/generated/zcam1_proving_utils.d.ts.map +1 -1
- package/lib/typescript/src/generated/zcam1_verify_utils-ffi.d.ts +29 -34
- package/lib/typescript/src/generated/zcam1_verify_utils-ffi.d.ts.map +1 -1
- package/lib/typescript/src/generated/zcam1_verify_utils.d.ts +94 -14
- package/lib/typescript/src/generated/zcam1_verify_utils.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/proving/NativeZcam1Proving.d.ts +1 -1
- package/lib/typescript/src/proving/index.d.ts +1 -1
- package/lib/typescript/src/proving/index.d.ts.map +1 -1
- package/lib/typescript/src/proving/prove.d.ts +3 -3
- package/lib/typescript/src/proving/prove.d.ts.map +1 -1
- package/lib/typescript/src/utils.d.ts.map +1 -1
- package/lib/typescript/src/verify.d.ts +4 -3
- package/lib/typescript/src/verify.d.ts.map +1 -1
- package/package.json +13 -6
- package/react-native.config.js +11 -0
- package/src/bindings.tsx +4 -0
- package/src/camera.tsx +116 -11
- package/src/capture.tsx +150 -53
- package/src/common.tsx +22 -2
- package/src/generated/zcam1_c2pa_utils-ffi.ts +42 -56
- package/src/generated/zcam1_c2pa_utils.ts +224 -67
- package/src/generated/zcam1_certs_utils-ffi.ts +33 -36
- package/src/generated/zcam1_certs_utils.ts +27 -24
- package/src/generated/zcam1_common-ffi.ts +183 -0
- package/src/generated/zcam1_common.ts +116 -0
- package/src/generated/zcam1_proving_utils-ffi.ts +54 -67
- package/src/generated/zcam1_proving_utils.ts +133 -138
- package/src/generated/zcam1_verify_utils-ffi.ts +39 -40
- package/src/generated/zcam1_verify_utils.ts +109 -47
- package/src/index.ts +1 -1
- package/src/proving/NativeZcam1Proving.ts +2 -2
- package/src/proving/index.ts +1 -1
- package/src/proving/prove.tsx +22 -11
- package/src/utils.ts +26 -20
- package/src/verify.tsx +25 -42
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
|
|
2
2
|
// Trust me, you don't want to mess with it!
|
|
3
3
|
|
|
4
|
+
/* tslint:disable */
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
// @ts-nocheck
|
|
7
|
+
|
|
4
8
|
import {
|
|
5
9
|
type StructuralEquality as UniffiStructuralEquality,
|
|
6
10
|
type UniffiForeignFuture as RuntimeUniffiForeignFuture,
|
|
7
11
|
type UniffiRustCallStatus,
|
|
8
|
-
type
|
|
12
|
+
type UniffiGcObject,
|
|
9
13
|
type UniffiRustFutureContinuationCallback as RuntimeUniffiRustFutureContinuationCallback,
|
|
10
14
|
type UniffiResult,
|
|
11
15
|
} from "uniffi-bindgen-react-native";
|
|
@@ -24,11 +28,11 @@ interface NativeModuleInterface {
|
|
|
24
28
|
uniffi_out_err: UniffiRustCallStatus,
|
|
25
29
|
): string;
|
|
26
30
|
ubrn_uniffi_zcam1_c2pa_utils_fn_clone_manifest(
|
|
27
|
-
|
|
31
|
+
handle: bigint,
|
|
28
32
|
uniffi_out_err: UniffiRustCallStatus,
|
|
29
33
|
): bigint;
|
|
30
34
|
ubrn_uniffi_zcam1_c2pa_utils_fn_free_manifest(
|
|
31
|
-
|
|
35
|
+
handle: bigint,
|
|
32
36
|
uniffi_out_err: UniffiRustCallStatus,
|
|
33
37
|
): void;
|
|
34
38
|
ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifest_bindings(
|
|
@@ -44,11 +48,11 @@ interface NativeModuleInterface {
|
|
|
44
48
|
uniffi_out_err: UniffiRustCallStatus,
|
|
45
49
|
): Uint8Array;
|
|
46
50
|
ubrn_uniffi_zcam1_c2pa_utils_fn_clone_manifesteditor(
|
|
47
|
-
|
|
51
|
+
handle: bigint,
|
|
48
52
|
uniffi_out_err: UniffiRustCallStatus,
|
|
49
53
|
): bigint;
|
|
50
54
|
ubrn_uniffi_zcam1_c2pa_utils_fn_free_manifesteditor(
|
|
51
|
-
|
|
55
|
+
handle: bigint,
|
|
52
56
|
uniffi_out_err: UniffiRustCallStatus,
|
|
53
57
|
): void;
|
|
54
58
|
ubrn_uniffi_zcam1_c2pa_utils_fn_constructor_manifesteditor_from_manifest(
|
|
@@ -97,11 +101,11 @@ interface NativeModuleInterface {
|
|
|
97
101
|
uniffi_out_err: UniffiRustCallStatus,
|
|
98
102
|
): number;
|
|
99
103
|
ubrn_uniffi_zcam1_c2pa_utils_fn_clone_manifeststore(
|
|
100
|
-
|
|
104
|
+
handle: bigint,
|
|
101
105
|
uniffi_out_err: UniffiRustCallStatus,
|
|
102
106
|
): bigint;
|
|
103
107
|
ubrn_uniffi_zcam1_c2pa_utils_fn_free_manifeststore(
|
|
104
|
-
|
|
108
|
+
handle: bigint,
|
|
105
109
|
uniffi_out_err: UniffiRustCallStatus,
|
|
106
110
|
): void;
|
|
107
111
|
ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifeststore_active_manifest(
|
|
@@ -236,17 +240,6 @@ interface NativeModuleInterface {
|
|
|
236
240
|
handle: bigint,
|
|
237
241
|
uniffi_out_err: UniffiRustCallStatus,
|
|
238
242
|
): number;
|
|
239
|
-
ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_pointer(
|
|
240
|
-
handle: bigint,
|
|
241
|
-
callback: UniffiRustFutureContinuationCallback,
|
|
242
|
-
callbackData: bigint,
|
|
243
|
-
): void;
|
|
244
|
-
ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_pointer(handle: bigint): void;
|
|
245
|
-
ubrn_ffi_zcam1_c2pa_utils_rust_future_free_pointer(handle: bigint): void;
|
|
246
|
-
ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_pointer(
|
|
247
|
-
handle: bigint,
|
|
248
|
-
uniffi_out_err: UniffiRustCallStatus,
|
|
249
|
-
): bigint;
|
|
250
243
|
ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_rust_buffer(
|
|
251
244
|
handle: bigint,
|
|
252
245
|
callback: UniffiRustFutureContinuationCallback,
|
|
@@ -290,15 +283,15 @@ interface NativeModuleInterface {
|
|
|
290
283
|
ubrn_uniffi_internal_fn_method_manifest_ffi__bless_pointer(
|
|
291
284
|
pointer: bigint,
|
|
292
285
|
uniffi_out_err: UniffiRustCallStatus,
|
|
293
|
-
):
|
|
286
|
+
): UniffiGcObject;
|
|
294
287
|
ubrn_uniffi_internal_fn_method_manifesteditor_ffi__bless_pointer(
|
|
295
288
|
pointer: bigint,
|
|
296
289
|
uniffi_out_err: UniffiRustCallStatus,
|
|
297
|
-
):
|
|
290
|
+
): UniffiGcObject;
|
|
298
291
|
ubrn_uniffi_internal_fn_method_manifeststore_ffi__bless_pointer(
|
|
299
292
|
pointer: bigint,
|
|
300
293
|
uniffi_out_err: UniffiRustCallStatus,
|
|
301
|
-
):
|
|
294
|
+
): UniffiGcObject;
|
|
302
295
|
}
|
|
303
296
|
|
|
304
297
|
// Casting globalThis to any allows us to look for `NativeZcam1C2paUtils`
|
|
@@ -311,114 +304,107 @@ export default getter;
|
|
|
311
304
|
|
|
312
305
|
// Structs and function types for calling back into Typescript from Rust.
|
|
313
306
|
export type UniffiRustFutureContinuationCallback = (data: bigint, pollResult: number) => void;
|
|
314
|
-
type
|
|
307
|
+
export type UniffiForeignFutureDroppedCallback = (handle: bigint) => void;
|
|
315
308
|
type UniffiCallbackInterfaceFree = (handle: bigint) => void;
|
|
316
|
-
|
|
309
|
+
type UniffiCallbackInterfaceClone = (handle: bigint) => UniffiResult<void>;
|
|
310
|
+
export type UniffiForeignFutureDroppedCallbackStruct = {
|
|
317
311
|
handle: bigint;
|
|
318
|
-
free:
|
|
312
|
+
free: UniffiForeignFutureDroppedCallback;
|
|
319
313
|
};
|
|
320
|
-
export type
|
|
314
|
+
export type UniffiForeignFutureResultU8 = {
|
|
321
315
|
returnValue: number;
|
|
322
316
|
callStatus: UniffiRustCallStatus;
|
|
323
317
|
};
|
|
324
318
|
export type UniffiForeignFutureCompleteU8 = (
|
|
325
319
|
callbackData: bigint,
|
|
326
|
-
result:
|
|
320
|
+
result: UniffiForeignFutureResultU8,
|
|
327
321
|
) => void;
|
|
328
|
-
export type
|
|
322
|
+
export type UniffiForeignFutureResultI8 = {
|
|
329
323
|
returnValue: number;
|
|
330
324
|
callStatus: UniffiRustCallStatus;
|
|
331
325
|
};
|
|
332
326
|
export type UniffiForeignFutureCompleteI8 = (
|
|
333
327
|
callbackData: bigint,
|
|
334
|
-
result:
|
|
328
|
+
result: UniffiForeignFutureResultI8,
|
|
335
329
|
) => void;
|
|
336
|
-
export type
|
|
330
|
+
export type UniffiForeignFutureResultU16 = {
|
|
337
331
|
returnValue: number;
|
|
338
332
|
callStatus: UniffiRustCallStatus;
|
|
339
333
|
};
|
|
340
334
|
export type UniffiForeignFutureCompleteU16 = (
|
|
341
335
|
callbackData: bigint,
|
|
342
|
-
result:
|
|
336
|
+
result: UniffiForeignFutureResultU16,
|
|
343
337
|
) => void;
|
|
344
|
-
export type
|
|
338
|
+
export type UniffiForeignFutureResultI16 = {
|
|
345
339
|
returnValue: number;
|
|
346
340
|
callStatus: UniffiRustCallStatus;
|
|
347
341
|
};
|
|
348
342
|
export type UniffiForeignFutureCompleteI16 = (
|
|
349
343
|
callbackData: bigint,
|
|
350
|
-
result:
|
|
344
|
+
result: UniffiForeignFutureResultI16,
|
|
351
345
|
) => void;
|
|
352
|
-
export type
|
|
346
|
+
export type UniffiForeignFutureResultU32 = {
|
|
353
347
|
returnValue: number;
|
|
354
348
|
callStatus: UniffiRustCallStatus;
|
|
355
349
|
};
|
|
356
350
|
export type UniffiForeignFutureCompleteU32 = (
|
|
357
351
|
callbackData: bigint,
|
|
358
|
-
result:
|
|
352
|
+
result: UniffiForeignFutureResultU32,
|
|
359
353
|
) => void;
|
|
360
|
-
export type
|
|
354
|
+
export type UniffiForeignFutureResultI32 = {
|
|
361
355
|
returnValue: number;
|
|
362
356
|
callStatus: UniffiRustCallStatus;
|
|
363
357
|
};
|
|
364
358
|
export type UniffiForeignFutureCompleteI32 = (
|
|
365
359
|
callbackData: bigint,
|
|
366
|
-
result:
|
|
360
|
+
result: UniffiForeignFutureResultI32,
|
|
367
361
|
) => void;
|
|
368
|
-
export type
|
|
362
|
+
export type UniffiForeignFutureResultU64 = {
|
|
369
363
|
returnValue: bigint;
|
|
370
364
|
callStatus: UniffiRustCallStatus;
|
|
371
365
|
};
|
|
372
366
|
export type UniffiForeignFutureCompleteU64 = (
|
|
373
367
|
callbackData: bigint,
|
|
374
|
-
result:
|
|
368
|
+
result: UniffiForeignFutureResultU64,
|
|
375
369
|
) => void;
|
|
376
|
-
export type
|
|
370
|
+
export type UniffiForeignFutureResultI64 = {
|
|
377
371
|
returnValue: bigint;
|
|
378
372
|
callStatus: UniffiRustCallStatus;
|
|
379
373
|
};
|
|
380
374
|
export type UniffiForeignFutureCompleteI64 = (
|
|
381
375
|
callbackData: bigint,
|
|
382
|
-
result:
|
|
376
|
+
result: UniffiForeignFutureResultI64,
|
|
383
377
|
) => void;
|
|
384
|
-
export type
|
|
378
|
+
export type UniffiForeignFutureResultF32 = {
|
|
385
379
|
returnValue: number;
|
|
386
380
|
callStatus: UniffiRustCallStatus;
|
|
387
381
|
};
|
|
388
382
|
export type UniffiForeignFutureCompleteF32 = (
|
|
389
383
|
callbackData: bigint,
|
|
390
|
-
result:
|
|
384
|
+
result: UniffiForeignFutureResultF32,
|
|
391
385
|
) => void;
|
|
392
|
-
export type
|
|
386
|
+
export type UniffiForeignFutureResultF64 = {
|
|
393
387
|
returnValue: number;
|
|
394
388
|
callStatus: UniffiRustCallStatus;
|
|
395
389
|
};
|
|
396
390
|
export type UniffiForeignFutureCompleteF64 = (
|
|
397
391
|
callbackData: bigint,
|
|
398
|
-
result:
|
|
399
|
-
) => void;
|
|
400
|
-
export type UniffiForeignFutureStructPointer = {
|
|
401
|
-
returnValue: bigint;
|
|
402
|
-
callStatus: UniffiRustCallStatus;
|
|
403
|
-
};
|
|
404
|
-
export type UniffiForeignFutureCompletePointer = (
|
|
405
|
-
callbackData: bigint,
|
|
406
|
-
result: UniffiForeignFutureStructPointer,
|
|
392
|
+
result: UniffiForeignFutureResultF64,
|
|
407
393
|
) => void;
|
|
408
|
-
export type
|
|
394
|
+
export type UniffiForeignFutureResultRustBuffer = {
|
|
409
395
|
returnValue: Uint8Array;
|
|
410
396
|
callStatus: UniffiRustCallStatus;
|
|
411
397
|
};
|
|
412
398
|
export type UniffiForeignFutureCompleteRustBuffer = (
|
|
413
399
|
callbackData: bigint,
|
|
414
|
-
result:
|
|
400
|
+
result: UniffiForeignFutureResultRustBuffer,
|
|
415
401
|
) => void;
|
|
416
|
-
export type
|
|
402
|
+
export type UniffiForeignFutureResultVoid = {
|
|
417
403
|
callStatus: UniffiRustCallStatus;
|
|
418
404
|
};
|
|
419
405
|
export type UniffiForeignFutureCompleteVoid = (
|
|
420
406
|
callbackData: bigint,
|
|
421
|
-
result:
|
|
407
|
+
result: UniffiForeignFutureResultVoid,
|
|
422
408
|
) => void;
|
|
423
409
|
|
|
424
410
|
// UniffiRustFutureContinuationCallback is generated as part of the component interface's
|