mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loop: add support for the probe API
This commit is contained in:
parent
7d044f58e8
commit
f786aaa016
20 changed files with 2118 additions and 849 deletions
18
interface.go
18
interface.go
|
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/lightninglabs/loop/swap"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/routing/route"
|
||||
"github.com/lightningnetwork/lnd/zpay32"
|
||||
)
|
||||
|
||||
// OutRequest contains the required parameters for a loop out swap.
|
||||
|
|
@ -243,6 +244,11 @@ type LoopInQuoteRequest struct {
|
|||
// ExternalHtlc specifies whether the htlc is published by an external
|
||||
// source.
|
||||
ExternalHtlc bool
|
||||
|
||||
// LastHop is an optional last hop to use. This last hop is used when
|
||||
// the client has already requested a server probe for more accurate
|
||||
// routing fee estimation.
|
||||
LastHop *route.Vertex
|
||||
}
|
||||
|
||||
// LoopInQuote contains estimates for the fees making up the total swap cost
|
||||
|
|
@ -340,3 +346,15 @@ func (s *In) LastUpdate() time.Time {
|
|||
func (s *In) SwapHash() lntypes.Hash {
|
||||
return s.Hash
|
||||
}
|
||||
|
||||
// ProbeRequest specifies probe parameters for the server probe.
|
||||
type ProbeRequest struct {
|
||||
// Amount is the amount that will be probed.
|
||||
Amount btcutil.Amount
|
||||
|
||||
// LastHop is the last hop along the route.
|
||||
LastHop *route.Vertex
|
||||
|
||||
// Optional hop hints.
|
||||
RouteHints [][]zpay32.HopHint
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue