No description
Find a file
Pavol Rusnak c19cedb715
fix style
2021-07-27 22:01:50 +02:00
.gitignore add .gitignore 2021-06-07 17:24:42 +02:00
channel.py Added --client and --client-args options. Show opener 2021-06-09 13:10:52 +02:00
clnclient.py fix style 2021-07-27 22:01:50 +02:00
COPYING init 2021-05-31 17:12:01 +02:00
feepolicy.py refactor feepolicy into separate file 2021-06-09 22:54:23 +02:00
lndclient.py allow multiple client-args 2021-06-22 11:23:08 +01:00
poetry.lock add bos score 2021-07-01 17:38:44 +02:00
pyproject.toml add bos score 2021-07-01 17:38:44 +02:00
README.md add donate via amp 2021-06-28 23:47:31 +02:00
score.py use new ln-score 2021-07-02 00:36:55 +02:00
screenshot.png add screenshot 2021-06-01 00:12:01 +02:00
shell.nix reformat with black, introduce click 2021-05-31 17:32:32 +02:00
suez move code to suez.py, make suez only a wrapper 2021-06-05 16:29:03 +02:00
suez.py allow to set zero base_fee 2021-07-13 14:41:53 +02:00

Suez

Tool for pretty printing and optimizing Lightning Network channels.

screenshot

Installation

  1. Install poetry
  2. poetry install
  3. poetry run ./suez

Channel fee policy

You can set channel fees by passing --base-fee and --fee-rate parameters.

For example:

poetry run ./suez --base-fee 1000 --fee-rate 200

You can override the channel fee policy by changing the FeePolicy class.

Example implementation does the following:

  • sets lower fee rate for channels with mostly local balance
  • sets higher fee rate for channels with mostly remote balance
  • sets medium (close to specified) fee rate for balanced channels

You control the spread via the --fee-spread argument. By default --fee-spread is set to 0.0 (no spread).

For example:

poetry run ./suez --base-fee 1000 --fee-rate 500 --fee-spread 1.8

This will set the fee rate above 500 for channels with mostly remote balance and below 500 for channels with mostly local balance.

Lightning node support

Currently, Suez supports LND and c-lightning.

By default it uses LND (lncli).

You can use it with c-lightning as follows:

poetry run ./suez --client=c-lightning

If you need to pass additional options to the lncli/lightning-cli you can do so:

(single argument)

poetry run ./suez --client=c-lightning --client-args=--conf=/usr/local/etc/lightningd-bitcoin.conf

(multiple arguments)

poetry run ./suez --client-args=--rpcserver=host:10009 --client-args=--macaroonpath=admin.macaroon --client-args=--tlscertpath=tls.cert

Adding support requires writing a client similar to lndclient.py and instantiating it in suez.py.

Donate

You can tip me some satoshis via tippin.me/@pavolrusnak

or you can donate via Spontaneous AMP Payment (data field encodes tip=suez):

lncli sendpayment --amt 10000 --amp --dest 0385218f0e307b6a0e989d2a717d346942d96b4fd550e937de5f8ffe1568510a18 --data 7629168=7375657a

License

This software is licensed under the GNU General Public License v3.