1
0
mirror of https://github.com/bumi/lnrpc synced 2026-01-01 22:26:22 +00:00

Compare commits

..

43 Commits

Author SHA1 Message Date
6519387c83
Merge pull request #28 from iraszl/master
add example command to extract information from lightning invoice
2023-10-18 14:57:13 +02:00
Ivan Raszl
b8da3ec0c7
Merge branch 'bumi:master' into master 2023-10-18 12:51:30 +08:00
Ivan Raszl
5b10a6d9aa add example command to extract information from lightning invoice 2023-10-18 12:50:45 +08:00
951291c803
Update README.md 2023-03-10 12:03:32 +02:00
395550248e v0.15.5 2023-03-10 11:02:59 +01:00
519117b688 Update dependencies 2023-03-10 11:02:49 +01:00
19fe190a7a File.exists? is deprecated 2023-03-10 11:02:39 +01:00
f23e408457 update GRPC files for v0.15.5-beta 2023-03-10 11:02:25 +01:00
a1bf3a8516
Merge pull request #22 from iraszl/master
Minor updates to examples
2022-09-12 11:56:30 +02:00
Ivan Raszl
67bd66fd7c
Add peering to examples 2022-09-12 17:04:46 +08:00
Ivan Raszl
dcc837cabf
Merge pull request #2 from iraszl/iraszl-patch-2
Add open channel command and section titles
2022-09-12 16:55:44 +08:00
Ivan Raszl
bce4cf0b77
Add open channel command and section titles
Minor improvements
2022-09-12 16:55:15 +08:00
449696fbb6 v0.14.3.1 - v0.14.3 was wrongly published to rubygems and yanked 2022-06-12 10:11:45 +02:00
5194b2b413 v0.14.3 2022-06-12 10:09:17 +02:00
dbba4fd09a Merge branch 'v0.14.3'
* v0.14.3:
  Update gRPC files for v.14.3
2022-06-12 10:07:31 +02:00
135bc614aa version bump (this is actually v0.14.1) 2022-06-12 10:06:50 +02:00
1fd764f55a Update gRPC files for v.14.3 2022-06-12 10:05:38 +02:00
a839d09e6e version bump 2022-06-12 09:56:12 +02:00
050f0d0802 Update script to generate grpc service files 2022-06-12 09:55:00 +02:00
30b1f2bddc
Merge pull request #20 from bumi/v0.14.1-beta
V0.14.1 beta
2022-06-09 19:56:57 +02:00
df9165414f
Merge branch 'master' into v0.14.1-beta 2022-06-09 12:11:03 +02:00
57f36b69ff More examples 2022-05-26 17:39:40 +02:00
26e15192eb bundle update 2022-05-26 17:18:46 +02:00
ddeea4da42 Update grpc files for v0.14.1-beta 2022-05-26 17:18:32 +02:00
780a638c0e
Merge pull request #16 from azuchi/fix_typo
Fix typo
2021-11-23 06:05:46 +02:00
azuchi
cb549f4fe6 Fix typo 2021-11-22 11:03:39 +09:00
80bf0bb600
Merge pull request #15 from iraszl/master
add examples for message signing/verification, get node/channel info
2021-08-16 11:51:01 +02:00
Ivan Raszl
fcf2486af3 add examples for message signing/verification, get node/channel info 2021-08-15 23:44:21 +08:00
6ab8336244
Merge pull request #14 from iraszl/master
Fix a typo
2021-08-15 16:19:18 +02:00
Ivan Raszl
ccda3a0aa0
Merge pull request #1 from iraszl/iraszl-patch-1
Fix typo in README.md
2021-07-14 11:15:28 +08:00
Ivan Raszl
957515b0fe
Fix typo in README.md
Just a misspelled word.
2021-07-14 11:14:49 +08:00
21f6466529 Update google-protobuf dependency that works with latest ruby versions 2021-07-10 00:08:40 +02:00
cc53130a16 v0.13.0 2021-07-09 21:26:19 +02:00
46020e5d0b grpc files for v0.13.0-beta 2021-07-09 21:25:49 +02:00
0bba8170b8 v0.12.1 2021-07-09 21:20:03 +02:00
641b8113f2 grpc files for v0.12.1-beta 2021-07-09 21:19:28 +02:00
0ceddc872b Update Readme 2021-07-09 20:28:06 +02:00
df02052101 Update dependencies 2021-07-09 20:27:08 +02:00
a891ab0236 Bump version 2020-11-20 23:49:44 +01:00
2f7ae9202f Support credentials as hex value 2020-11-20 23:49:44 +01:00
704c4c9256
Update README.md 2020-08-29 19:44:15 +02:00
2e903a25bd
Update examples.rb 2020-08-29 16:52:51 +02:00
b42d640767
Update examples.rb 2020-08-29 16:38:51 +02:00
34 changed files with 1527 additions and 196 deletions

View File

@ -1,43 +1,43 @@
PATH PATH
remote: . remote: .
specs: specs:
lnrpc (0.10.0) lnrpc (0.15.5)
google-protobuf (>= 3.7) google-protobuf (>= 3.15.7)
grpc (>= 1.19.0) grpc (>= 1.28.0)
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
diff-lcs (1.3) diff-lcs (1.5.0)
google-protobuf (3.9.2) google-protobuf (3.22.1)
googleapis-common-protos-types (1.0.4) googleapis-common-protos-types (1.5.0)
google-protobuf (~> 3.0) google-protobuf (~> 3.14)
grpc (1.24.0) grpc (1.52.0)
google-protobuf (~> 3.8) google-protobuf (~> 3.21)
googleapis-common-protos-types (~> 1.0) googleapis-common-protos-types (~> 1.0)
rake (13.0.1) rake (13.0.6)
rspec (3.9.0) rspec (3.11.0)
rspec-core (~> 3.9.0) rspec-core (~> 3.11.0)
rspec-expectations (~> 3.9.0) rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.9.0) rspec-mocks (~> 3.11.0)
rspec-core (3.9.0) rspec-core (3.11.0)
rspec-support (~> 3.9.0) rspec-support (~> 3.11.0)
rspec-expectations (3.9.0) rspec-expectations (3.11.0)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0) rspec-support (~> 3.11.0)
rspec-mocks (3.9.0) rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0) rspec-support (~> 3.11.0)
rspec-support (3.9.0) rspec-support (3.11.0)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
bundler (~> 1.17) bundler (> 2.0)
lnrpc! lnrpc!
rake (~> 13.0) rake (~> 13.0)
rspec (~> 3.0) rspec (~> 3.0)
BUNDLED WITH BUNDLED WITH
1.17.3 2.4.4

View File

@ -5,13 +5,10 @@ a [gRPC](https://grpc.io/) client for [LND, the Lightning Network Daemon](https:
## Installation ## Installation
Note: there is still an GRPC/protobuf [issue with Ruby 2.7](https://github.com/protocolbuffers/protobuf/issues/7070).
So lnrpc requires Ruby < 2.7.
Add this line to your application's Gemfile: Add this line to your application's Gemfile:
```ruby ```ruby
gem 'lnrpc', '~> 0.10.0' gem 'lnrpc', '~> 0.15.5'
``` ```
lnrpc follows the lnd versioning, thus it is recommended to specify the exact version you need for your lnd node as dependency (see [#Versioning](#Versioning)). lnrpc follows the lnd versioning, thus it is recommended to specify the exact version you need for your lnd node as dependency (see [#Versioning](#Versioning)).
@ -27,7 +24,7 @@ Or install it yourself as:
## Usage ## Usage
This gem makes the gRPC client classes created from the [LND service defintions](https://github.com/lightningnetwork/lnd/tree/master/lnrpc) available. This gem makes the gRPC client classes created from the [LND service definitions](https://github.com/lightningnetwork/lnd/tree/master/lnrpc) available.
```ruby ```ruby
require "lnrpc" require "lnrpc"
@ -35,7 +32,7 @@ require "lnrpc"
# With the changes in LND v.10.0 this load the `Lnrpc` and `Routerrpc` namespace # With the changes in LND v.10.0 this load the `Lnrpc` and `Routerrpc` namespace
Lnrpc::Lightning::Stub Lnrpc::Lightning::Stub
Routerrpc:::Routerrpc::Stub Routerrpc::Routerrpc::Stub
Lnrpc::GetInfoRequest Lnrpc::GetInfoRequest
... ...
``` ```
@ -78,7 +75,7 @@ lnd = Lnrpc::Client.new({credentials_path: '/path/to.cert.cls', macaroon_path: '
lnd.lightning # => Lnrpc::Lightning::Stub lnd.lightning # => Lnrpc::Lightning::Stub
lnd.router # => Lnrpc::Router::Stub lnd.router # => Lnrpc::Router::Stub
lnd.ligthning.get_info lnd.lightning.get_info
``` ```
Also have a look at [examples.rb](https://github.com/bumi/lnrpc/blob/master/examples.rb) Also have a look at [examples.rb](https://github.com/bumi/lnrpc/blob/master/examples.rb)
@ -133,7 +130,7 @@ client.lightning.grpc.list_channels(request)
client.lightning.wallet_balance.total_balance client.lightning.wallet_balance.total_balance
# is the same as: # is the same as:
request = Lnrpc::WalletBalanceRequest.new() request = Lnrpc::WalletBalanceRequest.new
client.lightning.grpc.wallet_balance(request).total_balance client.lightning.grpc.wallet_balance(request).total_balance
``` ```
@ -144,7 +141,7 @@ If you have a running BTC Pay Server with LND support, integrating with lnrpc is
- Navigate to Services on the Server Settings page - Navigate to Services on the Server Settings page
- Click "see information" for your gRPC Server - Click "see information" for your gRPC Server
- The link by "More details..." will expose the address and various macaroon hex strings - The link by "More details..." will expose the address and various macaroon hex strings
- Initialize your client with the options detailed above. BTC Pay Server utilizes LetsEncrypt for trusted TLC Certificates so set that option to nil. - Initialize your client with the options detailed above. BTC Pay Server utilizes LetsEncrypt for trusted TLC Certificates so set that option to nil.
Don't have a BTC Pay Server? [Setting one up is easy.](https://medium.com/@BtcpayServer/launch-btcpay-server-via-web-interface-and-deploy-full-bitcoin-node-lnd-in-less-than-a-minute-dc8bc6f06a3) Don't have a BTC Pay Server? [Setting one up is easy.](https://medium.com/@BtcpayServer/launch-btcpay-server-via-web-interface-and-deploy-full-bitcoin-node-lnd-in-less-than-a-minute-dc8bc6f06a3)
@ -164,6 +161,8 @@ The files will be stored in `lib/grpc_services`
$ ./generate-grpc-service-files.sh $ ./generate-grpc-service-files.sh
+ Make sure you have the [grpc-tools](https://rubygems.org/gems/grpc-tools) installed
+ Make sure you have the lnd source in your $GOPATH/src folder
## Other resources ## Other resources

View File

@ -1,19 +1,100 @@
require "lnrpc" require "lnrpc"
lnd = Lnrpc::Client.new() # use defaults for credentials, macaraoon and address # establish a connection
lnd = Lnrpc::Client.new() # use defaults for credentials, macaroon and address
# get basic info
get_info_res = lnd.lightning.get_info get_info_res = lnd.lightning.get_info
puts get_info_res.alias puts get_info_res.alias
# get wallet balance
puts lnd.lightning.wallet_balance.total_balance puts lnd.lightning.wallet_balance.total_balance
# pay an invoice
pay_request = "lntb50u1pw9mmndpp5nvnff958pxc9eqknwntyxapjw7l5grt5e2y70cmmnu0lljfa0sdqdpsgfkx7cmtwd68yetpd5s9xct5v4kxc6t5v5s8yatz0ysxwetdcqzysxqyz5vqjkhlyn40z76gyn7dx32p9j58dftve9xrlvnqqazht7w2fdauukhyhr9y4k3ngjn8s6srglj8swk7tm70ng54wdkq47ahytpwffvaeusp500csz" pay_request = "lntb50u1pw9mmndpp5nvnff958pxc9eqknwntyxapjw7l5grt5e2y70cmmnu0lljfa0sdqdpsgfkx7cmtwd68yetpd5s9xct5v4kxc6t5v5s8yatz0ysxwetdcqzysxqyz5vqjkhlyn40z76gyn7dx32p9j58dftve9xrlvnqqazht7w2fdauukhyhr9y4k3ngjn8s6srglj8swk7tm70ng54wdkq47ahytpwffvaeusp500csz"
lnd.pay(pay_request) # or: lnd.pay(payment_request: pay_request) # or:
lnd.router.send_payment_v2(payment_request: pay_request) lnd.router.send_payment_v2(payment_request: pay_request)
# keysend payment
dest = Lnrpc.to_byte_array('038474ec195f497cf4036e5994bd820dd365bb0aaa7fb42bd9b536913a1a2dcc9e')
lnd.keysend(dest: dest, amt: 1000)
# create invoice
invoice_res = lnd.lightning.add_invoice(value: 1000, memo: 'I :heart: ruby') invoice_res = lnd.lightning.add_invoice(value: 1000, memo: 'I :heart: ruby')
puts invoice_res.payment_request puts invoice_res.payment_request
# get fee estimates
puts lnd.versioner.get_version
puts lnd.wallet_kit.estimate_fee(conf_target: 10)
puts lnd.wallet_kit.next_addr
# print incoming invoices
lnd.lightning.subscribe_invoices(settle_index: 1).each do |invoice| lnd.lightning.subscribe_invoices(settle_index: 1).each do |invoice|
puts invoice.payment_request puts invoice.payment_request
end end
# sign a message with your node
signed_message = lnd.lightning.sign_message({ msg: "Money printer goes brrr" })
puts "Signature: " + signed_message.signature
# verify a signed message by another node
verification_response = lnd.lightning.verify_message({
msg: "Money printer goes brrr",
signature: signed_message.signature
})
puts "Pubkey: " + verification_response.pubkey # pubkey of the node that signed
puts "Valid: " + verification_response.valid.to_s
# get information on a node
node_info_response = lnd.lightning.get_node_info(pub_key: verification_response.pubkey, include_channels: true)
puts "Updated: " + Time.at(node_info_response.node.last_update).to_s
puts "Pubkey: " + node_info_response.node.pub_key.to_s
puts "Alias: " + node_info_response.node.alias.to_s
puts "Color: " + node_info_response.node.color.to_s
puts "Channels: " + node_info_response.num_channels.to_s
puts "Capacity SAT: " + node_info_response.total_capacity.to_s
puts "Address: " + node_info_response.node.addresses.first["addr"].to_s
# extract channel information
node_info_response.channels.each do |channel|
puts "Channel ID: " + channel["channel_id"].to_s
puts "Channel 1:" + channel["node1_pub"].to_s # pubkey of the first node
puts "Channel 2:" + channel["node2_pub"].to_s # pubkey of the second node
puts "Channel Capacity:" + channel["capacity"].to_s
end
# update channel policy
channel = lnd.lightning.list_channels.channels[0]
puts lnd.lightning.get_chan_info(chan_id: channel.chan_id)
channel_point = {
funding_txid_str: channel.channel_point.split(":")[0],
output_index: channel.channel_point.split(":")[1].to_i
}
lnd.lightning.update_channel_policy({
time_lock_delta: 40,
base_fee_msat: 1100,
chan_point: channel_point
})
# peer node
address = {pubkey: "03423790614f023e3c0cdaa654a3578e919947e4c3a14bf5044e7c787ebd11af1a", host: "98.142.251.170:9735"}
response = lnd.lightning.connect_peer(addr: address)
# open channel
# note: Lnrpc needs to connect with an admin macaroon, and the node needs to be an existing peer.
pubkey = Lnrpc.to_byte_array("031f2669adab71548fad4432277a0d90233e3bc07ac29cfb0b3e01bd3fb26cb9fa")
response = lnd.lightning.open_channel({node_pubkey: pubkey, local_funding_amount: 21000})
# extract details from a lightning invoice
lightning_invoice = "lnbc990..." # created by payee
invoice_details = lnd.lightning.decode_pay_req({pay_req: lightning_invoice})
puts invoice_details.inspect
puts "Destination: " + invoice_details.destination.to_s
puts "Amount Sats: " + invoice_details.num_satoshis.to_s
puts "Description: " + invoice_details.description.to_s
puts "Created At: " + Time.at(invoice_details.timestamp).to_s
puts "Expiry Hours: " + (invoice_details.expiry/3600).to_s
puts "Payment Hash: " + invoice_details.payment_hash.to_s
# Payment hash should match a hashed version of the preimage
preimage = "f2a3a..." # known by payee, and revealed to the payer only if payment is successful
puts "Payment verified!" if invoice_details.payment_hash == Digest::SHA256.hexdigest([preimage].pack("H*"))

View File

@ -10,7 +10,7 @@ cd $GOPATH/src/github.com/lightningnetwork/lnd/lnrpc
echo "Generating Ruby GRPC Service Files" echo "Generating Ruby GRPC Service Files"
PROTOS="rpc.proto walletunlocker.proto **/*.proto" PROTOS="lightning.proto walletunlocker.proto stateservice.proto **/*.proto"
# generate files for each proto # generate files for each proto
for file in $PROTOS; do for file in $PROTOS; do
@ -18,9 +18,8 @@ for file in $PROTOS; do
echo "Generating protos from ${file}, into ${LNRPC_TARGET_DIR}/${DIRECTORY}" echo "Generating protos from ${file}, into ${LNRPC_TARGET_DIR}/${DIRECTORY}"
# writes all ruby files in the ruby directory # writes all ruby files in the ruby directory
grpc_tools_ruby_protoc -I/usr/local/include \ grpc_tools_ruby_protoc -I. \
-I. \ -I$GOPATH/src/github.com/googleapis/googleapis \
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
-I$GOPATH/src/github.com/lightningnetwork/lnd/lnrpc \ -I$GOPATH/src/github.com/lightningnetwork/lnd/lnrpc \
--ruby_out=plugins=grpc,paths=source_relative:${LNRPC_TARGET_DIR} \ --ruby_out=plugins=grpc,paths=source_relative:${LNRPC_TARGET_DIR} \
--grpc_out=${LNRPC_TARGET_DIR} "${file}" --grpc_out=${LNRPC_TARGET_DIR} "${file}"

View File

@ -11,7 +11,7 @@ module Autopilotrpc
# that can be used when deciding where to open channels. # that can be used when deciding where to open channels.
class Service class Service
include GRPC::GenericService include ::GRPC::GenericService
self.marshal_class_method = :encode self.marshal_class_method = :encode
self.unmarshal_class_method = :decode self.unmarshal_class_method = :decode
@ -19,20 +19,20 @@ module Autopilotrpc
# #
# Status returns whether the daemon's autopilot agent is active. # Status returns whether the daemon's autopilot agent is active.
rpc :Status, StatusRequest, StatusResponse rpc :Status, ::Autopilotrpc::StatusRequest, ::Autopilotrpc::StatusResponse
# #
# ModifyStatus is used to modify the status of the autopilot agent, like # ModifyStatus is used to modify the status of the autopilot agent, like
# enabling or disabling it. # enabling or disabling it.
rpc :ModifyStatus, ModifyStatusRequest, ModifyStatusResponse rpc :ModifyStatus, ::Autopilotrpc::ModifyStatusRequest, ::Autopilotrpc::ModifyStatusResponse
# #
# QueryScores queries all available autopilot heuristics, in addition to any # QueryScores queries all available autopilot heuristics, in addition to any
# active combination of these heruristics, for the scores they would give to # active combination of these heruristics, for the scores they would give to
# the given nodes. # the given nodes.
rpc :QueryScores, QueryScoresRequest, QueryScoresResponse rpc :QueryScores, ::Autopilotrpc::QueryScoresRequest, ::Autopilotrpc::QueryScoresResponse
# #
# SetScores attempts to set the scores used by the running autopilot agent, # SetScores attempts to set the scores used by the running autopilot agent,
# if the external scoring heuristic is enabled. # if the external scoring heuristic is enabled.
rpc :SetScores, SetScoresRequest, SetScoresResponse rpc :SetScores, ::Autopilotrpc::SetScoresRequest, ::Autopilotrpc::SetScoresResponse
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

View File

@ -10,7 +10,7 @@ module Chainrpc
# chain backend by registering notifiers for chain events. # chain backend by registering notifiers for chain events.
class Service class Service
include GRPC::GenericService include ::GRPC::GenericService
self.marshal_class_method = :encode self.marshal_class_method = :encode
self.unmarshal_class_method = :decode self.unmarshal_class_method = :decode
@ -21,10 +21,12 @@ module Chainrpc
# registers an intent for a client to be notified once a confirmation request # registers an intent for a client to be notified once a confirmation request
# has reached its required number of confirmations on-chain. # has reached its required number of confirmations on-chain.
# #
# A client can specify whether the confirmation request should be for a # A confirmation request must have a valid output script. It is also possible
# particular transaction by its hash or for an output script by specifying a # to give a transaction ID. If the transaction ID is not set, a notification
# zero hash. # is sent once the output script confirms. If the transaction ID is also set,
rpc :RegisterConfirmationsNtfn, ConfRequest, stream(ConfEvent) # a notification is sent once the output script confirms in the given
# transaction.
rpc :RegisterConfirmationsNtfn, ::Chainrpc::ConfRequest, stream(::Chainrpc::ConfEvent)
# #
# RegisterSpendNtfn is a synchronous response-streaming RPC that registers an # RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
# intent for a client to be notification once a spend request has been spent # intent for a client to be notification once a spend request has been spent
@ -32,7 +34,7 @@ module Chainrpc
# #
# A client can specify whether the spend request should be for a particular # A client can specify whether the spend request should be for a particular
# outpoint or for an output script by specifying a zero outpoint. # outpoint or for an output script by specifying a zero outpoint.
rpc :RegisterSpendNtfn, SpendRequest, stream(SpendEvent) rpc :RegisterSpendNtfn, ::Chainrpc::SpendRequest, stream(::Chainrpc::SpendEvent)
# #
# RegisterBlockEpochNtfn is a synchronous response-streaming RPC that # RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
# registers an intent for a client to be notified of blocks in the chain. The # registers an intent for a client to be notified of blocks in the chain. The
@ -43,7 +45,7 @@ module Chainrpc
# A client can also request a historical backlog of blocks from a particular # A client can also request a historical backlog of blocks from a particular
# point. This allows clients to be idempotent by ensuring that they do not # point. This allows clients to be idempotent by ensuring that they do not
# missing processing a single block within the chain. # missing processing a single block within the chain.
rpc :RegisterBlockEpochNtfn, BlockEpoch, stream(BlockEpoch) rpc :RegisterBlockEpochNtfn, ::Chainrpc::BlockEpoch, stream(::Chainrpc::BlockEpoch)
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

View File

@ -0,0 +1,17 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: devrpc/dev.proto
require 'google/protobuf'
require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("devrpc/dev.proto", :syntax => :proto3) do
add_message "devrpc.ImportGraphResponse" do
end
end
end
module Devrpc
ImportGraphResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("devrpc.ImportGraphResponse").msgclass
end

View File

@ -0,0 +1,25 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: devrpc/dev.proto for package 'devrpc'
require 'grpc'
require 'devrpc/dev_pb'
module Devrpc
module Dev
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'devrpc.Dev'
#
# ImportGraph imports a ChannelGraph into the graph database. Should only be
# used for development.
rpc :ImportGraph, ::Lnrpc::ChannelGraph, ::Devrpc::ImportGraphResponse
end
Stub = Service.rpc_stub_class
end
end

View File

@ -3,7 +3,8 @@
require 'google/protobuf' require 'google/protobuf'
require 'rpc_pb' require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("invoicesrpc/invoices.proto", :syntax => :proto3) do add_file("invoicesrpc/invoices.proto", :syntax => :proto3) do
add_message "invoicesrpc.CancelInvoiceMsg" do add_message "invoicesrpc.CancelInvoiceMsg" do
@ -25,6 +26,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end end
add_message "invoicesrpc.AddHoldInvoiceResp" do add_message "invoicesrpc.AddHoldInvoiceResp" do
optional :payment_request, :string, 1 optional :payment_request, :string, 1
optional :add_index, :uint64, 2
optional :payment_addr, :bytes, 3
end end
add_message "invoicesrpc.SettleInvoiceMsg" do add_message "invoicesrpc.SettleInvoiceMsg" do
optional :preimage, :bytes, 1 optional :preimage, :bytes, 1
@ -34,6 +37,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "invoicesrpc.SubscribeSingleInvoiceRequest" do add_message "invoicesrpc.SubscribeSingleInvoiceRequest" do
optional :r_hash, :bytes, 2 optional :r_hash, :bytes, 2
end end
add_message "invoicesrpc.LookupInvoiceMsg" do
optional :lookup_modifier, :enum, 4, "invoicesrpc.LookupModifier"
oneof :invoice_ref do
optional :payment_hash, :bytes, 1
optional :payment_addr, :bytes, 2
optional :set_id, :bytes, 3
end
end
add_enum "invoicesrpc.LookupModifier" do
value :DEFAULT, 0
value :HTLC_SET_ONLY, 1
value :HTLC_SET_BLANK, 2
end
end end
end end
@ -45,4 +61,6 @@ module Invoicesrpc
SettleInvoiceMsg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SettleInvoiceMsg").msgclass SettleInvoiceMsg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SettleInvoiceMsg").msgclass
SettleInvoiceResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SettleInvoiceResp").msgclass SettleInvoiceResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SettleInvoiceResp").msgclass
SubscribeSingleInvoiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SubscribeSingleInvoiceRequest").msgclass SubscribeSingleInvoiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SubscribeSingleInvoiceRequest").msgclass
LookupInvoiceMsg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.LookupInvoiceMsg").msgclass
LookupModifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.LookupModifier").enummodule
end end

View File

@ -10,7 +10,7 @@ module Invoicesrpc
# invoices. # invoices.
class Service class Service
include GRPC::GenericService include ::GRPC::GenericService
self.marshal_class_method = :encode self.marshal_class_method = :encode
self.unmarshal_class_method = :decode self.unmarshal_class_method = :decode
@ -20,20 +20,24 @@ module Invoicesrpc
# SubscribeSingleInvoice returns a uni-directional stream (server -> client) # SubscribeSingleInvoice returns a uni-directional stream (server -> client)
# to notify the client of state transitions of the specified invoice. # to notify the client of state transitions of the specified invoice.
# Initially the current invoice state is always sent out. # Initially the current invoice state is always sent out.
rpc :SubscribeSingleInvoice, SubscribeSingleInvoiceRequest, stream(Lnrpc::Invoice) rpc :SubscribeSingleInvoice, ::Invoicesrpc::SubscribeSingleInvoiceRequest, stream(::Lnrpc::Invoice)
# #
# CancelInvoice cancels a currently open invoice. If the invoice is already # CancelInvoice cancels a currently open invoice. If the invoice is already
# canceled, this call will succeed. If the invoice is already settled, it will # canceled, this call will succeed. If the invoice is already settled, it will
# fail. # fail.
rpc :CancelInvoice, CancelInvoiceMsg, CancelInvoiceResp rpc :CancelInvoice, ::Invoicesrpc::CancelInvoiceMsg, ::Invoicesrpc::CancelInvoiceResp
# #
# AddHoldInvoice creates a hold invoice. It ties the invoice to the hash # AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
# supplied in the request. # supplied in the request.
rpc :AddHoldInvoice, AddHoldInvoiceRequest, AddHoldInvoiceResp rpc :AddHoldInvoice, ::Invoicesrpc::AddHoldInvoiceRequest, ::Invoicesrpc::AddHoldInvoiceResp
# #
# SettleInvoice settles an accepted invoice. If the invoice is already # SettleInvoice settles an accepted invoice. If the invoice is already
# settled, this call will succeed. # settled, this call will succeed.
rpc :SettleInvoice, SettleInvoiceMsg, SettleInvoiceResp rpc :SettleInvoice, ::Invoicesrpc::SettleInvoiceMsg, ::Invoicesrpc::SettleInvoiceResp
#
# LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
# using either its payment hash, payment address, or set ID.
rpc :LookupInvoiceV2, ::Invoicesrpc::LookupInvoiceMsg, ::Lnrpc::Invoice
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

View File

@ -1,10 +1,24 @@
# Generated by the protocol buffer compiler. DO NOT EDIT! # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: rpc.proto # source: lightning.proto
require 'google/protobuf' require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("rpc.proto", :syntax => :proto3) do add_file("lightning.proto", :syntax => :proto3) do
add_message "lnrpc.SubscribeCustomMessagesRequest" do
end
add_message "lnrpc.CustomMessage" do
optional :peer, :bytes, 1
optional :type, :uint32, 2
optional :data, :bytes, 3
end
add_message "lnrpc.SendCustomMessageRequest" do
optional :peer, :bytes, 1
optional :type, :uint32, 2
optional :data, :bytes, 3
end
add_message "lnrpc.SendCustomMessageResponse" do
end
add_message "lnrpc.Utxo" do add_message "lnrpc.Utxo" do
optional :address_type, :enum, 1, "lnrpc.AddressType" optional :address_type, :enum, 1, "lnrpc.AddressType"
optional :address, :string, 2 optional :address, :string, 2
@ -13,6 +27,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :outpoint, :message, 5, "lnrpc.OutPoint" optional :outpoint, :message, 5, "lnrpc.OutPoint"
optional :confirmations, :int64, 6 optional :confirmations, :int64, 6
end end
add_message "lnrpc.OutputDetail" do
optional :output_type, :enum, 1, "lnrpc.OutputScriptType"
optional :address, :string, 2
optional :pk_script, :string, 3
optional :output_index, :int64, 4
optional :amount, :int64, 5
optional :is_our_address, :bool, 6
end
add_message "lnrpc.Transaction" do add_message "lnrpc.Transaction" do
optional :tx_hash, :string, 1 optional :tx_hash, :string, 1
optional :amount, :int64, 2 optional :amount, :int64, 2
@ -22,12 +44,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :time_stamp, :int64, 6 optional :time_stamp, :int64, 6
optional :total_fees, :int64, 7 optional :total_fees, :int64, 7
repeated :dest_addresses, :string, 8 repeated :dest_addresses, :string, 8
repeated :output_details, :message, 11, "lnrpc.OutputDetail"
optional :raw_tx_hex, :string, 9 optional :raw_tx_hex, :string, 9
optional :label, :string, 10 optional :label, :string, 10
repeated :previous_outpoints, :message, 12, "lnrpc.PreviousOutPoint"
end end
add_message "lnrpc.GetTransactionsRequest" do add_message "lnrpc.GetTransactionsRequest" do
optional :start_height, :int32, 1 optional :start_height, :int32, 1
optional :end_height, :int32, 2 optional :end_height, :int32, 2
optional :account, :string, 3
end end
add_message "lnrpc.TransactionDetails" do add_message "lnrpc.TransactionDetails" do
repeated :transactions, :message, 1, "lnrpc.Transaction" repeated :transactions, :message, 1, "lnrpc.Transaction"
@ -55,6 +80,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
map :dest_custom_records, :uint64, :bytes, 11 map :dest_custom_records, :uint64, :bytes, 11
optional :allow_self_payment, :bool, 14 optional :allow_self_payment, :bool, 14
repeated :dest_features, :enum, 15, "lnrpc.FeatureBit" repeated :dest_features, :enum, 15, "lnrpc.FeatureBit"
optional :payment_addr, :bytes, 16
end end
add_message "lnrpc.SendResponse" do add_message "lnrpc.SendResponse" do
optional :payment_error, :string, 1 optional :payment_error, :string, 1
@ -81,10 +107,22 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :csv_delay, :uint32, 11 optional :csv_delay, :uint32, 11
optional :max_accepted_htlcs, :uint32, 12 optional :max_accepted_htlcs, :uint32, 12
optional :channel_flags, :uint32, 13 optional :channel_flags, :uint32, 13
optional :commitment_type, :enum, 14, "lnrpc.CommitmentType"
optional :wants_zero_conf, :bool, 15
optional :wants_scid_alias, :bool, 16
end end
add_message "lnrpc.ChannelAcceptResponse" do add_message "lnrpc.ChannelAcceptResponse" do
optional :accept, :bool, 1 optional :accept, :bool, 1
optional :pending_chan_id, :bytes, 2 optional :pending_chan_id, :bytes, 2
optional :error, :string, 3
optional :upfront_shutdown, :string, 4
optional :csv_delay, :uint32, 5
optional :reserve_sat, :uint64, 6
optional :in_flight_max_msat, :uint64, 7
optional :max_htlc_count, :uint32, 8
optional :min_htlc_in, :uint64, 9
optional :min_accept_depth, :uint32, 10
optional :zero_conf, :bool, 11
end end
add_message "lnrpc.ChannelPoint" do add_message "lnrpc.ChannelPoint" do
optional :output_index, :uint32, 3 optional :output_index, :uint32, 3
@ -98,6 +136,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :txid_str, :string, 2 optional :txid_str, :string, 2
optional :output_index, :uint32, 3 optional :output_index, :uint32, 3
end end
add_message "lnrpc.PreviousOutPoint" do
optional :outpoint, :string, 1
optional :is_our_output, :bool, 2
end
add_message "lnrpc.LightningAddress" do add_message "lnrpc.LightningAddress" do
optional :pubkey, :string, 1 optional :pubkey, :string, 1
optional :host, :string, 2 optional :host, :string, 2
@ -105,16 +147,22 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.EstimateFeeRequest" do add_message "lnrpc.EstimateFeeRequest" do
map :AddrToAmount, :string, :int64, 1 map :AddrToAmount, :string, :int64, 1
optional :target_conf, :int32, 2 optional :target_conf, :int32, 2
optional :min_confs, :int32, 3
optional :spend_unconfirmed, :bool, 4
end end
add_message "lnrpc.EstimateFeeResponse" do add_message "lnrpc.EstimateFeeResponse" do
optional :fee_sat, :int64, 1 optional :fee_sat, :int64, 1
optional :feerate_sat_per_byte, :int64, 2 optional :feerate_sat_per_byte, :int64, 2
optional :sat_per_vbyte, :uint64, 3
end end
add_message "lnrpc.SendManyRequest" do add_message "lnrpc.SendManyRequest" do
map :AddrToAmount, :string, :int64, 1 map :AddrToAmount, :string, :int64, 1
optional :target_conf, :int32, 3 optional :target_conf, :int32, 3
optional :sat_per_vbyte, :uint64, 4
optional :sat_per_byte, :int64, 5 optional :sat_per_byte, :int64, 5
optional :label, :string, 6 optional :label, :string, 6
optional :min_confs, :int32, 7
optional :spend_unconfirmed, :bool, 8
end end
add_message "lnrpc.SendManyResponse" do add_message "lnrpc.SendManyResponse" do
optional :txid, :string, 1 optional :txid, :string, 1
@ -123,9 +171,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :addr, :string, 1 optional :addr, :string, 1
optional :amount, :int64, 2 optional :amount, :int64, 2
optional :target_conf, :int32, 3 optional :target_conf, :int32, 3
optional :sat_per_vbyte, :uint64, 4
optional :sat_per_byte, :int64, 5 optional :sat_per_byte, :int64, 5
optional :send_all, :bool, 6 optional :send_all, :bool, 6
optional :label, :string, 7 optional :label, :string, 7
optional :min_confs, :int32, 8
optional :spend_unconfirmed, :bool, 9
end end
add_message "lnrpc.SendCoinsResponse" do add_message "lnrpc.SendCoinsResponse" do
optional :txid, :string, 1 optional :txid, :string, 1
@ -133,18 +184,21 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.ListUnspentRequest" do add_message "lnrpc.ListUnspentRequest" do
optional :min_confs, :int32, 1 optional :min_confs, :int32, 1
optional :max_confs, :int32, 2 optional :max_confs, :int32, 2
optional :account, :string, 3
end end
add_message "lnrpc.ListUnspentResponse" do add_message "lnrpc.ListUnspentResponse" do
repeated :utxos, :message, 1, "lnrpc.Utxo" repeated :utxos, :message, 1, "lnrpc.Utxo"
end end
add_message "lnrpc.NewAddressRequest" do add_message "lnrpc.NewAddressRequest" do
optional :type, :enum, 1, "lnrpc.AddressType" optional :type, :enum, 1, "lnrpc.AddressType"
optional :account, :string, 2
end end
add_message "lnrpc.NewAddressResponse" do add_message "lnrpc.NewAddressResponse" do
optional :address, :string, 1 optional :address, :string, 1
end end
add_message "lnrpc.SignMessageRequest" do add_message "lnrpc.SignMessageRequest" do
optional :msg, :bytes, 1 optional :msg, :bytes, 1
optional :single_hash, :bool, 2
end end
add_message "lnrpc.SignMessageResponse" do add_message "lnrpc.SignMessageResponse" do
optional :signature, :string, 1 optional :signature, :string, 1
@ -160,6 +214,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.ConnectPeerRequest" do add_message "lnrpc.ConnectPeerRequest" do
optional :addr, :message, 1, "lnrpc.LightningAddress" optional :addr, :message, 1, "lnrpc.LightningAddress"
optional :perm, :bool, 2 optional :perm, :bool, 2
optional :timeout, :uint64, 3
end end
add_message "lnrpc.ConnectPeerResponse" do add_message "lnrpc.ConnectPeerResponse" do
end end
@ -173,6 +228,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :amount, :int64, 2 optional :amount, :int64, 2
optional :hash_lock, :bytes, 3 optional :hash_lock, :bytes, 3
optional :expiration_height, :uint32, 4 optional :expiration_height, :uint32, 4
optional :htlc_index, :uint64, 5
optional :forwarding_channel, :uint64, 6
optional :forwarding_htlc_index, :uint64, 7
end end
add_message "lnrpc.ChannelConstraints" do add_message "lnrpc.ChannelConstraints" do
optional :csv_delay, :uint32, 1 optional :csv_delay, :uint32, 1
@ -213,6 +271,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :thaw_height, :uint32, 28 optional :thaw_height, :uint32, 28
optional :local_constraints, :message, 29, "lnrpc.ChannelConstraints" optional :local_constraints, :message, 29, "lnrpc.ChannelConstraints"
optional :remote_constraints, :message, 30, "lnrpc.ChannelConstraints" optional :remote_constraints, :message, 30, "lnrpc.ChannelConstraints"
repeated :alias_scids, :uint64, 31
optional :zero_conf, :bool, 32
optional :zero_conf_confirmed_scid, :uint64, 33
end end
add_message "lnrpc.ListChannelsRequest" do add_message "lnrpc.ListChannelsRequest" do
optional :active_only, :bool, 1 optional :active_only, :bool, 1
@ -224,6 +285,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.ListChannelsResponse" do add_message "lnrpc.ListChannelsResponse" do
repeated :channels, :message, 11, "lnrpc.Channel" repeated :channels, :message, 11, "lnrpc.Channel"
end end
add_message "lnrpc.AliasMap" do
optional :base_scid, :uint64, 1
repeated :aliases, :uint64, 2
end
add_message "lnrpc.ListAliasesRequest" do
end
add_message "lnrpc.ListAliasesResponse" do
repeated :alias_maps, :message, 1, "lnrpc.AliasMap"
end
add_message "lnrpc.ChannelCloseSummary" do add_message "lnrpc.ChannelCloseSummary" do
optional :channel_point, :string, 1 optional :channel_point, :string, 1
optional :chan_id, :uint64, 2 optional :chan_id, :uint64, 2
@ -238,6 +308,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :open_initiator, :enum, 11, "lnrpc.Initiator" optional :open_initiator, :enum, 11, "lnrpc.Initiator"
optional :close_initiator, :enum, 12, "lnrpc.Initiator" optional :close_initiator, :enum, 12, "lnrpc.Initiator"
repeated :resolutions, :message, 13, "lnrpc.Resolution" repeated :resolutions, :message, 13, "lnrpc.Resolution"
repeated :alias_scids, :uint64, 14
optional :zero_conf_confirmed_scid, :uint64, 15
end end
add_enum "lnrpc.ChannelCloseSummary.ClosureType" do add_enum "lnrpc.ChannelCloseSummary.ClosureType" do
value :COOPERATIVE_CLOSE, 0 value :COOPERATIVE_CLOSE, 0
@ -277,11 +349,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :sync_type, :enum, 10, "lnrpc.Peer.SyncType" optional :sync_type, :enum, 10, "lnrpc.Peer.SyncType"
map :features, :uint32, :message, 11, "lnrpc.Feature" map :features, :uint32, :message, 11, "lnrpc.Feature"
repeated :errors, :message, 12, "lnrpc.TimestampedError" repeated :errors, :message, 12, "lnrpc.TimestampedError"
optional :flap_count, :int32, 13
optional :last_flap_ns, :int64, 14
optional :last_ping_payload, :bytes, 15
end end
add_enum "lnrpc.Peer.SyncType" do add_enum "lnrpc.Peer.SyncType" do
value :UNKNOWN_SYNC, 0 value :UNKNOWN_SYNC, 0
value :ACTIVE_SYNC, 1 value :ACTIVE_SYNC, 1
value :PASSIVE_SYNC, 2 value :PASSIVE_SYNC, 2
value :PINNED_SYNC, 3
end end
add_message "lnrpc.TimestampedError" do add_message "lnrpc.TimestampedError" do
optional :timestamp, :uint64, 1 optional :timestamp, :uint64, 1
@ -324,6 +400,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
repeated :chains, :message, 16, "lnrpc.Chain" repeated :chains, :message, 16, "lnrpc.Chain"
repeated :uris, :string, 12 repeated :uris, :string, 12
map :features, :uint32, :message, 19, "lnrpc.Feature" map :features, :uint32, :message, 19, "lnrpc.Feature"
optional :require_htlc_interceptor, :bool, 21
end end
add_message "lnrpc.GetRecoveryInfoRequest" do add_message "lnrpc.GetRecoveryInfoRequest" do
end end
@ -354,6 +431,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :target_conf, :int32, 3 optional :target_conf, :int32, 3
optional :sat_per_byte, :int64, 4 optional :sat_per_byte, :int64, 4
optional :delivery_address, :string, 5 optional :delivery_address, :string, 5
optional :sat_per_vbyte, :uint64, 6
optional :max_fee_per_vbyte, :uint64, 7
end end
add_message "lnrpc.CloseStatusUpdate" do add_message "lnrpc.CloseStatusUpdate" do
oneof :update do oneof :update do
@ -370,7 +449,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :funding_amount, :int64, 2 optional :funding_amount, :int64, 2
optional :psbt, :bytes, 3 optional :psbt, :bytes, 3
end end
add_message "lnrpc.BatchOpenChannelRequest" do
repeated :channels, :message, 1, "lnrpc.BatchOpenChannel"
optional :target_conf, :int32, 2
optional :sat_per_vbyte, :int64, 3
optional :min_confs, :int32, 4
optional :spend_unconfirmed, :bool, 5
optional :label, :string, 6
end
add_message "lnrpc.BatchOpenChannel" do
optional :node_pubkey, :bytes, 1
optional :local_funding_amount, :int64, 2
optional :push_sat, :int64, 3
optional :private, :bool, 4
optional :min_htlc_msat, :int64, 5
optional :remote_csv_delay, :uint32, 6
optional :close_address, :string, 7
optional :pending_chan_id, :bytes, 8
optional :commitment_type, :enum, 9, "lnrpc.CommitmentType"
end
add_message "lnrpc.BatchOpenChannelResponse" do
repeated :pending_channels, :message, 1, "lnrpc.PendingUpdate"
end
add_message "lnrpc.OpenChannelRequest" do add_message "lnrpc.OpenChannelRequest" do
optional :sat_per_vbyte, :uint64, 1
optional :node_pubkey, :bytes, 2 optional :node_pubkey, :bytes, 2
optional :node_pubkey_string, :string, 3 optional :node_pubkey_string, :string, 3
optional :local_funding_amount, :int64, 4 optional :local_funding_amount, :int64, 4
@ -385,6 +487,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :close_address, :string, 13 optional :close_address, :string, 13
optional :funding_shim, :message, 14, "lnrpc.FundingShim" optional :funding_shim, :message, 14, "lnrpc.FundingShim"
optional :remote_max_value_in_flight_msat, :uint64, 15 optional :remote_max_value_in_flight_msat, :uint64, 15
optional :remote_max_htlcs, :uint32, 16
optional :max_local_csv, :uint32, 17
optional :commitment_type, :enum, 18, "lnrpc.CommitmentType"
optional :zero_conf, :bool, 19
optional :scid_alias, :bool, 20
end end
add_message "lnrpc.OpenStatusUpdate" do add_message "lnrpc.OpenStatusUpdate" do
optional :pending_chan_id, :bytes, 4 optional :pending_chan_id, :bytes, 4
@ -427,10 +534,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.FundingPsbtVerify" do add_message "lnrpc.FundingPsbtVerify" do
optional :funded_psbt, :bytes, 1 optional :funded_psbt, :bytes, 1
optional :pending_chan_id, :bytes, 2 optional :pending_chan_id, :bytes, 2
optional :skip_finalize, :bool, 3
end end
add_message "lnrpc.FundingPsbtFinalize" do add_message "lnrpc.FundingPsbtFinalize" do
optional :signed_psbt, :bytes, 1 optional :signed_psbt, :bytes, 1
optional :pending_chan_id, :bytes, 2 optional :pending_chan_id, :bytes, 2
optional :final_raw_tx, :bytes, 3
end end
add_message "lnrpc.FundingTransitionMsg" do add_message "lnrpc.FundingTransitionMsg" do
oneof :trigger do oneof :trigger do
@ -469,10 +578,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :remote_chan_reserve_sat, :int64, 7 optional :remote_chan_reserve_sat, :int64, 7
optional :initiator, :enum, 8, "lnrpc.Initiator" optional :initiator, :enum, 8, "lnrpc.Initiator"
optional :commitment_type, :enum, 9, "lnrpc.CommitmentType" optional :commitment_type, :enum, 9, "lnrpc.CommitmentType"
optional :num_forwarding_packages, :int64, 10
optional :chan_status_flags, :string, 11
optional :private, :bool, 12
end end
add_message "lnrpc.PendingChannelsResponse.PendingOpenChannel" do add_message "lnrpc.PendingChannelsResponse.PendingOpenChannel" do
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel" optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
optional :confirmation_height, :uint32, 2
optional :commit_fee, :int64, 4 optional :commit_fee, :int64, 4
optional :commit_weight, :int64, 5 optional :commit_weight, :int64, 5
optional :fee_per_kw, :int64, 6 optional :fee_per_kw, :int64, 6
@ -481,6 +592,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel" optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
optional :limbo_balance, :int64, 2 optional :limbo_balance, :int64, 2
optional :commitments, :message, 3, "lnrpc.PendingChannelsResponse.Commitments" optional :commitments, :message, 3, "lnrpc.PendingChannelsResponse.Commitments"
optional :closing_txid, :string, 4
end end
add_message "lnrpc.PendingChannelsResponse.Commitments" do add_message "lnrpc.PendingChannelsResponse.Commitments" do
optional :local_txid, :string, 1 optional :local_txid, :string, 1
@ -519,6 +631,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :active_channel, :message, 3, "lnrpc.ChannelPoint" optional :active_channel, :message, 3, "lnrpc.ChannelPoint"
optional :inactive_channel, :message, 4, "lnrpc.ChannelPoint" optional :inactive_channel, :message, 4, "lnrpc.ChannelPoint"
optional :pending_open_channel, :message, 6, "lnrpc.PendingUpdate" optional :pending_open_channel, :message, 6, "lnrpc.PendingUpdate"
optional :fully_resolved_channel, :message, 7, "lnrpc.ChannelPoint"
end end
end end
add_enum "lnrpc.ChannelEventUpdate.UpdateType" do add_enum "lnrpc.ChannelEventUpdate.UpdateType" do
@ -527,6 +640,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :ACTIVE_CHANNEL, 2 value :ACTIVE_CHANNEL, 2
value :INACTIVE_CHANNEL, 3 value :INACTIVE_CHANNEL, 3
value :PENDING_OPEN_CHANNEL, 4 value :PENDING_OPEN_CHANNEL, 4
value :FULLY_RESOLVED_CHANNEL, 5
end
add_message "lnrpc.WalletAccountBalance" do
optional :confirmed_balance, :int64, 1
optional :unconfirmed_balance, :int64, 2
end end
add_message "lnrpc.WalletBalanceRequest" do add_message "lnrpc.WalletBalanceRequest" do
end end
@ -534,12 +652,25 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :total_balance, :int64, 1 optional :total_balance, :int64, 1
optional :confirmed_balance, :int64, 2 optional :confirmed_balance, :int64, 2
optional :unconfirmed_balance, :int64, 3 optional :unconfirmed_balance, :int64, 3
optional :locked_balance, :int64, 5
optional :reserved_balance_anchor_chan, :int64, 6
map :account_balance, :string, :message, 4, "lnrpc.WalletAccountBalance"
end
add_message "lnrpc.Amount" do
optional :sat, :uint64, 1
optional :msat, :uint64, 2
end end
add_message "lnrpc.ChannelBalanceRequest" do add_message "lnrpc.ChannelBalanceRequest" do
end end
add_message "lnrpc.ChannelBalanceResponse" do add_message "lnrpc.ChannelBalanceResponse" do
optional :balance, :int64, 1 optional :balance, :int64, 1
optional :pending_open_balance, :int64, 2 optional :pending_open_balance, :int64, 2
optional :local_balance, :message, 3, "lnrpc.Amount"
optional :remote_balance, :message, 4, "lnrpc.Amount"
optional :unsettled_local_balance, :message, 5, "lnrpc.Amount"
optional :unsettled_remote_balance, :message, 6, "lnrpc.Amount"
optional :pending_open_local_balance, :message, 7, "lnrpc.Amount"
optional :pending_open_remote_balance, :message, 8, "lnrpc.Amount"
end end
add_message "lnrpc.QueryRoutesRequest" do add_message "lnrpc.QueryRoutesRequest" do
optional :pub_key, :string, 1 optional :pub_key, :string, 1
@ -558,6 +689,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :last_hop_pubkey, :bytes, 15 optional :last_hop_pubkey, :bytes, 15
repeated :route_hints, :message, 16, "lnrpc.RouteHint" repeated :route_hints, :message, 16, "lnrpc.RouteHint"
repeated :dest_features, :enum, 17, "lnrpc.FeatureBit" repeated :dest_features, :enum, 17, "lnrpc.FeatureBit"
optional :time_pref, :double, 18
end end
add_message "lnrpc.NodePair" do add_message "lnrpc.NodePair" do
optional :from, :bytes, 1 optional :from, :bytes, 1
@ -582,12 +714,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :pub_key, :string, 8 optional :pub_key, :string, 8
optional :tlv_payload, :bool, 9 optional :tlv_payload, :bool, 9
optional :mpp_record, :message, 10, "lnrpc.MPPRecord" optional :mpp_record, :message, 10, "lnrpc.MPPRecord"
optional :amp_record, :message, 12, "lnrpc.AMPRecord"
map :custom_records, :uint64, :bytes, 11 map :custom_records, :uint64, :bytes, 11
optional :metadata, :bytes, 13
end end
add_message "lnrpc.MPPRecord" do add_message "lnrpc.MPPRecord" do
optional :payment_addr, :bytes, 11 optional :payment_addr, :bytes, 11
optional :total_amt_msat, :int64, 10 optional :total_amt_msat, :int64, 10
end end
add_message "lnrpc.AMPRecord" do
optional :root_share, :bytes, 1
optional :set_id, :bytes, 2
optional :child_index, :uint32, 3
end
add_message "lnrpc.Route" do add_message "lnrpc.Route" do
optional :total_time_lock, :uint32, 1 optional :total_time_lock, :uint32, 1
optional :total_fees, :int64, 2 optional :total_fees, :int64, 2
@ -689,6 +828,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :global_features, :bytes, 3 optional :global_features, :bytes, 3
optional :alias, :string, 4 optional :alias, :string, 4
optional :color, :string, 5 optional :color, :string, 5
repeated :node_addresses, :message, 7, "lnrpc.NodeAddress"
map :features, :uint32, :message, 6, "lnrpc.Feature"
end end
add_message "lnrpc.ChannelEdgeUpdate" do add_message "lnrpc.ChannelEdgeUpdate" do
optional :chan_id, :uint64, 1 optional :chan_id, :uint64, 1
@ -711,9 +852,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :fee_proportional_millionths, :uint32, 4 optional :fee_proportional_millionths, :uint32, 4
optional :cltv_expiry_delta, :uint32, 5 optional :cltv_expiry_delta, :uint32, 5
end end
add_message "lnrpc.SetID" do
optional :set_id, :bytes, 1
end
add_message "lnrpc.RouteHint" do add_message "lnrpc.RouteHint" do
repeated :hop_hints, :message, 1, "lnrpc.HopHint" repeated :hop_hints, :message, 1, "lnrpc.HopHint"
end end
add_message "lnrpc.AMPInvoiceState" do
optional :state, :enum, 1, "lnrpc.InvoiceHTLCState"
optional :settle_index, :uint64, 2
optional :settle_time, :int64, 3
optional :amt_paid_msat, :int64, 5
end
add_message "lnrpc.Invoice" do add_message "lnrpc.Invoice" do
optional :memo, :string, 1 optional :memo, :string, 1
optional :r_preimage, :bytes, 3 optional :r_preimage, :bytes, 3
@ -739,6 +889,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
repeated :htlcs, :message, 22, "lnrpc.InvoiceHTLC" repeated :htlcs, :message, 22, "lnrpc.InvoiceHTLC"
map :features, :uint32, :message, 24, "lnrpc.Feature" map :features, :uint32, :message, 24, "lnrpc.Feature"
optional :is_keysend, :bool, 25 optional :is_keysend, :bool, 25
optional :payment_addr, :bytes, 26
optional :is_amp, :bool, 27
map :amp_invoice_state, :string, :message, 28, "lnrpc.AMPInvoiceState"
end end
add_enum "lnrpc.Invoice.InvoiceState" do add_enum "lnrpc.Invoice.InvoiceState" do
value :OPEN, 0 value :OPEN, 0
@ -757,11 +910,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :state, :enum, 8, "lnrpc.InvoiceHTLCState" optional :state, :enum, 8, "lnrpc.InvoiceHTLCState"
map :custom_records, :uint64, :bytes, 9 map :custom_records, :uint64, :bytes, 9
optional :mpp_total_amt_msat, :uint64, 10 optional :mpp_total_amt_msat, :uint64, 10
optional :amp, :message, 11, "lnrpc.AMP"
end
add_message "lnrpc.AMP" do
optional :root_share, :bytes, 1
optional :set_id, :bytes, 2
optional :child_index, :uint32, 3
optional :hash, :bytes, 4
optional :preimage, :bytes, 5
end end
add_message "lnrpc.AddInvoiceResponse" do add_message "lnrpc.AddInvoiceResponse" do
optional :r_hash, :bytes, 1 optional :r_hash, :bytes, 1
optional :payment_request, :string, 2 optional :payment_request, :string, 2
optional :add_index, :uint64, 16 optional :add_index, :uint64, 16
optional :payment_addr, :bytes, 17
end end
add_message "lnrpc.PaymentHash" do add_message "lnrpc.PaymentHash" do
optional :r_hash_str, :string, 1 optional :r_hash_str, :string, 1
@ -806,6 +968,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :FAILED, 3 value :FAILED, 3
end end
add_message "lnrpc.HTLCAttempt" do add_message "lnrpc.HTLCAttempt" do
optional :attempt_id, :uint64, 7
optional :status, :enum, 1, "lnrpc.HTLCAttempt.HTLCStatus" optional :status, :enum, 1, "lnrpc.HTLCAttempt.HTLCStatus"
optional :route, :message, 2, "lnrpc.Route" optional :route, :message, 2, "lnrpc.Route"
optional :attempt_time_ns, :int64, 3 optional :attempt_time_ns, :int64, 3
@ -823,18 +986,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :index_offset, :uint64, 2 optional :index_offset, :uint64, 2
optional :max_payments, :uint64, 3 optional :max_payments, :uint64, 3
optional :reversed, :bool, 4 optional :reversed, :bool, 4
optional :count_total_payments, :bool, 5
end end
add_message "lnrpc.ListPaymentsResponse" do add_message "lnrpc.ListPaymentsResponse" do
repeated :payments, :message, 1, "lnrpc.Payment" repeated :payments, :message, 1, "lnrpc.Payment"
optional :first_index_offset, :uint64, 2 optional :first_index_offset, :uint64, 2
optional :last_index_offset, :uint64, 3 optional :last_index_offset, :uint64, 3
optional :total_num_payments, :uint64, 4
end
add_message "lnrpc.DeletePaymentRequest" do
optional :payment_hash, :bytes, 1
optional :failed_htlcs_only, :bool, 2
end end
add_message "lnrpc.DeleteAllPaymentsRequest" do add_message "lnrpc.DeleteAllPaymentsRequest" do
optional :failed_payments_only, :bool, 1
optional :failed_htlcs_only, :bool, 2
end
add_message "lnrpc.DeletePaymentResponse" do
end end
add_message "lnrpc.DeleteAllPaymentsResponse" do add_message "lnrpc.DeleteAllPaymentsResponse" do
end end
add_message "lnrpc.AbandonChannelRequest" do add_message "lnrpc.AbandonChannelRequest" do
optional :channel_point, :message, 1, "lnrpc.ChannelPoint" optional :channel_point, :message, 1, "lnrpc.ChannelPoint"
optional :pending_funding_shim_only, :bool, 2
optional :i_know_what_i_am_doing, :bool, 3
end end
add_message "lnrpc.AbandonChannelResponse" do add_message "lnrpc.AbandonChannelResponse" do
end end
@ -886,6 +1061,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.PolicyUpdateRequest" do add_message "lnrpc.PolicyUpdateRequest" do
optional :base_fee_msat, :int64, 3 optional :base_fee_msat, :int64, 3
optional :fee_rate, :double, 4 optional :fee_rate, :double, 4
optional :fee_rate_ppm, :uint32, 9
optional :time_lock_delta, :uint32, 5 optional :time_lock_delta, :uint32, 5
optional :max_htlc_msat, :uint64, 6 optional :max_htlc_msat, :uint64, 6
optional :min_htlc_msat, :uint64, 7 optional :min_htlc_msat, :uint64, 7
@ -895,7 +1071,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :chan_point, :message, 2, "lnrpc.ChannelPoint" optional :chan_point, :message, 2, "lnrpc.ChannelPoint"
end end
end end
add_message "lnrpc.FailedUpdate" do
optional :outpoint, :message, 1, "lnrpc.OutPoint"
optional :reason, :enum, 2, "lnrpc.UpdateFailure"
optional :update_error, :string, 3
end
add_message "lnrpc.PolicyUpdateResponse" do add_message "lnrpc.PolicyUpdateResponse" do
repeated :failed_updates, :message, 1, "lnrpc.FailedUpdate"
end end
add_message "lnrpc.ForwardingHistoryRequest" do add_message "lnrpc.ForwardingHistoryRequest" do
optional :start_time, :uint64, 1 optional :start_time, :uint64, 1
@ -913,6 +1095,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :fee_msat, :uint64, 8 optional :fee_msat, :uint64, 8
optional :amt_in_msat, :uint64, 9 optional :amt_in_msat, :uint64, 9
optional :amt_out_msat, :uint64, 10 optional :amt_out_msat, :uint64, 10
optional :timestamp_ns, :uint64, 11
end end
add_message "lnrpc.ForwardingHistoryResponse" do add_message "lnrpc.ForwardingHistoryResponse" do
repeated :forwarding_events, :message, 1, "lnrpc.ForwardingEvent" repeated :forwarding_events, :message, 1, "lnrpc.ForwardingEvent"
@ -956,10 +1139,31 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end end
add_message "lnrpc.BakeMacaroonRequest" do add_message "lnrpc.BakeMacaroonRequest" do
repeated :permissions, :message, 1, "lnrpc.MacaroonPermission" repeated :permissions, :message, 1, "lnrpc.MacaroonPermission"
optional :root_key_id, :uint64, 2
optional :allow_external_permissions, :bool, 3
end end
add_message "lnrpc.BakeMacaroonResponse" do add_message "lnrpc.BakeMacaroonResponse" do
optional :macaroon, :string, 1 optional :macaroon, :string, 1
end end
add_message "lnrpc.ListMacaroonIDsRequest" do
end
add_message "lnrpc.ListMacaroonIDsResponse" do
repeated :root_key_ids, :uint64, 1
end
add_message "lnrpc.DeleteMacaroonIDRequest" do
optional :root_key_id, :uint64, 1
end
add_message "lnrpc.DeleteMacaroonIDResponse" do
optional :deleted, :bool, 1
end
add_message "lnrpc.MacaroonPermissionList" do
repeated :permissions, :message, 1, "lnrpc.MacaroonPermission"
end
add_message "lnrpc.ListPermissionsRequest" do
end
add_message "lnrpc.ListPermissionsResponse" do
map :method_permissions, :string, :message, 1, "lnrpc.MacaroonPermissionList"
end
add_message "lnrpc.Failure" do add_message "lnrpc.Failure" do
optional :code, :enum, 1, "lnrpc.Failure.FailureCode" optional :code, :enum, 1, "lnrpc.Failure.FailureCode"
optional :channel_update, :message, 3, "lnrpc.ChannelUpdate" optional :channel_update, :message, 3, "lnrpc.ChannelUpdate"
@ -995,6 +1199,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :PERMANENT_CHANNEL_FAILURE, 21 value :PERMANENT_CHANNEL_FAILURE, 21
value :EXPIRY_TOO_FAR, 22 value :EXPIRY_TOO_FAR, 22
value :MPP_TIMEOUT, 23 value :MPP_TIMEOUT, 23
value :INVALID_ONION_PAYLOAD, 24
value :INTERNAL_FAILURE, 997 value :INTERNAL_FAILURE, 997
value :UNKNOWN_FAILURE, 998 value :UNKNOWN_FAILURE, 998
value :UNREADABLE_FAILURE, 999 value :UNREADABLE_FAILURE, 999
@ -1013,17 +1218,88 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :htlc_maximum_msat, :uint64, 11 optional :htlc_maximum_msat, :uint64, 11
optional :extra_opaque_data, :bytes, 12 optional :extra_opaque_data, :bytes, 12
end end
add_message "lnrpc.MacaroonId" do
optional :nonce, :bytes, 1
optional :storageId, :bytes, 2
repeated :ops, :message, 3, "lnrpc.Op"
end
add_message "lnrpc.Op" do
optional :entity, :string, 1
repeated :actions, :string, 2
end
add_message "lnrpc.CheckMacPermRequest" do
optional :macaroon, :bytes, 1
repeated :permissions, :message, 2, "lnrpc.MacaroonPermission"
optional :fullMethod, :string, 3
end
add_message "lnrpc.CheckMacPermResponse" do
optional :valid, :bool, 1
end
add_message "lnrpc.RPCMiddlewareRequest" do
optional :request_id, :uint64, 1
optional :raw_macaroon, :bytes, 2
optional :custom_caveat_condition, :string, 3
optional :msg_id, :uint64, 7
oneof :intercept_type do
optional :stream_auth, :message, 4, "lnrpc.StreamAuth"
optional :request, :message, 5, "lnrpc.RPCMessage"
optional :response, :message, 6, "lnrpc.RPCMessage"
optional :reg_complete, :bool, 8
end
end
add_message "lnrpc.StreamAuth" do
optional :method_full_uri, :string, 1
end
add_message "lnrpc.RPCMessage" do
optional :method_full_uri, :string, 1
optional :stream_rpc, :bool, 2
optional :type_name, :string, 3
optional :serialized, :bytes, 4
optional :is_error, :bool, 5
end
add_message "lnrpc.RPCMiddlewareResponse" do
optional :ref_msg_id, :uint64, 1
oneof :middleware_message do
optional :register, :message, 2, "lnrpc.MiddlewareRegistration"
optional :feedback, :message, 3, "lnrpc.InterceptFeedback"
end
end
add_message "lnrpc.MiddlewareRegistration" do
optional :middleware_name, :string, 1
optional :custom_macaroon_caveat_name, :string, 2
optional :read_only_mode, :bool, 3
end
add_message "lnrpc.InterceptFeedback" do
optional :error, :string, 1
optional :replace_response, :bool, 2
optional :replacement_serialized, :bytes, 3
end
add_enum "lnrpc.OutputScriptType" do
value :SCRIPT_TYPE_PUBKEY_HASH, 0
value :SCRIPT_TYPE_SCRIPT_HASH, 1
value :SCRIPT_TYPE_WITNESS_V0_PUBKEY_HASH, 2
value :SCRIPT_TYPE_WITNESS_V0_SCRIPT_HASH, 3
value :SCRIPT_TYPE_PUBKEY, 4
value :SCRIPT_TYPE_MULTISIG, 5
value :SCRIPT_TYPE_NULLDATA, 6
value :SCRIPT_TYPE_NON_STANDARD, 7
value :SCRIPT_TYPE_WITNESS_UNKNOWN, 8
value :SCRIPT_TYPE_WITNESS_V1_TAPROOT, 9
end
add_enum "lnrpc.AddressType" do add_enum "lnrpc.AddressType" do
value :WITNESS_PUBKEY_HASH, 0 value :WITNESS_PUBKEY_HASH, 0
value :NESTED_PUBKEY_HASH, 1 value :NESTED_PUBKEY_HASH, 1
value :UNUSED_WITNESS_PUBKEY_HASH, 2 value :UNUSED_WITNESS_PUBKEY_HASH, 2
value :UNUSED_NESTED_PUBKEY_HASH, 3 value :UNUSED_NESTED_PUBKEY_HASH, 3
value :TAPROOT_PUBKEY, 4
value :UNUSED_TAPROOT_PUBKEY, 5
end end
add_enum "lnrpc.CommitmentType" do add_enum "lnrpc.CommitmentType" do
value :LEGACY, 0 value :UNKNOWN_COMMITMENT_TYPE, 0
value :STATIC_REMOTE_KEY, 1 value :LEGACY, 1
value :ANCHORS, 2 value :STATIC_REMOTE_KEY, 2
value :UNKNOWN_COMMITMENT_TYPE, 999 value :ANCHORS, 3
value :SCRIPT_ENFORCED_LEASE, 4
end end
add_enum "lnrpc.Initiator" do add_enum "lnrpc.Initiator" do
value :INITIATOR_UNKNOWN, 0 value :INITIATOR_UNKNOWN, 0
@ -1081,12 +1357,32 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :PAYMENT_ADDR_OPT, 15 value :PAYMENT_ADDR_OPT, 15
value :MPP_REQ, 16 value :MPP_REQ, 16
value :MPP_OPT, 17 value :MPP_OPT, 17
value :WUMBO_CHANNELS_REQ, 18
value :WUMBO_CHANNELS_OPT, 19
value :ANCHORS_REQ, 20
value :ANCHORS_OPT, 21
value :ANCHORS_ZERO_FEE_HTLC_REQ, 22
value :ANCHORS_ZERO_FEE_HTLC_OPT, 23
value :AMP_REQ, 30
value :AMP_OPT, 31
end
add_enum "lnrpc.UpdateFailure" do
value :UPDATE_FAILURE_UNKNOWN, 0
value :UPDATE_FAILURE_PENDING, 1
value :UPDATE_FAILURE_NOT_FOUND, 2
value :UPDATE_FAILURE_INTERNAL_ERR, 3
value :UPDATE_FAILURE_INVALID_PARAMETER, 4
end end
end end
end end
module Lnrpc module Lnrpc
SubscribeCustomMessagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SubscribeCustomMessagesRequest").msgclass
CustomMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CustomMessage").msgclass
SendCustomMessageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendCustomMessageRequest").msgclass
SendCustomMessageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendCustomMessageResponse").msgclass
Utxo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Utxo").msgclass Utxo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Utxo").msgclass
OutputDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OutputDetail").msgclass
Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Transaction").msgclass Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Transaction").msgclass
GetTransactionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetTransactionsRequest").msgclass GetTransactionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetTransactionsRequest").msgclass
TransactionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.TransactionDetails").msgclass TransactionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.TransactionDetails").msgclass
@ -1098,6 +1394,7 @@ module Lnrpc
ChannelAcceptResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelAcceptResponse").msgclass ChannelAcceptResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelAcceptResponse").msgclass
ChannelPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelPoint").msgclass ChannelPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelPoint").msgclass
OutPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OutPoint").msgclass OutPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OutPoint").msgclass
PreviousOutPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PreviousOutPoint").msgclass
LightningAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.LightningAddress").msgclass LightningAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.LightningAddress").msgclass
EstimateFeeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.EstimateFeeRequest").msgclass EstimateFeeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.EstimateFeeRequest").msgclass
EstimateFeeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.EstimateFeeResponse").msgclass EstimateFeeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.EstimateFeeResponse").msgclass
@ -1122,6 +1419,9 @@ module Lnrpc
Channel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Channel").msgclass Channel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Channel").msgclass
ListChannelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListChannelsRequest").msgclass ListChannelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListChannelsRequest").msgclass
ListChannelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListChannelsResponse").msgclass ListChannelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListChannelsResponse").msgclass
AliasMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AliasMap").msgclass
ListAliasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListAliasesRequest").msgclass
ListAliasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListAliasesResponse").msgclass
ChannelCloseSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelCloseSummary").msgclass ChannelCloseSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelCloseSummary").msgclass
ChannelCloseSummary::ClosureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelCloseSummary.ClosureType").enummodule ChannelCloseSummary::ClosureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelCloseSummary.ClosureType").enummodule
Resolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Resolution").msgclass Resolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Resolution").msgclass
@ -1147,6 +1447,9 @@ module Lnrpc
CloseStatusUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CloseStatusUpdate").msgclass CloseStatusUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CloseStatusUpdate").msgclass
PendingUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingUpdate").msgclass PendingUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingUpdate").msgclass
ReadyForPsbtFunding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ReadyForPsbtFunding").msgclass ReadyForPsbtFunding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ReadyForPsbtFunding").msgclass
BatchOpenChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BatchOpenChannelRequest").msgclass
BatchOpenChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BatchOpenChannel").msgclass
BatchOpenChannelResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BatchOpenChannelResponse").msgclass
OpenChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenChannelRequest").msgclass OpenChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenChannelRequest").msgclass
OpenStatusUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenStatusUpdate").msgclass OpenStatusUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenStatusUpdate").msgclass
KeyLocator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.KeyLocator").msgclass KeyLocator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.KeyLocator").msgclass
@ -1172,8 +1475,10 @@ module Lnrpc
ChannelEventSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventSubscription").msgclass ChannelEventSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventSubscription").msgclass
ChannelEventUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate").msgclass ChannelEventUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate").msgclass
ChannelEventUpdate::UpdateType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate.UpdateType").enummodule ChannelEventUpdate::UpdateType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate.UpdateType").enummodule
WalletAccountBalance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletAccountBalance").msgclass
WalletBalanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceRequest").msgclass WalletBalanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceRequest").msgclass
WalletBalanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceResponse").msgclass WalletBalanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceResponse").msgclass
Amount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Amount").msgclass
ChannelBalanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceRequest").msgclass ChannelBalanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceRequest").msgclass
ChannelBalanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceResponse").msgclass ChannelBalanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceResponse").msgclass
QueryRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesRequest").msgclass QueryRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesRequest").msgclass
@ -1182,6 +1487,7 @@ module Lnrpc
QueryRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesResponse").msgclass QueryRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesResponse").msgclass
Hop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Hop").msgclass Hop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Hop").msgclass
MPPRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MPPRecord").msgclass MPPRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MPPRecord").msgclass
AMPRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AMPRecord").msgclass
Route = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Route").msgclass Route = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Route").msgclass
NodeInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfoRequest").msgclass NodeInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfoRequest").msgclass
NodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfo").msgclass NodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfo").msgclass
@ -1205,10 +1511,13 @@ module Lnrpc
ChannelEdgeUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEdgeUpdate").msgclass ChannelEdgeUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEdgeUpdate").msgclass
ClosedChannelUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ClosedChannelUpdate").msgclass ClosedChannelUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ClosedChannelUpdate").msgclass
HopHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.HopHint").msgclass HopHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.HopHint").msgclass
SetID = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SetID").msgclass
RouteHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RouteHint").msgclass RouteHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RouteHint").msgclass
AMPInvoiceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AMPInvoiceState").msgclass
Invoice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice").msgclass Invoice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice").msgclass
Invoice::InvoiceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice.InvoiceState").enummodule Invoice::InvoiceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice.InvoiceState").enummodule
InvoiceHTLC = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLC").msgclass InvoiceHTLC = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLC").msgclass
AMP = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AMP").msgclass
AddInvoiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddInvoiceResponse").msgclass AddInvoiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddInvoiceResponse").msgclass
PaymentHash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentHash").msgclass PaymentHash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentHash").msgclass
ListInvoiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceRequest").msgclass ListInvoiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceRequest").msgclass
@ -1220,7 +1529,9 @@ module Lnrpc
HTLCAttempt::HTLCStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.HTLCAttempt.HTLCStatus").enummodule HTLCAttempt::HTLCStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.HTLCAttempt.HTLCStatus").enummodule
ListPaymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsRequest").msgclass ListPaymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsRequest").msgclass
ListPaymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsResponse").msgclass ListPaymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsResponse").msgclass
DeletePaymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeletePaymentRequest").msgclass
DeleteAllPaymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsRequest").msgclass DeleteAllPaymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsRequest").msgclass
DeletePaymentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeletePaymentResponse").msgclass
DeleteAllPaymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsResponse").msgclass DeleteAllPaymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsResponse").msgclass
AbandonChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AbandonChannelRequest").msgclass AbandonChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AbandonChannelRequest").msgclass
AbandonChannelResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AbandonChannelResponse").msgclass AbandonChannelResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AbandonChannelResponse").msgclass
@ -1233,6 +1544,7 @@ module Lnrpc
ChannelFeeReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelFeeReport").msgclass ChannelFeeReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelFeeReport").msgclass
FeeReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeeReportResponse").msgclass FeeReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeeReportResponse").msgclass
PolicyUpdateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PolicyUpdateRequest").msgclass PolicyUpdateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PolicyUpdateRequest").msgclass
FailedUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FailedUpdate").msgclass
PolicyUpdateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PolicyUpdateResponse").msgclass PolicyUpdateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PolicyUpdateResponse").msgclass
ForwardingHistoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ForwardingHistoryRequest").msgclass ForwardingHistoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ForwardingHistoryRequest").msgclass
ForwardingEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ForwardingEvent").msgclass ForwardingEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ForwardingEvent").msgclass
@ -1250,9 +1562,27 @@ module Lnrpc
MacaroonPermission = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MacaroonPermission").msgclass MacaroonPermission = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MacaroonPermission").msgclass
BakeMacaroonRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BakeMacaroonRequest").msgclass BakeMacaroonRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BakeMacaroonRequest").msgclass
BakeMacaroonResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BakeMacaroonResponse").msgclass BakeMacaroonResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BakeMacaroonResponse").msgclass
ListMacaroonIDsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListMacaroonIDsRequest").msgclass
ListMacaroonIDsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListMacaroonIDsResponse").msgclass
DeleteMacaroonIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteMacaroonIDRequest").msgclass
DeleteMacaroonIDResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteMacaroonIDResponse").msgclass
MacaroonPermissionList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MacaroonPermissionList").msgclass
ListPermissionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPermissionsRequest").msgclass
ListPermissionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPermissionsResponse").msgclass
Failure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Failure").msgclass Failure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Failure").msgclass
Failure::FailureCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Failure.FailureCode").enummodule Failure::FailureCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Failure.FailureCode").enummodule
ChannelUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelUpdate").msgclass ChannelUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelUpdate").msgclass
MacaroonId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MacaroonId").msgclass
Op = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Op").msgclass
CheckMacPermRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CheckMacPermRequest").msgclass
CheckMacPermResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CheckMacPermResponse").msgclass
RPCMiddlewareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RPCMiddlewareRequest").msgclass
StreamAuth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.StreamAuth").msgclass
RPCMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RPCMessage").msgclass
RPCMiddlewareResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RPCMiddlewareResponse").msgclass
MiddlewareRegistration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MiddlewareRegistration").msgclass
InterceptFeedback = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InterceptFeedback").msgclass
OutputScriptType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OutputScriptType").enummodule
AddressType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddressType").enummodule AddressType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddressType").enummodule
CommitmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CommitmentType").enummodule CommitmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CommitmentType").enummodule
Initiator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Initiator").enummodule Initiator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Initiator").enummodule
@ -1262,4 +1592,5 @@ module Lnrpc
InvoiceHTLCState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLCState").enummodule InvoiceHTLCState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLCState").enummodule
PaymentFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentFailureReason").enummodule PaymentFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentFailureReason").enummodule
FeatureBit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeatureBit").enummodule FeatureBit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeatureBit").enummodule
UpdateFailure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UpdateFailure").enummodule
end end

View File

@ -1,8 +1,8 @@
# Generated by the protocol buffer compiler. DO NOT EDIT! # Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: rpc.proto for package 'lnrpc' # Source: lightning.proto for package 'lnrpc'
require 'grpc' require 'grpc'
require 'rpc_pb' require 'lightning_pb'
module Lnrpc module Lnrpc
module Lightning module Lightning
@ -26,7 +26,7 @@ module Lnrpc
# Lightning is the main RPC server of the daemon. # Lightning is the main RPC server of the daemon.
class Service class Service
include GRPC::GenericService include ::GRPC::GenericService
self.marshal_class_method = :encode self.marshal_class_method = :encode
self.unmarshal_class_method = :decode self.unmarshal_class_method = :decode
@ -36,15 +36,16 @@ module Lnrpc
# WalletBalance returns total unspent outputs(confirmed and unconfirmed), all # WalletBalance returns total unspent outputs(confirmed and unconfirmed), all
# confirmed unspent outputs and all unconfirmed unspent outputs under control # confirmed unspent outputs and all unconfirmed unspent outputs under control
# of the wallet. # of the wallet.
rpc :WalletBalance, WalletBalanceRequest, WalletBalanceResponse rpc :WalletBalance, ::Lnrpc::WalletBalanceRequest, ::Lnrpc::WalletBalanceResponse
# lncli: `channelbalance` # lncli: `channelbalance`
# ChannelBalance returns the total funds available across all open channels # ChannelBalance returns a report on the total funds across all open channels,
# in satoshis. # categorized in local/remote, pending local/remote and unsettled local/remote
rpc :ChannelBalance, ChannelBalanceRequest, ChannelBalanceResponse # balances.
rpc :ChannelBalance, ::Lnrpc::ChannelBalanceRequest, ::Lnrpc::ChannelBalanceResponse
# lncli: `listchaintxns` # lncli: `listchaintxns`
# GetTransactions returns a list describing all the known transactions # GetTransactions returns a list describing all the known transactions
# relevant to the wallet. # relevant to the wallet.
rpc :GetTransactions, GetTransactionsRequest, TransactionDetails rpc :GetTransactions, ::Lnrpc::GetTransactionsRequest, ::Lnrpc::TransactionDetails
# lncli: `estimatefee` # lncli: `estimatefee`
# EstimateFee asks the chain backend to estimate the fee rate and total fees # EstimateFee asks the chain backend to estimate the fee rate and total fees
# for a transaction that pays to multiple specified outputs. # for a transaction that pays to multiple specified outputs.
@ -53,73 +54,73 @@ module Lnrpc
# `&AddrToAmount[<address>]=<amount_to_send>` to the URL. Unfortunately this # `&AddrToAmount[<address>]=<amount_to_send>` to the URL. Unfortunately this
# map type doesn't appear in the REST API documentation because of a bug in # map type doesn't appear in the REST API documentation because of a bug in
# the grpc-gateway library. # the grpc-gateway library.
rpc :EstimateFee, EstimateFeeRequest, EstimateFeeResponse rpc :EstimateFee, ::Lnrpc::EstimateFeeRequest, ::Lnrpc::EstimateFeeResponse
# lncli: `sendcoins` # lncli: `sendcoins`
# SendCoins executes a request to send coins to a particular address. Unlike # SendCoins executes a request to send coins to a particular address. Unlike
# SendMany, this RPC call only allows creating a single output at a time. If # SendMany, this RPC call only allows creating a single output at a time. If
# neither target_conf, or sat_per_byte are set, then the internal wallet will # neither target_conf, or sat_per_vbyte are set, then the internal wallet will
# consult its fee model to determine a fee for the default confirmation # consult its fee model to determine a fee for the default confirmation
# target. # target.
rpc :SendCoins, SendCoinsRequest, SendCoinsResponse rpc :SendCoins, ::Lnrpc::SendCoinsRequest, ::Lnrpc::SendCoinsResponse
# lncli: `listunspent` # lncli: `listunspent`
# Deprecated, use walletrpc.ListUnspent instead. # Deprecated, use walletrpc.ListUnspent instead.
# #
# ListUnspent returns a list of all utxos spendable by the wallet with a # ListUnspent returns a list of all utxos spendable by the wallet with a
# number of confirmations between the specified minimum and maximum. # number of confirmations between the specified minimum and maximum.
rpc :ListUnspent, ListUnspentRequest, ListUnspentResponse rpc :ListUnspent, ::Lnrpc::ListUnspentRequest, ::Lnrpc::ListUnspentResponse
# #
# SubscribeTransactions creates a uni-directional stream from the server to # SubscribeTransactions creates a uni-directional stream from the server to
# the client in which any newly discovered transactions relevant to the # the client in which any newly discovered transactions relevant to the
# wallet are sent over. # wallet are sent over.
rpc :SubscribeTransactions, GetTransactionsRequest, stream(Transaction) rpc :SubscribeTransactions, ::Lnrpc::GetTransactionsRequest, stream(::Lnrpc::Transaction)
# lncli: `sendmany` # lncli: `sendmany`
# SendMany handles a request for a transaction that creates multiple specified # SendMany handles a request for a transaction that creates multiple specified
# outputs in parallel. If neither target_conf, or sat_per_byte are set, then # outputs in parallel. If neither target_conf, or sat_per_vbyte are set, then
# the internal wallet will consult its fee model to determine a fee for the # the internal wallet will consult its fee model to determine a fee for the
# default confirmation target. # default confirmation target.
rpc :SendMany, SendManyRequest, SendManyResponse rpc :SendMany, ::Lnrpc::SendManyRequest, ::Lnrpc::SendManyResponse
# lncli: `newaddress` # lncli: `newaddress`
# NewAddress creates a new address under control of the local wallet. # NewAddress creates a new address under control of the local wallet.
rpc :NewAddress, NewAddressRequest, NewAddressResponse rpc :NewAddress, ::Lnrpc::NewAddressRequest, ::Lnrpc::NewAddressResponse
# lncli: `signmessage` # lncli: `signmessage`
# SignMessage signs a message with this node's private key. The returned # SignMessage signs a message with this node's private key. The returned
# signature string is `zbase32` encoded and pubkey recoverable, meaning that # signature string is `zbase32` encoded and pubkey recoverable, meaning that
# only the message digest and signature are needed for verification. # only the message digest and signature are needed for verification.
rpc :SignMessage, SignMessageRequest, SignMessageResponse rpc :SignMessage, ::Lnrpc::SignMessageRequest, ::Lnrpc::SignMessageResponse
# lncli: `verifymessage` # lncli: `verifymessage`
# VerifyMessage verifies a signature over a msg. The signature must be # VerifyMessage verifies a signature over a msg. The signature must be
# zbase32 encoded and signed by an active node in the resident node's # zbase32 encoded and signed by an active node in the resident node's
# channel database. In addition to returning the validity of the signature, # channel database. In addition to returning the validity of the signature,
# VerifyMessage also returns the recovered pubkey from the signature. # VerifyMessage also returns the recovered pubkey from the signature.
rpc :VerifyMessage, VerifyMessageRequest, VerifyMessageResponse rpc :VerifyMessage, ::Lnrpc::VerifyMessageRequest, ::Lnrpc::VerifyMessageResponse
# lncli: `connect` # lncli: `connect`
# ConnectPeer attempts to establish a connection to a remote peer. This is at # ConnectPeer attempts to establish a connection to a remote peer. This is at
# the networking level, and is used for communication between nodes. This is # the networking level, and is used for communication between nodes. This is
# distinct from establishing a channel with a peer. # distinct from establishing a channel with a peer.
rpc :ConnectPeer, ConnectPeerRequest, ConnectPeerResponse rpc :ConnectPeer, ::Lnrpc::ConnectPeerRequest, ::Lnrpc::ConnectPeerResponse
# lncli: `disconnect` # lncli: `disconnect`
# DisconnectPeer attempts to disconnect one peer from another identified by a # DisconnectPeer attempts to disconnect one peer from another identified by a
# given pubKey. In the case that we currently have a pending or active channel # given pubKey. In the case that we currently have a pending or active channel
# with the target peer, then this action will be not be allowed. # with the target peer, then this action will be not be allowed.
rpc :DisconnectPeer, DisconnectPeerRequest, DisconnectPeerResponse rpc :DisconnectPeer, ::Lnrpc::DisconnectPeerRequest, ::Lnrpc::DisconnectPeerResponse
# lncli: `listpeers` # lncli: `listpeers`
# ListPeers returns a verbose listing of all currently active peers. # ListPeers returns a verbose listing of all currently active peers.
rpc :ListPeers, ListPeersRequest, ListPeersResponse rpc :ListPeers, ::Lnrpc::ListPeersRequest, ::Lnrpc::ListPeersResponse
# #
# SubscribePeerEvents creates a uni-directional stream from the server to # SubscribePeerEvents creates a uni-directional stream from the server to
# the client in which any events relevant to the state of peers are sent # the client in which any events relevant to the state of peers are sent
# over. Events include peers going online and offline. # over. Events include peers going online and offline.
rpc :SubscribePeerEvents, PeerEventSubscription, stream(PeerEvent) rpc :SubscribePeerEvents, ::Lnrpc::PeerEventSubscription, stream(::Lnrpc::PeerEvent)
# lncli: `getinfo` # lncli: `getinfo`
# GetInfo returns general information concerning the lightning node including # GetInfo returns general information concerning the lightning node including
# it's identity pubkey, alias, the chains it is connected to, and information # it's identity pubkey, alias, the chains it is connected to, and information
# concerning the number of open+pending channels. # concerning the number of open+pending channels.
rpc :GetInfo, GetInfoRequest, GetInfoResponse rpc :GetInfo, ::Lnrpc::GetInfoRequest, ::Lnrpc::GetInfoResponse
# * lncli: `getrecoveryinfo` # * lncli: `getrecoveryinfo`
# GetRecoveryInfo returns information concerning the recovery mode including # GetRecoveryInfo returns information concerning the recovery mode including
# whether it's in a recovery mode, whether the recovery is finished, and the # whether it's in a recovery mode, whether the recovery is finished, and the
# progress made so far. # progress made so far.
rpc :GetRecoveryInfo, GetRecoveryInfoRequest, GetRecoveryInfoResponse rpc :GetRecoveryInfo, ::Lnrpc::GetRecoveryInfoRequest, ::Lnrpc::GetRecoveryInfoResponse
# TODO(roasbeef): merge with below with bool? # TODO(roasbeef): merge with below with bool?
# #
# lncli: `pendingchannels` # lncli: `pendingchannels`
@ -127,27 +128,27 @@ module Lnrpc
# considered "pending". A channel is pending if it has finished the funding # considered "pending". A channel is pending if it has finished the funding
# workflow and is waiting for confirmations for the funding txn, or is in the # workflow and is waiting for confirmations for the funding txn, or is in the
# process of closure, either initiated cooperatively or non-cooperatively. # process of closure, either initiated cooperatively or non-cooperatively.
rpc :PendingChannels, PendingChannelsRequest, PendingChannelsResponse rpc :PendingChannels, ::Lnrpc::PendingChannelsRequest, ::Lnrpc::PendingChannelsResponse
# lncli: `listchannels` # lncli: `listchannels`
# ListChannels returns a description of all the open channels that this node # ListChannels returns a description of all the open channels that this node
# is a participant in. # is a participant in.
rpc :ListChannels, ListChannelsRequest, ListChannelsResponse rpc :ListChannels, ::Lnrpc::ListChannelsRequest, ::Lnrpc::ListChannelsResponse
# #
# SubscribeChannelEvents creates a uni-directional stream from the server to # SubscribeChannelEvents creates a uni-directional stream from the server to
# the client in which any updates relevant to the state of the channels are # the client in which any updates relevant to the state of the channels are
# sent over. Events include new active channels, inactive channels, and closed # sent over. Events include new active channels, inactive channels, and closed
# channels. # channels.
rpc :SubscribeChannelEvents, ChannelEventSubscription, stream(ChannelEventUpdate) rpc :SubscribeChannelEvents, ::Lnrpc::ChannelEventSubscription, stream(::Lnrpc::ChannelEventUpdate)
# lncli: `closedchannels` # lncli: `closedchannels`
# ClosedChannels returns a description of all the closed channels that # ClosedChannels returns a description of all the closed channels that
# this node was a participant in. # this node was a participant in.
rpc :ClosedChannels, ClosedChannelsRequest, ClosedChannelsResponse rpc :ClosedChannels, ::Lnrpc::ClosedChannelsRequest, ::Lnrpc::ClosedChannelsResponse
# #
# OpenChannelSync is a synchronous version of the OpenChannel RPC call. This # OpenChannelSync is a synchronous version of the OpenChannel RPC call. This
# call is meant to be consumed by clients to the REST proxy. As with all # call is meant to be consumed by clients to the REST proxy. As with all
# other sync calls, all byte slices are intended to be populated as hex # other sync calls, all byte slices are intended to be populated as hex
# encoded strings. # encoded strings.
rpc :OpenChannelSync, OpenChannelRequest, ChannelPoint rpc :OpenChannelSync, ::Lnrpc::OpenChannelRequest, ::Lnrpc::ChannelPoint
# lncli: `openchannel` # lncli: `openchannel`
# OpenChannel attempts to open a singly funded channel specified in the # OpenChannel attempts to open a singly funded channel specified in the
# request to a remote peer. Users are able to specify a target number of # request to a remote peer. Users are able to specify a target number of
@ -157,7 +158,14 @@ module Lnrpc
# the pending channel ID of the in-progress channel. Depending on the # the pending channel ID of the in-progress channel. Depending on the
# arguments specified in the OpenChannelRequest, this pending channel ID can # arguments specified in the OpenChannelRequest, this pending channel ID can
# then be used to manually progress the channel funding flow. # then be used to manually progress the channel funding flow.
rpc :OpenChannel, OpenChannelRequest, stream(OpenStatusUpdate) rpc :OpenChannel, ::Lnrpc::OpenChannelRequest, stream(::Lnrpc::OpenStatusUpdate)
# lncli: `batchopenchannel`
# BatchOpenChannel attempts to open multiple single-funded channels in a
# single transaction in an atomic way. This means either all channel open
# requests succeed at once or all attempts are aborted if any of them fail.
# This is the safer variant of using PSBTs to manually fund a batch of
# channels through the OpenChannel RPC.
rpc :BatchOpenChannel, ::Lnrpc::BatchOpenChannelRequest, ::Lnrpc::BatchOpenChannelResponse
# #
# FundingStateStep is an advanced funding related call that allows the caller # FundingStateStep is an advanced funding related call that allows the caller
# to either execute some preparatory steps for a funding workflow, or # to either execute some preparatory steps for a funding workflow, or
@ -167,14 +175,14 @@ module Lnrpc
# pending channel ID, for which we need to use specific parameters. # pending channel ID, for which we need to use specific parameters.
# Alternatively, this can be used to interactively drive PSBT signing for # Alternatively, this can be used to interactively drive PSBT signing for
# funding for partially complete funding transactions. # funding for partially complete funding transactions.
rpc :FundingStateStep, FundingTransitionMsg, FundingStateStepResp rpc :FundingStateStep, ::Lnrpc::FundingTransitionMsg, ::Lnrpc::FundingStateStepResp
# #
# ChannelAcceptor dispatches a bi-directional streaming RPC in which # ChannelAcceptor dispatches a bi-directional streaming RPC in which
# OpenChannel requests are sent to the client and the client responds with # OpenChannel requests are sent to the client and the client responds with
# a boolean that tells LND whether or not to accept the channel. This allows # a boolean that tells LND whether or not to accept the channel. This allows
# node operators to specify their own criteria for accepting inbound channels # node operators to specify their own criteria for accepting inbound channels
# through a single persistent connection. # through a single persistent connection.
rpc :ChannelAcceptor, stream(ChannelAcceptResponse), stream(ChannelAcceptRequest) rpc :ChannelAcceptor, stream(::Lnrpc::ChannelAcceptResponse), stream(::Lnrpc::ChannelAcceptRequest)
# lncli: `closechannel` # lncli: `closechannel`
# CloseChannel attempts to close an active channel identified by its channel # CloseChannel attempts to close an active channel identified by its channel
# outpoint (ChannelPoint). The actions of this method can additionally be # outpoint (ChannelPoint). The actions of this method can additionally be
@ -183,42 +191,44 @@ module Lnrpc
# then the user can specify either a target number of blocks until the # then the user can specify either a target number of blocks until the
# closure transaction is confirmed, or a manual fee rate. If neither are # closure transaction is confirmed, or a manual fee rate. If neither are
# specified, then a default lax, block confirmation target is used. # specified, then a default lax, block confirmation target is used.
rpc :CloseChannel, CloseChannelRequest, stream(CloseStatusUpdate) rpc :CloseChannel, ::Lnrpc::CloseChannelRequest, stream(::Lnrpc::CloseStatusUpdate)
# lncli: `abandonchannel` # lncli: `abandonchannel`
# AbandonChannel removes all channel state from the database except for a # AbandonChannel removes all channel state from the database except for a
# close summary. This method can be used to get rid of permanently unusable # close summary. This method can be used to get rid of permanently unusable
# channels due to bugs fixed in newer versions of lnd. Only available # channels due to bugs fixed in newer versions of lnd. This method can also be
# when in debug builds of lnd. # used to remove externally funded channels where the funding transaction was
rpc :AbandonChannel, AbandonChannelRequest, AbandonChannelResponse # never broadcast. Only available for non-externally funded channels in dev
# build.
rpc :AbandonChannel, ::Lnrpc::AbandonChannelRequest, ::Lnrpc::AbandonChannelResponse
# lncli: `sendpayment` # lncli: `sendpayment`
# Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a # Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a
# bi-directional streaming RPC for sending payments through the Lightning # bi-directional streaming RPC for sending payments through the Lightning
# Network. A single RPC invocation creates a persistent bi-directional # Network. A single RPC invocation creates a persistent bi-directional
# stream allowing clients to rapidly send payments through the Lightning # stream allowing clients to rapidly send payments through the Lightning
# Network with a single persistent connection. # Network with a single persistent connection.
rpc :SendPayment, stream(SendRequest), stream(SendResponse) rpc :SendPayment, stream(::Lnrpc::SendRequest), stream(::Lnrpc::SendResponse)
# #
# SendPaymentSync is the synchronous non-streaming version of SendPayment. # SendPaymentSync is the synchronous non-streaming version of SendPayment.
# This RPC is intended to be consumed by clients of the REST proxy. # This RPC is intended to be consumed by clients of the REST proxy.
# Additionally, this RPC expects the destination's public key and the payment # Additionally, this RPC expects the destination's public key and the payment
# hash (if any) to be encoded as hex strings. # hash (if any) to be encoded as hex strings.
rpc :SendPaymentSync, SendRequest, SendResponse rpc :SendPaymentSync, ::Lnrpc::SendRequest, ::Lnrpc::SendResponse
# lncli: `sendtoroute` # lncli: `sendtoroute`
# Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional # Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional
# streaming RPC for sending payment through the Lightning Network. This # streaming RPC for sending payment through the Lightning Network. This
# method differs from SendPayment in that it allows users to specify a full # method differs from SendPayment in that it allows users to specify a full
# route manually. This can be used for things like rebalancing, and atomic # route manually. This can be used for things like rebalancing, and atomic
# swaps. # swaps.
rpc :SendToRoute, stream(SendToRouteRequest), stream(SendResponse) rpc :SendToRoute, stream(::Lnrpc::SendToRouteRequest), stream(::Lnrpc::SendResponse)
# #
# SendToRouteSync is a synchronous version of SendToRoute. It Will block # SendToRouteSync is a synchronous version of SendToRoute. It Will block
# until the payment either fails or succeeds. # until the payment either fails or succeeds.
rpc :SendToRouteSync, SendToRouteRequest, SendResponse rpc :SendToRouteSync, ::Lnrpc::SendToRouteRequest, ::Lnrpc::SendResponse
# lncli: `addinvoice` # lncli: `addinvoice`
# AddInvoice attempts to add a new invoice to the invoice database. Any # AddInvoice attempts to add a new invoice to the invoice database. Any
# duplicated invoices are rejected, therefore all invoices *must* have a # duplicated invoices are rejected, therefore all invoices *must* have a
# unique payment preimage. # unique payment preimage.
rpc :AddInvoice, Invoice, AddInvoiceResponse rpc :AddInvoice, ::Lnrpc::Invoice, ::Lnrpc::AddInvoiceResponse
# lncli: `listinvoices` # lncli: `listinvoices`
# ListInvoices returns a list of all the invoices currently stored within the # ListInvoices returns a list of all the invoices currently stored within the
# database. Any active debug invoices are ignored. It has full support for # database. Any active debug invoices are ignored. It has full support for
@ -227,12 +237,12 @@ module Lnrpc
# last_index_offset fields included in the response as the index_offset of the # last_index_offset fields included in the response as the index_offset of the
# next request. By default, the first 100 invoices created will be returned. # next request. By default, the first 100 invoices created will be returned.
# Backwards pagination is also supported through the Reversed flag. # Backwards pagination is also supported through the Reversed flag.
rpc :ListInvoices, ListInvoiceRequest, ListInvoiceResponse rpc :ListInvoices, ::Lnrpc::ListInvoiceRequest, ::Lnrpc::ListInvoiceResponse
# lncli: `lookupinvoice` # lncli: `lookupinvoice`
# LookupInvoice attempts to look up an invoice according to its payment hash. # LookupInvoice attempts to look up an invoice according to its payment hash.
# The passed payment hash *must* be exactly 32 bytes, if not, an error is # The passed payment hash *must* be exactly 32 bytes, if not, an error is
# returned. # returned.
rpc :LookupInvoice, PaymentHash, Invoice rpc :LookupInvoice, ::Lnrpc::PaymentHash, ::Lnrpc::Invoice
# #
# SubscribeInvoices returns a uni-directional stream (server -> client) for # SubscribeInvoices returns a uni-directional stream (server -> client) for
# notifying the client of newly added/settled invoices. The caller can # notifying the client of newly added/settled invoices. The caller can
@ -243,18 +253,23 @@ module Lnrpc
# invoices with a settle_index greater than the specified value. One or both # invoices with a settle_index greater than the specified value. One or both
# of these fields can be set. If no fields are set, then we'll only send out # of these fields can be set. If no fields are set, then we'll only send out
# the latest add/settle events. # the latest add/settle events.
rpc :SubscribeInvoices, InvoiceSubscription, stream(Invoice) rpc :SubscribeInvoices, ::Lnrpc::InvoiceSubscription, stream(::Lnrpc::Invoice)
# lncli: `decodepayreq` # lncli: `decodepayreq`
# DecodePayReq takes an encoded payment request string and attempts to decode # DecodePayReq takes an encoded payment request string and attempts to decode
# it, returning a full description of the conditions encoded within the # it, returning a full description of the conditions encoded within the
# payment request. # payment request.
rpc :DecodePayReq, PayReqString, PayReq rpc :DecodePayReq, ::Lnrpc::PayReqString, ::Lnrpc::PayReq
# lncli: `listpayments` # lncli: `listpayments`
# ListPayments returns a list of all outgoing payments. # ListPayments returns a list of all outgoing payments.
rpc :ListPayments, ListPaymentsRequest, ListPaymentsResponse rpc :ListPayments, ::Lnrpc::ListPaymentsRequest, ::Lnrpc::ListPaymentsResponse
# #
# DeleteAllPayments deletes all outgoing payments from DB. # DeletePayment deletes an outgoing payment from DB. Note that it will not
rpc :DeleteAllPayments, DeleteAllPaymentsRequest, DeleteAllPaymentsResponse # attempt to delete an In-Flight payment, since that would be unsafe.
rpc :DeletePayment, ::Lnrpc::DeletePaymentRequest, ::Lnrpc::DeletePaymentResponse
#
# DeleteAllPayments deletes all outgoing payments from DB. Note that it will
# not attempt to delete In-Flight payments, since that would be unsafe.
rpc :DeleteAllPayments, ::Lnrpc::DeleteAllPaymentsRequest, ::Lnrpc::DeleteAllPaymentsResponse
# lncli: `describegraph` # lncli: `describegraph`
# DescribeGraph returns a description of the latest graph state from the # DescribeGraph returns a description of the latest graph state from the
# point of view of the node. The graph information is partitioned into two # point of view of the node. The graph information is partitioned into two
@ -262,21 +277,21 @@ module Lnrpc
# vertexes themselves. As this is a directed graph, the edges also contain # vertexes themselves. As this is a directed graph, the edges also contain
# the node directional specific routing policy which includes: the time lock # the node directional specific routing policy which includes: the time lock
# delta, fee information, etc. # delta, fee information, etc.
rpc :DescribeGraph, ChannelGraphRequest, ChannelGraph rpc :DescribeGraph, ::Lnrpc::ChannelGraphRequest, ::Lnrpc::ChannelGraph
# lncli: `getnodemetrics` # lncli: `getnodemetrics`
# GetNodeMetrics returns node metrics calculated from the graph. Currently # GetNodeMetrics returns node metrics calculated from the graph. Currently
# the only supported metric is betweenness centrality of individual nodes. # the only supported metric is betweenness centrality of individual nodes.
rpc :GetNodeMetrics, NodeMetricsRequest, NodeMetricsResponse rpc :GetNodeMetrics, ::Lnrpc::NodeMetricsRequest, ::Lnrpc::NodeMetricsResponse
# lncli: `getchaninfo` # lncli: `getchaninfo`
# GetChanInfo returns the latest authenticated network announcement for the # GetChanInfo returns the latest authenticated network announcement for the
# given channel identified by its channel ID: an 8-byte integer which # given channel identified by its channel ID: an 8-byte integer which
# uniquely identifies the location of transaction's funding output within the # uniquely identifies the location of transaction's funding output within the
# blockchain. # blockchain.
rpc :GetChanInfo, ChanInfoRequest, ChannelEdge rpc :GetChanInfo, ::Lnrpc::ChanInfoRequest, ::Lnrpc::ChannelEdge
# lncli: `getnodeinfo` # lncli: `getnodeinfo`
# GetNodeInfo returns the latest advertised, aggregated, and authenticated # GetNodeInfo returns the latest advertised, aggregated, and authenticated
# channel information for the specified node identified by its public key. # channel information for the specified node identified by its public key.
rpc :GetNodeInfo, NodeInfoRequest, NodeInfo rpc :GetNodeInfo, ::Lnrpc::NodeInfoRequest, ::Lnrpc::NodeInfo
# lncli: `queryroutes` # lncli: `queryroutes`
# QueryRoutes attempts to query the daemon's Channel Router for a possible # QueryRoutes attempts to query the daemon's Channel Router for a possible
# route to a target destination capable of carrying a specific amount of # route to a target destination capable of carrying a specific amount of
@ -288,15 +303,15 @@ module Lnrpc
# `&dest_custom_records[<record_number>]=<record_data_base64_url_encoded>` # `&dest_custom_records[<record_number>]=<record_data_base64_url_encoded>`
# to the URL. Unfortunately this map type doesn't appear in the REST API # to the URL. Unfortunately this map type doesn't appear in the REST API
# documentation because of a bug in the grpc-gateway library. # documentation because of a bug in the grpc-gateway library.
rpc :QueryRoutes, QueryRoutesRequest, QueryRoutesResponse rpc :QueryRoutes, ::Lnrpc::QueryRoutesRequest, ::Lnrpc::QueryRoutesResponse
# lncli: `getnetworkinfo` # lncli: `getnetworkinfo`
# GetNetworkInfo returns some basic stats about the known channel graph from # GetNetworkInfo returns some basic stats about the known channel graph from
# the point of view of the node. # the point of view of the node.
rpc :GetNetworkInfo, NetworkInfoRequest, NetworkInfo rpc :GetNetworkInfo, ::Lnrpc::NetworkInfoRequest, ::Lnrpc::NetworkInfo
# lncli: `stop` # lncli: `stop`
# StopDaemon will send a shutdown request to the interrupt handler, triggering # StopDaemon will send a shutdown request to the interrupt handler, triggering
# a graceful shutdown of the daemon. # a graceful shutdown of the daemon.
rpc :StopDaemon, StopRequest, StopResponse rpc :StopDaemon, ::Lnrpc::StopRequest, ::Lnrpc::StopResponse
# #
# SubscribeChannelGraph launches a streaming RPC that allows the caller to # SubscribeChannelGraph launches a streaming RPC that allows the caller to
# receive notifications upon any changes to the channel graph topology from # receive notifications upon any changes to the channel graph topology from
@ -304,33 +319,34 @@ module Lnrpc
# nodes coming online, nodes updating their authenticated attributes, new # nodes coming online, nodes updating their authenticated attributes, new
# channels being advertised, updates in the routing policy for a directional # channels being advertised, updates in the routing policy for a directional
# channel edge, and when channels are closed on-chain. # channel edge, and when channels are closed on-chain.
rpc :SubscribeChannelGraph, GraphTopologySubscription, stream(GraphTopologyUpdate) rpc :SubscribeChannelGraph, ::Lnrpc::GraphTopologySubscription, stream(::Lnrpc::GraphTopologyUpdate)
# lncli: `debuglevel` # lncli: `debuglevel`
# DebugLevel allows a caller to programmatically set the logging verbosity of # DebugLevel allows a caller to programmatically set the logging verbosity of
# lnd. The logging can be targeted according to a coarse daemon-wide logging # lnd. The logging can be targeted according to a coarse daemon-wide logging
# level, or in a granular fashion to specify the logging for a target # level, or in a granular fashion to specify the logging for a target
# sub-system. # sub-system.
rpc :DebugLevel, DebugLevelRequest, DebugLevelResponse rpc :DebugLevel, ::Lnrpc::DebugLevelRequest, ::Lnrpc::DebugLevelResponse
# lncli: `feereport` # lncli: `feereport`
# FeeReport allows the caller to obtain a report detailing the current fee # FeeReport allows the caller to obtain a report detailing the current fee
# schedule enforced by the node globally for each channel. # schedule enforced by the node globally for each channel.
rpc :FeeReport, FeeReportRequest, FeeReportResponse rpc :FeeReport, ::Lnrpc::FeeReportRequest, ::Lnrpc::FeeReportResponse
# lncli: `updatechanpolicy` # lncli: `updatechanpolicy`
# UpdateChannelPolicy allows the caller to update the fee schedule and # UpdateChannelPolicy allows the caller to update the fee schedule and
# channel policies for all channels globally, or a particular channel. # channel policies for all channels globally, or a particular channel.
rpc :UpdateChannelPolicy, PolicyUpdateRequest, PolicyUpdateResponse rpc :UpdateChannelPolicy, ::Lnrpc::PolicyUpdateRequest, ::Lnrpc::PolicyUpdateResponse
# lncli: `fwdinghistory` # lncli: `fwdinghistory`
# ForwardingHistory allows the caller to query the htlcswitch for a record of # ForwardingHistory allows the caller to query the htlcswitch for a record of
# all HTLCs forwarded within the target time range, and integer offset # all HTLCs forwarded within the target time range, and integer offset
# within that time range. If no time-range is specified, then the first chunk # within that time range, for a maximum number of events. If no maximum number
# of the past 24 hrs of forwarding history are returned. # of events is specified, up to 100 events will be returned. If no time-range
# is specified, then events will be returned in the order that they occured.
# #
# A list of forwarding events are returned. The size of each forwarding event # A list of forwarding events are returned. The size of each forwarding event
# is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB. # is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB.
# As a result each message can only contain 50k entries. Each response has # As a result each message can only contain 50k entries. Each response has
# the index offset of the last entry. The index offset can be provided to the # the index offset of the last entry. The index offset can be provided to the
# request to allow the caller to skip a series of records. # request to allow the caller to skip a series of records.
rpc :ForwardingHistory, ForwardingHistoryRequest, ForwardingHistoryResponse rpc :ForwardingHistory, ::Lnrpc::ForwardingHistoryRequest, ::Lnrpc::ForwardingHistoryResponse
# lncli: `exportchanbackup` # lncli: `exportchanbackup`
# ExportChannelBackup attempts to return an encrypted static channel backup # ExportChannelBackup attempts to return an encrypted static channel backup
# for the target channel identified by it channel point. The backup is # for the target channel identified by it channel point. The backup is
@ -338,25 +354,25 @@ module Lnrpc
# returned backup can either be restored using the RestoreChannelBackup # returned backup can either be restored using the RestoreChannelBackup
# method once lnd is running, or via the InitWallet and UnlockWallet methods # method once lnd is running, or via the InitWallet and UnlockWallet methods
# from the WalletUnlocker service. # from the WalletUnlocker service.
rpc :ExportChannelBackup, ExportChannelBackupRequest, ChannelBackup rpc :ExportChannelBackup, ::Lnrpc::ExportChannelBackupRequest, ::Lnrpc::ChannelBackup
# #
# ExportAllChannelBackups returns static channel backups for all existing # ExportAllChannelBackups returns static channel backups for all existing
# channels known to lnd. A set of regular singular static channel backups for # channels known to lnd. A set of regular singular static channel backups for
# each channel are returned. Additionally, a multi-channel backup is returned # each channel are returned. Additionally, a multi-channel backup is returned
# as well, which contains a single encrypted blob containing the backups of # as well, which contains a single encrypted blob containing the backups of
# each channel. # each channel.
rpc :ExportAllChannelBackups, ChanBackupExportRequest, ChanBackupSnapshot rpc :ExportAllChannelBackups, ::Lnrpc::ChanBackupExportRequest, ::Lnrpc::ChanBackupSnapshot
# #
# VerifyChanBackup allows a caller to verify the integrity of a channel backup # VerifyChanBackup allows a caller to verify the integrity of a channel backup
# snapshot. This method will accept either a packed Single or a packed Multi. # snapshot. This method will accept either a packed Single or a packed Multi.
# Specifying both will result in an error. # Specifying both will result in an error.
rpc :VerifyChanBackup, ChanBackupSnapshot, VerifyChanBackupResponse rpc :VerifyChanBackup, ::Lnrpc::ChanBackupSnapshot, ::Lnrpc::VerifyChanBackupResponse
# lncli: `restorechanbackup` # lncli: `restorechanbackup`
# RestoreChannelBackups accepts a set of singular channel backups, or a # RestoreChannelBackups accepts a set of singular channel backups, or a
# single encrypted multi-chan backup and attempts to recover any funds # single encrypted multi-chan backup and attempts to recover any funds
# remaining within the channel. If we are able to unpack the backup, then the # remaining within the channel. If we are able to unpack the backup, then the
# new channel will be shown under listchannels, as well as pending channels. # new channel will be shown under listchannels, as well as pending channels.
rpc :RestoreChannelBackups, RestoreChanBackupRequest, RestoreBackupResponse rpc :RestoreChannelBackups, ::Lnrpc::RestoreChanBackupRequest, ::Lnrpc::RestoreBackupResponse
# #
# SubscribeChannelBackups allows a client to sub-subscribe to the most up to # SubscribeChannelBackups allows a client to sub-subscribe to the most up to
# date information concerning the state of all channel backups. Each time a # date information concerning the state of all channel backups. Each time a
@ -365,12 +381,54 @@ module Lnrpc
# channel is closed, we send a new update, which contains new new chan back # channel is closed, we send a new update, which contains new new chan back
# ups, but the updated set of encrypted multi-chan backups with the closed # ups, but the updated set of encrypted multi-chan backups with the closed
# channel(s) removed. # channel(s) removed.
rpc :SubscribeChannelBackups, ChannelBackupSubscription, stream(ChanBackupSnapshot) rpc :SubscribeChannelBackups, ::Lnrpc::ChannelBackupSubscription, stream(::Lnrpc::ChanBackupSnapshot)
# lncli: `bakemacaroon` # lncli: `bakemacaroon`
# BakeMacaroon allows the creation of a new macaroon with custom read and # BakeMacaroon allows the creation of a new macaroon with custom read and
# write permissions. No first-party caveats are added since this can be done # write permissions. No first-party caveats are added since this can be done
# offline. # offline.
rpc :BakeMacaroon, BakeMacaroonRequest, BakeMacaroonResponse rpc :BakeMacaroon, ::Lnrpc::BakeMacaroonRequest, ::Lnrpc::BakeMacaroonResponse
# lncli: `listmacaroonids`
# ListMacaroonIDs returns all root key IDs that are in use.
rpc :ListMacaroonIDs, ::Lnrpc::ListMacaroonIDsRequest, ::Lnrpc::ListMacaroonIDsResponse
# lncli: `deletemacaroonid`
# DeleteMacaroonID deletes the specified macaroon ID and invalidates all
# macaroons derived from that ID.
rpc :DeleteMacaroonID, ::Lnrpc::DeleteMacaroonIDRequest, ::Lnrpc::DeleteMacaroonIDResponse
# lncli: `listpermissions`
# ListPermissions lists all RPC method URIs and their required macaroon
# permissions to access them.
rpc :ListPermissions, ::Lnrpc::ListPermissionsRequest, ::Lnrpc::ListPermissionsResponse
#
# CheckMacaroonPermissions checks whether a request follows the constraints
# imposed on the macaroon and that the macaroon is authorized to follow the
# provided permissions.
rpc :CheckMacaroonPermissions, ::Lnrpc::CheckMacPermRequest, ::Lnrpc::CheckMacPermResponse
#
# RegisterRPCMiddleware adds a new gRPC middleware to the interceptor chain. A
# gRPC middleware is software component external to lnd that aims to add
# additional business logic to lnd by observing/intercepting/validating
# incoming gRPC client requests and (if needed) replacing/overwriting outgoing
# messages before they're sent to the client. When registering the middleware
# must identify itself and indicate what custom macaroon caveats it wants to
# be responsible for. Only requests that contain a macaroon with that specific
# custom caveat are then sent to the middleware for inspection. The other
# option is to register for the read-only mode in which all requests/responses
# are forwarded for interception to the middleware but the middleware is not
# allowed to modify any responses. As a security measure, _no_ middleware can
# modify responses for requests made with _unencumbered_ macaroons!
rpc :RegisterRPCMiddleware, stream(::Lnrpc::RPCMiddlewareResponse), stream(::Lnrpc::RPCMiddlewareRequest)
# lncli: `sendcustom`
# SendCustomMessage sends a custom peer message.
rpc :SendCustomMessage, ::Lnrpc::SendCustomMessageRequest, ::Lnrpc::SendCustomMessageResponse
# lncli: `subscribecustom`
# SubscribeCustomMessages subscribes to a stream of incoming custom peer
# messages.
rpc :SubscribeCustomMessages, ::Lnrpc::SubscribeCustomMessagesRequest, stream(::Lnrpc::CustomMessage)
# lncli: `listaliases`
# ListAliases returns the set of all aliases that have ever existed with
# their confirmed SCID (if it exists) and/or the base SCID (in the case of
# zero conf).
rpc :ListAliases, ::Lnrpc::ListAliasesRequest, ::Lnrpc::ListAliasesResponse
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

View File

@ -4,6 +4,7 @@
require 'google/protobuf' require 'google/protobuf'
require 'verrpc/verrpc_pb' require 'verrpc/verrpc_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("lnclipb/lncli.proto", :syntax => :proto3) do add_file("lnclipb/lncli.proto", :syntax => :proto3) do
add_message "lnclipb.VersionResponse" do add_message "lnclipb.VersionResponse" do

View File

@ -0,0 +1,106 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: neutrinorpc/neutrino.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("neutrinorpc/neutrino.proto", :syntax => :proto3) do
add_message "neutrinorpc.StatusRequest" do
end
add_message "neutrinorpc.StatusResponse" do
optional :active, :bool, 1
optional :synced, :bool, 2
optional :block_height, :int32, 3
optional :block_hash, :string, 4
repeated :peers, :string, 5
end
add_message "neutrinorpc.AddPeerRequest" do
optional :peer_addrs, :string, 1
end
add_message "neutrinorpc.AddPeerResponse" do
end
add_message "neutrinorpc.DisconnectPeerRequest" do
optional :peer_addrs, :string, 1
end
add_message "neutrinorpc.DisconnectPeerResponse" do
end
add_message "neutrinorpc.IsBannedRequest" do
optional :peer_addrs, :string, 1
end
add_message "neutrinorpc.IsBannedResponse" do
optional :banned, :bool, 1
end
add_message "neutrinorpc.GetBlockHeaderRequest" do
optional :hash, :string, 1
end
add_message "neutrinorpc.GetBlockHeaderResponse" do
optional :hash, :string, 1
optional :confirmations, :int64, 2
optional :stripped_size, :int64, 3
optional :size, :int64, 4
optional :weight, :int64, 5
optional :height, :int32, 6
optional :version, :int32, 7
optional :version_hex, :string, 8
optional :merkleroot, :string, 9
optional :time, :int64, 10
optional :nonce, :uint32, 11
optional :bits, :string, 12
optional :ntx, :int32, 13
optional :previous_block_hash, :string, 14
optional :raw_hex, :bytes, 15
end
add_message "neutrinorpc.GetBlockRequest" do
optional :hash, :string, 1
end
add_message "neutrinorpc.GetBlockResponse" do
optional :hash, :string, 1
optional :confirmations, :int64, 2
optional :stripped_size, :int64, 3
optional :size, :int64, 4
optional :weight, :int64, 5
optional :height, :int32, 6
optional :version, :int32, 7
optional :version_hex, :string, 8
optional :merkleroot, :string, 9
repeated :tx, :string, 10
optional :time, :int64, 11
optional :nonce, :uint32, 12
optional :bits, :string, 13
optional :ntx, :int32, 14
optional :previous_block_hash, :string, 15
optional :raw_hex, :bytes, 16
end
add_message "neutrinorpc.GetCFilterRequest" do
optional :hash, :string, 1
end
add_message "neutrinorpc.GetCFilterResponse" do
optional :filter, :bytes, 1
end
add_message "neutrinorpc.GetBlockHashRequest" do
optional :height, :int32, 1
end
add_message "neutrinorpc.GetBlockHashResponse" do
optional :hash, :string, 1
end
end
end
module Neutrinorpc
StatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.StatusRequest").msgclass
StatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.StatusResponse").msgclass
AddPeerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.AddPeerRequest").msgclass
AddPeerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.AddPeerResponse").msgclass
DisconnectPeerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.DisconnectPeerRequest").msgclass
DisconnectPeerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.DisconnectPeerResponse").msgclass
IsBannedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.IsBannedRequest").msgclass
IsBannedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.IsBannedResponse").msgclass
GetBlockHeaderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockHeaderRequest").msgclass
GetBlockHeaderResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockHeaderResponse").msgclass
GetBlockRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockRequest").msgclass
GetBlockResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockResponse").msgclass
GetCFilterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetCFilterRequest").msgclass
GetCFilterResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetCFilterResponse").msgclass
GetBlockHashRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockHashRequest").msgclass
GetBlockHashResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("neutrinorpc.GetBlockHashResponse").msgclass
end

View File

@ -0,0 +1,51 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: neutrinorpc/neutrino.proto for package 'neutrinorpc'
require 'grpc'
require 'neutrinorpc/neutrino_pb'
module Neutrinorpc
module NeutrinoKit
# NeutrinoKit is a service that can be used to get information about the
# current state of the neutrino instance, fetch blocks and add/remove peers.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'neutrinorpc.NeutrinoKit'
#
# Status returns the status of the light client neutrino instance,
# along with height and hash of the best block, and a list of connected
# peers.
rpc :Status, ::Neutrinorpc::StatusRequest, ::Neutrinorpc::StatusResponse
#
# AddPeer adds a new peer that has already been connected to the server.
rpc :AddPeer, ::Neutrinorpc::AddPeerRequest, ::Neutrinorpc::AddPeerResponse
#
# DisconnectPeer disconnects a peer by target address. Both outbound and
# inbound nodes will be searched for the target node. An error message will
# be returned if the peer was not found.
rpc :DisconnectPeer, ::Neutrinorpc::DisconnectPeerRequest, ::Neutrinorpc::DisconnectPeerResponse
#
# IsBanned returns true if the peer is banned, otherwise false.
rpc :IsBanned, ::Neutrinorpc::IsBannedRequest, ::Neutrinorpc::IsBannedResponse
#
# GetBlockHeader returns a block header with a particular block hash.
rpc :GetBlockHeader, ::Neutrinorpc::GetBlockHeaderRequest, ::Neutrinorpc::GetBlockHeaderResponse
#
# GetBlock returns a block with a particular block hash.
rpc :GetBlock, ::Neutrinorpc::GetBlockRequest, ::Neutrinorpc::GetBlockResponse
#
# GetCFilter returns a compact filter from a block.
rpc :GetCFilter, ::Neutrinorpc::GetCFilterRequest, ::Neutrinorpc::GetCFilterResponse
#
# GetBlockHash returns the header hash of a block at a given height.
rpc :GetBlockHash, ::Neutrinorpc::GetBlockHashRequest, ::Neutrinorpc::GetBlockHashResponse
end
Stub = Service.rpc_stub_class
end
end

View File

@ -0,0 +1,48 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: peersrpc/peers.proto
require 'google/protobuf'
require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("peersrpc/peers.proto", :syntax => :proto3) do
add_message "peersrpc.UpdateAddressAction" do
optional :action, :enum, 1, "peersrpc.UpdateAction"
optional :address, :string, 2
end
add_message "peersrpc.UpdateFeatureAction" do
optional :action, :enum, 1, "peersrpc.UpdateAction"
optional :feature_bit, :enum, 2, "lnrpc.FeatureBit"
end
add_message "peersrpc.NodeAnnouncementUpdateRequest" do
repeated :feature_updates, :message, 1, "peersrpc.UpdateFeatureAction"
optional :color, :string, 2
optional :alias, :string, 3
repeated :address_updates, :message, 4, "peersrpc.UpdateAddressAction"
end
add_message "peersrpc.NodeAnnouncementUpdateResponse" do
repeated :ops, :message, 1, "lnrpc.Op"
end
add_enum "peersrpc.UpdateAction" do
value :ADD, 0
value :REMOVE, 1
end
add_enum "peersrpc.FeatureSet" do
value :SET_INIT, 0
value :SET_LEGACY_GLOBAL, 1
value :SET_NODE_ANN, 2
value :SET_INVOICE, 3
value :SET_INVOICE_AMP, 4
end
end
end
module Peersrpc
UpdateAddressAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.UpdateAddressAction").msgclass
UpdateFeatureAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.UpdateFeatureAction").msgclass
NodeAnnouncementUpdateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.NodeAnnouncementUpdateRequest").msgclass
NodeAnnouncementUpdateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.NodeAnnouncementUpdateResponse").msgclass
UpdateAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.UpdateAction").enummodule
FeatureSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("peersrpc.FeatureSet").enummodule
end

View File

@ -0,0 +1,27 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: peersrpc/peers.proto for package 'peersrpc'
require 'grpc'
require 'peersrpc/peers_pb'
module Peersrpc
module Peers
# Peers is a service that can be used to get information and interact
# with the other nodes of the newtwork.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'peersrpc.Peers'
# lncli: peers updatenodeannouncement
# UpdateNodeAnnouncement allows the caller to update the node parameters
# and broadcasts a new version of the node announcement to its peers.
rpc :UpdateNodeAnnouncement, ::Peersrpc::NodeAnnouncementUpdateRequest, ::Peersrpc::NodeAnnouncementUpdateResponse
end
Stub = Service.rpc_stub_class
end
end

View File

@ -3,7 +3,8 @@
require 'google/protobuf' require 'google/protobuf'
require 'rpc_pb' require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("routerrpc/router.proto", :syntax => :proto3) do add_file("routerrpc/router.proto", :syntax => :proto3) do
add_message "routerrpc.SendPaymentRequest" do add_message "routerrpc.SendPaymentRequest" do
@ -12,6 +13,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :amt_msat, :int64, 12 optional :amt_msat, :int64, 12
optional :payment_hash, :bytes, 3 optional :payment_hash, :bytes, 3
optional :final_cltv_delta, :int32, 4 optional :final_cltv_delta, :int32, 4
optional :payment_addr, :bytes, 20
optional :payment_request, :string, 5 optional :payment_request, :string, 5
optional :timeout_seconds, :int32, 6 optional :timeout_seconds, :int32, 6
optional :fee_limit_sat, :int64, 7 optional :fee_limit_sat, :int64, 7
@ -26,6 +28,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
repeated :dest_features, :enum, 16, "lnrpc.FeatureBit" repeated :dest_features, :enum, 16, "lnrpc.FeatureBit"
optional :max_parts, :uint32, 17 optional :max_parts, :uint32, 17
optional :no_inflight_updates, :bool, 18 optional :no_inflight_updates, :bool, 18
optional :max_shard_size_msat, :uint64, 21
optional :amp, :bool, 22
optional :time_pref, :double, 23
end end
add_message "routerrpc.TrackPaymentRequest" do add_message "routerrpc.TrackPaymentRequest" do
optional :payment_hash, :bytes, 1 optional :payment_hash, :bytes, 1
@ -42,6 +47,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "routerrpc.SendToRouteRequest" do add_message "routerrpc.SendToRouteRequest" do
optional :payment_hash, :bytes, 1 optional :payment_hash, :bytes, 1
optional :route, :message, 2, "lnrpc.Route" optional :route, :message, 2, "lnrpc.Route"
optional :skip_temp_err, :bool, 3
end end
add_message "routerrpc.SendToRouteResponse" do add_message "routerrpc.SendToRouteResponse" do
optional :preimage, :bytes, 1 optional :preimage, :bytes, 1
@ -56,6 +62,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "routerrpc.QueryMissionControlResponse" do add_message "routerrpc.QueryMissionControlResponse" do
repeated :pairs, :message, 2, "routerrpc.PairHistory" repeated :pairs, :message, 2, "routerrpc.PairHistory"
end end
add_message "routerrpc.XImportMissionControlRequest" do
repeated :pairs, :message, 1, "routerrpc.PairHistory"
optional :force, :bool, 2
end
add_message "routerrpc.XImportMissionControlResponse" do
end
add_message "routerrpc.PairHistory" do add_message "routerrpc.PairHistory" do
optional :node_from, :bytes, 1 optional :node_from, :bytes, 1
optional :node_to, :bytes, 2 optional :node_to, :bytes, 2
@ -69,6 +81,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :success_amt_sat, :int64, 6 optional :success_amt_sat, :int64, 6
optional :success_amt_msat, :int64, 7 optional :success_amt_msat, :int64, 7
end end
add_message "routerrpc.GetMissionControlConfigRequest" do
end
add_message "routerrpc.GetMissionControlConfigResponse" do
optional :config, :message, 1, "routerrpc.MissionControlConfig"
end
add_message "routerrpc.SetMissionControlConfigRequest" do
optional :config, :message, 1, "routerrpc.MissionControlConfig"
end
add_message "routerrpc.SetMissionControlConfigResponse" do
end
add_message "routerrpc.MissionControlConfig" do
optional :half_life_seconds, :uint64, 1
optional :hop_probability, :float, 2
optional :weight, :float, 3
optional :maximum_payment_results, :uint32, 4
optional :minimum_failure_relax_interval, :uint64, 5
end
add_message "routerrpc.QueryProbabilityRequest" do add_message "routerrpc.QueryProbabilityRequest" do
optional :from_node, :bytes, 1 optional :from_node, :bytes, 1
optional :to_node, :bytes, 2 optional :to_node, :bytes, 2
@ -83,6 +112,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :final_cltv_delta, :int32, 2 optional :final_cltv_delta, :int32, 2
optional :outgoing_chan_id, :uint64, 3 optional :outgoing_chan_id, :uint64, 3
repeated :hop_pubkeys, :bytes, 4 repeated :hop_pubkeys, :bytes, 4
optional :payment_addr, :bytes, 5
end end
add_message "routerrpc.BuildRouteResponse" do add_message "routerrpc.BuildRouteResponse" do
optional :route, :message, 1, "lnrpc.Route" optional :route, :message, 1, "lnrpc.Route"
@ -121,6 +151,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "routerrpc.ForwardFailEvent" do add_message "routerrpc.ForwardFailEvent" do
end end
add_message "routerrpc.SettleEvent" do add_message "routerrpc.SettleEvent" do
optional :preimage, :bytes, 1
end end
add_message "routerrpc.LinkFailEvent" do add_message "routerrpc.LinkFailEvent" do
optional :info, :message, 1, "routerrpc.HtlcInfo" optional :info, :message, 1, "routerrpc.HtlcInfo"
@ -146,11 +177,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :outgoing_amount_msat, :uint64, 3 optional :outgoing_amount_msat, :uint64, 3
optional :outgoing_expiry, :uint32, 4 optional :outgoing_expiry, :uint32, 4
map :custom_records, :uint64, :bytes, 8 map :custom_records, :uint64, :bytes, 8
optional :onion_blob, :bytes, 9
end end
add_message "routerrpc.ForwardHtlcInterceptResponse" do add_message "routerrpc.ForwardHtlcInterceptResponse" do
optional :incoming_circuit_key, :message, 1, "routerrpc.CircuitKey" optional :incoming_circuit_key, :message, 1, "routerrpc.CircuitKey"
optional :action, :enum, 2, "routerrpc.ResolveHoldForwardAction" optional :action, :enum, 2, "routerrpc.ResolveHoldForwardAction"
optional :preimage, :bytes, 3 optional :preimage, :bytes, 3
optional :failure_message, :bytes, 4
optional :failure_code, :enum, 5, "lnrpc.Failure.FailureCode"
end
add_message "routerrpc.UpdateChanStatusRequest" do
optional :chan_point, :message, 1, "lnrpc.ChannelPoint"
optional :action, :enum, 2, "routerrpc.ChanStatusAction"
end
add_message "routerrpc.UpdateChanStatusResponse" do
end end
add_enum "routerrpc.FailureDetail" do add_enum "routerrpc.FailureDetail" do
value :UNKNOWN, 0 value :UNKNOWN, 0
@ -191,6 +231,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :FAIL, 1 value :FAIL, 1
value :RESUME, 2 value :RESUME, 2
end end
add_enum "routerrpc.ChanStatusAction" do
value :ENABLE, 0
value :DISABLE, 1
value :AUTO, 2
end
end end
end end
@ -205,8 +250,15 @@ module Routerrpc
ResetMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlResponse").msgclass ResetMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlResponse").msgclass
QueryMissionControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlRequest").msgclass QueryMissionControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlRequest").msgclass
QueryMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlResponse").msgclass QueryMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlResponse").msgclass
XImportMissionControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.XImportMissionControlRequest").msgclass
XImportMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.XImportMissionControlResponse").msgclass
PairHistory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairHistory").msgclass PairHistory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairHistory").msgclass
PairData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairData").msgclass PairData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairData").msgclass
GetMissionControlConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.GetMissionControlConfigRequest").msgclass
GetMissionControlConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.GetMissionControlConfigResponse").msgclass
SetMissionControlConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SetMissionControlConfigRequest").msgclass
SetMissionControlConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SetMissionControlConfigResponse").msgclass
MissionControlConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.MissionControlConfig").msgclass
QueryProbabilityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityRequest").msgclass QueryProbabilityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityRequest").msgclass
QueryProbabilityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityResponse").msgclass QueryProbabilityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityResponse").msgclass
BuildRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteRequest").msgclass BuildRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteRequest").msgclass
@ -223,7 +275,10 @@ module Routerrpc
CircuitKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.CircuitKey").msgclass CircuitKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.CircuitKey").msgclass
ForwardHtlcInterceptRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptRequest").msgclass ForwardHtlcInterceptRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptRequest").msgclass
ForwardHtlcInterceptResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptResponse").msgclass ForwardHtlcInterceptResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptResponse").msgclass
UpdateChanStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.UpdateChanStatusRequest").msgclass
UpdateChanStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.UpdateChanStatusResponse").msgclass
FailureDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.FailureDetail").enummodule FailureDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.FailureDetail").enummodule
PaymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentState").enummodule PaymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentState").enummodule
ResolveHoldForwardAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResolveHoldForwardAction").enummodule ResolveHoldForwardAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResolveHoldForwardAction").enummodule
ChanStatusAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ChanStatusAction").enummodule
end end

View File

@ -10,7 +10,7 @@ module Routerrpc
# subsystem of the daemon. # subsystem of the daemon.
class Service class Service
include GRPC::GenericService include ::GRPC::GenericService
self.marshal_class_method = :encode self.marshal_class_method = :encode
self.unmarshal_class_method = :decode self.unmarshal_class_method = :decode
@ -20,65 +20,84 @@ module Routerrpc
# SendPaymentV2 attempts to route a payment described by the passed # SendPaymentV2 attempts to route a payment described by the passed
# PaymentRequest to the final destination. The call returns a stream of # PaymentRequest to the final destination. The call returns a stream of
# payment updates. # payment updates.
rpc :SendPaymentV2, SendPaymentRequest, stream(Lnrpc::Payment) rpc :SendPaymentV2, ::Routerrpc::SendPaymentRequest, stream(::Lnrpc::Payment)
# #
# TrackPaymentV2 returns an update stream for the payment identified by the # TrackPaymentV2 returns an update stream for the payment identified by the
# payment hash. # payment hash.
rpc :TrackPaymentV2, TrackPaymentRequest, stream(Lnrpc::Payment) rpc :TrackPaymentV2, ::Routerrpc::TrackPaymentRequest, stream(::Lnrpc::Payment)
# #
# EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it # EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
# may cost to send an HTLC to the target end destination. # may cost to send an HTLC to the target end destination.
rpc :EstimateRouteFee, RouteFeeRequest, RouteFeeResponse rpc :EstimateRouteFee, ::Routerrpc::RouteFeeRequest, ::Routerrpc::RouteFeeResponse
# #
# Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via # Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
# the specified route. This method differs from SendPayment in that it # the specified route. This method differs from SendPayment in that it
# allows users to specify a full route manually. This can be used for # allows users to specify a full route manually. This can be used for
# things like rebalancing, and atomic swaps. It differs from the newer # things like rebalancing, and atomic swaps. It differs from the newer
# SendToRouteV2 in that it doesn't return the full HTLC information. # SendToRouteV2 in that it doesn't return the full HTLC information.
rpc :SendToRoute, SendToRouteRequest, SendToRouteResponse rpc :SendToRoute, ::Routerrpc::SendToRouteRequest, ::Routerrpc::SendToRouteResponse
# #
# SendToRouteV2 attempts to make a payment via the specified route. This # SendToRouteV2 attempts to make a payment via the specified route. This
# method differs from SendPayment in that it allows users to specify a full # method differs from SendPayment in that it allows users to specify a full
# route manually. This can be used for things like rebalancing, and atomic # route manually. This can be used for things like rebalancing, and atomic
# swaps. # swaps.
rpc :SendToRouteV2, SendToRouteRequest, Lnrpc::HTLCAttempt rpc :SendToRouteV2, ::Routerrpc::SendToRouteRequest, ::Lnrpc::HTLCAttempt
# #
# ResetMissionControl clears all mission control state and starts with a clean # ResetMissionControl clears all mission control state and starts with a clean
# slate. # slate.
rpc :ResetMissionControl, ResetMissionControlRequest, ResetMissionControlResponse rpc :ResetMissionControl, ::Routerrpc::ResetMissionControlRequest, ::Routerrpc::ResetMissionControlResponse
# #
# QueryMissionControl exposes the internal mission control state to callers. # QueryMissionControl exposes the internal mission control state to callers.
# It is a development feature. # It is a development feature.
rpc :QueryMissionControl, QueryMissionControlRequest, QueryMissionControlResponse rpc :QueryMissionControl, ::Routerrpc::QueryMissionControlRequest, ::Routerrpc::QueryMissionControlResponse
#
# XImportMissionControl is an experimental API that imports the state provided
# to the internal mission control's state, using all results which are more
# recent than our existing values. These values will only be imported
# in-memory, and will not be persisted across restarts.
rpc :XImportMissionControl, ::Routerrpc::XImportMissionControlRequest, ::Routerrpc::XImportMissionControlResponse
#
# GetMissionControlConfig returns mission control's current config.
rpc :GetMissionControlConfig, ::Routerrpc::GetMissionControlConfigRequest, ::Routerrpc::GetMissionControlConfigResponse
#
# SetMissionControlConfig will set mission control's config, if the config
# provided is valid.
rpc :SetMissionControlConfig, ::Routerrpc::SetMissionControlConfigRequest, ::Routerrpc::SetMissionControlConfigResponse
# #
# QueryProbability returns the current success probability estimate for a # QueryProbability returns the current success probability estimate for a
# given node pair and amount. # given node pair and amount.
rpc :QueryProbability, QueryProbabilityRequest, QueryProbabilityResponse rpc :QueryProbability, ::Routerrpc::QueryProbabilityRequest, ::Routerrpc::QueryProbabilityResponse
# #
# BuildRoute builds a fully specified route based on a list of hop public # BuildRoute builds a fully specified route based on a list of hop public
# keys. It retrieves the relevant channel policies from the graph in order to # keys. It retrieves the relevant channel policies from the graph in order to
# calculate the correct fees and time locks. # calculate the correct fees and time locks.
rpc :BuildRoute, BuildRouteRequest, BuildRouteResponse rpc :BuildRoute, ::Routerrpc::BuildRouteRequest, ::Routerrpc::BuildRouteResponse
# #
# SubscribeHtlcEvents creates a uni-directional stream from the server to # SubscribeHtlcEvents creates a uni-directional stream from the server to
# the client which delivers a stream of htlc events. # the client which delivers a stream of htlc events.
rpc :SubscribeHtlcEvents, SubscribeHtlcEventsRequest, stream(HtlcEvent) rpc :SubscribeHtlcEvents, ::Routerrpc::SubscribeHtlcEventsRequest, stream(::Routerrpc::HtlcEvent)
# #
# Deprecated, use SendPaymentV2. SendPayment attempts to route a payment # Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
# described by the passed PaymentRequest to the final destination. The call # described by the passed PaymentRequest to the final destination. The call
# returns a stream of payment status updates. # returns a stream of payment status updates.
rpc :SendPayment, SendPaymentRequest, stream(PaymentStatus) rpc :SendPayment, ::Routerrpc::SendPaymentRequest, stream(::Routerrpc::PaymentStatus)
# #
# Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for # Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
# the payment identified by the payment hash. # the payment identified by the payment hash.
rpc :TrackPayment, TrackPaymentRequest, stream(PaymentStatus) rpc :TrackPayment, ::Routerrpc::TrackPaymentRequest, stream(::Routerrpc::PaymentStatus)
# * # *
# HtlcInterceptor dispatches a bi-directional streaming RPC in which # HtlcInterceptor dispatches a bi-directional streaming RPC in which
# Forwarded HTLC requests are sent to the client and the client responds with # Forwarded HTLC requests are sent to the client and the client responds with
# a boolean that tells LND if this htlc should be intercepted. # a boolean that tells LND if this htlc should be intercepted.
# In case of interception, the htlc can be either settled, cancelled or # In case of interception, the htlc can be either settled, cancelled or
# resumed later by using the ResolveHoldForward endpoint. # resumed later by using the ResolveHoldForward endpoint.
rpc :HtlcInterceptor, stream(ForwardHtlcInterceptResponse), stream(ForwardHtlcInterceptRequest) rpc :HtlcInterceptor, stream(::Routerrpc::ForwardHtlcInterceptResponse), stream(::Routerrpc::ForwardHtlcInterceptRequest)
#
# UpdateChanStatus attempts to manually set the state of a channel
# (enabled, disabled, or auto). A manual "disable" request will cause the
# channel to stay disabled until a subsequent manual request of either
# "enable" or "auto".
rpc :UpdateChanStatus, ::Routerrpc::UpdateChanStatusRequest, ::Routerrpc::UpdateChanStatusResponse
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

View File

@ -21,14 +21,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :key_desc, :message, 1, "signrpc.KeyDescriptor" optional :key_desc, :message, 1, "signrpc.KeyDescriptor"
optional :single_tweak, :bytes, 2 optional :single_tweak, :bytes, 2
optional :double_tweak, :bytes, 3 optional :double_tweak, :bytes, 3
optional :tap_tweak, :bytes, 10
optional :witness_script, :bytes, 4 optional :witness_script, :bytes, 4
optional :output, :message, 5, "signrpc.TxOut" optional :output, :message, 5, "signrpc.TxOut"
optional :sighash, :uint32, 7 optional :sighash, :uint32, 7
optional :input_index, :int32, 8 optional :input_index, :int32, 8
optional :sign_method, :enum, 9, "signrpc.SignMethod"
end end
add_message "signrpc.SignReq" do add_message "signrpc.SignReq" do
optional :raw_tx_bytes, :bytes, 1 optional :raw_tx_bytes, :bytes, 1
repeated :sign_descs, :message, 2, "signrpc.SignDescriptor" repeated :sign_descs, :message, 2, "signrpc.SignDescriptor"
repeated :prev_outputs, :message, 3, "signrpc.TxOut"
end end
add_message "signrpc.SignResp" do add_message "signrpc.SignResp" do
repeated :raw_sigs, :bytes, 1 repeated :raw_sigs, :bytes, 1
@ -43,6 +46,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "signrpc.SignMessageReq" do add_message "signrpc.SignMessageReq" do
optional :msg, :bytes, 1 optional :msg, :bytes, 1
optional :key_loc, :message, 2, "signrpc.KeyLocator" optional :key_loc, :message, 2, "signrpc.KeyLocator"
optional :double_hash, :bool, 3
optional :compact_sig, :bool, 4
optional :schnorr_sig, :bool, 5
optional :schnorr_sig_tap_tweak, :bytes, 6
end end
add_message "signrpc.SignMessageResp" do add_message "signrpc.SignMessageResp" do
optional :signature, :bytes, 1 optional :signature, :bytes, 1
@ -51,6 +58,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :msg, :bytes, 1 optional :msg, :bytes, 1
optional :signature, :bytes, 2 optional :signature, :bytes, 2
optional :pubkey, :bytes, 3 optional :pubkey, :bytes, 3
optional :is_schnorr_sig, :bool, 4
end end
add_message "signrpc.VerifyMessageResp" do add_message "signrpc.VerifyMessageResp" do
optional :valid, :bool, 1 optional :valid, :bool, 1
@ -58,10 +66,76 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "signrpc.SharedKeyRequest" do add_message "signrpc.SharedKeyRequest" do
optional :ephemeral_pubkey, :bytes, 1 optional :ephemeral_pubkey, :bytes, 1
optional :key_loc, :message, 2, "signrpc.KeyLocator" optional :key_loc, :message, 2, "signrpc.KeyLocator"
optional :key_desc, :message, 3, "signrpc.KeyDescriptor"
end end
add_message "signrpc.SharedKeyResponse" do add_message "signrpc.SharedKeyResponse" do
optional :shared_key, :bytes, 1 optional :shared_key, :bytes, 1
end end
add_message "signrpc.TweakDesc" do
optional :tweak, :bytes, 1
optional :is_x_only, :bool, 2
end
add_message "signrpc.TaprootTweakDesc" do
optional :script_root, :bytes, 1
optional :key_spend_only, :bool, 2
end
add_message "signrpc.MuSig2CombineKeysRequest" do
repeated :all_signer_pubkeys, :bytes, 1
repeated :tweaks, :message, 2, "signrpc.TweakDesc"
optional :taproot_tweak, :message, 3, "signrpc.TaprootTweakDesc"
end
add_message "signrpc.MuSig2CombineKeysResponse" do
optional :combined_key, :bytes, 1
optional :taproot_internal_key, :bytes, 2
end
add_message "signrpc.MuSig2SessionRequest" do
optional :key_loc, :message, 1, "signrpc.KeyLocator"
repeated :all_signer_pubkeys, :bytes, 2
repeated :other_signer_public_nonces, :bytes, 3
repeated :tweaks, :message, 4, "signrpc.TweakDesc"
optional :taproot_tweak, :message, 5, "signrpc.TaprootTweakDesc"
end
add_message "signrpc.MuSig2SessionResponse" do
optional :session_id, :bytes, 1
optional :combined_key, :bytes, 2
optional :taproot_internal_key, :bytes, 3
optional :local_public_nonces, :bytes, 4
optional :have_all_nonces, :bool, 5
end
add_message "signrpc.MuSig2RegisterNoncesRequest" do
optional :session_id, :bytes, 1
repeated :other_signer_public_nonces, :bytes, 3
end
add_message "signrpc.MuSig2RegisterNoncesResponse" do
optional :have_all_nonces, :bool, 1
end
add_message "signrpc.MuSig2SignRequest" do
optional :session_id, :bytes, 1
optional :message_digest, :bytes, 2
optional :cleanup, :bool, 3
end
add_message "signrpc.MuSig2SignResponse" do
optional :local_partial_signature, :bytes, 1
end
add_message "signrpc.MuSig2CombineSigRequest" do
optional :session_id, :bytes, 1
repeated :other_partial_signatures, :bytes, 2
end
add_message "signrpc.MuSig2CombineSigResponse" do
optional :have_all_signatures, :bool, 1
optional :final_signature, :bytes, 2
end
add_message "signrpc.MuSig2CleanupRequest" do
optional :session_id, :bytes, 1
end
add_message "signrpc.MuSig2CleanupResponse" do
end
add_enum "signrpc.SignMethod" do
value :SIGN_METHOD_WITNESS_V0, 0
value :SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086, 1
value :SIGN_METHOD_TAPROOT_KEY_SPEND, 2
value :SIGN_METHOD_TAPROOT_SCRIPT_SPEND, 3
end
end end
end end
@ -80,4 +154,19 @@ module Signrpc
VerifyMessageResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.VerifyMessageResp").msgclass VerifyMessageResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.VerifyMessageResp").msgclass
SharedKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyRequest").msgclass SharedKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyRequest").msgclass
SharedKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyResponse").msgclass SharedKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyResponse").msgclass
TweakDesc = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.TweakDesc").msgclass
TaprootTweakDesc = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.TaprootTweakDesc").msgclass
MuSig2CombineKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CombineKeysRequest").msgclass
MuSig2CombineKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CombineKeysResponse").msgclass
MuSig2SessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2SessionRequest").msgclass
MuSig2SessionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2SessionResponse").msgclass
MuSig2RegisterNoncesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2RegisterNoncesRequest").msgclass
MuSig2RegisterNoncesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2RegisterNoncesResponse").msgclass
MuSig2SignRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2SignRequest").msgclass
MuSig2SignResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2SignResponse").msgclass
MuSig2CombineSigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CombineSigRequest").msgclass
MuSig2CombineSigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CombineSigResponse").msgclass
MuSig2CleanupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CleanupRequest").msgclass
MuSig2CleanupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CleanupResponse").msgclass
SignMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignMethod").enummodule
end end

View File

@ -10,7 +10,7 @@ module Signrpc
# daemon's wallet. # daemon's wallet.
class Service class Service
include GRPC::GenericService include ::GRPC::GenericService
self.marshal_class_method = :encode self.marshal_class_method = :encode
self.unmarshal_class_method = :decode self.unmarshal_class_method = :decode
@ -25,42 +25,108 @@ module Signrpc
# #
# If we are unable to sign using the specified keys, then an error will be # If we are unable to sign using the specified keys, then an error will be
# returned. # returned.
rpc :SignOutputRaw, SignReq, SignResp rpc :SignOutputRaw, ::Signrpc::SignReq, ::Signrpc::SignResp
# #
# ComputeInputScript generates a complete InputIndex for the passed # ComputeInputScript generates a complete InputIndex for the passed
# transaction with the signature as defined within the passed SignDescriptor. # transaction with the signature as defined within the passed SignDescriptor.
# This method should be capable of generating the proper input script for # This method should be capable of generating the proper input script for both
# both regular p2wkh output and p2wkh outputs nested within a regular p2sh # regular p2wkh/p2tr outputs and p2wkh outputs nested within a regular p2sh
# output. # output.
# #
# Note that when using this method to sign inputs belonging to the wallet, # Note that when using this method to sign inputs belonging to the wallet,
# the only items of the SignDescriptor that need to be populated are pkScript # the only items of the SignDescriptor that need to be populated are pkScript
# in the TxOut field, the value in that same field, and finally the input # in the TxOut field, the value in that same field, and finally the input
# index. # index.
rpc :ComputeInputScript, SignReq, InputScriptResp rpc :ComputeInputScript, ::Signrpc::SignReq, ::Signrpc::InputScriptResp
# #
# SignMessage signs a message with the key specified in the key locator. The # SignMessage signs a message with the key specified in the key locator. The
# returned signature is fixed-size LN wire format encoded. # returned signature is fixed-size LN wire format encoded.
# #
# The main difference to SignMessage in the main RPC is that a specific key is # The main difference to SignMessage in the main RPC is that a specific key is
# used to sign the message instead of the node identity private key. # used to sign the message instead of the node identity private key.
rpc :SignMessage, SignMessageReq, SignMessageResp rpc :SignMessage, ::Signrpc::SignMessageReq, ::Signrpc::SignMessageResp
# #
# VerifyMessage verifies a signature over a message using the public key # VerifyMessage verifies a signature over a message using the public key
# provided. The signature must be fixed-size LN wire format encoded. # provided. The signature must be fixed-size LN wire format encoded.
# #
# The main difference to VerifyMessage in the main RPC is that the public key # The main difference to VerifyMessage in the main RPC is that the public key
# used to sign the message does not have to be a node known to the network. # used to sign the message does not have to be a node known to the network.
rpc :VerifyMessage, VerifyMessageReq, VerifyMessageResp rpc :VerifyMessage, ::Signrpc::VerifyMessageReq, ::Signrpc::VerifyMessageResp
# #
# DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key # DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key
# derivation between the ephemeral public key in the request and the node's # derivation between the ephemeral public key in the request and the node's
# key specified in the key_loc parameter (or the node's identity private key # key specified in the key_desc parameter. Either a key locator or a raw
# if no key locator is specified): # public key is expected in the key_desc, if neither is supplied, defaults to
# the node's identity private key:
# P_shared = privKeyNode * ephemeralPubkey # P_shared = privKeyNode * ephemeralPubkey
# The resulting shared public key is serialized in the compressed format and # The resulting shared public key is serialized in the compressed format and
# hashed with sha256, resulting in the final key length of 256bit. # hashed with sha256, resulting in the final key length of 256bit.
rpc :DeriveSharedKey, SharedKeyRequest, SharedKeyResponse rpc :DeriveSharedKey, ::Signrpc::SharedKeyRequest, ::Signrpc::SharedKeyResponse
#
# MuSig2CombineKeys (experimental!) is a stateless helper RPC that can be used
# to calculate the combined MuSig2 public key from a list of all participating
# signers' public keys. This RPC is completely stateless and deterministic and
# does not create any signing session. It can be used to determine the Taproot
# public key that should be put in an on-chain output once all public keys are
# known. A signing session is only needed later when that output should be
# _spent_ again.
#
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
# releases. Backward compatibility is not guaranteed!
rpc :MuSig2CombineKeys, ::Signrpc::MuSig2CombineKeysRequest, ::Signrpc::MuSig2CombineKeysResponse
#
# MuSig2CreateSession (experimental!) creates a new MuSig2 signing session
# using the local key identified by the key locator. The complete list of all
# public keys of all signing parties must be provided, including the public
# key of the local signing key. If nonces of other parties are already known,
# they can be submitted as well to reduce the number of RPC calls necessary
# later on.
#
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
# releases. Backward compatibility is not guaranteed!
rpc :MuSig2CreateSession, ::Signrpc::MuSig2SessionRequest, ::Signrpc::MuSig2SessionResponse
#
# MuSig2RegisterNonces (experimental!) registers one or more public nonces of
# other signing participants for a session identified by its ID. This RPC can
# be called multiple times until all nonces are registered.
#
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
# releases. Backward compatibility is not guaranteed!
rpc :MuSig2RegisterNonces, ::Signrpc::MuSig2RegisterNoncesRequest, ::Signrpc::MuSig2RegisterNoncesResponse
#
# MuSig2Sign (experimental!) creates a partial signature using the local
# signing key that was specified when the session was created. This can only
# be called when all public nonces of all participants are known and have been
# registered with the session. If this node isn't responsible for combining
# all the partial signatures, then the cleanup flag should be set, indicating
# that the session can be removed from memory once the signature was produced.
#
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
# releases. Backward compatibility is not guaranteed!
rpc :MuSig2Sign, ::Signrpc::MuSig2SignRequest, ::Signrpc::MuSig2SignResponse
#
# MuSig2CombineSig (experimental!) combines the given partial signature(s)
# with the local one, if it already exists. Once a partial signature of all
# participants is registered, the final signature will be combined and
# returned.
#
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
# releases. Backward compatibility is not guaranteed!
rpc :MuSig2CombineSig, ::Signrpc::MuSig2CombineSigRequest, ::Signrpc::MuSig2CombineSigResponse
#
# MuSig2Cleanup (experimental!) allows a caller to clean up a session early in
# cases where it's obvious that the signing session won't succeed and the
# resources can be released.
#
# NOTE: The MuSig2 BIP is not final yet and therefore this API must be
# considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
# releases. Backward compatibility is not guaranteed!
rpc :MuSig2Cleanup, ::Signrpc::MuSig2CleanupRequest, ::Signrpc::MuSig2CleanupResponse
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

View File

@ -0,0 +1,35 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: stateservice.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("stateservice.proto", :syntax => :proto3) do
add_message "lnrpc.SubscribeStateRequest" do
end
add_message "lnrpc.SubscribeStateResponse" do
optional :state, :enum, 1, "lnrpc.WalletState"
end
add_message "lnrpc.GetStateRequest" do
end
add_message "lnrpc.GetStateResponse" do
optional :state, :enum, 1, "lnrpc.WalletState"
end
add_enum "lnrpc.WalletState" do
value :NON_EXISTING, 0
value :LOCKED, 1
value :UNLOCKED, 2
value :RPC_ACTIVE, 3
value :SERVER_ACTIVE, 4
value :WAITING_TO_START, 255
end
end
end
module Lnrpc
SubscribeStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SubscribeStateRequest").msgclass
SubscribeStateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SubscribeStateResponse").msgclass
GetStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetStateRequest").msgclass
GetStateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetStateResponse").msgclass
WalletState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletState").enummodule
end

View File

@ -0,0 +1,46 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: stateservice.proto for package 'lnrpc'
require 'grpc'
require 'stateservice_pb'
module Lnrpc
module State
#
# Comments in this file will be directly parsed into the API
# Documentation as descriptions of the associated method, message, or field.
# These descriptions should go right above the definition of the object, and
# can be in either block or // comment format.
#
# An RPC method can be matched to an lncli command by placing a line in the
# beginning of the description in exactly the following format:
# lncli: `methodname`
#
# Failure to specify the exact name of the command will cause documentation
# generation to fail.
#
# More information on how exactly the gRPC documentation is generated from
# this proto file can be found here:
# https://github.com/lightninglabs/lightning-api
#
# State service is a always running service that exposes the current state of
# the wallet and RPC server.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'lnrpc.State'
# SubscribeState subscribes to the state of the wallet. The current wallet
# state will always be delivered immediately.
rpc :SubscribeState, ::Lnrpc::SubscribeStateRequest, stream(::Lnrpc::SubscribeStateResponse)
# GetState returns the current wallet state without streaming further
# changes.
rpc :GetState, ::Lnrpc::GetStateRequest, ::Lnrpc::GetStateResponse
end
Stub = Service.rpc_stub_class
end
end

View File

@ -10,7 +10,7 @@ module Verrpc
# and build information of the running daemon. # and build information of the running daemon.
class Service class Service
include GRPC::GenericService include ::GRPC::GenericService
self.marshal_class_method = :encode self.marshal_class_method = :encode
self.unmarshal_class_method = :decode self.unmarshal_class_method = :decode
@ -19,7 +19,7 @@ module Verrpc
# lncli: `version` # lncli: `version`
# GetVersion returns the current version and build information of the running # GetVersion returns the current version and build information of the running
# daemon. # daemon.
rpc :GetVersion, VersionRequest, Version rpc :GetVersion, ::Verrpc::VersionRequest, ::Verrpc::Version
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

View File

@ -3,13 +3,16 @@
require 'google/protobuf' require 'google/protobuf'
require 'rpc_pb' require 'lightning_pb'
require 'signrpc/signer_pb' require 'signrpc/signer_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("walletrpc/walletkit.proto", :syntax => :proto3) do add_file("walletrpc/walletkit.proto", :syntax => :proto3) do
add_message "walletrpc.ListUnspentRequest" do add_message "walletrpc.ListUnspentRequest" do
optional :min_confs, :int32, 1 optional :min_confs, :int32, 1
optional :max_confs, :int32, 2 optional :max_confs, :int32, 2
optional :account, :string, 3
optional :unconfirmed_only, :bool, 4
end end
add_message "walletrpc.ListUnspentResponse" do add_message "walletrpc.ListUnspentResponse" do
repeated :utxos, :message, 1, "lnrpc.Utxo" repeated :utxos, :message, 1, "lnrpc.Utxo"
@ -17,6 +20,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "walletrpc.LeaseOutputRequest" do add_message "walletrpc.LeaseOutputRequest" do
optional :id, :bytes, 1 optional :id, :bytes, 1
optional :outpoint, :message, 2, "lnrpc.OutPoint" optional :outpoint, :message, 2, "lnrpc.OutPoint"
optional :expiration_seconds, :uint64, 3
end end
add_message "walletrpc.LeaseOutputResponse" do add_message "walletrpc.LeaseOutputResponse" do
optional :expiration, :uint64, 1 optional :expiration, :uint64, 1
@ -32,10 +36,54 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :key_family, :int32, 2 optional :key_family, :int32, 2
end end
add_message "walletrpc.AddrRequest" do add_message "walletrpc.AddrRequest" do
optional :account, :string, 1
optional :type, :enum, 2, "walletrpc.AddressType"
optional :change, :bool, 3
end end
add_message "walletrpc.AddrResponse" do add_message "walletrpc.AddrResponse" do
optional :addr, :string, 1 optional :addr, :string, 1
end end
add_message "walletrpc.Account" do
optional :name, :string, 1
optional :address_type, :enum, 2, "walletrpc.AddressType"
optional :extended_public_key, :string, 3
optional :master_key_fingerprint, :bytes, 4
optional :derivation_path, :string, 5
optional :external_key_count, :uint32, 6
optional :internal_key_count, :uint32, 7
optional :watch_only, :bool, 8
end
add_message "walletrpc.ListAccountsRequest" do
optional :name, :string, 1
optional :address_type, :enum, 2, "walletrpc.AddressType"
end
add_message "walletrpc.ListAccountsResponse" do
repeated :accounts, :message, 1, "walletrpc.Account"
end
add_message "walletrpc.RequiredReserveRequest" do
optional :additional_public_channels, :uint32, 1
end
add_message "walletrpc.RequiredReserveResponse" do
optional :required_reserve, :int64, 1
end
add_message "walletrpc.ImportAccountRequest" do
optional :name, :string, 1
optional :extended_public_key, :string, 2
optional :master_key_fingerprint, :bytes, 3
optional :address_type, :enum, 4, "walletrpc.AddressType"
optional :dry_run, :bool, 5
end
add_message "walletrpc.ImportAccountResponse" do
optional :account, :message, 1, "walletrpc.Account"
repeated :dry_run_external_addrs, :string, 2
repeated :dry_run_internal_addrs, :string, 3
end
add_message "walletrpc.ImportPublicKeyRequest" do
optional :public_key, :bytes, 1
optional :address_type, :enum, 2, "walletrpc.AddressType"
end
add_message "walletrpc.ImportPublicKeyResponse" do
end
add_message "walletrpc.Transaction" do add_message "walletrpc.Transaction" do
optional :tx_hex, :bytes, 1 optional :tx_hex, :bytes, 1
optional :label, :string, 2 optional :label, :string, 2
@ -47,6 +95,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :sat_per_kw, :int64, 1 optional :sat_per_kw, :int64, 1
repeated :outputs, :message, 2, "signrpc.TxOut" repeated :outputs, :message, 2, "signrpc.TxOut"
optional :label, :string, 3 optional :label, :string, 3
optional :min_confs, :int32, 4
optional :spend_unconfirmed, :bool, 5
end end
add_message "walletrpc.SendOutputsResponse" do add_message "walletrpc.SendOutputsResponse" do
optional :raw_tx, :bytes, 1 optional :raw_tx, :bytes, 1
@ -66,6 +116,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :next_broadcast_height, :uint32, 6 optional :next_broadcast_height, :uint32, 6
optional :requested_conf_target, :uint32, 8 optional :requested_conf_target, :uint32, 8
optional :requested_sat_per_byte, :uint32, 9 optional :requested_sat_per_byte, :uint32, 9
optional :sat_per_vbyte, :uint64, 10
optional :requested_sat_per_vbyte, :uint64, 11
optional :force, :bool, 7 optional :force, :bool, 7
end end
add_message "walletrpc.PendingSweepsRequest" do add_message "walletrpc.PendingSweepsRequest" do
@ -78,6 +130,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :target_conf, :uint32, 2 optional :target_conf, :uint32, 2
optional :sat_per_byte, :uint32, 3 optional :sat_per_byte, :uint32, 3
optional :force, :bool, 4 optional :force, :bool, 4
optional :sat_per_vbyte, :uint64, 5
end end
add_message "walletrpc.BumpFeeResponse" do add_message "walletrpc.BumpFeeResponse" do
end end
@ -100,6 +153,61 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end end
add_message "walletrpc.LabelTransactionResponse" do add_message "walletrpc.LabelTransactionResponse" do
end end
add_message "walletrpc.FundPsbtRequest" do
optional :account, :string, 5
optional :min_confs, :int32, 6
optional :spend_unconfirmed, :bool, 7
oneof :template do
optional :psbt, :bytes, 1
optional :raw, :message, 2, "walletrpc.TxTemplate"
end
oneof :fees do
optional :target_conf, :uint32, 3
optional :sat_per_vbyte, :uint64, 4
end
end
add_message "walletrpc.FundPsbtResponse" do
optional :funded_psbt, :bytes, 1
optional :change_output_index, :int32, 2
repeated :locked_utxos, :message, 3, "walletrpc.UtxoLease"
end
add_message "walletrpc.TxTemplate" do
repeated :inputs, :message, 1, "lnrpc.OutPoint"
map :outputs, :string, :uint64, 2
end
add_message "walletrpc.UtxoLease" do
optional :id, :bytes, 1
optional :outpoint, :message, 2, "lnrpc.OutPoint"
optional :expiration, :uint64, 3
optional :pk_script, :bytes, 4
optional :value, :uint64, 5
end
add_message "walletrpc.SignPsbtRequest" do
optional :funded_psbt, :bytes, 1
end
add_message "walletrpc.SignPsbtResponse" do
optional :signed_psbt, :bytes, 1
end
add_message "walletrpc.FinalizePsbtRequest" do
optional :funded_psbt, :bytes, 1
optional :account, :string, 5
end
add_message "walletrpc.FinalizePsbtResponse" do
optional :signed_psbt, :bytes, 1
optional :raw_final_tx, :bytes, 2
end
add_message "walletrpc.ListLeasesRequest" do
end
add_message "walletrpc.ListLeasesResponse" do
repeated :locked_utxos, :message, 1, "walletrpc.UtxoLease"
end
add_enum "walletrpc.AddressType" do
value :UNKNOWN, 0
value :WITNESS_PUBKEY_HASH, 1
value :NESTED_WITNESS_PUBKEY_HASH, 2
value :HYBRID_NESTED_WITNESS_PUBKEY_HASH, 3
value :TAPROOT_PUBKEY, 4
end
add_enum "walletrpc.WitnessType" do add_enum "walletrpc.WitnessType" do
value :UNKNOWN_WITNESS, 0 value :UNKNOWN_WITNESS, 0
value :COMMITMENT_TIME_LOCK, 1 value :COMMITMENT_TIME_LOCK, 1
@ -129,6 +237,15 @@ module Walletrpc
KeyReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.KeyReq").msgclass KeyReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.KeyReq").msgclass
AddrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrRequest").msgclass AddrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrRequest").msgclass
AddrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrResponse").msgclass AddrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrResponse").msgclass
Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Account").msgclass
ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAccountsRequest").msgclass
ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAccountsResponse").msgclass
RequiredReserveRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.RequiredReserveRequest").msgclass
RequiredReserveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.RequiredReserveResponse").msgclass
ImportAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountRequest").msgclass
ImportAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountResponse").msgclass
ImportPublicKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportPublicKeyRequest").msgclass
ImportPublicKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportPublicKeyResponse").msgclass
Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Transaction").msgclass Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Transaction").msgclass
PublishResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PublishResponse").msgclass PublishResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PublishResponse").msgclass
SendOutputsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SendOutputsRequest").msgclass SendOutputsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SendOutputsRequest").msgclass
@ -145,5 +262,16 @@ module Walletrpc
ListSweepsResponse::TransactionIDs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListSweepsResponse.TransactionIDs").msgclass ListSweepsResponse::TransactionIDs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListSweepsResponse.TransactionIDs").msgclass
LabelTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LabelTransactionRequest").msgclass LabelTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LabelTransactionRequest").msgclass
LabelTransactionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LabelTransactionResponse").msgclass LabelTransactionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LabelTransactionResponse").msgclass
FundPsbtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FundPsbtRequest").msgclass
FundPsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FundPsbtResponse").msgclass
TxTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.TxTemplate").msgclass
UtxoLease = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.UtxoLease").msgclass
SignPsbtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SignPsbtRequest").msgclass
SignPsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SignPsbtResponse").msgclass
FinalizePsbtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FinalizePsbtRequest").msgclass
FinalizePsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FinalizePsbtResponse").msgclass
ListLeasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListLeasesRequest").msgclass
ListLeasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListLeasesResponse").msgclass
AddressType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddressType").enummodule
WitnessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.WitnessType").enummodule WitnessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.WitnessType").enummodule
end end

View File

@ -10,7 +10,7 @@ module Walletrpc
# daemon's wallet. # daemon's wallet.
class Service class Service
include GRPC::GenericService include ::GRPC::GenericService
self.marshal_class_method = :encode self.marshal_class_method = :encode
self.unmarshal_class_method = :decode self.unmarshal_class_method = :decode
@ -18,48 +18,95 @@ module Walletrpc
# #
# ListUnspent returns a list of all utxos spendable by the wallet with a # ListUnspent returns a list of all utxos spendable by the wallet with a
# number of confirmations between the specified minimum and maximum. # number of confirmations between the specified minimum and maximum. By
rpc :ListUnspent, ListUnspentRequest, ListUnspentResponse # default, all utxos are listed. To list only the unconfirmed utxos, set
# the unconfirmed_only to true.
rpc :ListUnspent, ::Walletrpc::ListUnspentRequest, ::Walletrpc::ListUnspentResponse
# #
# LeaseOutput locks an output to the given ID, preventing it from being # LeaseOutput locks an output to the given ID, preventing it from being
# available for any future coin selection attempts. The absolute time of the # available for any future coin selection attempts. The absolute time of the
# lock's expiration is returned. The expiration of the lock can be extended by # lock's expiration is returned. The expiration of the lock can be extended by
# successive invocations of this RPC. Outputs can be unlocked before their # successive invocations of this RPC. Outputs can be unlocked before their
# expiration through `ReleaseOutput`. # expiration through `ReleaseOutput`.
rpc :LeaseOutput, LeaseOutputRequest, LeaseOutputResponse rpc :LeaseOutput, ::Walletrpc::LeaseOutputRequest, ::Walletrpc::LeaseOutputResponse
# #
# ReleaseOutput unlocks an output, allowing it to be available for coin # ReleaseOutput unlocks an output, allowing it to be available for coin
# selection if it remains unspent. The ID should match the one used to # selection if it remains unspent. The ID should match the one used to
# originally lock the output. # originally lock the output.
rpc :ReleaseOutput, ReleaseOutputRequest, ReleaseOutputResponse rpc :ReleaseOutput, ::Walletrpc::ReleaseOutputRequest, ::Walletrpc::ReleaseOutputResponse
#
# ListLeases lists all currently locked utxos.
rpc :ListLeases, ::Walletrpc::ListLeasesRequest, ::Walletrpc::ListLeasesResponse
# #
# DeriveNextKey attempts to derive the *next* key within the key family # DeriveNextKey attempts to derive the *next* key within the key family
# (account in BIP43) specified. This method should return the next external # (account in BIP43) specified. This method should return the next external
# child within this branch. # child within this branch.
rpc :DeriveNextKey, KeyReq, Signrpc::KeyDescriptor rpc :DeriveNextKey, ::Walletrpc::KeyReq, ::Signrpc::KeyDescriptor
# #
# DeriveKey attempts to derive an arbitrary key specified by the passed # DeriveKey attempts to derive an arbitrary key specified by the passed
# KeyLocator. # KeyLocator.
rpc :DeriveKey, Signrpc::KeyLocator, Signrpc::KeyDescriptor rpc :DeriveKey, ::Signrpc::KeyLocator, ::Signrpc::KeyDescriptor
# #
# NextAddr returns the next unused address within the wallet. # NextAddr returns the next unused address within the wallet.
rpc :NextAddr, AddrRequest, AddrResponse rpc :NextAddr, ::Walletrpc::AddrRequest, ::Walletrpc::AddrResponse
#
# ListAccounts retrieves all accounts belonging to the wallet by default. A
# name and key scope filter can be provided to filter through all of the
# wallet accounts and return only those matching.
rpc :ListAccounts, ::Walletrpc::ListAccountsRequest, ::Walletrpc::ListAccountsResponse
#
# RequiredReserve returns the minimum amount of satoshis that should be kept
# in the wallet in order to fee bump anchor channels if necessary. The value
# scales with the number of public anchor channels but is capped at a maximum.
rpc :RequiredReserve, ::Walletrpc::RequiredReserveRequest, ::Walletrpc::RequiredReserveResponse
#
# ImportAccount imports an account backed by an account extended public key.
# The master key fingerprint denotes the fingerprint of the root key
# corresponding to the account public key (also known as the key with
# derivation path m/). This may be required by some hardware wallets for
# proper identification and signing.
#
# The address type can usually be inferred from the key's version, but may be
# required for certain keys to map them into the proper scope.
#
# For BIP-0044 keys, an address type must be specified as we intend to not
# support importing BIP-0044 keys into the wallet using the legacy
# pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force
# the standard BIP-0049 derivation scheme, while a witness address type will
# force the standard BIP-0084 derivation scheme.
#
# For BIP-0049 keys, an address type must also be specified to make a
# distinction between the standard BIP-0049 address schema (nested witness
# pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys
# externally, witness pubkeys internally).
#
# NOTE: Events (deposits/spends) for keys derived from an account will only be
# detected by lnd if they happen after the import. Rescans to detect past
# events will be supported later on.
rpc :ImportAccount, ::Walletrpc::ImportAccountRequest, ::Walletrpc::ImportAccountResponse
#
# ImportPublicKey imports a public key as watch-only into the wallet.
#
# NOTE: Events (deposits/spends) for a key will only be detected by lnd if
# they happen after the import. Rescans to detect past events will be
# supported later on.
rpc :ImportPublicKey, ::Walletrpc::ImportPublicKeyRequest, ::Walletrpc::ImportPublicKeyResponse
# #
# PublishTransaction attempts to publish the passed transaction to the # PublishTransaction attempts to publish the passed transaction to the
# network. Once this returns without an error, the wallet will continually # network. Once this returns without an error, the wallet will continually
# attempt to re-broadcast the transaction on start up, until it enters the # attempt to re-broadcast the transaction on start up, until it enters the
# chain. # chain.
rpc :PublishTransaction, Transaction, PublishResponse rpc :PublishTransaction, ::Walletrpc::Transaction, ::Walletrpc::PublishResponse
# #
# SendOutputs is similar to the existing sendmany call in Bitcoind, and # SendOutputs is similar to the existing sendmany call in Bitcoind, and
# allows the caller to create a transaction that sends to several outputs at # allows the caller to create a transaction that sends to several outputs at
# once. This is ideal when wanting to batch create a set of transactions. # once. This is ideal when wanting to batch create a set of transactions.
rpc :SendOutputs, SendOutputsRequest, SendOutputsResponse rpc :SendOutputs, ::Walletrpc::SendOutputsRequest, ::Walletrpc::SendOutputsResponse
# #
# EstimateFee attempts to query the internal fee estimator of the wallet to # EstimateFee attempts to query the internal fee estimator of the wallet to
# determine the fee (in sat/kw) to attach to a transaction in order to # determine the fee (in sat/kw) to attach to a transaction in order to
# achieve the confirmation target. # achieve the confirmation target.
rpc :EstimateFee, EstimateFeeRequest, EstimateFeeResponse rpc :EstimateFee, ::Walletrpc::EstimateFeeRequest, ::Walletrpc::EstimateFeeResponse
# #
# PendingSweeps returns lists of on-chain outputs that lnd is currently # PendingSweeps returns lists of on-chain outputs that lnd is currently
# attempting to sweep within its central batching engine. Outputs with similar # attempting to sweep within its central batching engine. Outputs with similar
@ -69,7 +116,7 @@ module Walletrpc
# NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to # NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to
# remain supported. This is an advanced API that depends on the internals of # remain supported. This is an advanced API that depends on the internals of
# the UtxoSweeper, so things may change. # the UtxoSweeper, so things may change.
rpc :PendingSweeps, PendingSweepsRequest, PendingSweepsResponse rpc :PendingSweeps, ::Walletrpc::PendingSweepsRequest, ::Walletrpc::PendingSweepsResponse
# #
# BumpFee bumps the fee of an arbitrary input within a transaction. This RPC # BumpFee bumps the fee of an arbitrary input within a transaction. This RPC
# takes a different approach than bitcoind's bumpfee command. lnd has a # takes a different approach than bitcoind's bumpfee command. lnd has a
@ -96,18 +143,64 @@ module Walletrpc
# Note that this RPC currently doesn't perform any validation checks on the # Note that this RPC currently doesn't perform any validation checks on the
# fee preference being provided. For now, the responsibility of ensuring that # fee preference being provided. For now, the responsibility of ensuring that
# the new fee preference is sufficient is delegated to the user. # the new fee preference is sufficient is delegated to the user.
rpc :BumpFee, BumpFeeRequest, BumpFeeResponse rpc :BumpFee, ::Walletrpc::BumpFeeRequest, ::Walletrpc::BumpFeeResponse
# #
# ListSweeps returns a list of the sweep transactions our node has produced. # ListSweeps returns a list of the sweep transactions our node has produced.
# Note that these sweeps may not be confirmed yet, as we record sweeps on # Note that these sweeps may not be confirmed yet, as we record sweeps on
# broadcast, not confirmation. # broadcast, not confirmation.
rpc :ListSweeps, ListSweepsRequest, ListSweepsResponse rpc :ListSweeps, ::Walletrpc::ListSweepsRequest, ::Walletrpc::ListSweepsResponse
# #
# LabelTransaction adds a label to a transaction. If the transaction already # LabelTransaction adds a label to a transaction. If the transaction already
# has a label the call will fail unless the overwrite bool is set. This will # has a label the call will fail unless the overwrite bool is set. This will
# overwrite the exiting transaction label. Labels must not be empty, and # overwrite the exiting transaction label. Labels must not be empty, and
# cannot exceed 500 characters. # cannot exceed 500 characters.
rpc :LabelTransaction, LabelTransactionRequest, LabelTransactionResponse rpc :LabelTransaction, ::Walletrpc::LabelTransactionRequest, ::Walletrpc::LabelTransactionResponse
#
# FundPsbt creates a fully populated PSBT that contains enough inputs to fund
# the outputs specified in the template. There are two ways of specifying a
# template: Either by passing in a PSBT with at least one output declared or
# by passing in a raw TxTemplate message.
#
# If there are no inputs specified in the template, coin selection is
# performed automatically. If the template does contain any inputs, it is
# assumed that full coin selection happened externally and no additional
# inputs are added. If the specified inputs aren't enough to fund the outputs
# with the given fee rate, an error is returned.
#
# After either selecting or verifying the inputs, all input UTXOs are locked
# with an internal app ID.
#
# NOTE: If this method returns without an error, it is the caller's
# responsibility to either spend the locked UTXOs (by finalizing and then
# publishing the transaction) or to unlock/release the locked UTXOs in case of
# an error on the caller's side.
rpc :FundPsbt, ::Walletrpc::FundPsbtRequest, ::Walletrpc::FundPsbtResponse
#
# SignPsbt expects a partial transaction with all inputs and outputs fully
# declared and tries to sign all unsigned inputs that have all required fields
# (UTXO information, BIP32 derivation information, witness or sig scripts)
# set.
# If no error is returned, the PSBT is ready to be given to the next signer or
# to be finalized if lnd was the last signer.
#
# NOTE: This RPC only signs inputs (and only those it can sign), it does not
# perform any other tasks (such as coin selection, UTXO locking or
# input/output/fee value validation, PSBT finalization). Any input that is
# incomplete will be skipped.
rpc :SignPsbt, ::Walletrpc::SignPsbtRequest, ::Walletrpc::SignPsbtResponse
#
# FinalizePsbt expects a partial transaction with all inputs and outputs fully
# declared and tries to sign all inputs that belong to the wallet. Lnd must be
# the last signer of the transaction. That means, if there are any unsigned
# non-witness inputs or inputs without UTXO information attached or inputs
# without witness data that do not belong to lnd's wallet, this method will
# fail. If no error is returned, the PSBT is ready to be extracted and the
# final TX within to be broadcast.
#
# NOTE: This method does NOT publish the transaction once finalized. It is the
# caller's responsibility to either publish the transaction on success or
# unlock/release any locked UTXOs in case of an error in this method.
rpc :FinalizePsbt, ::Walletrpc::FinalizePsbtRequest, ::Walletrpc::FinalizePsbtResponse
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

View File

@ -3,7 +3,8 @@
require 'google/protobuf' require 'google/protobuf'
require 'rpc_pb' require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("walletunlocker.proto", :syntax => :proto3) do add_file("walletunlocker.proto", :syntax => :proto3) do
add_message "lnrpc.GenSeedRequest" do add_message "lnrpc.GenSeedRequest" do
@ -20,21 +21,41 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :aezeed_passphrase, :bytes, 3 optional :aezeed_passphrase, :bytes, 3
optional :recovery_window, :int32, 4 optional :recovery_window, :int32, 4
optional :channel_backups, :message, 5, "lnrpc.ChanBackupSnapshot" optional :channel_backups, :message, 5, "lnrpc.ChanBackupSnapshot"
optional :stateless_init, :bool, 6
optional :extended_master_key, :string, 7
optional :extended_master_key_birthday_timestamp, :uint64, 8
optional :watch_only, :message, 9, "lnrpc.WatchOnly"
end end
add_message "lnrpc.InitWalletResponse" do add_message "lnrpc.InitWalletResponse" do
optional :admin_macaroon, :bytes, 1
end
add_message "lnrpc.WatchOnly" do
optional :master_key_birthday_timestamp, :uint64, 1
optional :master_key_fingerprint, :bytes, 2
repeated :accounts, :message, 3, "lnrpc.WatchOnlyAccount"
end
add_message "lnrpc.WatchOnlyAccount" do
optional :purpose, :uint32, 1
optional :coin_type, :uint32, 2
optional :account, :uint32, 3
optional :xpub, :string, 4
end end
add_message "lnrpc.UnlockWalletRequest" do add_message "lnrpc.UnlockWalletRequest" do
optional :wallet_password, :bytes, 1 optional :wallet_password, :bytes, 1
optional :recovery_window, :int32, 2 optional :recovery_window, :int32, 2
optional :channel_backups, :message, 3, "lnrpc.ChanBackupSnapshot" optional :channel_backups, :message, 3, "lnrpc.ChanBackupSnapshot"
optional :stateless_init, :bool, 4
end end
add_message "lnrpc.UnlockWalletResponse" do add_message "lnrpc.UnlockWalletResponse" do
end end
add_message "lnrpc.ChangePasswordRequest" do add_message "lnrpc.ChangePasswordRequest" do
optional :current_password, :bytes, 1 optional :current_password, :bytes, 1
optional :new_password, :bytes, 2 optional :new_password, :bytes, 2
optional :stateless_init, :bool, 3
optional :new_macaroon_root_key, :bool, 4
end end
add_message "lnrpc.ChangePasswordResponse" do add_message "lnrpc.ChangePasswordResponse" do
optional :admin_macaroon, :bytes, 1
end end
end end
end end
@ -44,6 +65,8 @@ module Lnrpc
GenSeedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GenSeedResponse").msgclass GenSeedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GenSeedResponse").msgclass
InitWalletRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletRequest").msgclass InitWalletRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletRequest").msgclass
InitWalletResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletResponse").msgclass InitWalletResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletResponse").msgclass
WatchOnly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WatchOnly").msgclass
WatchOnlyAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WatchOnlyAccount").msgclass
UnlockWalletRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletRequest").msgclass UnlockWalletRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletRequest").msgclass
UnlockWalletResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletResponse").msgclass UnlockWalletResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletResponse").msgclass
ChangePasswordRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChangePasswordRequest").msgclass ChangePasswordRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChangePasswordRequest").msgclass

View File

@ -27,7 +27,7 @@ module Lnrpc
# lnd at first startup, and unlock a previously set up wallet. # lnd at first startup, and unlock a previously set up wallet.
class Service class Service
include GRPC::GenericService include ::GRPC::GenericService
self.marshal_class_method = :encode self.marshal_class_method = :encode
self.unmarshal_class_method = :decode self.unmarshal_class_method = :decode
@ -42,7 +42,7 @@ module Lnrpc
# Once the cipherseed is obtained and verified by the user, the InitWallet # Once the cipherseed is obtained and verified by the user, the InitWallet
# method should be used to commit the newly generated seed, and create the # method should be used to commit the newly generated seed, and create the
# wallet. # wallet.
rpc :GenSeed, GenSeedRequest, GenSeedResponse rpc :GenSeed, ::Lnrpc::GenSeedRequest, ::Lnrpc::GenSeedResponse
# #
# InitWallet is used when lnd is starting up for the first time to fully # InitWallet is used when lnd is starting up for the first time to fully
# initialize the daemon and its internal wallet. At the very least a wallet # initialize the daemon and its internal wallet. At the very least a wallet
@ -56,15 +56,15 @@ module Lnrpc
# Alternatively, this can be used along with the GenSeed RPC to obtain a # Alternatively, this can be used along with the GenSeed RPC to obtain a
# seed, then present it to the user. Once it has been verified by the user, # seed, then present it to the user. Once it has been verified by the user,
# the seed can be fed into this RPC in order to commit the new wallet. # the seed can be fed into this RPC in order to commit the new wallet.
rpc :InitWallet, InitWalletRequest, InitWalletResponse rpc :InitWallet, ::Lnrpc::InitWalletRequest, ::Lnrpc::InitWalletResponse
# lncli: `unlock` # lncli: `unlock`
# UnlockWallet is used at startup of lnd to provide a password to unlock # UnlockWallet is used at startup of lnd to provide a password to unlock
# the wallet database. # the wallet database.
rpc :UnlockWallet, UnlockWalletRequest, UnlockWalletResponse rpc :UnlockWallet, ::Lnrpc::UnlockWalletRequest, ::Lnrpc::UnlockWalletResponse
# lncli: `changepassword` # lncli: `changepassword`
# ChangePassword changes the password of the encrypted wallet. This will # ChangePassword changes the password of the encrypted wallet. This will
# automatically unlock the wallet database if successful. # automatically unlock the wallet database if successful.
rpc :ChangePassword, ChangePasswordRequest, ChangePasswordResponse rpc :ChangePassword, ::Lnrpc::ChangePasswordRequest, ::Lnrpc::ChangePasswordResponse
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

View File

@ -10,7 +10,7 @@ module Watchtowerrpc
# functionality of the daemon. # functionality of the daemon.
class Service class Service
include GRPC::GenericService include ::GRPC::GenericService
self.marshal_class_method = :encode self.marshal_class_method = :encode
self.unmarshal_class_method = :decode self.unmarshal_class_method = :decode
@ -20,7 +20,7 @@ module Watchtowerrpc
# GetInfo returns general information concerning the companion watchtower # GetInfo returns general information concerning the companion watchtower
# including its public key and URIs where the server is currently # including its public key and URIs where the server is currently
# listening for clients. # listening for clients.
rpc :GetInfo, GetInfoRequest, GetInfoResponse rpc :GetInfo, ::Watchtowerrpc::GetInfoRequest, ::Watchtowerrpc::GetInfoResponse
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

View File

@ -26,6 +26,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :num_pending_backups, :uint32, 2 optional :num_pending_backups, :uint32, 2
optional :max_backups, :uint32, 3 optional :max_backups, :uint32, 3
optional :sweep_sat_per_byte, :uint32, 4 optional :sweep_sat_per_byte, :uint32, 4
optional :sweep_sat_per_vbyte, :uint32, 5
end end
add_message "wtclientrpc.Tower" do add_message "wtclientrpc.Tower" do
optional :pubkey, :bytes, 1 optional :pubkey, :bytes, 1
@ -50,10 +51,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :num_sessions_exhausted, :uint32, 5 optional :num_sessions_exhausted, :uint32, 5
end end
add_message "wtclientrpc.PolicyRequest" do add_message "wtclientrpc.PolicyRequest" do
optional :policy_type, :enum, 1, "wtclientrpc.PolicyType"
end end
add_message "wtclientrpc.PolicyResponse" do add_message "wtclientrpc.PolicyResponse" do
optional :max_updates, :uint32, 1 optional :max_updates, :uint32, 1
optional :sweep_sat_per_byte, :uint32, 2 optional :sweep_sat_per_byte, :uint32, 2
optional :sweep_sat_per_vbyte, :uint32, 3
end
add_enum "wtclientrpc.PolicyType" do
value :LEGACY, 0
value :ANCHOR, 1
end end
end end
end end
@ -72,4 +79,5 @@ module Wtclientrpc
StatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.StatsResponse").msgclass StatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.StatsResponse").msgclass
PolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyRequest").msgclass PolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyRequest").msgclass
PolicyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyResponse").msgclass PolicyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyResponse").msgclass
PolicyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyType").enummodule
end end

View File

@ -10,7 +10,7 @@ module Wtclientrpc
# functionality of the daemon. # functionality of the daemon.
class Service class Service
include GRPC::GenericService include ::GRPC::GenericService
self.marshal_class_method = :encode self.marshal_class_method = :encode
self.unmarshal_class_method = :decode self.unmarshal_class_method = :decode
@ -21,21 +21,21 @@ module Wtclientrpc
# considers it for new sessions. If the watchtower already exists, then # considers it for new sessions. If the watchtower already exists, then
# any new addresses included will be considered when dialing it for # any new addresses included will be considered when dialing it for
# session negotiations and backups. # session negotiations and backups.
rpc :AddTower, AddTowerRequest, AddTowerResponse rpc :AddTower, ::Wtclientrpc::AddTowerRequest, ::Wtclientrpc::AddTowerResponse
# #
# RemoveTower removes a watchtower from being considered for future session # RemoveTower removes a watchtower from being considered for future session
# negotiations and from being used for any subsequent backups until it's added # negotiations and from being used for any subsequent backups until it's added
# again. If an address is provided, then this RPC only serves as a way of # again. If an address is provided, then this RPC only serves as a way of
# removing the address from the watchtower instead. # removing the address from the watchtower instead.
rpc :RemoveTower, RemoveTowerRequest, RemoveTowerResponse rpc :RemoveTower, ::Wtclientrpc::RemoveTowerRequest, ::Wtclientrpc::RemoveTowerResponse
# ListTowers returns the list of watchtowers registered with the client. # ListTowers returns the list of watchtowers registered with the client.
rpc :ListTowers, ListTowersRequest, ListTowersResponse rpc :ListTowers, ::Wtclientrpc::ListTowersRequest, ::Wtclientrpc::ListTowersResponse
# GetTowerInfo retrieves information for a registered watchtower. # GetTowerInfo retrieves information for a registered watchtower.
rpc :GetTowerInfo, GetTowerInfoRequest, Tower rpc :GetTowerInfo, ::Wtclientrpc::GetTowerInfoRequest, ::Wtclientrpc::Tower
# Stats returns the in-memory statistics of the client since startup. # Stats returns the in-memory statistics of the client since startup.
rpc :Stats, StatsRequest, StatsResponse rpc :Stats, ::Wtclientrpc::StatsRequest, ::Wtclientrpc::StatsResponse
# Policy returns the active watchtower client policy configuration. # Policy returns the active watchtower client policy configuration.
rpc :Policy, PolicyRequest, PolicyResponse rpc :Policy, ::Wtclientrpc::PolicyRequest, ::Wtclientrpc::PolicyResponse
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

View File

@ -1,4 +1,5 @@
require "grpc" require "grpc"
require "digest"
require "lnrpc/macaroon_interceptor" require "lnrpc/macaroon_interceptor"
module Lnrpc module Lnrpc
class Client class Client
@ -13,14 +14,15 @@ module Lnrpc
self.address = options[:address] || DEFAULT_ADDRESS self.address = options[:address] || DEFAULT_ADDRESS
if options.has_key?(:credentials) if options.has_key?(:credentials)
self.credentials = options[:credentials] # if there are non hex values prvided we assume it's the certificate file as string otherwise we assume it's the hex value
elsif File.exists?(::File.expand_path(options[:credentials_path] || DEFAULT_CREDENTIALS_PATH)) self.credentials = options[:credentials].match?(/\H/) ? options[:credentials] : [options[:credentials]].pack('H*')
elsif File.exist?(::File.expand_path(options[:credentials_path] || DEFAULT_CREDENTIALS_PATH))
self.credentials = ::File.read(::File.expand_path(options[:credentials_path] || DEFAULT_CREDENTIALS_PATH)) self.credentials = ::File.read(::File.expand_path(options[:credentials_path] || DEFAULT_CREDENTIALS_PATH))
else else
self.credentials = nil self.credentials = nil
end end
if !options.has_key?(:macaroon) && File.exists?(::File.expand_path(options[:macaroon_path] || DEFAULT_MACAROON_PATH)) if !options.has_key?(:macaroon) && File.exist?(::File.expand_path(options[:macaroon_path] || DEFAULT_MACAROON_PATH))
options[:macaroon] = ::File.read(::File.expand_path(options[:macaroon_path] || DEFAULT_MACAROON_PATH)).unpack("H*") options[:macaroon] = ::File.read(::File.expand_path(options[:macaroon_path] || DEFAULT_MACAROON_PATH)).unpack("H*")
end end
self.macaroon = options[:macaroon] self.macaroon = options[:macaroon]

View File

@ -1,3 +1,3 @@
module Lnrpc module Lnrpc
VERSION = "0.11.0" VERSION = "0.15.5"
end end

View File

@ -25,10 +25,10 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib", "lib/grpc_services"] spec.require_paths = ["lib", "lib/grpc_services"]
spec.add_development_dependency "bundler", "~> 1.17" spec.add_development_dependency "bundler", "> 2.0"
spec.add_development_dependency "rake", "~> 13.0" spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "rspec", "~> 3.0" spec.add_development_dependency "rspec", "~> 3.0"
spec.add_dependency "grpc", ">= 1.19.0" spec.add_dependency "grpc", ">= 1.28.0"
spec.add_dependency "google-protobuf", ">=3.7" spec.add_dependency "google-protobuf", ">=3.15.7"
end end