@umbra-privacy/rn-zk-prover 0.1.2 → 1.0.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.
- package/MoproFfi.podspec +2 -2
- package/android/CMakeLists.txt +1 -1
- package/android/build.gradle +2 -2
- package/android/create-android-jnilibs-zip.sh +1 -1
- package/ios/create-ios-xcframework-zip.sh +17 -0
- package/lib/module/generated/mopro_umbra_2.js +1 -1
- package/package.json +11 -12
- package/src/generated/mopro_umbra_2.ts +1 -1
package/MoproFfi.podspec
CHANGED
|
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.source = { :git => "https://github.com/zkmopro/react-native-app.git", :tag => "#{s.version}" }
|
|
17
17
|
|
|
18
18
|
# Download xcframework from CloudFront
|
|
19
|
-
xcframework_url = "https://d1hi11upkav2nq.cloudfront.net/zk/MoproBindings.xcframework.zip"
|
|
19
|
+
xcframework_url = "https://d1hi11upkav2nq.cloudfront.net/zk/v1/MoproBindings.xcframework.zip"
|
|
20
20
|
s.prepare_command = <<-CMD
|
|
21
21
|
set -e
|
|
22
22
|
|
|
@@ -38,7 +38,7 @@ Pod::Spec.new do |s|
|
|
|
38
38
|
|
|
39
39
|
echo "▶︎ Downloading MoproBindings.xcframework…"
|
|
40
40
|
curl -L -o MoproBindings.xcframework.zip \
|
|
41
|
-
"https://d1hi11upkav2nq.cloudfront.net/zk/MoproBindings.xcframework.zip"
|
|
41
|
+
"https://d1hi11upkav2nq.cloudfront.net/zk/v1/MoproBindings.xcframework.zip"
|
|
42
42
|
|
|
43
43
|
echo "▶︎ Unzipping…"
|
|
44
44
|
unzip -o MoproBindings.xcframework.zip
|
package/android/CMakeLists.txt
CHANGED
|
@@ -19,12 +19,12 @@ get_filename_component(UNIFFI_BINDGEN_PATH "${UNIFFI_BINDGEN_PATH}" DIRECTORY)
|
|
|
19
19
|
include_directories(
|
|
20
20
|
../cpp
|
|
21
21
|
../cpp/generated
|
|
22
|
+
|
|
22
23
|
${UNIFFI_BINDGEN_PATH}/cpp/includes
|
|
23
24
|
)
|
|
24
25
|
|
|
25
26
|
add_library(mopro-ffi SHARED
|
|
26
27
|
../cpp/mopro-ffi.cpp
|
|
27
|
-
../cpp/generated/mopro_umbra_2.cpp
|
|
28
28
|
cpp-adapter.cpp
|
|
29
29
|
)
|
|
30
30
|
|
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by uniffi-bindgen-react-native
|
|
2
2
|
|
|
3
3
|
// Download prebuilt jniLibs from CloudFront
|
|
4
|
-
def androidJniLibsUrl = "https://d1hi11upkav2nq.cloudfront.net/zk/MoproBindings-android-jniLibs.zip"
|
|
4
|
+
def androidJniLibsUrl = "https://d1hi11upkav2nq.cloudfront.net/zk/v1/MoproBindings-android-jniLibs.zip"
|
|
5
5
|
def jniLibsDir = file("${projectDir}/src/main/jniLibs")
|
|
6
6
|
|
|
7
7
|
buildscript {
|
|
@@ -164,4 +164,4 @@ if (isNewArchitectureEnabled()) {
|
|
|
164
164
|
libraryName = "MoproFfi"
|
|
165
165
|
codegenJavaPackageName = "com.moproffi"
|
|
166
166
|
}
|
|
167
|
-
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# Create MoproBindings.xcframework.zip for upload to CloudFront.
|
|
3
|
+
# Run from anywhere: MoproReactNativeBindings/ios/create-ios-xcframework-zip.sh
|
|
4
|
+
# Output: MoproReactNativeBindings/ios/MoproBindings.xcframework.zip
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
IOS_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
8
|
+
ROOT_DIR="$(cd "$IOS_DIR/.." && pwd)"
|
|
9
|
+
ZIP_OUT="$IOS_DIR/MoproBindings.xcframework.zip"
|
|
10
|
+
STAGING="$IOS_DIR/_staging"
|
|
11
|
+
|
|
12
|
+
mkdir -p "$STAGING"
|
|
13
|
+
cp -R "$ROOT_DIR/MoproFfiFramework.xcframework" "$STAGING/MoproBindings.xcframework"
|
|
14
|
+
cd "$STAGING"
|
|
15
|
+
zip -r "$ZIP_OUT" MoproBindings.xcframework -x "*.DS_Store"
|
|
16
|
+
rm -rf "$STAGING"
|
|
17
|
+
echo "Created $ZIP_OUT"
|
|
@@ -521,7 +521,7 @@ const FfiConverterMapStringArrayString = new FfiConverterMap(FfiConverterString,
|
|
|
521
521
|
*/
|
|
522
522
|
function uniffiEnsureInitialized() {
|
|
523
523
|
// Get the bindings contract version from our ComponentInterface
|
|
524
|
-
const bindingsContractVersion =
|
|
524
|
+
const bindingsContractVersion = 29;
|
|
525
525
|
// Get the scaffolding contract version by calling the into the dylib
|
|
526
526
|
const scaffoldingContractVersion = nativeModule().ubrn_ffi_mopro_umbra_2_uniffi_contract_version();
|
|
527
527
|
if (bindingsContractVersion !== scaffoldingContractVersion) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbra-privacy/rn-zk-prover",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"description": "ZK Prover bindings for React Native for Umbra Privacy ZKs",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
7
7
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -33,16 +33,6 @@
|
|
|
33
33
|
"!**/.*",
|
|
34
34
|
"*.xcframework/**"
|
|
35
35
|
],
|
|
36
|
-
"scripts": {
|
|
37
|
-
"ubrn:ios": "ubrn build ios --and-generate --release && (cd example/ios && pod install)",
|
|
38
|
-
"ubrn:android": "ubrn build android --and-generate --release --targets aarch64-linux-android",
|
|
39
|
-
"test": "jest",
|
|
40
|
-
"typecheck": "tsc",
|
|
41
|
-
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
42
|
-
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
43
|
-
"prepare": "bob build",
|
|
44
|
-
"release": "release-it --only-version"
|
|
45
|
-
},
|
|
46
36
|
"keywords": [
|
|
47
37
|
"react-native",
|
|
48
38
|
"ios",
|
|
@@ -163,5 +153,14 @@
|
|
|
163
153
|
},
|
|
164
154
|
"dependencies": {
|
|
165
155
|
"uniffi-bindgen-react-native": "^0.29.3-1"
|
|
156
|
+
},
|
|
157
|
+
"scripts": {
|
|
158
|
+
"ubrn:ios": "ubrn build ios --and-generate --release && (cd example/ios && pod install)",
|
|
159
|
+
"ubrn:android": "ubrn build android --and-generate --release --targets aarch64-linux-android",
|
|
160
|
+
"test": "jest",
|
|
161
|
+
"typecheck": "tsc",
|
|
162
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
163
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
164
|
+
"release": "release-it --only-version"
|
|
166
165
|
}
|
|
167
|
-
}
|
|
166
|
+
}
|
|
@@ -791,7 +791,7 @@ const FfiConverterMapStringArrayString = new FfiConverterMap(FfiConverterString,
|
|
|
791
791
|
*/
|
|
792
792
|
function uniffiEnsureInitialized() {
|
|
793
793
|
// Get the bindings contract version from our ComponentInterface
|
|
794
|
-
const bindingsContractVersion =
|
|
794
|
+
const bindingsContractVersion = 29;
|
|
795
795
|
// Get the scaffolding contract version by calling the into the dylib
|
|
796
796
|
const scaffoldingContractVersion = nativeModule().ubrn_ffi_mopro_umbra_2_uniffi_contract_version();
|
|
797
797
|
if (bindingsContractVersion !== scaffoldingContractVersion) {
|