From 604b8ce33f4152787b91264b9821db29fe918cc6 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Wed, 17 Apr 2024 15:49:04 -0300 Subject: [PATCH] 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. --- looprpc/Dockerfile | 12 +- looprpc/client.pb.go | 929 +++++++++++++++---------------------- looprpc/client_grpc.pb.go | 158 ++++--- looprpc/debug_grpc.pb.go | 14 +- swapserverrpc/Dockerfile | 6 +- swapserverrpc/common.pb.go | 10 +- swapserverrpc/server.pb.go | 158 ++++--- 7 files changed, 553 insertions(+), 734 deletions(-) diff --git a/looprpc/Dockerfile b/looprpc/Dockerfile index a79af71..9e84242 100644 --- a/looprpc/Dockerfile +++ b/looprpc/Dockerfile @@ -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 diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index 042b1b4..52f220a 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -21,11 +21,10 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// `AddressType` has to be one of: // -//`AddressType` has to be one of: -// -//- `unknown`: Unknown address type -//- `p2tr`: Pay to taproot pubkey (`TAPROOT_PUBKEY` = 1) +// - `unknown`: Unknown address type +// - `p2tr`: Pay to taproot pubkey (`TAPROOT_PUBKEY` = 1) type AddressType int32 const ( @@ -123,33 +122,27 @@ 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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,48 +196,38 @@ 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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,56 +336,43 @@ 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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,104 +496,86 @@ type LoopOutRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //Requested swap amount in sat. This does not include the swap and miner fee. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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 - //sweep tx. - // - //If the sweep tx is not confirmed, we are forced to ratchet up fees until it - //is swept. Possibly even exceeding max_miner_fee if we get close to the htlc - //timeout. Because the initial publication revealed the preimage, we have no - //other choice. The server may already have pulled the off-chain htlc. Only - //when the fee becomes higher than the swap amount, we can only wait for fees - //to come down and hope - if we are past the timeout - that the server is not - //publishing the revocation. - // - //max_miner_fee is typically taken from the response of the GetQuote call. + // 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 + // sweep tx. + // + // If the sweep tx is not confirmed, we are forced to ratchet up fees until it + // is swept. Possibly even exceeding max_miner_fee if we get close to the htlc + // timeout. Because the initial publication revealed the preimage, we have no + // other choice. The server may already have pulled the off-chain htlc. Only + // when the fee becomes higher than the swap amount, we can only wait for fees + // to come down and hope - if we are past the timeout - that the server is not + // publishing the revocation. + // + // 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, 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. + // 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. + // 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. + // 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. + // 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. + // 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). + // 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. + // 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. + // 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. + // 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 - //be equal to the sum of the amounts of the reservations. + // 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 + // be equal to the sum of the amounts of the reservations. ReservationIds [][]byte `protobuf:"bytes,18,rep,name=reservation_ids,json=reservationIds,proto3" json:"reservation_ids,omitempty"` } @@ -791,52 +743,42 @@ type LoopInRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //Requested swap amount in sat. This does not include the swap and miner - //fee. + // 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. + // 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. // - //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. + // 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. + // 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. + // 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. + // 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. + // 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). + // 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. + // 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. + // 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 `protobuf:"varint,10,opt,name=private,proto3" json:"private,omitempty"` } @@ -947,31 +889,27 @@ 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 - //favor of id_bytes and will be removed in a future release. + // 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 + // favor of id_bytes and will be removed in a future release. // // 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. + // 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 - //native segwit (P2WSH) htlc. - /// - For loop-out htlc_address always contains the native segwit (P2WSH) - //htlc address. + // 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 + // native segwit (P2WSH) htlc. + // / - For loop-out htlc_address always contains the native segwit (P2WSH) + // htlc address. // // 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. + // 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"` // The address of the v3 (taproot) htlc. Used for both loop-in and loop-out. HtlcAddressP2Tr string `protobuf:"bytes,7,opt,name=htlc_address_p2tr,json=htlcAddressP2tr,proto3" json:"htlc_address_p2tr,omitempty"` @@ -1098,43 +1036,34 @@ type SwapStatus struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //Requested swap amount in sat. This does not include the swap and miner - //fee. + // 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 - //favor of id_bytes and will be removed in a future release. + // 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 + // favor of id_bytes and will be removed in a future release. // // 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. + // 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. + // 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 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. + // 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. + // 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. + // 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. - //- For loop-out htlc_address always contains the native segwit (P2WSH) - //htlc address. + // 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. + // - For loop-out htlc_address always contains the native segwit (P2WSH) + // htlc address. // // Deprecated: Marked as deprecated in client.proto. HtlcAddress string `protobuf:"bytes,7,opt,name=htlc_address,json=htlcAddress,proto3" json:"htlc_address,omitempty"` @@ -1446,8 +1375,7 @@ type ListSwapsResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The list of all currently known swaps and their status. + // The list of all currently known swaps and their status. Swaps []*SwapStatus `protobuf:"bytes,1,rep,name=swaps,proto3" json:"swaps,omitempty"` } @@ -1495,9 +1423,8 @@ 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. + // 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,11 +1510,9 @@ type InTermsResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //Minimum swap amount (sat) + // 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) + // Maximum swap amount (sat) MaxSwapAmount int64 `protobuf:"varint,6,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"` } @@ -1642,11 +1567,9 @@ type OutTermsResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //Minimum swap amount (sat) + // 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) + // 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. MinCltvDelta int32 `protobuf:"varint,8,opt,name=min_cltv_delta,json=minCltvDelta,proto3" json:"min_cltv_delta,omitempty"` @@ -1719,38 +1642,31 @@ type QuoteRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The amount to swap in satoshis. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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 `protobuf:"varint,7,opt,name=private,proto3" json:"private,omitempty"` } @@ -1840,22 +1756,18 @@ type InQuoteResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The fee that the swap server is charging for the swap. + // 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 - //returned, it means lnd's wallet tried to estimate the fee but was unable to - //create a sample estimation transaction because not enough funds are - //available. An information message should be shown to the user in this case. + // 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 + // returned, it means lnd's wallet tried to estimate the fee but was unable to + // 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 + // 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. + // 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,25 +1836,19 @@ type OutQuoteResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The fee that the swap server is charging for the swap. + // 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. + // 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. + // 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. + // 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 + // 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. + // 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,14 +1931,11 @@ type ProbeRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The amount to probe. + // The amount to probe. Amt int64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"` - // - //Optional last hop of the route to probe. + // 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. + // 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,8 +2073,7 @@ type TokensResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //List of all tokens the daemon knows of, including old/expired tokens. + // 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,35 +2121,26 @@ type LsatToken struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The base macaroon that was baked by the auth server. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // The l402 ID of the token. Id string `protobuf:"bytes,9,opt,name=id,proto3" json:"id,omitempty"` } @@ -2351,20 +2244,15 @@ type LoopStats struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //Number of currently pending swaps. + // 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. + // Number of succeeded swaps. SuccessCount uint64 `protobuf:"varint,2,opt,name=success_count,json=successCount,proto3" json:"success_count,omitempty"` - // - //Number failed swaps. + // 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. + // 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. + // 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,29 +2366,21 @@ type GetInfoResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The current daemon version. + // The current daemon version. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // - //The network the daemon is running on. + // 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. + // 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. + // 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. + // 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 + // 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. + // 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. + // Statistics about loop ins. LoopInStats *LoopStats `protobuf:"bytes,8,opt,name=loop_in_stats,json=loopInStats,proto3" json:"loop_in_stats,omitempty"` } @@ -2635,116 +2515,92 @@ type LiquidityParameters struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //A set of liquidity rules that describe the desired liquidity balance. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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 - //that were completed before this date will not be included in budget - //calculations. + // 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 + // that were completed before this date will not be included in budget + // calculations. // // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // 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,29 +2810,24 @@ 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. + // 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. + // 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 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. + // 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. + // 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,11 +2910,10 @@ 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 - //of parameters should be provided for each call. + // 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 + // of parameters should be provided for each call. Parameters *LiquidityParameters `protobuf:"bytes,1,opt,name=parameters,proto3" json:"parameters,omitempty"` } @@ -3187,14 +3037,11 @@ type Disqualified struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The short channel ID of the channel that was excluded from our suggestions. + // 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. + // 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. + // 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,15 +3103,12 @@ type SuggestSwapsResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The set of recommended loop outs. + // 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 + // 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 contains the set of channels that swaps are not recommended + // for. Disqualified []*Disqualified `protobuf:"bytes,2,rep,name=disqualified,proto3" json:"disqualified,omitempty"` } @@ -3326,14 +3170,12 @@ 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. + // 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. + // 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. IKnowWhatIAmDoing bool `protobuf:"varint,2,opt,name=i_know_what_i_am_doing,json=iKnowWhatIAmDoing,proto3" json:"i_know_what_i_am_doing,omitempty"` } @@ -3464,8 +3306,7 @@ type ListReservationsResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The list of all currently known reservations and their status. + // The list of all currently known reservations and their status. Reservations []*ClientReservation `protobuf:"bytes,1,rep,name=reservations,proto3" json:"reservations,omitempty"` } @@ -3513,23 +3354,17 @@ type ClientReservation struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The reservation id that identifies this reservation. + // 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. + // 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. + // 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. + // 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. + // The vout of the reservation. Vout uint32 `protobuf:"varint,5,opt,name=vout,proto3" json:"vout,omitempty"` - // - //The expiry of the reservation. + // The expiry of the reservation. Expiry uint32 `protobuf:"varint,6,opt,name=expiry,proto3" json:"expiry,omitempty"` } @@ -3612,17 +3447,14 @@ type InstantOutRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The reservations to use for the swap. + // 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. + // 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. + // 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,14 +3516,11 @@ type InstantOutResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The hash of the swap preimage. + // 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. + // 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. + // The state of the swap. State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` } @@ -3753,11 +3582,9 @@ type InstantOutQuoteRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The amount to swap in satoshis. + // 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. + // 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,12 +3639,10 @@ type InstantOutQuoteResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The fee that the swap service is charging for the swap. + // 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. + // 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,8 +3735,7 @@ type ListInstantOutsResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The list of all currently known instant out swaps and their status. + // 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,20 +3783,15 @@ type InstantOut struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //The swap hash that identifies this swap. + // 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. + // The state the swap is in. State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` - // - //The amount of the swap. + // The amount of the swap. Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` - // - //The used reservations for the swap. + // 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. + // 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"` } diff --git a/looprpc/client_grpc.pb.go b/looprpc/client_grpc.pb.go index 8f4f519..4c35e42 100644 --- a/looprpc/client_grpc.pb.go +++ b/looprpc/client_grpc.pb.go @@ -19,83 +19,82 @@ 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 SwapClientClient interface { // loop: `out` - //LoopOut initiates an loop out swap with the given parameters. The call - //returns after the swap has been set up with the swap server. From that - //point onwards, progress can be tracked via the SwapStatus stream that is - //returned from Monitor(). + // LoopOut initiates an loop out swap with the given parameters. The call + // returns after the swap has been set up with the swap server. From that + // point onwards, progress can be tracked via the SwapStatus stream that is + // returned from Monitor(). LoopOut(ctx context.Context, in *LoopOutRequest, opts ...grpc.CallOption) (*SwapResponse, error) // loop: `in` - //LoopIn initiates a loop in swap with the given parameters. The call - //returns after the swap has been set up with the swap server. From that - //point onwards, progress can be tracked via the SwapStatus stream - //that is returned from Monitor(). + // LoopIn initiates a loop in swap with the given parameters. The call + // returns after the swap has been set up with the swap server. From that + // point onwards, progress can be tracked via the SwapStatus stream + // that is returned from Monitor(). LoopIn(ctx context.Context, in *LoopInRequest, opts ...grpc.CallOption) (*SwapResponse, error) // loop: `monitor` - //Monitor will return a stream of swap updates for currently active swaps. + // Monitor will return a stream of swap updates for currently active swaps. Monitor(ctx context.Context, in *MonitorRequest, opts ...grpc.CallOption) (SwapClient_MonitorClient, error) // loop: `listswaps` - //ListSwaps returns a list of all currently known swaps and their current - //status. + // ListSwaps returns a list of all currently known swaps and their current + // status. ListSwaps(ctx context.Context, in *ListSwapsRequest, opts ...grpc.CallOption) (*ListSwapsResponse, error) // loop: `swapinfo` - //SwapInfo returns all known details about a single swap. + // SwapInfo returns all known details about a single swap. SwapInfo(ctx context.Context, in *SwapInfoRequest, opts ...grpc.CallOption) (*SwapStatus, error) // loop: `abandonswap` - //AbandonSwap allows the client to abandon a swap. + // AbandonSwap allows the client to abandon a swap. AbandonSwap(ctx context.Context, in *AbandonSwapRequest, opts ...grpc.CallOption) (*AbandonSwapResponse, error) // loop: `terms` - //LoopOutTerms returns the terms that the server enforces for a loop out swap. + // LoopOutTerms returns the terms that the server enforces for a loop out swap. LoopOutTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*OutTermsResponse, error) // loop: `quote` - //LoopOutQuote returns a quote for a loop out swap with the provided - //parameters. + // LoopOutQuote returns a quote for a loop out swap with the provided + // parameters. LoopOutQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*OutQuoteResponse, error) // loop: `terms` - //GetTerms returns the terms that the server enforces for swaps. + // GetTerms returns the terms that the server enforces for swaps. GetLoopInTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*InTermsResponse, error) // loop: `quote` - //GetQuote returns a quote for a swap with the provided parameters. + // 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 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) // loop: `listauth` - //GetLsatTokens returns all LSAT tokens the daemon ever paid for. + // GetLsatTokens returns all LSAT tokens the daemon ever paid for. GetLsatTokens(ctx context.Context, in *TokensRequest, opts ...grpc.CallOption) (*TokensResponse, error) // loop: `getinfo` - //GetInfo gets basic information about the loop daemon. + // GetInfo gets basic information about the loop daemon. GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) // loop: `getparams` - //GetLiquidityParams gets the parameters that the daemon's liquidity manager - //is currently configured with. This may be nil if nothing is configured. - //[EXPERIMENTAL]: endpoint is subject to change. + // GetLiquidityParams gets the parameters that the daemon's liquidity manager + // is currently configured with. This may be nil if nothing is configured. + // [EXPERIMENTAL]: endpoint is subject to change. GetLiquidityParams(ctx context.Context, in *GetLiquidityParamsRequest, opts ...grpc.CallOption) (*LiquidityParameters, error) // loop: `setparams` - //SetLiquidityParams sets a new set of parameters for the daemon's liquidity - //manager. Note that the full set of parameters must be provided, because - //this call fully overwrites our existing parameters. - //[EXPERIMENTAL]: endpoint is subject to change. + // SetLiquidityParams sets a new set of parameters for the daemon's liquidity + // manager. Note that the full set of parameters must be provided, because + // this call fully overwrites our existing parameters. + // [EXPERIMENTAL]: endpoint is subject to change. SetLiquidityParams(ctx context.Context, in *SetLiquidityParamsRequest, opts ...grpc.CallOption) (*SetLiquidityParamsResponse, error) // loop: `suggestswaps` - //SuggestSwaps returns a list of recommended swaps based on the current - //state of your node's channels and it's liquidity manager parameters. - //Note that only loop out suggestions are currently supported. - //[EXPERIMENTAL]: endpoint is subject to change. + // SuggestSwaps returns a list of recommended swaps based on the current + // state of your node's channels and it's liquidity manager parameters. + // Note that only loop out suggestions are currently supported. + // [EXPERIMENTAL]: endpoint is subject to change. SuggestSwaps(ctx context.Context, in *SuggestSwapsRequest, opts ...grpc.CallOption) (*SuggestSwapsResponse, error) // loop: `listreservations` - //ListReservations returns a list of all reservations the server opened to us. + // ListReservations returns a list of all reservations the server opened to us. ListReservations(ctx context.Context, in *ListReservationsRequest, opts ...grpc.CallOption) (*ListReservationsResponse, error) // loop: `instantout` - //InstantOut initiates an instant out swap with the given parameters. + // InstantOut initiates an instant out swap with the given parameters. InstantOut(ctx context.Context, in *InstantOutRequest, opts ...grpc.CallOption) (*InstantOutResponse, error) // loop: `instantoutquote` - //InstantOutQuote returns a quote for an instant out swap with the provided - //parameters. + // InstantOutQuote returns a quote for an instant out swap with the provided + // parameters. InstantOutQuote(ctx context.Context, in *InstantOutQuoteRequest, opts ...grpc.CallOption) (*InstantOutQuoteResponse, error) // loop: `listinstantouts` - //ListInstantOuts returns a list of all currently known instant out swaps and - //their current status. + // ListInstantOuts returns a list of all currently known instant out swaps and + // their current status. ListInstantOuts(ctx context.Context, in *ListInstantOutsRequest, opts ...grpc.CallOption) (*ListInstantOutsResponse, error) } @@ -315,83 +314,82 @@ func (c *swapClientClient) ListInstantOuts(ctx context.Context, in *ListInstantO // for forward compatibility type SwapClientServer interface { // loop: `out` - //LoopOut initiates an loop out swap with the given parameters. The call - //returns after the swap has been set up with the swap server. From that - //point onwards, progress can be tracked via the SwapStatus stream that is - //returned from Monitor(). + // LoopOut initiates an loop out swap with the given parameters. The call + // returns after the swap has been set up with the swap server. From that + // point onwards, progress can be tracked via the SwapStatus stream that is + // returned from Monitor(). LoopOut(context.Context, *LoopOutRequest) (*SwapResponse, error) // loop: `in` - //LoopIn initiates a loop in swap with the given parameters. The call - //returns after the swap has been set up with the swap server. From that - //point onwards, progress can be tracked via the SwapStatus stream - //that is returned from Monitor(). + // LoopIn initiates a loop in swap with the given parameters. The call + // returns after the swap has been set up with the swap server. From that + // point onwards, progress can be tracked via the SwapStatus stream + // that is returned from Monitor(). LoopIn(context.Context, *LoopInRequest) (*SwapResponse, error) // loop: `monitor` - //Monitor will return a stream of swap updates for currently active swaps. + // Monitor will return a stream of swap updates for currently active swaps. Monitor(*MonitorRequest, SwapClient_MonitorServer) error // loop: `listswaps` - //ListSwaps returns a list of all currently known swaps and their current - //status. + // ListSwaps returns a list of all currently known swaps and their current + // status. ListSwaps(context.Context, *ListSwapsRequest) (*ListSwapsResponse, error) // loop: `swapinfo` - //SwapInfo returns all known details about a single swap. + // SwapInfo returns all known details about a single swap. SwapInfo(context.Context, *SwapInfoRequest) (*SwapStatus, error) // loop: `abandonswap` - //AbandonSwap allows the client to abandon a swap. + // AbandonSwap allows the client to abandon a swap. AbandonSwap(context.Context, *AbandonSwapRequest) (*AbandonSwapResponse, error) // loop: `terms` - //LoopOutTerms returns the terms that the server enforces for a loop out swap. + // LoopOutTerms returns the terms that the server enforces for a loop out swap. LoopOutTerms(context.Context, *TermsRequest) (*OutTermsResponse, error) // loop: `quote` - //LoopOutQuote returns a quote for a loop out swap with the provided - //parameters. + // LoopOutQuote returns a quote for a loop out swap with the provided + // parameters. LoopOutQuote(context.Context, *QuoteRequest) (*OutQuoteResponse, error) // loop: `terms` - //GetTerms returns the terms that the server enforces for swaps. + // GetTerms returns the terms that the server enforces for swaps. GetLoopInTerms(context.Context, *TermsRequest) (*InTermsResponse, error) // loop: `quote` - //GetQuote returns a quote for a swap with the provided parameters. + // 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 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) // loop: `listauth` - //GetLsatTokens returns all LSAT tokens the daemon ever paid for. + // GetLsatTokens returns all LSAT tokens the daemon ever paid for. GetLsatTokens(context.Context, *TokensRequest) (*TokensResponse, error) // loop: `getinfo` - //GetInfo gets basic information about the loop daemon. + // GetInfo gets basic information about the loop daemon. GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) // loop: `getparams` - //GetLiquidityParams gets the parameters that the daemon's liquidity manager - //is currently configured with. This may be nil if nothing is configured. - //[EXPERIMENTAL]: endpoint is subject to change. + // GetLiquidityParams gets the parameters that the daemon's liquidity manager + // is currently configured with. This may be nil if nothing is configured. + // [EXPERIMENTAL]: endpoint is subject to change. GetLiquidityParams(context.Context, *GetLiquidityParamsRequest) (*LiquidityParameters, error) // loop: `setparams` - //SetLiquidityParams sets a new set of parameters for the daemon's liquidity - //manager. Note that the full set of parameters must be provided, because - //this call fully overwrites our existing parameters. - //[EXPERIMENTAL]: endpoint is subject to change. + // SetLiquidityParams sets a new set of parameters for the daemon's liquidity + // manager. Note that the full set of parameters must be provided, because + // this call fully overwrites our existing parameters. + // [EXPERIMENTAL]: endpoint is subject to change. SetLiquidityParams(context.Context, *SetLiquidityParamsRequest) (*SetLiquidityParamsResponse, error) // loop: `suggestswaps` - //SuggestSwaps returns a list of recommended swaps based on the current - //state of your node's channels and it's liquidity manager parameters. - //Note that only loop out suggestions are currently supported. - //[EXPERIMENTAL]: endpoint is subject to change. + // SuggestSwaps returns a list of recommended swaps based on the current + // state of your node's channels and it's liquidity manager parameters. + // Note that only loop out suggestions are currently supported. + // [EXPERIMENTAL]: endpoint is subject to change. SuggestSwaps(context.Context, *SuggestSwapsRequest) (*SuggestSwapsResponse, error) // loop: `listreservations` - //ListReservations returns a list of all reservations the server opened to us. + // ListReservations returns a list of all reservations the server opened to us. ListReservations(context.Context, *ListReservationsRequest) (*ListReservationsResponse, error) // loop: `instantout` - //InstantOut initiates an instant out swap with the given parameters. + // InstantOut initiates an instant out swap with the given parameters. InstantOut(context.Context, *InstantOutRequest) (*InstantOutResponse, error) // loop: `instantoutquote` - //InstantOutQuote returns a quote for an instant out swap with the provided - //parameters. + // InstantOutQuote returns a quote for an instant out swap with the provided + // parameters. InstantOutQuote(context.Context, *InstantOutQuoteRequest) (*InstantOutQuoteResponse, error) // loop: `listinstantouts` - //ListInstantOuts returns a list of all currently known instant out swaps and - //their current status. + // ListInstantOuts returns a list of all currently known instant out swaps and + // their current status. ListInstantOuts(context.Context, *ListInstantOutsRequest) (*ListInstantOutsResponse, error) mustEmbedUnimplementedSwapClientServer() } diff --git a/looprpc/debug_grpc.pb.go b/looprpc/debug_grpc.pb.go index 99d3758..3d7613a 100644 --- a/looprpc/debug_grpc.pb.go +++ b/looprpc/debug_grpc.pb.go @@ -18,10 +18,9 @@ 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. + // 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. ForceAutoLoop(ctx context.Context, in *ForceAutoLoopRequest, opts ...grpc.CallOption) (*ForceAutoLoopResponse, error) } @@ -46,10 +45,9 @@ 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. + // 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. ForceAutoLoop(context.Context, *ForceAutoLoopRequest) (*ForceAutoLoopResponse, error) mustEmbedUnimplementedDebugServer() } diff --git a/swapserverrpc/Dockerfile b/swapserverrpc/Dockerfile index 1c96778..614da86 100644 --- a/swapserverrpc/Dockerfile +++ b/swapserverrpc/Dockerfile @@ -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 diff --git a/swapserverrpc/common.pb.go b/swapserverrpc/common.pb.go index a5452d2..8d166c3 100644 --- a/swapserverrpc/common.pb.go +++ b/swapserverrpc/common.pb.go @@ -36,9 +36,8 @@ 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. + // 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"` // The time-lock delta of the channel. CltvExpiryDelta uint32 `protobuf:"varint,5,opt,name=cltv_expiry_delta,json=cltvExpiryDelta,proto3" json:"cltv_expiry_delta,omitempty"` @@ -116,9 +115,8 @@ 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. + // 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"` } diff --git a/swapserverrpc/server.pb.go b/swapserverrpc/server.pb.go index 649aee9..45cdffe 100644 --- a/swapserverrpc/server.pb.go +++ b/swapserverrpc/server.pb.go @@ -25,27 +25,26 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -//* -//This enum defines the protocol versions that clients may adhere to. Note that -//this is not a flagged enum. If a particular protocol version adds a feature, -//then in general all the preceding features are also supported. Exception to this -//is when features get deprecated. +// * +// This enum defines the protocol versions that clients may adhere to. Note that +// this is not a flagged enum. If a particular protocol version adds a feature, +// then in general all the preceding features are also supported. Exception to this +// is when features get deprecated. type ProtocolVersion int32 const ( - /// No protocol version reported at all. + // / No protocol version reported at all. ProtocolVersion_LEGACY ProtocolVersion = 0 - /// Client may attempt to send the loop out payment in multiple parts. + // / Client may attempt to send the loop out payment in multiple parts. ProtocolVersion_MULTI_LOOP_OUT ProtocolVersion = 1 - //* - //Loop will use native segwit (P2WSH) htlcs by default, while externally - //published htlcs may use native (P2WSH) or nested (NP2WSH) segwit as well. + // * + // 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 - //claim tx). + // 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 + // claim tx). ProtocolVersion_PREIMAGE_PUSH_LOOP_OUT ProtocolVersion = 3 // The client will propose a cltv expiry height for loop out. ProtocolVersion_USER_EXPIRY_LOOP_OUT ProtocolVersion = 4 @@ -138,23 +137,20 @@ 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. + // 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 // No htlc was confirmed in time for the loop in swap to complete. 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. + // 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. + // The server could not publish the loop out on chain htlc before the deadline + // provided. ServerSwapState_SERVER_FAILED_SWAP_DEADLINE ServerSwapState = 8 // The server could not publish the loop out on chain htlc. ServerSwapState_SERVER_FAILED_HTLC_PUBLICATION ServerSwapState = 9 @@ -169,12 +165,10 @@ 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. + // 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. + // The swap failed during creation. ServerSwapState_SERVER_FAILED_INITIALIZATION ServerSwapState = 16 ) @@ -306,25 +300,19 @@ func (RoutePaymentType) EnumDescriptor() ([]byte, []int) { type PaymentFailureReason int32 const ( - // - //Payment isn't failed (yet). + // Payment isn't failed (yet). PaymentFailureReason_LND_FAILURE_REASON_NONE PaymentFailureReason = 0 - // - //There are more routes to try, but the payment timeout was exceeded. + // 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. + // 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. + // 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) + // Payment details incorrect (unknown hash, invalid amt or + // invalid final cltv delta) PaymentFailureReason_LND_FAILURE_REASON_INCORRECT_PAYMENT_DETAILS PaymentFailureReason = 4 - // - //Insufficient local balance. + // Insufficient local balance. PaymentFailureReason_LND_FAILURE_REASON_INSUFFICIENT_BALANCE PaymentFailureReason = 5 ) @@ -477,9 +465,9 @@ type ServerLoopOutRequest struct { ReceiverKey []byte `protobuf:"bytes,1,opt,name=receiver_key,json=receiverKey,proto3" json:"receiver_key,omitempty"` SwapHash []byte `protobuf:"bytes,2,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` Amt uint64 `protobuf:"varint,3,opt,name=amt,proto3" json:"amt,omitempty"` - /// The unix time in seconds we want the on-chain swap to be published by. + // / The unix time in seconds we want the on-chain swap to be published by. SwapPublicationDeadline int64 `protobuf:"varint,4,opt,name=swap_publication_deadline,json=swapPublicationDeadline,proto3" json:"swap_publication_deadline,omitempty"` - /// The protocol version that the client adheres to. + // / The protocol version that the client adheres to. ProtocolVersion ProtocolVersion `protobuf:"varint,5,opt,name=protocol_version,json=protocolVersion,proto3,enum=looprpc.ProtocolVersion" json:"protocol_version,omitempty"` // The requested absolute block height of the on-chain htlc. This is // subjected to min and max constraints as reported in the LoopOutTerms @@ -488,10 +476,13 @@ 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) + // + // Agent-Name/semver-version(/additional-info) + // // Examples: - // loopd/v0.10.0-beta/commit=3b635821 - // litd/v0.2.0-alpha/commit=326d754 + // + // 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"` } @@ -666,11 +657,11 @@ type ServerLoopOutQuoteRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - /// The swap amount. If zero, a quote for a maximum amt swap will be given. + // / The swap amount. If zero, a quote for a maximum amt swap will be given. Amt uint64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"` - /// The unix time in seconds we want the on-chain swap to be published by. + // / The unix time in seconds we want the on-chain swap to be published by. SwapPublicationDeadline int64 `protobuf:"varint,2,opt,name=swap_publication_deadline,json=swapPublicationDeadline,proto3" json:"swap_publication_deadline,omitempty"` - /// The protocol version that the client adheres to. + // / The protocol version that the client adheres to. ProtocolVersion ProtocolVersion `protobuf:"varint,3,opt,name=protocol_version,json=protocolVersion,proto3,enum=looprpc.ProtocolVersion" json:"protocol_version,omitempty"` // The requested absolute block height of the on-chain htlc. This is // subjected to min and max constraints as reported in the LoopOutTerms @@ -679,10 +670,13 @@ 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) + // + // Agent-Name/semver-version(/additional-info) + // // Examples: - // loopd/v0.10.0-beta/commit=3b635821 - // litd/v0.2.0-alpha/commit=326d754 + // + // 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"` } @@ -759,9 +753,9 @@ type ServerLoopOutQuote struct { unknownFields protoimpl.UnknownFields SwapPaymentDest string `protobuf:"bytes,1,opt,name=swap_payment_dest,json=swapPaymentDest,proto3" json:"swap_payment_dest,omitempty"` - /// The total estimated swap fee given the quote amt. + // / The total estimated swap fee given the quote amt. SwapFee int64 `protobuf:"varint,2,opt,name=swap_fee,json=swapFee,proto3" json:"swap_fee,omitempty"` - /// Deprecated, total swap fee given quote amt is calculated in swap_fee. + // / Deprecated, total swap fee given quote amt is calculated in swap_fee. // // Deprecated: Marked as deprecated in server.proto. SwapFeeRate int64 `protobuf:"varint,3,opt,name=swap_fee_rate,json=swapFeeRate,proto3" json:"swap_fee_rate,omitempty"` @@ -867,15 +861,18 @@ type ServerLoopOutTermsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - /// The protocol version that the client adheres to. + // / 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"` // 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) + // + // Agent-Name/semver-version(/additional-info) + // // Examples: - // loopd/v0.10.0-beta/commit=3b635821 - // litd/v0.2.0-alpha/commit=326d754 + // + // 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"` } @@ -1009,17 +1006,20 @@ type ServerLoopInRequest struct { Amt uint64 `protobuf:"varint,3,opt,name=amt,proto3" json:"amt,omitempty"` SwapInvoice string `protobuf:"bytes,4,opt,name=swap_invoice,json=swapInvoice,proto3" json:"swap_invoice,omitempty"` LastHop []byte `protobuf:"bytes,5,opt,name=last_hop,json=lastHop,proto3" json:"last_hop,omitempty"` - /// The protocol version that the client adheres to. + // / The protocol version that the client adheres to. ProtocolVersion ProtocolVersion `protobuf:"varint,6,opt,name=protocol_version,json=protocolVersion,proto3,enum=looprpc.ProtocolVersion" json:"protocol_version,omitempty"` // An invoice that can be used for the purpose of probing. ProbeInvoice string `protobuf:"bytes,7,opt,name=probe_invoice,json=probeInvoice,proto3" json:"probe_invoice,omitempty"` // 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) + // + // Agent-Name/semver-version(/additional-info) + // // Examples: - // loopd/v0.10.0-beta/commit=3b635821 - // litd/v0.2.0-alpha/commit=326d754 + // + // 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"` } @@ -1195,7 +1195,7 @@ type ServerLoopInQuoteRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - /// The swap amount. If zero, a quote for a maximum amt swap will be given. + // / The swap amount. If zero, a quote for a maximum amt swap will be given. Amt uint64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"` // The destination pubkey. Pubkey []byte `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"` @@ -1203,15 +1203,18 @@ type ServerLoopInQuoteRequest struct { LastHop []byte `protobuf:"bytes,4,opt,name=last_hop,json=lastHop,proto3" json:"last_hop,omitempty"` // Optional route hints to reach the destination through private channels. RouteHints []*RouteHint `protobuf:"bytes,5,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"` - /// The protocol version that the client adheres to. + // / The protocol version that the client adheres to. ProtocolVersion ProtocolVersion `protobuf:"varint,2,opt,name=protocol_version,json=protocolVersion,proto3,enum=looprpc.ProtocolVersion" json:"protocol_version,omitempty"` // 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) + // + // Agent-Name/semver-version(/additional-info) + // // Examples: - // loopd/v0.10.0-beta/commit=3b635821 - // litd/v0.2.0-alpha/commit=326d754 + // + // 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"` } @@ -1379,15 +1382,18 @@ type ServerLoopInTermsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - /// The protocol version that the client adheres to. + // / 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"` // 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) + // + // Agent-Name/semver-version(/additional-info) + // // Examples: - // loopd/v0.10.0-beta/commit=3b635821 - // litd/v0.2.0-alpha/commit=326d754 + // + // 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,9 +1508,8 @@ 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 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"` }