Skip to content
This repository was archived by the owner on Apr 7, 2020. It is now read-only.

Commit 10f5117

Browse files
author
Danny Paz
authored
Update proto to 0.7.1 (#308)
* update proto files for lnd-engine * 0.10.0-beta
1 parent fc8a7d6 commit 10f5117

File tree

4 files changed

+72
-10
lines changed

4 files changed

+72
-10
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lnd-engine",
3-
"version": "0.10.0-beta-rc2",
3+
"version": "0.10.0-beta",
44
"description": "A Sparkswap Engine for LND lightning implementation",
55
"main": "src/index.js",
66
"nyc": {

proto/routerrpc/router.proto

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ message SendPaymentRequest {
5858
maximum enforced.
5959
*/
6060
int32 cltv_limit = 9;
61+
62+
/**
63+
Optional route hints to reach the destination through private channels.
64+
*/
65+
repeated lnrpc.RouteHint route_hints = 10 [json_name = "route_hints"];
6166
}
6267

6368
message TrackPaymentRequest {
@@ -86,6 +91,17 @@ enum PaymentState {
8691
routes to the destination at all.
8792
*/
8893
FAILED_NO_ROUTE = 3;
94+
95+
/**
96+
A non-recoverable error has occured.
97+
*/
98+
FAILED_ERROR = 4;
99+
100+
/**
101+
Payment details incorrect (unknown hash, invalid amt or
102+
invalid final cltv delta)
103+
*/
104+
FAILED_INCORRECT_PAYMENT_DETAILS = 5;
89105
}
90106

91107

@@ -178,16 +194,23 @@ message Failure {
178194
TEMPORARY_NODE_FAILURE = 19;
179195
PERMANENT_NODE_FAILURE = 20;
180196
PERMANENT_CHANNEL_FAILURE = 21;
197+
198+
/**
199+
The error source is known, but the failure itself couldn't be decoded.
200+
*/
201+
UNKNOWN_FAILURE = 998;
202+
203+
/**
204+
An unreadable failure result is returned if the received failure message
205+
cannot be decrypted. In that case the error source is unknown.
206+
*/
207+
UNREADABLE_FAILURE = 999;
181208
}
182209

183210
/// Failure code as defined in the Lightning spec
184211
FailureCode code = 1;
185212

186-
/**
187-
The node pubkey of the intermediate or final node that generated the failure
188-
message.
189-
**/
190-
bytes failure_source_pubkey = 2;
213+
reserved 2;
191214

192215
/// An optional channel update message.
193216
ChannelUpdate channel_update = 3;
@@ -203,6 +226,12 @@ message Failure {
203226

204227
/// A failure type-dependent flags value.
205228
uint32 flags = 7;
229+
230+
/**
231+
The position in the path of the intermediate or final node that generated
232+
the failure message. Position zero is the sender node.
233+
**/
234+
uint32 failure_source_index = 8;
206235
}
207236

208237

proto/rpc.proto

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,14 @@ message Channel {
11611161

11621162
/// A set of flags showing the current state of the channel.
11631163
string chan_status_flags = 19 [json_name = "chan_status_flags"];
1164+
1165+
/// The minimum satoshis this node is required to reserve in its balance.
1166+
int64 local_chan_reserve_sat = 20 [json_name = "local_chan_reserve_sat"];
1167+
1168+
/**
1169+
The minimum satoshis the other node is required to reserve in its balance.
1170+
*/
1171+
int64 remote_chan_reserve_sat = 21 [json_name = "remote_chan_reserve_sat"];
11641172
}
11651173

11661174

@@ -1468,6 +1476,15 @@ message PendingChannelsResponse {
14681476

14691477
int64 local_balance = 4 [ json_name = "local_balance" ];
14701478
int64 remote_balance = 5 [ json_name = "remote_balance" ];
1479+
1480+
/// The minimum satoshis this node is required to reserve in its balance.
1481+
int64 local_chan_reserve_sat = 6 [json_name = "local_chan_reserve_sat"];
1482+
1483+
/**
1484+
The minimum satoshis the other node is required to reserve in its
1485+
balance.
1486+
*/
1487+
int64 remote_chan_reserve_sat = 7 [json_name = "remote_chan_reserve_sat"];
14711488
}
14721489

14731490
message PendingOpenChannel {
@@ -1634,6 +1651,12 @@ message QueryRoutesRequest {
16341651
self is assumed.
16351652
*/
16361653
string source_pub_key = 8;
1654+
1655+
/**
1656+
If set to true, edge probabilities from mission control will be used to get
1657+
the optimal route.
1658+
*/
1659+
bool use_mission_control = 9;
16371660
}
16381661

16391662
message EdgeLocator {
@@ -1777,6 +1800,7 @@ message RoutingPolicy {
17771800
int64 fee_rate_milli_msat = 4 [json_name = "fee_rate_milli_msat"];
17781801
bool disabled = 5 [json_name = "disabled"];
17791802
uint64 max_htlc_msat = 6 [json_name = "max_htlc_msat"];
1803+
uint32 last_update = 7 [json_name = "last_update"];
17801804
}
17811805

17821806
/**
@@ -1796,7 +1820,7 @@ message ChannelEdge {
17961820
uint64 channel_id = 1 [json_name = "channel_id"];
17971821
string chan_point = 2 [json_name = "chan_point"];
17981822

1799-
uint32 last_update = 3 [json_name = "last_update"];
1823+
uint32 last_update = 3 [json_name = "last_update", deprecated = true];
18001824

18011825
string node1_pub = 4 [json_name = "node1_pub"];
18021826
string node2_pub = 5 [json_name = "node2_pub"];
@@ -1851,6 +1875,9 @@ message NetworkInfo {
18511875
int64 max_channel_size = 9 [json_name = "max_channel_size"];
18521876
int64 median_channel_size_sat = 10 [json_name = "median_channel_size_sat"];
18531877

1878+
// The number of edges marked as zombies.
1879+
uint64 num_zombie_chans = 11 [json_name = "num_zombie_chans"];
1880+
18541881
// TODO(roasbeef): fee rate info, expiry
18551882
// * also additional RPC for tracking fee info once in
18561883
}
@@ -2147,8 +2174,8 @@ message Payment {
21472174
/// The path this payment took
21482175
repeated string path = 4 [ json_name = "path" ];
21492176

2150-
/// The fee paid for this payment in satoshis
2151-
int64 fee = 5 [json_name = "fee"];
2177+
/// Deprecated, use fee_sat or fee_msat.
2178+
int64 fee = 5 [json_name = "fee", deprecated = true];
21522179

21532180
/// The payment preimage
21542181
string payment_preimage = 6 [json_name = "payment_preimage"];
@@ -2171,6 +2198,12 @@ message Payment {
21712198

21722199
// The status of the payment.
21732200
PaymentStatus status = 10 [json_name = "status"];
2201+
2202+
/// The fee paid for this payment in satoshis
2203+
int64 fee_sat = 11 [json_name = "fee_sat"];
2204+
2205+
/// The fee paid for this payment in milli-satoshis
2206+
int64 fee_msat = 12 [json_name = "fee_msat"];
21742207
}
21752208

21762209
message ListPaymentsRequest {

0 commit comments

Comments
 (0)