Here's a revised version of the README.md with improved clarity, formatting, and readability:
A super-early version of a web client for the Mostro P2P system.
This project provides a web interface for peer-to-peer Bitcoin trading over the Lightning Network ⚡️, leveraging nostr 🦩. The Lightning Network is a layer 2 solution for Bitcoin that enables fast and low-cost transactions.
- Node.js: Recommended version:
v20.15.1
- NPM: Recommended version:
10.7.0
git clone git@github.com:MostroP2P/mostro-web.git
npm install
-
Create a new
.env
file by copying the sample file:cp .env-sample .env
-
Set the following environment variables:
- RELAYS: A comma-separated list of relay URLs. Example:
RELAYS=wss://relay.mostro.network,wss://relay.nostr.net
- MOSTRO_PUB_KEY: The public key of the Mostro daemon to interact with. This should match the private key (nsec) used in Mostro. Example:
MOSTRO_PUB_KEY=npub19m9laul6k463czdacwx5ta4ap43nlf3lr0p99mqugnz8mdz7wtvskkm5wg
Read how to get a Mostro Pub Key at the Mostro daemon repository.
- RELAYS: A comma-separated list of relay URLs. Example:
-
Load the environment variables:
source .env
Note: It’s also possible (and sometimes preferable) to run a private relay. Instructions for doing this using Docker are available in the Mostro documentation.
npm run dev
- ✅ Post buy and sell orders.
- ✅ View order lists.
- ✅ Decode direct messages (DMs) from Mostro.
- ✅ Buy flow:
- Maker/market rate
- Maker/fixed price
- Taker/market rate
- Taker/fixed price
- ✅ Sell flow:
- Maker/market rate
- Maker/fixed price
- Taker/market rate
- Taker/fixed price
- ✅ Handle multiple relays.
- ✅ Key management using NIP-07.
- ✅ Persist old events.
- ✅ Direct messaging with peers.
- ✅ Dispute management.
- 🔲 NIP-59 support (Coming soon!)
This is a Nuxt 3 project, which includes the following scripts for development, production builds, and static site generation:
- Run in development mode (hot reload):
npm run dev
- Build for production:
npm run build
- Start the production server:
npm run start
- Generate a static release:
npm run generate
Tip: Run
npm run build
at least once before starting development withnpm run dev
.
This project is licensed under the MIT License 📜. For more information, see the LICENSE file.