lnrpc 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile.lock +3 -3
- data/README.md +33 -11
- data/lib/lnrpc.rb +15 -3
- data/lib/lnrpc/client.rb +20 -46
- data/lib/lnrpc/grpc_wrapper.rb +66 -0
- data/lib/lnrpc/router.proto +560 -0
- data/lib/lnrpc/router_pb.rb +198 -0
- data/lib/lnrpc/router_services_pb.rb +69 -0
- data/lib/lnrpc/rpc.proto +1183 -571
- data/lib/lnrpc/rpc_pb.rb +169 -3
- data/lib/lnrpc/rpc_services_pb.rb +9 -4
- data/lib/lnrpc/version.rb +1 -1
- data/lnrpc.gemspec +3 -1
- metadata +11 -6
@@ -0,0 +1,198 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: router.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require_relative 'rpc_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_message "routerrpc.SendPaymentRequest" do
|
9
|
+
optional :dest, :bytes, 1
|
10
|
+
optional :amt, :int64, 2
|
11
|
+
optional :amt_msat, :int64, 12
|
12
|
+
optional :payment_hash, :bytes, 3
|
13
|
+
optional :final_cltv_delta, :int32, 4
|
14
|
+
optional :payment_request, :string, 5
|
15
|
+
optional :timeout_seconds, :int32, 6
|
16
|
+
optional :fee_limit_sat, :int64, 7
|
17
|
+
optional :fee_limit_msat, :int64, 13
|
18
|
+
optional :outgoing_chan_id, :uint64, 8
|
19
|
+
optional :last_hop_pubkey, :bytes, 14
|
20
|
+
optional :cltv_limit, :int32, 9
|
21
|
+
repeated :route_hints, :message, 10, "lnrpc.RouteHint"
|
22
|
+
map :dest_custom_records, :uint64, :bytes, 11
|
23
|
+
optional :allow_self_payment, :bool, 15
|
24
|
+
repeated :dest_features, :enum, 16, "lnrpc.FeatureBit"
|
25
|
+
optional :max_parts, :uint32, 17
|
26
|
+
optional :no_inflight_updates, :bool, 18
|
27
|
+
end
|
28
|
+
add_message "routerrpc.TrackPaymentRequest" do
|
29
|
+
optional :payment_hash, :bytes, 1
|
30
|
+
optional :no_inflight_updates, :bool, 2
|
31
|
+
end
|
32
|
+
add_message "routerrpc.RouteFeeRequest" do
|
33
|
+
optional :dest, :bytes, 1
|
34
|
+
optional :amt_sat, :int64, 2
|
35
|
+
end
|
36
|
+
add_message "routerrpc.RouteFeeResponse" do
|
37
|
+
optional :routing_fee_msat, :int64, 1
|
38
|
+
optional :time_lock_delay, :int64, 2
|
39
|
+
end
|
40
|
+
add_message "routerrpc.SendToRouteRequest" do
|
41
|
+
optional :payment_hash, :bytes, 1
|
42
|
+
optional :route, :message, 2, "lnrpc.Route"
|
43
|
+
end
|
44
|
+
add_message "routerrpc.SendToRouteResponse" do
|
45
|
+
optional :preimage, :bytes, 1
|
46
|
+
optional :failure, :message, 2, "lnrpc.Failure"
|
47
|
+
end
|
48
|
+
add_message "routerrpc.ResetMissionControlRequest" do
|
49
|
+
end
|
50
|
+
add_message "routerrpc.ResetMissionControlResponse" do
|
51
|
+
end
|
52
|
+
add_message "routerrpc.QueryMissionControlRequest" do
|
53
|
+
end
|
54
|
+
add_message "routerrpc.QueryMissionControlResponse" do
|
55
|
+
repeated :pairs, :message, 2, "routerrpc.PairHistory"
|
56
|
+
end
|
57
|
+
add_message "routerrpc.PairHistory" do
|
58
|
+
optional :node_from, :bytes, 1
|
59
|
+
optional :node_to, :bytes, 2
|
60
|
+
optional :history, :message, 7, "routerrpc.PairData"
|
61
|
+
end
|
62
|
+
add_message "routerrpc.PairData" do
|
63
|
+
optional :fail_time, :int64, 1
|
64
|
+
optional :fail_amt_sat, :int64, 2
|
65
|
+
optional :fail_amt_msat, :int64, 4
|
66
|
+
optional :success_time, :int64, 5
|
67
|
+
optional :success_amt_sat, :int64, 6
|
68
|
+
optional :success_amt_msat, :int64, 7
|
69
|
+
end
|
70
|
+
add_message "routerrpc.QueryProbabilityRequest" do
|
71
|
+
optional :from_node, :bytes, 1
|
72
|
+
optional :to_node, :bytes, 2
|
73
|
+
optional :amt_msat, :int64, 3
|
74
|
+
end
|
75
|
+
add_message "routerrpc.QueryProbabilityResponse" do
|
76
|
+
optional :probability, :double, 1
|
77
|
+
optional :history, :message, 2, "routerrpc.PairData"
|
78
|
+
end
|
79
|
+
add_message "routerrpc.BuildRouteRequest" do
|
80
|
+
optional :amt_msat, :int64, 1
|
81
|
+
optional :final_cltv_delta, :int32, 2
|
82
|
+
optional :outgoing_chan_id, :uint64, 3
|
83
|
+
repeated :hop_pubkeys, :bytes, 4
|
84
|
+
end
|
85
|
+
add_message "routerrpc.BuildRouteResponse" do
|
86
|
+
optional :route, :message, 1, "lnrpc.Route"
|
87
|
+
end
|
88
|
+
add_message "routerrpc.SubscribeHtlcEventsRequest" do
|
89
|
+
end
|
90
|
+
add_message "routerrpc.HtlcEvent" do
|
91
|
+
optional :incoming_channel_id, :uint64, 1
|
92
|
+
optional :outgoing_channel_id, :uint64, 2
|
93
|
+
optional :incoming_htlc_id, :uint64, 3
|
94
|
+
optional :outgoing_htlc_id, :uint64, 4
|
95
|
+
optional :timestamp_ns, :uint64, 5
|
96
|
+
optional :event_type, :enum, 6, "routerrpc.HtlcEvent.EventType"
|
97
|
+
oneof :event do
|
98
|
+
optional :forward_event, :message, 7, "routerrpc.ForwardEvent"
|
99
|
+
optional :forward_fail_event, :message, 8, "routerrpc.ForwardFailEvent"
|
100
|
+
optional :settle_event, :message, 9, "routerrpc.SettleEvent"
|
101
|
+
optional :link_fail_event, :message, 10, "routerrpc.LinkFailEvent"
|
102
|
+
end
|
103
|
+
end
|
104
|
+
add_enum "routerrpc.HtlcEvent.EventType" do
|
105
|
+
value :UNKNOWN, 0
|
106
|
+
value :SEND, 1
|
107
|
+
value :RECEIVE, 2
|
108
|
+
value :FORWARD, 3
|
109
|
+
end
|
110
|
+
add_message "routerrpc.HtlcInfo" do
|
111
|
+
optional :incoming_timelock, :uint32, 1
|
112
|
+
optional :outgoing_timelock, :uint32, 2
|
113
|
+
optional :incoming_amt_msat, :uint64, 3
|
114
|
+
optional :outgoing_amt_msat, :uint64, 4
|
115
|
+
end
|
116
|
+
add_message "routerrpc.ForwardEvent" do
|
117
|
+
optional :info, :message, 1, "routerrpc.HtlcInfo"
|
118
|
+
end
|
119
|
+
add_message "routerrpc.ForwardFailEvent" do
|
120
|
+
end
|
121
|
+
add_message "routerrpc.SettleEvent" do
|
122
|
+
end
|
123
|
+
add_message "routerrpc.LinkFailEvent" do
|
124
|
+
optional :info, :message, 1, "routerrpc.HtlcInfo"
|
125
|
+
optional :wire_failure, :enum, 2, "lnrpc.Failure.FailureCode"
|
126
|
+
optional :failure_detail, :enum, 3, "routerrpc.FailureDetail"
|
127
|
+
optional :failure_string, :string, 4
|
128
|
+
end
|
129
|
+
add_message "routerrpc.PaymentStatus" do
|
130
|
+
optional :state, :enum, 1, "routerrpc.PaymentState"
|
131
|
+
optional :preimage, :bytes, 2
|
132
|
+
repeated :htlcs, :message, 4, "lnrpc.HTLCAttempt"
|
133
|
+
end
|
134
|
+
add_enum "routerrpc.FailureDetail" do
|
135
|
+
value :UNKNOWN, 0
|
136
|
+
value :NO_DETAIL, 1
|
137
|
+
value :ONION_DECODE, 2
|
138
|
+
value :LINK_NOT_ELIGIBLE, 3
|
139
|
+
value :ON_CHAIN_TIMEOUT, 4
|
140
|
+
value :HTLC_EXCEEDS_MAX, 5
|
141
|
+
value :INSUFFICIENT_BALANCE, 6
|
142
|
+
value :INCOMPLETE_FORWARD, 7
|
143
|
+
value :HTLC_ADD_FAILED, 8
|
144
|
+
value :FORWARDS_DISABLED, 9
|
145
|
+
value :INVOICE_CANCELED, 10
|
146
|
+
value :INVOICE_UNDERPAID, 11
|
147
|
+
value :INVOICE_EXPIRY_TOO_SOON, 12
|
148
|
+
value :INVOICE_NOT_OPEN, 13
|
149
|
+
value :MPP_INVOICE_TIMEOUT, 14
|
150
|
+
value :ADDRESS_MISMATCH, 15
|
151
|
+
value :SET_TOTAL_MISMATCH, 16
|
152
|
+
value :SET_TOTAL_TOO_LOW, 17
|
153
|
+
value :SET_OVERPAID, 18
|
154
|
+
value :UNKNOWN_INVOICE, 19
|
155
|
+
value :INVALID_KEYSEND, 20
|
156
|
+
value :MPP_IN_PROGRESS, 21
|
157
|
+
value :CIRCULAR_ROUTE, 22
|
158
|
+
end
|
159
|
+
add_enum "routerrpc.PaymentState" do
|
160
|
+
value :IN_FLIGHT, 0
|
161
|
+
value :SUCCEEDED, 1
|
162
|
+
value :FAILED_TIMEOUT, 2
|
163
|
+
value :FAILED_NO_ROUTE, 3
|
164
|
+
value :FAILED_ERROR, 4
|
165
|
+
value :FAILED_INCORRECT_PAYMENT_DETAILS, 5
|
166
|
+
value :FAILED_INSUFFICIENT_BALANCE, 6
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
module Routerrpc
|
171
|
+
SendPaymentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendPaymentRequest").msgclass
|
172
|
+
TrackPaymentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.TrackPaymentRequest").msgclass
|
173
|
+
RouteFeeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.RouteFeeRequest").msgclass
|
174
|
+
RouteFeeResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.RouteFeeResponse").msgclass
|
175
|
+
SendToRouteRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendToRouteRequest").msgclass
|
176
|
+
SendToRouteResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendToRouteResponse").msgclass
|
177
|
+
ResetMissionControlRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlRequest").msgclass
|
178
|
+
ResetMissionControlResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlResponse").msgclass
|
179
|
+
QueryMissionControlRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlRequest").msgclass
|
180
|
+
QueryMissionControlResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlResponse").msgclass
|
181
|
+
PairHistory = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairHistory").msgclass
|
182
|
+
PairData = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairData").msgclass
|
183
|
+
QueryProbabilityRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityRequest").msgclass
|
184
|
+
QueryProbabilityResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityResponse").msgclass
|
185
|
+
BuildRouteRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteRequest").msgclass
|
186
|
+
BuildRouteResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteResponse").msgclass
|
187
|
+
SubscribeHtlcEventsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SubscribeHtlcEventsRequest").msgclass
|
188
|
+
HtlcEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcEvent").msgclass
|
189
|
+
HtlcEvent::EventType = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcEvent.EventType").enummodule
|
190
|
+
HtlcInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcInfo").msgclass
|
191
|
+
ForwardEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardEvent").msgclass
|
192
|
+
ForwardFailEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardFailEvent").msgclass
|
193
|
+
SettleEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SettleEvent").msgclass
|
194
|
+
LinkFailEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.LinkFailEvent").msgclass
|
195
|
+
PaymentStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentStatus").msgclass
|
196
|
+
FailureDetail = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.FailureDetail").enummodule
|
197
|
+
PaymentState = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentState").enummodule
|
198
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: router.proto for package 'routerrpc'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require_relative 'router_pb'
|
6
|
+
|
7
|
+
module Routerrpc
|
8
|
+
module Router
|
9
|
+
class Service
|
10
|
+
|
11
|
+
include GRPC::GenericService
|
12
|
+
|
13
|
+
self.marshal_class_method = :encode
|
14
|
+
self.unmarshal_class_method = :decode
|
15
|
+
self.service_name = 'routerrpc.Router'
|
16
|
+
|
17
|
+
# *
|
18
|
+
# SendPaymentV2 attempts to route a payment described by the passed
|
19
|
+
# PaymentRequest to the final destination. The call returns a stream of
|
20
|
+
# payment updates.
|
21
|
+
rpc :SendPaymentV2, SendPaymentRequest, stream(Lnrpc::Payment)
|
22
|
+
# *
|
23
|
+
# TrackPaymentV2 returns an update stream for the payment identified by the
|
24
|
+
# payment hash.
|
25
|
+
rpc :TrackPaymentV2, TrackPaymentRequest, stream(Lnrpc::Payment)
|
26
|
+
# *
|
27
|
+
# EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
28
|
+
# may cost to send an HTLC to the target end destination.
|
29
|
+
rpc :EstimateRouteFee, RouteFeeRequest, RouteFeeResponse
|
30
|
+
# *
|
31
|
+
# SendToRoute attempts to make a payment via the specified route. This method
|
32
|
+
# differs from SendPayment in that it allows users to specify a full route
|
33
|
+
# manually. This can be used for things like rebalancing, and atomic swaps.
|
34
|
+
rpc :SendToRoute, SendToRouteRequest, SendToRouteResponse
|
35
|
+
# *
|
36
|
+
# ResetMissionControl clears all mission control state and starts with a clean
|
37
|
+
# slate.
|
38
|
+
rpc :ResetMissionControl, ResetMissionControlRequest, ResetMissionControlResponse
|
39
|
+
# *
|
40
|
+
# QueryMissionControl exposes the internal mission control state to callers.
|
41
|
+
# It is a development feature.
|
42
|
+
rpc :QueryMissionControl, QueryMissionControlRequest, QueryMissionControlResponse
|
43
|
+
# *
|
44
|
+
# QueryProbability returns the current success probability estimate for a
|
45
|
+
# given node pair and amount.
|
46
|
+
rpc :QueryProbability, QueryProbabilityRequest, QueryProbabilityResponse
|
47
|
+
# *
|
48
|
+
# BuildRoute builds a fully specified route based on a list of hop public
|
49
|
+
# keys. It retrieves the relevant channel policies from the graph in order to
|
50
|
+
# calculate the correct fees and time locks.
|
51
|
+
rpc :BuildRoute, BuildRouteRequest, BuildRouteResponse
|
52
|
+
# *
|
53
|
+
# SubscribeHtlcEvents creates a uni-directional stream from the server to
|
54
|
+
# the client which delivers a stream of htlc events.
|
55
|
+
rpc :SubscribeHtlcEvents, SubscribeHtlcEventsRequest, stream(HtlcEvent)
|
56
|
+
# *
|
57
|
+
# Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
58
|
+
# described by the passed PaymentRequest to the final destination. The call
|
59
|
+
# returns a stream of payment status updates.
|
60
|
+
rpc :SendPayment, SendPaymentRequest, stream(PaymentStatus)
|
61
|
+
# *
|
62
|
+
# Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
63
|
+
# the payment identified by the payment hash.
|
64
|
+
rpc :TrackPayment, TrackPaymentRequest, stream(PaymentStatus)
|
65
|
+
end
|
66
|
+
|
67
|
+
Stub = Service.rpc_stub_class
|
68
|
+
end
|
69
|
+
end
|
data/lib/lnrpc/rpc.proto
CHANGED
@@ -10,19 +10,19 @@ option go_package = "github.com/lightningnetwork/lnd/lnrpc";
|
|
10
10
|
* Comments in this file will be directly parsed into the API
|
11
11
|
* Documentation as descriptions of the associated method, message, or field.
|
12
12
|
* These descriptions should go right above the definition of the object, and
|
13
|
-
* can be in either block or /// comment format.
|
14
|
-
*
|
13
|
+
* can be in either block or /// comment format.
|
14
|
+
*
|
15
15
|
* One edge case exists where a // comment followed by a /// comment in the
|
16
16
|
* next line will cause the description not to show up in the documentation. In
|
17
17
|
* that instance, simply separate the two comments with a blank line.
|
18
|
-
*
|
18
|
+
*
|
19
19
|
* An RPC method can be matched to an lncli command by placing a line in the
|
20
20
|
* beginning of the description in exactly the following format:
|
21
21
|
* lncli: `methodname`
|
22
|
-
*
|
22
|
+
*
|
23
23
|
* Failure to specify the exact name of the command will cause documentation
|
24
24
|
* generation to fail.
|
25
|
-
*
|
25
|
+
*
|
26
26
|
* More information on how exactly the gRPC documentation is generated from
|
27
27
|
* this proto file can be found here:
|
28
28
|
* https://github.com/lightninglabs/lightning-api
|
@@ -41,13 +41,13 @@ service WalletUnlocker {
|
|
41
41
|
method should be used to commit the newly generated seed, and create the
|
42
42
|
wallet.
|
43
43
|
*/
|
44
|
-
rpc GenSeed(GenSeedRequest) returns (GenSeedResponse) {
|
44
|
+
rpc GenSeed (GenSeedRequest) returns (GenSeedResponse) {
|
45
45
|
option (google.api.http) = {
|
46
46
|
get: "/v1/genseed"
|
47
47
|
};
|
48
48
|
}
|
49
49
|
|
50
|
-
/**
|
50
|
+
/**
|
51
51
|
InitWallet is used when lnd is starting up for the first time to fully
|
52
52
|
initialize the daemon and its internal wallet. At the very least a wallet
|
53
53
|
password must be provided. This will be used to encrypt sensitive material
|
@@ -61,7 +61,7 @@ service WalletUnlocker {
|
|
61
61
|
seed, then present it to the user. Once it has been verified by the user,
|
62
62
|
the seed can be fed into this RPC in order to commit the new wallet.
|
63
63
|
*/
|
64
|
-
rpc InitWallet(InitWalletRequest) returns (InitWalletResponse) {
|
64
|
+
rpc InitWallet (InitWalletRequest) returns (InitWalletResponse) {
|
65
65
|
option (google.api.http) = {
|
66
66
|
post: "/v1/initwallet"
|
67
67
|
body: "*"
|
@@ -72,7 +72,7 @@ service WalletUnlocker {
|
|
72
72
|
UnlockWallet is used at startup of lnd to provide a password to unlock
|
73
73
|
the wallet database.
|
74
74
|
*/
|
75
|
-
rpc UnlockWallet(UnlockWalletRequest) returns (UnlockWalletResponse) {
|
75
|
+
rpc UnlockWallet (UnlockWalletRequest) returns (UnlockWalletResponse) {
|
76
76
|
option (google.api.http) = {
|
77
77
|
post: "/v1/unlockwallet"
|
78
78
|
body: "*"
|
@@ -83,7 +83,8 @@ service WalletUnlocker {
|
|
83
83
|
ChangePassword changes the password of the encrypted wallet. This will
|
84
84
|
automatically unlock the wallet database if successful.
|
85
85
|
*/
|
86
|
-
rpc ChangePassword (ChangePasswordRequest)
|
86
|
+
rpc ChangePassword (ChangePasswordRequest)
|
87
|
+
returns (ChangePasswordResponse) {
|
87
88
|
option (google.api.http) = {
|
88
89
|
post: "/v1/changepassword"
|
89
90
|
body: "*"
|
@@ -195,7 +196,8 @@ message UnlockWalletRequest {
|
|
195
196
|
*/
|
196
197
|
ChanBackupSnapshot channel_backups = 3;
|
197
198
|
}
|
198
|
-
message UnlockWalletResponse {
|
199
|
+
message UnlockWalletResponse {
|
200
|
+
}
|
199
201
|
|
200
202
|
message ChangePasswordRequest {
|
201
203
|
/**
|
@@ -210,7 +212,8 @@ message ChangePasswordRequest {
|
|
210
212
|
*/
|
211
213
|
bytes new_password = 2;
|
212
214
|
}
|
213
|
-
message ChangePasswordResponse {
|
215
|
+
message ChangePasswordResponse {
|
216
|
+
}
|
214
217
|
|
215
218
|
service Lightning {
|
216
219
|
/** lncli: `walletbalance`
|
@@ -228,7 +231,8 @@ service Lightning {
|
|
228
231
|
ChannelBalance returns the total funds available across all open channels
|
229
232
|
in satoshis.
|
230
233
|
*/
|
231
|
-
rpc ChannelBalance (ChannelBalanceRequest)
|
234
|
+
rpc ChannelBalance (ChannelBalanceRequest)
|
235
|
+
returns (ChannelBalanceResponse) {
|
232
236
|
option (google.api.http) = {
|
233
237
|
get: "/v1/balance/channels"
|
234
238
|
};
|
@@ -270,7 +274,7 @@ service Lightning {
|
|
270
274
|
|
271
275
|
/** lncli: `listunspent`
|
272
276
|
ListUnspent returns a list of all utxos spendable by the wallet with a
|
273
|
-
|
277
|
+
number of confirmations between the specified minimum and maximum.
|
274
278
|
*/
|
275
279
|
rpc ListUnspent (ListUnspentRequest) returns (ListUnspentResponse) {
|
276
280
|
option (google.api.http) = {
|
@@ -283,7 +287,8 @@ service Lightning {
|
|
283
287
|
the client in which any newly discovered transactions relevant to the
|
284
288
|
wallet are sent over.
|
285
289
|
*/
|
286
|
-
rpc SubscribeTransactions (GetTransactionsRequest)
|
290
|
+
rpc SubscribeTransactions (GetTransactionsRequest)
|
291
|
+
returns (stream Transaction);
|
287
292
|
|
288
293
|
/** lncli: `sendmany`
|
289
294
|
SendMany handles a request for a transaction that creates multiple specified
|
@@ -344,7 +349,8 @@ service Lightning {
|
|
344
349
|
given pubKey. In the case that we currently have a pending or active channel
|
345
350
|
with the target peer, then this action will be not be allowed.
|
346
351
|
*/
|
347
|
-
rpc DisconnectPeer (DisconnectPeerRequest)
|
352
|
+
rpc DisconnectPeer (DisconnectPeerRequest)
|
353
|
+
returns (DisconnectPeerResponse) {
|
348
354
|
option (google.api.http) = {
|
349
355
|
delete: "/v1/peers/{pub_key}"
|
350
356
|
};
|
@@ -384,9 +390,10 @@ service Lightning {
|
|
384
390
|
workflow and is waiting for confirmations for the funding txn, or is in the
|
385
391
|
process of closure, either initiated cooperatively or non-cooperatively.
|
386
392
|
*/
|
387
|
-
rpc PendingChannels (PendingChannelsRequest)
|
393
|
+
rpc PendingChannels (PendingChannelsRequest)
|
394
|
+
returns (PendingChannelsResponse) {
|
388
395
|
option (google.api.http) = {
|
389
|
-
|
396
|
+
get: "/v1/channels/pending"
|
390
397
|
};
|
391
398
|
}
|
392
399
|
|
@@ -406,19 +413,20 @@ service Lightning {
|
|
406
413
|
sent over. Events include new active channels, inactive channels, and closed
|
407
414
|
channels.
|
408
415
|
*/
|
409
|
-
rpc SubscribeChannelEvents (ChannelEventSubscription)
|
416
|
+
rpc SubscribeChannelEvents (ChannelEventSubscription)
|
417
|
+
returns (stream ChannelEventUpdate);
|
410
418
|
|
411
419
|
/** lncli: `closedchannels`
|
412
420
|
ClosedChannels returns a description of all the closed channels that
|
413
421
|
this node was a participant in.
|
414
422
|
*/
|
415
|
-
rpc ClosedChannels (ClosedChannelsRequest)
|
423
|
+
rpc ClosedChannels (ClosedChannelsRequest)
|
424
|
+
returns (ClosedChannelsResponse) {
|
416
425
|
option (google.api.http) = {
|
417
426
|
get: "/v1/channels/closed"
|
418
427
|
};
|
419
428
|
}
|
420
429
|
|
421
|
-
|
422
430
|
/**
|
423
431
|
OpenChannelSync is a synchronous version of the OpenChannel RPC call. This
|
424
432
|
call is meant to be consumed by clients to the REST proxy. As with all
|
@@ -454,7 +462,7 @@ service Lightning {
|
|
454
462
|
Alternatively, this can be used to interactively drive PSBT signing for
|
455
463
|
funding for partially complete funding transactions.
|
456
464
|
*/
|
457
|
-
rpc FundingStateStep(FundingTransitionMsg) returns (FundingStateStepResp);
|
465
|
+
rpc FundingStateStep (FundingTransitionMsg) returns (FundingStateStepResp);
|
458
466
|
|
459
467
|
/**
|
460
468
|
ChannelAcceptor dispatches a bi-directional streaming RPC in which
|
@@ -463,7 +471,8 @@ service Lightning {
|
|
463
471
|
node operators to specify their own criteria for accepting inbound channels
|
464
472
|
through a single persistent connection.
|
465
473
|
*/
|
466
|
-
rpc ChannelAcceptor (stream ChannelAcceptResponse)
|
474
|
+
rpc ChannelAcceptor (stream ChannelAcceptResponse)
|
475
|
+
returns (stream ChannelAcceptRequest);
|
467
476
|
|
468
477
|
/** lncli: `closechannel`
|
469
478
|
CloseChannel attempts to close an active channel identified by its channel
|
@@ -486,20 +495,23 @@ service Lightning {
|
|
486
495
|
channels due to bugs fixed in newer versions of lnd. Only available
|
487
496
|
when in debug builds of lnd.
|
488
497
|
*/
|
489
|
-
rpc AbandonChannel (AbandonChannelRequest)
|
498
|
+
rpc AbandonChannel (AbandonChannelRequest)
|
499
|
+
returns (AbandonChannelResponse) {
|
490
500
|
option (google.api.http) = {
|
491
501
|
delete: "/v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index}"
|
492
502
|
};
|
493
503
|
}
|
494
504
|
|
495
|
-
|
496
505
|
/** lncli: `sendpayment`
|
497
|
-
SendPayment dispatches a
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
506
|
+
Deprecated, use routerrpc.SendPayment. SendPayment dispatches a
|
507
|
+
bi-directional streaming RPC for sending payments through the Lightning
|
508
|
+
Network. A single RPC invocation creates a persistent bi-directional
|
509
|
+
stream allowing clients to rapidly send payments through the Lightning
|
510
|
+
Network with a single persistent connection.
|
511
|
+
*/
|
512
|
+
rpc SendPayment (stream SendRequest) returns (stream SendResponse) {
|
513
|
+
option deprecated = true;
|
514
|
+
}
|
503
515
|
|
504
516
|
/**
|
505
517
|
SendPaymentSync is the synchronous non-streaming version of SendPayment.
|
@@ -520,7 +532,7 @@ service Lightning {
|
|
520
532
|
allows users to specify a full route manually. This can be used for things
|
521
533
|
like rebalancing, and atomic swaps.
|
522
534
|
*/
|
523
|
-
rpc SendToRoute(stream SendToRouteRequest) returns (stream SendResponse);
|
535
|
+
rpc SendToRoute (stream SendToRouteRequest) returns (stream SendResponse);
|
524
536
|
|
525
537
|
/**
|
526
538
|
SendToRouteSync is a synchronous version of SendToRoute. It Will block
|
@@ -611,7 +623,8 @@ service Lightning {
|
|
611
623
|
/**
|
612
624
|
DeleteAllPayments deletes all outgoing payments from DB.
|
613
625
|
*/
|
614
|
-
rpc DeleteAllPayments (DeleteAllPaymentsRequest)
|
626
|
+
rpc DeleteAllPayments (DeleteAllPaymentsRequest)
|
627
|
+
returns (DeleteAllPaymentsResponse) {
|
615
628
|
option (google.api.http) = {
|
616
629
|
delete: "/v1/payments"
|
617
630
|
};
|
@@ -631,6 +644,16 @@ service Lightning {
|
|
631
644
|
};
|
632
645
|
}
|
633
646
|
|
647
|
+
/** lncli: `getnodemetrics`
|
648
|
+
GetNodeMetrics returns node metrics calculated from the graph. Currently
|
649
|
+
the only supported metric is betweenness centrality of individual nodes.
|
650
|
+
*/
|
651
|
+
rpc GetNodeMetrics (NodeMetricsRequest) returns (NodeMetricsResponse) {
|
652
|
+
option (google.api.http) = {
|
653
|
+
get: "/v1/graph/nodemetrics"
|
654
|
+
};
|
655
|
+
}
|
656
|
+
|
634
657
|
/** lncli: `getchaninfo`
|
635
658
|
GetChanInfo returns the latest authenticated network announcement for the
|
636
659
|
given channel identified by its channel ID: an 8-byte integer which
|
@@ -660,7 +683,7 @@ service Lightning {
|
|
660
683
|
send an HTLC, also including the necessary information that should be
|
661
684
|
present within the Sphinx packet encapsulated within the HTLC.
|
662
685
|
*/
|
663
|
-
rpc QueryRoutes(QueryRoutesRequest) returns (QueryRoutesResponse) {
|
686
|
+
rpc QueryRoutes (QueryRoutesRequest) returns (QueryRoutesResponse) {
|
664
687
|
option (google.api.http) = {
|
665
688
|
get: "/v1/graph/routes/{pub_key}/{amt}"
|
666
689
|
};
|
@@ -680,7 +703,7 @@ service Lightning {
|
|
680
703
|
StopDaemon will send a shutdown request to the interrupt handler, triggering
|
681
704
|
a graceful shutdown of the daemon.
|
682
705
|
*/
|
683
|
-
rpc StopDaemon(StopRequest) returns (StopResponse);
|
706
|
+
rpc StopDaemon (StopRequest) returns (StopResponse);
|
684
707
|
|
685
708
|
/**
|
686
709
|
SubscribeChannelGraph launches a streaming RPC that allows the caller to
|
@@ -690,7 +713,8 @@ service Lightning {
|
|
690
713
|
channels being advertised, updates in the routing policy for a directional
|
691
714
|
channel edge, and when channels are closed on-chain.
|
692
715
|
*/
|
693
|
-
rpc SubscribeChannelGraph(GraphTopologySubscription)
|
716
|
+
rpc SubscribeChannelGraph (GraphTopologySubscription)
|
717
|
+
returns (stream GraphTopologyUpdate);
|
694
718
|
|
695
719
|
/** lncli: `debuglevel`
|
696
720
|
DebugLevel allows a caller to programmatically set the logging verbosity of
|
@@ -704,7 +728,7 @@ service Lightning {
|
|
704
728
|
FeeReport allows the caller to obtain a report detailing the current fee
|
705
729
|
schedule enforced by the node globally for each channel.
|
706
730
|
*/
|
707
|
-
rpc FeeReport(FeeReportRequest) returns (FeeReportResponse) {
|
731
|
+
rpc FeeReport (FeeReportRequest) returns (FeeReportResponse) {
|
708
732
|
option (google.api.http) = {
|
709
733
|
get: "/v1/fees"
|
710
734
|
};
|
@@ -714,7 +738,8 @@ service Lightning {
|
|
714
738
|
UpdateChannelPolicy allows the caller to update the fee schedule and
|
715
739
|
channel policies for all channels globally, or a particular channel.
|
716
740
|
*/
|
717
|
-
rpc UpdateChannelPolicy(PolicyUpdateRequest)
|
741
|
+
rpc UpdateChannelPolicy (PolicyUpdateRequest)
|
742
|
+
returns (PolicyUpdateResponse) {
|
718
743
|
option (google.api.http) = {
|
719
744
|
post: "/v1/chanpolicy"
|
720
745
|
body: "*"
|
@@ -733,7 +758,8 @@ service Lightning {
|
|
733
758
|
the index offset of the last entry. The index offset can be provided to the
|
734
759
|
request to allow the caller to skip a series of records.
|
735
760
|
*/
|
736
|
-
rpc ForwardingHistory(ForwardingHistoryRequest)
|
761
|
+
rpc ForwardingHistory (ForwardingHistoryRequest)
|
762
|
+
returns (ForwardingHistoryResponse) {
|
737
763
|
option (google.api.http) = {
|
738
764
|
post: "/v1/switch"
|
739
765
|
body: "*"
|
@@ -748,7 +774,8 @@ service Lightning {
|
|
748
774
|
method once lnd is running, or via the InitWallet and UnlockWallet methods
|
749
775
|
from the WalletUnlocker service.
|
750
776
|
*/
|
751
|
-
rpc ExportChannelBackup(ExportChannelBackupRequest)
|
777
|
+
rpc ExportChannelBackup (ExportChannelBackupRequest)
|
778
|
+
returns (ChannelBackup) {
|
752
779
|
option (google.api.http) = {
|
753
780
|
get: "/v1/channels/backup/{chan_point.funding_txid_str}/{chan_point.output_index}"
|
754
781
|
};
|
@@ -761,7 +788,8 @@ service Lightning {
|
|
761
788
|
as well, which contains a single encrypted blob containing the backups of
|
762
789
|
each channel.
|
763
790
|
*/
|
764
|
-
rpc ExportAllChannelBackups(ChanBackupExportRequest)
|
791
|
+
rpc ExportAllChannelBackups (ChanBackupExportRequest)
|
792
|
+
returns (ChanBackupSnapshot) {
|
765
793
|
option (google.api.http) = {
|
766
794
|
get: "/v1/channels/backup"
|
767
795
|
};
|
@@ -772,7 +800,8 @@ service Lightning {
|
|
772
800
|
snapshot. This method will accept either a packed Single or a packed Multi.
|
773
801
|
Specifying both will result in an error.
|
774
802
|
*/
|
775
|
-
rpc VerifyChanBackup(ChanBackupSnapshot)
|
803
|
+
rpc VerifyChanBackup (ChanBackupSnapshot)
|
804
|
+
returns (VerifyChanBackupResponse) {
|
776
805
|
option (google.api.http) = {
|
777
806
|
post: "/v1/channels/backup/verify"
|
778
807
|
body: "*"
|
@@ -785,7 +814,8 @@ service Lightning {
|
|
785
814
|
remaining within the channel. If we are able to unpack the backup, then the
|
786
815
|
new channel will be shown under listchannels, as well as pending channels.
|
787
816
|
*/
|
788
|
-
rpc RestoreChannelBackups(RestoreChanBackupRequest)
|
817
|
+
rpc RestoreChannelBackups (RestoreChanBackupRequest)
|
818
|
+
returns (RestoreBackupResponse) {
|
789
819
|
option (google.api.http) = {
|
790
820
|
post: "/v1/channels/backup/restore"
|
791
821
|
body: "*"
|
@@ -801,7 +831,8 @@ service Lightning {
|
|
801
831
|
ups, but the updated set of encrypted multi-chan backups with the closed
|
802
832
|
channel(s) removed.
|
803
833
|
*/
|
804
|
-
rpc SubscribeChannelBackups(ChannelBackupSubscription)
|
834
|
+
rpc SubscribeChannelBackups (ChannelBackupSubscription)
|
835
|
+
returns (stream ChanBackupSnapshot) {
|
805
836
|
};
|
806
837
|
|
807
838
|
/** lncli: `bakemacaroon`
|
@@ -809,7 +840,7 @@ service Lightning {
|
|
809
840
|
write permissions. No first-party caveats are added since this can be done
|
810
841
|
offline.
|
811
842
|
*/
|
812
|
-
rpc BakeMacaroon(BakeMacaroonRequest) returns (BakeMacaroonResponse) {
|
843
|
+
rpc BakeMacaroon (BakeMacaroonRequest) returns (BakeMacaroonResponse) {
|
813
844
|
option (google.api.http) = {
|
814
845
|
post: "/v1/macaroon"
|
815
846
|
body: "*"
|
@@ -819,57 +850,57 @@ service Lightning {
|
|
819
850
|
|
820
851
|
message Utxo {
|
821
852
|
/// The type of address
|
822
|
-
AddressType
|
853
|
+
AddressType address_type = 1;
|
823
854
|
|
824
855
|
/// The address
|
825
|
-
string address = 2
|
856
|
+
string address = 2;
|
826
857
|
|
827
858
|
/// The value of the unspent coin in satoshis
|
828
|
-
int64 amount_sat = 3
|
859
|
+
int64 amount_sat = 3;
|
829
860
|
|
830
861
|
/// The pkscript in hex
|
831
|
-
string pk_script = 4
|
862
|
+
string pk_script = 4;
|
832
863
|
|
833
864
|
/// The outpoint in format txid:n
|
834
|
-
OutPoint outpoint = 5
|
865
|
+
OutPoint outpoint = 5;
|
835
866
|
|
836
867
|
/// The number of confirmations for the Utxo
|
837
|
-
int64 confirmations = 6
|
868
|
+
int64 confirmations = 6;
|
838
869
|
}
|
839
870
|
|
840
871
|
message Transaction {
|
841
872
|
/// The transaction hash
|
842
|
-
string tx_hash = 1
|
873
|
+
string tx_hash = 1;
|
843
874
|
|
844
875
|
/// The transaction amount, denominated in satoshis
|
845
|
-
int64 amount = 2
|
876
|
+
int64 amount = 2;
|
846
877
|
|
847
878
|
/// The number of confirmations
|
848
|
-
int32 num_confirmations = 3
|
879
|
+
int32 num_confirmations = 3;
|
849
880
|
|
850
881
|
/// The hash of the block this transaction was included in
|
851
|
-
string block_hash = 4
|
882
|
+
string block_hash = 4;
|
852
883
|
|
853
884
|
/// The height of the block this transaction was included in
|
854
|
-
int32 block_height = 5
|
885
|
+
int32 block_height = 5;
|
855
886
|
|
856
|
-
/// Timestamp of this transaction
|
857
|
-
int64 time_stamp = 6
|
887
|
+
/// Timestamp of this transaction
|
888
|
+
int64 time_stamp = 6;
|
858
889
|
|
859
890
|
/// Fees paid for this transaction
|
860
|
-
int64 total_fees = 7
|
891
|
+
int64 total_fees = 7;
|
861
892
|
|
862
893
|
/// Addresses that received funds for this transaction
|
863
|
-
repeated string dest_addresses = 8
|
894
|
+
repeated string dest_addresses = 8;
|
864
895
|
|
865
896
|
/// The raw transaction hex.
|
866
|
-
string raw_tx_hex = 9
|
897
|
+
string raw_tx_hex = 9;
|
867
898
|
}
|
868
899
|
message GetTransactionsRequest {
|
869
900
|
}
|
870
901
|
message TransactionDetails {
|
871
902
|
/// The list of transactions relevant to the wallet.
|
872
|
-
repeated Transaction transactions = 1
|
903
|
+
repeated Transaction transactions = 1;
|
873
904
|
}
|
874
905
|
|
875
906
|
message FeeLimit {
|
@@ -964,14 +995,14 @@ message SendRequest {
|
|
964
995
|
*/
|
965
996
|
bytes last_hop_pubkey = 13;
|
966
997
|
|
967
|
-
/**
|
998
|
+
/**
|
968
999
|
An optional maximum total time lock for the route. This should not exceed
|
969
1000
|
lnd's `--max-cltv-expiry` setting. If zero, then the value of
|
970
1001
|
`--max-cltv-expiry` is enforced.
|
971
1002
|
*/
|
972
1003
|
uint32 cltv_limit = 10;
|
973
1004
|
|
974
|
-
/**
|
1005
|
+
/**
|
975
1006
|
An optional field that can be used to pass an arbitrary set of TLV records
|
976
1007
|
to a peer which understands the new records. This can be used to pass
|
977
1008
|
application specific data during the payment attempt. Record types are
|
@@ -985,7 +1016,7 @@ message SendRequest {
|
|
985
1016
|
|
986
1017
|
/**
|
987
1018
|
Features assumed to be supported by the final node. All transitive feature
|
988
|
-
|
1019
|
+
dependencies must also be set properly. For a given feature bit pair, either
|
989
1020
|
optional or remote may be set, but not both. If this field is nil or empty,
|
990
1021
|
the router will try to load destination features from the graph as a
|
991
1022
|
fallback.
|
@@ -994,10 +1025,10 @@ message SendRequest {
|
|
994
1025
|
}
|
995
1026
|
|
996
1027
|
message SendResponse {
|
997
|
-
string payment_error = 1
|
998
|
-
bytes payment_preimage = 2
|
999
|
-
Route payment_route = 3
|
1000
|
-
bytes payment_hash = 4
|
1028
|
+
string payment_error = 1;
|
1029
|
+
bytes payment_preimage = 2;
|
1030
|
+
Route payment_route = 3;
|
1031
|
+
bytes payment_hash = 4;
|
1001
1032
|
}
|
1002
1033
|
|
1003
1034
|
message SendToRouteRequest {
|
@@ -1029,7 +1060,8 @@ message ChannelAcceptRequest {
|
|
1029
1060
|
/// The pending channel id.
|
1030
1061
|
bytes pending_chan_id = 3;
|
1031
1062
|
|
1032
|
-
/// The funding amount in satoshis that initiator wishes to use in the
|
1063
|
+
/// The funding amount in satoshis that initiator wishes to use in the
|
1064
|
+
/// channel.
|
1033
1065
|
uint64 funding_amt = 4;
|
1034
1066
|
|
1035
1067
|
/// The push amount of the proposed channel in millisatoshis.
|
@@ -1038,28 +1070,32 @@ message ChannelAcceptRequest {
|
|
1038
1070
|
/// The dust limit of the initiator's commitment tx.
|
1039
1071
|
uint64 dust_limit = 6;
|
1040
1072
|
|
1041
|
-
/// The maximum amount of coins in millisatoshis that can be pending in this
|
1073
|
+
/// The maximum amount of coins in millisatoshis that can be pending in this
|
1074
|
+
/// channel.
|
1042
1075
|
uint64 max_value_in_flight = 7;
|
1043
1076
|
|
1044
|
-
/// The minimum amount of satoshis the initiator requires us to have at all
|
1077
|
+
/// The minimum amount of satoshis the initiator requires us to have at all
|
1078
|
+
/// times.
|
1045
1079
|
uint64 channel_reserve = 8;
|
1046
1080
|
|
1047
1081
|
/// The smallest HTLC in millisatoshis that the initiator will accept.
|
1048
1082
|
uint64 min_htlc = 9;
|
1049
1083
|
|
1050
|
-
/// The initial fee rate that the initiator suggests for both commitment
|
1084
|
+
/// The initial fee rate that the initiator suggests for both commitment
|
1085
|
+
/// transactions.
|
1051
1086
|
uint64 fee_per_kw = 10;
|
1052
1087
|
|
1053
1088
|
/**
|
1054
|
-
The number of blocks to use for the relative time lock in the pay-to-self
|
1055
|
-
of both commitment transactions.
|
1089
|
+
The number of blocks to use for the relative time lock in the pay-to-self
|
1090
|
+
output of both commitment transactions.
|
1056
1091
|
*/
|
1057
1092
|
uint32 csv_delay = 11;
|
1058
1093
|
|
1059
1094
|
/// The total number of incoming HTLC's that the initiator will accept.
|
1060
1095
|
uint32 max_accepted_htlcs = 12;
|
1061
1096
|
|
1062
|
-
/// A bit-field which the initiator uses to specify proposed channel
|
1097
|
+
/// A bit-field which the initiator uses to specify proposed channel
|
1098
|
+
/// behavior.
|
1063
1099
|
uint32 channel_flags = 13;
|
1064
1100
|
}
|
1065
1101
|
|
@@ -1077,80 +1113,86 @@ message ChannelPoint {
|
|
1077
1113
|
Txid of the funding transaction. When using REST, this field must be
|
1078
1114
|
encoded as base64.
|
1079
1115
|
*/
|
1080
|
-
bytes funding_txid_bytes = 1
|
1116
|
+
bytes funding_txid_bytes = 1;
|
1081
1117
|
|
1082
1118
|
/**
|
1083
1119
|
Hex-encoded string representing the byte-reversed hash of the funding
|
1084
1120
|
transaction.
|
1085
1121
|
*/
|
1086
|
-
string funding_txid_str = 2
|
1122
|
+
string funding_txid_str = 2;
|
1087
1123
|
}
|
1088
1124
|
|
1089
1125
|
/// The index of the output of the funding transaction
|
1090
|
-
uint32 output_index = 3
|
1126
|
+
uint32 output_index = 3;
|
1091
1127
|
}
|
1092
1128
|
|
1093
1129
|
message OutPoint {
|
1094
1130
|
/// Raw bytes representing the transaction id.
|
1095
|
-
bytes txid_bytes = 1
|
1131
|
+
bytes txid_bytes = 1;
|
1096
1132
|
|
1097
1133
|
/// Reversed, hex-encoded string representing the transaction id.
|
1098
|
-
string txid_str = 2
|
1134
|
+
string txid_str = 2;
|
1099
1135
|
|
1100
1136
|
/// The index of the output on the transaction.
|
1101
|
-
uint32 output_index = 3
|
1137
|
+
uint32 output_index = 3;
|
1102
1138
|
}
|
1103
1139
|
|
1104
1140
|
message LightningAddress {
|
1105
1141
|
/// The identity pubkey of the Lightning node
|
1106
|
-
string pubkey = 1
|
1142
|
+
string pubkey = 1;
|
1107
1143
|
|
1108
|
-
/// The network location of the lightning node, e.g. `69.69.69.69:1337` or
|
1109
|
-
|
1144
|
+
/// The network location of the lightning node, e.g. `69.69.69.69:1337` or
|
1145
|
+
/// `localhost:10011`
|
1146
|
+
string host = 2;
|
1110
1147
|
}
|
1111
1148
|
|
1112
1149
|
message EstimateFeeRequest {
|
1113
1150
|
/// The map from addresses to amounts for the transaction.
|
1114
1151
|
map<string, int64> AddrToAmount = 1;
|
1115
1152
|
|
1116
|
-
/// The target number of blocks that this transaction should be confirmed
|
1153
|
+
/// The target number of blocks that this transaction should be confirmed
|
1154
|
+
/// by.
|
1117
1155
|
int32 target_conf = 2;
|
1118
1156
|
}
|
1119
1157
|
|
1120
1158
|
message EstimateFeeResponse {
|
1121
1159
|
/// The total fee in satoshis.
|
1122
|
-
int64 fee_sat = 1
|
1160
|
+
int64 fee_sat = 1;
|
1123
1161
|
|
1124
1162
|
/// The fee rate in satoshi/byte.
|
1125
|
-
int64 feerate_sat_per_byte = 2
|
1163
|
+
int64 feerate_sat_per_byte = 2;
|
1126
1164
|
}
|
1127
1165
|
|
1128
1166
|
message SendManyRequest {
|
1129
1167
|
/// The map from addresses to amounts
|
1130
1168
|
map<string, int64> AddrToAmount = 1;
|
1131
1169
|
|
1132
|
-
/// The target number of blocks that this transaction should be confirmed
|
1170
|
+
/// The target number of blocks that this transaction should be confirmed
|
1171
|
+
/// by.
|
1133
1172
|
int32 target_conf = 3;
|
1134
1173
|
|
1135
|
-
/// A manual fee rate set in sat/byte that should be used when crafting the
|
1174
|
+
/// A manual fee rate set in sat/byte that should be used when crafting the
|
1175
|
+
/// transaction.
|
1136
1176
|
int64 sat_per_byte = 5;
|
1137
1177
|
}
|
1138
1178
|
message SendManyResponse {
|
1139
1179
|
/// The id of the transaction
|
1140
|
-
string txid = 1
|
1180
|
+
string txid = 1;
|
1141
1181
|
}
|
1142
1182
|
|
1143
1183
|
message SendCoinsRequest {
|
1144
|
-
/// The address to send coins to
|
1184
|
+
/// The address to send coins to
|
1145
1185
|
string addr = 1;
|
1146
1186
|
|
1147
1187
|
/// The amount in satoshis to send
|
1148
1188
|
int64 amount = 2;
|
1149
1189
|
|
1150
|
-
/// The target number of blocks that this transaction should be confirmed
|
1190
|
+
/// The target number of blocks that this transaction should be confirmed
|
1191
|
+
/// by.
|
1151
1192
|
int32 target_conf = 3;
|
1152
1193
|
|
1153
|
-
/// A manual fee rate set in sat/byte that should be used when crafting the
|
1194
|
+
/// A manual fee rate set in sat/byte that should be used when crafting the
|
1195
|
+
/// transaction.
|
1154
1196
|
int64 sat_per_byte = 5;
|
1155
1197
|
|
1156
1198
|
/**
|
@@ -1158,11 +1200,11 @@ message SendCoinsRequest {
|
|
1158
1200
|
send all the coins under control of the internal wallet to the specified
|
1159
1201
|
address.
|
1160
1202
|
*/
|
1161
|
-
bool send_all = 6;
|
1203
|
+
bool send_all = 6;
|
1162
1204
|
}
|
1163
1205
|
message SendCoinsResponse {
|
1164
1206
|
/// The transaction ID of the transaction
|
1165
|
-
string txid = 1
|
1207
|
+
string txid = 1;
|
1166
1208
|
}
|
1167
1209
|
|
1168
1210
|
message ListUnspentRequest {
|
@@ -1174,20 +1216,20 @@ message ListUnspentRequest {
|
|
1174
1216
|
}
|
1175
1217
|
message ListUnspentResponse {
|
1176
1218
|
/// A list of utxos
|
1177
|
-
repeated Utxo utxos = 1
|
1219
|
+
repeated Utxo utxos = 1;
|
1178
1220
|
}
|
1179
1221
|
|
1180
|
-
/**
|
1222
|
+
/**
|
1181
1223
|
`AddressType` has to be one of:
|
1182
1224
|
|
1183
1225
|
- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)
|
1184
1226
|
- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)
|
1185
1227
|
*/
|
1186
1228
|
enum AddressType {
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1229
|
+
WITNESS_PUBKEY_HASH = 0;
|
1230
|
+
NESTED_PUBKEY_HASH = 1;
|
1231
|
+
UNUSED_WITNESS_PUBKEY_HASH = 2;
|
1232
|
+
UNUSED_NESTED_PUBKEY_HASH = 3;
|
1191
1233
|
}
|
1192
1234
|
|
1193
1235
|
message NewAddressRequest {
|
@@ -1196,7 +1238,7 @@ message NewAddressRequest {
|
|
1196
1238
|
}
|
1197
1239
|
message NewAddressResponse {
|
1198
1240
|
/// The newly generated wallet address
|
1199
|
-
string address = 1
|
1241
|
+
string address = 1;
|
1200
1242
|
}
|
1201
1243
|
|
1202
1244
|
message SignMessageRequest {
|
@@ -1204,11 +1246,11 @@ message SignMessageRequest {
|
|
1204
1246
|
The message to be signed. When using REST, this field must be encoded as
|
1205
1247
|
base64.
|
1206
1248
|
*/
|
1207
|
-
bytes msg = 1
|
1249
|
+
bytes msg = 1;
|
1208
1250
|
}
|
1209
1251
|
message SignMessageResponse {
|
1210
1252
|
/// The signature for the given message
|
1211
|
-
string signature = 1
|
1253
|
+
string signature = 1;
|
1212
1254
|
}
|
1213
1255
|
|
1214
1256
|
message VerifyMessageRequest {
|
@@ -1216,17 +1258,17 @@ message VerifyMessageRequest {
|
|
1216
1258
|
The message over which the signature is to be verified. When using REST,
|
1217
1259
|
this field must be encoded as base64.
|
1218
1260
|
*/
|
1219
|
-
bytes msg = 1
|
1261
|
+
bytes msg = 1;
|
1220
1262
|
|
1221
1263
|
/// The signature to be verified over the given message
|
1222
|
-
string signature = 2
|
1264
|
+
string signature = 2;
|
1223
1265
|
}
|
1224
1266
|
message VerifyMessageResponse {
|
1225
1267
|
/// Whether the signature was valid over the given message
|
1226
|
-
bool valid = 1
|
1268
|
+
bool valid = 1;
|
1227
1269
|
|
1228
1270
|
/// The pubkey recovered from the signature
|
1229
|
-
string pubkey = 2
|
1271
|
+
string pubkey = 2;
|
1230
1272
|
}
|
1231
1273
|
|
1232
1274
|
message ConnectPeerRequest {
|
@@ -1242,47 +1284,75 @@ message ConnectPeerResponse {
|
|
1242
1284
|
|
1243
1285
|
message DisconnectPeerRequest {
|
1244
1286
|
/// The pubkey of the node to disconnect from
|
1245
|
-
string pub_key = 1
|
1287
|
+
string pub_key = 1;
|
1246
1288
|
}
|
1247
1289
|
message DisconnectPeerResponse {
|
1248
1290
|
}
|
1249
1291
|
|
1250
1292
|
message HTLC {
|
1251
|
-
bool incoming = 1
|
1252
|
-
int64 amount = 2
|
1253
|
-
bytes hash_lock = 3
|
1254
|
-
uint32 expiration_height = 4
|
1293
|
+
bool incoming = 1;
|
1294
|
+
int64 amount = 2;
|
1295
|
+
bytes hash_lock = 3;
|
1296
|
+
uint32 expiration_height = 4;
|
1297
|
+
}
|
1298
|
+
|
1299
|
+
enum CommitmentType {
|
1300
|
+
/**
|
1301
|
+
A channel using the legacy commitment format having tweaked to_remote
|
1302
|
+
keys.
|
1303
|
+
*/
|
1304
|
+
LEGACY = 0;
|
1305
|
+
|
1306
|
+
/**
|
1307
|
+
A channel that uses the modern commitment format where the key in the
|
1308
|
+
output of the remote party does not change each state. This makes back
|
1309
|
+
up and recovery easier as when the channel is closed, the funds go
|
1310
|
+
directly to that key.
|
1311
|
+
*/
|
1312
|
+
STATIC_REMOTE_KEY = 1;
|
1313
|
+
|
1314
|
+
/**
|
1315
|
+
A channel that uses a commitment format that has anchor outputs on the
|
1316
|
+
commitments, allowing fee bumping after a force close transaction has
|
1317
|
+
been broadcast.
|
1318
|
+
*/
|
1319
|
+
ANCHORS = 2;
|
1320
|
+
|
1321
|
+
/**
|
1322
|
+
Returned when the commitment type isn't known or unavailable.
|
1323
|
+
*/
|
1324
|
+
UNKNOWN_COMMITMENT_TYPE = 999;
|
1255
1325
|
}
|
1256
1326
|
|
1257
1327
|
message Channel {
|
1258
1328
|
/// Whether this channel is active or not
|
1259
|
-
bool active = 1
|
1329
|
+
bool active = 1;
|
1260
1330
|
|
1261
1331
|
/// The identity pubkey of the remote node
|
1262
|
-
string remote_pubkey = 2
|
1332
|
+
string remote_pubkey = 2;
|
1263
1333
|
|
1264
1334
|
/**
|
1265
1335
|
The outpoint (txid:index) of the funding transaction. With this value, Bob
|
1266
1336
|
will be able to generate a signature for Alice's version of the commitment
|
1267
1337
|
transaction.
|
1268
1338
|
*/
|
1269
|
-
string channel_point = 3
|
1339
|
+
string channel_point = 3;
|
1270
1340
|
|
1271
1341
|
/**
|
1272
1342
|
The unique channel ID for the channel. The first 3 bytes are the block
|
1273
1343
|
height, the next 3 the index within the block, and the last 2 bytes are the
|
1274
1344
|
output index for the channel.
|
1275
1345
|
*/
|
1276
|
-
uint64 chan_id = 4 [
|
1346
|
+
uint64 chan_id = 4 [jstype = JS_STRING];
|
1277
1347
|
|
1278
1348
|
/// The total amount of funds held in this channel
|
1279
|
-
int64 capacity = 5
|
1349
|
+
int64 capacity = 5;
|
1280
1350
|
|
1281
1351
|
/// This node's current balance in this channel
|
1282
|
-
int64 local_balance = 6
|
1352
|
+
int64 local_balance = 6;
|
1283
1353
|
|
1284
1354
|
/// The counterparty's current balance in this channel
|
1285
|
-
int64 remote_balance = 7
|
1355
|
+
int64 remote_balance = 7;
|
1286
1356
|
|
1287
1357
|
/**
|
1288
1358
|
The amount calculated to be paid in fees for the current set of commitment
|
@@ -1290,84 +1360,83 @@ message Channel {
|
|
1290
1360
|
allow the fee amount to be removed and recalculated with each channel state
|
1291
1361
|
update, including updates that happen after a system restart.
|
1292
1362
|
*/
|
1293
|
-
int64 commit_fee = 8
|
1363
|
+
int64 commit_fee = 8;
|
1294
1364
|
|
1295
1365
|
/// The weight of the commitment transaction
|
1296
|
-
int64 commit_weight = 9
|
1366
|
+
int64 commit_weight = 9;
|
1297
1367
|
|
1298
1368
|
/**
|
1299
1369
|
The required number of satoshis per kilo-weight that the requester will pay
|
1300
1370
|
at all times, for both the funding transaction and commitment transaction.
|
1301
1371
|
This value can later be updated once the channel is open.
|
1302
1372
|
*/
|
1303
|
-
int64 fee_per_kw = 10
|
1373
|
+
int64 fee_per_kw = 10;
|
1304
1374
|
|
1305
1375
|
/// The unsettled balance in this channel
|
1306
|
-
int64 unsettled_balance = 11
|
1376
|
+
int64 unsettled_balance = 11;
|
1307
1377
|
|
1308
1378
|
/**
|
1309
1379
|
The total number of satoshis we've sent within this channel.
|
1310
1380
|
*/
|
1311
|
-
int64 total_satoshis_sent = 12
|
1381
|
+
int64 total_satoshis_sent = 12;
|
1312
1382
|
|
1313
1383
|
/**
|
1314
1384
|
The total number of satoshis we've received within this channel.
|
1315
1385
|
*/
|
1316
|
-
int64 total_satoshis_received = 13
|
1386
|
+
int64 total_satoshis_received = 13;
|
1317
1387
|
|
1318
1388
|
/**
|
1319
1389
|
The total number of updates conducted within this channel.
|
1320
1390
|
*/
|
1321
|
-
uint64 num_updates = 14
|
1391
|
+
uint64 num_updates = 14;
|
1322
1392
|
|
1323
1393
|
/**
|
1324
1394
|
The list of active, uncleared HTLCs currently pending within the channel.
|
1325
1395
|
*/
|
1326
|
-
repeated HTLC pending_htlcs = 15
|
1396
|
+
repeated HTLC pending_htlcs = 15;
|
1327
1397
|
|
1328
1398
|
/**
|
1329
1399
|
The CSV delay expressed in relative blocks. If the channel is force closed,
|
1330
1400
|
we will need to wait for this many blocks before we can regain our funds.
|
1331
1401
|
*/
|
1332
|
-
uint32 csv_delay = 16
|
1402
|
+
uint32 csv_delay = 16;
|
1333
1403
|
|
1334
1404
|
/// Whether this channel is advertised to the network or not.
|
1335
|
-
bool private = 17
|
1405
|
+
bool private = 17;
|
1336
1406
|
|
1337
1407
|
/// True if we were the ones that created the channel.
|
1338
|
-
bool initiator = 18
|
1408
|
+
bool initiator = 18;
|
1339
1409
|
|
1340
1410
|
/// A set of flags showing the current state of the channel.
|
1341
|
-
string chan_status_flags = 19
|
1411
|
+
string chan_status_flags = 19;
|
1342
1412
|
|
1343
1413
|
/// The minimum satoshis this node is required to reserve in its balance.
|
1344
|
-
int64 local_chan_reserve_sat = 20
|
1414
|
+
int64 local_chan_reserve_sat = 20;
|
1345
1415
|
|
1346
1416
|
/**
|
1347
1417
|
The minimum satoshis the other node is required to reserve in its balance.
|
1348
1418
|
*/
|
1349
|
-
int64 remote_chan_reserve_sat = 21
|
1419
|
+
int64 remote_chan_reserve_sat = 21;
|
1350
1420
|
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
*/
|
1357
|
-
bool static_remote_key = 22 [json_name = "static_remote_key"];
|
1421
|
+
/// Deprecated. Use commitment_type.
|
1422
|
+
bool static_remote_key = 22 [deprecated = true];
|
1423
|
+
|
1424
|
+
/// The commitment type used by this channel.
|
1425
|
+
CommitmentType commitment_type = 26;
|
1358
1426
|
|
1359
1427
|
/**
|
1360
1428
|
The number of seconds that the channel has been monitored by the channel
|
1361
1429
|
scoring system. Scores are currently not persisted, so this value may be
|
1362
1430
|
less than the lifetime of the channel [EXPERIMENTAL].
|
1363
1431
|
*/
|
1364
|
-
int64 lifetime = 23
|
1432
|
+
int64 lifetime = 23;
|
1365
1433
|
|
1366
1434
|
/**
|
1367
1435
|
The number of seconds that the remote peer has been observed as being online
|
1368
|
-
by the channel scoring system over the lifetime of the channel
|
1436
|
+
by the channel scoring system over the lifetime of the channel
|
1437
|
+
[EXPERIMENTAL].
|
1369
1438
|
*/
|
1370
|
-
int64 uptime = 24
|
1439
|
+
int64 uptime = 24;
|
1371
1440
|
|
1372
1441
|
/**
|
1373
1442
|
Close address is the address that we will enforce payout to on cooperative
|
@@ -1376,48 +1445,78 @@ message Channel {
|
|
1376
1445
|
request. If this value is not set, you can still choose a payout address by
|
1377
1446
|
cooperatively closing with the delivery_address field set.
|
1378
1447
|
*/
|
1379
|
-
string close_address = 25
|
1380
|
-
|
1448
|
+
string close_address = 25;
|
1449
|
+
|
1450
|
+
/*
|
1451
|
+
The amount that the initiator of the channel optionally pushed to the remote
|
1452
|
+
party on channel open. This amount will be zero if the channel initiator did
|
1453
|
+
not push any funds to the remote peer. If the initiator field is true, we
|
1454
|
+
pushed this amount to our peer, if it is false, the remote peer pushed this
|
1455
|
+
amount to us.
|
1456
|
+
*/
|
1457
|
+
uint64 push_amount_sat = 27;
|
1381
1458
|
|
1459
|
+
/**
|
1460
|
+
This uint32 indicates if this channel is to be considered 'frozen'. A
|
1461
|
+
frozen channel doest not allow a cooperative channel close by the
|
1462
|
+
initiator. The thaw_height is the height that this restriction stops
|
1463
|
+
applying to the channel. This field is optional, not setting it or using a
|
1464
|
+
value of zero will mean the channel has no additional restrictions.
|
1465
|
+
*/
|
1466
|
+
uint32 thaw_height = 28;
|
1467
|
+
}
|
1382
1468
|
|
1383
1469
|
message ListChannelsRequest {
|
1384
1470
|
bool active_only = 1;
|
1385
1471
|
bool inactive_only = 2;
|
1386
1472
|
bool public_only = 3;
|
1387
1473
|
bool private_only = 4;
|
1474
|
+
|
1475
|
+
/**
|
1476
|
+
Filters the response for channels with a target peer's pubkey. If peer is
|
1477
|
+
empty, all channels will be returned.
|
1478
|
+
*/
|
1479
|
+
bytes peer = 5;
|
1388
1480
|
}
|
1389
1481
|
message ListChannelsResponse {
|
1390
1482
|
/// The list of active channels
|
1391
|
-
repeated Channel channels = 11
|
1483
|
+
repeated Channel channels = 11;
|
1484
|
+
}
|
1485
|
+
|
1486
|
+
enum Initiator {
|
1487
|
+
INITIATOR_UNKNOWN = 0;
|
1488
|
+
INITIATOR_LOCAL = 1;
|
1489
|
+
INITIATOR_REMOTE = 2;
|
1490
|
+
INITIATOR_BOTH = 3;
|
1392
1491
|
}
|
1393
1492
|
|
1394
1493
|
message ChannelCloseSummary {
|
1395
|
-
/// The outpoint (txid:index) of the funding transaction.
|
1396
|
-
string channel_point = 1
|
1494
|
+
/// The outpoint (txid:index) of the funding transaction.
|
1495
|
+
string channel_point = 1;
|
1397
1496
|
|
1398
|
-
/// The unique channel ID for the channel.
|
1399
|
-
uint64 chan_id = 2 [
|
1497
|
+
/// The unique channel ID for the channel.
|
1498
|
+
uint64 chan_id = 2 [jstype = JS_STRING];
|
1400
1499
|
|
1401
1500
|
/// The hash of the genesis block that this channel resides within.
|
1402
|
-
string chain_hash = 3
|
1501
|
+
string chain_hash = 3;
|
1403
1502
|
|
1404
1503
|
/// The txid of the transaction which ultimately closed this channel.
|
1405
|
-
string closing_tx_hash = 4
|
1504
|
+
string closing_tx_hash = 4;
|
1406
1505
|
|
1407
1506
|
/// Public key of the remote peer that we formerly had a channel with.
|
1408
|
-
string remote_pubkey = 5
|
1507
|
+
string remote_pubkey = 5;
|
1409
1508
|
|
1410
1509
|
/// Total capacity of the channel.
|
1411
|
-
int64 capacity = 6
|
1510
|
+
int64 capacity = 6;
|
1412
1511
|
|
1413
1512
|
/// Height at which the funding transaction was spent.
|
1414
|
-
uint32 close_height = 7
|
1513
|
+
uint32 close_height = 7;
|
1415
1514
|
|
1416
1515
|
/// Settled balance at the time of channel closure
|
1417
|
-
int64 settled_balance = 8
|
1516
|
+
int64 settled_balance = 8;
|
1418
1517
|
|
1419
1518
|
/// The sum of all the time-locked outputs at the time of channel closure
|
1420
|
-
int64 time_locked_balance = 9
|
1519
|
+
int64 time_locked_balance = 9;
|
1421
1520
|
|
1422
1521
|
enum ClosureType {
|
1423
1522
|
COOPERATIVE_CLOSE = 0;
|
@@ -1429,7 +1528,23 @@ message ChannelCloseSummary {
|
|
1429
1528
|
}
|
1430
1529
|
|
1431
1530
|
/// Details on how the channel was closed.
|
1432
|
-
ClosureType close_type = 10
|
1531
|
+
ClosureType close_type = 10;
|
1532
|
+
|
1533
|
+
/**
|
1534
|
+
Open initiator is the party that initiated opening the channel. Note that
|
1535
|
+
this value may be unknown if the channel was closed before we migrated to
|
1536
|
+
store open channel information after close.
|
1537
|
+
*/
|
1538
|
+
Initiator open_initiator = 11;
|
1539
|
+
|
1540
|
+
/**
|
1541
|
+
Close initiator indicates which party initiated the close. This value will
|
1542
|
+
be unknown for channels that were cooperatively closed before we started
|
1543
|
+
tracking cooperative close initiators. Note that this indicates which party
|
1544
|
+
initiated a close, and it is possible for both to initiate cooperative or
|
1545
|
+
force closes, although only one party's close will be confirmed on chain.
|
1546
|
+
*/
|
1547
|
+
Initiator close_initiator = 12;
|
1433
1548
|
}
|
1434
1549
|
|
1435
1550
|
message ClosedChannelsRequest {
|
@@ -1441,34 +1556,34 @@ message ClosedChannelsRequest {
|
|
1441
1556
|
bool abandoned = 6;
|
1442
1557
|
}
|
1443
1558
|
|
1444
|
-
message ClosedChannelsResponse {
|
1445
|
-
repeated ChannelCloseSummary channels = 1
|
1559
|
+
message ClosedChannelsResponse {
|
1560
|
+
repeated ChannelCloseSummary channels = 1;
|
1446
1561
|
}
|
1447
1562
|
|
1448
1563
|
message Peer {
|
1449
1564
|
/// The identity pubkey of the peer
|
1450
|
-
string pub_key = 1
|
1565
|
+
string pub_key = 1;
|
1451
1566
|
|
1452
1567
|
/// Network address of the peer; eg `127.0.0.1:10011`
|
1453
|
-
string address = 3
|
1568
|
+
string address = 3;
|
1454
1569
|
|
1455
1570
|
/// Bytes of data transmitted to this peer
|
1456
|
-
uint64 bytes_sent = 4
|
1571
|
+
uint64 bytes_sent = 4;
|
1457
1572
|
|
1458
1573
|
/// Bytes of data transmitted from this peer
|
1459
|
-
uint64 bytes_recv = 5
|
1574
|
+
uint64 bytes_recv = 5;
|
1460
1575
|
|
1461
1576
|
/// Satoshis sent to this peer
|
1462
|
-
int64 sat_sent = 6
|
1577
|
+
int64 sat_sent = 6;
|
1463
1578
|
|
1464
1579
|
/// Satoshis received from this peer
|
1465
|
-
int64 sat_recv = 7
|
1580
|
+
int64 sat_recv = 7;
|
1466
1581
|
|
1467
1582
|
/// A channel is inbound if the counterparty initiated the channel
|
1468
|
-
bool inbound = 8
|
1583
|
+
bool inbound = 8;
|
1469
1584
|
|
1470
1585
|
/// Ping time to this peer
|
1471
|
-
int64 ping_time = 9
|
1586
|
+
int64 ping_time = 9;
|
1472
1587
|
|
1473
1588
|
enum SyncType {
|
1474
1589
|
/**
|
@@ -1488,17 +1603,40 @@ message Peer {
|
|
1488
1603
|
}
|
1489
1604
|
|
1490
1605
|
// The type of sync we are currently performing with this peer.
|
1491
|
-
SyncType sync_type = 10
|
1606
|
+
SyncType sync_type = 10;
|
1492
1607
|
|
1493
1608
|
/// Features advertised by the remote peer in their init message.
|
1494
|
-
map<uint32, Feature> features = 11
|
1609
|
+
map<uint32, Feature> features = 11;
|
1610
|
+
|
1611
|
+
/*
|
1612
|
+
The latest errors received from our peer with timestamps, limited to the 10
|
1613
|
+
most recent errors. These errors are tracked across peer connections, but
|
1614
|
+
are not persisted across lnd restarts. Note that these errors are only
|
1615
|
+
stored for peers that we have channels open with, to prevent peers from
|
1616
|
+
spamming us with errors at no cost.
|
1617
|
+
*/
|
1618
|
+
repeated TimestampedError errors = 12;
|
1619
|
+
}
|
1620
|
+
|
1621
|
+
message TimestampedError {
|
1622
|
+
// The unix timestamp in seconds when the error occurred.
|
1623
|
+
uint64 timestamp = 1;
|
1624
|
+
|
1625
|
+
// The string representation of the error sent by our peer.
|
1626
|
+
string error = 2;
|
1495
1627
|
}
|
1496
1628
|
|
1497
1629
|
message ListPeersRequest {
|
1630
|
+
/*
|
1631
|
+
If true, only the last error that our peer sent us will be returned with
|
1632
|
+
the peer's information, rather than the full set of historic errors we have
|
1633
|
+
stored.
|
1634
|
+
*/
|
1635
|
+
bool latest_error = 1;
|
1498
1636
|
}
|
1499
1637
|
message ListPeersResponse {
|
1500
1638
|
/// The list of currently connected peers
|
1501
|
-
repeated Peer peers = 1
|
1639
|
+
repeated Peer peers = 1;
|
1502
1640
|
}
|
1503
1641
|
|
1504
1642
|
message PeerEventSubscription {
|
@@ -1506,86 +1644,88 @@ message PeerEventSubscription {
|
|
1506
1644
|
|
1507
1645
|
message PeerEvent {
|
1508
1646
|
/// The identity pubkey of the peer.
|
1509
|
-
string pub_key = 1
|
1647
|
+
string pub_key = 1;
|
1510
1648
|
|
1511
1649
|
enum EventType {
|
1512
1650
|
PEER_ONLINE = 0;
|
1513
1651
|
PEER_OFFLINE = 1;
|
1514
1652
|
}
|
1515
1653
|
|
1516
|
-
EventType type = 2
|
1654
|
+
EventType type = 2;
|
1517
1655
|
}
|
1518
1656
|
|
1519
1657
|
message GetInfoRequest {
|
1520
1658
|
}
|
1521
1659
|
message GetInfoResponse {
|
1522
|
-
|
1523
1660
|
/// The version of the LND software that the node is running.
|
1524
|
-
string version = 14
|
1661
|
+
string version = 14;
|
1662
|
+
|
1663
|
+
/// The SHA1 commit hash that the daemon is compiled with.
|
1664
|
+
string commit_hash = 20;
|
1525
1665
|
|
1526
1666
|
/// The identity pubkey of the current node.
|
1527
|
-
string identity_pubkey = 1
|
1667
|
+
string identity_pubkey = 1;
|
1528
1668
|
|
1529
1669
|
/// If applicable, the alias of the current node, e.g. "bob"
|
1530
|
-
string alias = 2
|
1670
|
+
string alias = 2;
|
1531
1671
|
|
1532
1672
|
/// The color of the current node in hex code format
|
1533
|
-
string color = 17
|
1673
|
+
string color = 17;
|
1534
1674
|
|
1535
1675
|
/// Number of pending channels
|
1536
|
-
uint32 num_pending_channels = 3
|
1676
|
+
uint32 num_pending_channels = 3;
|
1537
1677
|
|
1538
1678
|
/// Number of active channels
|
1539
|
-
uint32 num_active_channels = 4
|
1679
|
+
uint32 num_active_channels = 4;
|
1540
1680
|
|
1541
1681
|
/// Number of inactive channels
|
1542
|
-
uint32 num_inactive_channels = 15
|
1682
|
+
uint32 num_inactive_channels = 15;
|
1543
1683
|
|
1544
1684
|
/// Number of peers
|
1545
|
-
uint32 num_peers = 5
|
1685
|
+
uint32 num_peers = 5;
|
1546
1686
|
|
1547
1687
|
/// The node's current view of the height of the best block
|
1548
|
-
uint32 block_height = 6
|
1688
|
+
uint32 block_height = 6;
|
1549
1689
|
|
1550
1690
|
/// The node's current view of the hash of the best block
|
1551
|
-
string block_hash = 8
|
1691
|
+
string block_hash = 8;
|
1552
1692
|
|
1553
1693
|
/// Timestamp of the block best known to the wallet
|
1554
|
-
int64 best_header_timestamp = 13
|
1694
|
+
int64 best_header_timestamp = 13;
|
1555
1695
|
|
1556
1696
|
/// Whether the wallet's view is synced to the main chain
|
1557
|
-
bool synced_to_chain = 9
|
1697
|
+
bool synced_to_chain = 9;
|
1558
1698
|
|
1559
1699
|
// Whether we consider ourselves synced with the public channel graph.
|
1560
|
-
bool synced_to_graph = 18
|
1700
|
+
bool synced_to_graph = 18;
|
1561
1701
|
|
1562
|
-
/**
|
1563
|
-
Whether the current node is connected to testnet. This field is
|
1564
|
-
deprecated and the network field should be used instead
|
1702
|
+
/**
|
1703
|
+
Whether the current node is connected to testnet. This field is
|
1704
|
+
deprecated and the network field should be used instead
|
1565
1705
|
**/
|
1566
|
-
bool testnet = 10 [
|
1706
|
+
bool testnet = 10 [deprecated = true];
|
1567
1707
|
|
1568
1708
|
reserved 11;
|
1569
1709
|
|
1570
1710
|
/// A list of active chains the node is connected to
|
1571
|
-
repeated Chain chains = 16
|
1711
|
+
repeated Chain chains = 16;
|
1572
1712
|
|
1573
1713
|
/// The URIs of the current node.
|
1574
|
-
repeated string uris = 12
|
1714
|
+
repeated string uris = 12;
|
1575
1715
|
|
1576
1716
|
/*
|
1577
1717
|
Features that our node has advertised in our init message, node
|
1578
1718
|
announcements and invoices.
|
1579
1719
|
*/
|
1580
|
-
map<uint32, Feature> features = 19
|
1720
|
+
map<uint32, Feature> features = 19;
|
1581
1721
|
}
|
1582
1722
|
|
1583
1723
|
message Chain {
|
1584
1724
|
/// The blockchain the node is on (eg bitcoin, litecoin)
|
1585
|
-
string chain = 1
|
1725
|
+
string chain = 1;
|
1586
1726
|
|
1587
1727
|
/// The network the node is on (eg regtest, testnet, mainnet)
|
1588
|
-
string network = 2
|
1728
|
+
string network = 2;
|
1589
1729
|
}
|
1590
1730
|
|
1591
1731
|
message ConfirmationUpdate {
|
@@ -1596,13 +1736,13 @@ message ConfirmationUpdate {
|
|
1596
1736
|
}
|
1597
1737
|
|
1598
1738
|
message ChannelOpenUpdate {
|
1599
|
-
ChannelPoint channel_point = 1
|
1739
|
+
ChannelPoint channel_point = 1;
|
1600
1740
|
}
|
1601
1741
|
|
1602
1742
|
message ChannelCloseUpdate {
|
1603
|
-
bytes closing_txid = 1
|
1743
|
+
bytes closing_txid = 1;
|
1604
1744
|
|
1605
|
-
bool success = 2
|
1745
|
+
bool success = 2;
|
1606
1746
|
}
|
1607
1747
|
|
1608
1748
|
message CloseChannelRequest {
|
@@ -1613,13 +1753,16 @@ message CloseChannelRequest {
|
|
1613
1753
|
*/
|
1614
1754
|
ChannelPoint channel_point = 1;
|
1615
1755
|
|
1616
|
-
/// If true, then the channel will be closed forcibly. This means the
|
1756
|
+
/// If true, then the channel will be closed forcibly. This means the
|
1757
|
+
/// current commitment transaction will be signed and broadcast.
|
1617
1758
|
bool force = 2;
|
1618
1759
|
|
1619
|
-
/// The target number of blocks that the closure transaction should be
|
1760
|
+
/// The target number of blocks that the closure transaction should be
|
1761
|
+
/// confirmed by.
|
1620
1762
|
int32 target_conf = 3;
|
1621
1763
|
|
1622
|
-
/// A manual fee rate set in sat/byte that should be used when crafting the
|
1764
|
+
/// A manual fee rate set in sat/byte that should be used when crafting the
|
1765
|
+
/// closure transaction.
|
1623
1766
|
int64 sat_per_byte = 4;
|
1624
1767
|
|
1625
1768
|
/*
|
@@ -1628,19 +1771,41 @@ message CloseChannelRequest {
|
|
1628
1771
|
is set, the request to close will fail because the channel must pay out
|
1629
1772
|
to the upfront shutdown addresss.
|
1630
1773
|
*/
|
1631
|
-
string delivery_address = 5
|
1774
|
+
string delivery_address = 5;
|
1632
1775
|
}
|
1633
1776
|
|
1634
1777
|
message CloseStatusUpdate {
|
1635
1778
|
oneof update {
|
1636
|
-
PendingUpdate close_pending = 1
|
1637
|
-
ChannelCloseUpdate chan_close = 3
|
1779
|
+
PendingUpdate close_pending = 1;
|
1780
|
+
ChannelCloseUpdate chan_close = 3;
|
1638
1781
|
}
|
1639
1782
|
}
|
1640
1783
|
|
1641
1784
|
message PendingUpdate {
|
1642
|
-
bytes txid = 1
|
1643
|
-
uint32 output_index = 2
|
1785
|
+
bytes txid = 1;
|
1786
|
+
uint32 output_index = 2;
|
1787
|
+
}
|
1788
|
+
|
1789
|
+
message ReadyForPsbtFunding {
|
1790
|
+
/**
|
1791
|
+
The P2WSH address of the channel funding multisig address that the below
|
1792
|
+
specified amount in satoshis needs to be sent to.
|
1793
|
+
*/
|
1794
|
+
string funding_address = 1;
|
1795
|
+
|
1796
|
+
/**
|
1797
|
+
The exact amount in satoshis that needs to be sent to the above address to
|
1798
|
+
fund the pending channel.
|
1799
|
+
*/
|
1800
|
+
int64 funding_amount = 2;
|
1801
|
+
|
1802
|
+
/**
|
1803
|
+
A raw PSBT that contains the pending channel output. If a base PSBT was
|
1804
|
+
provided in the PsbtShim, this is the base PSBT with one additional output.
|
1805
|
+
If no base PSBT was specified, this is an otherwise empty PSBT with exactly
|
1806
|
+
one output.
|
1807
|
+
*/
|
1808
|
+
bytes psbt = 3;
|
1644
1809
|
}
|
1645
1810
|
|
1646
1811
|
message OpenChannelRequest {
|
@@ -1648,40 +1813,48 @@ message OpenChannelRequest {
|
|
1648
1813
|
The pubkey of the node to open a channel with. When using REST, this field
|
1649
1814
|
must be encoded as base64.
|
1650
1815
|
*/
|
1651
|
-
bytes node_pubkey = 2
|
1816
|
+
bytes node_pubkey = 2;
|
1652
1817
|
|
1653
1818
|
/**
|
1654
1819
|
The hex encoded pubkey of the node to open a channel with. Deprecated now
|
1655
1820
|
that the REST gateway supports base64 encoding of bytes fields.
|
1656
1821
|
*/
|
1657
|
-
string node_pubkey_string = 3 [
|
1822
|
+
string node_pubkey_string = 3 [deprecated = true];
|
1658
1823
|
|
1659
1824
|
/// The number of satoshis the wallet should commit to the channel
|
1660
|
-
int64 local_funding_amount = 4
|
1825
|
+
int64 local_funding_amount = 4;
|
1661
1826
|
|
1662
|
-
/// The number of satoshis to push to the remote side as part of the initial
|
1663
|
-
|
1827
|
+
/// The number of satoshis to push to the remote side as part of the initial
|
1828
|
+
/// commitment state
|
1829
|
+
int64 push_sat = 5;
|
1664
1830
|
|
1665
|
-
/// The target number of blocks that the funding transaction should be
|
1831
|
+
/// The target number of blocks that the funding transaction should be
|
1832
|
+
/// confirmed by.
|
1666
1833
|
int32 target_conf = 6;
|
1667
1834
|
|
1668
|
-
/// A manual fee rate set in sat/byte that should be used when crafting the
|
1835
|
+
/// A manual fee rate set in sat/byte that should be used when crafting the
|
1836
|
+
/// funding transaction.
|
1669
1837
|
int64 sat_per_byte = 7;
|
1670
1838
|
|
1671
|
-
/// Whether this channel should be private, not announced to the greater
|
1672
|
-
|
1839
|
+
/// Whether this channel should be private, not announced to the greater
|
1840
|
+
/// network.
|
1841
|
+
bool private = 8;
|
1673
1842
|
|
1674
|
-
/// The minimum value in millisatoshi we will require for incoming HTLCs on
|
1675
|
-
|
1843
|
+
/// The minimum value in millisatoshi we will require for incoming HTLCs on
|
1844
|
+
/// the channel.
|
1845
|
+
int64 min_htlc_msat = 9;
|
1676
1846
|
|
1677
|
-
/// The delay we require on the remote's commitment transaction. If this is
|
1678
|
-
|
1847
|
+
/// The delay we require on the remote's commitment transaction. If this is
|
1848
|
+
/// not set, it will be scaled automatically with the channel size.
|
1849
|
+
uint32 remote_csv_delay = 10;
|
1679
1850
|
|
1680
|
-
/// The minimum number of confirmations each one of your outputs used for
|
1681
|
-
|
1851
|
+
/// The minimum number of confirmations each one of your outputs used for
|
1852
|
+
/// the funding transaction must satisfy.
|
1853
|
+
int32 min_confs = 11;
|
1682
1854
|
|
1683
|
-
/// Whether unconfirmed outputs should be used as inputs for the funding
|
1684
|
-
|
1855
|
+
/// Whether unconfirmed outputs should be used as inputs for the funding
|
1856
|
+
/// transaction.
|
1857
|
+
bool spend_unconfirmed = 12;
|
1685
1858
|
|
1686
1859
|
/*
|
1687
1860
|
Close address is an optional address which specifies the address to which
|
@@ -1693,7 +1866,7 @@ message OpenChannelRequest {
|
|
1693
1866
|
Note: If this value is set on channel creation, you will *not* be able to
|
1694
1867
|
cooperatively close out to a different address.
|
1695
1868
|
*/
|
1696
|
-
string close_address = 13
|
1869
|
+
string close_address = 13;
|
1697
1870
|
|
1698
1871
|
/**
|
1699
1872
|
Funding shims are an optional argument that allow the caller to intercept
|
@@ -1702,19 +1875,34 @@ message OpenChannelRequest {
|
|
1702
1875
|
that is generated by the wallet as normal, or signal that signing will be
|
1703
1876
|
carried out in an interactive manner (PSBT based).
|
1704
1877
|
*/
|
1705
|
-
FundingShim funding_shim = 14
|
1878
|
+
FundingShim funding_shim = 14;
|
1706
1879
|
}
|
1707
1880
|
message OpenStatusUpdate {
|
1708
1881
|
oneof update {
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1882
|
+
/**
|
1883
|
+
Signals that the channel is now fully negotiated and the funding
|
1884
|
+
transaction published.
|
1885
|
+
*/
|
1886
|
+
PendingUpdate chan_pending = 1;
|
1887
|
+
|
1888
|
+
/**
|
1889
|
+
Signals that the channel's funding transaction has now reached the
|
1890
|
+
required number of confirmations on chain and can be used.
|
1891
|
+
*/
|
1892
|
+
ChannelOpenUpdate chan_open = 3;
|
1893
|
+
|
1894
|
+
/**
|
1895
|
+
Signals that the funding process has been suspended and the construction
|
1896
|
+
of a PSBT that funds the channel PK script is now required.
|
1897
|
+
*/
|
1898
|
+
ReadyForPsbtFunding psbt_fund = 5;
|
1899
|
+
}
|
1712
1900
|
|
1713
1901
|
/**
|
1714
1902
|
The pending channel ID of the created channel. This value may be used to
|
1715
1903
|
further the funding flow manually via the FundingStateStep method.
|
1716
1904
|
*/
|
1717
|
-
bytes pending_chan_id = 4
|
1905
|
+
bytes pending_chan_id = 4;
|
1718
1906
|
}
|
1719
1907
|
|
1720
1908
|
message KeyLocator {
|
@@ -1726,15 +1914,15 @@ message KeyLocator {
|
|
1726
1914
|
}
|
1727
1915
|
|
1728
1916
|
message KeyDescriptor {
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1917
|
+
/**
|
1918
|
+
The raw bytes of the key being identified.
|
1919
|
+
*/
|
1920
|
+
bytes raw_key_bytes = 1;
|
1733
1921
|
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
1922
|
+
/**
|
1923
|
+
The key locator that identifies which key to use for signing.
|
1924
|
+
*/
|
1925
|
+
KeyLocator key_loc = 2;
|
1738
1926
|
}
|
1739
1927
|
|
1740
1928
|
message ChanPointShim {
|
@@ -1760,11 +1948,44 @@ message ChanPointShim {
|
|
1760
1948
|
channel ID.
|
1761
1949
|
*/
|
1762
1950
|
bytes pending_chan_id = 5;
|
1951
|
+
|
1952
|
+
/**
|
1953
|
+
This uint32 indicates if this channel is to be considered 'frozen'. A
|
1954
|
+
frozen channel does not allow a cooperative channel close by the
|
1955
|
+
initiator. The thaw_height is the height that this restriction stops
|
1956
|
+
applying to the channel.
|
1957
|
+
*/
|
1958
|
+
uint32 thaw_height = 6;
|
1959
|
+
}
|
1960
|
+
|
1961
|
+
message PsbtShim {
|
1962
|
+
/**
|
1963
|
+
A unique identifier of 32 random bytes that will be used as the pending
|
1964
|
+
channel ID to identify the PSBT state machine when interacting with it and
|
1965
|
+
on the wire protocol to initiate the funding request.
|
1966
|
+
*/
|
1967
|
+
bytes pending_chan_id = 1;
|
1968
|
+
|
1969
|
+
/**
|
1970
|
+
An optional base PSBT the new channel output will be added to. If this is
|
1971
|
+
non-empty, it must be a binary serialized PSBT.
|
1972
|
+
*/
|
1973
|
+
bytes base_psbt = 2;
|
1763
1974
|
}
|
1764
1975
|
|
1765
1976
|
message FundingShim {
|
1766
1977
|
oneof shim {
|
1978
|
+
/**
|
1979
|
+
A channel shim where the channel point was fully constructed outside
|
1980
|
+
of lnd's wallet and the transaction might already be published.
|
1981
|
+
*/
|
1767
1982
|
ChanPointShim chan_point_shim = 1;
|
1983
|
+
|
1984
|
+
/**
|
1985
|
+
A channel shim that uses a PSBT to fund and sign the channel funding
|
1986
|
+
transaction.
|
1987
|
+
*/
|
1988
|
+
PsbtShim psbt_shim = 2;
|
1768
1989
|
}
|
1769
1990
|
}
|
1770
1991
|
|
@@ -1773,17 +1994,56 @@ message FundingShimCancel {
|
|
1773
1994
|
bytes pending_chan_id = 1;
|
1774
1995
|
}
|
1775
1996
|
|
1997
|
+
message FundingPsbtVerify {
|
1998
|
+
/**
|
1999
|
+
The funded but not yet signed PSBT that sends the exact channel capacity
|
2000
|
+
amount to the PK script returned in the open channel message in a previous
|
2001
|
+
step.
|
2002
|
+
*/
|
2003
|
+
bytes funded_psbt = 1;
|
2004
|
+
|
2005
|
+
/// The pending channel ID of the channel to get the PSBT for.
|
2006
|
+
bytes pending_chan_id = 2;
|
2007
|
+
}
|
2008
|
+
|
2009
|
+
message FundingPsbtFinalize {
|
2010
|
+
/**
|
2011
|
+
The funded PSBT that contains all witness data to send the exact channel
|
2012
|
+
capacity amount to the PK script returned in the open channel message in a
|
2013
|
+
previous step.
|
2014
|
+
*/
|
2015
|
+
bytes signed_psbt = 1;
|
2016
|
+
|
2017
|
+
/// The pending channel ID of the channel to get the PSBT for.
|
2018
|
+
bytes pending_chan_id = 2;
|
2019
|
+
}
|
2020
|
+
|
1776
2021
|
message FundingTransitionMsg {
|
1777
2022
|
oneof trigger {
|
1778
2023
|
/**
|
1779
|
-
The funding shim to
|
2024
|
+
The funding shim to register. This should be used before any
|
1780
2025
|
channel funding has began by the remote party, as it is intended as a
|
1781
|
-
|
2026
|
+
preparatory step for the full channel funding.
|
1782
2027
|
*/
|
1783
2028
|
FundingShim shim_register = 1;
|
1784
2029
|
|
1785
2030
|
/// Used to cancel an existing registered funding shim.
|
1786
2031
|
FundingShimCancel shim_cancel = 2;
|
2032
|
+
|
2033
|
+
/**
|
2034
|
+
Used to continue a funding flow that was initiated to be executed
|
2035
|
+
through a PSBT. This step verifies that the PSBT contains the correct
|
2036
|
+
outputs to fund the channel.
|
2037
|
+
*/
|
2038
|
+
FundingPsbtVerify psbt_verify = 3;
|
2039
|
+
|
2040
|
+
/**
|
2041
|
+
Used to continue a funding flow that was initiated to be executed
|
2042
|
+
through a PSBT. This step finalizes the funded and signed PSBT, finishes
|
2043
|
+
negotiation with the peer and finally publishes the resulting funding
|
2044
|
+
transaction.
|
2045
|
+
*/
|
2046
|
+
FundingPsbtFinalize psbt_finalize = 4;
|
1787
2047
|
}
|
1788
2048
|
}
|
1789
2049
|
|
@@ -1791,57 +2051,64 @@ message FundingStateStepResp {
|
|
1791
2051
|
}
|
1792
2052
|
|
1793
2053
|
message PendingHTLC {
|
1794
|
-
|
1795
2054
|
/// The direction within the channel that the htlc was sent
|
1796
|
-
bool incoming = 1
|
2055
|
+
bool incoming = 1;
|
1797
2056
|
|
1798
2057
|
/// The total value of the htlc
|
1799
|
-
int64 amount = 2
|
2058
|
+
int64 amount = 2;
|
1800
2059
|
|
1801
2060
|
/// The final output to be swept back to the user's wallet
|
1802
|
-
string outpoint = 3
|
2061
|
+
string outpoint = 3;
|
1803
2062
|
|
1804
2063
|
/// The next block height at which we can spend the current stage
|
1805
|
-
uint32 maturity_height = 4
|
2064
|
+
uint32 maturity_height = 4;
|
1806
2065
|
|
1807
2066
|
/**
|
1808
2067
|
The number of blocks remaining until the current stage can be swept.
|
1809
2068
|
Negative values indicate how many blocks have passed since becoming
|
1810
2069
|
mature.
|
1811
2070
|
*/
|
1812
|
-
int32 blocks_til_maturity = 5
|
2071
|
+
int32 blocks_til_maturity = 5;
|
1813
2072
|
|
1814
2073
|
/// Indicates whether the htlc is in its first or second stage of recovery
|
1815
|
-
uint32 stage = 6
|
2074
|
+
uint32 stage = 6;
|
1816
2075
|
}
|
1817
2076
|
|
1818
|
-
message PendingChannelsRequest {
|
2077
|
+
message PendingChannelsRequest {
|
2078
|
+
}
|
1819
2079
|
message PendingChannelsResponse {
|
1820
2080
|
message PendingChannel {
|
1821
|
-
string remote_node_pub = 1
|
1822
|
-
string channel_point = 2
|
2081
|
+
string remote_node_pub = 1;
|
2082
|
+
string channel_point = 2;
|
2083
|
+
|
2084
|
+
int64 capacity = 3;
|
1823
2085
|
|
1824
|
-
int64
|
2086
|
+
int64 local_balance = 4;
|
2087
|
+
int64 remote_balance = 5;
|
1825
2088
|
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
/// The minimum satoshis this node is required to reserve in its balance.
|
1830
|
-
int64 local_chan_reserve_sat = 6 [json_name = "local_chan_reserve_sat"];
|
2089
|
+
/// The minimum satoshis this node is required to reserve in its
|
2090
|
+
/// balance.
|
2091
|
+
int64 local_chan_reserve_sat = 6;
|
1831
2092
|
|
1832
2093
|
/**
|
1833
2094
|
The minimum satoshis the other node is required to reserve in its
|
1834
2095
|
balance.
|
1835
2096
|
*/
|
1836
|
-
int64 remote_chan_reserve_sat = 7
|
2097
|
+
int64 remote_chan_reserve_sat = 7;
|
2098
|
+
|
2099
|
+
// The party that initiated opening the channel.
|
2100
|
+
Initiator initiator = 8;
|
2101
|
+
|
2102
|
+
/// The commitment type used by this channel.
|
2103
|
+
CommitmentType commitment_type = 9;
|
1837
2104
|
}
|
1838
2105
|
|
1839
2106
|
message PendingOpenChannel {
|
1840
2107
|
/// The pending channel
|
1841
|
-
PendingChannel channel = 1
|
2108
|
+
PendingChannel channel = 1;
|
1842
2109
|
|
1843
2110
|
/// The height at which this channel will be confirmed
|
1844
|
-
uint32 confirmation_height = 2
|
2111
|
+
uint32 confirmation_height = 2;
|
1845
2112
|
|
1846
2113
|
/**
|
1847
2114
|
The amount calculated to be paid in fees for the current set of
|
@@ -1850,17 +2117,17 @@ message PendingChannelsResponse {
|
|
1850
2117
|
each channel state update, including updates that happen after a system
|
1851
2118
|
restart.
|
1852
2119
|
*/
|
1853
|
-
int64 commit_fee = 4
|
2120
|
+
int64 commit_fee = 4;
|
1854
2121
|
|
1855
2122
|
/// The weight of the commitment transaction
|
1856
|
-
int64 commit_weight = 5
|
2123
|
+
int64 commit_weight = 5;
|
1857
2124
|
|
1858
2125
|
/**
|
1859
2126
|
The required number of satoshis per kilo-weight that the requester will
|
1860
2127
|
pay at all times, for both the funding transaction and commitment
|
1861
2128
|
transaction. This value can later be updated once the channel is open.
|
1862
2129
|
*/
|
1863
|
-
int64 fee_per_kw = 6
|
2130
|
+
int64 fee_per_kw = 6;
|
1864
2131
|
}
|
1865
2132
|
|
1866
2133
|
message WaitingCloseChannel {
|
@@ -1868,7 +2135,42 @@ message PendingChannelsResponse {
|
|
1868
2135
|
PendingChannel channel = 1;
|
1869
2136
|
|
1870
2137
|
/// The balance in satoshis encumbered in this channel
|
1871
|
-
int64 limbo_balance = 2
|
2138
|
+
int64 limbo_balance = 2;
|
2139
|
+
|
2140
|
+
/**
|
2141
|
+
A list of valid commitment transactions. Any of these can confirm at
|
2142
|
+
this point.
|
2143
|
+
*/
|
2144
|
+
Commitments commitments = 3;
|
2145
|
+
}
|
2146
|
+
|
2147
|
+
message Commitments {
|
2148
|
+
/// Hash of the local version of the commitment tx.
|
2149
|
+
string local_txid = 1;
|
2150
|
+
|
2151
|
+
/// Hash of the remote version of the commitment tx.
|
2152
|
+
string remote_txid = 2;
|
2153
|
+
|
2154
|
+
/// Hash of the remote pending version of the commitment tx.
|
2155
|
+
string remote_pending_txid = 3;
|
2156
|
+
|
2157
|
+
/*
|
2158
|
+
The amount in satoshis calculated to be paid in fees for the local
|
2159
|
+
commitment.
|
2160
|
+
*/
|
2161
|
+
uint64 local_commit_fee_sat = 4;
|
2162
|
+
|
2163
|
+
/*
|
2164
|
+
The amount in satoshis calculated to be paid in fees for the remote
|
2165
|
+
commitment.
|
2166
|
+
*/
|
2167
|
+
uint64 remote_commit_fee_sat = 5;
|
2168
|
+
|
2169
|
+
/*
|
2170
|
+
The amount in satoshis calculated to be paid in fees for the remote
|
2171
|
+
pending commitment.
|
2172
|
+
*/
|
2173
|
+
uint64 remote_pending_commit_fee_sat = 6;
|
1872
2174
|
}
|
1873
2175
|
|
1874
2176
|
message ClosedChannel {
|
@@ -1876,49 +2178,61 @@ message PendingChannelsResponse {
|
|
1876
2178
|
PendingChannel channel = 1;
|
1877
2179
|
|
1878
2180
|
/// The transaction id of the closing transaction
|
1879
|
-
string closing_txid = 2
|
2181
|
+
string closing_txid = 2;
|
1880
2182
|
}
|
1881
2183
|
|
1882
2184
|
message ForceClosedChannel {
|
1883
2185
|
/// The pending channel to be force closed
|
1884
|
-
PendingChannel channel = 1
|
2186
|
+
PendingChannel channel = 1;
|
1885
2187
|
|
1886
2188
|
/// The transaction id of the closing transaction
|
1887
|
-
string closing_txid = 2
|
2189
|
+
string closing_txid = 2;
|
1888
2190
|
|
1889
2191
|
/// The balance in satoshis encumbered in this pending channel
|
1890
|
-
int64 limbo_balance = 3
|
2192
|
+
int64 limbo_balance = 3;
|
1891
2193
|
|
1892
2194
|
/// The height at which funds can be swept into the wallet
|
1893
|
-
uint32 maturity_height = 4
|
2195
|
+
uint32 maturity_height = 4;
|
1894
2196
|
|
1895
2197
|
/*
|
1896
2198
|
Remaining # of blocks until the commitment output can be swept.
|
1897
2199
|
Negative values indicate how many blocks have passed since becoming
|
1898
2200
|
mature.
|
1899
2201
|
*/
|
1900
|
-
int32 blocks_til_maturity = 5
|
2202
|
+
int32 blocks_til_maturity = 5;
|
1901
2203
|
|
1902
2204
|
/// The total value of funds successfully recovered from this channel
|
1903
|
-
int64 recovered_balance = 6
|
2205
|
+
int64 recovered_balance = 6;
|
1904
2206
|
|
1905
|
-
repeated PendingHTLC pending_htlcs = 8
|
2207
|
+
repeated PendingHTLC pending_htlcs = 8;
|
2208
|
+
|
2209
|
+
enum AnchorState {
|
2210
|
+
LIMBO = 0;
|
2211
|
+
RECOVERED = 1;
|
2212
|
+
LOST = 2;
|
2213
|
+
}
|
2214
|
+
|
2215
|
+
AnchorState anchor = 9;
|
1906
2216
|
}
|
1907
2217
|
|
1908
2218
|
/// The balance in satoshis encumbered in pending channels
|
1909
|
-
int64 total_limbo_balance = 1
|
2219
|
+
int64 total_limbo_balance = 1;
|
1910
2220
|
|
1911
2221
|
/// Channels pending opening
|
1912
|
-
repeated PendingOpenChannel pending_open_channels = 2
|
2222
|
+
repeated PendingOpenChannel pending_open_channels = 2;
|
1913
2223
|
|
1914
|
-
|
1915
|
-
|
2224
|
+
/*
|
2225
|
+
Deprecated: Channels pending closing previously contained cooperatively
|
2226
|
+
closed channels with a single confirmation. These channels are now
|
2227
|
+
considered closed from the time we see them on chain.
|
2228
|
+
*/
|
2229
|
+
repeated ClosedChannel pending_closing_channels = 3 [deprecated = true];
|
1916
2230
|
|
1917
2231
|
/// Channels pending force closing
|
1918
|
-
repeated ForceClosedChannel pending_force_closing_channels =
|
2232
|
+
repeated ForceClosedChannel pending_force_closing_channels = 4;
|
1919
2233
|
|
1920
2234
|
/// Channels waiting for closing tx to confirm
|
1921
|
-
repeated WaitingCloseChannel waiting_close_channels = 5
|
2235
|
+
repeated WaitingCloseChannel waiting_close_channels = 5;
|
1922
2236
|
}
|
1923
2237
|
|
1924
2238
|
message ChannelEventSubscription {
|
@@ -1926,43 +2240,45 @@ message ChannelEventSubscription {
|
|
1926
2240
|
|
1927
2241
|
message ChannelEventUpdate {
|
1928
2242
|
oneof channel {
|
1929
|
-
Channel open_channel = 1
|
1930
|
-
ChannelCloseSummary closed_channel = 2
|
1931
|
-
ChannelPoint active_channel = 3
|
1932
|
-
ChannelPoint inactive_channel = 4
|
2243
|
+
Channel open_channel = 1;
|
2244
|
+
ChannelCloseSummary closed_channel = 2;
|
2245
|
+
ChannelPoint active_channel = 3;
|
2246
|
+
ChannelPoint inactive_channel = 4;
|
2247
|
+
PendingUpdate pending_open_channel = 6;
|
1933
2248
|
}
|
1934
2249
|
|
1935
2250
|
enum UpdateType {
|
1936
|
-
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
2251
|
+
OPEN_CHANNEL = 0;
|
2252
|
+
CLOSED_CHANNEL = 1;
|
2253
|
+
ACTIVE_CHANNEL = 2;
|
2254
|
+
INACTIVE_CHANNEL = 3;
|
2255
|
+
PENDING_OPEN_CHANNEL = 4;
|
1940
2256
|
}
|
1941
2257
|
|
1942
|
-
UpdateType type = 5
|
2258
|
+
UpdateType type = 5;
|
1943
2259
|
}
|
1944
2260
|
|
1945
2261
|
message WalletBalanceRequest {
|
1946
2262
|
}
|
1947
2263
|
message WalletBalanceResponse {
|
1948
2264
|
/// The balance of the wallet
|
1949
|
-
int64 total_balance = 1
|
2265
|
+
int64 total_balance = 1;
|
1950
2266
|
|
1951
2267
|
/// The confirmed balance of a wallet(with >= 1 confirmations)
|
1952
|
-
int64 confirmed_balance = 2
|
2268
|
+
int64 confirmed_balance = 2;
|
1953
2269
|
|
1954
2270
|
/// The unconfirmed balance of a wallet(with 0 confirmations)
|
1955
|
-
int64 unconfirmed_balance = 3
|
2271
|
+
int64 unconfirmed_balance = 3;
|
1956
2272
|
}
|
1957
2273
|
|
1958
2274
|
message ChannelBalanceRequest {
|
1959
2275
|
}
|
1960
2276
|
message ChannelBalanceResponse {
|
1961
2277
|
/// Sum of channels balances denominated in satoshis
|
1962
|
-
int64 balance = 1
|
2278
|
+
int64 balance = 1;
|
1963
2279
|
|
1964
2280
|
/// Sum of channels pending balances denominated in satoshis
|
1965
|
-
int64 pending_open_balance = 2
|
2281
|
+
int64 pending_open_balance = 2;
|
1966
2282
|
}
|
1967
2283
|
|
1968
2284
|
message QueryRoutesRequest {
|
@@ -2030,14 +2346,14 @@ message QueryRoutesRequest {
|
|
2030
2346
|
*/
|
2031
2347
|
repeated NodePair ignored_pairs = 10;
|
2032
2348
|
|
2033
|
-
/**
|
2349
|
+
/**
|
2034
2350
|
An optional maximum total time lock for the route. If the source is empty or
|
2035
2351
|
ourselves, this should not exceed lnd's `--max-cltv-expiry` setting. If
|
2036
2352
|
zero, then the value of `--max-cltv-expiry` is used as the limit.
|
2037
2353
|
*/
|
2038
2354
|
uint32 cltv_limit = 11;
|
2039
2355
|
|
2040
|
-
/**
|
2356
|
+
/**
|
2041
2357
|
An optional field that can be used to pass an arbitrary set of TLV records
|
2042
2358
|
to a peer which understands the new records. This can be used to pass
|
2043
2359
|
application specific data during the payment attempt. If the destination
|
@@ -2065,7 +2381,7 @@ message QueryRoutesRequest {
|
|
2065
2381
|
|
2066
2382
|
/**
|
2067
2383
|
Features assumed to be supported by the final node. All transitive feature
|
2068
|
-
|
2384
|
+
dependencies must also be set properly. For a given feature bit pair, either
|
2069
2385
|
optional or remote may be set, but not both. If this field is nil or empty,
|
2070
2386
|
the router will try to load destination features from the graph as a
|
2071
2387
|
fallback.
|
@@ -2105,13 +2421,13 @@ message QueryRoutesResponse {
|
|
2105
2421
|
The route that results from the path finding operation. This is still a
|
2106
2422
|
repeated field to retain backwards compatibility.
|
2107
2423
|
*/
|
2108
|
-
repeated Route routes = 1
|
2424
|
+
repeated Route routes = 1;
|
2109
2425
|
|
2110
2426
|
/**
|
2111
2427
|
The success probability of the returned route based on the current mission
|
2112
2428
|
control state. [EXPERIMENTAL]
|
2113
2429
|
*/
|
2114
|
-
double success_prob = 2
|
2430
|
+
double success_prob = 2;
|
2115
2431
|
}
|
2116
2432
|
|
2117
2433
|
message Hop {
|
@@ -2120,41 +2436,41 @@ message Hop {
|
|
2120
2436
|
height, the next 3 the index within the block, and the last 2 bytes are the
|
2121
2437
|
output index for the channel.
|
2122
2438
|
*/
|
2123
|
-
uint64 chan_id = 1 [
|
2124
|
-
int64 chan_capacity = 2
|
2125
|
-
int64 amt_to_forward = 3 [
|
2126
|
-
int64 fee = 4 [
|
2127
|
-
uint32 expiry = 5
|
2128
|
-
int64 amt_to_forward_msat = 6
|
2129
|
-
int64 fee_msat = 7
|
2439
|
+
uint64 chan_id = 1 [jstype = JS_STRING];
|
2440
|
+
int64 chan_capacity = 2;
|
2441
|
+
int64 amt_to_forward = 3 [deprecated = true];
|
2442
|
+
int64 fee = 4 [deprecated = true];
|
2443
|
+
uint32 expiry = 5;
|
2444
|
+
int64 amt_to_forward_msat = 6;
|
2445
|
+
int64 fee_msat = 7;
|
2130
2446
|
|
2131
2447
|
/**
|
2132
2448
|
An optional public key of the hop. If the public key is given, the payment
|
2133
2449
|
can be executed without relying on a copy of the channel graph.
|
2134
2450
|
*/
|
2135
|
-
string pub_key = 8
|
2451
|
+
string pub_key = 8;
|
2136
2452
|
|
2137
|
-
/**
|
2453
|
+
/**
|
2138
2454
|
If set to true, then this hop will be encoded using the new variable length
|
2139
2455
|
TLV format. Note that if any custom tlv_records below are specified, then
|
2140
2456
|
this field MUST be set to true for them to be encoded properly.
|
2141
2457
|
*/
|
2142
|
-
bool tlv_payload = 9
|
2458
|
+
bool tlv_payload = 9;
|
2143
2459
|
|
2144
2460
|
/**
|
2145
|
-
An optional TLV record
|
2461
|
+
An optional TLV record that signals the use of an MPP payment. If present,
|
2146
2462
|
the receiver will enforce that that the same mpp_record is included in the
|
2147
2463
|
final hop payload of all non-zero payments in the HTLC set. If empty, a
|
2148
2464
|
regular single-shot payment is or was attempted.
|
2149
2465
|
*/
|
2150
|
-
MPPRecord mpp_record = 10
|
2466
|
+
MPPRecord mpp_record = 10;
|
2151
2467
|
|
2152
2468
|
/**
|
2153
2469
|
An optional set of key-value TLV records. This is useful within the context
|
2154
2470
|
of the SendToRoute call as it allows callers to specify arbitrary K-V pairs
|
2155
2471
|
to drop off at each hop within the onion.
|
2156
2472
|
*/
|
2157
|
-
map<uint64, bytes> custom_records = 11
|
2473
|
+
map<uint64, bytes> custom_records = 11;
|
2158
2474
|
}
|
2159
2475
|
|
2160
2476
|
message MPPRecord {
|
@@ -2164,7 +2480,7 @@ message MPPRecord {
|
|
2164
2480
|
subpayments, and match the payment_addr provided in the receiver's invoice.
|
2165
2481
|
The same payment_addr must be used on all subpayments.
|
2166
2482
|
*/
|
2167
|
-
bytes payment_addr = 11
|
2483
|
+
bytes payment_addr = 11;
|
2168
2484
|
|
2169
2485
|
/**
|
2170
2486
|
The total amount in milli-satoshis being sent as part of a larger multi-path
|
@@ -2172,7 +2488,7 @@ message MPPRecord {
|
|
2172
2488
|
and payment_hash sum exactly to total_amt_msat. The same
|
2173
2489
|
total_amt_msat must be used on all subpayments.
|
2174
2490
|
*/
|
2175
|
-
int64 total_amt_msat = 10
|
2491
|
+
int64 total_amt_msat = 10;
|
2176
2492
|
}
|
2177
2493
|
|
2178
2494
|
/**
|
@@ -2183,21 +2499,20 @@ route is only selected as valid if all the channels have sufficient capacity to
|
|
2183
2499
|
carry the initial payment amount after fees are accounted for.
|
2184
2500
|
*/
|
2185
2501
|
message Route {
|
2186
|
-
|
2187
2502
|
/**
|
2188
2503
|
The cumulative (final) time lock across the entire route. This is the CLTV
|
2189
2504
|
value that should be extended to the first hop in the route. All other hops
|
2190
2505
|
will decrement the time-lock as advertised, leaving enough time for all
|
2191
2506
|
hops to wait for or present the payment preimage to complete the payment.
|
2192
2507
|
*/
|
2193
|
-
uint32 total_time_lock = 1
|
2508
|
+
uint32 total_time_lock = 1;
|
2194
2509
|
|
2195
2510
|
/**
|
2196
2511
|
The sum of the fees paid at each hop within the final route. In the case
|
2197
2512
|
of a one-hop payment, this value will be zero as we don't need to pay a fee
|
2198
2513
|
to ourselves.
|
2199
2514
|
*/
|
2200
|
-
int64 total_fees = 2 [
|
2515
|
+
int64 total_fees = 2 [deprecated = true];
|
2201
2516
|
|
2202
2517
|
/**
|
2203
2518
|
The total amount of funds required to complete a payment over this route.
|
@@ -2206,26 +2521,26 @@ message Route {
|
|
2206
2521
|
satoshis, otherwise the route will fail at an intermediate node due to an
|
2207
2522
|
insufficient amount of fees.
|
2208
2523
|
*/
|
2209
|
-
int64 total_amt = 3 [
|
2524
|
+
int64 total_amt = 3 [deprecated = true];
|
2210
2525
|
|
2211
2526
|
/**
|
2212
2527
|
Contains details concerning the specific forwarding details at each hop.
|
2213
2528
|
*/
|
2214
|
-
repeated Hop hops = 4
|
2215
|
-
|
2529
|
+
repeated Hop hops = 4;
|
2530
|
+
|
2216
2531
|
/**
|
2217
2532
|
The total fees in millisatoshis.
|
2218
2533
|
*/
|
2219
|
-
int64 total_fees_msat = 5
|
2220
|
-
|
2534
|
+
int64 total_fees_msat = 5;
|
2535
|
+
|
2221
2536
|
/**
|
2222
2537
|
The total amount in millisatoshis.
|
2223
2538
|
*/
|
2224
|
-
int64 total_amt_msat = 6
|
2539
|
+
int64 total_amt_msat = 6;
|
2225
2540
|
}
|
2226
2541
|
|
2227
2542
|
message NodeInfoRequest {
|
2228
|
-
/// The 33-byte hex-encoded compressed public of the target node
|
2543
|
+
/// The 33-byte hex-encoded compressed public of the target node
|
2229
2544
|
string pub_key = 1;
|
2230
2545
|
|
2231
2546
|
/// If true, will include all known channels associated with the node.
|
@@ -2233,23 +2548,22 @@ message NodeInfoRequest {
|
|
2233
2548
|
}
|
2234
2549
|
|
2235
2550
|
message NodeInfo {
|
2236
|
-
|
2237
2551
|
/**
|
2238
2552
|
An individual vertex/node within the channel graph. A node is
|
2239
2553
|
connected to other nodes by one or more channel edges emanating from it. As
|
2240
2554
|
the graph is directed, a node will also have an incoming edge attached to
|
2241
2555
|
it for each outgoing edge.
|
2242
2556
|
*/
|
2243
|
-
LightningNode node = 1
|
2557
|
+
LightningNode node = 1;
|
2244
2558
|
|
2245
2559
|
/// The total number of channels for the node.
|
2246
|
-
uint32 num_channels = 2
|
2560
|
+
uint32 num_channels = 2;
|
2247
2561
|
|
2248
2562
|
/// The sum of all channels capacity for the node, denominated in satoshis.
|
2249
|
-
int64 total_capacity = 3
|
2563
|
+
int64 total_capacity = 3;
|
2250
2564
|
|
2251
2565
|
/// A list of all public channels for the node.
|
2252
|
-
repeated ChannelEdge channels = 4
|
2566
|
+
repeated ChannelEdge channels = 4;
|
2253
2567
|
}
|
2254
2568
|
|
2255
2569
|
/**
|
@@ -2259,27 +2573,27 @@ graph is directed, a node will also have an incoming edge attached to it for
|
|
2259
2573
|
each outgoing edge.
|
2260
2574
|
*/
|
2261
2575
|
message LightningNode {
|
2262
|
-
uint32 last_update = 1
|
2263
|
-
string pub_key = 2
|
2264
|
-
string alias = 3
|
2265
|
-
repeated NodeAddress addresses = 4
|
2266
|
-
string color = 5
|
2267
|
-
map<uint32, Feature> features = 6
|
2576
|
+
uint32 last_update = 1;
|
2577
|
+
string pub_key = 2;
|
2578
|
+
string alias = 3;
|
2579
|
+
repeated NodeAddress addresses = 4;
|
2580
|
+
string color = 5;
|
2581
|
+
map<uint32, Feature> features = 6;
|
2268
2582
|
}
|
2269
2583
|
|
2270
2584
|
message NodeAddress {
|
2271
|
-
string network = 1
|
2272
|
-
string addr = 2
|
2585
|
+
string network = 1;
|
2586
|
+
string addr = 2;
|
2273
2587
|
}
|
2274
2588
|
|
2275
2589
|
message RoutingPolicy {
|
2276
|
-
uint32 time_lock_delta = 1
|
2277
|
-
int64 min_htlc = 2
|
2278
|
-
int64 fee_base_msat = 3
|
2279
|
-
int64 fee_rate_milli_msat = 4
|
2280
|
-
bool disabled = 5
|
2281
|
-
uint64 max_htlc_msat = 6
|
2282
|
-
uint32 last_update = 7
|
2590
|
+
uint32 time_lock_delta = 1;
|
2591
|
+
int64 min_htlc = 2;
|
2592
|
+
int64 fee_base_msat = 3;
|
2593
|
+
int64 fee_rate_milli_msat = 4;
|
2594
|
+
bool disabled = 5;
|
2595
|
+
uint64 max_htlc_msat = 6;
|
2596
|
+
uint32 last_update = 7;
|
2283
2597
|
}
|
2284
2598
|
|
2285
2599
|
/**
|
@@ -2290,42 +2604,70 @@ stored. The other portions relevant to routing policy of a channel are stored
|
|
2290
2604
|
within a ChannelEdgePolicy for each direction of the channel.
|
2291
2605
|
*/
|
2292
2606
|
message ChannelEdge {
|
2293
|
-
|
2294
2607
|
/**
|
2295
2608
|
The unique channel ID for the channel. The first 3 bytes are the block
|
2296
2609
|
height, the next 3 the index within the block, and the last 2 bytes are the
|
2297
2610
|
output index for the channel.
|
2298
2611
|
*/
|
2299
|
-
uint64 channel_id = 1 [
|
2300
|
-
string chan_point = 2
|
2612
|
+
uint64 channel_id = 1 [jstype = JS_STRING];
|
2613
|
+
string chan_point = 2;
|
2301
2614
|
|
2302
|
-
uint32 last_update = 3 [
|
2615
|
+
uint32 last_update = 3 [deprecated = true];
|
2303
2616
|
|
2304
|
-
string node1_pub = 4
|
2305
|
-
string node2_pub = 5
|
2617
|
+
string node1_pub = 4;
|
2618
|
+
string node2_pub = 5;
|
2306
2619
|
|
2307
|
-
int64 capacity = 6
|
2620
|
+
int64 capacity = 6;
|
2308
2621
|
|
2309
|
-
RoutingPolicy node1_policy = 7
|
2310
|
-
RoutingPolicy node2_policy = 8
|
2622
|
+
RoutingPolicy node1_policy = 7;
|
2623
|
+
RoutingPolicy node2_policy = 8;
|
2311
2624
|
}
|
2312
2625
|
|
2313
2626
|
message ChannelGraphRequest {
|
2314
|
-
|
2315
|
-
|
2316
|
-
|
2317
|
-
|
2318
|
-
|
2319
|
-
|
2627
|
+
/**
|
2628
|
+
Whether unannounced channels are included in the response or not. If set,
|
2629
|
+
unannounced channels are included. Unannounced channels are both private
|
2630
|
+
channels, and public channels that are not yet announced to the network.
|
2631
|
+
*/
|
2632
|
+
bool include_unannounced = 1;
|
2320
2633
|
}
|
2321
2634
|
|
2322
2635
|
/// Returns a new instance of the directed channel graph.
|
2323
2636
|
message ChannelGraph {
|
2324
2637
|
/// The list of `LightningNode`s in this channel graph
|
2325
|
-
repeated LightningNode nodes = 1
|
2638
|
+
repeated LightningNode nodes = 1;
|
2326
2639
|
|
2327
2640
|
/// The list of `ChannelEdge`s in this channel graph
|
2328
|
-
repeated ChannelEdge edges = 2
|
2641
|
+
repeated ChannelEdge edges = 2;
|
2642
|
+
}
|
2643
|
+
|
2644
|
+
enum NodeMetricType {
|
2645
|
+
UNKNOWN = 0;
|
2646
|
+
BETWEENNESS_CENTRALITY = 1;
|
2647
|
+
}
|
2648
|
+
|
2649
|
+
message NodeMetricsRequest {
|
2650
|
+
/// The requested node metrics.
|
2651
|
+
repeated NodeMetricType types = 1;
|
2652
|
+
}
|
2653
|
+
|
2654
|
+
message NodeMetricsResponse {
|
2655
|
+
/**
|
2656
|
+
Betweenness centrality is the sum of the ratio of shortest paths that pass
|
2657
|
+
through the node for each pair of nodes in the graph (not counting paths
|
2658
|
+
starting or ending at this node).
|
2659
|
+
Map of node pubkey to betweenness centrality of the node. Normalized
|
2660
|
+
values are in the [0,1] closed interval.
|
2661
|
+
*/
|
2662
|
+
map<string, FloatMetric> betweenness_centrality = 1;
|
2663
|
+
}
|
2664
|
+
|
2665
|
+
message FloatMetric {
|
2666
|
+
/// Arbitrary float value.
|
2667
|
+
double value = 1;
|
2668
|
+
|
2669
|
+
/// The value normalized to [0,1] or [-1,1].
|
2670
|
+
double normalized_value = 2;
|
2329
2671
|
}
|
2330
2672
|
|
2331
2673
|
message ChanInfoRequest {
|
@@ -2340,31 +2682,34 @@ message ChanInfoRequest {
|
|
2340
2682
|
message NetworkInfoRequest {
|
2341
2683
|
}
|
2342
2684
|
message NetworkInfo {
|
2343
|
-
uint32 graph_diameter = 1
|
2344
|
-
double avg_out_degree = 2
|
2345
|
-
uint32 max_out_degree = 3
|
2685
|
+
uint32 graph_diameter = 1;
|
2686
|
+
double avg_out_degree = 2;
|
2687
|
+
uint32 max_out_degree = 3;
|
2346
2688
|
|
2347
|
-
uint32 num_nodes = 4
|
2348
|
-
uint32 num_channels = 5
|
2689
|
+
uint32 num_nodes = 4;
|
2690
|
+
uint32 num_channels = 5;
|
2349
2691
|
|
2350
|
-
int64 total_network_capacity = 6
|
2692
|
+
int64 total_network_capacity = 6;
|
2351
2693
|
|
2352
|
-
double avg_channel_size = 7
|
2353
|
-
int64 min_channel_size = 8
|
2354
|
-
int64 max_channel_size = 9
|
2355
|
-
int64 median_channel_size_sat = 10
|
2694
|
+
double avg_channel_size = 7;
|
2695
|
+
int64 min_channel_size = 8;
|
2696
|
+
int64 max_channel_size = 9;
|
2697
|
+
int64 median_channel_size_sat = 10;
|
2356
2698
|
|
2357
2699
|
// The number of edges marked as zombies.
|
2358
|
-
uint64 num_zombie_chans = 11
|
2700
|
+
uint64 num_zombie_chans = 11;
|
2359
2701
|
|
2360
2702
|
// TODO(roasbeef): fee rate info, expiry
|
2361
2703
|
// * also additional RPC for tracking fee info once in
|
2362
2704
|
}
|
2363
2705
|
|
2364
|
-
message StopRequest{
|
2365
|
-
|
2706
|
+
message StopRequest {
|
2707
|
+
}
|
2708
|
+
message StopResponse {
|
2709
|
+
}
|
2366
2710
|
|
2367
|
-
message GraphTopologySubscription {
|
2711
|
+
message GraphTopologySubscription {
|
2712
|
+
}
|
2368
2713
|
message GraphTopologyUpdate {
|
2369
2714
|
repeated NodeUpdate node_updates = 1;
|
2370
2715
|
repeated ChannelEdgeUpdate channel_updates = 2;
|
@@ -2389,9 +2734,9 @@ message ChannelEdgeUpdate {
|
|
2389
2734
|
|
2390
2735
|
int64 capacity = 3;
|
2391
2736
|
|
2392
|
-
RoutingPolicy routing_policy
|
2737
|
+
RoutingPolicy routing_policy = 4;
|
2393
2738
|
|
2394
|
-
string advertising_node
|
2739
|
+
string advertising_node = 5;
|
2395
2740
|
string connecting_node = 6;
|
2396
2741
|
}
|
2397
2742
|
message ClosedChannelUpdate {
|
@@ -2408,22 +2753,22 @@ message ClosedChannelUpdate {
|
|
2408
2753
|
|
2409
2754
|
message HopHint {
|
2410
2755
|
/// The public key of the node at the start of the channel.
|
2411
|
-
string node_id = 1
|
2756
|
+
string node_id = 1;
|
2412
2757
|
|
2413
2758
|
/// The unique identifier of the channel.
|
2414
|
-
uint64 chan_id = 2 [
|
2759
|
+
uint64 chan_id = 2 [jstype = JS_STRING];
|
2415
2760
|
|
2416
2761
|
/// The base fee of the channel denominated in millisatoshis.
|
2417
|
-
uint32 fee_base_msat = 3
|
2762
|
+
uint32 fee_base_msat = 3;
|
2418
2763
|
|
2419
2764
|
/**
|
2420
2765
|
The fee rate of the channel for sending one satoshi across it denominated in
|
2421
2766
|
millionths of a satoshi.
|
2422
2767
|
*/
|
2423
|
-
uint32 fee_proportional_millionths = 4
|
2768
|
+
uint32 fee_proportional_millionths = 4;
|
2424
2769
|
|
2425
2770
|
/// The time-lock delta of the channel.
|
2426
|
-
uint32 cltv_expiry_delta = 5
|
2771
|
+
uint32 cltv_expiry_delta = 5;
|
2427
2772
|
}
|
2428
2773
|
|
2429
2774
|
message RouteHint {
|
@@ -2431,7 +2776,7 @@ message RouteHint {
|
|
2431
2776
|
A list of hop hints that when chained together can assist in reaching a
|
2432
2777
|
specific destination.
|
2433
2778
|
*/
|
2434
|
-
repeated HopHint hop_hints = 1
|
2779
|
+
repeated HopHint hop_hints = 1;
|
2435
2780
|
}
|
2436
2781
|
|
2437
2782
|
message Invoice {
|
@@ -2441,7 +2786,7 @@ message Invoice {
|
|
2441
2786
|
field of the encoded payment request if the description_hash field is not
|
2442
2787
|
being used.
|
2443
2788
|
*/
|
2444
|
-
string memo = 1
|
2789
|
+
string memo = 1;
|
2445
2790
|
|
2446
2791
|
reserved 2;
|
2447
2792
|
|
@@ -2450,43 +2795,43 @@ message Invoice {
|
|
2450
2795
|
HTLC payable to this preimage. When using REST, this field must be encoded
|
2451
2796
|
as base64.
|
2452
2797
|
*/
|
2453
|
-
bytes r_preimage = 3
|
2798
|
+
bytes r_preimage = 3;
|
2454
2799
|
|
2455
2800
|
/**
|
2456
2801
|
The hash of the preimage. When using REST, this field must be encoded as
|
2457
2802
|
base64.
|
2458
2803
|
*/
|
2459
|
-
bytes r_hash = 4
|
2804
|
+
bytes r_hash = 4;
|
2460
2805
|
|
2461
2806
|
/**
|
2462
2807
|
The value of this invoice in satoshis
|
2463
2808
|
|
2464
2809
|
The fields value and value_msat are mutually exclusive.
|
2465
2810
|
*/
|
2466
|
-
int64 value = 5
|
2811
|
+
int64 value = 5;
|
2467
2812
|
|
2468
2813
|
/**
|
2469
2814
|
The value of this invoice in millisatoshis
|
2470
2815
|
|
2471
2816
|
The fields value and value_msat are mutually exclusive.
|
2472
2817
|
*/
|
2473
|
-
int64 value_msat = 23
|
2818
|
+
int64 value_msat = 23;
|
2474
2819
|
|
2475
2820
|
/// Whether this invoice has been fulfilled
|
2476
|
-
bool settled = 6 [
|
2821
|
+
bool settled = 6 [deprecated = true];
|
2477
2822
|
|
2478
2823
|
/// When this invoice was created
|
2479
|
-
int64 creation_date = 7
|
2824
|
+
int64 creation_date = 7;
|
2480
2825
|
|
2481
2826
|
/// When this invoice was settled
|
2482
|
-
int64 settle_date = 8
|
2827
|
+
int64 settle_date = 8;
|
2483
2828
|
|
2484
2829
|
/**
|
2485
2830
|
A bare-bones invoice for a payment within the Lightning Network. With the
|
2486
2831
|
details of the invoice, the sender has all the data necessary to send a
|
2487
2832
|
payment to the recipient.
|
2488
2833
|
*/
|
2489
|
-
string payment_request = 9
|
2834
|
+
string payment_request = 9;
|
2490
2835
|
|
2491
2836
|
/**
|
2492
2837
|
Hash (SHA-256) of a description of the payment. Used if the description of
|
@@ -2494,25 +2839,25 @@ message Invoice {
|
|
2494
2839
|
of an encoded payment request. When using REST, this field must be encoded
|
2495
2840
|
as base64.
|
2496
2841
|
*/
|
2497
|
-
bytes description_hash = 10
|
2842
|
+
bytes description_hash = 10;
|
2498
2843
|
|
2499
2844
|
/// Payment request expiry time in seconds. Default is 3600 (1 hour).
|
2500
|
-
int64 expiry = 11
|
2845
|
+
int64 expiry = 11;
|
2501
2846
|
|
2502
2847
|
/// Fallback on-chain address.
|
2503
|
-
string fallback_addr = 12
|
2848
|
+
string fallback_addr = 12;
|
2504
2849
|
|
2505
2850
|
/// Delta to use for the time-lock of the CLTV extended to the final hop.
|
2506
|
-
uint64 cltv_expiry = 13
|
2851
|
+
uint64 cltv_expiry = 13;
|
2507
2852
|
|
2508
2853
|
/**
|
2509
2854
|
Route hints that can each be individually used to assist in reaching the
|
2510
2855
|
invoice's destination.
|
2511
2856
|
*/
|
2512
|
-
repeated RouteHint route_hints = 14
|
2857
|
+
repeated RouteHint route_hints = 14;
|
2513
2858
|
|
2514
2859
|
/// Whether this invoice should include routing hints for private channels.
|
2515
|
-
bool private = 15
|
2860
|
+
bool private = 15;
|
2516
2861
|
|
2517
2862
|
/**
|
2518
2863
|
The "add" index of this invoice. Each newly created invoice will increment
|
@@ -2520,7 +2865,7 @@ message Invoice {
|
|
2520
2865
|
SubscribeInvoices call can use this to instantly get notified of all added
|
2521
2866
|
invoices with an add_index greater than this one.
|
2522
2867
|
*/
|
2523
|
-
uint64 add_index = 16
|
2868
|
+
uint64 add_index = 16;
|
2524
2869
|
|
2525
2870
|
/**
|
2526
2871
|
The "settle" index of this invoice. Each newly settled invoice will
|
@@ -2528,10 +2873,10 @@ message Invoice {
|
|
2528
2873
|
SubscribeInvoices call can use this to instantly get notified of all
|
2529
2874
|
settled invoices with an settle_index greater than this one.
|
2530
2875
|
*/
|
2531
|
-
uint64 settle_index = 17
|
2876
|
+
uint64 settle_index = 17;
|
2532
2877
|
|
2533
2878
|
/// Deprecated, use amt_paid_sat or amt_paid_msat.
|
2534
|
-
int64 amt_paid = 18 [
|
2879
|
+
int64 amt_paid = 18 [deprecated = true];
|
2535
2880
|
|
2536
2881
|
/**
|
2537
2882
|
The amount that was accepted for this invoice, in satoshis. This will ONLY
|
@@ -2541,7 +2886,7 @@ message Invoice {
|
|
2541
2886
|
MORE that was specified in the original invoice. So we'll record that here
|
2542
2887
|
as well.
|
2543
2888
|
*/
|
2544
|
-
int64 amt_paid_sat = 19
|
2889
|
+
int64 amt_paid_sat = 19;
|
2545
2890
|
|
2546
2891
|
/**
|
2547
2892
|
The amount that was accepted for this invoice, in millisatoshis. This will
|
@@ -2551,7 +2896,7 @@ message Invoice {
|
|
2551
2896
|
paid MORE that was specified in the original invoice. So we'll record that
|
2552
2897
|
here as well.
|
2553
2898
|
*/
|
2554
|
-
int64 amt_paid_msat = 20
|
2899
|
+
int64 amt_paid_msat = 20;
|
2555
2900
|
|
2556
2901
|
enum InvoiceState {
|
2557
2902
|
OPEN = 0;
|
@@ -2563,19 +2908,19 @@ message Invoice {
|
|
2563
2908
|
/**
|
2564
2909
|
The state the invoice is in.
|
2565
2910
|
*/
|
2566
|
-
InvoiceState state = 21
|
2911
|
+
InvoiceState state = 21;
|
2567
2912
|
|
2568
2913
|
/// List of HTLCs paying to this invoice [EXPERIMENTAL].
|
2569
|
-
repeated InvoiceHTLC htlcs = 22
|
2914
|
+
repeated InvoiceHTLC htlcs = 22;
|
2570
2915
|
|
2571
2916
|
/// List of features advertised on the invoice.
|
2572
|
-
map<uint32, Feature> features = 24
|
2573
|
-
|
2917
|
+
map<uint32, Feature> features = 24;
|
2918
|
+
|
2574
2919
|
/**
|
2575
2920
|
Indicates if this invoice was a spontaneous payment that arrived via keysend
|
2576
2921
|
[EXPERIMENTAL].
|
2577
2922
|
*/
|
2578
|
-
bool is_keysend = 25
|
2923
|
+
bool is_keysend = 25;
|
2579
2924
|
}
|
2580
2925
|
|
2581
2926
|
enum InvoiceHTLCState {
|
@@ -2587,45 +2932,45 @@ enum InvoiceHTLCState {
|
|
2587
2932
|
/// Details of an HTLC that paid to an invoice
|
2588
2933
|
message InvoiceHTLC {
|
2589
2934
|
/// Short channel id over which the htlc was received.
|
2590
|
-
uint64 chan_id = 1 [
|
2935
|
+
uint64 chan_id = 1 [jstype = JS_STRING];
|
2591
2936
|
|
2592
2937
|
/// Index identifying the htlc on the channel.
|
2593
|
-
uint64 htlc_index = 2
|
2938
|
+
uint64 htlc_index = 2;
|
2594
2939
|
|
2595
2940
|
/// The amount of the htlc in msat.
|
2596
|
-
uint64 amt_msat = 3
|
2941
|
+
uint64 amt_msat = 3;
|
2597
2942
|
|
2598
2943
|
/// Block height at which this htlc was accepted.
|
2599
|
-
int32 accept_height = 4
|
2944
|
+
int32 accept_height = 4;
|
2600
2945
|
|
2601
2946
|
/// Time at which this htlc was accepted.
|
2602
|
-
int64 accept_time = 5
|
2947
|
+
int64 accept_time = 5;
|
2603
2948
|
|
2604
2949
|
/// Time at which this htlc was settled or canceled.
|
2605
|
-
int64 resolve_time = 6
|
2606
|
-
|
2950
|
+
int64 resolve_time = 6;
|
2951
|
+
|
2607
2952
|
/// Block height at which this htlc expires.
|
2608
|
-
int32 expiry_height = 7
|
2953
|
+
int32 expiry_height = 7;
|
2609
2954
|
|
2610
2955
|
/// Current state the htlc is in.
|
2611
|
-
InvoiceHTLCState state = 8
|
2956
|
+
InvoiceHTLCState state = 8;
|
2612
2957
|
|
2613
2958
|
/// Custom tlv records.
|
2614
|
-
map<uint64, bytes> custom_records = 9
|
2959
|
+
map<uint64, bytes> custom_records = 9;
|
2615
2960
|
|
2616
2961
|
/// The total amount of the mpp payment in msat.
|
2617
|
-
uint64 mpp_total_amt_msat = 10
|
2962
|
+
uint64 mpp_total_amt_msat = 10;
|
2618
2963
|
}
|
2619
2964
|
|
2620
2965
|
message AddInvoiceResponse {
|
2621
|
-
bytes r_hash = 1
|
2966
|
+
bytes r_hash = 1;
|
2622
2967
|
|
2623
2968
|
/**
|
2624
2969
|
A bare-bones invoice for a payment within the Lightning Network. With the
|
2625
2970
|
details of the invoice, the sender has all the data necessary to send a
|
2626
2971
|
payment to the recipient.
|
2627
2972
|
*/
|
2628
|
-
string payment_request = 2
|
2973
|
+
string payment_request = 2;
|
2629
2974
|
|
2630
2975
|
/**
|
2631
2976
|
The "add" index of this invoice. Each newly created invoice will increment
|
@@ -2633,7 +2978,7 @@ message AddInvoiceResponse {
|
|
2633
2978
|
SubscribeInvoices call can use this to instantly get notified of all added
|
2634
2979
|
invoices with an add_index greater than this one.
|
2635
2980
|
*/
|
2636
|
-
uint64 add_index = 16
|
2981
|
+
uint64 add_index = 16;
|
2637
2982
|
}
|
2638
2983
|
message PaymentHash {
|
2639
2984
|
/**
|
@@ -2642,13 +2987,13 @@ message PaymentHash {
|
|
2642
2987
|
Deprecated now that the REST gateway supports base64 encoding of bytes
|
2643
2988
|
fields.
|
2644
2989
|
*/
|
2645
|
-
string r_hash_str = 1 [
|
2990
|
+
string r_hash_str = 1 [deprecated = true];
|
2646
2991
|
|
2647
2992
|
/**
|
2648
2993
|
The payment hash of the invoice to be looked up. When using REST, this field
|
2649
2994
|
must be encoded as base64.
|
2650
2995
|
*/
|
2651
|
-
bytes r_hash = 2
|
2996
|
+
bytes r_hash = 2;
|
2652
2997
|
}
|
2653
2998
|
|
2654
2999
|
message ListInvoiceRequest {
|
@@ -2656,41 +3001,41 @@ message ListInvoiceRequest {
|
|
2656
3001
|
If set, only invoices that are not settled and not canceled will be returned
|
2657
3002
|
in the response.
|
2658
3003
|
*/
|
2659
|
-
bool pending_only = 1
|
3004
|
+
bool pending_only = 1;
|
2660
3005
|
|
2661
3006
|
/**
|
2662
3007
|
The index of an invoice that will be used as either the start or end of a
|
2663
3008
|
query to determine which invoices should be returned in the response.
|
2664
3009
|
*/
|
2665
|
-
uint64 index_offset = 4
|
3010
|
+
uint64 index_offset = 4;
|
2666
3011
|
|
2667
3012
|
/// The max number of invoices to return in the response to this query.
|
2668
|
-
uint64 num_max_invoices = 5
|
3013
|
+
uint64 num_max_invoices = 5;
|
2669
3014
|
|
2670
3015
|
/**
|
2671
3016
|
If set, the invoices returned will result from seeking backwards from the
|
2672
3017
|
specified index offset. This can be used to paginate backwards.
|
2673
3018
|
*/
|
2674
|
-
bool reversed = 6
|
3019
|
+
bool reversed = 6;
|
2675
3020
|
}
|
2676
3021
|
message ListInvoiceResponse {
|
2677
3022
|
/**
|
2678
3023
|
A list of invoices from the time slice of the time series specified in the
|
2679
3024
|
request.
|
2680
3025
|
*/
|
2681
|
-
repeated Invoice invoices = 1
|
3026
|
+
repeated Invoice invoices = 1;
|
2682
3027
|
|
2683
3028
|
/**
|
2684
3029
|
The index of the last item in the set of returned invoices. This can be used
|
2685
3030
|
to seek further, pagination style.
|
2686
3031
|
*/
|
2687
|
-
uint64 last_index_offset = 2
|
3032
|
+
uint64 last_index_offset = 2;
|
2688
3033
|
|
2689
3034
|
/**
|
2690
3035
|
The index of the last item in the set of returned invoices. This can be used
|
2691
3036
|
to seek backwards, pagination style.
|
2692
3037
|
*/
|
2693
|
-
uint64 first_index_offset = 3
|
3038
|
+
uint64 first_index_offset = 3;
|
2694
3039
|
}
|
2695
3040
|
|
2696
3041
|
message InvoiceSubscription {
|
@@ -2700,7 +3045,7 @@ message InvoiceSubscription {
|
|
2700
3045
|
value. This allows callers to catch up on any events they missed while they
|
2701
3046
|
weren't connected to the streaming RPC.
|
2702
3047
|
*/
|
2703
|
-
uint64 add_index = 1
|
3048
|
+
uint64 add_index = 1;
|
2704
3049
|
|
2705
3050
|
/**
|
2706
3051
|
If specified (non-zero), then we'll first start by sending out
|
@@ -2708,37 +3053,69 @@ message InvoiceSubscription {
|
|
2708
3053
|
this value. This allows callers to catch up on any events they missed while
|
2709
3054
|
they weren't connected to the streaming RPC.
|
2710
3055
|
*/
|
2711
|
-
uint64 settle_index = 2
|
3056
|
+
uint64 settle_index = 2;
|
2712
3057
|
}
|
2713
3058
|
|
3059
|
+
enum PaymentFailureReason {
|
3060
|
+
/**
|
3061
|
+
Payment isn't failed (yet).
|
3062
|
+
*/
|
3063
|
+
FAILURE_REASON_NONE = 0;
|
3064
|
+
|
3065
|
+
/**
|
3066
|
+
There are more routes to try, but the payment timeout was exceeded.
|
3067
|
+
*/
|
3068
|
+
FAILURE_REASON_TIMEOUT = 1;
|
3069
|
+
|
3070
|
+
/**
|
3071
|
+
All possible routes were tried and failed permanently. Or were no
|
3072
|
+
routes to the destination at all.
|
3073
|
+
*/
|
3074
|
+
FAILURE_REASON_NO_ROUTE = 2;
|
3075
|
+
|
3076
|
+
/**
|
3077
|
+
A non-recoverable error has occured.
|
3078
|
+
*/
|
3079
|
+
FAILURE_REASON_ERROR = 3;
|
3080
|
+
|
3081
|
+
/**
|
3082
|
+
Payment details incorrect (unknown hash, invalid amt or
|
3083
|
+
invalid final cltv delta)
|
3084
|
+
*/
|
3085
|
+
FAILURE_REASON_INCORRECT_PAYMENT_DETAILS = 4;
|
3086
|
+
|
3087
|
+
/**
|
3088
|
+
Insufficient local balance.
|
3089
|
+
*/
|
3090
|
+
FAILURE_REASON_INSUFFICIENT_BALANCE = 5;
|
3091
|
+
}
|
2714
3092
|
|
2715
3093
|
message Payment {
|
2716
3094
|
/// The payment hash
|
2717
|
-
string payment_hash = 1
|
3095
|
+
string payment_hash = 1;
|
2718
3096
|
|
2719
3097
|
/// Deprecated, use value_sat or value_msat.
|
2720
|
-
int64 value = 2 [
|
3098
|
+
int64 value = 2 [deprecated = true];
|
2721
3099
|
|
2722
3100
|
/// Deprecated, use creation_time_ns
|
2723
|
-
int64 creation_date = 3 [
|
3101
|
+
int64 creation_date = 3 [deprecated = true];
|
2724
3102
|
|
2725
|
-
|
2726
|
-
repeated string path = 4 [json_name = "path", deprecated = true];
|
3103
|
+
reserved 4;
|
2727
3104
|
|
2728
3105
|
/// Deprecated, use fee_sat or fee_msat.
|
2729
|
-
int64 fee = 5 [
|
3106
|
+
int64 fee = 5 [deprecated = true];
|
2730
3107
|
|
2731
3108
|
/// The payment preimage
|
2732
|
-
string payment_preimage = 6
|
3109
|
+
string payment_preimage = 6;
|
2733
3110
|
|
2734
3111
|
/// The value of the payment in satoshis
|
2735
|
-
int64 value_sat = 7
|
3112
|
+
int64 value_sat = 7;
|
2736
3113
|
|
2737
3114
|
/// The value of the payment in milli-satoshis
|
2738
|
-
int64 value_msat = 8
|
3115
|
+
int64 value_msat = 8;
|
2739
3116
|
|
2740
3117
|
/// The optional payment request being fulfilled.
|
2741
|
-
string payment_request = 9
|
3118
|
+
string payment_request = 9;
|
2742
3119
|
|
2743
3120
|
enum PaymentStatus {
|
2744
3121
|
UNKNOWN = 0;
|
@@ -2748,56 +3125,100 @@ message Payment {
|
|
2748
3125
|
}
|
2749
3126
|
|
2750
3127
|
// The status of the payment.
|
2751
|
-
PaymentStatus status = 10
|
3128
|
+
PaymentStatus status = 10;
|
2752
3129
|
|
2753
3130
|
/// The fee paid for this payment in satoshis
|
2754
|
-
int64 fee_sat = 11
|
3131
|
+
int64 fee_sat = 11;
|
2755
3132
|
|
2756
3133
|
/// The fee paid for this payment in milli-satoshis
|
2757
|
-
int64 fee_msat = 12
|
3134
|
+
int64 fee_msat = 12;
|
2758
3135
|
|
2759
3136
|
/// The time in UNIX nanoseconds at which the payment was created.
|
2760
|
-
int64 creation_time_ns = 13
|
3137
|
+
int64 creation_time_ns = 13;
|
3138
|
+
|
3139
|
+
/// The HTLCs made in attempt to settle the payment.
|
3140
|
+
repeated HTLCAttempt htlcs = 14;
|
3141
|
+
|
3142
|
+
/**
|
3143
|
+
The creation index of this payment. Each payment can be uniquely identified
|
3144
|
+
by this index, which may not strictly increment by 1 for payments made in
|
3145
|
+
older versions of lnd.
|
3146
|
+
*/
|
3147
|
+
uint64 payment_index = 15;
|
2761
3148
|
|
2762
|
-
|
2763
|
-
repeated HTLCAttempt htlcs = 14 [json_name = "htlcs"];
|
3149
|
+
PaymentFailureReason failure_reason = 16;
|
2764
3150
|
}
|
2765
3151
|
|
2766
3152
|
message HTLCAttempt {
|
2767
|
-
|
2768
|
-
|
2769
|
-
|
2770
|
-
|
2771
|
-
|
3153
|
+
enum HTLCStatus {
|
3154
|
+
IN_FLIGHT = 0;
|
3155
|
+
SUCCEEDED = 1;
|
3156
|
+
FAILED = 2;
|
3157
|
+
}
|
2772
3158
|
|
2773
|
-
|
2774
|
-
|
3159
|
+
/// The status of the HTLC.
|
3160
|
+
HTLCStatus status = 1;
|
2775
3161
|
|
2776
|
-
|
2777
|
-
|
3162
|
+
/// The route taken by this HTLC.
|
3163
|
+
Route route = 2;
|
2778
3164
|
|
2779
|
-
|
2780
|
-
|
3165
|
+
/// The time in UNIX nanoseconds at which this HTLC was sent.
|
3166
|
+
int64 attempt_time_ns = 3;
|
2781
3167
|
|
2782
|
-
|
2783
|
-
|
2784
|
-
|
2785
|
-
|
2786
|
-
|
3168
|
+
/**
|
3169
|
+
The time in UNIX nanoseconds at which this HTLC was settled or failed.
|
3170
|
+
This value will not be set if the HTLC is still IN_FLIGHT.
|
3171
|
+
*/
|
3172
|
+
int64 resolve_time_ns = 4;
|
3173
|
+
|
3174
|
+
// Detailed htlc failure info.
|
3175
|
+
Failure failure = 5;
|
2787
3176
|
}
|
2788
3177
|
|
2789
3178
|
message ListPaymentsRequest {
|
2790
3179
|
/**
|
2791
3180
|
If true, then return payments that have not yet fully completed. This means
|
2792
3181
|
that pending payments, as well as failed payments will show up if this
|
2793
|
-
field is set to
|
3182
|
+
field is set to true. This flag doesn't change the meaning of the indices,
|
3183
|
+
which are tied to individual payments.
|
2794
3184
|
*/
|
2795
3185
|
bool include_incomplete = 1;
|
3186
|
+
|
3187
|
+
/**
|
3188
|
+
The index of a payment that will be used as either the start or end of a
|
3189
|
+
query to determine which payments should be returned in the response. The
|
3190
|
+
index_offset is exclusive. In the case of a zero index_offset, the query
|
3191
|
+
will start with the oldest payment when paginating forwards, or will end
|
3192
|
+
with the most recent payment when paginating backwards.
|
3193
|
+
*/
|
3194
|
+
uint64 index_offset = 2;
|
3195
|
+
|
3196
|
+
/// The maximal number of payments returned in the response to this query.
|
3197
|
+
uint64 max_payments = 3;
|
3198
|
+
|
3199
|
+
/**
|
3200
|
+
If set, the payments returned will result from seeking backwards from the
|
3201
|
+
specified index offset. This can be used to paginate backwards. The order
|
3202
|
+
of the returned payments is always oldest first (ascending index order).
|
3203
|
+
*/
|
3204
|
+
bool reversed = 4;
|
2796
3205
|
}
|
2797
3206
|
|
2798
3207
|
message ListPaymentsResponse {
|
2799
3208
|
/// The list of payments
|
2800
|
-
repeated Payment payments = 1
|
3209
|
+
repeated Payment payments = 1;
|
3210
|
+
|
3211
|
+
/**
|
3212
|
+
The index of the first item in the set of returned payments. This can be
|
3213
|
+
used as the index_offset to continue seeking backwards in the next request.
|
3214
|
+
*/
|
3215
|
+
uint64 first_index_offset = 2;
|
3216
|
+
|
3217
|
+
/**
|
3218
|
+
The index of the last item in the set of returned payments. This can be used
|
3219
|
+
as the index_offset to continue seeking forwards in the next request.
|
3220
|
+
*/
|
3221
|
+
uint64 last_index_offset = 3;
|
2801
3222
|
}
|
2802
3223
|
|
2803
3224
|
message DeleteAllPaymentsRequest {
|
@@ -2813,13 +3234,12 @@ message AbandonChannelRequest {
|
|
2813
3234
|
message AbandonChannelResponse {
|
2814
3235
|
}
|
2815
3236
|
|
2816
|
-
|
2817
3237
|
message DebugLevelRequest {
|
2818
3238
|
bool show = 1;
|
2819
3239
|
string level_spec = 2;
|
2820
3240
|
}
|
2821
3241
|
message DebugLevelResponse {
|
2822
|
-
string sub_systems = 1
|
3242
|
+
string sub_systems = 1;
|
2823
3243
|
}
|
2824
3244
|
|
2825
3245
|
message PayReqString {
|
@@ -2827,157 +3247,183 @@ message PayReqString {
|
|
2827
3247
|
string pay_req = 1;
|
2828
3248
|
}
|
2829
3249
|
message PayReq {
|
2830
|
-
string destination = 1
|
2831
|
-
string payment_hash = 2
|
2832
|
-
int64 num_satoshis = 3
|
2833
|
-
int64 timestamp = 4
|
2834
|
-
int64 expiry = 5
|
2835
|
-
string description = 6
|
2836
|
-
string description_hash = 7
|
2837
|
-
string fallback_addr = 8
|
2838
|
-
int64 cltv_expiry = 9
|
2839
|
-
repeated RouteHint route_hints = 10
|
2840
|
-
bytes payment_addr = 11
|
2841
|
-
int64 num_msat = 12
|
2842
|
-
map<uint32, Feature> features = 13
|
3250
|
+
string destination = 1;
|
3251
|
+
string payment_hash = 2;
|
3252
|
+
int64 num_satoshis = 3;
|
3253
|
+
int64 timestamp = 4;
|
3254
|
+
int64 expiry = 5;
|
3255
|
+
string description = 6;
|
3256
|
+
string description_hash = 7;
|
3257
|
+
string fallback_addr = 8;
|
3258
|
+
int64 cltv_expiry = 9;
|
3259
|
+
repeated RouteHint route_hints = 10;
|
3260
|
+
bytes payment_addr = 11;
|
3261
|
+
int64 num_msat = 12;
|
3262
|
+
map<uint32, Feature> features = 13;
|
2843
3263
|
}
|
2844
3264
|
|
2845
3265
|
enum FeatureBit {
|
2846
|
-
|
2847
|
-
|
2848
|
-
|
2849
|
-
|
2850
|
-
|
2851
|
-
|
2852
|
-
|
2853
|
-
|
2854
|
-
|
2855
|
-
|
2856
|
-
|
2857
|
-
|
2858
|
-
|
2859
|
-
|
2860
|
-
|
2861
|
-
|
2862
|
-
|
3266
|
+
DATALOSS_PROTECT_REQ = 0;
|
3267
|
+
DATALOSS_PROTECT_OPT = 1;
|
3268
|
+
INITIAL_ROUING_SYNC = 3;
|
3269
|
+
UPFRONT_SHUTDOWN_SCRIPT_REQ = 4;
|
3270
|
+
UPFRONT_SHUTDOWN_SCRIPT_OPT = 5;
|
3271
|
+
GOSSIP_QUERIES_REQ = 6;
|
3272
|
+
GOSSIP_QUERIES_OPT = 7;
|
3273
|
+
TLV_ONION_REQ = 8;
|
3274
|
+
TLV_ONION_OPT = 9;
|
3275
|
+
EXT_GOSSIP_QUERIES_REQ = 10;
|
3276
|
+
EXT_GOSSIP_QUERIES_OPT = 11;
|
3277
|
+
STATIC_REMOTE_KEY_REQ = 12;
|
3278
|
+
STATIC_REMOTE_KEY_OPT = 13;
|
3279
|
+
PAYMENT_ADDR_REQ = 14;
|
3280
|
+
PAYMENT_ADDR_OPT = 15;
|
3281
|
+
MPP_REQ = 16;
|
3282
|
+
MPP_OPT = 17;
|
2863
3283
|
}
|
2864
3284
|
|
2865
3285
|
message Feature {
|
2866
|
-
|
2867
|
-
|
2868
|
-
|
3286
|
+
string name = 2;
|
3287
|
+
bool is_required = 3;
|
3288
|
+
bool is_known = 4;
|
2869
3289
|
}
|
2870
3290
|
|
2871
|
-
message FeeReportRequest {
|
3291
|
+
message FeeReportRequest {
|
3292
|
+
}
|
2872
3293
|
message ChannelFeeReport {
|
3294
|
+
/// The short channel id that this fee report belongs to.
|
3295
|
+
uint64 chan_id = 5 [jstype = JS_STRING];
|
3296
|
+
|
2873
3297
|
/// The channel that this fee report belongs to.
|
2874
|
-
string
|
3298
|
+
string channel_point = 1;
|
2875
3299
|
|
2876
3300
|
/// The base fee charged regardless of the number of milli-satoshis sent.
|
2877
|
-
int64 base_fee_msat = 2
|
3301
|
+
int64 base_fee_msat = 2;
|
2878
3302
|
|
2879
|
-
/// The amount charged per milli-satoshis transferred expressed in
|
2880
|
-
|
3303
|
+
/// The amount charged per milli-satoshis transferred expressed in
|
3304
|
+
/// millionths of a satoshi.
|
3305
|
+
int64 fee_per_mil = 3;
|
2881
3306
|
|
2882
|
-
/// The effective fee rate in milli-satoshis. Computed by dividing the
|
2883
|
-
|
3307
|
+
/// The effective fee rate in milli-satoshis. Computed by dividing the
|
3308
|
+
/// fee_per_mil value by 1 million.
|
3309
|
+
double fee_rate = 4;
|
2884
3310
|
}
|
2885
3311
|
message FeeReportResponse {
|
2886
|
-
/// An array of channel fee reports which describes the current fee schedule
|
2887
|
-
|
3312
|
+
/// An array of channel fee reports which describes the current fee schedule
|
3313
|
+
/// for each channel.
|
3314
|
+
repeated ChannelFeeReport channel_fees = 1;
|
2888
3315
|
|
2889
|
-
/// The total amount of fee revenue (in satoshis) the switch has collected
|
2890
|
-
|
3316
|
+
/// The total amount of fee revenue (in satoshis) the switch has collected
|
3317
|
+
/// over the past 24 hrs.
|
3318
|
+
uint64 day_fee_sum = 2;
|
2891
3319
|
|
2892
|
-
/// The total amount of fee revenue (in satoshis) the switch has collected
|
2893
|
-
|
3320
|
+
/// The total amount of fee revenue (in satoshis) the switch has collected
|
3321
|
+
/// over the past 1 week.
|
3322
|
+
uint64 week_fee_sum = 3;
|
2894
3323
|
|
2895
|
-
/// The total amount of fee revenue (in satoshis) the switch has collected
|
2896
|
-
|
3324
|
+
/// The total amount of fee revenue (in satoshis) the switch has collected
|
3325
|
+
/// over the past 1 month.
|
3326
|
+
uint64 month_fee_sum = 4;
|
2897
3327
|
}
|
2898
3328
|
|
2899
3329
|
message PolicyUpdateRequest {
|
2900
3330
|
oneof scope {
|
2901
3331
|
/// If set, then this update applies to all currently active channels.
|
2902
|
-
bool global = 1
|
3332
|
+
bool global = 1;
|
2903
3333
|
|
2904
3334
|
/// If set, this update will target a specific channel.
|
2905
|
-
ChannelPoint chan_point = 2
|
3335
|
+
ChannelPoint chan_point = 2;
|
2906
3336
|
}
|
2907
3337
|
|
2908
3338
|
/// The base fee charged regardless of the number of milli-satoshis sent.
|
2909
|
-
int64 base_fee_msat = 3
|
3339
|
+
int64 base_fee_msat = 3;
|
2910
3340
|
|
2911
|
-
/// The effective fee rate in milli-satoshis. The precision of this value
|
2912
|
-
|
3341
|
+
/// The effective fee rate in milli-satoshis. The precision of this value
|
3342
|
+
/// goes up to 6 decimal places, so 1e-6.
|
3343
|
+
double fee_rate = 4;
|
2913
3344
|
|
2914
3345
|
/// The required timelock delta for HTLCs forwarded over the channel.
|
2915
|
-
uint32 time_lock_delta = 5
|
3346
|
+
uint32 time_lock_delta = 5;
|
2916
3347
|
|
2917
|
-
/// If set, the maximum HTLC size in milli-satoshis. If unset, the maximum
|
2918
|
-
|
3348
|
+
/// If set, the maximum HTLC size in milli-satoshis. If unset, the maximum
|
3349
|
+
/// HTLC will be unchanged.
|
3350
|
+
uint64 max_htlc_msat = 6;
|
2919
3351
|
|
2920
|
-
/// The minimum HTLC size in milli-satoshis. Only applied if
|
2921
|
-
|
3352
|
+
/// The minimum HTLC size in milli-satoshis. Only applied if
|
3353
|
+
/// min_htlc_msat_specified is true.
|
3354
|
+
uint64 min_htlc_msat = 7;
|
2922
3355
|
|
2923
3356
|
/// If true, min_htlc_msat is applied.
|
2924
|
-
bool min_htlc_msat_specified = 8
|
3357
|
+
bool min_htlc_msat_specified = 8;
|
2925
3358
|
}
|
2926
3359
|
message PolicyUpdateResponse {
|
2927
3360
|
}
|
2928
3361
|
|
2929
3362
|
message ForwardingHistoryRequest {
|
2930
|
-
/// Start time is the starting point of the forwarding history request. All
|
2931
|
-
|
3363
|
+
/// Start time is the starting point of the forwarding history request. All
|
3364
|
+
/// records beyond this point will be included, respecting the end time, and
|
3365
|
+
/// the index offset.
|
3366
|
+
uint64 start_time = 1;
|
2932
3367
|
|
2933
|
-
/// End time is the end point of the forwarding history request. The
|
2934
|
-
|
3368
|
+
/// End time is the end point of the forwarding history request. The
|
3369
|
+
/// response will carry at most 50k records between the start time and the
|
3370
|
+
/// end time. The index offset can be used to implement pagination.
|
3371
|
+
uint64 end_time = 2;
|
2935
3372
|
|
2936
|
-
/// Index offset is the offset in the time series to start at. As each
|
2937
|
-
|
3373
|
+
/// Index offset is the offset in the time series to start at. As each
|
3374
|
+
/// response can only contain 50k records, callers can use this to skip
|
3375
|
+
/// around within a packed time series.
|
3376
|
+
uint32 index_offset = 3;
|
2938
3377
|
|
2939
3378
|
/// The max number of events to return in the response to this query.
|
2940
|
-
uint32 num_max_events = 4
|
3379
|
+
uint32 num_max_events = 4;
|
2941
3380
|
}
|
2942
3381
|
message ForwardingEvent {
|
2943
|
-
/// Timestamp is the time (unix epoch offset) that this circuit was
|
2944
|
-
|
3382
|
+
/// Timestamp is the time (unix epoch offset) that this circuit was
|
3383
|
+
/// completed.
|
3384
|
+
uint64 timestamp = 1;
|
2945
3385
|
|
2946
3386
|
/// The incoming channel ID that carried the HTLC that created the circuit.
|
2947
|
-
uint64 chan_id_in = 2 [
|
3387
|
+
uint64 chan_id_in = 2 [jstype = JS_STRING];
|
2948
3388
|
|
2949
|
-
/// The outgoing channel ID that carried the preimage that completed the
|
2950
|
-
|
3389
|
+
/// The outgoing channel ID that carried the preimage that completed the
|
3390
|
+
/// circuit.
|
3391
|
+
uint64 chan_id_out = 4 [jstype = JS_STRING];
|
2951
3392
|
|
2952
|
-
/// The total amount (in satoshis) of the incoming HTLC that created half
|
2953
|
-
|
3393
|
+
/// The total amount (in satoshis) of the incoming HTLC that created half
|
3394
|
+
/// the circuit.
|
3395
|
+
uint64 amt_in = 5;
|
2954
3396
|
|
2955
|
-
/// The total amount (in satoshis) of the outgoing HTLC that created the
|
2956
|
-
|
3397
|
+
/// The total amount (in satoshis) of the outgoing HTLC that created the
|
3398
|
+
/// second half of the circuit.
|
3399
|
+
uint64 amt_out = 6;
|
2957
3400
|
|
2958
3401
|
/// The total fee (in satoshis) that this payment circuit carried.
|
2959
|
-
uint64 fee = 7
|
3402
|
+
uint64 fee = 7;
|
2960
3403
|
|
2961
3404
|
/// The total fee (in milli-satoshis) that this payment circuit carried.
|
2962
|
-
uint64 fee_msat = 8
|
3405
|
+
uint64 fee_msat = 8;
|
2963
3406
|
|
2964
|
-
/// The total amount (in milli-satoshis) of the incoming HTLC that created
|
2965
|
-
|
2966
|
-
|
2967
|
-
/// The total amount (in milli-satoshis) of the outgoing HTLC that created the second half of the circuit.
|
2968
|
-
uint64 amt_out_msat = 10 [json_name = "amt_out_msat"];
|
3407
|
+
/// The total amount (in milli-satoshis) of the incoming HTLC that created
|
3408
|
+
/// half the circuit.
|
3409
|
+
uint64 amt_in_msat = 9;
|
2969
3410
|
|
3411
|
+
/// The total amount (in milli-satoshis) of the outgoing HTLC that created
|
3412
|
+
/// the second half of the circuit.
|
3413
|
+
uint64 amt_out_msat = 10;
|
2970
3414
|
|
2971
3415
|
// TODO(roasbeef): add settlement latency?
|
2972
3416
|
// * use FPE on the chan id?
|
2973
3417
|
// * also list failures?
|
2974
3418
|
}
|
2975
3419
|
message ForwardingHistoryResponse {
|
2976
|
-
|
2977
|
-
|
3420
|
+
/// A list of forwarding events from the time slice of the time series
|
3421
|
+
/// specified in the request.
|
3422
|
+
repeated ForwardingEvent forwarding_events = 1;
|
2978
3423
|
|
2979
|
-
|
2980
|
-
|
3424
|
+
/// The index of the last time in the set of returned forwarding events. Can
|
3425
|
+
/// be used to seek further, pagination style.
|
3426
|
+
uint32 last_offset_index = 2;
|
2981
3427
|
}
|
2982
3428
|
|
2983
3429
|
message ExportChannelBackupRequest {
|
@@ -2989,7 +3435,7 @@ message ChannelBackup {
|
|
2989
3435
|
/**
|
2990
3436
|
Identifies the channel that this backup belongs to.
|
2991
3437
|
*/
|
2992
|
-
ChannelPoint chan_point = 1
|
3438
|
+
ChannelPoint chan_point = 1;
|
2993
3439
|
|
2994
3440
|
/**
|
2995
3441
|
Is an encrypted single-chan backup. this can be passed to
|
@@ -2997,14 +3443,14 @@ message ChannelBackup {
|
|
2997
3443
|
order to trigger the recovery protocol. When using REST, this field must be
|
2998
3444
|
encoded as base64.
|
2999
3445
|
*/
|
3000
|
-
bytes chan_backup = 2
|
3446
|
+
bytes chan_backup = 2;
|
3001
3447
|
}
|
3002
3448
|
|
3003
3449
|
message MultiChanBackup {
|
3004
3450
|
/**
|
3005
3451
|
Is the set of all channels that are included in this multi-channel backup.
|
3006
3452
|
*/
|
3007
|
-
repeated ChannelPoint chan_points = 1
|
3453
|
+
repeated ChannelPoint chan_points = 1;
|
3008
3454
|
|
3009
3455
|
/**
|
3010
3456
|
A single encrypted blob containing all the static channel backups of the
|
@@ -3012,29 +3458,30 @@ message MultiChanBackup {
|
|
3012
3458
|
safely be replaced with any prior/future versions. When using REST, this
|
3013
3459
|
field must be encoded as base64.
|
3014
3460
|
*/
|
3015
|
-
bytes multi_chan_backup = 2
|
3461
|
+
bytes multi_chan_backup = 2;
|
3016
3462
|
}
|
3017
3463
|
|
3018
|
-
message ChanBackupExportRequest {
|
3019
|
-
|
3464
|
+
message ChanBackupExportRequest {
|
3465
|
+
}
|
3466
|
+
message ChanBackupSnapshot {
|
3020
3467
|
/**
|
3021
3468
|
The set of new channels that have been added since the last channel backup
|
3022
3469
|
snapshot was requested.
|
3023
3470
|
*/
|
3024
|
-
ChannelBackups single_chan_backups = 1
|
3471
|
+
ChannelBackups single_chan_backups = 1;
|
3025
3472
|
|
3026
3473
|
/**
|
3027
3474
|
A multi-channel backup that covers all open channels currently known to
|
3028
3475
|
lnd.
|
3029
3476
|
*/
|
3030
|
-
MultiChanBackup multi_chan_backup
|
3477
|
+
MultiChanBackup multi_chan_backup = 2;
|
3031
3478
|
}
|
3032
3479
|
|
3033
3480
|
message ChannelBackups {
|
3034
3481
|
/**
|
3035
3482
|
A set of single-chan static channel backups.
|
3036
3483
|
*/
|
3037
|
-
repeated ChannelBackup chan_backups = 1
|
3484
|
+
repeated ChannelBackup chan_backups = 1;
|
3038
3485
|
}
|
3039
3486
|
|
3040
3487
|
message RestoreChanBackupRequest {
|
@@ -3042,34 +3489,199 @@ message RestoreChanBackupRequest {
|
|
3042
3489
|
/**
|
3043
3490
|
The channels to restore as a list of channel/backup pairs.
|
3044
3491
|
*/
|
3045
|
-
ChannelBackups chan_backups = 1
|
3492
|
+
ChannelBackups chan_backups = 1;
|
3046
3493
|
|
3047
3494
|
/**
|
3048
3495
|
The channels to restore in the packed multi backup format. When using
|
3049
3496
|
REST, this field must be encoded as base64.
|
3050
3497
|
*/
|
3051
|
-
bytes multi_chan_backup = 2
|
3498
|
+
bytes multi_chan_backup = 2;
|
3052
3499
|
}
|
3053
3500
|
}
|
3054
|
-
message RestoreBackupResponse {
|
3501
|
+
message RestoreBackupResponse {
|
3502
|
+
}
|
3055
3503
|
|
3056
|
-
message ChannelBackupSubscription {
|
3504
|
+
message ChannelBackupSubscription {
|
3505
|
+
}
|
3057
3506
|
|
3058
3507
|
message VerifyChanBackupResponse {
|
3059
3508
|
}
|
3060
3509
|
|
3061
3510
|
message MacaroonPermission {
|
3062
3511
|
/// The entity a permission grants access to.
|
3063
|
-
string entity = 1
|
3512
|
+
string entity = 1;
|
3064
3513
|
|
3065
3514
|
/// The action that is granted.
|
3066
|
-
string action = 2
|
3515
|
+
string action = 2;
|
3067
3516
|
}
|
3068
3517
|
message BakeMacaroonRequest {
|
3069
3518
|
/// The list of permissions the new macaroon should grant.
|
3070
|
-
repeated MacaroonPermission permissions = 1
|
3519
|
+
repeated MacaroonPermission permissions = 1;
|
3071
3520
|
}
|
3072
3521
|
message BakeMacaroonResponse {
|
3073
3522
|
/// The hex encoded macaroon, serialized in binary format.
|
3074
|
-
string macaroon = 1
|
3523
|
+
string macaroon = 1;
|
3524
|
+
}
|
3525
|
+
|
3526
|
+
message Failure {
|
3527
|
+
enum FailureCode {
|
3528
|
+
/**
|
3529
|
+
The numbers assigned in this enumeration match the failure codes as
|
3530
|
+
defined in BOLT #4. Because protobuf 3 requires enums to start with 0,
|
3531
|
+
a RESERVED value is added.
|
3532
|
+
*/
|
3533
|
+
RESERVED = 0;
|
3534
|
+
|
3535
|
+
INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS = 1;
|
3536
|
+
INCORRECT_PAYMENT_AMOUNT = 2;
|
3537
|
+
FINAL_INCORRECT_CLTV_EXPIRY = 3;
|
3538
|
+
FINAL_INCORRECT_HTLC_AMOUNT = 4;
|
3539
|
+
FINAL_EXPIRY_TOO_SOON = 5;
|
3540
|
+
INVALID_REALM = 6;
|
3541
|
+
EXPIRY_TOO_SOON = 7;
|
3542
|
+
INVALID_ONION_VERSION = 8;
|
3543
|
+
INVALID_ONION_HMAC = 9;
|
3544
|
+
INVALID_ONION_KEY = 10;
|
3545
|
+
AMOUNT_BELOW_MINIMUM = 11;
|
3546
|
+
FEE_INSUFFICIENT = 12;
|
3547
|
+
INCORRECT_CLTV_EXPIRY = 13;
|
3548
|
+
CHANNEL_DISABLED = 14;
|
3549
|
+
TEMPORARY_CHANNEL_FAILURE = 15;
|
3550
|
+
REQUIRED_NODE_FEATURE_MISSING = 16;
|
3551
|
+
REQUIRED_CHANNEL_FEATURE_MISSING = 17;
|
3552
|
+
UNKNOWN_NEXT_PEER = 18;
|
3553
|
+
TEMPORARY_NODE_FAILURE = 19;
|
3554
|
+
PERMANENT_NODE_FAILURE = 20;
|
3555
|
+
PERMANENT_CHANNEL_FAILURE = 21;
|
3556
|
+
EXPIRY_TOO_FAR = 22;
|
3557
|
+
MPP_TIMEOUT = 23;
|
3558
|
+
|
3559
|
+
/**
|
3560
|
+
An internal error occurred.
|
3561
|
+
*/
|
3562
|
+
INTERNAL_FAILURE = 997;
|
3563
|
+
|
3564
|
+
/**
|
3565
|
+
The error source is known, but the failure itself couldn't be decoded.
|
3566
|
+
*/
|
3567
|
+
UNKNOWN_FAILURE = 998;
|
3568
|
+
|
3569
|
+
/**
|
3570
|
+
An unreadable failure result is returned if the received failure message
|
3571
|
+
cannot be decrypted. In that case the error source is unknown.
|
3572
|
+
*/
|
3573
|
+
UNREADABLE_FAILURE = 999;
|
3574
|
+
}
|
3575
|
+
|
3576
|
+
/// Failure code as defined in the Lightning spec
|
3577
|
+
FailureCode code = 1;
|
3578
|
+
|
3579
|
+
reserved 2;
|
3580
|
+
|
3581
|
+
/// An optional channel update message.
|
3582
|
+
ChannelUpdate channel_update = 3;
|
3583
|
+
|
3584
|
+
/// A failure type-dependent htlc value.
|
3585
|
+
uint64 htlc_msat = 4;
|
3586
|
+
|
3587
|
+
/// The sha256 sum of the onion payload.
|
3588
|
+
bytes onion_sha_256 = 5;
|
3589
|
+
|
3590
|
+
/// A failure type-dependent cltv expiry value.
|
3591
|
+
uint32 cltv_expiry = 6;
|
3592
|
+
|
3593
|
+
/// A failure type-dependent flags value.
|
3594
|
+
uint32 flags = 7;
|
3595
|
+
|
3596
|
+
/**
|
3597
|
+
The position in the path of the intermediate or final node that generated
|
3598
|
+
the failure message. Position zero is the sender node.
|
3599
|
+
**/
|
3600
|
+
uint32 failure_source_index = 8;
|
3601
|
+
|
3602
|
+
/// A failure type-dependent block height.
|
3603
|
+
uint32 height = 9;
|
3604
|
+
}
|
3605
|
+
|
3606
|
+
message ChannelUpdate {
|
3607
|
+
/**
|
3608
|
+
The signature that validates the announced data and proves the ownership
|
3609
|
+
of node id.
|
3610
|
+
*/
|
3611
|
+
bytes signature = 1;
|
3612
|
+
|
3613
|
+
/**
|
3614
|
+
The target chain that this channel was opened within. This value
|
3615
|
+
should be the genesis hash of the target chain. Along with the short
|
3616
|
+
channel ID, this uniquely identifies the channel globally in a
|
3617
|
+
blockchain.
|
3618
|
+
*/
|
3619
|
+
bytes chain_hash = 2;
|
3620
|
+
|
3621
|
+
/**
|
3622
|
+
The unique description of the funding transaction.
|
3623
|
+
*/
|
3624
|
+
uint64 chan_id = 3 [jstype = JS_STRING];
|
3625
|
+
|
3626
|
+
/**
|
3627
|
+
A timestamp that allows ordering in the case of multiple announcements.
|
3628
|
+
We should ignore the message if timestamp is not greater than the
|
3629
|
+
last-received.
|
3630
|
+
*/
|
3631
|
+
uint32 timestamp = 4;
|
3632
|
+
|
3633
|
+
/**
|
3634
|
+
The bitfield that describes whether optional fields are present in this
|
3635
|
+
update. Currently, the least-significant bit must be set to 1 if the
|
3636
|
+
optional field MaxHtlc is present.
|
3637
|
+
*/
|
3638
|
+
uint32 message_flags = 10;
|
3639
|
+
|
3640
|
+
/**
|
3641
|
+
The bitfield that describes additional meta-data concerning how the
|
3642
|
+
update is to be interpreted. Currently, the least-significant bit must be
|
3643
|
+
set to 0 if the creating node corresponds to the first node in the
|
3644
|
+
previously sent channel announcement and 1 otherwise. If the second bit
|
3645
|
+
is set, then the channel is set to be disabled.
|
3646
|
+
*/
|
3647
|
+
uint32 channel_flags = 5;
|
3648
|
+
|
3649
|
+
/**
|
3650
|
+
The minimum number of blocks this node requires to be added to the expiry
|
3651
|
+
of HTLCs. This is a security parameter determined by the node operator.
|
3652
|
+
This value represents the required gap between the time locks of the
|
3653
|
+
incoming and outgoing HTLC's set to this node.
|
3654
|
+
*/
|
3655
|
+
uint32 time_lock_delta = 6;
|
3656
|
+
|
3657
|
+
/**
|
3658
|
+
The minimum HTLC value which will be accepted.
|
3659
|
+
*/
|
3660
|
+
uint64 htlc_minimum_msat = 7;
|
3661
|
+
|
3662
|
+
/**
|
3663
|
+
The base fee that must be used for incoming HTLC's to this particular
|
3664
|
+
channel. This value will be tacked onto the required for a payment
|
3665
|
+
independent of the size of the payment.
|
3666
|
+
*/
|
3667
|
+
uint32 base_fee = 8;
|
3668
|
+
|
3669
|
+
/**
|
3670
|
+
The fee rate that will be charged per millionth of a satoshi.
|
3671
|
+
*/
|
3672
|
+
uint32 fee_rate = 9;
|
3673
|
+
|
3674
|
+
/**
|
3675
|
+
The maximum HTLC value which will be accepted.
|
3676
|
+
*/
|
3677
|
+
uint64 htlc_maximum_msat = 11;
|
3678
|
+
|
3679
|
+
/**
|
3680
|
+
The set of data that was appended to this message, some of which we may
|
3681
|
+
not actually know how to iterate or parse. By holding onto this data, we
|
3682
|
+
ensure that we're able to properly validate the set of signatures that
|
3683
|
+
cover these new fields, and ensure we're able to make upgrades to the
|
3684
|
+
network in a forwards compatible manner.
|
3685
|
+
*/
|
3686
|
+
bytes extra_opaque_data = 12;
|
3075
3687
|
}
|