This commit extends SwapResponse and SwapStatus with np2wsh and p2wsh
htlc output addresses to support both nested and native segwit htlcs
in loop-in.
Furthermore the commit adds support for native segwith loop-in htlcs.
When the htlc is paid internally, as of this commit we'll use NP2WSH,
otherwise users are free to select whether to pay the NP2WSH or the
P2WSH htlc.
This allows Loop users to further improve their privacy by not revealing
their source IP address. Note that the identity of the lnd node behind
Loop can still be revealed when performing a Loop In due to the swap
server extending an off-chain HTLC to the user.
Onion addresses don't yet exist for the swap servers, but they will be
added at a later time.
A database field was already in place to allow channel selection for
loop in. Unfortunately this field, which contains a short channel id,
isn't easily usable for controlling the loop server payment. Because of
non-strict forwarding, it is only possible to constrain a route to a
specific last hop pubkey.
This commit converts the existing field into a pubkey field.
We need the ability to connect to a swap server that uses
a self-signed certificate. The LSAT proxy cannot proxy insecure
gRPC requests since they don't conform to the HTTP 1.1 standard.
Therefore the LSAT proxy fill only serve TLS connections.
This means, we need the TLS path option to specify the certificate
the test environment LSAT proxy uses.
We update to new set of server protos where new Terms calls are added.
Here static information will be returned from the server.
We no longer have a feebase+feerate, but get a final fee directly
returned by the server.
In this commit, we introduce a delta from the on-chain HTLC's
expiration. Since clients are now able to specify a confirmation target
for the HTLC sweep, it's possible that the sweep doesn't confirm within
the intended target in the event of an increasing demand for block
space. Once the delta from the HTLC's expiration is reached, we'll begin
to use the default sweep confirmation target when sweeping the HTLC,
which should provide a timely confirmation. This is needed because if
the preimage has already been revealed, then we need to make sure we
sweep the HTLC before the server does.
Allow user to specify that htlc will be published by an external source.
In that case no internal htlc tx will be published.
To facilitate sending to the htlc address, the swap initiation response
is extended with that address.