How To Add bitcoinjs-lib To A React Native v0.60+ Project
Add/Link the following dependencies:
yarn add bitcoinjs-lib ecpair @bitcoinerlab/secp256k1 react-native-randombytes buffer readable-stream
yarn add --dev rn-nodeify
cd ios && pod install && cd ..
- Add the following postinstall to your script in package.json:
"postinstall": "rn-nodeify --install buffer,stream,assert,events,crypto,vm,process --hack"
Install any remaining dependencies and run postinstall.