@baerae/zkap-zkp-react-native 0.1.2 → 0.1.3

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.
@@ -1323,11 +1323,11 @@ public object FfiConverterTypeZkapSecret: FfiConverterRustBuffer<ZkapSecret> {
1323
1323
  sealed class ZkapException: kotlin.Exception() {
1324
1324
 
1325
1325
  class ApplicationException(
1326
-
1327
- val `message`: kotlin.String
1326
+
1327
+ val errorMessage: kotlin.String
1328
1328
  ) : ZkapException() {
1329
1329
  override val message
1330
- get() = "message=${ `message` }"
1330
+ get() = "message=${ errorMessage }"
1331
1331
  }
1332
1332
 
1333
1333
 
@@ -1361,7 +1361,7 @@ public object FfiConverterTypeZkapError : FfiConverterRustBuffer<ZkapException>
1361
1361
  is ZkapException.ApplicationException -> (
1362
1362
  // Add the size for the Int that specifies the variant plus the size needed for all fields
1363
1363
  4UL
1364
- + FfiConverterString.allocationSize(value.`message`)
1364
+ + FfiConverterString.allocationSize(value.errorMessage)
1365
1365
  )
1366
1366
  }
1367
1367
  }
@@ -1370,7 +1370,7 @@ public object FfiConverterTypeZkapError : FfiConverterRustBuffer<ZkapException>
1370
1370
  when(value) {
1371
1371
  is ZkapException.ApplicationException -> {
1372
1372
  buf.putInt(1)
1373
- FfiConverterString.write(value.`message`, buf)
1373
+ FfiConverterString.write(value.errorMessage, buf)
1374
1374
  Unit
1375
1375
  }
1376
1376
  }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ }
@@ -13,15 +13,14 @@ Pod::Spec.new do |s|
13
13
  s.swift_version = '5.9'
14
14
  s.source = { git: package['repository']['url'] }
15
15
 
16
- s.source_files = 'ios/**/*.{swift,h,m}'
16
+ s.source_files = ['ZkapSdkModule.swift', 'uniffi/**/*.{swift,h,m}']
17
17
 
18
18
  # Pre-built Rust static libraries (generated by CI build-react-native.yml)
19
- s.vendored_frameworks = 'ios/ZkapZkp.xcframework'
19
+ s.vendored_frameworks = 'ZkapZkp.xcframework'
20
20
 
21
- # Expose C headers for the Rust FFI symbols
22
- s.preserve_paths = 'ios/include/*.h'
21
+ # Expose C headers for the Rust FFI symbols (UniFFI-generated module)
22
+ s.preserve_paths = 'uniffi/*.h'
23
23
  s.xcconfig = {
24
- 'HEADER_SEARCH_PATHS' => '$(PODS_TARGET_SRCROOT)/ios/include',
25
24
  'OTHER_LDFLAGS' => '-lc++'
26
25
  }
27
26
 
@@ -29,6 +28,8 @@ Pod::Spec.new do |s|
29
28
 
30
29
  s.pod_target_xcconfig = {
31
30
  'DEFINES_MODULE' => 'YES',
32
- 'SWIFT_COMPILATION_MODE' => 'wholemodule'
31
+ 'SWIFT_COMPILATION_MODE' => 'wholemodule',
32
+ 'HEADER_SEARCH_PATHS' => '$(PODS_TARGET_SRCROOT)/uniffi',
33
+ 'OTHER_CFLAGS' => '-fmodule-map-file=$(PODS_TARGET_SRCROOT)/uniffi/zkap_uniffi_bindingsFFI.modulemap'
33
34
  }
34
35
  end
@@ -119,6 +119,7 @@ public class ZkapSdkModule: Module {
119
119
  let outData = try JSONSerialization.data(withJSONObject: output)
120
120
  return String(data: outData, encoding: .utf8)!
121
121
  }
122
+
122
123
  }
123
124
  }
124
125
 
@@ -143,3 +144,4 @@ private func parseConfig(_ d: [String: Any]) -> ZkapCircuitConfig {
143
144
  forbiddenString: d["forbidden_string"] as! String
144
145
  )
145
146
  }
147
+
@@ -22,13 +22,13 @@
22
22
  </dict>
23
23
  <dict>
24
24
  <key>BinaryPath</key>
25
- <string>libzkap_uniffi_bindings_sim.a</string>
25
+ <string>libzkap_uniffi_bindings.a</string>
26
26
  <key>HeadersPath</key>
27
27
  <string>Headers</string>
28
28
  <key>LibraryIdentifier</key>
29
29
  <string>ios-arm64_x86_64-simulator</string>
30
30
  <key>LibraryPath</key>
31
- <string>libzkap_uniffi_bindings_sim.a</string>
31
+ <string>libzkap_uniffi_bindings.a</string>
32
32
  <key>SupportedArchitectures</key>
33
33
  <array>
34
34
  <string>arm64</string>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baerae/zkap-zkp-react-native",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "React Native SDK for zkap-zkp — on-device ZK proving with Groth16 (BN254) and Poseidon hash. Requires Expo New Architecture.",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -40,6 +40,7 @@
40
40
  },
41
41
  "homepage": "https://github.com/baerae-zkap/zkap-zkp",
42
42
  "bugs": "https://github.com/baerae-zkap/zkap-zkp/issues",
43
+ "author": "baerae-zkap",
43
44
  "license": "MIT OR Apache-2.0",
44
45
  "peerDependencies": {
45
46
  "expo": ">=50.0.0",