Commit Graph

86 Commits

Author SHA1 Message Date
Jesse de Wit
5cfcd41f32 bytes.Equal instead of compare 2022-11-17 17:13:09 +01:00
Jesse de Wit
3d6d5bfb9d Pull out generic interception logic 2022-11-17 17:13:09 +01:00
Jesse de Wit
c738f817ac Move main method to seperate file 2022-11-17 15:38:33 +01:00
Jesse de Wit
d6b30f1397 Move getChannel to LightningClient 2022-11-17 15:36:18 +01:00
Jesse de Wit
ecfb878860 Move isConnected to LightningClient 2022-11-17 15:36:17 +01:00
Jesse de Wit
8b5f5f80b7 Make openChannel use LightningClient 2022-11-17 15:36:17 +01:00
Jesse de Wit
126754281e Start and stop methods for the server 2022-11-17 15:36:17 +01:00
Jesse de Wit
465faf8f2c use LndClient 2022-11-17 15:36:17 +01:00
Jesse de Wit
b254f4d985 add LndClient implementation 2022-11-17 15:36:17 +01:00
Jesse de Wit
6f292003f9 add LightningClient interface 2022-11-17 15:36:07 +01:00
Yaacov Akiba Slama
02ceb92286 Fix insertChannel in the ON CONFLICT arm 2022-10-03 11:10:38 +03:00
Yaacov Akiba Slama
80032bed08 Fix logging in insertChannel 2022-10-03 11:09:49 +03:00
Yaacov Akiba Slama
4e7c6d9aff Use Anchors commitment transaction when opening a channel 2022-10-03 11:08:57 +03:00
Yaacov Akiba Slama
ce08436d24 Use new zeroconf mechanism from lnd 15.1 2022-09-22 21:17:06 +03:00
Yaacov Akiba Slama
7ceb5bf988 Add some logging in insertChannel 2022-09-21 12:18:37 +03:00
Yaacov Akiba Slama
3a4892ce8a Add data migrations 2022-09-19 22:32:19 +03:00
Yaacov Akiba Slama
6594e3de27 Convert between int64 (in postgresql) and uint64 (short channel id) 2022-09-19 20:47:21 +03:00
Yaacov Akiba Slama
e16541c77d Use initial_chanid and confirmed_chanid to handle zerconf channels 2022-09-19 17:39:09 +03:00
Yaacov Akiba Slama
1d6e5ca99f Update lnd to 15.1 2022-09-18 21:34:59 +03:00
Yaacov Akiba Slama
89212aa5ae Update lnd (and corresponding btcd) 2022-07-17 18:05:58 +03:00
Yaacov Akiba Slama
aaeeac3008 Merge pull request #6 from nayuta-ueno/err-handle
Error handle
2022-06-27 18:38:48 +03:00
ueno
5457b04a1c interceptor fail 2022-06-26 00:12:50 +09:00
ueno
bed7551652 go.mod: tidy 2022-06-26 00:10:36 +09:00
Yaacov Akiba Slama
5941d9b0ef Recover from lnd failure 2022-05-16 12:48:14 +03:00
Yaacov Akiba Slama
ad0595f3f9 Log the amount and the privacy flag of the channel 2022-04-29 08:04:49 +03:00
Yaacov Akiba Slama
91d8730097 Add MIT License 2022-03-04 07:57:53 +02:00
Yaacov Akiba Slama
ad0da518ed Retrieve the channel amount and the channel privacy from the environment 2022-02-28 22:21:49 +02:00
Yaacov Akiba Slama
7291d535ee Add the ability to handle client with zero channel reserve 2021-07-12 11:13:47 +03:00
Yaacov Akiba Slama
fda001f80a Increase the fees to 0.4% and set min fees to 2000 sats 2021-07-11 13:56:19 +03:00
Yaacov Akiba Slama
b86a77ab69 Add channel creation minimum fees 2021-06-16 18:33:01 +03:00
Yaacov Akiba Slama
193e3639d9 Disable email sending when channel mismatch 2021-05-30 12:19:43 +03:00
Yaacov Akiba Slama
ad31aa8921 Synchronize channels to DB after each block and check channels from DB 2021-05-25 12:52:00 +03:00
Yaacov Akiba Slama
133c87ec27 Don't fail when adding twice the same payment_hash 2021-05-09 21:07:23 +03:00
Yaacov Akiba Slama
ee75d838a1 Add field last_update to channels 2021-04-05 18:31:02 +03:00
Yaacov Akiba Slama
8ca6ca87fd Synchronize private channels from lnd to the channels table every hour 2021-03-19 13:47:36 +02:00
Yaacov Akiba Slama
76f51e2ba7 Ensure that private and public channels have different capacity 2021-03-16 10:55:35 +02:00
Yaacov Akiba Slama
78b9f2fdc4 Use an unique amount 2021-03-15 20:06:55 +02:00
Yaacov Akiba Slama
36001958e2 Use a target of 6 blocks when opening a public channel 2021-03-14 16:05:03 +02:00
Yaacov Akiba Slama
ab2be36642 Change OpenChannel endpoint to open public channels 2021-03-11 17:04:15 +02:00
Yaacov Akiba Slama
d532a78143 Add new field maxInactiveDuration 2021-02-21 17:19:02 +02:00
Yaacov Akiba Slama
ece77f65e1 Downgrade google.golang.org/grpc to 1.29.1 2021-02-11 17:13:15 +02:00
Yaacov Akiba Slama
f3a66cc6fb Fix typo in the field name 2021-02-05 10:10:10 +02:00
Yaacov Akiba Slama
aca8c4f2c0 Add forwarding history sync from lnd to db 2021-02-05 07:11:53 +02:00
Yaacov Akiba Slama
22b2b365ed Returns the short channel id if the channel is already confirmed 2021-01-03 18:51:16 +02:00
Yaacov Akiba Slama
97fdf045e4 Initialize the the map before using it 2020-12-30 17:00:08 +02:00
Yaacov Akiba Slama
ea54442821 Fix typo in logging 2020-12-29 16:32:21 +02:00
Yaacov Akiba Slama
11dc17ae2d Add checkChannels grpc function 2020-12-24 18:01:57 +02:00
Yaacov Akiba Slama
aa0db5402c Add dynamic channel creation documentation 2020-11-16 12:14:37 +02:00
Yaacov Akiba Slama
f407ec9e9c Handle interception probing payments
probing payments uses a probing payment hash which is:
sha256("probing-01:" || payment_hash).

When the interceptor detects such a hash for a payment which is supposed
to trigger a channel creation , it checks if the destination is online,
and if online, fails with INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS error in
order to let the payer knows that the payment would be successful.
2020-11-08 17:46:26 +02:00
Yaacov Akiba Slama
faff8f60a9 Fix migration file name 2020-11-08 17:34:09 +02:00