Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename loptos to loin #14

Merged
merged 2 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "loptos"
name = "loin"
version = "0.1.0"
authors = ["Martin Habovstiak <martin.habovstiak@gmail.com>"]
authors = ["Dan Gould <d@ngould.dev>", "Martin Habovstiak <martin.habovstiak@gmail.com>"]
edition = "2018"

[package.metadata.configure_me]
Expand Down
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Good luck analyzing that!

### UX implications

All this is possible without loptos by [manually exchanging PSBTs](https://github.com/lightningnetwork/lnd/blob/master/docs/psbt.md).
All this is possible without loin by [manually exchanging PSBTs](https://github.com/lightningnetwork/lnd/blob/master/docs/psbt.md).
BIP78 turns that tedious back and forth into scanning/clicking one link followed by confirmation in the wallet.
In other words, your grandmother will be able to somewhat privately open a bunch of channels for you, if she has a BIP78-capable wallet.

Expand All @@ -62,25 +62,28 @@ In other words, your grandmother will be able to somewhat privately open a bunch

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/loptos/static` in production.
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/loin/static` in production.
3. Setup reverse HTTP proxy with HTTPS forwarding to some port - e.g. 3000.
You can do this in a few lines using [selfhost in Cryptoanarchy Debian Repository](https://github.com/debian-cryptoanarchy/cryptoanarchy-deb-repo-builder/blob/master/docs/user-level.md#selfhost). or [on MacOS](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=loptos.conf`:
```configuration
# loptos.conf

bind_port=3000
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. `./target/debug/loptos --conf CONFIGURATION_FILE_PATH DEST_NODE_URI AMOUNS_IN_SATS [DEST_NODE_URI AMOUNS_IN_SATS ...] [CHAIN_WALLET_AMOUNT_SATS]`
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=loin.conf`:

```configuration
# loin.conf

bind_port=3000
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


Note: if `CHAIN_WALLET_AMOUNT_SATS` is present a single-sig 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 [can be automated](https://github.com/Kixunil/loptos/issues/11) in the future.
A minimum internal wallet balance of 10,000 reserve sats per channel up to 100,000 sats is required for anchor commitments. This [can be automated](https://github.com/Kixunil/loin/issues/11) in the future.

## License

The license is MIT, with one restriction and one warning:
Expand Down
4 changes: 2 additions & 2 deletions config_spec.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[general]
env_prefix = "LOPTOS"
env_prefix = "LOIN"
conf_file_param = "conf"
conf_dir_param = "conf_dir"
doc = """
Expand All @@ -11,7 +11,7 @@ This server optimizes your channel opening from a remote wallet which supports P
[[param]]
name = "bind_port"
type = "u16"
doc = "Loptos HTTP port to listen on"
doc = "Loin HTTP port to listen on"
optional = false

[[param]]
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern crate configure_me;
configure_me::include_config!();

#[cfg(not(feature = "test_paths"))]
const STATIC_DIR: &str = "/usr/share/loptos/static";
const STATIC_DIR: &str = "/usr/share/loin/static";

#[cfg(feature = "test_paths")]
const STATIC_DIR: &str = "static";
Expand Down
2 changes: 1 addition & 1 deletion static/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<head>
<title>Loptos</title>
<title>Loin</title>
<style>
.invisible {
display: none;
Expand Down