From 58e140a08aed6acda85a800f37b7515fdabb8ade Mon Sep 17 00:00:00 2001 From: nickfarrow Date: Wed, 2 Nov 2022 23:50:12 +1100 Subject: [PATCH] get users first, explain later --- README.md | 63 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 38985ad..a384bbd 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,38 @@ Nolooking leverages Pay-to-Endpoint ([BIP78](https://github.com/bitcoin/bips/blo Any unexpecected node version will likely cause permanent loss of funds. -For the love of god, do NOT use it on mainnet just yet! -If you don't want to wait long, help with reviews and PRs +## Usage + +Requires: +* Rust version 1.48 or higher to compile +* LND v14.2 or higher + +* **Only works with a LND 0.14** - do **not** attempt to bypass the check - guaranteed loss of funds! + + +Install: +1. Build and install the binary with +``` +cargo install --path . +``` +2. Setup a reverse HTTP proxy with HTTPS forwarding to some port - e.g. 3000. + You can do this in a few lines using [local-ssl-proxy](https://www.storyblok.com/faq/setup-dev-server-https-proxy). Or use NGINX. +3. Create a configuration file `nolooking.conf` containing: +``` +bind_port=3000 +endpoint="https://localhost:3010" +lnd_address="https://localhost:10009" +lnd_cert_path="/home/dan/.lnd/tls.cert" +lnd_macaroon_path="/home/dan/.lnd/data/chain/bitcoin/mainnet/admin.macaroon" +``` + - Lines starting with `lnd_` specify your connection to your bitcoin node. + + - You will be able to view the nolooking site on `bind_port` and the payjoin endpoint will be `endpoint` (e.g. can be a domain). + +4. Run with `nolooking --conf nolooking.conf` +5. Visit Nolooking on [127.0.0.1](http://127.0.0.1:3000) and queue some bitcoin channels. +6. Generate the QR code, pay it or share it! Once a payjoin transaction has enough confirmations, your new lightning channels will be established and you can move your sats over the lightning nework! + ## Expected fee savings @@ -52,35 +82,6 @@ In other words, your grandmother will be able to somewhat privately open a bunch * Invalid request can kill the whole server * `.unwraps()`s EVERYWHERE! -## Usage - -* **Only works with a LND 0.14** - do **not** attempt to bypass the check - guaranteed loss of funds! - -0. You need Rust version 1.48 or higher to compile this. -1. You need LND v14.2 or higher -2. `cargo build [--features=test_paths]`. The test_paths feature will serve the `static/index.html` ui contained in this folder rather than one in `/usr/share/nolooking/static` in production. -3. Setup a reverse HTTP proxy with HTTPS forwarding to some port - e.g. 3000. - You can do this in a few lines using [local-ssl-proxy](https://www.storyblok.com/faq/setup-dev-server-https-proxy). -4. create a configuration file based on `config_spec.toml`. This is mine based on a [polar](https://lightningpolar.com/) lightning network simulator setup. `CONFIGURATION_FILE=nolooking.conf`: - - ```configuration - # nolooking.conf - - bind_port=3000 - endpoint="https://localhost:3010" - lnd_address="https://localhost:10004" - lnd_cert_path="/Users/dan/.polar/networks/1/volumes/lnd/dave/tls.cert" - lnd_macaroon_path="/Users/dan/.polar/networks/1/volumes/lnd/dave/data/chain/bitcoin/regtest/admin.macaroon" - ``` - -5. `cargo run --features=test_paths -- --conf CONFIGURATION_FILE_PATH FEE_RATE DEST_NODE_URI AMOUNT_IN_SATS [DEST_NODE_URI AMOUNT_IN_SATS ...] [CHAIN_WALLET_AMOUNT_SATS]` -6. Copy BIP21 from command line output and paste it into one of the supported wallets. I use [the payjoin crate client](https://github.com/Kixunil/payjoin/tree/master/payjoin-client) to make a payjoin right from regtest bitcoind. -7. Confirm the transaction and move some sats over the new channel - - -If `CHAIN_WALLET_AMOUNT_SATS` is set, a single-signature output will be added to LND's internal wallet. -A minimum internal wallet balance of 10,000 reserve sats per channel up to 100,000 sats is required for anchor commitments. This [will be automated](https://github.com/Kixunil/loptos/issues/11) in the future. - ## License The license is MIT, with one restriction and one warning: