Skip to content

Instantly share code, notes, and snippets.

@coreyphillips
coreyphillips / rn-bitcoinjs-lib-4.0.3_Setup.md
Last active May 30, 2019 18:52
How To Add bitcoinjs-lib Version 4.0.3 To A React Native Project

Newer version available. Please see 5.0.5

How To Add bitcoinjs-lib Version 4.0.3 To A React Native Project

Add/Link the following dependencies:

  • yarn add bitcoinjs-lib@4.0.3 react-native-randombytes buffer-reverse buffer@5
  • yarn add --dev rn-nodeify
  • react-native link react-native-randombytes
  • Add the following postinstall to your script in package.json: "postinstall": "rn-nodeify --install buffer,stream,assert,events,crypto,vm --hack && cd node_modules/bs58 && yarn add base-x@3.0.4 && cd ../../"