@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.
- package/android/libs/arm64-v8a/libzkap_uniffi_bindings.so +0 -0
- package/android/libs/armeabi-v7a/libzkap_uniffi_bindings.so +0 -0
- package/android/libs/x86_64/libzkap_uniffi_bindings.so +0 -0
- package/android/src/main/java/uniffi/zkap_uniffi_bindings/zkap_uniffi_bindings.kt +5 -5
- package/ios/ZkapSdkModule.podspec +7 -6
- package/ios/ZkapSdkModule.swift +2 -0
- package/ios/ZkapZkp.xcframework/Info.plist +2 -2
- package/ios/ZkapZkp.xcframework/ios-arm64/libzkap_uniffi_bindings.a +0 -0
- package/ios/ZkapZkp.xcframework/ios-arm64_x86_64-simulator/{libzkap_uniffi_bindings_sim.a → libzkap_uniffi_bindings.a} +0 -0
- package/package.json +2 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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
|
|
1326
|
+
|
|
1327
|
+
val errorMessage: kotlin.String
|
|
1328
1328
|
) : ZkapException() {
|
|
1329
1329
|
override val message
|
|
1330
|
-
get() = "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
|
|
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
|
|
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 = '
|
|
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 = '
|
|
19
|
+
s.vendored_frameworks = 'ZkapZkp.xcframework'
|
|
20
20
|
|
|
21
|
-
# Expose C headers for the Rust FFI symbols
|
|
22
|
-
s.preserve_paths = '
|
|
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
|
package/ios/ZkapSdkModule.swift
CHANGED
|
@@ -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>
|
|
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>
|
|
31
|
+
<string>libzkap_uniffi_bindings.a</string>
|
|
32
32
|
<key>SupportedArchitectures</key>
|
|
33
33
|
<array>
|
|
34
34
|
<string>arm64</string>
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baerae/zkap-zkp-react-native",
|
|
3
|
-
"version": "0.1.
|
|
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",
|