Skip to content

kunsachdeva/React-Native-Blockchain-Skeleton

Repository files navigation

React Native Blockchain Skeleton 💀

Warning: Tested ✅ on react-native version 0.55.0 only

Warning: Storing MNEMONIC in 🔐 unecrypted format

Usage

  1. git clone https://github.com/kunsachdeva/React-Native-Blockchain-Skeleton.git
  2. npm install or yarn
  3. Replace constants in constants.js
  4. react-native run-android or react-native ios and react-native start

Explanation

We are using web3 version 0.20.5. Don't use version 1.x. The way web3 version 1.0 manages dependencies differs greatly from 0.20.x. Read more here https://web3js.readthedocs.io/en/1.0/ .

Blockchain apps need some libraries that are part of node.js but react-native does not have them, so we add node-libs-react-native as extra modules in rn-cli.config.js.

We are using truffle & infura network to connect to the blockchain and have a wallet. You have to input your MNEMONIC and may not be safe for production.