Skip to content

Commit fd908f6

Browse files
committed
more down
1 parent 871de79 commit fd908f6

File tree

9 files changed

+238
-39
lines changed

9 files changed

+238
-39
lines changed

LNBolt/LNBolt.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
77
<PackageProjectUrl>https://github.com/rsafier/LNBolt</PackageProjectUrl>
88
<PackageId>LNBolt</PackageId>
9-
<Version>1.7.7</Version>
9+
<Version>1.7.8</Version>
1010
<Authors>Richard Safier</Authors>
1111
<PackageDescription>LNBolt - C# BOLT protocol helpers</PackageDescription>
1212
<RepositoryUrl>https://github.com/rsafier/LNBolt</RepositoryUrl>
@@ -17,7 +17,7 @@
1717
<PackageReference Include="EndianBinaryIO" Version="1.1.2"/>
1818
<PackageReference Include="Google.Protobuf" Version="3.32.1" />
1919
<PackageReference Include="Grpc.Net.Client" Version="2.71.0" />
20-
<PackageReference Include="NBitcoin" Version="8.0.11" />
20+
<PackageReference Include="NBitcoin" Version="7.0.50" />
2121
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0"/>
2222
<PackageReference Include="ServiceStack.Text" Version="8.8.0" />
2323
<None Include="README.md" Pack="true" PackagePath="\"/>

LNUnit.LND/Grpc/devrpc/dev.proto

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,25 @@ service Dev {
3030
used for development.
3131
*/
3232
rpc ImportGraph (lnrpc.ChannelGraph) returns (ImportGraphResponse);
33+
34+
/*
35+
Quiesce instructs a channel to initiate the quiescence (stfu) protocol. This
36+
RPC is for testing purposes only. The commit that adds it will be removed
37+
once interop is confirmed.
38+
*/
39+
rpc Quiesce (QuiescenceRequest) returns (QuiescenceResponse);
3340
}
3441

3542
message ImportGraphResponse {
3643
}
44+
45+
message QuiescenceRequest {
46+
// The channel point of the channel we wish to quiesce
47+
lnrpc.ChannelPoint chan_id = 1;
48+
}
49+
50+
message QuiescenceResponse {
51+
// Indicates whether or not we hold the initiator role or not once the
52+
// negotiation completes
53+
bool initiator = 1;
54+
}

LNUnit.LND/Grpc/lightning.proto

Lines changed: 106 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,14 @@ service Lightning {
274274
}
275275

276276
/*
277-
SendPaymentSync is the synchronous non-streaming version of SendPayment.
278-
This RPC is intended to be consumed by clients of the REST proxy.
279-
Additionally, this RPC expects the destination's public key and the payment
280-
hash (if any) to be encoded as hex strings.
277+
Deprecated, use routerrpc.SendPaymentV2. SendPaymentSync is the synchronous
278+
non-streaming version of SendPayment. This RPC is intended to be consumed by
279+
clients of the REST proxy. Additionally, this RPC expects the destination's
280+
public key and the payment hash (if any) to be encoded as hex strings.
281281
*/
282-
rpc SendPaymentSync (SendRequest) returns (SendResponse);
282+
rpc SendPaymentSync (SendRequest) returns (SendResponse) {
283+
option deprecated = true;
284+
}
283285

284286
/* lncli: `sendtoroute`
285287
Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional
@@ -293,10 +295,13 @@ service Lightning {
293295
}
294296

295297
/*
296-
SendToRouteSync is a synchronous version of SendToRoute. It Will block
297-
until the payment either fails or succeeds.
298+
Deprecated, use routerrpc.SendToRouteV2. SendToRouteSync is a synchronous
299+
version of SendToRoute. It Will block until the payment either fails or
300+
succeeds.
298301
*/
299-
rpc SendToRouteSync (SendToRouteRequest) returns (SendResponse);
302+
rpc SendToRouteSync (SendToRouteRequest) returns (SendResponse) {
303+
option deprecated = true;
304+
}
300305

301306
/* lncli: `addinvoice`
302307
AddInvoice attempts to add a new invoice to the invoice database. Any
@@ -643,6 +648,8 @@ message SendCustomMessageRequest {
643648
}
644649

645650
message SendCustomMessageResponse {
651+
// The status of the send operation.
652+
string status = 1;
646653
}
647654

648655
message Utxo {
@@ -755,11 +762,35 @@ message GetTransactionsRequest {
755762

756763
// An optional filter to only include transactions relevant to an account.
757764
string account = 3;
765+
766+
/*
767+
The index of a transaction that will be used in a query to determine which
768+
transaction should be returned in the response.
769+
*/
770+
uint32 index_offset = 4;
771+
772+
/*
773+
The maximal number of transactions returned in the response to this query.
774+
This value should be set to 0 to return all transactions.
775+
*/
776+
uint32 max_transactions = 5;
758777
}
759778

760779
message TransactionDetails {
761780
// The list of transactions relevant to the wallet.
762781
repeated Transaction transactions = 1;
782+
783+
/*
784+
The index of the last item in the set of returned transactions. This can be
785+
used to seek further, pagination style.
786+
*/
787+
uint64 last_index = 2;
788+
789+
/*
790+
The index of the last item in the set of returned transactions. This can be
791+
used to seek backwards, pagination style.
792+
*/
793+
uint64 first_index = 3;
763794
}
764795

765796
message FeeLimit {
@@ -1317,13 +1348,17 @@ message ConnectPeerRequest {
13171348
uint64 timeout = 3;
13181349
}
13191350
message ConnectPeerResponse {
1351+
// The status of the connect operation.
1352+
string status = 1;
13201353
}
13211354

13221355
message DisconnectPeerRequest {
13231356
// The pubkey of the node to disconnect from
13241357
string pub_key = 1;
13251358
}
13261359
message DisconnectPeerResponse {
1360+
// The status of the disconnect operation.
1361+
string status = 1;
13271362
}
13281363

13291364
message HTLC {
@@ -1346,6 +1381,13 @@ message HTLC {
13461381

13471382
// Index identifying the htlc on the forwarding channel.
13481383
uint64 forwarding_htlc_index = 7;
1384+
1385+
/*
1386+
Whether the HTLC is locked in. An HTLC is considered locked in when the
1387+
remote party has sent us the `revoke_and_ack` to irrevocably commit this
1388+
HTLC.
1389+
*/
1390+
bool locked_in = 8;
13491391
}
13501392

13511393
enum CommitmentType {
@@ -1716,6 +1758,10 @@ message ChannelCloseSummary {
17161758

17171759
// The confirmed SCID for a zero-conf channel.
17181760
uint64 zero_conf_confirmed_scid = 15 [jstype = JS_STRING];
1761+
1762+
// The TLV encoded custom channel data records for this output, which might
1763+
// be set for custom channels.
1764+
bytes custom_channel_data = 16;
17191765
}
17201766

17211767
enum ResolutionType {
@@ -1966,8 +2012,8 @@ message GetInfoResponse {
19662012
bool synced_to_graph = 18;
19672013

19682014
/*
1969-
Whether the current node is connected to testnet. This field is
1970-
deprecated and the network field should be used instead
2015+
Whether the current node is connected to testnet or testnet4. This field is
2016+
deprecated and the network field should be used instead.
19712017
*/
19722018
bool testnet = 10 [deprecated = true];
19732019

@@ -2111,9 +2157,13 @@ message CloseChannelRequest {
21112157
// NOTE: This field is only respected if we're the initiator of the channel.
21122158
uint64 max_fee_per_vbyte = 7;
21132159

2114-
// If true, then the rpc call will not block while it awaits a closing txid.
2115-
// Consequently this RPC call will not return a closing txid if this value
2116-
// is set.
2160+
// If true, then the rpc call will not block while it awaits a closing txid
2161+
// to be broadcasted to the mempool. To obtain the closing tx one has to
2162+
// listen to the stream for the particular updates. Moreover if a coop close
2163+
// is specified and this flag is set to true the coop closing flow will be
2164+
// initiated even if HTLCs are active on the channel. The channel will wait
2165+
// until all HTLCs are resolved and then start the coop closing process. The
2166+
// channel will be disabled in the meantime and will disallow any new HTLCs.
21172167
bool no_wait = 8;
21182168
}
21192169

@@ -2128,9 +2178,15 @@ message CloseStatusUpdate {
21282178
message PendingUpdate {
21292179
bytes txid = 1;
21302180
uint32 output_index = 2;
2181+
int64 fee_per_vbyte = 3;
2182+
bool local_close_tx = 4;
21312183
}
21322184

21332185
message InstantUpdate {
2186+
// The number of pending HTLCs that are currently active on the channel.
2187+
// These HTLCs need to be resolved before the channel can be closed
2188+
// cooperatively.
2189+
int32 num_pending_htlcs = 1;
21342190
}
21352191

21362192
message ReadyForPsbtFunding {
@@ -2924,6 +2980,7 @@ message ChannelEventUpdate {
29242980
ChannelPoint inactive_channel = 4;
29252981
PendingUpdate pending_open_channel = 6;
29262982
ChannelPoint fully_resolved_channel = 7;
2983+
ChannelPoint channel_funding_timeout = 8;
29272984
}
29282985

29292986
enum UpdateType {
@@ -2933,6 +2990,7 @@ message ChannelEventUpdate {
29332990
INACTIVE_CHANNEL = 3;
29342991
PENDING_OPEN_CHANNEL = 4;
29352992
FULLY_RESOLVED_CHANNEL = 5;
2993+
CHANNEL_FUNDING_TIMEOUT = 6;
29362994
}
29372995

29382996
UpdateType type = 5;
@@ -3542,6 +3600,8 @@ message NetworkInfo {
35423600
message StopRequest {
35433601
}
35443602
message StopResponse {
3603+
// The status of the stop operation.
3604+
string status = 1;
35453605
}
35463606

35473607
message GraphTopologySubscription {
@@ -4366,9 +4426,13 @@ message DeleteAllPaymentsRequest {
43664426
}
43674427

43684428
message DeletePaymentResponse {
4429+
// The status of the delete operation.
4430+
string status = 1;
43694431
}
43704432

43714433
message DeleteAllPaymentsResponse {
4434+
// The status of the delete operation.
4435+
string status = 1;
43724436
}
43734437

43744438
message AbandonChannelRequest {
@@ -4385,6 +4449,8 @@ message AbandonChannelRequest {
43854449
}
43864450

43874451
message AbandonChannelResponse {
4452+
// The status of the abandon operation.
4453+
string status = 1;
43884454
}
43894455

43904456
message DebugLevelRequest {
@@ -4646,6 +4712,14 @@ message ForwardingEvent {
46464712
// The peer alias of the outgoing channel.
46474713
string peer_alias_out = 13;
46484714

4715+
// The ID of the incoming HTLC in the payment circuit. This field is
4716+
// optional and is unset for forwarding events happened before v0.20.
4717+
optional uint64 incoming_htlc_id = 14;
4718+
4719+
// The ID of the outgoing HTLC in the payment circuit. This field is
4720+
// optional and may be unset for legacy forwarding events.
4721+
optional uint64 outgoing_htlc_id = 15;
4722+
46494723
// TODO(roasbeef): add settlement latency?
46504724
// * use FPE on the chan id?
46514725
// * also list failures?
@@ -4733,12 +4807,15 @@ message RestoreChanBackupRequest {
47334807
}
47344808
}
47354809
message RestoreBackupResponse {
4810+
// The number of channels successfully restored.
4811+
uint32 num_restored = 1;
47364812
}
47374813

47384814
message ChannelBackupSubscription {
47394815
}
47404816

47414817
message VerifyChanBackupResponse {
4818+
repeated string chan_points = 1;
47424819
}
47434820

47444821
message MacaroonPermission {
@@ -5061,6 +5138,22 @@ message RPCMiddlewareRequest {
50615138
intercept message.
50625139
*/
50635140
uint64 msg_id = 7;
5141+
5142+
/*
5143+
The metadata pairs that were sent along with the original gRPC request via
5144+
the golang context.Context using explicit [gRPC
5145+
metadata](https://grpc.io/docs/guides/metadata/). Context values are not
5146+
propagated via gRPC and so we send any pairs along explicitly here so that
5147+
the interceptor can access them.
5148+
*/
5149+
map<string, MetadataValues> metadata_pairs = 9;
5150+
}
5151+
5152+
message MetadataValues {
5153+
/*
5154+
The set of metadata values that correspond to the metadata key.
5155+
*/
5156+
repeated string values = 1;
50645157
}
50655158

50665159
message StreamAuth {

LNUnit.LND/Grpc/routerrpc/router.proto

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,11 @@ message SendPaymentRequest {
227227
string payment_request = 5;
228228

229229
/*
230-
An upper limit on the amount of time we should spend when attempting to
231-
fulfill the payment. This is expressed in seconds. If we cannot make a
232-
successful payment within this time frame, an error will be returned.
233-
This field must be non-zero.
230+
An optional limit, expressed in seconds, on the time to wait before
231+
attempting the first HTLC. Once HTLCs are in flight, the payment will
232+
not be aborted until the HTLCs are either settled or failed. If the field
233+
is not set or is explicitly set to zero, the default value of 60 seconds
234+
will be applied.
234235
*/
235236
int32 timeout_seconds = 6;
236237

@@ -1063,6 +1064,10 @@ message ForwardHtlcInterceptResponse {
10631064
// Any custom records that should be set on the p2p wire message message of
10641065
// the resumed HTLC. This field is ignored if the action is not
10651066
// RESUME_MODIFIED.
1067+
//
1068+
// This map will merge with the existing set of custom records (if any),
1069+
// replacing any conflicting types. Note that there currently is no support
1070+
// for deleting existing custom records (they can only be replaced).
10661071
map<uint64, bytes> out_wire_custom_records = 8;
10671072
}
10681073

0 commit comments

Comments
 (0)