looprpc,swapserverrpc: update Go image to 1.19.10

This is needed to update protobuf. Version 1.33 breaks in Go 1.16 with
the following error: "//go:build comment without // +build comment".

Note that the distribution is still "buster", not to break all other packages
whose versions are defined in the scripts.
Boris Nagaev 1 month ago
parent e3806e6160
commit 604b8ce33f
No known key found for this signature in database

@ -1,4 +1,4 @@
FROM golang:1.16.3-buster
FROM golang:1.19.10-buster
RUN apt-get update && apt-get install -y \
git \
@ -16,11 +16,11 @@ ENV FALAFEL_VERSION="v0.9.1"
RUN cd /tmp \
&& export GO111MODULE=on \
&& go get google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOBUF_VERSION} \
&& go get google.golang.org/grpc/cmd/protoc-gen-go-grpc@${PROTOC_GEN_GO_GRPC_VERSION} \
&& go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@${GRPC_GATEWAY_VERSION} \
&& go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@${GRPC_GATEWAY_VERSION} \
&& go get github.com/lightninglabs/falafel@${FALAFEL_VERSION}
&& go install google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOBUF_VERSION} \
&& go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@${PROTOC_GEN_GO_GRPC_VERSION} \
&& go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@${GRPC_GATEWAY_VERSION} \
&& go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@${GRPC_GATEWAY_VERSION} \
&& go install github.com/lightninglabs/falafel@${FALAFEL_VERSION}
WORKDIR /build

@ -21,7 +21,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
//
// `AddressType` has to be one of:
//
// - `unknown`: Unknown address type
@ -123,31 +122,25 @@ func (SwapType) EnumDescriptor() ([]byte, []int) {
type SwapState int32
const (
//
// INITIATED is the initial state of a swap. At that point, the initiation
// call to the server has been made and the payment process has been started
// for the swap and prepayment invoices.
SwapState_INITIATED SwapState = 0
//
// PREIMAGE_REVEALED is reached when the sweep tx publication is first
// attempted. From that point on, we should consider the preimage to no
// longer be secret and we need to do all we can to get the sweep confirmed.
// This state will mostly coalesce with StateHtlcConfirmed, except in the
// case where we wait for fees to come down before we sweep.
SwapState_PREIMAGE_REVEALED SwapState = 1
//
// HTLC_PUBLISHED is reached when the htlc tx has been published in a loop in
// swap.
SwapState_HTLC_PUBLISHED SwapState = 2
//
// SUCCESS is the final swap state that is reached when the sweep tx has
// the required confirmation depth.
SwapState_SUCCESS SwapState = 3
//
// FAILED is the final swap state for a failed swap with or without loss of
// the swap amount.
SwapState_FAILED SwapState = 4
//
// INVOICE_SETTLED is reached when the swap invoice in a loop in swap has been
// paid, but we are still waiting for the htlc spend to confirm.
SwapState_INVOICE_SETTLED SwapState = 5
@ -203,46 +196,36 @@ func (SwapState) EnumDescriptor() ([]byte, []int) {
type FailureReason int32
const (
//
// FAILURE_REASON_NONE is set when the swap did not fail, it is either in
// progress or succeeded.
FailureReason_FAILURE_REASON_NONE FailureReason = 0
//
// FAILURE_REASON_OFFCHAIN indicates that a loop out failed because it wasn't
// possible to find a route for one or both off chain payments that met the fee
// and timelock limits required.
FailureReason_FAILURE_REASON_OFFCHAIN FailureReason = 1
//
// FAILURE_REASON_TIMEOUT indicates that the swap failed because on chain htlc
// did not confirm before its expiry, or it confirmed too late for us to reveal
// our preimage and claim.
FailureReason_FAILURE_REASON_TIMEOUT FailureReason = 2
//
// FAILURE_REASON_SWEEP_TIMEOUT indicates that a loop out permanently failed
// because the on chain htlc wasn't swept before the server revoked the
// htlc.
FailureReason_FAILURE_REASON_SWEEP_TIMEOUT FailureReason = 3
//
// FAILURE_REASON_INSUFFICIENT_VALUE indicates that a loop out has failed
// because the on chain htlc had a lower value than requested.
FailureReason_FAILURE_REASON_INSUFFICIENT_VALUE FailureReason = 4
//
// FAILURE_REASON_TEMPORARY indicates that a swap cannot continue due to an
// internal error. Manual intervention such as a restart is required.
FailureReason_FAILURE_REASON_TEMPORARY FailureReason = 5
//
// FAILURE_REASON_INCORRECT_AMOUNT indicates that a loop in permanently failed
// because the amount extended by an external loop in htlc is insufficient.
FailureReason_FAILURE_REASON_INCORRECT_AMOUNT FailureReason = 6
//
// FAILURE_REASON_ABANDONED indicates that a swap permanently failed because
// the client manually abandoned the swap.
FailureReason_FAILURE_REASON_ABANDONED FailureReason = 7
//
// FAILURE_REASON_INSUFFICIENT_CONFIRMED_BALANCE indicates that a swap
// wasn't published due to insufficient confirmed balance.
FailureReason_FAILURE_REASON_INSUFFICIENT_CONFIRMED_BALANCE FailureReason = 8
//
// FAILURE_REASON_INCORRECT_HTLC_AMT_SWEPT indicates that a swap
// wasn't published due to insufficient confirmed balance.
FailureReason_FAILURE_REASON_INCORRECT_HTLC_AMT_SWEPT FailureReason = 9
@ -353,54 +336,41 @@ type AutoReason int32
const (
AutoReason_AUTO_REASON_UNKNOWN AutoReason = 0
//
// Budget not started indicates that we do not recommend any swaps because
// the start time for our budget has not arrived yet.
AutoReason_AUTO_REASON_BUDGET_NOT_STARTED AutoReason = 1
//
// Sweep fees indicates that the estimated fees to sweep swaps are too high
// right now.
AutoReason_AUTO_REASON_SWEEP_FEES AutoReason = 2
//
// Budget elapsed indicates that the autoloop budget for the period has been
// elapsed.
AutoReason_AUTO_REASON_BUDGET_ELAPSED AutoReason = 3
//
// In flight indicates that the limit on in-flight automatically dispatched
// swaps has already been reached.
AutoReason_AUTO_REASON_IN_FLIGHT AutoReason = 4
//
// Swap fee indicates that the server fee for a specific swap is too high.
AutoReason_AUTO_REASON_SWAP_FEE AutoReason = 5
//
// Miner fee indicates that the miner fee for a specific swap is to high.
AutoReason_AUTO_REASON_MINER_FEE AutoReason = 6
//
// Prepay indicates that the prepay fee for a specific swap is too high.
AutoReason_AUTO_REASON_PREPAY AutoReason = 7
//
// Failure backoff indicates that a swap has recently failed for this target,
// and the backoff period has not yet passed.
AutoReason_AUTO_REASON_FAILURE_BACKOFF AutoReason = 8
//
// Loop out indicates that a loop out swap is currently utilizing the channel,
// so it is not eligible.
AutoReason_AUTO_REASON_LOOP_OUT AutoReason = 9
//
// Loop In indicates that a loop in swap is currently in flight for the peer,
// so it is not eligible.
AutoReason_AUTO_REASON_LOOP_IN AutoReason = 10
//
// Liquidity ok indicates that a target meets the liquidity balance expressed
// in its rule, so no swap is needed.
AutoReason_AUTO_REASON_LIQUIDITY_OK AutoReason = 11
//
// Budget insufficient indicates that we cannot perform a swap because we do
// not have enough pending budget available. This differs from budget elapsed,
// because we still have some budget available, but we have allocated it to
// other swaps.
AutoReason_AUTO_REASON_BUDGET_INSUFFICIENT AutoReason = 12
//
// Fee insufficient indicates that the fee estimate for a swap is higher than
// the portion of total swap amount that we allow fees to consume.
AutoReason_AUTO_REASON_FEE_INSUFFICIENT AutoReason = 13
@ -526,32 +496,25 @@ type LoopOutRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// Requested swap amount in sat. This does not include the swap and miner fee.
Amt int64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
//
// Base58 encoded destination address for the swap.
Dest string `protobuf:"bytes,2,opt,name=dest,proto3" json:"dest,omitempty"`
//
// Maximum off-chain fee in sat that may be paid for swap payment to the
// server. This limit is applied during path finding. Typically this value is
// taken from the response of the GetQuote call.
MaxSwapRoutingFee int64 `protobuf:"varint,3,opt,name=max_swap_routing_fee,json=maxSwapRoutingFee,proto3" json:"max_swap_routing_fee,omitempty"`
//
// Maximum off-chain fee in sat that may be paid for the prepay to the server.
// This limit is applied during path finding. Typically this value is taken
// from the response of the GetQuote call.
MaxPrepayRoutingFee int64 `protobuf:"varint,4,opt,name=max_prepay_routing_fee,json=maxPrepayRoutingFee,proto3" json:"max_prepay_routing_fee,omitempty"`
//
// 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 GetQuote call. It includes the prepay amount.
MaxSwapFee int64 `protobuf:"varint,5,opt,name=max_swap_fee,json=maxSwapFee,proto3" json:"max_swap_fee,omitempty"`
//
// Maximum amount of the swap fee that may be charged as a prepayment.
MaxPrepayAmt int64 `protobuf:"varint,6,opt,name=max_prepay_amt,json=maxPrepayAmt,proto3" json:"max_prepay_amt,omitempty"`
//
// Maximum in on-chain fees that we are willing to spend. If we want to
// sweep the on-chain htlc and the fee estimate turns out higher than this
// value, we cancel the swap. If the fee estimate is lower, we publish the
@ -567,59 +530,48 @@ type LoopOutRequest struct {
//
// max_miner_fee is typically taken from the response of the GetQuote call.
MaxMinerFee int64 `protobuf:"varint,7,opt,name=max_miner_fee,json=maxMinerFee,proto3" json:"max_miner_fee,omitempty"`
//
// Deprecated, use outgoing_chan_set. The channel to loop out, the channel
// to loop out is selected based on the lowest routing fee for the swap
// payment to the server.
//
// Deprecated: Marked as deprecated in client.proto.
LoopOutChannel uint64 `protobuf:"varint,8,opt,name=loop_out_channel,json=loopOutChannel,proto3" json:"loop_out_channel,omitempty"`
//
// A restriction on the channel set that may be used to loop out. The actual
// channel(s) that will be used are selected based on the lowest routing fee
// for the swap payment to the server.
OutgoingChanSet []uint64 `protobuf:"varint,11,rep,packed,name=outgoing_chan_set,json=outgoingChanSet,proto3" json:"outgoing_chan_set,omitempty"`
//
// The number of blocks from the on-chain HTLC's confirmation height that it
// should be swept within.
SweepConfTarget int32 `protobuf:"varint,9,opt,name=sweep_conf_target,json=sweepConfTarget,proto3" json:"sweep_conf_target,omitempty"`
//
// The number of confirmations that we require for the on chain htlc that will
// be published by the server before we reveal the preimage.
HtlcConfirmations int32 `protobuf:"varint,13,opt,name=htlc_confirmations,json=htlcConfirmations,proto3" json:"htlc_confirmations,omitempty"`
//
// The latest time (in unix seconds) we allow the server to wait before
// publishing the HTLC on chain. Setting this to a larger value will give the
// server the opportunity to batch multiple swaps together, and wait for
// low-fee periods before publishing the HTLC, potentially resulting in a
// lower total swap fee.
SwapPublicationDeadline uint64 `protobuf:"varint,10,opt,name=swap_publication_deadline,json=swapPublicationDeadline,proto3" json:"swap_publication_deadline,omitempty"`
//
// An optional label for this swap. This field is limited to 500 characters
// and may not start with the prefix [reserved], which is used to tag labels
// produced by the daemon.
Label string `protobuf:"bytes,12,opt,name=label,proto3" json:"label,omitempty"`
//
// An optional identification string that will be appended to the user agent
// string sent to the server to give information about the usage of loop. This
// initiator part is meant for user interfaces to add their name to give the
// full picture of the binary used (loopd, LiT) and the method used for
// triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI).
Initiator string `protobuf:"bytes,14,opt,name=initiator,proto3" json:"initiator,omitempty"`
//
// An alternative destination address source for the swap. This field
// represents the name of the account in the backing lnd instance.
// Refer to lnd's wallet import functions for reference.
Account string `protobuf:"bytes,15,opt,name=account,proto3" json:"account,omitempty"`
//
// The address type of the account specified in the account field.
AccountAddrType AddressType `protobuf:"varint,16,opt,name=account_addr_type,json=accountAddrType,proto3,enum=looprpc.AddressType" json:"account_addr_type,omitempty"`
//
// A flag indicating whether the defined destination address does not belong to
// the wallet. This is used to flag whether this loop out swap could have its
// associated sweep batched.
IsExternalAddr bool `protobuf:"varint,17,opt,name=is_external_addr,json=isExternalAddr,proto3" json:"is_external_addr,omitempty"`
//
// The reservations to use for the swap. If this field is set, loop will try
// to use the instant out flow using the given reservations. If the
// reservations are not sufficient, the swap will fail. The swap amount must
@ -791,49 +743,39 @@ type LoopInRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// Requested swap amount in sat. This does not include the swap and miner
// fee.
Amt int64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
//
// 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 GetQuote call.
MaxSwapFee int64 `protobuf:"varint,2,opt,name=max_swap_fee,json=maxSwapFee,proto3" json:"max_swap_fee,omitempty"`
//
// Maximum in on-chain fees that we are willing to spend. If we want to
// publish the on-chain htlc and the fee estimate turns out higher than this
// value, we cancel the swap.
//
// max_miner_fee is typically taken from the response of the GetQuote call.
MaxMinerFee int64 `protobuf:"varint,3,opt,name=max_miner_fee,json=maxMinerFee,proto3" json:"max_miner_fee,omitempty"`
//
// The last hop to use for the loop in swap. If empty, the last hop is selected
// based on the lowest routing fee for the swap payment from the server.
LastHop []byte `protobuf:"bytes,4,opt,name=last_hop,json=lastHop,proto3" json:"last_hop,omitempty"`
//
// If external_htlc is true, we expect the htlc to be published by an external
// actor.
ExternalHtlc bool `protobuf:"varint,5,opt,name=external_htlc,json=externalHtlc,proto3" json:"external_htlc,omitempty"`
//
// The number of blocks that the on chain htlc should confirm within.
HtlcConfTarget int32 `protobuf:"varint,6,opt,name=htlc_conf_target,json=htlcConfTarget,proto3" json:"htlc_conf_target,omitempty"`
//
// An optional label for this swap. This field is limited to 500 characters
// and may not be one of the reserved values in loop/labels Reserved list.
Label string `protobuf:"bytes,7,opt,name=label,proto3" json:"label,omitempty"`
//
// An optional identification string that will be appended to the user agent
// string sent to the server to give information about the usage of loop. This
// initiator part is meant for user interfaces to add their name to give the
// full picture of the binary used (loopd, LiT) and the method used for
// triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI).
Initiator string `protobuf:"bytes,8,opt,name=initiator,proto3" json:"initiator,omitempty"`
//
// Optional route hints to reach the destination through private channels.
RouteHints []*swapserverrpc.RouteHint `protobuf:"bytes,9,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"`
//
// Private indicates whether the destination node should be considered
// private. In which case, loop will generate hophints to assist with
// probing and payment.
@ -947,7 +889,6 @@ type SwapResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// Swap identifier to track status in the update stream that is returned from
// the Start() call. Currently this is the hash that locks the htlcs.
// DEPRECATED: To make the API more consistent, this field is deprecated in
@ -955,11 +896,9 @@ type SwapResponse struct {
//
// Deprecated: Marked as deprecated in client.proto.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
//
// Swap identifier to track status in the update stream that is returned from
// the Start() call. Currently this is the hash that locks the htlcs.
IdBytes []byte `protobuf:"bytes,3,opt,name=id_bytes,json=idBytes,proto3" json:"id_bytes,omitempty"`
//
// DEPRECATED. This field stores the address of the onchain htlc, but
// depending on the request, the semantics are different.
// - For internal loop-in htlc_address contains the address of the
@ -969,7 +908,6 @@ type SwapResponse struct {
//
// Deprecated: Marked as deprecated in client.proto.
HtlcAddress string `protobuf:"bytes,2,opt,name=htlc_address,json=htlcAddress,proto3" json:"htlc_address,omitempty"`
//
// The native segwit address of the on-chain htlc.
// Used for both loop-in and loop-out.
HtlcAddressP2Wsh string `protobuf:"bytes,5,opt,name=htlc_address_p2wsh,json=htlcAddressP2wsh,proto3" json:"htlc_address_p2wsh,omitempty"`
@ -1098,11 +1036,9 @@ type SwapStatus struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// Requested swap amount in sat. This does not include the swap and miner
// fee.
Amt int64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
//
// Swap identifier to track status in the update stream that is returned from
// the Start() call. Currently this is the hash that locks the htlcs.
// DEPRECATED: To make the API more consistent, this field is deprecated in
@ -1110,26 +1046,19 @@ type SwapStatus struct {
//
// Deprecated: Marked as deprecated in client.proto.
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
//
// Swap identifier to track status in the update stream that is returned from
// the Start() call. Currently this is the hash that locks the htlcs.
IdBytes []byte `protobuf:"bytes,11,opt,name=id_bytes,json=idBytes,proto3" json:"id_bytes,omitempty"`
//
// The type of the swap.
Type SwapType `protobuf:"varint,3,opt,name=type,proto3,enum=looprpc.SwapType" json:"type,omitempty"`
//
// State the swap is currently in, see State enum.
State SwapState `protobuf:"varint,4,opt,name=state,proto3,enum=looprpc.SwapState" json:"state,omitempty"`
//
// A failure reason for the swap, only set if the swap has failed.
FailureReason FailureReason `protobuf:"varint,14,opt,name=failure_reason,json=failureReason,proto3,enum=looprpc.FailureReason" json:"failure_reason,omitempty"`
//
// Initiation time of the swap.
InitiationTime int64 `protobuf:"varint,5,opt,name=initiation_time,json=initiationTime,proto3" json:"initiation_time,omitempty"`
//
// Initiation time of the swap.
LastUpdateTime int64 `protobuf:"varint,6,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"`
//
// DEPRECATED: This field stores the address of the onchain htlc.
// - For internal loop-in htlc_address contains the address of the
// native segwit (P2WSH) htlc.
@ -1446,7 +1375,6 @@ type ListSwapsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The list of all currently known swaps and their status.
Swaps []*SwapStatus `protobuf:"bytes,1,rep,name=swaps,proto3" json:"swaps,omitempty"`
}
@ -1495,7 +1423,6 @@ type SwapInfoRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The swap identifier which currently is the hash that locks the HTLCs. When
// using REST, this field must be encoded as URL safe base64.
Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
@ -1583,10 +1510,8 @@ type InTermsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// Minimum swap amount (sat)
MinSwapAmount int64 `protobuf:"varint,5,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"`
//
// Maximum swap amount (sat)
MaxSwapAmount int64 `protobuf:"varint,6,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"`
}
@ -1642,10 +1567,8 @@ type OutTermsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// Minimum swap amount (sat)
MinSwapAmount int64 `protobuf:"varint,5,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"`
//
// Maximum swap amount (sat)
MaxSwapAmount int64 `protobuf:"varint,6,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"`
// The minimally accepted cltv delta of the on-chain htlc.
@ -1719,35 +1642,28 @@ type QuoteRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The amount to swap in satoshis.
Amt int64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
//
// The confirmation target that should be used either for the sweep of the
// on-chain HTLC broadcast by the swap server in the case of a Loop Out, or for
// the confirmation of the on-chain HTLC broadcast by the swap client in the
// case of a Loop In.
ConfTarget int32 `protobuf:"varint,2,opt,name=conf_target,json=confTarget,proto3" json:"conf_target,omitempty"`
//
// If external_htlc is true, we expect the htlc to be published by an external
// actor.
ExternalHtlc bool `protobuf:"varint,3,opt,name=external_htlc,json=externalHtlc,proto3" json:"external_htlc,omitempty"`
//
// The latest time (in unix seconds) we allow the server to wait before
// publishing the HTLC on chain. Setting this to a larger value will give the
// server the opportunity to batch multiple swaps together, and wait for
// low-fee periods before publishing the HTLC, potentially resulting in a
// lower total swap fee. This only has an effect on loop out quotes.
SwapPublicationDeadline uint64 `protobuf:"varint,4,opt,name=swap_publication_deadline,json=swapPublicationDeadline,proto3" json:"swap_publication_deadline,omitempty"`
//
// Optionally the client can specify the last hop pubkey when requesting a
// loop-in quote. This is useful to get better off-chain routing fee from the
// server.
LoopInLastHop []byte `protobuf:"bytes,5,opt,name=loop_in_last_hop,json=loopInLastHop,proto3" json:"loop_in_last_hop,omitempty"`
//
// Optional route hints to reach the destination through private channels.
LoopInRouteHints []*swapserverrpc.RouteHint `protobuf:"bytes,6,rep,name=loop_in_route_hints,json=loopInRouteHints,proto3" json:"loop_in_route_hints,omitempty"`
//
// Private indicates whether the destination node should be considered
// private. In which case, loop will generate hophints to assist with
// probing and payment.
@ -1840,10 +1756,8 @@ type InQuoteResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The fee that the swap server is charging for the swap.
SwapFeeSat int64 `protobuf:"varint,1,opt,name=swap_fee_sat,json=swapFeeSat,proto3" json:"swap_fee_sat,omitempty"`
//
// An estimate of the on-chain fee that needs to be paid to publish the HTLC
// If a miner fee of 0 is returned, it means the external_htlc flag was set for
// a loop in and the fee estimation was skipped. If a miner fee of -1 is
@ -1851,10 +1765,8 @@ type InQuoteResponse struct {
// create a sample estimation transaction because not enough funds are
// available. An information message should be shown to the user in this case.
HtlcPublishFeeSat int64 `protobuf:"varint,3,opt,name=htlc_publish_fee_sat,json=htlcPublishFeeSat,proto3" json:"htlc_publish_fee_sat,omitempty"`
//
// On-chain cltv expiry delta
CltvDelta int32 `protobuf:"varint,5,opt,name=cltv_delta,json=cltvDelta,proto3" json:"cltv_delta,omitempty"`
//
// The confirmation target to be used to publish the on-chain HTLC.
ConfTarget int32 `protobuf:"varint,6,opt,name=conf_target,json=confTarget,proto3" json:"conf_target,omitempty"`
}
@ -1924,24 +1836,18 @@ type OutQuoteResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The fee that the swap server is charging for the swap.
SwapFeeSat int64 `protobuf:"varint,1,opt,name=swap_fee_sat,json=swapFeeSat,proto3" json:"swap_fee_sat,omitempty"`
//
// The part of the swap fee that is requested as a prepayment.
PrepayAmtSat int64 `protobuf:"varint,2,opt,name=prepay_amt_sat,json=prepayAmtSat,proto3" json:"prepay_amt_sat,omitempty"`
//
// An estimate of the on-chain fee that needs to be paid to sweep the HTLC for
// a loop out.
HtlcSweepFeeSat int64 `protobuf:"varint,3,opt,name=htlc_sweep_fee_sat,json=htlcSweepFeeSat,proto3" json:"htlc_sweep_fee_sat,omitempty"`
//
// The node pubkey where the swap payment needs to be paid
// to. This can be used to test connectivity before initiating the swap.
SwapPaymentDest []byte `protobuf:"bytes,4,opt,name=swap_payment_dest,json=swapPaymentDest,proto3" json:"swap_payment_dest,omitempty"`
//
// On-chain cltv expiry delta
CltvDelta int32 `protobuf:"varint,5,opt,name=cltv_delta,json=cltvDelta,proto3" json:"cltv_delta,omitempty"`
//
// The confirmation target to be used for the sweep of the on-chain HTLC.
ConfTarget int32 `protobuf:"varint,6,opt,name=conf_target,json=confTarget,proto3" json:"conf_target,omitempty"`
}
@ -2025,13 +1931,10 @@ type ProbeRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The amount to probe.
Amt int64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
//
// Optional last hop of the route to probe.
LastHop []byte `protobuf:"bytes,2,opt,name=last_hop,json=lastHop,proto3" json:"last_hop,omitempty"`
//
// Optional route hints to reach the destination through private channels.
RouteHints []*swapserverrpc.RouteHint `protobuf:"bytes,3,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"`
}
@ -2170,7 +2073,6 @@ type TokensResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// List of all tokens the daemon knows of, including old/expired tokens.
Tokens []*LsatToken `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"`
}
@ -2219,34 +2121,25 @@ type LsatToken struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The base macaroon that was baked by the auth server.
BaseMacaroon []byte `protobuf:"bytes,1,opt,name=base_macaroon,json=baseMacaroon,proto3" json:"base_macaroon,omitempty"`
//
// The payment hash of the payment that was paid to obtain the token.
PaymentHash []byte `protobuf:"bytes,2,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
//
// The preimage of the payment hash, knowledge of this is proof that the
// payment has been paid. If the preimage is set to all zeros, this means the
// payment is still pending and the token is not yet fully valid.
PaymentPreimage []byte `protobuf:"bytes,3,opt,name=payment_preimage,json=paymentPreimage,proto3" json:"payment_preimage,omitempty"`
//
// The amount of millisatoshis that was paid to get the token.
AmountPaidMsat int64 `protobuf:"varint,4,opt,name=amount_paid_msat,json=amountPaidMsat,proto3" json:"amount_paid_msat,omitempty"`
//
// The amount of millisatoshis paid in routing fee to pay for the token.
RoutingFeePaidMsat int64 `protobuf:"varint,5,opt,name=routing_fee_paid_msat,json=routingFeePaidMsat,proto3" json:"routing_fee_paid_msat,omitempty"`
//
// The creation time of the token as UNIX timestamp in seconds.
TimeCreated int64 `protobuf:"varint,6,opt,name=time_created,json=timeCreated,proto3" json:"time_created,omitempty"`
//
// Indicates whether the token is expired or still valid.
Expired bool `protobuf:"varint,7,opt,name=expired,proto3" json:"expired,omitempty"`
//
// Identifying attribute of this token in the store. Currently represents the
// file name of the token where it's stored on the file system.
StorageName string `protobuf:"bytes,8,opt,name=storage_name,json=storageName,proto3" json:"storage_name,omitempty"`
//
// The l402 ID of the token.
Id string `protobuf:"bytes,9,opt,name=id,proto3" json:"id,omitempty"`
}
@ -2351,19 +2244,14 @@ type LoopStats struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// Number of currently pending swaps.
PendingCount uint64 `protobuf:"varint,1,opt,name=pending_count,json=pendingCount,proto3" json:"pending_count,omitempty"`
//
// Number of succeeded swaps.
SuccessCount uint64 `protobuf:"varint,2,opt,name=success_count,json=successCount,proto3" json:"success_count,omitempty"`
//
// Number failed swaps.
FailCount uint64 `protobuf:"varint,3,opt,name=fail_count,json=failCount,proto3" json:"fail_count,omitempty"`
//
// The sum of all pending swap amounts.
SumPendingAmt int64 `protobuf:"varint,4,opt,name=sum_pending_amt,json=sumPendingAmt,proto3" json:"sum_pending_amt,omitempty"`
//
// The sum of all succeeded swap amounts.
SumSucceededAmt int64 `protobuf:"varint,5,opt,name=sum_succeeded_amt,json=sumSucceededAmt,proto3" json:"sum_succeeded_amt,omitempty"`
}
@ -2478,28 +2366,20 @@ type GetInfoResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The current daemon version.
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
//
// The network the daemon is running on.
Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"`
//
// Host and port of the loopd grpc server.
RpcListen string `protobuf:"bytes,3,opt,name=rpc_listen,json=rpcListen,proto3" json:"rpc_listen,omitempty"`
//
// Host and port of the loopd rest server.
RestListen string `protobuf:"bytes,4,opt,name=rest_listen,json=restListen,proto3" json:"rest_listen,omitempty"`
//
// Loop's macaroon path that clients use to talk to the daemon.
MacaroonPath string `protobuf:"bytes,5,opt,name=macaroon_path,json=macaroonPath,proto3" json:"macaroon_path,omitempty"`
//
// Loop's tls cert path
TlsCertPath string `protobuf:"bytes,6,opt,name=tls_cert_path,json=tlsCertPath,proto3" json:"tls_cert_path,omitempty"`
//
// Statistics about loop outs.
LoopOutStats *LoopStats `protobuf:"bytes,7,opt,name=loop_out_stats,json=loopOutStats,proto3" json:"loop_out_stats,omitempty"`
//
// Statistics about loop ins.
LoopInStats *LoopStats `protobuf:"bytes,8,opt,name=loop_in_stats,json=loopInStats,proto3" json:"loop_in_stats,omitempty"`
}
@ -2635,61 +2515,48 @@ type LiquidityParameters struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// A set of liquidity rules that describe the desired liquidity balance.
Rules []*LiquidityRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
//
// The parts per million of swap amount that is allowed to be allocated to swap
// fees. This value is applied across swap categories and may not be set in
// conjunction with sweep fee rate, swap fee ppm, routing fee ppm, prepay
// routing, max prepay and max miner fee.
FeePpm uint64 `protobuf:"varint,16,opt,name=fee_ppm,json=feePpm,proto3" json:"fee_ppm,omitempty"`
//
// The limit we place on our estimated sweep cost for a swap in sat/vByte. If
// the estimated fee for our sweep transaction within the specified
// confirmation target is above this value, we will not suggest any swaps.
SweepFeeRateSatPerVbyte uint64 `protobuf:"varint,2,opt,name=sweep_fee_rate_sat_per_vbyte,json=sweepFeeRateSatPerVbyte,proto3" json:"sweep_fee_rate_sat_per_vbyte,omitempty"`
//
// The maximum fee paid to the server for facilitating the swap, expressed
// as parts per million of the swap volume.
MaxSwapFeePpm uint64 `protobuf:"varint,3,opt,name=max_swap_fee_ppm,json=maxSwapFeePpm,proto3" json:"max_swap_fee_ppm,omitempty"`
//
// The maximum fee paid to route the swap invoice off chain, expressed as
// parts per million of the volume being routed.
MaxRoutingFeePpm uint64 `protobuf:"varint,4,opt,name=max_routing_fee_ppm,json=maxRoutingFeePpm,proto3" json:"max_routing_fee_ppm,omitempty"`
//
// The maximum fee paid to route the prepay invoice off chain, expressed as
// parts per million of the volume being routed.
MaxPrepayRoutingFeePpm uint64 `protobuf:"varint,5,opt,name=max_prepay_routing_fee_ppm,json=maxPrepayRoutingFeePpm,proto3" json:"max_prepay_routing_fee_ppm,omitempty"`
//
// The maximum no-show penalty in satoshis paid for a swap.
MaxPrepaySat uint64 `protobuf:"varint,6,opt,name=max_prepay_sat,json=maxPrepaySat,proto3" json:"max_prepay_sat,omitempty"`
//
// The maximum miner fee we will pay to sweep the swap on chain. Note that we
// will not suggest a swap if the estimate is above the sweep limit set by
// these parameters, and we use the current fee estimate to sweep on chain so
// this value is only a cap placed on the amount we spend on fees in the case
// where the swap needs to be claimed on chain, but fees have suddenly spiked.
MaxMinerFeeSat uint64 `protobuf:"varint,7,opt,name=max_miner_fee_sat,json=maxMinerFeeSat,proto3" json:"max_miner_fee_sat,omitempty"`
//
// The number of blocks from the on-chain HTLC's confirmation height that it
// should be swept within.
SweepConfTarget int32 `protobuf:"varint,8,opt,name=sweep_conf_target,json=sweepConfTarget,proto3" json:"sweep_conf_target,omitempty"`
//
// The amount of time we require pass since a channel was part of a failed
// swap due to off chain payment failure until it will be considered for swap
// suggestions again, expressed in seconds.
FailureBackoffSec uint64 `protobuf:"varint,9,opt,name=failure_backoff_sec,json=failureBackoffSec,proto3" json:"failure_backoff_sec,omitempty"`
//
// Set to true to enable automatic dispatch of swaps. All swaps will be limited
// to the fee categories set by these parameters, and total expenditure will
// be limited to the autoloop budget.
Autoloop bool `protobuf:"varint,10,opt,name=autoloop,proto3" json:"autoloop,omitempty"`
//
// The total budget for automatically dispatched swaps since the budget start
// time, expressed in satoshis.
AutoloopBudgetSat uint64 `protobuf:"varint,11,opt,name=autoloop_budget_sat,json=autoloopBudgetSat,proto3" json:"autoloop_budget_sat,omitempty"`
//
// Deprecated, use autoloop_budget_refresh_period_sec. The start time for
// autoloop budget, expressed as a unix timestamp in seconds. If this value is
// 0, the budget will be applied for all automatically dispatched swaps. Swaps
@ -2698,52 +2565,41 @@ type LiquidityParameters struct {
//
// Deprecated: Marked as deprecated in client.proto.
AutoloopBudgetStartSec uint64 `protobuf:"varint,12,opt,name=autoloop_budget_start_sec,json=autoloopBudgetStartSec,proto3" json:"autoloop_budget_start_sec,omitempty"`
//
// The maximum number of automatically dispatched swaps that we allow to be in
// flight at any point in time.
AutoMaxInFlight uint64 `protobuf:"varint,13,opt,name=auto_max_in_flight,json=autoMaxInFlight,proto3" json:"auto_max_in_flight,omitempty"`
//
// The minimum amount, expressed in satoshis, that the autoloop client will
// dispatch a swap for. This value is subject to the server-side limits
// specified by the LoopOutTerms endpoint.
MinSwapAmount uint64 `protobuf:"varint,14,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"`
//
// The maximum amount, expressed in satoshis, that the autoloop client will
// dispatch a swap for. This value is subject to the server-side limits
// specified by the LoopOutTerms endpoint.
MaxSwapAmount uint64 `protobuf:"varint,15,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"`
//
// The confirmation target for loop in on-chain htlcs.
HtlcConfTarget int32 `protobuf:"varint,17,opt,name=htlc_conf_target,json=htlcConfTarget,proto3" json:"htlc_conf_target,omitempty"`
//
// The destination address to use for autoloop loop outs. Set to "default" in
// order to revert to default behavior.
AutoloopDestAddress string `protobuf:"bytes,18,opt,name=autoloop_dest_address,json=autoloopDestAddress,proto3" json:"autoloop_dest_address,omitempty"`
//
// The period over which the autoloop budget is refreshed, expressed in
// seconds.
AutoloopBudgetRefreshPeriodSec uint64 `protobuf:"varint,19,opt,name=autoloop_budget_refresh_period_sec,json=autoloopBudgetRefreshPeriodSec,proto3" json:"autoloop_budget_refresh_period_sec,omitempty"`
//
// The time at which the autoloop budget was last refreshed, expressed as a
// UNIX timestamp in seconds.
AutoloopBudgetLastRefresh uint64 `protobuf:"varint,20,opt,name=autoloop_budget_last_refresh,json=autoloopBudgetLastRefresh,proto3" json:"autoloop_budget_last_refresh,omitempty"`
//
// Set to true to enable easy autoloop. If set, all channel/peer rules will be
// overridden and the client will automatically dispatch swaps in order to meet
// the configured local balance target size. Currently only loop out is
// supported, meaning that easy autoloop can only reduce the funds that are
// held as balance in channels.
EasyAutoloop bool `protobuf:"varint,21,opt,name=easy_autoloop,json=easyAutoloop,proto3" json:"easy_autoloop,omitempty"`
//
// The local balance target size, expressed in satoshis. This is used by easy
// autoloop to determine how much liquidity should be maintained in channels.
EasyAutoloopLocalTargetSat uint64 `protobuf:"varint,22,opt,name=easy_autoloop_local_target_sat,json=easyAutoloopLocalTargetSat,proto3" json:"easy_autoloop_local_target_sat,omitempty"`
//
// An alternative destination address source for the swap. This field
// represents the name of the account in the backing lnd instance.
// Refer to lnd's wallet import functions for reference.
Account string `protobuf:"bytes,23,opt,name=account,proto3" json:"account,omitempty"`
//
// The address type of the account specified in the account field.
AccountAddrType AddressType `protobuf:"varint,24,opt,name=account_addr_type,json=accountAddrType,proto3,enum=looprpc.AddressType" json:"account_addr_type,omitempty"`
}
@ -2954,27 +2810,22 @@ type LiquidityRule struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The short channel ID of the channel that this rule should be applied to.
// This field may not be set when the pubkey field is set.
ChannelId uint64 `protobuf:"varint,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
// The type of swap that will be dispatched for this rule.
SwapType SwapType `protobuf:"varint,6,opt,name=swap_type,json=swapType,proto3,enum=looprpc.SwapType" json:"swap_type,omitempty"`
//
// The public key of the peer that this rule should be applied to. This field
// may not be set when the channel id field is set.
Pubkey []byte `protobuf:"bytes,5,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
//
// Type indicates the type of rule that this message rule represents. Setting
// this value will determine which fields are used in the message. The comments
// on each field in this message will be prefixed with the LiquidityRuleType
// they belong to.
Type LiquidityRuleType `protobuf:"varint,2,opt,name=type,proto3,enum=looprpc.LiquidityRuleType" json:"type,omitempty"`
//
// THRESHOLD: The percentage of total capacity that incoming capacity should
// not drop beneath.
IncomingThreshold uint32 `protobuf:"varint,3,opt,name=incoming_threshold,json=incomingThreshold,proto3" json:"incoming_threshold,omitempty"`
//
// THRESHOLD: The percentage of total capacity that outgoing capacity should
// not drop beneath.
OutgoingThreshold uint32 `protobuf:"varint,4,opt,name=outgoing_threshold,json=outgoingThreshold,proto3" json:"outgoing_threshold,omitempty"`
@ -3059,7 +2910,6 @@ type SetLiquidityParamsRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// Parameters is the desired new set of parameters for the liquidity management
// subsystem. Note that the current set of parameters will be completely
// overwritten by the parameters provided (if they are valid), so the full set
@ -3187,13 +3037,10 @@ type Disqualified struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The short channel ID of the channel that was excluded from our suggestions.
ChannelId uint64 `protobuf:"varint,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
//
// The public key of the peer that was excluded from our suggestions.
Pubkey []byte `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
//
// The reason that we excluded the channel from the our suggestions.
Reason AutoReason `protobuf:"varint,2,opt,name=reason,proto3,enum=looprpc.AutoReason" json:"reason,omitempty"`
}
@ -3256,13 +3103,10 @@ type SuggestSwapsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The set of recommended loop outs.
LoopOut []*LoopOutRequest `protobuf:"bytes,1,rep,name=loop_out,json=loopOut,proto3" json:"loop_out,omitempty"`
//
// The set of recommended loop in swaps
LoopIn []*LoopInRequest `protobuf:"bytes,3,rep,name=loop_in,json=loopIn,proto3" json:"loop_in,omitempty"`
//
// Disqualified contains the set of channels that swaps are not recommended
// for.
Disqualified []*Disqualified `protobuf:"bytes,2,rep,name=disqualified,proto3" json:"disqualified,omitempty"`
@ -3326,11 +3170,9 @@ type AbandonSwapRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The swap identifier which currently is the hash that locks the HTLCs. When
// using REST, this field must be encoded as URL safe base64.
Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
//
// A flag that tries to ensure that the client understands that they are
// risking loss of funds by abandoning a swap. This could happen if an
// abandoned swap would wait on a timeout sweep by the client.
@ -3464,7 +3306,6 @@ type ListReservationsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The list of all currently known reservations and their status.
Reservations []*ClientReservation `protobuf:"bytes,1,rep,name=reservations,proto3" json:"reservations,omitempty"`
}
@ -3513,22 +3354,16 @@ type ClientReservation struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The reservation id that identifies this reservation.
ReservationId []byte `protobuf:"bytes,1,opt,name=reservation_id,json=reservationId,proto3" json:"reservation_id,omitempty"`
//
// The state the reservation is in.
State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
//
// The amount that the reservation is for.
Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
//
// The transaction id of the reservation.
TxId string `protobuf:"bytes,4,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"`
//
// The vout of the reservation.
Vout uint32 `protobuf:"varint,5,opt,name=vout,proto3" json:"vout,omitempty"`
//
// The expiry of the reservation.
Expiry uint32 `protobuf:"varint,6,opt,name=expiry,proto3" json:"expiry,omitempty"`
}
@ -3612,15 +3447,12 @@ type InstantOutRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The reservations to use for the swap.
ReservationIds [][]byte `protobuf:"bytes,1,rep,name=reservation_ids,json=reservationIds,proto3" json:"reservation_ids,omitempty"`
//
// A restriction on the channel set that may be used to loop out. The actual
// channel(s) that will be used are selected based on the lowest routing fee
// for the swap payment to the server.
OutgoingChanSet []uint64 `protobuf:"varint,2,rep,packed,name=outgoing_chan_set,json=outgoingChanSet,proto3" json:"outgoing_chan_set,omitempty"`
//
// An optional address to sweep the onchain funds to. If not set, the funds
// will be swept to the wallet's internal address.
DestAddr string `protobuf:"bytes,3,opt,name=dest_addr,json=destAddr,proto3" json:"dest_addr,omitempty"`
@ -3684,13 +3516,10 @@ type InstantOutResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The hash of the swap preimage.
InstantOutHash []byte `protobuf:"bytes,1,opt,name=instant_out_hash,json=instantOutHash,proto3" json:"instant_out_hash,omitempty"`
//
// The transaction id of the sweep transaction.
SweepTxId string `protobuf:"bytes,2,opt,name=sweep_tx_id,json=sweepTxId,proto3" json:"sweep_tx_id,omitempty"`
//
// The state of the swap.
State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
}
@ -3753,10 +3582,8 @@ type InstantOutQuoteRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The amount to swap in satoshis.
Amt uint64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
//
// The amount of reservations to use for the swap.
NumReservations int32 `protobuf:"varint,2,opt,name=num_reservations,json=numReservations,proto3" json:"num_reservations,omitempty"`
}
@ -3812,10 +3639,8 @@ type InstantOutQuoteResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The fee that the swap service is charging for the swap.
ServiceFeeSat int64 `protobuf:"varint,1,opt,name=service_fee_sat,json=serviceFeeSat,proto3" json:"service_fee_sat,omitempty"`
//
// The estimated on-chain fee that needs to be paid to publish the Sweepless
// Sweep.
SweepFeeSat int64 `protobuf:"varint,2,opt,name=sweep_fee_sat,json=sweepFeeSat,proto3" json:"sweep_fee_sat,omitempty"`
@ -3910,7 +3735,6 @@ type ListInstantOutsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The list of all currently known instant out swaps and their status.
Swaps []*InstantOut `protobuf:"bytes,1,rep,name=swaps,proto3" json:"swaps,omitempty"`
}
@ -3959,19 +3783,14 @@ type InstantOut struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// The swap hash that identifies this swap.
SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"`
//
// The state the swap is in.
State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
//
// The amount of the swap.
Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
//
// The used reservations for the swap.
ReservationIds [][]byte `protobuf:"bytes,4,rep,name=reservation_ids,json=reservationIds,proto3" json:"reservation_ids,omitempty"`
//
// The sweep transaction id of the swap.
SweepTxId string `protobuf:"bytes,5,opt,name=sweep_tx_id,json=sweepTxId,proto3" json:"sweep_tx_id,omitempty"`
}

@ -56,7 +56,6 @@ type SwapClientClient interface {
// loop: `quote`
// GetQuote returns a quote for a swap with the provided parameters.
GetLoopInQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*InQuoteResponse, error)
//
// Probe asks he sever to probe the route to us to have a better upfront
// estimate about routing fees when loopin-in.
Probe(ctx context.Context, in *ProbeRequest, opts ...grpc.CallOption) (*ProbeResponse, error)
@ -352,7 +351,6 @@ type SwapClientServer interface {
// loop: `quote`
// GetQuote returns a quote for a swap with the provided parameters.
GetLoopInQuote(context.Context, *QuoteRequest) (*InQuoteResponse, error)
//
// Probe asks he sever to probe the route to us to have a better upfront
// estimate about routing fees when loopin-in.
Probe(context.Context, *ProbeRequest) (*ProbeResponse, error)

@ -18,7 +18,6 @@ const _ = grpc.SupportPackageIsVersion7
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type DebugClient interface {
//
// ForceAutoLoop is intended for *testing purposes only* and will not work on
// mainnet. This endpoint ticks our autoloop timer, triggering automated
// dispatch of a swap if one is suggested.
@ -46,7 +45,6 @@ func (c *debugClient) ForceAutoLoop(ctx context.Context, in *ForceAutoLoopReques
// All implementations must embed UnimplementedDebugServer
// for forward compatibility
type DebugServer interface {
//
// ForceAutoLoop is intended for *testing purposes only* and will not work on
// mainnet. This endpoint ticks our autoloop timer, triggering automated
// dispatch of a swap if one is suggested.

@ -1,4 +1,4 @@
FROM golang:1.16.3-buster
FROM golang:1.19.10-buster
RUN apt-get update && apt-get install -y \
git \
@ -14,8 +14,8 @@ ENV PROTOC_GEN_GO_GRPC_VERSION="v1.1.0"
RUN cd /tmp \
&& export GO111MODULE=on \
&& go get google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOBUF_VERSION} \
&& go get google.golang.org/grpc/cmd/protoc-gen-go-grpc@${PROTOC_GEN_GO_GRPC_VERSION}
&& go install google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOBUF_VERSION} \
&& go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@${PROTOC_GEN_GO_GRPC_VERSION}
WORKDIR /build

@ -36,7 +36,6 @@ type HopHint struct {
ChanId uint64 `protobuf:"varint,2,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"`
// The base fee of the channel denominated in millisatoshis.
FeeBaseMsat uint32 `protobuf:"varint,3,opt,name=fee_base_msat,json=feeBaseMsat,proto3" json:"fee_base_msat,omitempty"`
//
// The fee rate of the channel for sending one satoshi across it denominated in
// millionths of a satoshi.
FeeProportionalMillionths uint32 `protobuf:"varint,4,opt,name=fee_proportional_millionths,json=feeProportionalMillionths,proto3" json:"fee_proportional_millionths,omitempty"`
@ -116,7 +115,6 @@ type RouteHint struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
//
// A list of hop hints that when chained together can assist in reaching a
// specific destination.
HopHints []*HopHint `protobuf:"bytes,1,rep,name=hop_hints,json=hopHints,proto3" json:"hop_hints,omitempty"`

@ -41,7 +41,6 @@ const (
// Loop will use native segwit (P2WSH) htlcs by default, while externally
// published htlcs may use native (P2WSH) or nested (NP2WSH) segwit as well.
ProtocolVersion_NATIVE_SEGWIT_LOOP_IN ProtocolVersion = 2
//
// Once the on chain loop out htlc is confirmed, the client can push the swap
// preimage to the server to speed up claim of their off chain htlc (acquiring
// incoming liquidity more quickly than if the server waited for the on chain
@ -138,7 +137,6 @@ const (
ServerSwapState_SERVER_HTLC_PUBLISHED ServerSwapState = 1
// The swap completed successfully.
ServerSwapState_SERVER_SUCCESS ServerSwapState = 2
//
// The swap failed for a reason that is unknown to the server, this is only
// set for older swaps.
ServerSwapState_SERVER_FAILED_UNKNOWN ServerSwapState = 3
@ -146,13 +144,11 @@ const (
ServerSwapState_SERVER_FAILED_NO_HTLC ServerSwapState = 4
// A loop in htlc confirmed on chain, but it did not have the correct value.
ServerSwapState_SERVER_FAILED_INVALID_HTLC_AMOUNT ServerSwapState = 5
//
// We did not succeed in completing the loop in off chain payment before the
// timeout.
ServerSwapState_SERVER_FAILED_OFF_CHAIN_TIMEOUT ServerSwapState = 6
// The on chain timeout was claimed.
ServerSwapState_SERVER_FAILED_TIMEOUT ServerSwapState = 7
//
// The server could not publish the loop out on chain htlc before the deadline
// provided.
ServerSwapState_SERVER_FAILED_SWAP_DEADLINE ServerSwapState = 8
@ -169,11 +165,9 @@ const (
// The client canceled the swap because they could not route the swap
// payment.
ServerSwapState_SERVER_CLIENT_INVOICE_CANCEL ServerSwapState = 14
//
// A loop in swap was rejected because it contained multiple outputs for a
// single swap.
ServerSwapState_SERVER_FAILED_MULTIPLE_SWAP_SCRIPTS ServerSwapState = 15
//
// The swap failed during creation.
ServerSwapState_SERVER_FAILED_INITIALIZATION ServerSwapState = 16
)
@ -306,24 +300,18 @@ func (RoutePaymentType) EnumDescriptor() ([]byte, []int) {
type PaymentFailureReason int32
const (
//
// Payment isn't failed (yet).
PaymentFailureReason_LND_FAILURE_REASON_NONE PaymentFailureReason = 0
//
// There are more routes to try, but the payment timeout was exceeded.
PaymentFailureReason_LND_FAILURE_REASON_TIMEOUT PaymentFailureReason = 1
//
// All possible routes were tried and failed permanently. Or were no
// routes to the destination at all.
PaymentFailureReason_LND_FAILURE_REASON_NO_ROUTE PaymentFailureReason = 2
//
// A non-recoverable error has occured.
PaymentFailureReason_LND_FAILURE_REASON_ERROR PaymentFailureReason = 3
//
// Payment details incorrect (unknown hash, invalid amt or
// invalid final cltv delta)
PaymentFailureReason_LND_FAILURE_REASON_INCORRECT_PAYMENT_DETAILS PaymentFailureReason = 4
//
// Insufficient local balance.
PaymentFailureReason_LND_FAILURE_REASON_INSUFFICIENT_BALANCE PaymentFailureReason = 5
)
@ -488,8 +476,11 @@ type ServerLoopOutRequest struct {
// The user agent string that identifies the software running on the user's
// side. This can be changed in the user's client software but it _SHOULD_
// conform to the following pattern:
//
// Agent-Name/semver-version(/additional-info)
//
// Examples:
//
// loopd/v0.10.0-beta/commit=3b635821
// litd/v0.2.0-alpha/commit=326d754
UserAgent string `protobuf:"bytes,7,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
@ -679,8 +670,11 @@ type ServerLoopOutQuoteRequest struct {
// The user agent string that identifies the software running on the user's
// side. This can be changed in the user's client software but it _SHOULD_
// conform to the following pattern:
//
// Agent-Name/semver-version(/additional-info)
//
// Examples:
//
// loopd/v0.10.0-beta/commit=3b635821
// litd/v0.2.0-alpha/commit=326d754
UserAgent string `protobuf:"bytes,5,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
@ -872,8 +866,11 @@ type ServerLoopOutTermsRequest struct {
// The user agent string that identifies the software running on the user's
// side. This can be changed in the user's client software but it _SHOULD_
// conform to the following pattern:
//
// Agent-Name/semver-version(/additional-info)
//
// Examples:
//
// loopd/v0.10.0-beta/commit=3b635821
// litd/v0.2.0-alpha/commit=326d754
UserAgent string `protobuf:"bytes,2,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
@ -1016,8 +1013,11 @@ type ServerLoopInRequest struct {
// The user agent string that identifies the software running on the user's
// side. This can be changed in the user's client software but it _SHOULD_
// conform to the following pattern:
//
// Agent-Name/semver-version(/additional-info)
//
// Examples:
//
// loopd/v0.10.0-beta/commit=3b635821
// litd/v0.2.0-alpha/commit=326d754
UserAgent string `protobuf:"bytes,8,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
@ -1208,8 +1208,11 @@ type ServerLoopInQuoteRequest struct {
// The user agent string that identifies the software running on the user's
// side. This can be changed in the user's client software but it _SHOULD_
// conform to the following pattern:
//
// Agent-Name/semver-version(/additional-info)
//
// Examples:
//
// loopd/v0.10.0-beta/commit=3b635821
// litd/v0.2.0-alpha/commit=326d754
UserAgent string `protobuf:"bytes,6,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
@ -1384,8 +1387,11 @@ type ServerLoopInTermsRequest struct {
// The user agent string that identifies the software running on the user's
// side. This can be changed in the user's client software but it _SHOULD_
// conform to the following pattern:
//
// Agent-Name/semver-version(/additional-info)
//
// Examples:
//
// loopd/v0.10.0-beta/commit=3b635821
// litd/v0.2.0-alpha/commit=326d754
UserAgent string `protobuf:"bytes,2,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
@ -1502,7 +1508,6 @@ type ServerLoopOutPushPreimageRequest struct {
// The protocol version that the client adheres to.
ProtocolVersion ProtocolVersion `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3,enum=looprpc.ProtocolVersion" json:"protocol_version,omitempty"`
//
// Preimage is the preimage of the loop out swap that we wish to push to the
// server to speed up off-chain claim once the on-chain htlc has confirmed.
Preimage []byte `protobuf:"bytes,2,opt,name=preimage,proto3" json:"preimage,omitempty"`
@ -1893,6 +1898,7 @@ type CancelLoopOutSwapRequest struct {
// Additional information about the swap cancelation.
//
// Types that are assignable to CancelInfo:
//
// *CancelLoopOutSwapRequest_RouteCancel
CancelInfo isCancelLoopOutSwapRequest_CancelInfo `protobuf_oneof:"cancel_info"`
}

Loading…
Cancel
Save