01bcb742ae
Move native code from native/ to Expo-compatible layout with android/
and ios/ at package root. Add Android JNI bridge (OnLoad.cpp,
ExpoSalviumCryptoModule.java, ExpoSalviumCryptoPackage.java).
Prebuilt binaries now go in prebuilt/ instead of native/lib/.
Test fixes:
- wallet-sync: update stale DEFAULT_BATCH_SIZE assertion (10 -> 100)
- bulletproofs+: fix hashToPoint -> hashToPointMonero rename in test,
fix serializeProof to include V array matching parseProof format
- transaction-builder: expect 2 outputs for exact-amount tx (zero-change
output is always added for privacy)
22 lines
550 B
C++
22 lines
550 B
C++
/**
|
|
* OnLoad.cpp — Android JNI entry point
|
|
*
|
|
* Registers the JSI install function so Java can call it
|
|
* during React Native bridge initialization.
|
|
*/
|
|
|
|
#include <fbjni/fbjni.h>
|
|
#include <jsi/jsi.h>
|
|
#include <ReactCommon/CallInvokerHolder.h>
|
|
|
|
#include "SalviumCryptoModule.h"
|
|
|
|
extern "C" JNIEXPORT void JNICALL
|
|
Java_com_salvium_crypto_ExpoSalviumCryptoModule_nativeInstall(
|
|
JNIEnv *env, jobject thiz, jlong jsiRuntimePtr) {
|
|
auto *rt = reinterpret_cast<facebook::jsi::Runtime *>(jsiRuntimePtr);
|
|
if (rt) {
|
|
salvium::install(*rt);
|
|
}
|
|
}
|