lnrpc 0.11.1 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +23 -23
- data/README.md +8 -9
- data/examples.rb +43 -0
- data/generate-grpc-service-files.sh +2 -3
- data/lib/grpc_services/autopilotrpc/autopilot_services_pb.rb +5 -5
- data/lib/grpc_services/chainrpc/chainnotifier_services_pb.rb +4 -4
- data/lib/grpc_services/invoicesrpc/invoices_pb.rb +18 -0
- data/lib/grpc_services/invoicesrpc/invoices_services_pb.rb +9 -5
- data/lib/grpc_services/lnclipb/lncli_pb.rb +1 -0
- data/lib/grpc_services/routerrpc/router_pb.rb +50 -0
- data/lib/grpc_services/routerrpc/router_services_pb.rb +33 -14
- data/lib/grpc_services/rpc_pb.rb +123 -0
- data/lib/grpc_services/rpc_services_pb.rb +77 -63
- data/lib/grpc_services/signrpc/signer_pb.rb +3 -0
- data/lib/grpc_services/signrpc/signer_services_pb.rb +9 -8
- data/lib/grpc_services/verrpc/verrpc_services_pb.rb +2 -2
- data/lib/grpc_services/walletrpc/walletkit_pb.rb +108 -0
- data/lib/grpc_services/walletrpc/walletkit_services_pb.rb +87 -14
- data/lib/grpc_services/walletunlocker_pb.rb +23 -0
- data/lib/grpc_services/walletunlocker_services_pb.rb +5 -5
- data/lib/grpc_services/watchtowerrpc/watchtower_services_pb.rb +2 -2
- data/lib/grpc_services/wtclientrpc/wtclient_pb.rb +8 -0
- data/lib/grpc_services/wtclientrpc/wtclient_services_pb.rb +7 -7
- data/lib/lnrpc/client.rb +1 -0
- data/lib/lnrpc/version.rb +1 -1
- data/lnrpc.gemspec +3 -3
- metadata +11 -11
@@ -26,7 +26,7 @@ module Lnrpc
|
|
26
26
|
# Lightning is the main RPC server of the daemon.
|
27
27
|
class Service
|
28
28
|
|
29
|
-
include GRPC::GenericService
|
29
|
+
include ::GRPC::GenericService
|
30
30
|
|
31
31
|
self.marshal_class_method = :encode
|
32
32
|
self.unmarshal_class_method = :decode
|
@@ -36,15 +36,16 @@ module Lnrpc
|
|
36
36
|
# WalletBalance returns total unspent outputs(confirmed and unconfirmed), all
|
37
37
|
# confirmed unspent outputs and all unconfirmed unspent outputs under control
|
38
38
|
# of the wallet.
|
39
|
-
rpc :WalletBalance, WalletBalanceRequest, WalletBalanceResponse
|
39
|
+
rpc :WalletBalance, ::Lnrpc::WalletBalanceRequest, ::Lnrpc::WalletBalanceResponse
|
40
40
|
# lncli: `channelbalance`
|
41
|
-
# ChannelBalance returns the total funds
|
42
|
-
# in
|
43
|
-
|
41
|
+
# ChannelBalance returns a report on the total funds across all open channels,
|
42
|
+
# categorized in local/remote, pending local/remote and unsettled local/remote
|
43
|
+
# balances.
|
44
|
+
rpc :ChannelBalance, ::Lnrpc::ChannelBalanceRequest, ::Lnrpc::ChannelBalanceResponse
|
44
45
|
# lncli: `listchaintxns`
|
45
46
|
# GetTransactions returns a list describing all the known transactions
|
46
47
|
# relevant to the wallet.
|
47
|
-
rpc :GetTransactions, GetTransactionsRequest, TransactionDetails
|
48
|
+
rpc :GetTransactions, ::Lnrpc::GetTransactionsRequest, ::Lnrpc::TransactionDetails
|
48
49
|
# lncli: `estimatefee`
|
49
50
|
# EstimateFee asks the chain backend to estimate the fee rate and total fees
|
50
51
|
# for a transaction that pays to multiple specified outputs.
|
@@ -53,73 +54,73 @@ module Lnrpc
|
|
53
54
|
# `&AddrToAmount[<address>]=<amount_to_send>` to the URL. Unfortunately this
|
54
55
|
# map type doesn't appear in the REST API documentation because of a bug in
|
55
56
|
# the grpc-gateway library.
|
56
|
-
rpc :EstimateFee, EstimateFeeRequest, EstimateFeeResponse
|
57
|
+
rpc :EstimateFee, ::Lnrpc::EstimateFeeRequest, ::Lnrpc::EstimateFeeResponse
|
57
58
|
# lncli: `sendcoins`
|
58
59
|
# SendCoins executes a request to send coins to a particular address. Unlike
|
59
60
|
# SendMany, this RPC call only allows creating a single output at a time. If
|
60
|
-
# neither target_conf, or
|
61
|
+
# neither target_conf, or sat_per_vbyte are set, then the internal wallet will
|
61
62
|
# consult its fee model to determine a fee for the default confirmation
|
62
63
|
# target.
|
63
|
-
rpc :SendCoins, SendCoinsRequest, SendCoinsResponse
|
64
|
+
rpc :SendCoins, ::Lnrpc::SendCoinsRequest, ::Lnrpc::SendCoinsResponse
|
64
65
|
# lncli: `listunspent`
|
65
66
|
# Deprecated, use walletrpc.ListUnspent instead.
|
66
67
|
#
|
67
68
|
# ListUnspent returns a list of all utxos spendable by the wallet with a
|
68
69
|
# number of confirmations between the specified minimum and maximum.
|
69
|
-
rpc :ListUnspent, ListUnspentRequest, ListUnspentResponse
|
70
|
+
rpc :ListUnspent, ::Lnrpc::ListUnspentRequest, ::Lnrpc::ListUnspentResponse
|
70
71
|
#
|
71
72
|
# SubscribeTransactions creates a uni-directional stream from the server to
|
72
73
|
# the client in which any newly discovered transactions relevant to the
|
73
74
|
# wallet are sent over.
|
74
|
-
rpc :SubscribeTransactions, GetTransactionsRequest, stream(Transaction)
|
75
|
+
rpc :SubscribeTransactions, ::Lnrpc::GetTransactionsRequest, stream(::Lnrpc::Transaction)
|
75
76
|
# lncli: `sendmany`
|
76
77
|
# SendMany handles a request for a transaction that creates multiple specified
|
77
|
-
# outputs in parallel. If neither target_conf, or
|
78
|
+
# outputs in parallel. If neither target_conf, or sat_per_vbyte are set, then
|
78
79
|
# the internal wallet will consult its fee model to determine a fee for the
|
79
80
|
# default confirmation target.
|
80
|
-
rpc :SendMany, SendManyRequest, SendManyResponse
|
81
|
+
rpc :SendMany, ::Lnrpc::SendManyRequest, ::Lnrpc::SendManyResponse
|
81
82
|
# lncli: `newaddress`
|
82
83
|
# NewAddress creates a new address under control of the local wallet.
|
83
|
-
rpc :NewAddress, NewAddressRequest, NewAddressResponse
|
84
|
+
rpc :NewAddress, ::Lnrpc::NewAddressRequest, ::Lnrpc::NewAddressResponse
|
84
85
|
# lncli: `signmessage`
|
85
86
|
# SignMessage signs a message with this node's private key. The returned
|
86
87
|
# signature string is `zbase32` encoded and pubkey recoverable, meaning that
|
87
88
|
# only the message digest and signature are needed for verification.
|
88
|
-
rpc :SignMessage, SignMessageRequest, SignMessageResponse
|
89
|
+
rpc :SignMessage, ::Lnrpc::SignMessageRequest, ::Lnrpc::SignMessageResponse
|
89
90
|
# lncli: `verifymessage`
|
90
91
|
# VerifyMessage verifies a signature over a msg. The signature must be
|
91
92
|
# zbase32 encoded and signed by an active node in the resident node's
|
92
93
|
# channel database. In addition to returning the validity of the signature,
|
93
94
|
# VerifyMessage also returns the recovered pubkey from the signature.
|
94
|
-
rpc :VerifyMessage, VerifyMessageRequest, VerifyMessageResponse
|
95
|
+
rpc :VerifyMessage, ::Lnrpc::VerifyMessageRequest, ::Lnrpc::VerifyMessageResponse
|
95
96
|
# lncli: `connect`
|
96
97
|
# ConnectPeer attempts to establish a connection to a remote peer. This is at
|
97
98
|
# the networking level, and is used for communication between nodes. This is
|
98
99
|
# distinct from establishing a channel with a peer.
|
99
|
-
rpc :ConnectPeer, ConnectPeerRequest, ConnectPeerResponse
|
100
|
+
rpc :ConnectPeer, ::Lnrpc::ConnectPeerRequest, ::Lnrpc::ConnectPeerResponse
|
100
101
|
# lncli: `disconnect`
|
101
102
|
# DisconnectPeer attempts to disconnect one peer from another identified by a
|
102
103
|
# given pubKey. In the case that we currently have a pending or active channel
|
103
104
|
# with the target peer, then this action will be not be allowed.
|
104
|
-
rpc :DisconnectPeer, DisconnectPeerRequest, DisconnectPeerResponse
|
105
|
+
rpc :DisconnectPeer, ::Lnrpc::DisconnectPeerRequest, ::Lnrpc::DisconnectPeerResponse
|
105
106
|
# lncli: `listpeers`
|
106
107
|
# ListPeers returns a verbose listing of all currently active peers.
|
107
|
-
rpc :ListPeers, ListPeersRequest, ListPeersResponse
|
108
|
+
rpc :ListPeers, ::Lnrpc::ListPeersRequest, ::Lnrpc::ListPeersResponse
|
108
109
|
#
|
109
110
|
# SubscribePeerEvents creates a uni-directional stream from the server to
|
110
111
|
# the client in which any events relevant to the state of peers are sent
|
111
112
|
# over. Events include peers going online and offline.
|
112
|
-
rpc :SubscribePeerEvents, PeerEventSubscription, stream(PeerEvent)
|
113
|
+
rpc :SubscribePeerEvents, ::Lnrpc::PeerEventSubscription, stream(::Lnrpc::PeerEvent)
|
113
114
|
# lncli: `getinfo`
|
114
115
|
# GetInfo returns general information concerning the lightning node including
|
115
116
|
# it's identity pubkey, alias, the chains it is connected to, and information
|
116
117
|
# concerning the number of open+pending channels.
|
117
|
-
rpc :GetInfo, GetInfoRequest, GetInfoResponse
|
118
|
+
rpc :GetInfo, ::Lnrpc::GetInfoRequest, ::Lnrpc::GetInfoResponse
|
118
119
|
# * lncli: `getrecoveryinfo`
|
119
120
|
# GetRecoveryInfo returns information concerning the recovery mode including
|
120
121
|
# whether it's in a recovery mode, whether the recovery is finished, and the
|
121
122
|
# progress made so far.
|
122
|
-
rpc :GetRecoveryInfo, GetRecoveryInfoRequest, GetRecoveryInfoResponse
|
123
|
+
rpc :GetRecoveryInfo, ::Lnrpc::GetRecoveryInfoRequest, ::Lnrpc::GetRecoveryInfoResponse
|
123
124
|
# TODO(roasbeef): merge with below with bool?
|
124
125
|
#
|
125
126
|
# lncli: `pendingchannels`
|
@@ -127,27 +128,27 @@ module Lnrpc
|
|
127
128
|
# considered "pending". A channel is pending if it has finished the funding
|
128
129
|
# workflow and is waiting for confirmations for the funding txn, or is in the
|
129
130
|
# process of closure, either initiated cooperatively or non-cooperatively.
|
130
|
-
rpc :PendingChannels, PendingChannelsRequest, PendingChannelsResponse
|
131
|
+
rpc :PendingChannels, ::Lnrpc::PendingChannelsRequest, ::Lnrpc::PendingChannelsResponse
|
131
132
|
# lncli: `listchannels`
|
132
133
|
# ListChannels returns a description of all the open channels that this node
|
133
134
|
# is a participant in.
|
134
|
-
rpc :ListChannels, ListChannelsRequest, ListChannelsResponse
|
135
|
+
rpc :ListChannels, ::Lnrpc::ListChannelsRequest, ::Lnrpc::ListChannelsResponse
|
135
136
|
#
|
136
137
|
# SubscribeChannelEvents creates a uni-directional stream from the server to
|
137
138
|
# the client in which any updates relevant to the state of the channels are
|
138
139
|
# sent over. Events include new active channels, inactive channels, and closed
|
139
140
|
# channels.
|
140
|
-
rpc :SubscribeChannelEvents, ChannelEventSubscription, stream(ChannelEventUpdate)
|
141
|
+
rpc :SubscribeChannelEvents, ::Lnrpc::ChannelEventSubscription, stream(::Lnrpc::ChannelEventUpdate)
|
141
142
|
# lncli: `closedchannels`
|
142
143
|
# ClosedChannels returns a description of all the closed channels that
|
143
144
|
# this node was a participant in.
|
144
|
-
rpc :ClosedChannels, ClosedChannelsRequest, ClosedChannelsResponse
|
145
|
+
rpc :ClosedChannels, ::Lnrpc::ClosedChannelsRequest, ::Lnrpc::ClosedChannelsResponse
|
145
146
|
#
|
146
147
|
# OpenChannelSync is a synchronous version of the OpenChannel RPC call. This
|
147
148
|
# call is meant to be consumed by clients to the REST proxy. As with all
|
148
149
|
# other sync calls, all byte slices are intended to be populated as hex
|
149
150
|
# encoded strings.
|
150
|
-
rpc :OpenChannelSync, OpenChannelRequest, ChannelPoint
|
151
|
+
rpc :OpenChannelSync, ::Lnrpc::OpenChannelRequest, ::Lnrpc::ChannelPoint
|
151
152
|
# lncli: `openchannel`
|
152
153
|
# OpenChannel attempts to open a singly funded channel specified in the
|
153
154
|
# request to a remote peer. Users are able to specify a target number of
|
@@ -157,7 +158,7 @@ module Lnrpc
|
|
157
158
|
# the pending channel ID of the in-progress channel. Depending on the
|
158
159
|
# arguments specified in the OpenChannelRequest, this pending channel ID can
|
159
160
|
# then be used to manually progress the channel funding flow.
|
160
|
-
rpc :OpenChannel, OpenChannelRequest, stream(OpenStatusUpdate)
|
161
|
+
rpc :OpenChannel, ::Lnrpc::OpenChannelRequest, stream(::Lnrpc::OpenStatusUpdate)
|
161
162
|
#
|
162
163
|
# FundingStateStep is an advanced funding related call that allows the caller
|
163
164
|
# to either execute some preparatory steps for a funding workflow, or
|
@@ -167,14 +168,14 @@ module Lnrpc
|
|
167
168
|
# pending channel ID, for which we need to use specific parameters.
|
168
169
|
# Alternatively, this can be used to interactively drive PSBT signing for
|
169
170
|
# funding for partially complete funding transactions.
|
170
|
-
rpc :FundingStateStep, FundingTransitionMsg, FundingStateStepResp
|
171
|
+
rpc :FundingStateStep, ::Lnrpc::FundingTransitionMsg, ::Lnrpc::FundingStateStepResp
|
171
172
|
#
|
172
173
|
# ChannelAcceptor dispatches a bi-directional streaming RPC in which
|
173
174
|
# OpenChannel requests are sent to the client and the client responds with
|
174
175
|
# a boolean that tells LND whether or not to accept the channel. This allows
|
175
176
|
# node operators to specify their own criteria for accepting inbound channels
|
176
177
|
# through a single persistent connection.
|
177
|
-
rpc :ChannelAcceptor, stream(ChannelAcceptResponse), stream(ChannelAcceptRequest)
|
178
|
+
rpc :ChannelAcceptor, stream(::Lnrpc::ChannelAcceptResponse), stream(::Lnrpc::ChannelAcceptRequest)
|
178
179
|
# lncli: `closechannel`
|
179
180
|
# CloseChannel attempts to close an active channel identified by its channel
|
180
181
|
# outpoint (ChannelPoint). The actions of this method can additionally be
|
@@ -183,42 +184,44 @@ module Lnrpc
|
|
183
184
|
# then the user can specify either a target number of blocks until the
|
184
185
|
# closure transaction is confirmed, or a manual fee rate. If neither are
|
185
186
|
# specified, then a default lax, block confirmation target is used.
|
186
|
-
rpc :CloseChannel, CloseChannelRequest, stream(CloseStatusUpdate)
|
187
|
+
rpc :CloseChannel, ::Lnrpc::CloseChannelRequest, stream(::Lnrpc::CloseStatusUpdate)
|
187
188
|
# lncli: `abandonchannel`
|
188
189
|
# AbandonChannel removes all channel state from the database except for a
|
189
190
|
# close summary. This method can be used to get rid of permanently unusable
|
190
|
-
# channels due to bugs fixed in newer versions of lnd.
|
191
|
-
#
|
192
|
-
|
191
|
+
# channels due to bugs fixed in newer versions of lnd. This method can also be
|
192
|
+
# used to remove externally funded channels where the funding transaction was
|
193
|
+
# never broadcast. Only available for non-externally funded channels in dev
|
194
|
+
# build.
|
195
|
+
rpc :AbandonChannel, ::Lnrpc::AbandonChannelRequest, ::Lnrpc::AbandonChannelResponse
|
193
196
|
# lncli: `sendpayment`
|
194
197
|
# Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a
|
195
198
|
# bi-directional streaming RPC for sending payments through the Lightning
|
196
199
|
# Network. A single RPC invocation creates a persistent bi-directional
|
197
200
|
# stream allowing clients to rapidly send payments through the Lightning
|
198
201
|
# Network with a single persistent connection.
|
199
|
-
rpc :SendPayment, stream(SendRequest), stream(SendResponse)
|
202
|
+
rpc :SendPayment, stream(::Lnrpc::SendRequest), stream(::Lnrpc::SendResponse)
|
200
203
|
#
|
201
204
|
# SendPaymentSync is the synchronous non-streaming version of SendPayment.
|
202
205
|
# This RPC is intended to be consumed by clients of the REST proxy.
|
203
206
|
# Additionally, this RPC expects the destination's public key and the payment
|
204
207
|
# hash (if any) to be encoded as hex strings.
|
205
|
-
rpc :SendPaymentSync, SendRequest, SendResponse
|
208
|
+
rpc :SendPaymentSync, ::Lnrpc::SendRequest, ::Lnrpc::SendResponse
|
206
209
|
# lncli: `sendtoroute`
|
207
210
|
# Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional
|
208
211
|
# streaming RPC for sending payment through the Lightning Network. This
|
209
212
|
# method differs from SendPayment in that it allows users to specify a full
|
210
213
|
# route manually. This can be used for things like rebalancing, and atomic
|
211
214
|
# swaps.
|
212
|
-
rpc :SendToRoute, stream(SendToRouteRequest), stream(SendResponse)
|
215
|
+
rpc :SendToRoute, stream(::Lnrpc::SendToRouteRequest), stream(::Lnrpc::SendResponse)
|
213
216
|
#
|
214
217
|
# SendToRouteSync is a synchronous version of SendToRoute. It Will block
|
215
218
|
# until the payment either fails or succeeds.
|
216
|
-
rpc :SendToRouteSync, SendToRouteRequest, SendResponse
|
219
|
+
rpc :SendToRouteSync, ::Lnrpc::SendToRouteRequest, ::Lnrpc::SendResponse
|
217
220
|
# lncli: `addinvoice`
|
218
221
|
# AddInvoice attempts to add a new invoice to the invoice database. Any
|
219
222
|
# duplicated invoices are rejected, therefore all invoices *must* have a
|
220
223
|
# unique payment preimage.
|
221
|
-
rpc :AddInvoice, Invoice, AddInvoiceResponse
|
224
|
+
rpc :AddInvoice, ::Lnrpc::Invoice, ::Lnrpc::AddInvoiceResponse
|
222
225
|
# lncli: `listinvoices`
|
223
226
|
# ListInvoices returns a list of all the invoices currently stored within the
|
224
227
|
# database. Any active debug invoices are ignored. It has full support for
|
@@ -227,12 +230,12 @@ module Lnrpc
|
|
227
230
|
# last_index_offset fields included in the response as the index_offset of the
|
228
231
|
# next request. By default, the first 100 invoices created will be returned.
|
229
232
|
# Backwards pagination is also supported through the Reversed flag.
|
230
|
-
rpc :ListInvoices, ListInvoiceRequest, ListInvoiceResponse
|
233
|
+
rpc :ListInvoices, ::Lnrpc::ListInvoiceRequest, ::Lnrpc::ListInvoiceResponse
|
231
234
|
# lncli: `lookupinvoice`
|
232
235
|
# LookupInvoice attempts to look up an invoice according to its payment hash.
|
233
236
|
# The passed payment hash *must* be exactly 32 bytes, if not, an error is
|
234
237
|
# returned.
|
235
|
-
rpc :LookupInvoice, PaymentHash, Invoice
|
238
|
+
rpc :LookupInvoice, ::Lnrpc::PaymentHash, ::Lnrpc::Invoice
|
236
239
|
#
|
237
240
|
# SubscribeInvoices returns a uni-directional stream (server -> client) for
|
238
241
|
# notifying the client of newly added/settled invoices. The caller can
|
@@ -243,18 +246,18 @@ module Lnrpc
|
|
243
246
|
# invoices with a settle_index greater than the specified value. One or both
|
244
247
|
# of these fields can be set. If no fields are set, then we'll only send out
|
245
248
|
# the latest add/settle events.
|
246
|
-
rpc :SubscribeInvoices, InvoiceSubscription, stream(Invoice)
|
249
|
+
rpc :SubscribeInvoices, ::Lnrpc::InvoiceSubscription, stream(::Lnrpc::Invoice)
|
247
250
|
# lncli: `decodepayreq`
|
248
251
|
# DecodePayReq takes an encoded payment request string and attempts to decode
|
249
252
|
# it, returning a full description of the conditions encoded within the
|
250
253
|
# payment request.
|
251
|
-
rpc :DecodePayReq, PayReqString, PayReq
|
254
|
+
rpc :DecodePayReq, ::Lnrpc::PayReqString, ::Lnrpc::PayReq
|
252
255
|
# lncli: `listpayments`
|
253
256
|
# ListPayments returns a list of all outgoing payments.
|
254
|
-
rpc :ListPayments, ListPaymentsRequest, ListPaymentsResponse
|
257
|
+
rpc :ListPayments, ::Lnrpc::ListPaymentsRequest, ::Lnrpc::ListPaymentsResponse
|
255
258
|
#
|
256
259
|
# DeleteAllPayments deletes all outgoing payments from DB.
|
257
|
-
rpc :DeleteAllPayments, DeleteAllPaymentsRequest, DeleteAllPaymentsResponse
|
260
|
+
rpc :DeleteAllPayments, ::Lnrpc::DeleteAllPaymentsRequest, ::Lnrpc::DeleteAllPaymentsResponse
|
258
261
|
# lncli: `describegraph`
|
259
262
|
# DescribeGraph returns a description of the latest graph state from the
|
260
263
|
# point of view of the node. The graph information is partitioned into two
|
@@ -262,21 +265,21 @@ module Lnrpc
|
|
262
265
|
# vertexes themselves. As this is a directed graph, the edges also contain
|
263
266
|
# the node directional specific routing policy which includes: the time lock
|
264
267
|
# delta, fee information, etc.
|
265
|
-
rpc :DescribeGraph, ChannelGraphRequest, ChannelGraph
|
268
|
+
rpc :DescribeGraph, ::Lnrpc::ChannelGraphRequest, ::Lnrpc::ChannelGraph
|
266
269
|
# lncli: `getnodemetrics`
|
267
270
|
# GetNodeMetrics returns node metrics calculated from the graph. Currently
|
268
271
|
# the only supported metric is betweenness centrality of individual nodes.
|
269
|
-
rpc :GetNodeMetrics, NodeMetricsRequest, NodeMetricsResponse
|
272
|
+
rpc :GetNodeMetrics, ::Lnrpc::NodeMetricsRequest, ::Lnrpc::NodeMetricsResponse
|
270
273
|
# lncli: `getchaninfo`
|
271
274
|
# GetChanInfo returns the latest authenticated network announcement for the
|
272
275
|
# given channel identified by its channel ID: an 8-byte integer which
|
273
276
|
# uniquely identifies the location of transaction's funding output within the
|
274
277
|
# blockchain.
|
275
|
-
rpc :GetChanInfo, ChanInfoRequest, ChannelEdge
|
278
|
+
rpc :GetChanInfo, ::Lnrpc::ChanInfoRequest, ::Lnrpc::ChannelEdge
|
276
279
|
# lncli: `getnodeinfo`
|
277
280
|
# GetNodeInfo returns the latest advertised, aggregated, and authenticated
|
278
281
|
# channel information for the specified node identified by its public key.
|
279
|
-
rpc :GetNodeInfo, NodeInfoRequest, NodeInfo
|
282
|
+
rpc :GetNodeInfo, ::Lnrpc::NodeInfoRequest, ::Lnrpc::NodeInfo
|
280
283
|
# lncli: `queryroutes`
|
281
284
|
# QueryRoutes attempts to query the daemon's Channel Router for a possible
|
282
285
|
# route to a target destination capable of carrying a specific amount of
|
@@ -288,15 +291,15 @@ module Lnrpc
|
|
288
291
|
# `&dest_custom_records[<record_number>]=<record_data_base64_url_encoded>`
|
289
292
|
# to the URL. Unfortunately this map type doesn't appear in the REST API
|
290
293
|
# documentation because of a bug in the grpc-gateway library.
|
291
|
-
rpc :QueryRoutes, QueryRoutesRequest, QueryRoutesResponse
|
294
|
+
rpc :QueryRoutes, ::Lnrpc::QueryRoutesRequest, ::Lnrpc::QueryRoutesResponse
|
292
295
|
# lncli: `getnetworkinfo`
|
293
296
|
# GetNetworkInfo returns some basic stats about the known channel graph from
|
294
297
|
# the point of view of the node.
|
295
|
-
rpc :GetNetworkInfo, NetworkInfoRequest, NetworkInfo
|
298
|
+
rpc :GetNetworkInfo, ::Lnrpc::NetworkInfoRequest, ::Lnrpc::NetworkInfo
|
296
299
|
# lncli: `stop`
|
297
300
|
# StopDaemon will send a shutdown request to the interrupt handler, triggering
|
298
301
|
# a graceful shutdown of the daemon.
|
299
|
-
rpc :StopDaemon, StopRequest, StopResponse
|
302
|
+
rpc :StopDaemon, ::Lnrpc::StopRequest, ::Lnrpc::StopResponse
|
300
303
|
#
|
301
304
|
# SubscribeChannelGraph launches a streaming RPC that allows the caller to
|
302
305
|
# receive notifications upon any changes to the channel graph topology from
|
@@ -304,21 +307,21 @@ module Lnrpc
|
|
304
307
|
# nodes coming online, nodes updating their authenticated attributes, new
|
305
308
|
# channels being advertised, updates in the routing policy for a directional
|
306
309
|
# channel edge, and when channels are closed on-chain.
|
307
|
-
rpc :SubscribeChannelGraph, GraphTopologySubscription, stream(GraphTopologyUpdate)
|
310
|
+
rpc :SubscribeChannelGraph, ::Lnrpc::GraphTopologySubscription, stream(::Lnrpc::GraphTopologyUpdate)
|
308
311
|
# lncli: `debuglevel`
|
309
312
|
# DebugLevel allows a caller to programmatically set the logging verbosity of
|
310
313
|
# lnd. The logging can be targeted according to a coarse daemon-wide logging
|
311
314
|
# level, or in a granular fashion to specify the logging for a target
|
312
315
|
# sub-system.
|
313
|
-
rpc :DebugLevel, DebugLevelRequest, DebugLevelResponse
|
316
|
+
rpc :DebugLevel, ::Lnrpc::DebugLevelRequest, ::Lnrpc::DebugLevelResponse
|
314
317
|
# lncli: `feereport`
|
315
318
|
# FeeReport allows the caller to obtain a report detailing the current fee
|
316
319
|
# schedule enforced by the node globally for each channel.
|
317
|
-
rpc :FeeReport, FeeReportRequest, FeeReportResponse
|
320
|
+
rpc :FeeReport, ::Lnrpc::FeeReportRequest, ::Lnrpc::FeeReportResponse
|
318
321
|
# lncli: `updatechanpolicy`
|
319
322
|
# UpdateChannelPolicy allows the caller to update the fee schedule and
|
320
323
|
# channel policies for all channels globally, or a particular channel.
|
321
|
-
rpc :UpdateChannelPolicy, PolicyUpdateRequest, PolicyUpdateResponse
|
324
|
+
rpc :UpdateChannelPolicy, ::Lnrpc::PolicyUpdateRequest, ::Lnrpc::PolicyUpdateResponse
|
322
325
|
# lncli: `fwdinghistory`
|
323
326
|
# ForwardingHistory allows the caller to query the htlcswitch for a record of
|
324
327
|
# all HTLCs forwarded within the target time range, and integer offset
|
@@ -330,7 +333,7 @@ module Lnrpc
|
|
330
333
|
# As a result each message can only contain 50k entries. Each response has
|
331
334
|
# the index offset of the last entry. The index offset can be provided to the
|
332
335
|
# request to allow the caller to skip a series of records.
|
333
|
-
rpc :ForwardingHistory, ForwardingHistoryRequest, ForwardingHistoryResponse
|
336
|
+
rpc :ForwardingHistory, ::Lnrpc::ForwardingHistoryRequest, ::Lnrpc::ForwardingHistoryResponse
|
334
337
|
# lncli: `exportchanbackup`
|
335
338
|
# ExportChannelBackup attempts to return an encrypted static channel backup
|
336
339
|
# for the target channel identified by it channel point. The backup is
|
@@ -338,25 +341,25 @@ module Lnrpc
|
|
338
341
|
# returned backup can either be restored using the RestoreChannelBackup
|
339
342
|
# method once lnd is running, or via the InitWallet and UnlockWallet methods
|
340
343
|
# from the WalletUnlocker service.
|
341
|
-
rpc :ExportChannelBackup, ExportChannelBackupRequest, ChannelBackup
|
344
|
+
rpc :ExportChannelBackup, ::Lnrpc::ExportChannelBackupRequest, ::Lnrpc::ChannelBackup
|
342
345
|
#
|
343
346
|
# ExportAllChannelBackups returns static channel backups for all existing
|
344
347
|
# channels known to lnd. A set of regular singular static channel backups for
|
345
348
|
# each channel are returned. Additionally, a multi-channel backup is returned
|
346
349
|
# as well, which contains a single encrypted blob containing the backups of
|
347
350
|
# each channel.
|
348
|
-
rpc :ExportAllChannelBackups, ChanBackupExportRequest, ChanBackupSnapshot
|
351
|
+
rpc :ExportAllChannelBackups, ::Lnrpc::ChanBackupExportRequest, ::Lnrpc::ChanBackupSnapshot
|
349
352
|
#
|
350
353
|
# VerifyChanBackup allows a caller to verify the integrity of a channel backup
|
351
354
|
# snapshot. This method will accept either a packed Single or a packed Multi.
|
352
355
|
# Specifying both will result in an error.
|
353
|
-
rpc :VerifyChanBackup, ChanBackupSnapshot, VerifyChanBackupResponse
|
356
|
+
rpc :VerifyChanBackup, ::Lnrpc::ChanBackupSnapshot, ::Lnrpc::VerifyChanBackupResponse
|
354
357
|
# lncli: `restorechanbackup`
|
355
358
|
# RestoreChannelBackups accepts a set of singular channel backups, or a
|
356
359
|
# single encrypted multi-chan backup and attempts to recover any funds
|
357
360
|
# remaining within the channel. If we are able to unpack the backup, then the
|
358
361
|
# new channel will be shown under listchannels, as well as pending channels.
|
359
|
-
rpc :RestoreChannelBackups, RestoreChanBackupRequest, RestoreBackupResponse
|
362
|
+
rpc :RestoreChannelBackups, ::Lnrpc::RestoreChanBackupRequest, ::Lnrpc::RestoreBackupResponse
|
360
363
|
#
|
361
364
|
# SubscribeChannelBackups allows a client to sub-subscribe to the most up to
|
362
365
|
# date information concerning the state of all channel backups. Each time a
|
@@ -365,12 +368,23 @@ module Lnrpc
|
|
365
368
|
# channel is closed, we send a new update, which contains new new chan back
|
366
369
|
# ups, but the updated set of encrypted multi-chan backups with the closed
|
367
370
|
# channel(s) removed.
|
368
|
-
rpc :SubscribeChannelBackups, ChannelBackupSubscription, stream(ChanBackupSnapshot)
|
371
|
+
rpc :SubscribeChannelBackups, ::Lnrpc::ChannelBackupSubscription, stream(::Lnrpc::ChanBackupSnapshot)
|
369
372
|
# lncli: `bakemacaroon`
|
370
373
|
# BakeMacaroon allows the creation of a new macaroon with custom read and
|
371
374
|
# write permissions. No first-party caveats are added since this can be done
|
372
375
|
# offline.
|
373
|
-
rpc :BakeMacaroon, BakeMacaroonRequest, BakeMacaroonResponse
|
376
|
+
rpc :BakeMacaroon, ::Lnrpc::BakeMacaroonRequest, ::Lnrpc::BakeMacaroonResponse
|
377
|
+
# lncli: `listmacaroonids`
|
378
|
+
# ListMacaroonIDs returns all root key IDs that are in use.
|
379
|
+
rpc :ListMacaroonIDs, ::Lnrpc::ListMacaroonIDsRequest, ::Lnrpc::ListMacaroonIDsResponse
|
380
|
+
# lncli: `deletemacaroonid`
|
381
|
+
# DeleteMacaroonID deletes the specified macaroon ID and invalidates all
|
382
|
+
# macaroons derived from that ID.
|
383
|
+
rpc :DeleteMacaroonID, ::Lnrpc::DeleteMacaroonIDRequest, ::Lnrpc::DeleteMacaroonIDResponse
|
384
|
+
# lncli: `listpermissions`
|
385
|
+
# ListPermissions lists all RPC method URIs and their required macaroon
|
386
|
+
# permissions to access them.
|
387
|
+
rpc :ListPermissions, ::Lnrpc::ListPermissionsRequest, ::Lnrpc::ListPermissionsResponse
|
374
388
|
end
|
375
389
|
|
376
390
|
Stub = Service.rpc_stub_class
|
@@ -43,6 +43,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
43
43
|
add_message "signrpc.SignMessageReq" do
|
44
44
|
optional :msg, :bytes, 1
|
45
45
|
optional :key_loc, :message, 2, "signrpc.KeyLocator"
|
46
|
+
optional :double_hash, :bool, 3
|
47
|
+
optional :compact_sig, :bool, 4
|
46
48
|
end
|
47
49
|
add_message "signrpc.SignMessageResp" do
|
48
50
|
optional :signature, :bytes, 1
|
@@ -58,6 +60,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
58
60
|
add_message "signrpc.SharedKeyRequest" do
|
59
61
|
optional :ephemeral_pubkey, :bytes, 1
|
60
62
|
optional :key_loc, :message, 2, "signrpc.KeyLocator"
|
63
|
+
optional :key_desc, :message, 3, "signrpc.KeyDescriptor"
|
61
64
|
end
|
62
65
|
add_message "signrpc.SharedKeyResponse" do
|
63
66
|
optional :shared_key, :bytes, 1
|
@@ -10,7 +10,7 @@ module Signrpc
|
|
10
10
|
# daemon's wallet.
|
11
11
|
class Service
|
12
12
|
|
13
|
-
include GRPC::GenericService
|
13
|
+
include ::GRPC::GenericService
|
14
14
|
|
15
15
|
self.marshal_class_method = :encode
|
16
16
|
self.unmarshal_class_method = :decode
|
@@ -25,7 +25,7 @@ module Signrpc
|
|
25
25
|
#
|
26
26
|
# If we are unable to sign using the specified keys, then an error will be
|
27
27
|
# returned.
|
28
|
-
rpc :SignOutputRaw, SignReq, SignResp
|
28
|
+
rpc :SignOutputRaw, ::Signrpc::SignReq, ::Signrpc::SignResp
|
29
29
|
#
|
30
30
|
# ComputeInputScript generates a complete InputIndex for the passed
|
31
31
|
# transaction with the signature as defined within the passed SignDescriptor.
|
@@ -37,30 +37,31 @@ module Signrpc
|
|
37
37
|
# the only items of the SignDescriptor that need to be populated are pkScript
|
38
38
|
# in the TxOut field, the value in that same field, and finally the input
|
39
39
|
# index.
|
40
|
-
rpc :ComputeInputScript, SignReq, InputScriptResp
|
40
|
+
rpc :ComputeInputScript, ::Signrpc::SignReq, ::Signrpc::InputScriptResp
|
41
41
|
#
|
42
42
|
# SignMessage signs a message with the key specified in the key locator. The
|
43
43
|
# returned signature is fixed-size LN wire format encoded.
|
44
44
|
#
|
45
45
|
# The main difference to SignMessage in the main RPC is that a specific key is
|
46
46
|
# used to sign the message instead of the node identity private key.
|
47
|
-
rpc :SignMessage, SignMessageReq, SignMessageResp
|
47
|
+
rpc :SignMessage, ::Signrpc::SignMessageReq, ::Signrpc::SignMessageResp
|
48
48
|
#
|
49
49
|
# VerifyMessage verifies a signature over a message using the public key
|
50
50
|
# provided. The signature must be fixed-size LN wire format encoded.
|
51
51
|
#
|
52
52
|
# The main difference to VerifyMessage in the main RPC is that the public key
|
53
53
|
# used to sign the message does not have to be a node known to the network.
|
54
|
-
rpc :VerifyMessage, VerifyMessageReq, VerifyMessageResp
|
54
|
+
rpc :VerifyMessage, ::Signrpc::VerifyMessageReq, ::Signrpc::VerifyMessageResp
|
55
55
|
#
|
56
56
|
# DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key
|
57
57
|
# derivation between the ephemeral public key in the request and the node's
|
58
|
-
# key specified in the
|
59
|
-
#
|
58
|
+
# key specified in the key_desc parameter. Either a key locator or a raw
|
59
|
+
# public key is expected in the key_desc, if neither is supplied, defaults to
|
60
|
+
# the node's identity private key:
|
60
61
|
# P_shared = privKeyNode * ephemeralPubkey
|
61
62
|
# The resulting shared public key is serialized in the compressed format and
|
62
63
|
# hashed with sha256, resulting in the final key length of 256bit.
|
63
|
-
rpc :DeriveSharedKey, SharedKeyRequest, SharedKeyResponse
|
64
|
+
rpc :DeriveSharedKey, ::Signrpc::SharedKeyRequest, ::Signrpc::SharedKeyResponse
|
64
65
|
end
|
65
66
|
|
66
67
|
Stub = Service.rpc_stub_class
|
@@ -10,7 +10,7 @@ module Verrpc
|
|
10
10
|
# and build information of the running daemon.
|
11
11
|
class Service
|
12
12
|
|
13
|
-
include GRPC::GenericService
|
13
|
+
include ::GRPC::GenericService
|
14
14
|
|
15
15
|
self.marshal_class_method = :encode
|
16
16
|
self.unmarshal_class_method = :decode
|
@@ -19,7 +19,7 @@ module Verrpc
|
|
19
19
|
# lncli: `version`
|
20
20
|
# GetVersion returns the current version and build information of the running
|
21
21
|
# daemon.
|
22
|
-
rpc :GetVersion, VersionRequest, Version
|
22
|
+
rpc :GetVersion, ::Verrpc::VersionRequest, ::Verrpc::Version
|
23
23
|
end
|
24
24
|
|
25
25
|
Stub = Service.rpc_stub_class
|