https://github.com/mutinywallet/mutiny-web-poc
Mutiny node frontend proof of concept
https://github.com/mutinywallet/mutiny-web-poc
Last synced: about 1 year ago
JSON representation
Mutiny node frontend proof of concept
- Host: GitHub
- URL: https://github.com/mutinywallet/mutiny-web-poc
- Owner: MutinyWallet
- License: mit
- Archived: true
- Created: 2023-02-10T19:19:44.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-04-17T21:55:22.000Z (about 3 years ago)
- Last Synced: 2025-03-15T18:25:45.539Z (over 1 year ago)
- Language: TypeScript
- Size: 974 KB
- Stars: 6
- Watchers: 3
- Forks: 3
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mutiny-web (proof of concept)
The first version of the mutiny web concept, built during the bolt.fun hackathon.
The node logic is built in rust and located [here](https://github.com/MutinyWallet/mutiny-node) and the typescript bindings for that is located [here](https://www.npmjs.com/package/@mutinywallet/mutiny-wasm).
## Development
### Dependencies
- [node](https://nodejs.org/en/)
- [just](https://github.com/casey/just)
- [mkcert](https://github.com/FiloSottile/mkcert)
### Build
Get all the dependencies above first.
```
cd frontend
npm i
npm start
```
### Local
anager
To make local development easier with a latest local version of the node manager, you may want to `npm link` it.
In your `mutiny-node` local repo:
```
just link
```
Now in this repo, link them.
```
just local
```
To revert back and use the remote version of mutiny-wasm:
```
just remote
```
## With SSL
Since we plan to use web workers and other SSL-required things, we can also do SSL in localhost to make testing a little less gotch-ey.
First generate the local cert (requires `mkcert` command):
```
just cert
```
Then start react with SSL flags:
```
npm run start-ssl
```
### PWA
To test out PWA stuff you need to `build` and then run the built artifact:
```
npm run build
```
(if you don't have a server installed: `npm install -g serve`)
Then serve the build folder:
```
serve -s build
```
They recommend running this in an incognito window because caching can be annoying with this stuff. Works for me in Chrome to install Mutiny as a desktop app.
### Bitcoin networks
You'll need a regtest bitcoin node, electrs, and an exposed port to whatever regtest node you are connecting to.
#### For Testnet / Mainnet mutiny
Mutiny defaults to regtest, but the network can be set by environment variable (it's set to "bitcoin" in the production deployment).
Create a `.env.local` file in the frontend dir and add this:
```
REACT_APP_NETWORK="testnet"
```
Or
```
REACT_APP_NETWORK="bitcoin"
```
Then restart your dev server.
#### For [electrs](https://github.com/Blockstream/electrs)
First build it, then run this script for regtest, replacing paths and passwords where necessary. YMMV. One special note is that this is for cookie password based auth.
```
/path/to/target/release/electrs -vvvv --daemon-dir /path/to/.bitcoin/regtest/data/ --timestamp --blocks-dir /path/to/.bitcoin/regtest/data/regtest/blocks/ --cookie="bitcoinrpc:{cookiebasedpassword}" --db-dir /path/to/.electrs/ --network regtest --http-addr 0.0.0.0:3003
```