● Restructure native module for Expo auto-discovery, fix 3 test failures
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)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* SalviumCryptoModule.h — JSI HostObject for salvium-crypto
|
||||
*
|
||||
* Installs global.__SalviumCrypto with native crypto methods backed by
|
||||
* the Rust static library (libsalvium_crypto.a / .so) via extern "C" FFI.
|
||||
*/
|
||||
|
||||
#ifndef SALVIUM_CRYPTO_MODULE_H
|
||||
#define SALVIUM_CRYPTO_MODULE_H
|
||||
|
||||
#include <jsi/jsi.h>
|
||||
#include <string>
|
||||
|
||||
namespace salvium {
|
||||
|
||||
using namespace facebook;
|
||||
|
||||
class SalviumCryptoHostObject : public jsi::HostObject {
|
||||
public:
|
||||
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &name) override;
|
||||
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt) override;
|
||||
};
|
||||
|
||||
/**
|
||||
* Install global.__SalviumCrypto on the given JSI runtime.
|
||||
* Call this from your TurboModule's install() or from AppDelegate.
|
||||
*/
|
||||
void install(jsi::Runtime &rt);
|
||||
|
||||
} // namespace salvium
|
||||
|
||||
#endif /* SALVIUM_CRYPTO_MODULE_H */
|
||||
Reference in New Issue
Block a user