mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
interface: add StaticAddressLoopInRequest interface
This commit is contained in:
parent
2b31a48323
commit
4d8c258671
1 changed files with 42 additions and 0 deletions
42
interface.go
42
interface.go
|
|
@ -234,6 +234,48 @@ type LoopInRequest struct {
|
|||
RouteHints [][]zpay32.HopHint
|
||||
}
|
||||
|
||||
// StaticAddressLoopInRequest contains the required parameters for the swap.
|
||||
type StaticAddressLoopInRequest struct {
|
||||
// DepositOutpoints contain the outpoints in format txid:idx of the
|
||||
// static address deposits that are being looped in. The sum of output
|
||||
// values constitute the swap amount.
|
||||
DepositOutpoints []string
|
||||
|
||||
// MaxSwapFee is the maximum we are willing to pay the server for the
|
||||
// swap. This value is not disclosed in the swap initiation call, but if
|
||||
// the server asks for a higher fee, we abort the swap. Typically, this
|
||||
// value is taken from the response of the LoopInQuote call. It
|
||||
// includes the pre-pay amount.
|
||||
MaxSwapFee btcutil.Amount
|
||||
|
||||
// LastHop optionally specifies the last hop to use for the loop in
|
||||
// payment.
|
||||
LastHop *route.Vertex
|
||||
|
||||
// Label contains an optional text label for the swap.
|
||||
Label string
|
||||
|
||||
// Initiator is an optional string that identifies what software
|
||||
// initiated the swap (loop CLI, autolooper, LiT UI and so on) and is
|
||||
// appended to the user agent string.
|
||||
Initiator string
|
||||
|
||||
// Private indicates whether the destination node should be considered
|
||||
// private. In which case, loop will generate hophints to assist with
|
||||
// probing and payment.
|
||||
Private bool
|
||||
|
||||
// RouteHints are optional route hints to reach the destination through
|
||||
// private channels.
|
||||
RouteHints [][]zpay32.HopHint
|
||||
|
||||
// PaymentTimeoutSeconds allows the user to specify an upper limit for
|
||||
// the amount of time the server is allowed to fulfill the off-chain
|
||||
// swap payment. If the timeout is reached the swap will be aborted and
|
||||
// the client can retry the swap if desired with different parameters.
|
||||
PaymentTimeoutSeconds uint32
|
||||
}
|
||||
|
||||
// LoopInTerms are the server terms on which it executes loop in swaps.
|
||||
type LoopInTerms struct {
|
||||
// MinSwapAmount is the minimum amount that the server requires for a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue