- JavaScript 50.9%
- TypeScript 47.4%
- HTML 1.1%
- CSS 0.6%
| public | ||
| scripts | ||
| src | ||
| .gitignore | ||
| .watchmanconfig | ||
| app.json | ||
| babel.config.js | ||
| index.js | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| webpack.config.js | ||
| yarn.lock | ||
LitheumWallet
This project is a React Native frontend which uses React Native for Web to create a user experience that's unified across mobile and desktop (browser extension). We then will need a facade backend interface which communicates with the browser in our browser extension or communicates with our own WebView embedded in the React when we're on mobile. We also need to integrate all popular hardware wallets with this wallet.
Let's get started with just trying to create a basic React Native Hello World, which we can deploy as a browser extension. I see this as the most challenging and questionable part of this architecture, and I would like to see a proof of that working immediately.
Dev Environment
Setup
nvm install 20.18.0 && nvm use 20.18.0
npm uninstall -g expo-cli
npm i @expo/cli
yarn expo install expo-dev-client
yarn install
# yarn expo prebuild ##???? wtf is this
To upgrade expo:
npx expo install --fix
yarn expo start --clear
yarn expo start --dev-client --no-minify
yarn expo start --dev-client
Dev
start the development server:
yarn run web --clear
Make sure to press S to switch to Expo Go if needed. Click through any https error in the browser and click through to Expo Go.
React Native, like most javascript ecosystem frameworks is horrible so you may need to do:
sudo launchctl limit maxfiles 65536 200000
Build the web version:
yarn build:web
Extension Dev
Package it as a browser extension:
yarn build:extension
In Chrome:
- chrome://extensions/
- Enable "Developer mode"
- Click "Load unpacked"
- Select the extension directory that will be created after building
If you make changes to the service worker (serviceWorker.js) you need to refresh it in your Manage Extensions interface in Chrome!