Prerequisites
For TypeScript:- Node.js installed (16 or later)
- React Native development environment set up
- iOS: Xcode and iOS Simulator (run
pod install
after installing dependencies) - Android: Android Studio and Android SDK
Installation
Initialize the Wallet
A wallet requires either a mnemonic or raw seed for initialization. The initialize()
function accepts both. If no input is given, it will auto-generate a mnemonic and return it. Persist it somewhere safe — losing it means losing access.
An account number can be optionally provided to generate multiple identity keys from the same mnemonicOrSeed
.
If no account number is provided, our JS-SDK defaults
accountNumber
to 1
to support backwards compatability for mainnet wallets created with earlier
versions of the SDK.Mnemonic Phrases
A mnemonic is a human-readable encoding of your wallet’s seed. It’s a 12- or 24-word phrase from the BIP-39 wordlist, used to derive the cryptographic keys that control your wallet.Raw Seed
A raw seed is the byte-level representation of your wallet’s entropy. It directly maps to the private keys that control your wallet.React Native Current Status
The React Native SDK is currently in beta with active development. We’re shipping improvements weekly.
- Uses polling for updates instead of real-time streams
- Some edge cases may have rough handling
React Native Examples
For complete React Native example applications, check out these working examples in the buildonspark/spark repository:- React Native Community CLI Example: Basic app created with the RN community CLI, demonstrating the currently required polyfills
- Expo Example: Expo-compatible implementation with managed workflow
Need Help?
- Check our FAQ
- Review the API Reference
- Follow our Testing Guide
- Check our Code Samples