2019-03-06 21:13:50 +01:00
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
2021-12-13 13:56:40 +02:00
|
|
|
|
// We can't change this to swapserverrpc, it would be a breaking change because
|
|
|
|
|
|
// the package name is also contained in the HTTP URIs and old clients would
|
|
|
|
|
|
// call the wrong endpoints. Luckily with the go_package option we can have
|
|
|
|
|
|
// different golang and RPC package names to fix protobuf namespace conflicts.
|
2019-03-06 15:53:17 -08:00
|
|
|
|
package looprpc;
|
2023-09-21 20:43:48 +03:00
|
|
|
|
import "common.proto";
|
2024-09-10 18:11:37 +02:00
|
|
|
|
import "reservation.proto";
|
2019-03-06 21:13:50 +01:00
|
|
|
|
|
2021-12-13 13:56:40 +02:00
|
|
|
|
option go_package = "github.com/lightninglabs/loop/swapserverrpc";
|
2021-05-25 16:33:44 +02:00
|
|
|
|
|
2019-03-06 21:13:50 +01:00
|
|
|
|
service SwapServer {
|
2020-04-27 15:30:52 +02:00
|
|
|
|
rpc LoopOutTerms (ServerLoopOutTermsRequest) returns (ServerLoopOutTerms);
|
2019-10-08 22:28:20 +02:00
|
|
|
|
|
2020-04-27 15:30:52 +02:00
|
|
|
|
rpc NewLoopOutSwap (ServerLoopOutRequest) returns (ServerLoopOutResponse);
|
2019-10-08 22:28:20 +02:00
|
|
|
|
|
2020-06-02 09:31:39 +02:00
|
|
|
|
rpc LoopOutPushPreimage (ServerLoopOutPushPreimageRequest)
|
|
|
|
|
|
returns (ServerLoopOutPushPreimageResponse);
|
|
|
|
|
|
|
2020-04-27 15:30:52 +02:00
|
|
|
|
rpc LoopOutQuote (ServerLoopOutQuoteRequest) returns (ServerLoopOutQuote);
|
2019-03-12 16:10:37 +01:00
|
|
|
|
|
2020-04-27 15:30:52 +02:00
|
|
|
|
rpc LoopInTerms (ServerLoopInTermsRequest) returns (ServerLoopInTerms);
|
2019-10-08 22:28:20 +02:00
|
|
|
|
|
2020-04-27 15:30:52 +02:00
|
|
|
|
rpc NewLoopInSwap (ServerLoopInRequest) returns (ServerLoopInResponse);
|
2019-03-12 16:10:37 +01:00
|
|
|
|
|
2020-04-27 15:30:52 +02:00
|
|
|
|
rpc LoopInQuote (ServerLoopInQuoteRequest)
|
|
|
|
|
|
returns (ServerLoopInQuoteResponse);
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
2020-05-29 11:27:47 +02:00
|
|
|
|
rpc SubscribeLoopOutUpdates (SubscribeUpdatesRequest)
|
2020-07-16 12:01:02 +02:00
|
|
|
|
returns (stream SubscribeLoopOutUpdatesResponse);
|
|
|
|
|
|
|
2020-05-29 11:27:47 +02:00
|
|
|
|
rpc SubscribeLoopInUpdates (SubscribeUpdatesRequest)
|
2020-07-16 12:01:02 +02:00
|
|
|
|
returns (stream SubscribeLoopInUpdatesResponse);
|
2021-05-24 08:40:12 +02:00
|
|
|
|
|
2021-05-25 16:33:44 +02:00
|
|
|
|
rpc CancelLoopOutSwap (CancelLoopOutSwapRequest)
|
2021-05-24 08:40:12 +02:00
|
|
|
|
returns (CancelLoopOutSwapResponse);
|
2021-05-10 16:55:53 +02:00
|
|
|
|
|
|
|
|
|
|
rpc Probe (ServerProbeRequest) returns (ServerProbeResponse);
|
2021-11-28 19:49:59 +01:00
|
|
|
|
|
|
|
|
|
|
rpc RecommendRoutingPlugin (RecommendRoutingPluginReq)
|
|
|
|
|
|
returns (RecommendRoutingPluginRes);
|
|
|
|
|
|
|
|
|
|
|
|
rpc ReportRoutingResult (ReportRoutingResultReq)
|
|
|
|
|
|
returns (ReportRoutingResultRes);
|
2022-05-04 22:26:24 +02:00
|
|
|
|
|
|
|
|
|
|
rpc MuSig2SignSweep (MuSig2SignSweepReq) returns (MuSig2SignSweepRes);
|
2023-01-06 18:02:29 +01:00
|
|
|
|
|
|
|
|
|
|
rpc PushKey (ServerPushKeyReq) returns (ServerPushKeyRes);
|
2023-12-11 20:09:04 +01:00
|
|
|
|
|
|
|
|
|
|
// FetchL402 is a simple non-l402-allowlisted request that is required
|
|
|
|
|
|
// in order to force the creation of an l402.
|
|
|
|
|
|
rpc FetchL402 (FetchL402Request) returns (FetchL402Response);
|
2024-09-10 18:11:37 +02:00
|
|
|
|
|
|
|
|
|
|
rpc SubscribeNotifications (SubscribeNotificationsRequest)
|
|
|
|
|
|
returns (stream SubscribeNotificationsResponse);
|
2019-03-06 21:13:50 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-04-27 15:43:30 +02:00
|
|
|
|
/**
|
|
|
|
|
|
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.
|
|
|
|
|
|
*/
|
|
|
|
|
|
enum ProtocolVersion {
|
|
|
|
|
|
/// No protocol version reported at all.
|
|
|
|
|
|
LEGACY = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/// Client may attempt to send the loop out payment in multiple parts.
|
|
|
|
|
|
MULTI_LOOP_OUT = 1;
|
2020-05-05 09:14:26 +02:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
Loop will use native segwit (P2WSH) htlcs by default, while externally
|
|
|
|
|
|
published htlcs may use native (P2WSH) or nested (NP2WSH) segwit as well.
|
|
|
|
|
|
*/
|
|
|
|
|
|
NATIVE_SEGWIT_LOOP_IN = 2;
|
2020-06-02 09:31:39 +02:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
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).
|
|
|
|
|
|
*/
|
|
|
|
|
|
PREIMAGE_PUSH_LOOP_OUT = 3;
|
2020-07-15 09:17:57 +02:00
|
|
|
|
|
|
|
|
|
|
// The client will propose a cltv expiry height for loop out.
|
|
|
|
|
|
USER_EXPIRY_LOOP_OUT = 4;
|
2020-07-23 17:30:53 +02:00
|
|
|
|
|
|
|
|
|
|
// The client will use the new v2 HTLC scripts.
|
|
|
|
|
|
HTLC_V2 = 5;
|
2020-05-29 11:27:47 +02:00
|
|
|
|
|
|
|
|
|
|
// The client creates a probe invoice so that the server can perform a
|
|
|
|
|
|
// multi-path probe.
|
|
|
|
|
|
MULTI_LOOP_IN = 6;
|
2021-05-24 08:40:12 +02:00
|
|
|
|
|
|
|
|
|
|
// The client supports loop out swap cancelation.
|
|
|
|
|
|
LOOP_OUT_CANCEL = 7;
|
2021-05-10 16:55:53 +02:00
|
|
|
|
|
2023-06-20 21:46:10 +03:00
|
|
|
|
// The client is able to ask the server to probe to test inbound liquidity
|
|
|
|
|
|
// and provide more accurate loop-in fees.
|
2021-05-10 16:55:53 +02:00
|
|
|
|
PROBE = 8;
|
2021-11-28 19:49:59 +01:00
|
|
|
|
|
|
|
|
|
|
// The client may ask the server to use a custom routing helper plugin in
|
|
|
|
|
|
// order to enhance off-chain payments corresponding to a swap.
|
|
|
|
|
|
ROUTING_PLUGIN = 9;
|
2022-04-24 22:29:13 +02:00
|
|
|
|
|
|
|
|
|
|
// The client will use the new v3 (taproot) HTLC scripts.
|
|
|
|
|
|
HTLC_V3 = 10;
|
2023-01-02 19:37:15 +01:00
|
|
|
|
|
|
|
|
|
|
// Enables MuSig2 signature scheme for swaps.
|
|
|
|
|
|
MUSIG2 = 11;
|
2020-04-27 15:43:30 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2019-03-06 18:24:29 -08:00
|
|
|
|
message ServerLoopOutRequest {
|
2019-03-06 21:13:50 +01:00
|
|
|
|
bytes receiver_key = 1;
|
2019-03-06 18:24:29 -08:00
|
|
|
|
|
2019-03-06 21:13:50 +01:00
|
|
|
|
bytes swap_hash = 2;
|
2019-03-06 18:24:29 -08:00
|
|
|
|
|
2019-03-06 21:13:50 +01:00
|
|
|
|
uint64 amt = 3;
|
2019-11-14 10:35:32 +01:00
|
|
|
|
|
|
|
|
|
|
/// The unix time in seconds we want the on-chain swap to be published by.
|
|
|
|
|
|
int64 swap_publication_deadline = 4;
|
2020-04-27 15:43:30 +02:00
|
|
|
|
|
|
|
|
|
|
/// The protocol version that the client adheres to.
|
|
|
|
|
|
ProtocolVersion protocol_version = 5;
|
2020-07-15 09:17:57 +02:00
|
|
|
|
|
|
|
|
|
|
// The requested absolute block height of the on-chain htlc. This is
|
|
|
|
|
|
// subjected to min and max constraints as reported in the LoopOutTerms
|
|
|
|
|
|
// response.
|
|
|
|
|
|
int32 expiry = 6;
|
2020-10-12 13:16:06 +02:00
|
|
|
|
|
|
|
|
|
|
// The user agent string that identifies the software running on the user's
|
|
|
|
|
|
// side. This can be changed in the user's client software but it _SHOULD_
|
|
|
|
|
|
// conform to the following pattern:
|
|
|
|
|
|
// Agent-Name/semver-version(/additional-info)
|
|
|
|
|
|
// Examples:
|
|
|
|
|
|
// loopd/v0.10.0-beta/commit=3b635821
|
|
|
|
|
|
// litd/v0.2.0-alpha/commit=326d754
|
|
|
|
|
|
string user_agent = 7;
|
2019-03-06 21:13:50 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2019-03-06 18:24:29 -08:00
|
|
|
|
message ServerLoopOutResponse {
|
2020-04-27 15:30:52 +02:00
|
|
|
|
string swap_invoice = 1;
|
2019-03-06 18:24:29 -08:00
|
|
|
|
|
2019-03-06 21:13:50 +01:00
|
|
|
|
string prepay_invoice = 2;
|
2019-03-06 18:24:29 -08:00
|
|
|
|
|
2019-03-06 21:13:50 +01:00
|
|
|
|
bytes sender_key = 3;
|
2019-03-06 18:24:29 -08:00
|
|
|
|
|
2020-07-15 09:17:57 +02:00
|
|
|
|
// The height at which the on-chain htlc will expire. Deprecated because the
|
|
|
|
|
|
// field is already specified in the request.
|
|
|
|
|
|
int32 expiry = 4 [deprecated = true];
|
2020-06-30 12:55:50 +02:00
|
|
|
|
|
|
|
|
|
|
// A human-readable message from the loop server.
|
|
|
|
|
|
string server_message = 5;
|
2019-03-06 21:13:50 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2019-03-06 18:24:29 -08:00
|
|
|
|
message ServerLoopOutQuoteRequest {
|
2019-10-08 22:28:20 +02:00
|
|
|
|
/// The swap amount. If zero, a quote for a maximum amt swap will be given.
|
|
|
|
|
|
uint64 amt = 1;
|
2020-01-07 13:28:22 +01:00
|
|
|
|
|
|
|
|
|
|
/// The unix time in seconds we want the on-chain swap to be published by.
|
|
|
|
|
|
int64 swap_publication_deadline = 2;
|
2020-04-27 15:43:30 +02:00
|
|
|
|
|
|
|
|
|
|
/// The protocol version that the client adheres to.
|
|
|
|
|
|
ProtocolVersion protocol_version = 3;
|
2020-07-15 09:17:57 +02:00
|
|
|
|
|
|
|
|
|
|
// The requested absolute block height of the on-chain htlc. This is
|
|
|
|
|
|
// subjected to min and max constraints as reported in the LoopOutTerms
|
|
|
|
|
|
// response.
|
|
|
|
|
|
int32 expiry = 4;
|
2023-06-20 21:46:10 +03:00
|
|
|
|
|
|
|
|
|
|
// The user agent string that identifies the software running on the user's
|
|
|
|
|
|
// side. This can be changed in the user's client software but it _SHOULD_
|
|
|
|
|
|
// conform to the following pattern:
|
|
|
|
|
|
// Agent-Name/semver-version(/additional-info)
|
|
|
|
|
|
// Examples:
|
|
|
|
|
|
// loopd/v0.10.0-beta/commit=3b635821
|
|
|
|
|
|
// litd/v0.2.0-alpha/commit=326d754
|
|
|
|
|
|
string user_agent = 5;
|
2019-03-06 21:13:50 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2019-03-06 18:24:29 -08:00
|
|
|
|
message ServerLoopOutQuote {
|
2019-03-06 21:13:50 +01:00
|
|
|
|
string swap_payment_dest = 1;
|
2019-03-06 18:24:29 -08:00
|
|
|
|
|
2019-10-08 22:28:20 +02:00
|
|
|
|
/// The total estimated swap fee given the quote amt.
|
|
|
|
|
|
int64 swap_fee = 2;
|
2019-03-06 18:24:29 -08:00
|
|
|
|
|
2019-10-08 22:28:20 +02:00
|
|
|
|
/// Deprecated, total swap fee given quote amt is calculated in swap_fee.
|
|
|
|
|
|
int64 swap_fee_rate = 3 [deprecated = true];
|
2019-03-06 18:24:29 -08:00
|
|
|
|
|
2019-03-06 21:13:50 +01:00
|
|
|
|
uint64 prepay_amt = 4;
|
2019-03-06 18:24:29 -08:00
|
|
|
|
|
2019-10-08 22:28:20 +02:00
|
|
|
|
uint64 min_swap_amount = 5 [deprecated = true];
|
2019-03-06 18:24:29 -08:00
|
|
|
|
|
2019-10-08 22:28:20 +02:00
|
|
|
|
uint64 max_swap_amount = 6 [deprecated = true];
|
2019-03-06 18:24:29 -08:00
|
|
|
|
|
2020-07-15 09:17:57 +02:00
|
|
|
|
// The server-proposed cltv delta of the on-chain htlc. Deprecated because
|
|
|
|
|
|
// the field is already specified in the request.
|
|
|
|
|
|
int32 cltv_delta = 7 [deprecated = true];
|
2019-03-06 21:13:50 +01:00
|
|
|
|
}
|
2019-03-12 16:10:37 +01:00
|
|
|
|
|
2019-10-08 22:28:20 +02:00
|
|
|
|
message ServerLoopOutTermsRequest {
|
2020-04-27 15:43:30 +02:00
|
|
|
|
/// The protocol version that the client adheres to.
|
|
|
|
|
|
ProtocolVersion protocol_version = 1;
|
2023-06-20 21:46:10 +03:00
|
|
|
|
|
|
|
|
|
|
// The user agent string that identifies the software running on the user's
|
|
|
|
|
|
// side. This can be changed in the user's client software but it _SHOULD_
|
|
|
|
|
|
// conform to the following pattern:
|
|
|
|
|
|
// Agent-Name/semver-version(/additional-info)
|
|
|
|
|
|
// Examples:
|
|
|
|
|
|
// loopd/v0.10.0-beta/commit=3b635821
|
|
|
|
|
|
// litd/v0.2.0-alpha/commit=326d754
|
|
|
|
|
|
string user_agent = 2;
|
2019-10-08 22:28:20 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message ServerLoopOutTerms {
|
|
|
|
|
|
uint64 min_swap_amount = 1;
|
|
|
|
|
|
uint64 max_swap_amount = 2;
|
2020-07-15 09:17:57 +02:00
|
|
|
|
|
|
|
|
|
|
// The minimally accepted cltv delta of the on-chain htlc.
|
|
|
|
|
|
int32 min_cltv_delta = 3;
|
|
|
|
|
|
|
|
|
|
|
|
// The maximally accepted cltv delta of the on-chain htlc.
|
|
|
|
|
|
int32 max_cltv_delta = 4;
|
2019-10-08 22:28:20 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2019-03-12 16:10:37 +01:00
|
|
|
|
message ServerLoopInRequest {
|
|
|
|
|
|
bytes sender_key = 1;
|
2023-01-02 19:37:15 +01:00
|
|
|
|
|
|
|
|
|
|
bytes sender_internal_pubkey = 9;
|
|
|
|
|
|
|
2019-03-12 16:10:37 +01:00
|
|
|
|
bytes swap_hash = 2;
|
2023-01-02 19:37:15 +01:00
|
|
|
|
|
2019-03-12 16:10:37 +01:00
|
|
|
|
uint64 amt = 3;
|
2023-01-02 19:37:15 +01:00
|
|
|
|
|
2019-03-12 16:10:37 +01:00
|
|
|
|
string swap_invoice = 4;
|
2023-01-02 19:37:15 +01:00
|
|
|
|
|
2020-02-11 13:58:55 +01:00
|
|
|
|
bytes last_hop = 5;
|
2020-04-27 15:43:30 +02:00
|
|
|
|
|
|
|
|
|
|
/// The protocol version that the client adheres to.
|
|
|
|
|
|
ProtocolVersion protocol_version = 6;
|
2020-05-29 11:27:47 +02:00
|
|
|
|
|
2023-01-02 19:37:15 +01:00
|
|
|
|
// An invoice that can be used for the purpose of probing.
|
2020-05-29 11:27:47 +02:00
|
|
|
|
string probe_invoice = 7;
|
2020-10-12 13:16:06 +02:00
|
|
|
|
|
|
|
|
|
|
// The user agent string that identifies the software running on the user's
|
|
|
|
|
|
// side. This can be changed in the user's client software but it _SHOULD_
|
|
|
|
|
|
// conform to the following pattern:
|
|
|
|
|
|
// Agent-Name/semver-version(/additional-info)
|
|
|
|
|
|
// Examples:
|
|
|
|
|
|
// loopd/v0.10.0-beta/commit=3b635821
|
|
|
|
|
|
// litd/v0.2.0-alpha/commit=326d754
|
|
|
|
|
|
string user_agent = 8;
|
2019-03-12 16:10:37 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message ServerLoopInResponse {
|
|
|
|
|
|
bytes receiver_key = 1;
|
2023-01-02 19:37:15 +01:00
|
|
|
|
|
|
|
|
|
|
bytes receiver_internal_pubkey = 9;
|
|
|
|
|
|
|
2019-03-12 16:10:37 +01:00
|
|
|
|
int32 expiry = 2;
|
2020-06-30 12:55:50 +02:00
|
|
|
|
|
|
|
|
|
|
// A human-readable message from the loop server.
|
|
|
|
|
|
string server_message = 3;
|
2019-03-12 16:10:37 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message ServerLoopInQuoteRequest {
|
2019-10-08 22:28:20 +02:00
|
|
|
|
/// The swap amount. If zero, a quote for a maximum amt swap will be given.
|
|
|
|
|
|
uint64 amt = 1;
|
2020-04-27 15:43:30 +02:00
|
|
|
|
|
2023-06-20 21:46:10 +03:00
|
|
|
|
// The destination pubkey.
|
2021-05-10 16:55:53 +02:00
|
|
|
|
bytes pubkey = 3;
|
|
|
|
|
|
|
2023-06-20 21:46:10 +03:00
|
|
|
|
// Optional last hop to use.
|
2021-05-10 16:55:53 +02:00
|
|
|
|
bytes last_hop = 4;
|
|
|
|
|
|
|
|
|
|
|
|
// Optional route hints to reach the destination through private channels.
|
|
|
|
|
|
repeated RouteHint route_hints = 5;
|
|
|
|
|
|
|
2020-04-27 15:43:30 +02:00
|
|
|
|
/// The protocol version that the client adheres to.
|
|
|
|
|
|
ProtocolVersion protocol_version = 2;
|
2023-06-20 21:46:10 +03:00
|
|
|
|
|
|
|
|
|
|
// The user agent string that identifies the software running on the user's
|
|
|
|
|
|
// side. This can be changed in the user's client software but it _SHOULD_
|
|
|
|
|
|
// conform to the following pattern:
|
|
|
|
|
|
// Agent-Name/semver-version(/additional-info)
|
|
|
|
|
|
// Examples:
|
|
|
|
|
|
// loopd/v0.10.0-beta/commit=3b635821
|
|
|
|
|
|
// litd/v0.2.0-alpha/commit=326d754
|
|
|
|
|
|
string user_agent = 6;
|
2024-09-22 13:31:03 -03:00
|
|
|
|
|
2024-06-06 15:26:34 +02:00
|
|
|
|
// The number of static address deposits the client wants to quote for.
|
|
|
|
|
|
// If the number of deposits exceeds one the server will apply a per-input
|
|
|
|
|
|
// service fee. This is to cover for the increased on-chain fee the server
|
|
|
|
|
|
// has to pay when the sweeping transaction is broadcast.
|
2024-09-22 13:31:03 -03:00
|
|
|
|
uint32 num_static_address_deposits = 7;
|
2025-10-01 08:40:28 +02:00
|
|
|
|
|
|
|
|
|
|
// If set, request the server to use fast publication behavior. Note that
|
|
|
|
|
|
// this falg is only available for static address loop ins.
|
|
|
|
|
|
bool fast = 8;
|
2019-03-12 16:10:37 +01:00
|
|
|
|
}
|
2020-04-27 15:30:52 +02:00
|
|
|
|
|
2019-03-12 16:10:37 +01:00
|
|
|
|
message ServerLoopInQuoteResponse {
|
2019-10-08 22:28:20 +02:00
|
|
|
|
int64 swap_fee = 1;
|
2020-04-27 15:30:52 +02:00
|
|
|
|
int64 swap_fee_rate = 2 [deprecated = true];
|
|
|
|
|
|
uint64 min_swap_amount = 4 [deprecated = true];
|
|
|
|
|
|
uint64 max_swap_amount = 5 [deprecated = true];
|
2019-03-12 16:10:37 +01:00
|
|
|
|
int32 cltv_delta = 6;
|
2019-10-08 22:28:20 +02:00
|
|
|
|
}
|
2019-10-08 22:28:20 +02:00
|
|
|
|
|
|
|
|
|
|
message ServerLoopInTermsRequest {
|
2020-04-27 15:43:30 +02:00
|
|
|
|
/// The protocol version that the client adheres to.
|
|
|
|
|
|
ProtocolVersion protocol_version = 1;
|
2023-06-20 21:46:10 +03:00
|
|
|
|
|
|
|
|
|
|
// The user agent string that identifies the software running on the user's
|
|
|
|
|
|
// side. This can be changed in the user's client software but it _SHOULD_
|
|
|
|
|
|
// conform to the following pattern:
|
|
|
|
|
|
// Agent-Name/semver-version(/additional-info)
|
|
|
|
|
|
// Examples:
|
|
|
|
|
|
// loopd/v0.10.0-beta/commit=3b635821
|
|
|
|
|
|
// litd/v0.2.0-alpha/commit=326d754
|
|
|
|
|
|
string user_agent = 2;
|
2019-10-08 22:28:20 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message ServerLoopInTerms {
|
|
|
|
|
|
uint64 min_swap_amount = 1;
|
|
|
|
|
|
uint64 max_swap_amount = 2;
|
|
|
|
|
|
}
|
2020-06-02 09:31:39 +02:00
|
|
|
|
|
|
|
|
|
|
// ServerLoopOutPushPreimageRequest pushes a preimage to the server. Note that
|
|
|
|
|
|
// this call returns with no error after the server acknowledges the preimage
|
|
|
|
|
|
// and does not block until the invoice is settled.
|
|
|
|
|
|
message ServerLoopOutPushPreimageRequest {
|
|
|
|
|
|
// The protocol version that the client adheres to.
|
|
|
|
|
|
ProtocolVersion protocol_version = 1;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
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.
|
|
|
|
|
|
*/
|
|
|
|
|
|
bytes preimage = 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message ServerLoopOutPushPreimageResponse {
|
|
|
|
|
|
}
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
message SubscribeUpdatesRequest {
|
|
|
|
|
|
// The protocol version that the client adheres to.
|
|
|
|
|
|
ProtocolVersion protocol_version = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// Swap hash is the hash of the swap to subscribe to updates for.
|
|
|
|
|
|
bytes swap_hash = 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ServerSwapState is an enum which represents all the states a swap may have
|
|
|
|
|
|
// from the server's perspective.
|
|
|
|
|
|
enum ServerSwapState {
|
|
|
|
|
|
// The server has created the swap.
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_INITIATED = 0;
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
// The server has published the loop out on chain htlc.
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_HTLC_PUBLISHED = 1;
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
// The swap completed successfully.
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_SUCCESS = 2;
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
The swap failed for a reason that is unknown to the server, this is only
|
|
|
|
|
|
set for older swaps.
|
|
|
|
|
|
*/
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_FAILED_UNKNOWN = 3;
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
// No htlc was confirmed in time for the loop in swap to complete.
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_FAILED_NO_HTLC = 4;
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
// A loop in htlc confirmed on chain, but it did not have the correct value.
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_FAILED_INVALID_HTLC_AMOUNT = 5;
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
We did not succeed in completing the loop in off chain payment before the
|
|
|
|
|
|
timeout.
|
|
|
|
|
|
*/
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_FAILED_OFF_CHAIN_TIMEOUT = 6;
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
// The on chain timeout was claimed.
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_FAILED_TIMEOUT = 7;
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
The server could not publish the loop out on chain htlc before the deadline
|
|
|
|
|
|
provided.
|
|
|
|
|
|
*/
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_FAILED_SWAP_DEADLINE = 8;
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
// The server could not publish the loop out on chain htlc.
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_FAILED_HTLC_PUBLICATION = 9;
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
// The server has published the loop out on chain timeout tx.
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_TIMEOUT_PUBLISHED = 10;
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
// The swap has failed for unknown reasons, it will not be completed.
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_UNEXPECTED_FAILURE = 11;
|
2020-07-16 12:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
// The swap htlc has confirmed on chain.
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_HTLC_CONFIRMED = 12;
|
2021-05-24 08:46:05 +02:00
|
|
|
|
|
|
|
|
|
|
// The client canceled the swap because they could not route the prepay.
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_CLIENT_PREPAY_CANCEL = 13;
|
2021-05-24 08:46:05 +02:00
|
|
|
|
|
|
|
|
|
|
// The client canceled the swap because they could not route the swap
|
|
|
|
|
|
// payment.
|
2021-06-03 10:52:25 +02:00
|
|
|
|
SERVER_CLIENT_INVOICE_CANCEL = 14;
|
2021-07-16 10:28:17 +02:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
A loop in swap was rejected because it contained multiple outputs for a
|
|
|
|
|
|
single swap.
|
|
|
|
|
|
*/
|
|
|
|
|
|
SERVER_FAILED_MULTIPLE_SWAP_SCRIPTS = 15;
|
2022-02-14 14:04:14 +08:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
The swap failed during creation.
|
|
|
|
|
|
*/
|
|
|
|
|
|
SERVER_FAILED_INITIALIZATION = 16;
|
2020-07-16 12:01:02 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-25 16:33:44 +02:00
|
|
|
|
message SubscribeLoopOutUpdatesResponse {
|
2020-07-16 12:01:02 +02:00
|
|
|
|
// The unix timestamp in nanoseconds when the swap was updated.
|
|
|
|
|
|
int64 timestamp_ns = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// The swap's current state.
|
|
|
|
|
|
ServerSwapState state = 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-25 16:33:44 +02:00
|
|
|
|
message SubscribeLoopInUpdatesResponse {
|
2020-07-16 12:01:02 +02:00
|
|
|
|
// The unix timestamp in nanoseconds when the swap was updated.
|
|
|
|
|
|
int64 timestamp_ns = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// The swap's current state.
|
|
|
|
|
|
ServerSwapState state = 2;
|
|
|
|
|
|
}
|
2021-05-24 08:40:12 +02:00
|
|
|
|
|
|
|
|
|
|
enum RoutePaymentType {
|
|
|
|
|
|
// No reason, used to distinguish from the default value.
|
2021-06-03 10:52:25 +02:00
|
|
|
|
ROUTE_UNKNOWN = 0;
|
2021-05-24 08:40:12 +02:00
|
|
|
|
|
2021-05-25 16:33:44 +02:00
|
|
|
|
// Prepay route indicates that the swap was canceled because the client
|
2021-05-24 08:40:12 +02:00
|
|
|
|
// could not find a route to the server for the prepay.
|
|
|
|
|
|
PREPAY_ROUTE = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// Invoice route indicates that the swap was canceled because the client
|
|
|
|
|
|
// could not find a route to the server for the swap invoice.
|
|
|
|
|
|
INVOICE_ROUTE = 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// PaymentFailureReason describes the reason that a payment failed. These
|
|
|
|
|
|
// values are copied directly from lnd.
|
|
|
|
|
|
enum PaymentFailureReason {
|
|
|
|
|
|
/*
|
|
|
|
|
|
Payment isn't failed (yet).
|
|
|
|
|
|
*/
|
2021-06-03 10:52:25 +02:00
|
|
|
|
LND_FAILURE_REASON_NONE = 0;
|
2021-05-24 08:40:12 +02:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
There are more routes to try, but the payment timeout was exceeded.
|
|
|
|
|
|
*/
|
2021-06-03 10:52:25 +02:00
|
|
|
|
LND_FAILURE_REASON_TIMEOUT = 1;
|
2021-05-24 08:40:12 +02:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
All possible routes were tried and failed permanently. Or were no
|
|
|
|
|
|
routes to the destination at all.
|
|
|
|
|
|
*/
|
2021-06-03 10:52:25 +02:00
|
|
|
|
LND_FAILURE_REASON_NO_ROUTE = 2;
|
2021-05-24 08:40:12 +02:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
A non-recoverable error has occured.
|
|
|
|
|
|
*/
|
2021-06-03 10:52:25 +02:00
|
|
|
|
LND_FAILURE_REASON_ERROR = 3;
|
2021-05-24 08:40:12 +02:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
Payment details incorrect (unknown hash, invalid amt or
|
|
|
|
|
|
invalid final cltv delta)
|
|
|
|
|
|
*/
|
2021-06-03 10:52:25 +02:00
|
|
|
|
LND_FAILURE_REASON_INCORRECT_PAYMENT_DETAILS = 4;
|
2021-05-24 08:40:12 +02:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
Insufficient local balance.
|
|
|
|
|
|
*/
|
2021-06-03 10:52:25 +02:00
|
|
|
|
LND_FAILURE_REASON_INSUFFICIENT_BALANCE = 5;
|
2021-05-24 08:40:12 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message RouteCancel {
|
|
|
|
|
|
// The type of the payment that failed.
|
|
|
|
|
|
RoutePaymentType route_type = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// The htlcs that the client tried to pay the server with, if any.
|
|
|
|
|
|
repeated HtlcAttempt attempts = 2;
|
|
|
|
|
|
|
|
|
|
|
|
// The reason that the payment failed.
|
2021-05-25 16:33:44 +02:00
|
|
|
|
PaymentFailureReason failure = 3;
|
2021-05-24 08:40:12 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message HtlcAttempt {
|
|
|
|
|
|
// The number of hops from the htlc's failure hop that it needed to take
|
2021-05-25 16:33:44 +02:00
|
|
|
|
// to reach the server's node.
|
2021-05-24 08:40:12 +02:00
|
|
|
|
uint32 remaining_hops = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message CancelLoopOutSwapRequest {
|
|
|
|
|
|
// The protocol version that the client adheres to.
|
|
|
|
|
|
ProtocolVersion protocol_version = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// The swap hash.
|
2021-05-25 16:33:44 +02:00
|
|
|
|
bytes swap_hash = 2;
|
2021-05-24 08:40:12 +02:00
|
|
|
|
|
|
|
|
|
|
// The payment address for the swap invoice, used to ensure that only the
|
|
|
|
|
|
// swap owner can cancel the payment.
|
|
|
|
|
|
bytes payment_address = 3;
|
|
|
|
|
|
|
|
|
|
|
|
// Additional information about the swap cancelation.
|
|
|
|
|
|
oneof cancel_info {
|
|
|
|
|
|
RouteCancel route_cancel = 5;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-25 16:33:44 +02:00
|
|
|
|
message CancelLoopOutSwapResponse {
|
|
|
|
|
|
}
|
2021-05-10 16:55:53 +02:00
|
|
|
|
|
|
|
|
|
|
message ServerProbeRequest {
|
2023-01-02 19:37:15 +01:00
|
|
|
|
// The protocol version that the client adheres to.
|
2021-05-10 16:55:53 +02:00
|
|
|
|
ProtocolVersion protocol_version = 1;
|
|
|
|
|
|
|
2024-09-22 13:31:03 -03:00
|
|
|
|
// The probe amount.
|
2021-05-10 16:55:53 +02:00
|
|
|
|
uint64 amt = 2;
|
|
|
|
|
|
|
|
|
|
|
|
// The target node for the probe.
|
|
|
|
|
|
bytes target = 3;
|
|
|
|
|
|
|
|
|
|
|
|
// Optional last hop to use when probing the client.
|
|
|
|
|
|
bytes last_hop = 4;
|
|
|
|
|
|
|
2023-01-02 19:37:15 +01:00
|
|
|
|
// Optional route hints to reach the destination through private channels.
|
2021-05-10 16:55:53 +02:00
|
|
|
|
repeated RouteHint route_hints = 5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message ServerProbeResponse {
|
|
|
|
|
|
}
|
2021-11-28 19:49:59 +01:00
|
|
|
|
|
|
|
|
|
|
message RecommendRoutingPluginReq {
|
|
|
|
|
|
ProtocolVersion protocol_version = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// The hash of the swap requesting a routing plugin.
|
|
|
|
|
|
bytes swap_hash = 2;
|
|
|
|
|
|
|
|
|
|
|
|
// The payment address for the swap invoice, used to ensure that only the
|
|
|
|
|
|
// swap owner can request routing plugin recommendation.
|
|
|
|
|
|
bytes payment_address = 3;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
enum RoutingPlugin {
|
|
|
|
|
|
// Client won't use any plugins to help with payment routing.
|
|
|
|
|
|
NONE = 0;
|
|
|
|
|
|
|
|
|
|
|
|
// Client will try more expensive routes for off-chain payments.
|
|
|
|
|
|
LOW_HIGH = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message RecommendRoutingPluginRes {
|
|
|
|
|
|
// The routing plugin to use for off-chain payments.
|
|
|
|
|
|
RoutingPlugin plugin = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message ReportRoutingResultReq {
|
|
|
|
|
|
ProtocolVersion protocol_version = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// The swap hash.
|
|
|
|
|
|
bytes swap_hash = 2;
|
|
|
|
|
|
|
|
|
|
|
|
// The payment address for the swap invoice, used to ensure that only the
|
|
|
|
|
|
// swap owner can report routing result.
|
|
|
|
|
|
bytes payment_address = 3;
|
|
|
|
|
|
|
|
|
|
|
|
// The routing plugin that was used.
|
|
|
|
|
|
RoutingPlugin plugin = 4;
|
|
|
|
|
|
|
|
|
|
|
|
// Whether this payment succeeded.
|
|
|
|
|
|
bool success = 5;
|
|
|
|
|
|
|
|
|
|
|
|
// The number of payment attempts using the plugin.
|
|
|
|
|
|
int32 attempts = 6;
|
|
|
|
|
|
|
|
|
|
|
|
// Total time used in milliseconds.
|
|
|
|
|
|
int64 total_time = 7;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message ReportRoutingResultRes {
|
|
|
|
|
|
}
|
2022-05-04 22:26:24 +02:00
|
|
|
|
|
|
|
|
|
|
message MuSig2SignSweepReq {
|
2022-07-08 14:33:06 +02:00
|
|
|
|
reserved 5;
|
|
|
|
|
|
|
2022-05-04 22:26:24 +02:00
|
|
|
|
ProtocolVersion protocol_version = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// The swap hash.
|
|
|
|
|
|
bytes swap_hash = 2;
|
|
|
|
|
|
|
|
|
|
|
|
// The payment address for the swap invoice, used to ensure that only the
|
|
|
|
|
|
// swap owner can obtain the partial signature.
|
|
|
|
|
|
bytes payment_address = 3;
|
|
|
|
|
|
|
|
|
|
|
|
// The local public nonce.
|
|
|
|
|
|
bytes nonce = 4;
|
|
|
|
|
|
|
2022-07-08 14:33:06 +02:00
|
|
|
|
// The psbt of the sweep txn.
|
|
|
|
|
|
bytes sweep_tx_psbt = 6;
|
2023-09-21 20:43:48 +03:00
|
|
|
|
|
|
|
|
|
|
// The prevout information of the sweep txn.
|
|
|
|
|
|
repeated PrevoutInfo prevout_info = 7;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message PrevoutInfo {
|
|
|
|
|
|
// The value of the txout.
|
|
|
|
|
|
uint64 value = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// The pk_script of the txout.
|
|
|
|
|
|
bytes pk_script = 2;
|
|
|
|
|
|
|
|
|
|
|
|
// The txid of the txout.
|
|
|
|
|
|
bytes txid_bytes = 3;
|
|
|
|
|
|
|
|
|
|
|
|
// The index of the txout.
|
|
|
|
|
|
uint32 output_index = 4;
|
2022-05-04 22:26:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message MuSig2SignSweepRes {
|
|
|
|
|
|
// The server side public nonce.
|
|
|
|
|
|
bytes nonce = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// The partial signature of the server for the requested sighash.
|
|
|
|
|
|
bytes partial_signature = 2;
|
|
|
|
|
|
}
|
2023-01-06 18:02:29 +01:00
|
|
|
|
|
|
|
|
|
|
message ServerPushKeyReq {
|
|
|
|
|
|
// The protocol version that the client adheres to.
|
|
|
|
|
|
ProtocolVersion protocol_version = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// The swap hash.
|
|
|
|
|
|
bytes swap_hash = 2;
|
|
|
|
|
|
|
|
|
|
|
|
// The client’s private key used in the HTLC’s aggregated internal key.
|
|
|
|
|
|
bytes internal_privkey = 3;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message ServerPushKeyRes {
|
|
|
|
|
|
}
|
2023-12-11 20:09:04 +01:00
|
|
|
|
|
|
|
|
|
|
// FetchL402Request is an empty request sent from the client to the server to
|
2024-09-22 13:31:03 -03:00
|
|
|
|
// fetch the lnd L402.
|
2023-12-11 20:09:04 +01:00
|
|
|
|
message FetchL402Request {
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// FetchL402Response is an empty response sent from the server to the client to
|
2024-09-22 13:31:03 -03:00
|
|
|
|
// confirm the lnd L402.
|
2023-12-11 20:09:04 +01:00
|
|
|
|
message FetchL402Response {
|
2023-12-13 10:59:26 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-10 18:11:37 +02:00
|
|
|
|
// SubscribeNotificationsRequest is a request to subscribe to notifications.
|
|
|
|
|
|
message SubscribeNotificationsRequest {
|
2025-10-30 17:56:14 +01:00
|
|
|
|
enum ListenerVersion {
|
|
|
|
|
|
LEGACY = 0;
|
|
|
|
|
|
V1 = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ListenerVersion version = 1;
|
2024-09-10 18:11:37 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// SubscribeNotificationsResponse is a response to a
|
|
|
|
|
|
// SubscribeNotificationsRequest.
|
|
|
|
|
|
message SubscribeNotificationsResponse {
|
|
|
|
|
|
oneof notification {
|
|
|
|
|
|
ServerReservationNotification reservation_notification = 1;
|
2024-11-14 15:03:30 +01:00
|
|
|
|
ServerStaticLoopInSweepNotification static_loop_in_sweep = 2;
|
2025-10-30 17:55:09 +01:00
|
|
|
|
ServerUnfinishedSwapNotification unfinished_swap = 3;
|
2026-04-27 15:47:45 +02:00
|
|
|
|
ServerStaticLoopInRiskAcceptedNotification
|
|
|
|
|
|
static_loop_in_risk_accepted = 4;
|
2026-04-27 16:54:40 +02:00
|
|
|
|
ServerStaticLoopInRiskRejectedNotification
|
|
|
|
|
|
static_loop_in_risk_rejected = 5;
|
2026-03-31 14:22:07 -05:00
|
|
|
|
ServerHtlcConfirmedNotification htlc_confirmed = 6;
|
2024-09-10 18:11:37 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-11-14 15:03:30 +01:00
|
|
|
|
|
|
|
|
|
|
// ServerStaticLoopInSweepNotification is a request from the server to the
|
|
|
|
|
|
// client to cosign a transaction that contains deposits from a finished static
|
|
|
|
|
|
// loop ins.
|
|
|
|
|
|
message ServerStaticLoopInSweepNotification {
|
|
|
|
|
|
// The psbt of the sweep transaction.
|
|
|
|
|
|
bytes sweep_tx_psbt = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// The swap hash the deposits are associated with.
|
|
|
|
|
|
bytes swap_hash = 2;
|
|
|
|
|
|
|
|
|
|
|
|
// The map of deposit txid:idx to the nonce used by the server.
|
|
|
|
|
|
map<string, bytes> deposit_to_nonces = 3;
|
|
|
|
|
|
|
|
|
|
|
|
// The prevout information of the sweep txn.
|
|
|
|
|
|
repeated PrevoutInfo prevout_info = 4;
|
|
|
|
|
|
}
|
2025-10-30 17:55:09 +01:00
|
|
|
|
|
2026-04-27 15:47:45 +02:00
|
|
|
|
// ServerStaticLoopInRiskAcceptedNotification tells the client that the server
|
|
|
|
|
|
// has accepted confirmation risk for a static loop-in and will start attempting
|
|
|
|
|
|
// the off-chain swap payment.
|
|
|
|
|
|
message ServerStaticLoopInRiskAcceptedNotification {
|
|
|
|
|
|
// The swap hash the accepted risk belongs to.
|
|
|
|
|
|
bytes swap_hash = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-27 16:54:40 +02:00
|
|
|
|
// ServerStaticLoopInRiskRejectedNotification tells the client that the server
|
|
|
|
|
|
// will not continue waiting for confirmation risk acceptance for a static
|
|
|
|
|
|
// loop-in.
|
|
|
|
|
|
message ServerStaticLoopInRiskRejectedNotification {
|
|
|
|
|
|
// The swap hash the rejected risk wait belongs to.
|
|
|
|
|
|
bytes swap_hash = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-10-30 17:55:09 +01:00
|
|
|
|
// ServerUnfinishedSwapNotification notifies the client about an unfinished
|
|
|
|
|
|
// swap that needs attention. This is useful in client data loss scenarios to
|
|
|
|
|
|
// help the client recover the swap.
|
|
|
|
|
|
message ServerUnfinishedSwapNotification {
|
|
|
|
|
|
// The swap hash of the unfinished swap.
|
|
|
|
|
|
bytes swap_hash = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// Whether the swap is a loop in or loop out.
|
|
|
|
|
|
bool is_loop_in = 2;
|
|
|
|
|
|
}
|
2026-03-31 14:22:07 -05:00
|
|
|
|
|
|
|
|
|
|
// ServerHtlcConfirmedNotification is a notification from the server to the
|
|
|
|
|
|
// client that the on-chain HTLC for a loop out swap has been confirmed.
|
|
|
|
|
|
message ServerHtlcConfirmedNotification {
|
|
|
|
|
|
// The swap hash of the loop out swap.
|
|
|
|
|
|
bytes swap_hash = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// htlc_outpoint is the outpoint of the confirmed HTLC in the format
|
|
|
|
|
|
// "txid:output_index".
|
|
|
|
|
|
string htlc_outpoint = 2;
|
|
|
|
|
|
|
|
|
|
|
|
// htlc_address is the address of the confirmed HTLC output.
|
|
|
|
|
|
string htlc_address = 3;
|
|
|
|
|
|
|
|
|
|
|
|
// sat_per_vbyte is the requested recovery sweep fee rate.
|
|
|
|
|
|
uint32 sat_per_vbyte = 4;
|
|
|
|
|
|
}
|