ThomasV
41f22df26b
submarine swaps: use num_sats_can_receive_no_mpp, to prevent funds being locked
2021-03-26 16:27:32 +01:00
ThomasV
0c93394513
rename lnworker._pay to pay_invoice, call it directly from GUIs
2021-02-07 12:09:37 +01:00
SomberNight
337d4890a1
lnworker/swaps: add '_sat' suffix to arg names and force kwargs
2021-02-01 22:11:56 +01:00
SomberNight
3d1796ab1d
follow-up prev: fix units when calling lnworker.create_invoice: msat/sat
...
follow-up e477a43385
2021-02-01 22:08:09 +01:00
bitromortac
64ecf8539a
swaps: fix normal amount formulas
...
In a normal (forward) swap (onchain->offchain):
send_amount = receive_amount * (1 + service_percentage) + normal_fee ,
and vice versa:
receive_amount = (send_amount + normal_fee) / (1 + service_percentage) ,
i.e., the service fee is charged on the received offchain amount.
2020-12-17 07:25:54 +01:00
SomberNight
89bd520185
bitcoin: move construct_witness from transaction.py to bitcoin.py
2020-10-24 05:18:16 +02:00
ThomasV
edc593a886
submarine swap: add comment to explain witness script asymmetry
2020-10-22 17:24:44 +02:00
SomberNight
08f70420e3
submarine_swaps: describe event-flow for both swap direction in docstr
...
So that I don't have to figure out every time.
2020-10-22 17:22:35 +02:00
SomberNight
1d187d36f0
(fix) allow opening LN wallet with --offline
2020-10-15 14:20:51 +02:00
ThomasV
5f7d8cc462
reverse swap: check that received amount is higher than dust threshold
2020-09-03 16:40:11 +02:00
ThomasV
e9829563d3
forward swaps: save the onchain amount we actually paid
2020-06-26 11:42:55 +02:00
ThomasV
abac4a4340
swaps: check_invoice_amount ( fixes #6217 )
2020-06-26 09:19:40 +02:00
ThomasV
599797c966
swaps: update server URL
2020-06-22 12:15:31 +02:00
ThomasV
4bda882695
Group swap transactions in Qt history ( fixes #6237 )
...
- use tree structure of QTreeView
- grouped items have a 'group_id' field
- rename 'Normal' swap as 'Forward'
2020-06-22 11:26:49 +02:00
SomberNight
9385d2dae3
submarine_swaps: minor clean-up (preimage/locktime)
2020-06-21 08:36:40 +02:00
ThomasV
a03d8dc6ac
swaps: add testnet url
2020-06-19 14:17:42 +02:00
ThomasV
4344ca47b3
swaps: create invoice without saving the request
2020-06-19 10:31:18 +02:00
SomberNight
fcbc1c9a45
submarine_swaps: increase min locktime delta for reverse swap to 60
...
10 blocks is not enough to get a tx confirmed without worrying...
2020-06-18 22:25:38 +02:00
SomberNight
c2ffc6ca3a
qt swap_dialog: "max" now takes into account the server-provided value
2020-06-18 21:52:48 +02:00
ThomasV
a033cfeee8
submarine swaps: fee_invoice is now a hold invoice
2020-06-18 21:39:30 +02:00
SomberNight
7570c8c1c6
qt swap_dialog: "max" button now respects max htlc value
2020-06-18 21:03:49 +02:00
SomberNight
a74552f3dd
qt main_window: fix threading for run_coroutine_from_thread
2020-06-18 20:43:34 +02:00
SomberNight
2be2a510ff
submarine_swaps: replace asserts with Exceptions
2020-06-18 19:45:07 +02:00
SomberNight
1849206394
submarine_swaps: small clean-up
2020-06-18 18:18:33 +02:00
SomberNight
5f2d347d81
submarine_swaps: wallet.get_unused_address -> get_receiving_address
2020-06-18 17:11:14 +02:00
ThomasV
a1e8f9e2aa
swaps: mapping of prepay_hash to payment_hash
2020-06-18 14:28:40 +02:00
ThomasV
c8506eaa39
swaps: store fee_preimage
2020-06-18 14:28:40 +02:00
ThomasV
540dd73f3b
Submarine swaps:
...
- improve gui
- allow coin selection
- allow spending 'max'
2020-06-18 14:28:40 +02:00
ThomasV
ee59ad13c4
support new protocol (minerFeeInvoice)
2020-06-18 14:28:40 +02:00
ThomasV
5fa09970b6
swaps: move fee logic to swap_manager, fix command line
2020-06-18 14:28:40 +02:00
ThomasV
3874f7ec77
swaps: use StoredObject to store data
2020-06-18 14:28:40 +02:00
ThomasV
a73f24e826
swaps: perform 10 payment attempts
2020-06-18 14:28:40 +02:00
ThomasV
04fb329c2e
swaps: stop watching address once utxo is spent and mined
2020-06-18 14:28:40 +02:00
ThomasV
7ec7dd07d0
swaps: disable rbf
2020-06-18 14:28:40 +02:00
ThomasV
f8dd62aec0
show swaps as single line in history
...
main_window.run_coroutine_from_thread
2020-06-18 14:28:40 +02:00
ThomasV
46770bfd71
submarine swaps: fix expected amounts
2020-06-18 14:28:40 +02:00
ThomasV
17485e3b88
follow-up prev commit
2020-06-18 14:28:40 +02:00
ThomasV
000e56d67e
submarine swaps: verify amounts
2020-06-18 14:28:40 +02:00
ThomasV
6b36c59ab0
submarine_swaps: add fee slider, improve gui
2020-06-18 14:28:40 +02:00
ThomasV
ac3ec19d2d
submarine_swaps: simplification
2020-06-18 14:28:40 +02:00
ThomasV
96b4f0e26e
submarine swaps: new API url
2020-06-18 14:28:40 +02:00
ThomasV
17ff6ffa08
submarine_swaps: add SwapManager
2020-06-18 14:28:40 +02:00
ThomasV
b26ad81e69
sub swaps:
...
- fix invoice expiration
- use p2wsh
2020-06-18 14:28:40 +02:00
ThomasV
7d2979d776
submarine swaps: add normal swaps to GUI, various minor fixes
2020-06-18 14:28:40 +02:00
ThomasV
eb9f6ce293
submarine swaps: fix refund tx (p2wsh-in-p2sh, locktime)
2020-06-18 14:28:40 +02:00
ThomasV
1b1c7d1f9e
submarine swaps: create refund transaction
2020-06-18 14:28:40 +02:00
ThomasV
756dd8eb66
submarine swaps: add forward swaps
2020-06-18 14:28:40 +02:00
ThomasV
f8b736c908
submarine swaps:
...
- use lnwatcher callback
- add gui button
2020-06-18 14:28:40 +02:00
ThomasV
1e67e55303
submarine swaps, initial implementation:
...
- server uses Boltz API (https://docs.boltz.exchange/en/latest/ )
- reverse swaps only
- command-line only
2020-06-18 14:28:40 +02:00