mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-23 08:44:23 +01:00
1d6aa3a328c3bf65f8f9499088fe0fecf51a85e9
lspd simple server
lspd is a simple deamon that provides LSP services to Breez clients.
This is a simple example of an lspd that works with an lnd node.
Installation
- git clone https://github.com/breez/lspd (or fork)
- Modify the code in server.go if you use different values than the recommeded values when opening channels:
- ChannelCapacity: channel capacity is sats, defined in the channelAmount const (recommended: 1000000).
- TargetConf: the number of blocks that the funding transaction should confirm in, will be used for fee estimation (recommended: 0).
- MinHtlcMsat: the channel_reserve value in sats (recommended: 1000000).
- BaseFeeMsat: base tx fee in msats (recommended: 1000).
- FeeRate: fee rate (recommended: 0.000001). The total fee charged is BaseFeeMsat + (amount * FeeRate / 1000000)
- TimeLockDelta: the minimum number of blocks this node requires to be added to the expiry of HTLCs (recommended: 144).
- Compile lspd using
go build . - Create a random token (for instance using the command
openssl rand -base64 48) - Define the environment variables as described in sample.env:
- Run lspd
- Share with Breez the TOKEN and the LISTEN_ADDRESS you've defined (send to contact@breez.technology)
Implement your own lspd
You can create your own lsdp by implementing the grpc methods described here.
Use a smaller channel reserve
You can apply the PR from https://github.com/lightningnetwork/lnd/pull/2708 to be able to create channels with a channel reserve smaller than 1% of the channel capacity.
Then add the field RemoteChanReserveSat in the lnrpc.OpenChannelRequest struct when opening a channel.
Languages
Go
97.5%
Shell
2.4%
Makefile
0.1%