mirror of
https://github.com/block/buzz.git
synced 2026-10-29 05:21:31 +00:00
perf(mobile): sign iOS events with native secp256k1
Signed-off-by: Tom Brow <tomb@block.xyz>
This commit is contained in:
18
scripts/test-mobile-native-signing.sh
Executable file
18
scripts/test-mobile-native-signing.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
# Exercise the production C adapter from Dart on the macOS native CI runner.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
. ./bin/activate-hermit
|
||||
native_test_dir=$(mktemp -d)
|
||||
trap 'rm -rf "$native_test_dir"' EXIT
|
||||
source_dir=mobile/ios/BuzzPushKit/Sources/CSecp256k1
|
||||
clang -O2 -dynamiclib -DENABLE_MODULE_EXTRAKEYS -DENABLE_MODULE_SCHNORRSIG \
|
||||
-framework Security \
|
||||
"$source_dir/buzz_signer.c" \
|
||||
"$source_dir/vendor/src/secp256k1.c" \
|
||||
"$source_dir/vendor/src/precomputed_ecmult.c" \
|
||||
"$source_dir/vendor/src/precomputed_ecmult_gen.c" \
|
||||
-o "$native_test_dir/libbuzz_signer.dylib"
|
||||
cd mobile
|
||||
BUZZ_SIGNER_LIBRARY="$native_test_dir/libbuzz_signer.dylib" \
|
||||
flutter test test/shared/crypto/event_signer_test.dart
|
||||
Reference in New Issue
Block a user