react-native-beldex-core
v1.0.7
Published
Native bindings for Beldex
Downloads
9
Readme
react-native-beldex-core
This library packages the beldex-core-cpp library for use on React Native.
It exposes a single method, callBeldex
, which accepts and returns JSON strings for now:
import { callBeldex } from 'react-native-beldex-core'
const jsonResult = await callBeldex('is_subaddress', JSON.stringify(args))
const result = JSON.parse(jsonResult)
In a future version, we would like to provide a nicer Javascript API to this library.
External source code
This library relies on a large amount of native C++ code from other repos. To integrate this code, you must run the following script before publishing this library to NPM:
npm run update-sources
This script does the following tasks:
- Download third-party source code.
- Set up the Android build system:
- Determine which C++ headers are actually necessary.
- Copy the necessary sources into
android/src/main/cpp
. - Assemble
CMakeLists.txt
.
- Compile an iOS universal static library.
The update-sources
script is also the place to make edits when upgrading any of the third-party dependencies. The react-native-beldex-core repo doesn't include these third-party C++ sources, since they are enormous.