RIF Wallet App - Developer Reference Guide
The developer reference documentation is intended for developers looking to build and deploy a fully programmable wallet compatible with Bitcoin and Rootstock networks.
In this section, we will cover:
To run the RIF Wallet Application, you need to set up your development environment, follow the steps below to install the necessary components.
- Node (v16+). See the Nodejs documentation for instructions on how to setup your node environment.
- Install the dependecies using yarn. This will also run the postinstall script that shims the missing packages: yarn
- The postinstall script runs the
rn-nodeifypackage which adds packages that are native to the browser but not to react native.
- For iOS you need to run the additional installation steps:
cd iosand then
- Ruby (2.7.6+) To install Ruby, use the Ruby Version Manager.
- IOS Simulator
- Flipper (Optional) Flipper is a platform for debugging iOS, Android and React Native apps. You can install flipper for your OS by visiting the Flipper Website.
Note: Some of these deps have been bundled into a script for your convenience, please see the starter kit section (coming soon) for installation instructions or use the Sandbox environment (coming soon).
- React (v18)
- React Native (v0.70).
- See official instructions
- Use the 'React Native CLI Quickstart' tabs not the 'Expo' tabs.
- Follow the instructions explicitly as a small deviation can cause it to fail.
- Ethers (v5.4)
- Bitcoinjs-lib (v6.0)
- RIF Wallet Libs
Installation and Setup Instructions
If you would like to skip this step above, go ahead and follow the steps starting from clone the repos.
Clone the repos
To set up the RIF Wallet App, we need to clone the following repositories.
Installing the tools
Depending on your operating system, for Mac users, the easiest way to download and install Xcode is via the Mac App Store. For other platforms, the easiest way is to install the Android Studio Development Tool.
See the Troubleshooting section, for information on how to resolve some issues.
Ensure you have react (v18.0) and above already installed. To install react, use the command below or follow the instructions in the official react documentation to install react.
npm install -g create-react-app
We will need to install Node (16+), Yarn, Watchman, Ruby(2.7.6+), Cocoapods, Xcode (Via Mac App Store), and IOS Simulator.
See the React Native CLI Quickstart instructions, and follow the steps in the official documentation to install react native.
Android Studio Setup
For Android setup, you will need Node, the React Native command line interface, a JDK, and Android Studio.
See the Android Setup Instructions page.
Installing Android SDK 12 (S)
- To install this version, open Android Studio, click on the "Configure" button and select "SDK Manager".
- Select SDK Platforms and make sure that the following options are selected and installed.
3. Select SDK Tools and make sure that the 31.0.0 option is selected 4. Finally, click "Apply" to download and install the Android SDK and the related build tools.
The React Native tools require some environment variables to be set up in order to build apps with native code.
Add the following lines to your
$HOME/.bash_profile or $HOME/.bashrc (if you are using zsh then ~/.zprofile or ~/.zshrc) config file:
To install Emulator, see the guide in Create and manage virtual devices.
To install Ethers, follow these steps in the Ethersjs official documentation or use the command below.
npm install --save ethers
Deploying a wallet
To send a token out of the RIF Wallet, the user is required to deploy their wallet.
Note that initial deployment of the wallet is FREE for end users and has been subsidized by IOV Labs. The wallet cannot be redeployed after deployment. See section on deploying a wallet for how to deploy the RIF Wallet.