@succinctlabs/react-native-zcam1 0.2.5 → 0.3.0

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 (42) hide show
  1. package/README.md +144 -10
  2. package/Zcam1Sdk.podspec +1 -4
  3. package/cpp/generated/zcam1_c2pa_utils.cpp +2910 -3365
  4. package/cpp/generated/zcam1_c2pa_utils.hpp +130 -352
  5. package/cpp/generated/zcam1_certs_utils.cpp +1266 -1064
  6. package/cpp/generated/zcam1_certs_utils.hpp +37 -57
  7. package/cpp/generated/zcam1_verify_utils.cpp +1307 -1120
  8. package/cpp/generated/zcam1_verify_utils.hpp +39 -64
  9. package/cpp/proving/generated/zcam1_proving_utils.cpp +2619 -2917
  10. package/cpp/proving/generated/zcam1_proving_utils.hpp +102 -260
  11. package/ios/Zcam1Camera.swift +140 -53
  12. package/ios/Zcam1CameraFilmStyle.swift +106 -0
  13. package/lib/module/camera.js +2 -11
  14. package/lib/module/camera.js.map +1 -1
  15. package/lib/module/capture.js +2 -2
  16. package/lib/module/capture.js.map +1 -1
  17. package/lib/module/common.js +1 -1
  18. package/lib/module/common.js.map +1 -1
  19. package/lib/module/index.js +1 -1
  20. package/lib/module/index.js.map +1 -1
  21. package/lib/module/picker.js +2 -1
  22. package/lib/module/picker.js.map +1 -1
  23. package/lib/module/proving/prove.js +4 -4
  24. package/lib/module/proving/prove.js.map +1 -1
  25. package/lib/module/utils.js +7 -0
  26. package/lib/module/utils.js.map +1 -1
  27. package/lib/typescript/src/camera.d.ts.map +1 -1
  28. package/lib/typescript/src/index.d.ts +1 -1
  29. package/lib/typescript/src/index.d.ts.map +1 -1
  30. package/lib/typescript/src/picker.d.ts.map +1 -1
  31. package/lib/typescript/src/proving/prove.d.ts +1 -1
  32. package/lib/typescript/src/proving/prove.d.ts.map +1 -1
  33. package/lib/typescript/src/utils.d.ts +4 -0
  34. package/lib/typescript/src/utils.d.ts.map +1 -1
  35. package/package.json +2 -2
  36. package/src/camera.tsx +2 -13
  37. package/src/capture.tsx +2 -2
  38. package/src/common.tsx +1 -1
  39. package/src/index.ts +1 -1
  40. package/src/picker.tsx +2 -1
  41. package/src/proving/prove.tsx +5 -5
  42. package/src/utils.ts +7 -0
@@ -1,72 +1,52 @@
1
- // This file was autogenerated by some hot garbage in the
2
- // `uniffi-bindgen-react-native` crate. Trust me, you don't want to mess with
3
- // it!
1
+ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
2
+ // Trust me, you don't want to mess with it!
4
3
  #pragma once
5
- #include "UniffiCallInvoker.h"
6
- #include <ReactCommon/CallInvoker.h>
7
- #include <iostream>
8
4
  #include <jsi/jsi.h>
5
+ #include <iostream>
9
6
  #include <map>
10
7
  #include <memory>
8
+ #include <ReactCommon/CallInvoker.h>
9
+ #include "UniffiCallInvoker.h"
11
10
 
12
11
  namespace react = facebook::react;
13
12
  namespace jsi = facebook::jsi;
14
13
 
15
14
  class NativeZcam1CertsUtils : public jsi::HostObject {
16
- private:
17
- // For calling back into JS from Rust.
18
- std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker;
15
+ private:
16
+ // For calling back into JS from Rust.
17
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker;
19
18
 
20
- protected:
21
- std::map<std::string, jsi::Value> props;
22
- jsi::Value cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(
23
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24
- size_t count);
25
- jsi::Value cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(
26
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
27
- size_t count);
28
- jsi::Value cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(
29
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
30
- size_t count);
31
- jsi::Value cpp_uniffi_zcam1_certs_utils_fn_func_build_self_signed_certificate(
32
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
33
- size_t count);
34
- jsi::Value
35
- cpp_uniffi_zcam1_certs_utils_checksum_func_build_self_signed_certificate(
36
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
37
- size_t count);
38
- jsi::Value cpp_ffi_zcam1_certs_utils_uniffi_contract_version(
39
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
40
- size_t count);
19
+ protected:
20
+ std::map<std::string,jsi::Value> props;
21
+ jsi::Value cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
22
+ jsi::Value cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
23
+ jsi::Value cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
24
+ jsi::Value cpp_uniffi_zcam1_certs_utils_fn_func_build_self_signed_certificate(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
25
+ jsi::Value cpp_uniffi_zcam1_certs_utils_checksum_func_build_self_signed_certificate(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
26
+ jsi::Value cpp_ffi_zcam1_certs_utils_uniffi_contract_version(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
41
27
 
42
- public:
43
- NativeZcam1CertsUtils(
44
- jsi::Runtime &rt,
45
- std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker);
46
- virtual ~NativeZcam1CertsUtils();
28
+ public:
29
+ NativeZcam1CertsUtils(jsi::Runtime &rt, std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker);
30
+ virtual ~NativeZcam1CertsUtils();
47
31
 
48
- /**
49
- * The entry point into the crate.
50
- *
51
- * React Native must call `NativeZcam1CertsUtils.registerModule(rt,
52
- * callInvoker)` before using the Javascript interface.
53
- */
54
- static void registerModule(jsi::Runtime &rt,
55
- std::shared_ptr<react::CallInvoker> callInvoker);
32
+ /**
33
+ * The entry point into the crate.
34
+ *
35
+ * React Native must call `NativeZcam1CertsUtils.registerModule(rt, callInvoker)` before using
36
+ * the Javascript interface.
37
+ */
38
+ static void registerModule(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> callInvoker);
56
39
 
57
- /**
58
- * Some cleanup into the crate goes here.
59
- *
60
- * Current implementation is empty, however, this is not guaranteed to always
61
- * be the case.
62
- *
63
- * Clients should call `NativeZcam1CertsUtils.unregisterModule(rt)` after
64
- * final use where possible.
65
- */
66
- static void unregisterModule(jsi::Runtime &rt);
40
+ /**
41
+ * Some cleanup into the crate goes here.
42
+ *
43
+ * Current implementation is empty, however, this is not guaranteed to always be the case.
44
+ *
45
+ * Clients should call `NativeZcam1CertsUtils.unregisterModule(rt)` after final use where possible.
46
+ */
47
+ static void unregisterModule(jsi::Runtime &rt);
67
48
 
68
- virtual jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &name);
69
- virtual void set(jsi::Runtime &rt, const jsi::PropNameID &name,
70
- const jsi::Value &value);
71
- virtual std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt);
49
+ virtual jsi::Value get(jsi::Runtime& rt, const jsi::PropNameID& name);
50
+ virtual void set(jsi::Runtime& rt,const jsi::PropNameID& name,const jsi::Value& value);
51
+ virtual std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& rt);
72
52
  };