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