Skip to content

Instantly share code, notes, and snippets.

View techiejd's full-sized avatar

techiejd

View GitHub Profile
@techiejd
techiejd / bitcoinjs-lib-expo-setup.md
Last active October 24, 2024 03:09
How to add bitcoinjs-lib to an Expo project (and by extension react-native)

Add bitcoinjs-lib without ejecting from Expo.

  • That means, no using rn-nodeify nor running pod install.

I based the development process off of Solana's "Building Solana Mobile dApps with Expo", their codebase and this draftbit polyfills demo.

Let's get down to business:

  1. You want to modify metro.config.js to resolve any extraNodeModules, which are not default included in the react-native environment. It'll look something like this: