1
0
mirror of https://github.com/bumi/lnrpc synced 2025-06-16 13:25:34 +00:00

Compare commits

..

No commits in common. "master" and "v0.8.0" have entirely different histories.

44 changed files with 4008 additions and 4589 deletions

2
.gitignore vendored
View File

@ -11,5 +11,3 @@
.rspec_status .rspec_status
.ruby-version .ruby-version
*.gem

View File

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

View File

@ -3,12 +3,13 @@
a [gRPC](https://grpc.io/) client for [LND, the Lightning Network Daemon](https://github.com/lightningnetwork/lnd/) packed as ruby gem. a [gRPC](https://grpc.io/) client for [LND, the Lightning Network Daemon](https://github.com/lightningnetwork/lnd/) packed as ruby gem.
## Installation ## Installation
Add this line to your application's Gemfile: Add this line to your application's Gemfile:
```ruby ```ruby
gem 'lnrpc', '~> 0.15.5' gem 'lnrpc', '~> 0.7.0'
``` ```
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)).
@ -24,17 +25,15 @@ Or install it yourself as:
## Usage ## Usage
This gem makes the gRPC client classes created from the [LND service definitions](https://github.com/lightningnetwork/lnd/tree/master/lnrpc) available. This gem makes the gRPC client classes created from the [LND service defintions](https://github.com/lightningnetwork/lnd/tree/master/lnrpc) available.
```ruby ```ruby
require "lnrpc" require "lnrpc"
# With the changes in LND v.10.0 this load the `Lnrpc` and `Routerrpc` namespace # the gRPC client is available under the Lnrpc namespace, e.g.
Lnrpc::Lightning::Stub Lnrpc::Lightning::Stub
Routerrpc::Routerrpc::Stub
Lnrpc::GetInfoRequest Lnrpc::GetInfoRequest
...
``` ```
Learn more about [gRPC](https://grpc.io/) on [gRPC.io](https://grpc.io/). Learn more about [gRPC](https://grpc.io/) on [gRPC.io](https://grpc.io/).
@ -56,26 +55,17 @@ client = Lnrpc::Lightning::Stub.new("localhost:10009", GRPC::Core::ChannelCreden
request = Lnrpc::GetInfoRequest.new request = Lnrpc::GetInfoRequest.new
response = client.get_info(request, { metadata: { macaroon: macaroon } }) #=> Lnrpc::GetInfoResponse response = client.get_info(request, { metadata: { macaroon: macaroon } }) #=> Lnrpc::GetInfoResponse
puts response.alias puts response.alias
router = Routerprc::Router::Stub.new("localhost:10009", GRPC::Core::ChannelCredentials.new(self.credentials))
...
``` ```
### Client wrapper ### Client wrapper
NOTE: v10.0 has breaking changes!
An optional client wrapper ([Lnrpc::Client](https://github.com/bumi/lnrpc/blob/master/lib/lnrpc/client.rb)) makes An optional client wrapper ([Lnrpc::Client](https://github.com/bumi/lnrpc/blob/master/lib/lnrpc/client.rb)) makes
initializing the gRPC client easier and removes the need for some boilerplate code for calling RPC methods. initializing the gRPC client easier and removes the need for some boilerplate code for calling RPC methods.
#### Example #### Example
```ruby ```ruby
lnd = Lnrpc::Client.new({credentials_path: '/path/to.cert.cls', macaroon_path: '/path/to/admin.macaroon'}) lnd = Lnrpc::Client.new({credentials_path: '/path/to.cert.cls', macaroon_path: '/path/to/admin.macaroon'})
lnd.lightning # => Lnrpc::Lightning::Stub lnd.get_info
lnd.router # => Lnrpc::Router::Stub
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)
@ -106,8 +96,7 @@ lnd = Lnrpc::Client.new({
}) })
# the actual gRPC client is available through: # the actual gRPC client is available through:
lnd.lightning.grpc lnd.grpc_client
lnd.router.grpc
``` ```
#### Calling RPC methods #### Calling RPC methods
@ -119,19 +108,19 @@ If the first parameter is a hash or blank the corresponding gRPC request object
Example: Example:
```ruby ```ruby
client.lightning.get_info client.get_info
# is the same as: # is the same as:
client.lightning.grpc.get_info(Lnrpc::GetInfoRequest.new) client.grpc_client.get_info(Lnrpc::GetInfoRequest.new)
client.lightning.list_channels(inactive_only: true) client.list_channels(inactive_only: true)
# is the same as: # is the same as:
request = Lnrpc::ListChannelsRequest.new(inactive_only: true) request = Lnrpc::ListChannelsRequest.new(inactive_only: true)
client.lightning.grpc.list_channels(request) client.grpc_client.list_channels(request)
client.lightning.wallet_balance.total_balance client.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.grpc_client.wallet_balance(request).total_balance
``` ```
## Using with BTC Pay Server ## Using with BTC Pay Server
@ -141,7 +130,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)
@ -156,13 +145,13 @@ see [rubygems](https://rubygems.org/gems/lnrpc) for all available releases.
### Update service definitions ### Update service definitions
The script `generate-grpc-service-files.sh` can be used to generate the GRPC ruby files. 1. Generate `prc_pb.rb` and `rpc_services_pb.rb`
The files will be stored in `lib/grpc_services`
$ ./generate-grpc-service-files.sh $ grpc_tools_ruby_protoc -I/usr/local/include -I. -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --ruby_out=plugins=grpc,paths=source_relative:. --grpc_out=. rpc.proto
+ Make sure you have the [grpc-tools](https://rubygems.org/gems/grpc-tools) installed 2. Copy `rpc.proto`, `rpc_pb.rb` and `rpc_services_pb.rb` to `lib`
+ Make sure you have the lnd source in your $GOPATH/src folder
3. Update `rpc_services_pb.rb` to use `require_relative` to load `rpc_pb`
## Other resources ## Other resources

View File

@ -1,100 +1,19 @@
require "lnrpc" require "lnrpc"
# establish a connection lnd = Lnrpc::Client.new() # use defaults for credentials, macaraoon and address
lnd = Lnrpc::Client.new() # use defaults for credentials, macaroon and address
# get basic info get_info_res = lnd.get_info
get_info_res = lnd.lightning.get_info
puts get_info_res.alias puts get_info_res.alias
# get wallet balance puts lnd.wallet_balance.total_balance
puts lnd.lightning.wallet_balance.total_balance
# pay an invoice
pay_request = "lntb50u1pw9mmndpp5nvnff958pxc9eqknwntyxapjw7l5grt5e2y70cmmnu0lljfa0sdqdpsgfkx7cmtwd68yetpd5s9xct5v4kxc6t5v5s8yatz0ysxwetdcqzysxqyz5vqjkhlyn40z76gyn7dx32p9j58dftve9xrlvnqqazht7w2fdauukhyhr9y4k3ngjn8s6srglj8swk7tm70ng54wdkq47ahytpwffvaeusp500csz" pay_request = "lntb50u1pw9mmndpp5nvnff958pxc9eqknwntyxapjw7l5grt5e2y70cmmnu0lljfa0sdqdpsgfkx7cmtwd68yetpd5s9xct5v4kxc6t5v5s8yatz0ysxwetdcqzysxqyz5vqjkhlyn40z76gyn7dx32p9j58dftve9xrlvnqqazht7w2fdauukhyhr9y4k3ngjn8s6srglj8swk7tm70ng54wdkq47ahytpwffvaeusp500csz"
lnd.pay(payment_request: pay_request) # or: lnd.pay(pay_request) # or:
lnd.router.send_payment_v2(payment_request: pay_request) lnd.send_payment_sync(payment_request: pay_request)
# keysend payment invoice_res = lnd.add_invoice(value: 1000, memo: 'I :heart: ruby')
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')
puts invoice_res.payment_request puts invoice_res.payment_request
# get fee estimates lnd.subscribe_invoices(settle_index: 1).each do |invoice|
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|
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

@ -1,29 +0,0 @@
#!/bin/sh
set -o xtrace
FULL_PATH=$(realpath $0)
GEM_DIR=$(dirname $FULL_PATH)
LNRPC_TARGET_DIR="$GEM_DIR/lib/grpc_services"
CURRENT_DIR=$(pwd)
echo $CURRENT_DIR
cd $GOPATH/src/github.com/lightningnetwork/lnd/lnrpc
echo "Generating Ruby GRPC Service Files"
PROTOS="lightning.proto walletunlocker.proto stateservice.proto **/*.proto"
# generate files for each proto
for file in $PROTOS; do
DIRECTORY=$(dirname "${file}")
echo "Generating protos from ${file}, into ${LNRPC_TARGET_DIR}/${DIRECTORY}"
# writes all ruby files in the ruby directory
grpc_tools_ruby_protoc -I. \
-I$GOPATH/src/github.com/googleapis/googleapis \
-I$GOPATH/src/github.com/lightningnetwork/lnd/lnrpc \
--ruby_out=plugins=grpc,paths=source_relative:${LNRPC_TARGET_DIR} \
--grpc_out=${LNRPC_TARGET_DIR} "${file}"
done
cd $CURRENT_DIR

View File

@ -1,48 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: autopilotrpc/autopilot.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("autopilotrpc/autopilot.proto", :syntax => :proto3) do
add_message "autopilotrpc.StatusRequest" do
end
add_message "autopilotrpc.StatusResponse" do
optional :active, :bool, 1
end
add_message "autopilotrpc.ModifyStatusRequest" do
optional :enable, :bool, 1
end
add_message "autopilotrpc.ModifyStatusResponse" do
end
add_message "autopilotrpc.QueryScoresRequest" do
repeated :pubkeys, :string, 1
optional :ignore_local_state, :bool, 2
end
add_message "autopilotrpc.QueryScoresResponse" do
repeated :results, :message, 1, "autopilotrpc.QueryScoresResponse.HeuristicResult"
end
add_message "autopilotrpc.QueryScoresResponse.HeuristicResult" do
optional :heuristic, :string, 1
map :scores, :string, :double, 2
end
add_message "autopilotrpc.SetScoresRequest" do
optional :heuristic, :string, 1
map :scores, :string, :double, 2
end
add_message "autopilotrpc.SetScoresResponse" do
end
end
end
module Autopilotrpc
StatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.StatusRequest").msgclass
StatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.StatusResponse").msgclass
ModifyStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.ModifyStatusRequest").msgclass
ModifyStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.ModifyStatusResponse").msgclass
QueryScoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.QueryScoresRequest").msgclass
QueryScoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.QueryScoresResponse").msgclass
QueryScoresResponse::HeuristicResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.QueryScoresResponse.HeuristicResult").msgclass
SetScoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.SetScoresRequest").msgclass
SetScoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.SetScoresResponse").msgclass
end

View File

@ -1,40 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: autopilotrpc/autopilot.proto for package 'autopilotrpc'
require 'grpc'
require 'autopilotrpc/autopilot_pb'
module Autopilotrpc
module Autopilot
# Autopilot is a service that can be used to get information about the current
# state of the daemon's autopilot agent, and also supply it with information
# that can be used when deciding where to open channels.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'autopilotrpc.Autopilot'
#
# Status returns whether the daemon's autopilot agent is active.
rpc :Status, ::Autopilotrpc::StatusRequest, ::Autopilotrpc::StatusResponse
#
# ModifyStatus is used to modify the status of the autopilot agent, like
# enabling or disabling it.
rpc :ModifyStatus, ::Autopilotrpc::ModifyStatusRequest, ::Autopilotrpc::ModifyStatusResponse
#
# QueryScores queries all available autopilot heuristics, in addition to any
# active combination of these heruristics, for the scores they would give to
# the given nodes.
rpc :QueryScores, ::Autopilotrpc::QueryScoresRequest, ::Autopilotrpc::QueryScoresResponse
#
# SetScores attempts to set the scores used by the running autopilot agent,
# if the external scoring heuristic is enabled.
rpc :SetScores, ::Autopilotrpc::SetScoresRequest, ::Autopilotrpc::SetScoresResponse
end
Stub = Service.rpc_stub_class
end
end

View File

@ -1,67 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: chainrpc/chainnotifier.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("chainrpc/chainnotifier.proto", :syntax => :proto3) do
add_message "chainrpc.ConfRequest" do
optional :txid, :bytes, 1
optional :script, :bytes, 2
optional :num_confs, :uint32, 3
optional :height_hint, :uint32, 4
end
add_message "chainrpc.ConfDetails" do
optional :raw_tx, :bytes, 1
optional :block_hash, :bytes, 2
optional :block_height, :uint32, 3
optional :tx_index, :uint32, 4
end
add_message "chainrpc.Reorg" do
end
add_message "chainrpc.ConfEvent" do
oneof :event do
optional :conf, :message, 1, "chainrpc.ConfDetails"
optional :reorg, :message, 2, "chainrpc.Reorg"
end
end
add_message "chainrpc.Outpoint" do
optional :hash, :bytes, 1
optional :index, :uint32, 2
end
add_message "chainrpc.SpendRequest" do
optional :outpoint, :message, 1, "chainrpc.Outpoint"
optional :script, :bytes, 2
optional :height_hint, :uint32, 3
end
add_message "chainrpc.SpendDetails" do
optional :spending_outpoint, :message, 1, "chainrpc.Outpoint"
optional :raw_spending_tx, :bytes, 2
optional :spending_tx_hash, :bytes, 3
optional :spending_input_index, :uint32, 4
optional :spending_height, :uint32, 5
end
add_message "chainrpc.SpendEvent" do
oneof :event do
optional :spend, :message, 1, "chainrpc.SpendDetails"
optional :reorg, :message, 2, "chainrpc.Reorg"
end
end
add_message "chainrpc.BlockEpoch" do
optional :hash, :bytes, 1
optional :height, :uint32, 2
end
end
end
module Chainrpc
ConfRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.ConfRequest").msgclass
ConfDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.ConfDetails").msgclass
Reorg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.Reorg").msgclass
ConfEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.ConfEvent").msgclass
Outpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.Outpoint").msgclass
SpendRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.SpendRequest").msgclass
SpendDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.SpendDetails").msgclass
SpendEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.SpendEvent").msgclass
BlockEpoch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.BlockEpoch").msgclass
end

View File

@ -1,53 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: chainrpc/chainnotifier.proto for package 'chainrpc'
require 'grpc'
require 'chainrpc/chainnotifier_pb'
module Chainrpc
module ChainNotifier
# ChainNotifier is a service that can be used to get information about the
# chain backend by registering notifiers for chain events.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'chainrpc.ChainNotifier'
#
# RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
# registers an intent for a client to be notified once a confirmation request
# has reached its required number of confirmations on-chain.
#
# A confirmation request must have a valid output script. It is also possible
# to give a transaction ID. If the transaction ID is not set, a notification
# is sent once the output script confirms. If the transaction ID is also set,
# 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
# intent for a client to be notification once a spend request has been spent
# by a transaction that has confirmed on-chain.
#
# A client can specify whether the spend request should be for a particular
# outpoint or for an output script by specifying a zero outpoint.
rpc :RegisterSpendNtfn, ::Chainrpc::SpendRequest, stream(::Chainrpc::SpendEvent)
#
# RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
# registers an intent for a client to be notified of blocks in the chain. The
# stream will return a hash and height tuple of a block for each new/stale
# block in the chain. It is the client's responsibility to determine whether
# the tuple returned is for a new or stale block in the chain.
#
# 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
# missing processing a single block within the chain.
rpc :RegisterBlockEpochNtfn, ::Chainrpc::BlockEpoch, stream(::Chainrpc::BlockEpoch)
end
Stub = Service.rpc_stub_class
end
end

View File

@ -1,17 +0,0 @@
# 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

@ -1,25 +0,0 @@
# 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

@ -1,66 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: invoicesrpc/invoices.proto
require 'google/protobuf'
require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("invoicesrpc/invoices.proto", :syntax => :proto3) do
add_message "invoicesrpc.CancelInvoiceMsg" do
optional :payment_hash, :bytes, 1
end
add_message "invoicesrpc.CancelInvoiceResp" do
end
add_message "invoicesrpc.AddHoldInvoiceRequest" do
optional :memo, :string, 1
optional :hash, :bytes, 2
optional :value, :int64, 3
optional :value_msat, :int64, 10
optional :description_hash, :bytes, 4
optional :expiry, :int64, 5
optional :fallback_addr, :string, 6
optional :cltv_expiry, :uint64, 7
repeated :route_hints, :message, 8, "lnrpc.RouteHint"
optional :private, :bool, 9
end
add_message "invoicesrpc.AddHoldInvoiceResp" do
optional :payment_request, :string, 1
optional :add_index, :uint64, 2
optional :payment_addr, :bytes, 3
end
add_message "invoicesrpc.SettleInvoiceMsg" do
optional :preimage, :bytes, 1
end
add_message "invoicesrpc.SettleInvoiceResp" do
end
add_message "invoicesrpc.SubscribeSingleInvoiceRequest" do
optional :r_hash, :bytes, 2
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
module Invoicesrpc
CancelInvoiceMsg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.CancelInvoiceMsg").msgclass
CancelInvoiceResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.CancelInvoiceResp").msgclass
AddHoldInvoiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.AddHoldInvoiceRequest").msgclass
AddHoldInvoiceResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.AddHoldInvoiceResp").msgclass
SettleInvoiceMsg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SettleInvoiceMsg").msgclass
SettleInvoiceResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SettleInvoiceResp").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

View File

@ -1,45 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: invoicesrpc/invoices.proto for package 'invoicesrpc'
require 'grpc'
require 'invoicesrpc/invoices_pb'
module Invoicesrpc
module Invoices
# Invoices is a service that can be used to create, accept, settle and cancel
# invoices.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'invoicesrpc.Invoices'
#
# SubscribeSingleInvoice returns a uni-directional stream (server -> client)
# to notify the client of state transitions of the specified invoice.
# Initially the current invoice state is always sent out.
rpc :SubscribeSingleInvoice, ::Invoicesrpc::SubscribeSingleInvoiceRequest, stream(::Lnrpc::Invoice)
#
# CancelInvoice cancels a currently open invoice. If the invoice is already
# canceled, this call will succeed. If the invoice is already settled, it will
# fail.
rpc :CancelInvoice, ::Invoicesrpc::CancelInvoiceMsg, ::Invoicesrpc::CancelInvoiceResp
#
# AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
# supplied in the request.
rpc :AddHoldInvoice, ::Invoicesrpc::AddHoldInvoiceRequest, ::Invoicesrpc::AddHoldInvoiceResp
#
# SettleInvoice settles an accepted invoice. If the invoice is already
# settled, this call will succeed.
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
Stub = Service.rpc_stub_class
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,436 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: lightning.proto for package 'lnrpc'
require 'grpc'
require 'lightning_pb'
module Lnrpc
module Lightning
#
# 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
#
# Lightning is the main RPC server of the daemon.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'lnrpc.Lightning'
# lncli: `walletbalance`
# WalletBalance returns total unspent outputs(confirmed and unconfirmed), all
# confirmed unspent outputs and all unconfirmed unspent outputs under control
# of the wallet.
rpc :WalletBalance, ::Lnrpc::WalletBalanceRequest, ::Lnrpc::WalletBalanceResponse
# lncli: `channelbalance`
# ChannelBalance returns a report on the total funds across all open channels,
# categorized in local/remote, pending local/remote and unsettled local/remote
# balances.
rpc :ChannelBalance, ::Lnrpc::ChannelBalanceRequest, ::Lnrpc::ChannelBalanceResponse
# lncli: `listchaintxns`
# GetTransactions returns a list describing all the known transactions
# relevant to the wallet.
rpc :GetTransactions, ::Lnrpc::GetTransactionsRequest, ::Lnrpc::TransactionDetails
# lncli: `estimatefee`
# EstimateFee asks the chain backend to estimate the fee rate and total fees
# for a transaction that pays to multiple specified outputs.
#
# When using REST, the `AddrToAmount` map type can be set by appending
# `&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
# the grpc-gateway library.
rpc :EstimateFee, ::Lnrpc::EstimateFeeRequest, ::Lnrpc::EstimateFeeResponse
# lncli: `sendcoins`
# 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
# 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
# target.
rpc :SendCoins, ::Lnrpc::SendCoinsRequest, ::Lnrpc::SendCoinsResponse
# lncli: `listunspent`
# Deprecated, use walletrpc.ListUnspent instead.
#
# ListUnspent returns a list of all utxos spendable by the wallet with a
# number of confirmations between the specified minimum and maximum.
rpc :ListUnspent, ::Lnrpc::ListUnspentRequest, ::Lnrpc::ListUnspentResponse
#
# SubscribeTransactions creates a uni-directional stream from the server to
# the client in which any newly discovered transactions relevant to the
# wallet are sent over.
rpc :SubscribeTransactions, ::Lnrpc::GetTransactionsRequest, stream(::Lnrpc::Transaction)
# lncli: `sendmany`
# SendMany handles a request for a transaction that creates multiple specified
# 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
# default confirmation target.
rpc :SendMany, ::Lnrpc::SendManyRequest, ::Lnrpc::SendManyResponse
# lncli: `newaddress`
# NewAddress creates a new address under control of the local wallet.
rpc :NewAddress, ::Lnrpc::NewAddressRequest, ::Lnrpc::NewAddressResponse
# lncli: `signmessage`
# SignMessage signs a message with this node's private key. The returned
# signature string is `zbase32` encoded and pubkey recoverable, meaning that
# only the message digest and signature are needed for verification.
rpc :SignMessage, ::Lnrpc::SignMessageRequest, ::Lnrpc::SignMessageResponse
# lncli: `verifymessage`
# VerifyMessage verifies a signature over a msg. The signature must be
# zbase32 encoded and signed by an active node in the resident node's
# channel database. In addition to returning the validity of the signature,
# VerifyMessage also returns the recovered pubkey from the signature.
rpc :VerifyMessage, ::Lnrpc::VerifyMessageRequest, ::Lnrpc::VerifyMessageResponse
# lncli: `connect`
# 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
# distinct from establishing a channel with a peer.
rpc :ConnectPeer, ::Lnrpc::ConnectPeerRequest, ::Lnrpc::ConnectPeerResponse
# lncli: `disconnect`
# 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
# with the target peer, then this action will be not be allowed.
rpc :DisconnectPeer, ::Lnrpc::DisconnectPeerRequest, ::Lnrpc::DisconnectPeerResponse
# lncli: `listpeers`
# ListPeers returns a verbose listing of all currently active peers.
rpc :ListPeers, ::Lnrpc::ListPeersRequest, ::Lnrpc::ListPeersResponse
#
# SubscribePeerEvents creates a uni-directional stream from the server to
# the client in which any events relevant to the state of peers are sent
# over. Events include peers going online and offline.
rpc :SubscribePeerEvents, ::Lnrpc::PeerEventSubscription, stream(::Lnrpc::PeerEvent)
# lncli: `getinfo`
# GetInfo returns general information concerning the lightning node including
# it's identity pubkey, alias, the chains it is connected to, and information
# concerning the number of open+pending channels.
rpc :GetInfo, ::Lnrpc::GetInfoRequest, ::Lnrpc::GetInfoResponse
# * lncli: `getrecoveryinfo`
# GetRecoveryInfo returns information concerning the recovery mode including
# whether it's in a recovery mode, whether the recovery is finished, and the
# progress made so far.
rpc :GetRecoveryInfo, ::Lnrpc::GetRecoveryInfoRequest, ::Lnrpc::GetRecoveryInfoResponse
# TODO(roasbeef): merge with below with bool?
#
# lncli: `pendingchannels`
# PendingChannels returns a list of all the channels that are currently
# 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
# process of closure, either initiated cooperatively or non-cooperatively.
rpc :PendingChannels, ::Lnrpc::PendingChannelsRequest, ::Lnrpc::PendingChannelsResponse
# lncli: `listchannels`
# ListChannels returns a description of all the open channels that this node
# is a participant in.
rpc :ListChannels, ::Lnrpc::ListChannelsRequest, ::Lnrpc::ListChannelsResponse
#
# SubscribeChannelEvents creates a uni-directional stream from the server to
# 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
# channels.
rpc :SubscribeChannelEvents, ::Lnrpc::ChannelEventSubscription, stream(::Lnrpc::ChannelEventUpdate)
# lncli: `closedchannels`
# ClosedChannels returns a description of all the closed channels that
# this node was a participant in.
rpc :ClosedChannels, ::Lnrpc::ClosedChannelsRequest, ::Lnrpc::ClosedChannelsResponse
#
# 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
# other sync calls, all byte slices are intended to be populated as hex
# encoded strings.
rpc :OpenChannelSync, ::Lnrpc::OpenChannelRequest, ::Lnrpc::ChannelPoint
# lncli: `openchannel`
# 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
# blocks that the funding transaction should be confirmed in, or a manual fee
# rate to us for the funding transaction. If neither are specified, then a
# lax block confirmation target is used. Each OpenStatusUpdate will return
# the pending channel ID of the in-progress channel. Depending on the
# arguments specified in the OpenChannelRequest, this pending channel ID can
# then be used to manually progress the channel funding flow.
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
# to either execute some preparatory steps for a funding workflow, or
# manually progress a funding workflow. The primary way a funding flow is
# identified is via its pending channel ID. As an example, this method can be
# used to specify that we're expecting a funding flow for a particular
# pending channel ID, for which we need to use specific parameters.
# Alternatively, this can be used to interactively drive PSBT signing for
# funding for partially complete funding transactions.
rpc :FundingStateStep, ::Lnrpc::FundingTransitionMsg, ::Lnrpc::FundingStateStepResp
#
# ChannelAcceptor dispatches a bi-directional streaming RPC in which
# 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
# node operators to specify their own criteria for accepting inbound channels
# through a single persistent connection.
rpc :ChannelAcceptor, stream(::Lnrpc::ChannelAcceptResponse), stream(::Lnrpc::ChannelAcceptRequest)
# lncli: `closechannel`
# CloseChannel attempts to close an active channel identified by its channel
# outpoint (ChannelPoint). The actions of this method can additionally be
# augmented to attempt a force close after a timeout period in the case of an
# inactive peer. If a non-force close (cooperative closure) is requested,
# 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
# specified, then a default lax, block confirmation target is used.
rpc :CloseChannel, ::Lnrpc::CloseChannelRequest, stream(::Lnrpc::CloseStatusUpdate)
# lncli: `abandonchannel`
# AbandonChannel removes all channel state from the database except for a
# close summary. This method can be used to get rid of permanently unusable
# channels due to bugs fixed in newer versions of lnd. This method can also be
# used to remove externally funded channels where the funding transaction was
# never broadcast. Only available for non-externally funded channels in dev
# build.
rpc :AbandonChannel, ::Lnrpc::AbandonChannelRequest, ::Lnrpc::AbandonChannelResponse
# lncli: `sendpayment`
# Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a
# bi-directional streaming RPC for sending payments through the Lightning
# Network. A single RPC invocation creates a persistent bi-directional
# stream allowing clients to rapidly send payments through the Lightning
# Network with a single persistent connection.
rpc :SendPayment, stream(::Lnrpc::SendRequest), stream(::Lnrpc::SendResponse)
#
# SendPaymentSync is the synchronous non-streaming version of SendPayment.
# 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
# hash (if any) to be encoded as hex strings.
rpc :SendPaymentSync, ::Lnrpc::SendRequest, ::Lnrpc::SendResponse
# lncli: `sendtoroute`
# Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional
# streaming RPC for sending payment through the Lightning Network. This
# 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
# swaps.
rpc :SendToRoute, stream(::Lnrpc::SendToRouteRequest), stream(::Lnrpc::SendResponse)
#
# SendToRouteSync is a synchronous version of SendToRoute. It Will block
# until the payment either fails or succeeds.
rpc :SendToRouteSync, ::Lnrpc::SendToRouteRequest, ::Lnrpc::SendResponse
# lncli: `addinvoice`
# AddInvoice attempts to add a new invoice to the invoice database. Any
# duplicated invoices are rejected, therefore all invoices *must* have a
# unique payment preimage.
rpc :AddInvoice, ::Lnrpc::Invoice, ::Lnrpc::AddInvoiceResponse
# lncli: `listinvoices`
# ListInvoices returns a list of all the invoices currently stored within the
# database. Any active debug invoices are ignored. It has full support for
# paginated responses, allowing users to query for specific invoices through
# their add_index. This can be done by using either the first_index_offset or
# 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.
# Backwards pagination is also supported through the Reversed flag.
rpc :ListInvoices, ::Lnrpc::ListInvoiceRequest, ::Lnrpc::ListInvoiceResponse
# lncli: `lookupinvoice`
# 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
# returned.
rpc :LookupInvoice, ::Lnrpc::PaymentHash, ::Lnrpc::Invoice
#
# SubscribeInvoices returns a uni-directional stream (server -> client) for
# notifying the client of newly added/settled invoices. The caller can
# optionally specify the add_index and/or the settle_index. If the add_index
# is specified, then we'll first start by sending add invoice events for all
# invoices with an add_index greater than the specified value. If the
# settle_index is specified, the next, we'll send out all settle events for
# 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
# the latest add/settle events.
rpc :SubscribeInvoices, ::Lnrpc::InvoiceSubscription, stream(::Lnrpc::Invoice)
# lncli: `decodepayreq`
# DecodePayReq takes an encoded payment request string and attempts to decode
# it, returning a full description of the conditions encoded within the
# payment request.
rpc :DecodePayReq, ::Lnrpc::PayReqString, ::Lnrpc::PayReq
# lncli: `listpayments`
# ListPayments returns a list of all outgoing payments.
rpc :ListPayments, ::Lnrpc::ListPaymentsRequest, ::Lnrpc::ListPaymentsResponse
#
# DeletePayment deletes an outgoing payment from DB. Note that it will not
# 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`
# DescribeGraph returns a description of the latest graph state from the
# point of view of the node. The graph information is partitioned into two
# components: all the nodes/vertexes, and all the edges that connect the
# vertexes themselves. As this is a directed graph, the edges also contain
# the node directional specific routing policy which includes: the time lock
# delta, fee information, etc.
rpc :DescribeGraph, ::Lnrpc::ChannelGraphRequest, ::Lnrpc::ChannelGraph
# lncli: `getnodemetrics`
# GetNodeMetrics returns node metrics calculated from the graph. Currently
# the only supported metric is betweenness centrality of individual nodes.
rpc :GetNodeMetrics, ::Lnrpc::NodeMetricsRequest, ::Lnrpc::NodeMetricsResponse
# lncli: `getchaninfo`
# GetChanInfo returns the latest authenticated network announcement for the
# given channel identified by its channel ID: an 8-byte integer which
# uniquely identifies the location of transaction's funding output within the
# blockchain.
rpc :GetChanInfo, ::Lnrpc::ChanInfoRequest, ::Lnrpc::ChannelEdge
# lncli: `getnodeinfo`
# GetNodeInfo returns the latest advertised, aggregated, and authenticated
# channel information for the specified node identified by its public key.
rpc :GetNodeInfo, ::Lnrpc::NodeInfoRequest, ::Lnrpc::NodeInfo
# lncli: `queryroutes`
# QueryRoutes attempts to query the daemon's Channel Router for a possible
# route to a target destination capable of carrying a specific amount of
# satoshis. The returned route contains the full details required to craft and
# send an HTLC, also including the necessary information that should be
# present within the Sphinx packet encapsulated within the HTLC.
#
# When using REST, the `dest_custom_records` map type can be set by appending
# `&dest_custom_records[<record_number>]=<record_data_base64_url_encoded>`
# to the URL. Unfortunately this map type doesn't appear in the REST API
# documentation because of a bug in the grpc-gateway library.
rpc :QueryRoutes, ::Lnrpc::QueryRoutesRequest, ::Lnrpc::QueryRoutesResponse
# lncli: `getnetworkinfo`
# GetNetworkInfo returns some basic stats about the known channel graph from
# the point of view of the node.
rpc :GetNetworkInfo, ::Lnrpc::NetworkInfoRequest, ::Lnrpc::NetworkInfo
# lncli: `stop`
# StopDaemon will send a shutdown request to the interrupt handler, triggering
# a graceful shutdown of the daemon.
rpc :StopDaemon, ::Lnrpc::StopRequest, ::Lnrpc::StopResponse
#
# SubscribeChannelGraph launches a streaming RPC that allows the caller to
# receive notifications upon any changes to the channel graph topology from
# the point of view of the responding node. Events notified include: new
# nodes coming online, nodes updating their authenticated attributes, new
# channels being advertised, updates in the routing policy for a directional
# channel edge, and when channels are closed on-chain.
rpc :SubscribeChannelGraph, ::Lnrpc::GraphTopologySubscription, stream(::Lnrpc::GraphTopologyUpdate)
# lncli: `debuglevel`
# DebugLevel allows a caller to programmatically set the logging verbosity of
# 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
# sub-system.
rpc :DebugLevel, ::Lnrpc::DebugLevelRequest, ::Lnrpc::DebugLevelResponse
# lncli: `feereport`
# FeeReport allows the caller to obtain a report detailing the current fee
# schedule enforced by the node globally for each channel.
rpc :FeeReport, ::Lnrpc::FeeReportRequest, ::Lnrpc::FeeReportResponse
# lncli: `updatechanpolicy`
# UpdateChannelPolicy allows the caller to update the fee schedule and
# channel policies for all channels globally, or a particular channel.
rpc :UpdateChannelPolicy, ::Lnrpc::PolicyUpdateRequest, ::Lnrpc::PolicyUpdateResponse
# lncli: `fwdinghistory`
# ForwardingHistory allows the caller to query the htlcswitch for a record of
# all HTLCs forwarded within the target time range, and integer offset
# within that time range, for a maximum number of events. If no maximum number
# 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
# 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
# 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.
rpc :ForwardingHistory, ::Lnrpc::ForwardingHistoryRequest, ::Lnrpc::ForwardingHistoryResponse
# lncli: `exportchanbackup`
# ExportChannelBackup attempts to return an encrypted static channel backup
# for the target channel identified by it channel point. The backup is
# encrypted with a key generated from the aezeed seed of the user. The
# returned backup can either be restored using the RestoreChannelBackup
# method once lnd is running, or via the InitWallet and UnlockWallet methods
# from the WalletUnlocker service.
rpc :ExportChannelBackup, ::Lnrpc::ExportChannelBackupRequest, ::Lnrpc::ChannelBackup
#
# ExportAllChannelBackups returns static channel backups for all existing
# channels known to lnd. A set of regular singular static channel backups for
# each channel are returned. Additionally, a multi-channel backup is returned
# as well, which contains a single encrypted blob containing the backups of
# each channel.
rpc :ExportAllChannelBackups, ::Lnrpc::ChanBackupExportRequest, ::Lnrpc::ChanBackupSnapshot
#
# 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.
# Specifying both will result in an error.
rpc :VerifyChanBackup, ::Lnrpc::ChanBackupSnapshot, ::Lnrpc::VerifyChanBackupResponse
# lncli: `restorechanbackup`
# RestoreChannelBackups accepts a set of singular channel backups, or a
# 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
# new channel will be shown under listchannels, as well as pending channels.
rpc :RestoreChannelBackups, ::Lnrpc::RestoreChanBackupRequest, ::Lnrpc::RestoreBackupResponse
#
# SubscribeChannelBackups allows a client to sub-subscribe to the most up to
# date information concerning the state of all channel backups. Each time a
# new channel is added, we return the new set of channels, along with a
# multi-chan backup containing the backup info for all channels. Each time a
# 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
# channel(s) removed.
rpc :SubscribeChannelBackups, ::Lnrpc::ChannelBackupSubscription, stream(::Lnrpc::ChanBackupSnapshot)
# lncli: `bakemacaroon`
# 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
# offline.
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
Stub = Service.rpc_stub_class
end
end

View File

@ -1,19 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: lnclipb/lncli.proto
require 'google/protobuf'
require 'verrpc/verrpc_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("lnclipb/lncli.proto", :syntax => :proto3) do
add_message "lnclipb.VersionResponse" do
optional :lncli, :message, 1, "verrpc.Version"
optional :lnd, :message, 2, "verrpc.Version"
end
end
end
module Lnclipb
VersionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnclipb.VersionResponse").msgclass
end

View File

@ -1,106 +0,0 @@
# 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

@ -1,51 +0,0 @@
# 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

@ -1,48 +0,0 @@
# 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

@ -1,27 +0,0 @@
# 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

@ -1,284 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: routerrpc/router.proto
require 'google/protobuf'
require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("routerrpc/router.proto", :syntax => :proto3) do
add_message "routerrpc.SendPaymentRequest" do
optional :dest, :bytes, 1
optional :amt, :int64, 2
optional :amt_msat, :int64, 12
optional :payment_hash, :bytes, 3
optional :final_cltv_delta, :int32, 4
optional :payment_addr, :bytes, 20
optional :payment_request, :string, 5
optional :timeout_seconds, :int32, 6
optional :fee_limit_sat, :int64, 7
optional :fee_limit_msat, :int64, 13
optional :outgoing_chan_id, :uint64, 8
repeated :outgoing_chan_ids, :uint64, 19
optional :last_hop_pubkey, :bytes, 14
optional :cltv_limit, :int32, 9
repeated :route_hints, :message, 10, "lnrpc.RouteHint"
map :dest_custom_records, :uint64, :bytes, 11
optional :allow_self_payment, :bool, 15
repeated :dest_features, :enum, 16, "lnrpc.FeatureBit"
optional :max_parts, :uint32, 17
optional :no_inflight_updates, :bool, 18
optional :max_shard_size_msat, :uint64, 21
optional :amp, :bool, 22
optional :time_pref, :double, 23
end
add_message "routerrpc.TrackPaymentRequest" do
optional :payment_hash, :bytes, 1
optional :no_inflight_updates, :bool, 2
end
add_message "routerrpc.RouteFeeRequest" do
optional :dest, :bytes, 1
optional :amt_sat, :int64, 2
end
add_message "routerrpc.RouteFeeResponse" do
optional :routing_fee_msat, :int64, 1
optional :time_lock_delay, :int64, 2
end
add_message "routerrpc.SendToRouteRequest" do
optional :payment_hash, :bytes, 1
optional :route, :message, 2, "lnrpc.Route"
optional :skip_temp_err, :bool, 3
end
add_message "routerrpc.SendToRouteResponse" do
optional :preimage, :bytes, 1
optional :failure, :message, 2, "lnrpc.Failure"
end
add_message "routerrpc.ResetMissionControlRequest" do
end
add_message "routerrpc.ResetMissionControlResponse" do
end
add_message "routerrpc.QueryMissionControlRequest" do
end
add_message "routerrpc.QueryMissionControlResponse" do
repeated :pairs, :message, 2, "routerrpc.PairHistory"
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
optional :node_from, :bytes, 1
optional :node_to, :bytes, 2
optional :history, :message, 7, "routerrpc.PairData"
end
add_message "routerrpc.PairData" do
optional :fail_time, :int64, 1
optional :fail_amt_sat, :int64, 2
optional :fail_amt_msat, :int64, 4
optional :success_time, :int64, 5
optional :success_amt_sat, :int64, 6
optional :success_amt_msat, :int64, 7
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
optional :from_node, :bytes, 1
optional :to_node, :bytes, 2
optional :amt_msat, :int64, 3
end
add_message "routerrpc.QueryProbabilityResponse" do
optional :probability, :double, 1
optional :history, :message, 2, "routerrpc.PairData"
end
add_message "routerrpc.BuildRouteRequest" do
optional :amt_msat, :int64, 1
optional :final_cltv_delta, :int32, 2
optional :outgoing_chan_id, :uint64, 3
repeated :hop_pubkeys, :bytes, 4
optional :payment_addr, :bytes, 5
end
add_message "routerrpc.BuildRouteResponse" do
optional :route, :message, 1, "lnrpc.Route"
end
add_message "routerrpc.SubscribeHtlcEventsRequest" do
end
add_message "routerrpc.HtlcEvent" do
optional :incoming_channel_id, :uint64, 1
optional :outgoing_channel_id, :uint64, 2
optional :incoming_htlc_id, :uint64, 3
optional :outgoing_htlc_id, :uint64, 4
optional :timestamp_ns, :uint64, 5
optional :event_type, :enum, 6, "routerrpc.HtlcEvent.EventType"
oneof :event do
optional :forward_event, :message, 7, "routerrpc.ForwardEvent"
optional :forward_fail_event, :message, 8, "routerrpc.ForwardFailEvent"
optional :settle_event, :message, 9, "routerrpc.SettleEvent"
optional :link_fail_event, :message, 10, "routerrpc.LinkFailEvent"
end
end
add_enum "routerrpc.HtlcEvent.EventType" do
value :UNKNOWN, 0
value :SEND, 1
value :RECEIVE, 2
value :FORWARD, 3
end
add_message "routerrpc.HtlcInfo" do
optional :incoming_timelock, :uint32, 1
optional :outgoing_timelock, :uint32, 2
optional :incoming_amt_msat, :uint64, 3
optional :outgoing_amt_msat, :uint64, 4
end
add_message "routerrpc.ForwardEvent" do
optional :info, :message, 1, "routerrpc.HtlcInfo"
end
add_message "routerrpc.ForwardFailEvent" do
end
add_message "routerrpc.SettleEvent" do
optional :preimage, :bytes, 1
end
add_message "routerrpc.LinkFailEvent" do
optional :info, :message, 1, "routerrpc.HtlcInfo"
optional :wire_failure, :enum, 2, "lnrpc.Failure.FailureCode"
optional :failure_detail, :enum, 3, "routerrpc.FailureDetail"
optional :failure_string, :string, 4
end
add_message "routerrpc.PaymentStatus" do
optional :state, :enum, 1, "routerrpc.PaymentState"
optional :preimage, :bytes, 2
repeated :htlcs, :message, 4, "lnrpc.HTLCAttempt"
end
add_message "routerrpc.CircuitKey" do
optional :chan_id, :uint64, 1
optional :htlc_id, :uint64, 2
end
add_message "routerrpc.ForwardHtlcInterceptRequest" do
optional :incoming_circuit_key, :message, 1, "routerrpc.CircuitKey"
optional :incoming_amount_msat, :uint64, 5
optional :incoming_expiry, :uint32, 6
optional :payment_hash, :bytes, 2
optional :outgoing_requested_chan_id, :uint64, 7
optional :outgoing_amount_msat, :uint64, 3
optional :outgoing_expiry, :uint32, 4
map :custom_records, :uint64, :bytes, 8
optional :onion_blob, :bytes, 9
end
add_message "routerrpc.ForwardHtlcInterceptResponse" do
optional :incoming_circuit_key, :message, 1, "routerrpc.CircuitKey"
optional :action, :enum, 2, "routerrpc.ResolveHoldForwardAction"
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
add_enum "routerrpc.FailureDetail" do
value :UNKNOWN, 0
value :NO_DETAIL, 1
value :ONION_DECODE, 2
value :LINK_NOT_ELIGIBLE, 3
value :ON_CHAIN_TIMEOUT, 4
value :HTLC_EXCEEDS_MAX, 5
value :INSUFFICIENT_BALANCE, 6
value :INCOMPLETE_FORWARD, 7
value :HTLC_ADD_FAILED, 8
value :FORWARDS_DISABLED, 9
value :INVOICE_CANCELED, 10
value :INVOICE_UNDERPAID, 11
value :INVOICE_EXPIRY_TOO_SOON, 12
value :INVOICE_NOT_OPEN, 13
value :MPP_INVOICE_TIMEOUT, 14
value :ADDRESS_MISMATCH, 15
value :SET_TOTAL_MISMATCH, 16
value :SET_TOTAL_TOO_LOW, 17
value :SET_OVERPAID, 18
value :UNKNOWN_INVOICE, 19
value :INVALID_KEYSEND, 20
value :MPP_IN_PROGRESS, 21
value :CIRCULAR_ROUTE, 22
end
add_enum "routerrpc.PaymentState" do
value :IN_FLIGHT, 0
value :SUCCEEDED, 1
value :FAILED_TIMEOUT, 2
value :FAILED_NO_ROUTE, 3
value :FAILED_ERROR, 4
value :FAILED_INCORRECT_PAYMENT_DETAILS, 5
value :FAILED_INSUFFICIENT_BALANCE, 6
end
add_enum "routerrpc.ResolveHoldForwardAction" do
value :SETTLE, 0
value :FAIL, 1
value :RESUME, 2
end
add_enum "routerrpc.ChanStatusAction" do
value :ENABLE, 0
value :DISABLE, 1
value :AUTO, 2
end
end
end
module Routerrpc
SendPaymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendPaymentRequest").msgclass
TrackPaymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.TrackPaymentRequest").msgclass
RouteFeeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.RouteFeeRequest").msgclass
RouteFeeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.RouteFeeResponse").msgclass
SendToRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendToRouteRequest").msgclass
SendToRouteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendToRouteResponse").msgclass
ResetMissionControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlRequest").msgclass
ResetMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlResponse").msgclass
QueryMissionControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlRequest").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
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
QueryProbabilityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityResponse").msgclass
BuildRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteRequest").msgclass
BuildRouteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteResponse").msgclass
SubscribeHtlcEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SubscribeHtlcEventsRequest").msgclass
HtlcEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcEvent").msgclass
HtlcEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcEvent.EventType").enummodule
HtlcInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcInfo").msgclass
ForwardEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardEvent").msgclass
ForwardFailEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardFailEvent").msgclass
SettleEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SettleEvent").msgclass
LinkFailEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.LinkFailEvent").msgclass
PaymentStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentStatus").msgclass
CircuitKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.CircuitKey").msgclass
ForwardHtlcInterceptRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptRequest").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
PaymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentState").enummodule
ResolveHoldForwardAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResolveHoldForwardAction").enummodule
ChanStatusAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ChanStatusAction").enummodule
end

View File

@ -1,105 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: routerrpc/router.proto for package 'routerrpc'
require 'grpc'
require 'routerrpc/router_pb'
module Routerrpc
module Router
# Router is a service that offers advanced interaction with the router
# subsystem of the daemon.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'routerrpc.Router'
#
# SendPaymentV2 attempts to route a payment described by the passed
# PaymentRequest to the final destination. The call returns a stream of
# payment updates.
rpc :SendPaymentV2, ::Routerrpc::SendPaymentRequest, stream(::Lnrpc::Payment)
#
# TrackPaymentV2 returns an update stream for the payment identified by the
# payment hash.
rpc :TrackPaymentV2, ::Routerrpc::TrackPaymentRequest, stream(::Lnrpc::Payment)
#
# 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.
rpc :EstimateRouteFee, ::Routerrpc::RouteFeeRequest, ::Routerrpc::RouteFeeResponse
#
# Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
# the specified route. This 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 swaps. It differs from the newer
# SendToRouteV2 in that it doesn't return the full HTLC information.
rpc :SendToRoute, ::Routerrpc::SendToRouteRequest, ::Routerrpc::SendToRouteResponse
#
# SendToRouteV2 attempts to make a payment via the specified route. This
# 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
# swaps.
rpc :SendToRouteV2, ::Routerrpc::SendToRouteRequest, ::Lnrpc::HTLCAttempt
#
# ResetMissionControl clears all mission control state and starts with a clean
# slate.
rpc :ResetMissionControl, ::Routerrpc::ResetMissionControlRequest, ::Routerrpc::ResetMissionControlResponse
#
# QueryMissionControl exposes the internal mission control state to callers.
# It is a development feature.
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
# given node pair and amount.
rpc :QueryProbability, ::Routerrpc::QueryProbabilityRequest, ::Routerrpc::QueryProbabilityResponse
#
# 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
# calculate the correct fees and time locks.
rpc :BuildRoute, ::Routerrpc::BuildRouteRequest, ::Routerrpc::BuildRouteResponse
#
# SubscribeHtlcEvents creates a uni-directional stream from the server to
# the client which delivers a stream of htlc events.
rpc :SubscribeHtlcEvents, ::Routerrpc::SubscribeHtlcEventsRequest, stream(::Routerrpc::HtlcEvent)
#
# Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
# described by the passed PaymentRequest to the final destination. The call
# returns a stream of payment status updates.
rpc :SendPayment, ::Routerrpc::SendPaymentRequest, stream(::Routerrpc::PaymentStatus)
#
# Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
# the payment identified by the payment hash.
rpc :TrackPayment, ::Routerrpc::TrackPaymentRequest, stream(::Routerrpc::PaymentStatus)
# *
# HtlcInterceptor dispatches a bi-directional streaming RPC in which
# Forwarded HTLC requests are sent to the client and the client responds with
# a boolean that tells LND if this htlc should be intercepted.
# In case of interception, the htlc can be either settled, cancelled or
# resumed later by using the ResolveHoldForward endpoint.
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
Stub = Service.rpc_stub_class
end
end

View File

@ -1,172 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: signrpc/signer.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("signrpc/signer.proto", :syntax => :proto3) do
add_message "signrpc.KeyLocator" do
optional :key_family, :int32, 1
optional :key_index, :int32, 2
end
add_message "signrpc.KeyDescriptor" do
optional :raw_key_bytes, :bytes, 1
optional :key_loc, :message, 2, "signrpc.KeyLocator"
end
add_message "signrpc.TxOut" do
optional :value, :int64, 1
optional :pk_script, :bytes, 2
end
add_message "signrpc.SignDescriptor" do
optional :key_desc, :message, 1, "signrpc.KeyDescriptor"
optional :single_tweak, :bytes, 2
optional :double_tweak, :bytes, 3
optional :tap_tweak, :bytes, 10
optional :witness_script, :bytes, 4
optional :output, :message, 5, "signrpc.TxOut"
optional :sighash, :uint32, 7
optional :input_index, :int32, 8
optional :sign_method, :enum, 9, "signrpc.SignMethod"
end
add_message "signrpc.SignReq" do
optional :raw_tx_bytes, :bytes, 1
repeated :sign_descs, :message, 2, "signrpc.SignDescriptor"
repeated :prev_outputs, :message, 3, "signrpc.TxOut"
end
add_message "signrpc.SignResp" do
repeated :raw_sigs, :bytes, 1
end
add_message "signrpc.InputScript" do
repeated :witness, :bytes, 1
optional :sig_script, :bytes, 2
end
add_message "signrpc.InputScriptResp" do
repeated :input_scripts, :message, 1, "signrpc.InputScript"
end
add_message "signrpc.SignMessageReq" do
optional :msg, :bytes, 1
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
add_message "signrpc.SignMessageResp" do
optional :signature, :bytes, 1
end
add_message "signrpc.VerifyMessageReq" do
optional :msg, :bytes, 1
optional :signature, :bytes, 2
optional :pubkey, :bytes, 3
optional :is_schnorr_sig, :bool, 4
end
add_message "signrpc.VerifyMessageResp" do
optional :valid, :bool, 1
end
add_message "signrpc.SharedKeyRequest" do
optional :ephemeral_pubkey, :bytes, 1
optional :key_loc, :message, 2, "signrpc.KeyLocator"
optional :key_desc, :message, 3, "signrpc.KeyDescriptor"
end
add_message "signrpc.SharedKeyResponse" do
optional :shared_key, :bytes, 1
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
module Signrpc
KeyLocator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.KeyLocator").msgclass
KeyDescriptor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.KeyDescriptor").msgclass
TxOut = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.TxOut").msgclass
SignDescriptor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignDescriptor").msgclass
SignReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignReq").msgclass
SignResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignResp").msgclass
InputScript = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.InputScript").msgclass
InputScriptResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.InputScriptResp").msgclass
SignMessageReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignMessageReq").msgclass
SignMessageResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignMessageResp").msgclass
VerifyMessageReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.VerifyMessageReq").msgclass
VerifyMessageResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.VerifyMessageResp").msgclass
SharedKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyRequest").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

View File

@ -1,134 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: signrpc/signer.proto for package 'signrpc'
require 'grpc'
require 'signrpc/signer_pb'
module Signrpc
module Signer
# Signer is a service that gives access to the signing functionality of the
# daemon's wallet.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'signrpc.Signer'
#
# SignOutputRaw is a method that can be used to generated a signature for a
# set of inputs/outputs to a transaction. Each request specifies details
# concerning how the outputs should be signed, which keys they should be
# signed with, and also any optional tweaks. The return value is a fixed
# 64-byte signature (the same format as we use on the wire in Lightning).
#
# If we are unable to sign using the specified keys, then an error will be
# returned.
rpc :SignOutputRaw, ::Signrpc::SignReq, ::Signrpc::SignResp
#
# ComputeInputScript generates a complete InputIndex for the passed
# transaction with the signature as defined within the passed SignDescriptor.
# This method should be capable of generating the proper input script for both
# regular p2wkh/p2tr outputs and p2wkh outputs nested within a regular p2sh
# output.
#
# 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
# in the TxOut field, the value in that same field, and finally the input
# index.
rpc :ComputeInputScript, ::Signrpc::SignReq, ::Signrpc::InputScriptResp
#
# SignMessage signs a message with the key specified in the key locator. The
# returned signature is fixed-size LN wire format encoded.
#
# 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.
rpc :SignMessage, ::Signrpc::SignMessageReq, ::Signrpc::SignMessageResp
#
# VerifyMessage verifies a signature over a message using the public key
# 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
# used to sign the message does not have to be a node known to the network.
rpc :VerifyMessage, ::Signrpc::VerifyMessageReq, ::Signrpc::VerifyMessageResp
#
# DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key
# derivation between the ephemeral public key in the request and the node's
# key specified in the key_desc parameter. Either a key locator or a raw
# public key is expected in the key_desc, if neither is supplied, defaults to
# the node's identity private key:
# P_shared = privKeyNode * ephemeralPubkey
# The resulting shared public key is serialized in the compressed format and
# hashed with sha256, resulting in the final key length of 256bit.
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
Stub = Service.rpc_stub_class
end
end

View File

@ -1,35 +0,0 @@
# 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

@ -1,46 +0,0 @@
# 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

@ -1,27 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: verrpc/verrpc.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("verrpc/verrpc.proto", :syntax => :proto3) do
add_message "verrpc.VersionRequest" do
end
add_message "verrpc.Version" do
optional :commit, :string, 1
optional :commit_hash, :string, 2
optional :version, :string, 3
optional :app_major, :uint32, 4
optional :app_minor, :uint32, 5
optional :app_patch, :uint32, 6
optional :app_pre_release, :string, 7
repeated :build_tags, :string, 8
optional :go_version, :string, 9
end
end
end
module Verrpc
VersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("verrpc.VersionRequest").msgclass
Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("verrpc.Version").msgclass
end

View File

@ -1,27 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: verrpc/verrpc.proto for package 'verrpc'
require 'grpc'
require 'verrpc/verrpc_pb'
module Verrpc
module Versioner
# Versioner is a service that can be used to get information about the version
# and build information of the running daemon.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'verrpc.Versioner'
# lncli: `version`
# GetVersion returns the current version and build information of the running
# daemon.
rpc :GetVersion, ::Verrpc::VersionRequest, ::Verrpc::Version
end
Stub = Service.rpc_stub_class
end
end

View File

@ -1,277 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: walletrpc/walletkit.proto
require 'google/protobuf'
require 'lightning_pb'
require 'signrpc/signer_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("walletrpc/walletkit.proto", :syntax => :proto3) do
add_message "walletrpc.ListUnspentRequest" do
optional :min_confs, :int32, 1
optional :max_confs, :int32, 2
optional :account, :string, 3
optional :unconfirmed_only, :bool, 4
end
add_message "walletrpc.ListUnspentResponse" do
repeated :utxos, :message, 1, "lnrpc.Utxo"
end
add_message "walletrpc.LeaseOutputRequest" do
optional :id, :bytes, 1
optional :outpoint, :message, 2, "lnrpc.OutPoint"
optional :expiration_seconds, :uint64, 3
end
add_message "walletrpc.LeaseOutputResponse" do
optional :expiration, :uint64, 1
end
add_message "walletrpc.ReleaseOutputRequest" do
optional :id, :bytes, 1
optional :outpoint, :message, 2, "lnrpc.OutPoint"
end
add_message "walletrpc.ReleaseOutputResponse" do
end
add_message "walletrpc.KeyReq" do
optional :key_finger_print, :int32, 1
optional :key_family, :int32, 2
end
add_message "walletrpc.AddrRequest" do
optional :account, :string, 1
optional :type, :enum, 2, "walletrpc.AddressType"
optional :change, :bool, 3
end
add_message "walletrpc.AddrResponse" do
optional :addr, :string, 1
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
optional :tx_hex, :bytes, 1
optional :label, :string, 2
end
add_message "walletrpc.PublishResponse" do
optional :publish_error, :string, 1
end
add_message "walletrpc.SendOutputsRequest" do
optional :sat_per_kw, :int64, 1
repeated :outputs, :message, 2, "signrpc.TxOut"
optional :label, :string, 3
optional :min_confs, :int32, 4
optional :spend_unconfirmed, :bool, 5
end
add_message "walletrpc.SendOutputsResponse" do
optional :raw_tx, :bytes, 1
end
add_message "walletrpc.EstimateFeeRequest" do
optional :conf_target, :int32, 1
end
add_message "walletrpc.EstimateFeeResponse" do
optional :sat_per_kw, :int64, 1
end
add_message "walletrpc.PendingSweep" do
optional :outpoint, :message, 1, "lnrpc.OutPoint"
optional :witness_type, :enum, 2, "walletrpc.WitnessType"
optional :amount_sat, :uint32, 3
optional :sat_per_byte, :uint32, 4
optional :broadcast_attempts, :uint32, 5
optional :next_broadcast_height, :uint32, 6
optional :requested_conf_target, :uint32, 8
optional :requested_sat_per_byte, :uint32, 9
optional :sat_per_vbyte, :uint64, 10
optional :requested_sat_per_vbyte, :uint64, 11
optional :force, :bool, 7
end
add_message "walletrpc.PendingSweepsRequest" do
end
add_message "walletrpc.PendingSweepsResponse" do
repeated :pending_sweeps, :message, 1, "walletrpc.PendingSweep"
end
add_message "walletrpc.BumpFeeRequest" do
optional :outpoint, :message, 1, "lnrpc.OutPoint"
optional :target_conf, :uint32, 2
optional :sat_per_byte, :uint32, 3
optional :force, :bool, 4
optional :sat_per_vbyte, :uint64, 5
end
add_message "walletrpc.BumpFeeResponse" do
end
add_message "walletrpc.ListSweepsRequest" do
optional :verbose, :bool, 1
end
add_message "walletrpc.ListSweepsResponse" do
oneof :sweeps do
optional :transaction_details, :message, 1, "lnrpc.TransactionDetails"
optional :transaction_ids, :message, 2, "walletrpc.ListSweepsResponse.TransactionIDs"
end
end
add_message "walletrpc.ListSweepsResponse.TransactionIDs" do
repeated :transaction_ids, :string, 1
end
add_message "walletrpc.LabelTransactionRequest" do
optional :txid, :bytes, 1
optional :label, :string, 2
optional :overwrite, :bool, 3
end
add_message "walletrpc.LabelTransactionResponse" do
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
value :UNKNOWN_WITNESS, 0
value :COMMITMENT_TIME_LOCK, 1
value :COMMITMENT_NO_DELAY, 2
value :COMMITMENT_REVOKE, 3
value :HTLC_OFFERED_REVOKE, 4
value :HTLC_ACCEPTED_REVOKE, 5
value :HTLC_OFFERED_TIMEOUT_SECOND_LEVEL, 6
value :HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL, 7
value :HTLC_OFFERED_REMOTE_TIMEOUT, 8
value :HTLC_ACCEPTED_REMOTE_SUCCESS, 9
value :HTLC_SECOND_LEVEL_REVOKE, 10
value :WITNESS_KEY_HASH, 11
value :NESTED_WITNESS_KEY_HASH, 12
value :COMMITMENT_ANCHOR, 13
end
end
end
module Walletrpc
ListUnspentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListUnspentRequest").msgclass
ListUnspentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListUnspentResponse").msgclass
LeaseOutputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LeaseOutputRequest").msgclass
LeaseOutputResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LeaseOutputResponse").msgclass
ReleaseOutputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ReleaseOutputRequest").msgclass
ReleaseOutputResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ReleaseOutputResponse").msgclass
KeyReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.KeyReq").msgclass
AddrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrRequest").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
PublishResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PublishResponse").msgclass
SendOutputsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SendOutputsRequest").msgclass
SendOutputsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SendOutputsResponse").msgclass
EstimateFeeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.EstimateFeeRequest").msgclass
EstimateFeeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.EstimateFeeResponse").msgclass
PendingSweep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PendingSweep").msgclass
PendingSweepsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PendingSweepsRequest").msgclass
PendingSweepsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PendingSweepsResponse").msgclass
BumpFeeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.BumpFeeRequest").msgclass
BumpFeeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.BumpFeeResponse").msgclass
ListSweepsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListSweepsRequest").msgclass
ListSweepsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListSweepsResponse").msgclass
ListSweepsResponse::TransactionIDs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListSweepsResponse.TransactionIDs").msgclass
LabelTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LabelTransactionRequest").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
end

View File

@ -1,208 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: walletrpc/walletkit.proto for package 'walletrpc'
require 'grpc'
require 'walletrpc/walletkit_pb'
module Walletrpc
module WalletKit
# WalletKit is a service that gives access to the core functionalities of the
# daemon's wallet.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'walletrpc.WalletKit'
#
# ListUnspent returns a list of all utxos spendable by the wallet with a
# number of confirmations between the specified minimum and maximum. By
# 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
# 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
# successive invocations of this RPC. Outputs can be unlocked before their
# expiration through `ReleaseOutput`.
rpc :LeaseOutput, ::Walletrpc::LeaseOutputRequest, ::Walletrpc::LeaseOutputResponse
#
# ReleaseOutput unlocks an output, allowing it to be available for coin
# selection if it remains unspent. The ID should match the one used to
# originally lock the output.
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
# (account in BIP43) specified. This method should return the next external
# child within this branch.
rpc :DeriveNextKey, ::Walletrpc::KeyReq, ::Signrpc::KeyDescriptor
#
# DeriveKey attempts to derive an arbitrary key specified by the passed
# KeyLocator.
rpc :DeriveKey, ::Signrpc::KeyLocator, ::Signrpc::KeyDescriptor
#
# NextAddr returns the next unused address within the wallet.
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
# network. Once this returns without an error, the wallet will continually
# attempt to re-broadcast the transaction on start up, until it enters the
# chain.
rpc :PublishTransaction, ::Walletrpc::Transaction, ::Walletrpc::PublishResponse
#
# SendOutputs is similar to the existing sendmany call in Bitcoind, and
# 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.
rpc :SendOutputs, ::Walletrpc::SendOutputsRequest, ::Walletrpc::SendOutputsResponse
#
# 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
# achieve the confirmation target.
rpc :EstimateFee, ::Walletrpc::EstimateFeeRequest, ::Walletrpc::EstimateFeeResponse
#
# PendingSweeps returns lists of on-chain outputs that lnd is currently
# attempting to sweep within its central batching engine. Outputs with similar
# fee rates are batched together in order to sweep them within a single
# transaction.
#
# NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to
# remain supported. This is an advanced API that depends on the internals of
# the UtxoSweeper, so things may change.
rpc :PendingSweeps, ::Walletrpc::PendingSweepsRequest, ::Walletrpc::PendingSweepsResponse
#
# 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
# central batching engine in which inputs with similar fee rates are batched
# together to save on transaction fees. Due to this, we cannot rely on
# bumping the fee on a specific transaction, since transactions can change at
# any point with the addition of new inputs. The list of inputs that
# currently exist within lnd's central batching engine can be retrieved
# through the PendingSweeps RPC.
#
# When bumping the fee of an input that currently exists within lnd's central
# batching engine, a higher fee transaction will be created that replaces the
# lower fee transaction through the Replace-By-Fee (RBF) policy. If it
#
# This RPC also serves useful when wanting to perform a Child-Pays-For-Parent
# (CPFP), where the child transaction pays for its parent's fee. This can be
# done by specifying an outpoint within the low fee transaction that is under
# the control of the wallet.
#
# The fee preference can be expressed either as a specific fee rate or a delta
# of blocks in which the output should be swept on-chain within. If a fee
# preference is not explicitly specified, then an error is returned.
#
# Note that this RPC currently doesn't perform any validation checks on the
# fee preference being provided. For now, the responsibility of ensuring that
# the new fee preference is sufficient is delegated to the user.
rpc :BumpFee, ::Walletrpc::BumpFeeRequest, ::Walletrpc::BumpFeeResponse
#
# 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
# broadcast, not confirmation.
rpc :ListSweeps, ::Walletrpc::ListSweepsRequest, ::Walletrpc::ListSweepsResponse
#
# 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
# overwrite the exiting transaction label. Labels must not be empty, and
# cannot exceed 500 characters.
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
Stub = Service.rpc_stub_class
end
end

View File

@ -1,74 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: walletunlocker.proto
require 'google/protobuf'
require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("walletunlocker.proto", :syntax => :proto3) do
add_message "lnrpc.GenSeedRequest" do
optional :aezeed_passphrase, :bytes, 1
optional :seed_entropy, :bytes, 2
end
add_message "lnrpc.GenSeedResponse" do
repeated :cipher_seed_mnemonic, :string, 1
optional :enciphered_seed, :bytes, 2
end
add_message "lnrpc.InitWalletRequest" do
optional :wallet_password, :bytes, 1
repeated :cipher_seed_mnemonic, :string, 2
optional :aezeed_passphrase, :bytes, 3
optional :recovery_window, :int32, 4
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
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
add_message "lnrpc.UnlockWalletRequest" do
optional :wallet_password, :bytes, 1
optional :recovery_window, :int32, 2
optional :channel_backups, :message, 3, "lnrpc.ChanBackupSnapshot"
optional :stateless_init, :bool, 4
end
add_message "lnrpc.UnlockWalletResponse" do
end
add_message "lnrpc.ChangePasswordRequest" do
optional :current_password, :bytes, 1
optional :new_password, :bytes, 2
optional :stateless_init, :bool, 3
optional :new_macaroon_root_key, :bool, 4
end
add_message "lnrpc.ChangePasswordResponse" do
optional :admin_macaroon, :bytes, 1
end
end
end
module Lnrpc
GenSeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GenSeedRequest").msgclass
GenSeedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GenSeedResponse").msgclass
InitWalletRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletRequest").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
UnlockWalletResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletResponse").msgclass
ChangePasswordRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChangePasswordRequest").msgclass
ChangePasswordResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChangePasswordResponse").msgclass
end

View File

@ -1,72 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: walletunlocker.proto for package 'lnrpc'
require 'grpc'
require 'walletunlocker_pb'
module Lnrpc
module WalletUnlocker
#
# 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
#
# WalletUnlocker is a service that is used to set up a wallet password for
# lnd at first startup, and unlock a previously set up wallet.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'lnrpc.WalletUnlocker'
#
# GenSeed is the first method that should be used to instantiate a new lnd
# instance. This method allows a caller to generate a new aezeed cipher seed
# given an optional passphrase. If provided, the passphrase will be necessary
# to decrypt the cipherseed to expose the internal wallet seed.
#
# 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
# wallet.
rpc :GenSeed, ::Lnrpc::GenSeedRequest, ::Lnrpc::GenSeedResponse
#
# 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
# password must be provided. This will be used to encrypt sensitive material
# on disk.
#
# In the case of a recovery scenario, the user can also specify their aezeed
# mnemonic and passphrase. If set, then the daemon will use this prior state
# to initialize its internal wallet.
#
# 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,
# the seed can be fed into this RPC in order to commit the new wallet.
rpc :InitWallet, ::Lnrpc::InitWalletRequest, ::Lnrpc::InitWalletResponse
# lncli: `unlock`
# UnlockWallet is used at startup of lnd to provide a password to unlock
# the wallet database.
rpc :UnlockWallet, ::Lnrpc::UnlockWalletRequest, ::Lnrpc::UnlockWalletResponse
# lncli: `changepassword`
# ChangePassword changes the password of the encrypted wallet. This will
# automatically unlock the wallet database if successful.
rpc :ChangePassword, ::Lnrpc::ChangePasswordRequest, ::Lnrpc::ChangePasswordResponse
end
Stub = Service.rpc_stub_class
end
end

View File

@ -1,21 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: watchtowerrpc/watchtower.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("watchtowerrpc/watchtower.proto", :syntax => :proto3) do
add_message "watchtowerrpc.GetInfoRequest" do
end
add_message "watchtowerrpc.GetInfoResponse" do
optional :pubkey, :bytes, 1
repeated :listeners, :string, 2
repeated :uris, :string, 3
end
end
end
module Watchtowerrpc
GetInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("watchtowerrpc.GetInfoRequest").msgclass
GetInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("watchtowerrpc.GetInfoResponse").msgclass
end

View File

@ -1,28 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: watchtowerrpc/watchtower.proto for package 'watchtowerrpc'
require 'grpc'
require 'watchtowerrpc/watchtower_pb'
module Watchtowerrpc
module Watchtower
# Watchtower is a service that grants access to the watchtower server
# functionality of the daemon.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'watchtowerrpc.Watchtower'
# lncli: tower info
# GetInfo returns general information concerning the companion watchtower
# including its public key and URIs where the server is currently
# listening for clients.
rpc :GetInfo, ::Watchtowerrpc::GetInfoRequest, ::Watchtowerrpc::GetInfoResponse
end
Stub = Service.rpc_stub_class
end
end

View File

@ -1,83 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: wtclientrpc/wtclient.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("wtclientrpc/wtclient.proto", :syntax => :proto3) do
add_message "wtclientrpc.AddTowerRequest" do
optional :pubkey, :bytes, 1
optional :address, :string, 2
end
add_message "wtclientrpc.AddTowerResponse" do
end
add_message "wtclientrpc.RemoveTowerRequest" do
optional :pubkey, :bytes, 1
optional :address, :string, 2
end
add_message "wtclientrpc.RemoveTowerResponse" do
end
add_message "wtclientrpc.GetTowerInfoRequest" do
optional :pubkey, :bytes, 1
optional :include_sessions, :bool, 2
end
add_message "wtclientrpc.TowerSession" do
optional :num_backups, :uint32, 1
optional :num_pending_backups, :uint32, 2
optional :max_backups, :uint32, 3
optional :sweep_sat_per_byte, :uint32, 4
optional :sweep_sat_per_vbyte, :uint32, 5
end
add_message "wtclientrpc.Tower" do
optional :pubkey, :bytes, 1
repeated :addresses, :string, 2
optional :active_session_candidate, :bool, 3
optional :num_sessions, :uint32, 4
repeated :sessions, :message, 5, "wtclientrpc.TowerSession"
end
add_message "wtclientrpc.ListTowersRequest" do
optional :include_sessions, :bool, 1
end
add_message "wtclientrpc.ListTowersResponse" do
repeated :towers, :message, 1, "wtclientrpc.Tower"
end
add_message "wtclientrpc.StatsRequest" do
end
add_message "wtclientrpc.StatsResponse" do
optional :num_backups, :uint32, 1
optional :num_pending_backups, :uint32, 2
optional :num_failed_backups, :uint32, 3
optional :num_sessions_acquired, :uint32, 4
optional :num_sessions_exhausted, :uint32, 5
end
add_message "wtclientrpc.PolicyRequest" do
optional :policy_type, :enum, 1, "wtclientrpc.PolicyType"
end
add_message "wtclientrpc.PolicyResponse" do
optional :max_updates, :uint32, 1
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
module Wtclientrpc
AddTowerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.AddTowerRequest").msgclass
AddTowerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.AddTowerResponse").msgclass
RemoveTowerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.RemoveTowerRequest").msgclass
RemoveTowerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.RemoveTowerResponse").msgclass
GetTowerInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.GetTowerInfoRequest").msgclass
TowerSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.TowerSession").msgclass
Tower = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.Tower").msgclass
ListTowersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.ListTowersRequest").msgclass
ListTowersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.ListTowersResponse").msgclass
StatsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.StatsRequest").msgclass
StatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.StatsResponse").msgclass
PolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyRequest").msgclass
PolicyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyResponse").msgclass
PolicyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyType").enummodule
end

View File

@ -1,43 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: wtclientrpc/wtclient.proto for package 'wtclientrpc'
require 'grpc'
require 'wtclientrpc/wtclient_pb'
module Wtclientrpc
module WatchtowerClient
# WatchtowerClient is a service that grants access to the watchtower client
# functionality of the daemon.
class Service
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'wtclientrpc.WatchtowerClient'
#
# AddTower adds a new watchtower reachable at the given address and
# considers it for new sessions. If the watchtower already exists, then
# any new addresses included will be considered when dialing it for
# session negotiations and backups.
rpc :AddTower, ::Wtclientrpc::AddTowerRequest, ::Wtclientrpc::AddTowerResponse
#
# RemoveTower removes a watchtower from being considered for future session
# 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
# removing the address from the watchtower instead.
rpc :RemoveTower, ::Wtclientrpc::RemoveTowerRequest, ::Wtclientrpc::RemoveTowerResponse
# ListTowers returns the list of watchtowers registered with the client.
rpc :ListTowers, ::Wtclientrpc::ListTowersRequest, ::Wtclientrpc::ListTowersResponse
# GetTowerInfo retrieves information for a registered watchtower.
rpc :GetTowerInfo, ::Wtclientrpc::GetTowerInfoRequest, ::Wtclientrpc::Tower
# Stats returns the in-memory statistics of the client since startup.
rpc :Stats, ::Wtclientrpc::StatsRequest, ::Wtclientrpc::StatsResponse
# Policy returns the active watchtower client policy configuration.
rpc :Policy, ::Wtclientrpc::PolicyRequest, ::Wtclientrpc::PolicyResponse
end
Stub = Service.rpc_stub_class
end
end

View File

@ -1,26 +1,10 @@
require 'lnrpc/version' require "lnrpc/version"
require "lnrpc/rpc_services_pb"
# require GRPC services
Dir[File.join(File.expand_path(File.dirname(__FILE__)), 'grpc_services/**/*_services_pb.rb')].each do |file|
require file
end
require 'securerandom'
module Lnrpc module Lnrpc
class Error < StandardError; end class Error < StandardError; end
autoload :Client, 'lnrpc/client' autoload :Client, 'lnrpc/client'
autoload :GrpcWrapper, 'lnrpc/grpc_wrapper'
autoload :MacaroonInterceptor, 'lnrpc/macaroon_interceptor' autoload :MacaroonInterceptor, 'lnrpc/macaroon_interceptor'
PREIMAGE_BYTE_LENGTH = 32
KEY_SEND_PREIMAGE_TYPE = 5482373484
def self.create_preimage
SecureRandom.random_bytes(PREIMAGE_BYTE_LENGTH)
end
def self.to_byte_array(str)
[str].pack("H*")
end
end end

View File

@ -1,104 +1,87 @@
require "grpc" require "grpc"
require "digest"
require "lnrpc/macaroon_interceptor" require "lnrpc/macaroon_interceptor"
module Lnrpc module Lnrpc
class Client class Client
attr_accessor :address, :credentials, :macaroon attr_accessor :address, :credentials, :macaroon
attr_writer :grpc_client
LND_HOME_DIR = ENV['LND_HOME'] || "~/.lnd" LND_HOME_DIR = ENV['LND_HOME'] || "~/.lnd"
DEFAULT_ADDRESS = 'localhost:10009' DEFAULT_ADDRESS = 'localhost:10009'
DEFAULT_CREDENTIALS_PATH = "#{LND_HOME_DIR}/tls.cert" DEFAULT_CREDENTIALS_PATH = "#{LND_HOME_DIR}/tls.cert"
DEFAULT_MACAROON_PATH = "#{LND_HOME_DIR}/data/chain/bitcoin/mainnet/admin.macaroon" DEFAULT_MACAROON_PATH = "#{LND_HOME_DIR}/data/chain/bitcoin/mainnet/admin.macaroon"
NON_CONVENTION_REQUEST_CLASSES = {
add_invoice: Lnrpc::Invoice,
send_payment: Lnrpc::SendRequest,
send_payment_sync: Lnrpc::SendRequest,
open_channel_sync: Lnrpc::OpenChannelRequest,
send_to_route_sync: Lnrpc::SendToRouteRequest,
lookup_invoice: Lnrpc::PaymentHash,
decode_pay_req: Lnrpc::PayReqString,
describe_graph: Lnrpc::ChannelGraphRequest,
get_chan_info: Lnrpc::ChanInfoRequest,
get_node_info: Lnrpc::NodeInfoRequest,
get_network_info: Lnrpc::NetworkInfoRequest,
stop_daemon: Lnrpc::StopRequest,
update_channel_policy: Lnrpc::PolicyUpdateResponse,
subscribe_channel_graph: Lnrpc::GraphTopologySubscription,
subscribe_invoices: Lnrpc::InvoiceSubscription,
subscribe_transactions: Lnrpc::GetTransactionsRequest
}
def initialize(options={}) def initialize(options={})
self.address = options[:address] || DEFAULT_ADDRESS self.address = options[:address] || DEFAULT_ADDRESS
if options.has_key?(:credentials) if options.has_key?(: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 self.credentials = options[:credentials]
self.credentials = options[:credentials].match?(/\H/) ? options[:credentials] : [options[:credentials]].pack('H*') elsif File.exists?(::File.expand_path(options[:credentials_path] || DEFAULT_CREDENTIALS_PATH))
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.exist?(::File.expand_path(options[:macaroon_path] || DEFAULT_MACAROON_PATH)) if !options.has_key?(:macaroon) && File.exists?(::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]
end end
def lightning def grpc_client
@lightning ||= grpc_wrapper_for(Lnrpc::Lightning) @grpc_client ||= Lnrpc::Lightning::Stub.new(self.address,
GRPC::Core::ChannelCredentials.new(self.credentials),
interceptors: [Lnrpc::MacaroonInterceptor.new(self.macaroon)]
)
end end
def autopilot def pay(payreq)
@autopilot ||= grpc_wrapper_for(Autopilotrpc::Autopilot) self.send_payment_sync(Lnrpc::SendRequest.new(payment_request: payreq))
end end
def chain_notifier def method_missing(m, *args, &block)
@chain_notifier ||= grpc_wrapper_for(Chainrpc::ChainNotifier) if self.grpc_client.respond_to?(m)
end params = args[0]
def invoices args[0] = params.nil? ? request_class_for(m).new : request_class_for(m).new(params)
@invoices ||= grpc_wrapper_for(Invoicesrpc::Invoices) self.grpc_client.send(m, *args, &block)
end else
super
def router end
@router ||= grpc_wrapper_for(Routerrpc::Router)
end
def signer
@signer ||= grpc_wrapper_for(Signrpc::Signer)
end
def versioner
@versioner ||= grpc_wrapper_for(Verrpc::Versioner)
end
def wallet_kit
@wallet_kit ||= grpc_wrapper_for(Walletrpc::WalletKit)
end
def wallet_unlocker
@wallet_unlocker ||= grpc_wrapper_for(Lnrpc::WalletUnlocker)
end
def watchtower
@watchtower ||= grpc_wrapper_for(Watchtowerrpc::Watchtower)
end
def watchtower_client
@watchtower_client ||= grpc_wrapper_for(Wtclientrpc::WatchtowerClient)
end
def keysend(args)
args[:dest_custom_records] ||= {}
args[:dest_custom_records][Lnrpc::KEY_SEND_PREIMAGE_TYPE] ||= Lnrpc.create_preimage
args[:payment_hash] ||= Digest::SHA256.digest(args[:dest_custom_records][Lnrpc::KEY_SEND_PREIMAGE_TYPE])
args[:timeout_seconds] ||= 60
router.send_payment_v2(args)
end
def pay(args)
args[:timeout_seconds] ||= 60
router.send_payment_v2(args)
end end
def inspect def inspect
"#{self} @address=\"#{address}\"" "#{self.to_s} @address=\"#{self.address}\""
end end
private private
def request_class_for(method_name)
def grpc_wrapper_for(grpc_module) if NON_CONVENTION_REQUEST_CLASSES.key?(method_name.to_sym)
stub = grpc_module.const_get(:Stub) NON_CONVENTION_REQUEST_CLASSES[method_name.to_sym]
service = grpc_module.const_get(:Service) else
GrpcWrapper.new(service: service, klass = method_name.to_s.sub(/^[a-z\d]*/) { |match| match.capitalize }
grpc: stub.new(address, klass.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{$1}#{$2.capitalize}" }
GRPC::Core::ChannelCredentials.new(credentials), Lnrpc.const_get("#{klass}Request")
interceptors: [Lnrpc::MacaroonInterceptor.new(macaroon)] end
))
end end
end end
end end

View File

@ -1,43 +0,0 @@
module Lnrpc
class GrpcWrapper
attr_reader :grpc, :service
def initialize(service:, grpc:)
@grpc = grpc
@service = service
end
def method_missing(m, *args, &block)
if grpc.respond_to?(m)
params = args[0]
args[0] = params.nil? ? request_class_for(m).new : request_class_for(m).new(params)
grpc.send(m, *args, &block)
else
super
end
end
def inspect
"#{self} @grpc=\"#{grpc}\""
end
private
def request_class_for(method_name)
rpc_desc = service.rpc_descs[camelize(method_name).to_sym]
raise "Request class not found for: #{method_name}" unless rpc_desc
rpc_desc.input
end
def camelize(name)
str = name.to_s
separators = ['_', '\s']
separators.each do |s|
str = str.gsub(/(?:#{s}+)([a-z])/) { $1.upcase }
end
str.gsub(/(\A|\s)([a-z])/) { $1 + $2.upcase }
end
end
end

2580
lib/lnrpc/rpc.proto Normal file

File diff suppressed because it is too large Load Diff

938
lib/lnrpc/rpc_pb.rb Normal file
View File

@ -0,0 +1,938 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: rpc.proto
require 'google/protobuf'
require 'google/api/annotations_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.GenSeedRequest" do
optional :aezeed_passphrase, :bytes, 1
optional :seed_entropy, :bytes, 2
end
add_message "lnrpc.GenSeedResponse" do
repeated :cipher_seed_mnemonic, :string, 1
optional :enciphered_seed, :bytes, 2
end
add_message "lnrpc.InitWalletRequest" do
optional :wallet_password, :bytes, 1
repeated :cipher_seed_mnemonic, :string, 2
optional :aezeed_passphrase, :bytes, 3
optional :recovery_window, :int32, 4
optional :channel_backups, :message, 5, "lnrpc.ChanBackupSnapshot"
end
add_message "lnrpc.InitWalletResponse" do
end
add_message "lnrpc.UnlockWalletRequest" do
optional :wallet_password, :bytes, 1
optional :recovery_window, :int32, 2
optional :channel_backups, :message, 3, "lnrpc.ChanBackupSnapshot"
end
add_message "lnrpc.UnlockWalletResponse" do
end
add_message "lnrpc.ChangePasswordRequest" do
optional :current_password, :bytes, 1
optional :new_password, :bytes, 2
end
add_message "lnrpc.ChangePasswordResponse" do
end
add_message "lnrpc.Utxo" do
optional :type, :enum, 1, "lnrpc.AddressType"
optional :address, :string, 2
optional :amount_sat, :int64, 3
optional :pk_script, :string, 4
optional :outpoint, :message, 5, "lnrpc.OutPoint"
optional :confirmations, :int64, 6
end
add_message "lnrpc.Transaction" do
optional :tx_hash, :string, 1
optional :amount, :int64, 2
optional :num_confirmations, :int32, 3
optional :block_hash, :string, 4
optional :block_height, :int32, 5
optional :time_stamp, :int64, 6
optional :total_fees, :int64, 7
repeated :dest_addresses, :string, 8
optional :raw_tx_hex, :string, 9
end
add_message "lnrpc.GetTransactionsRequest" do
end
add_message "lnrpc.TransactionDetails" do
repeated :transactions, :message, 1, "lnrpc.Transaction"
end
add_message "lnrpc.FeeLimit" do
oneof :limit do
optional :fixed, :int64, 1
optional :percent, :int64, 2
end
end
add_message "lnrpc.SendRequest" do
optional :dest, :bytes, 1
optional :dest_string, :string, 2
optional :amt, :int64, 3
optional :payment_hash, :bytes, 4
optional :payment_hash_string, :string, 5
optional :payment_request, :string, 6
optional :final_cltv_delta, :int32, 7
optional :fee_limit, :message, 8, "lnrpc.FeeLimit"
optional :outgoing_chan_id, :uint64, 9
optional :cltv_limit, :uint32, 10
map :dest_tlv, :uint64, :bytes, 11
end
add_message "lnrpc.SendResponse" do
optional :payment_error, :string, 1
optional :payment_preimage, :bytes, 2
optional :payment_route, :message, 3, "lnrpc.Route"
optional :payment_hash, :bytes, 4
end
add_message "lnrpc.SendToRouteRequest" do
optional :payment_hash, :bytes, 1
optional :payment_hash_string, :string, 2
optional :route, :message, 4, "lnrpc.Route"
end
add_message "lnrpc.ChannelAcceptRequest" do
optional :node_pubkey, :bytes, 1
optional :chain_hash, :bytes, 2
optional :pending_chan_id, :bytes, 3
optional :funding_amt, :uint64, 4
optional :push_amt, :uint64, 5
optional :dust_limit, :uint64, 6
optional :max_value_in_flight, :uint64, 7
optional :channel_reserve, :uint64, 8
optional :min_htlc, :uint64, 9
optional :fee_per_kw, :uint64, 10
optional :csv_delay, :uint32, 11
optional :max_accepted_htlcs, :uint32, 12
optional :channel_flags, :uint32, 13
end
add_message "lnrpc.ChannelAcceptResponse" do
optional :accept, :bool, 1
optional :pending_chan_id, :bytes, 2
end
add_message "lnrpc.ChannelPoint" do
optional :output_index, :uint32, 3
oneof :funding_txid do
optional :funding_txid_bytes, :bytes, 1
optional :funding_txid_str, :string, 2
end
end
add_message "lnrpc.OutPoint" do
optional :txid_bytes, :bytes, 1
optional :txid_str, :string, 2
optional :output_index, :uint32, 3
end
add_message "lnrpc.LightningAddress" do
optional :pubkey, :string, 1
optional :host, :string, 2
end
add_message "lnrpc.EstimateFeeRequest" do
map :AddrToAmount, :string, :int64, 1
optional :target_conf, :int32, 2
end
add_message "lnrpc.EstimateFeeResponse" do
optional :fee_sat, :int64, 1
optional :feerate_sat_per_byte, :int64, 2
end
add_message "lnrpc.SendManyRequest" do
map :AddrToAmount, :string, :int64, 1
optional :target_conf, :int32, 3
optional :sat_per_byte, :int64, 5
end
add_message "lnrpc.SendManyResponse" do
optional :txid, :string, 1
end
add_message "lnrpc.SendCoinsRequest" do
optional :addr, :string, 1
optional :amount, :int64, 2
optional :target_conf, :int32, 3
optional :sat_per_byte, :int64, 5
optional :send_all, :bool, 6
end
add_message "lnrpc.SendCoinsResponse" do
optional :txid, :string, 1
end
add_message "lnrpc.ListUnspentRequest" do
optional :min_confs, :int32, 1
optional :max_confs, :int32, 2
end
add_message "lnrpc.ListUnspentResponse" do
repeated :utxos, :message, 1, "lnrpc.Utxo"
end
add_message "lnrpc.NewAddressRequest" do
optional :type, :enum, 1, "lnrpc.AddressType"
end
add_message "lnrpc.NewAddressResponse" do
optional :address, :string, 1
end
add_message "lnrpc.SignMessageRequest" do
optional :msg, :bytes, 1
end
add_message "lnrpc.SignMessageResponse" do
optional :signature, :string, 1
end
add_message "lnrpc.VerifyMessageRequest" do
optional :msg, :bytes, 1
optional :signature, :string, 2
end
add_message "lnrpc.VerifyMessageResponse" do
optional :valid, :bool, 1
optional :pubkey, :string, 2
end
add_message "lnrpc.ConnectPeerRequest" do
optional :addr, :message, 1, "lnrpc.LightningAddress"
optional :perm, :bool, 2
end
add_message "lnrpc.ConnectPeerResponse" do
end
add_message "lnrpc.DisconnectPeerRequest" do
optional :pub_key, :string, 1
end
add_message "lnrpc.DisconnectPeerResponse" do
end
add_message "lnrpc.HTLC" do
optional :incoming, :bool, 1
optional :amount, :int64, 2
optional :hash_lock, :bytes, 3
optional :expiration_height, :uint32, 4
end
add_message "lnrpc.Channel" do
optional :active, :bool, 1
optional :remote_pubkey, :string, 2
optional :channel_point, :string, 3
optional :chan_id, :uint64, 4
optional :capacity, :int64, 5
optional :local_balance, :int64, 6
optional :remote_balance, :int64, 7
optional :commit_fee, :int64, 8
optional :commit_weight, :int64, 9
optional :fee_per_kw, :int64, 10
optional :unsettled_balance, :int64, 11
optional :total_satoshis_sent, :int64, 12
optional :total_satoshis_received, :int64, 13
optional :num_updates, :uint64, 14
repeated :pending_htlcs, :message, 15, "lnrpc.HTLC"
optional :csv_delay, :uint32, 16
optional :private, :bool, 17
optional :initiator, :bool, 18
optional :chan_status_flags, :string, 19
optional :local_chan_reserve_sat, :int64, 20
optional :remote_chan_reserve_sat, :int64, 21
optional :static_remote_key, :bool, 22
end
add_message "lnrpc.ListChannelsRequest" do
optional :active_only, :bool, 1
optional :inactive_only, :bool, 2
optional :public_only, :bool, 3
optional :private_only, :bool, 4
end
add_message "lnrpc.ListChannelsResponse" do
repeated :channels, :message, 11, "lnrpc.Channel"
end
add_message "lnrpc.ChannelCloseSummary" do
optional :channel_point, :string, 1
optional :chan_id, :uint64, 2
optional :chain_hash, :string, 3
optional :closing_tx_hash, :string, 4
optional :remote_pubkey, :string, 5
optional :capacity, :int64, 6
optional :close_height, :uint32, 7
optional :settled_balance, :int64, 8
optional :time_locked_balance, :int64, 9
optional :close_type, :enum, 10, "lnrpc.ChannelCloseSummary.ClosureType"
end
add_enum "lnrpc.ChannelCloseSummary.ClosureType" do
value :COOPERATIVE_CLOSE, 0
value :LOCAL_FORCE_CLOSE, 1
value :REMOTE_FORCE_CLOSE, 2
value :BREACH_CLOSE, 3
value :FUNDING_CANCELED, 4
value :ABANDONED, 5
end
add_message "lnrpc.ClosedChannelsRequest" do
optional :cooperative, :bool, 1
optional :local_force, :bool, 2
optional :remote_force, :bool, 3
optional :breach, :bool, 4
optional :funding_canceled, :bool, 5
optional :abandoned, :bool, 6
end
add_message "lnrpc.ClosedChannelsResponse" do
repeated :channels, :message, 1, "lnrpc.ChannelCloseSummary"
end
add_message "lnrpc.Peer" do
optional :pub_key, :string, 1
optional :address, :string, 3
optional :bytes_sent, :uint64, 4
optional :bytes_recv, :uint64, 5
optional :sat_sent, :int64, 6
optional :sat_recv, :int64, 7
optional :inbound, :bool, 8
optional :ping_time, :int64, 9
optional :sync_type, :enum, 10, "lnrpc.Peer.SyncType"
end
add_enum "lnrpc.Peer.SyncType" do
value :UNKNOWN_SYNC, 0
value :ACTIVE_SYNC, 1
value :PASSIVE_SYNC, 2
end
add_message "lnrpc.ListPeersRequest" do
end
add_message "lnrpc.ListPeersResponse" do
repeated :peers, :message, 1, "lnrpc.Peer"
end
add_message "lnrpc.GetInfoRequest" do
end
add_message "lnrpc.GetInfoResponse" do
optional :identity_pubkey, :string, 1
optional :alias, :string, 2
optional :num_pending_channels, :uint32, 3
optional :num_active_channels, :uint32, 4
optional :num_peers, :uint32, 5
optional :block_height, :uint32, 6
optional :block_hash, :string, 8
optional :synced_to_chain, :bool, 9
optional :testnet, :bool, 10
repeated :uris, :string, 12
optional :best_header_timestamp, :int64, 13
optional :version, :string, 14
optional :num_inactive_channels, :uint32, 15
repeated :chains, :message, 16, "lnrpc.Chain"
optional :color, :string, 17
optional :synced_to_graph, :bool, 18
end
add_message "lnrpc.Chain" do
optional :chain, :string, 1
optional :network, :string, 2
end
add_message "lnrpc.ConfirmationUpdate" do
optional :block_sha, :bytes, 1
optional :block_height, :int32, 2
optional :num_confs_left, :uint32, 3
end
add_message "lnrpc.ChannelOpenUpdate" do
optional :channel_point, :message, 1, "lnrpc.ChannelPoint"
end
add_message "lnrpc.ChannelCloseUpdate" do
optional :closing_txid, :bytes, 1
optional :success, :bool, 2
end
add_message "lnrpc.CloseChannelRequest" do
optional :channel_point, :message, 1, "lnrpc.ChannelPoint"
optional :force, :bool, 2
optional :target_conf, :int32, 3
optional :sat_per_byte, :int64, 4
end
add_message "lnrpc.CloseStatusUpdate" do
oneof :update do
optional :close_pending, :message, 1, "lnrpc.PendingUpdate"
optional :chan_close, :message, 3, "lnrpc.ChannelCloseUpdate"
end
end
add_message "lnrpc.PendingUpdate" do
optional :txid, :bytes, 1
optional :output_index, :uint32, 2
end
add_message "lnrpc.OpenChannelRequest" do
optional :node_pubkey, :bytes, 2
optional :node_pubkey_string, :string, 3
optional :local_funding_amount, :int64, 4
optional :push_sat, :int64, 5
optional :target_conf, :int32, 6
optional :sat_per_byte, :int64, 7
optional :private, :bool, 8
optional :min_htlc_msat, :int64, 9
optional :remote_csv_delay, :uint32, 10
optional :min_confs, :int32, 11
optional :spend_unconfirmed, :bool, 12
end
add_message "lnrpc.OpenStatusUpdate" do
oneof :update do
optional :chan_pending, :message, 1, "lnrpc.PendingUpdate"
optional :chan_open, :message, 3, "lnrpc.ChannelOpenUpdate"
end
end
add_message "lnrpc.PendingHTLC" do
optional :incoming, :bool, 1
optional :amount, :int64, 2
optional :outpoint, :string, 3
optional :maturity_height, :uint32, 4
optional :blocks_til_maturity, :int32, 5
optional :stage, :uint32, 6
end
add_message "lnrpc.PendingChannelsRequest" do
end
add_message "lnrpc.PendingChannelsResponse" do
optional :total_limbo_balance, :int64, 1
repeated :pending_open_channels, :message, 2, "lnrpc.PendingChannelsResponse.PendingOpenChannel"
repeated :pending_closing_channels, :message, 3, "lnrpc.PendingChannelsResponse.ClosedChannel"
repeated :pending_force_closing_channels, :message, 4, "lnrpc.PendingChannelsResponse.ForceClosedChannel"
repeated :waiting_close_channels, :message, 5, "lnrpc.PendingChannelsResponse.WaitingCloseChannel"
end
add_message "lnrpc.PendingChannelsResponse.PendingChannel" do
optional :remote_node_pub, :string, 1
optional :channel_point, :string, 2
optional :capacity, :int64, 3
optional :local_balance, :int64, 4
optional :remote_balance, :int64, 5
optional :local_chan_reserve_sat, :int64, 6
optional :remote_chan_reserve_sat, :int64, 7
end
add_message "lnrpc.PendingChannelsResponse.PendingOpenChannel" do
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
optional :confirmation_height, :uint32, 2
optional :commit_fee, :int64, 4
optional :commit_weight, :int64, 5
optional :fee_per_kw, :int64, 6
end
add_message "lnrpc.PendingChannelsResponse.WaitingCloseChannel" do
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
optional :limbo_balance, :int64, 2
end
add_message "lnrpc.PendingChannelsResponse.ClosedChannel" do
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
optional :closing_txid, :string, 2
end
add_message "lnrpc.PendingChannelsResponse.ForceClosedChannel" do
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
optional :closing_txid, :string, 2
optional :limbo_balance, :int64, 3
optional :maturity_height, :uint32, 4
optional :blocks_til_maturity, :int32, 5
optional :recovered_balance, :int64, 6
repeated :pending_htlcs, :message, 8, "lnrpc.PendingHTLC"
end
add_message "lnrpc.ChannelEventSubscription" do
end
add_message "lnrpc.ChannelEventUpdate" do
optional :type, :enum, 5, "lnrpc.ChannelEventUpdate.UpdateType"
oneof :channel do
optional :open_channel, :message, 1, "lnrpc.Channel"
optional :closed_channel, :message, 2, "lnrpc.ChannelCloseSummary"
optional :active_channel, :message, 3, "lnrpc.ChannelPoint"
optional :inactive_channel, :message, 4, "lnrpc.ChannelPoint"
end
end
add_enum "lnrpc.ChannelEventUpdate.UpdateType" do
value :OPEN_CHANNEL, 0
value :CLOSED_CHANNEL, 1
value :ACTIVE_CHANNEL, 2
value :INACTIVE_CHANNEL, 3
end
add_message "lnrpc.WalletBalanceRequest" do
end
add_message "lnrpc.WalletBalanceResponse" do
optional :total_balance, :int64, 1
optional :confirmed_balance, :int64, 2
optional :unconfirmed_balance, :int64, 3
end
add_message "lnrpc.ChannelBalanceRequest" do
end
add_message "lnrpc.ChannelBalanceResponse" do
optional :balance, :int64, 1
optional :pending_open_balance, :int64, 2
end
add_message "lnrpc.QueryRoutesRequest" do
optional :pub_key, :string, 1
optional :amt, :int64, 2
optional :final_cltv_delta, :int32, 4
optional :fee_limit, :message, 5, "lnrpc.FeeLimit"
repeated :ignored_nodes, :bytes, 6
repeated :ignored_edges, :message, 7, "lnrpc.EdgeLocator"
optional :source_pub_key, :string, 8
optional :use_mission_control, :bool, 9
repeated :ignored_pairs, :message, 10, "lnrpc.NodePair"
optional :cltv_limit, :uint32, 11
end
add_message "lnrpc.NodePair" do
optional :from, :bytes, 1
optional :to, :bytes, 2
end
add_message "lnrpc.EdgeLocator" do
optional :channel_id, :uint64, 1
optional :direction_reverse, :bool, 2
end
add_message "lnrpc.QueryRoutesResponse" do
repeated :routes, :message, 1, "lnrpc.Route"
optional :success_prob, :double, 2
end
add_message "lnrpc.Hop" do
optional :chan_id, :uint64, 1
optional :chan_capacity, :int64, 2
optional :amt_to_forward, :int64, 3
optional :fee, :int64, 4
optional :expiry, :uint32, 5
optional :amt_to_forward_msat, :int64, 6
optional :fee_msat, :int64, 7
optional :pub_key, :string, 8
optional :tlv_payload, :bool, 9
end
add_message "lnrpc.Route" do
optional :total_time_lock, :uint32, 1
optional :total_fees, :int64, 2
optional :total_amt, :int64, 3
repeated :hops, :message, 4, "lnrpc.Hop"
optional :total_fees_msat, :int64, 5
optional :total_amt_msat, :int64, 6
end
add_message "lnrpc.NodeInfoRequest" do
optional :pub_key, :string, 1
optional :include_channels, :bool, 2
end
add_message "lnrpc.NodeInfo" do
optional :node, :message, 1, "lnrpc.LightningNode"
optional :num_channels, :uint32, 2
optional :total_capacity, :int64, 3
repeated :channels, :message, 4, "lnrpc.ChannelEdge"
end
add_message "lnrpc.LightningNode" do
optional :last_update, :uint32, 1
optional :pub_key, :string, 2
optional :alias, :string, 3
repeated :addresses, :message, 4, "lnrpc.NodeAddress"
optional :color, :string, 5
end
add_message "lnrpc.NodeAddress" do
optional :network, :string, 1
optional :addr, :string, 2
end
add_message "lnrpc.RoutingPolicy" do
optional :time_lock_delta, :uint32, 1
optional :min_htlc, :int64, 2
optional :fee_base_msat, :int64, 3
optional :fee_rate_milli_msat, :int64, 4
optional :disabled, :bool, 5
optional :max_htlc_msat, :uint64, 6
optional :last_update, :uint32, 7
end
add_message "lnrpc.ChannelEdge" do
optional :channel_id, :uint64, 1
optional :chan_point, :string, 2
optional :last_update, :uint32, 3
optional :node1_pub, :string, 4
optional :node2_pub, :string, 5
optional :capacity, :int64, 6
optional :node1_policy, :message, 7, "lnrpc.RoutingPolicy"
optional :node2_policy, :message, 8, "lnrpc.RoutingPolicy"
end
add_message "lnrpc.ChannelGraphRequest" do
optional :include_unannounced, :bool, 1
end
add_message "lnrpc.ChannelGraph" do
repeated :nodes, :message, 1, "lnrpc.LightningNode"
repeated :edges, :message, 2, "lnrpc.ChannelEdge"
end
add_message "lnrpc.ChanInfoRequest" do
optional :chan_id, :uint64, 1
end
add_message "lnrpc.NetworkInfoRequest" do
end
add_message "lnrpc.NetworkInfo" do
optional :graph_diameter, :uint32, 1
optional :avg_out_degree, :double, 2
optional :max_out_degree, :uint32, 3
optional :num_nodes, :uint32, 4
optional :num_channels, :uint32, 5
optional :total_network_capacity, :int64, 6
optional :avg_channel_size, :double, 7
optional :min_channel_size, :int64, 8
optional :max_channel_size, :int64, 9
optional :median_channel_size_sat, :int64, 10
optional :num_zombie_chans, :uint64, 11
end
add_message "lnrpc.StopRequest" do
end
add_message "lnrpc.StopResponse" do
end
add_message "lnrpc.GraphTopologySubscription" do
end
add_message "lnrpc.GraphTopologyUpdate" do
repeated :node_updates, :message, 1, "lnrpc.NodeUpdate"
repeated :channel_updates, :message, 2, "lnrpc.ChannelEdgeUpdate"
repeated :closed_chans, :message, 3, "lnrpc.ClosedChannelUpdate"
end
add_message "lnrpc.NodeUpdate" do
repeated :addresses, :string, 1
optional :identity_key, :string, 2
optional :global_features, :bytes, 3
optional :alias, :string, 4
optional :color, :string, 5
end
add_message "lnrpc.ChannelEdgeUpdate" do
optional :chan_id, :uint64, 1
optional :chan_point, :message, 2, "lnrpc.ChannelPoint"
optional :capacity, :int64, 3
optional :routing_policy, :message, 4, "lnrpc.RoutingPolicy"
optional :advertising_node, :string, 5
optional :connecting_node, :string, 6
end
add_message "lnrpc.ClosedChannelUpdate" do
optional :chan_id, :uint64, 1
optional :capacity, :int64, 2
optional :closed_height, :uint32, 3
optional :chan_point, :message, 4, "lnrpc.ChannelPoint"
end
add_message "lnrpc.HopHint" do
optional :node_id, :string, 1
optional :chan_id, :uint64, 2
optional :fee_base_msat, :uint32, 3
optional :fee_proportional_millionths, :uint32, 4
optional :cltv_expiry_delta, :uint32, 5
end
add_message "lnrpc.RouteHint" do
repeated :hop_hints, :message, 1, "lnrpc.HopHint"
end
add_message "lnrpc.Invoice" do
optional :memo, :string, 1
optional :receipt, :bytes, 2
optional :r_preimage, :bytes, 3
optional :r_hash, :bytes, 4
optional :value, :int64, 5
optional :settled, :bool, 6
optional :creation_date, :int64, 7
optional :settle_date, :int64, 8
optional :payment_request, :string, 9
optional :description_hash, :bytes, 10
optional :expiry, :int64, 11
optional :fallback_addr, :string, 12
optional :cltv_expiry, :uint64, 13
repeated :route_hints, :message, 14, "lnrpc.RouteHint"
optional :private, :bool, 15
optional :add_index, :uint64, 16
optional :settle_index, :uint64, 17
optional :amt_paid, :int64, 18
optional :amt_paid_sat, :int64, 19
optional :amt_paid_msat, :int64, 20
optional :state, :enum, 21, "lnrpc.Invoice.InvoiceState"
repeated :htlcs, :message, 22, "lnrpc.InvoiceHTLC"
end
add_enum "lnrpc.Invoice.InvoiceState" do
value :OPEN, 0
value :SETTLED, 1
value :CANCELED, 2
value :ACCEPTED, 3
end
add_message "lnrpc.InvoiceHTLC" do
optional :chan_id, :uint64, 1
optional :htlc_index, :uint64, 2
optional :amt_msat, :uint64, 3
optional :accept_height, :int32, 4
optional :accept_time, :int64, 5
optional :resolve_time, :int64, 6
optional :expiry_height, :int32, 7
optional :state, :enum, 8, "lnrpc.InvoiceHTLCState"
end
add_message "lnrpc.AddInvoiceResponse" do
optional :r_hash, :bytes, 1
optional :payment_request, :string, 2
optional :add_index, :uint64, 16
end
add_message "lnrpc.PaymentHash" do
optional :r_hash_str, :string, 1
optional :r_hash, :bytes, 2
end
add_message "lnrpc.ListInvoiceRequest" do
optional :pending_only, :bool, 1
optional :index_offset, :uint64, 4
optional :num_max_invoices, :uint64, 5
optional :reversed, :bool, 6
end
add_message "lnrpc.ListInvoiceResponse" do
repeated :invoices, :message, 1, "lnrpc.Invoice"
optional :last_index_offset, :uint64, 2
optional :first_index_offset, :uint64, 3
end
add_message "lnrpc.InvoiceSubscription" do
optional :add_index, :uint64, 1
optional :settle_index, :uint64, 2
end
add_message "lnrpc.Payment" do
optional :payment_hash, :string, 1
optional :value, :int64, 2
optional :creation_date, :int64, 3
repeated :path, :string, 4
optional :fee, :int64, 5
optional :payment_preimage, :string, 6
optional :value_sat, :int64, 7
optional :value_msat, :int64, 8
optional :payment_request, :string, 9
optional :status, :enum, 10, "lnrpc.Payment.PaymentStatus"
optional :fee_sat, :int64, 11
optional :fee_msat, :int64, 12
end
add_enum "lnrpc.Payment.PaymentStatus" do
value :UNKNOWN, 0
value :IN_FLIGHT, 1
value :SUCCEEDED, 2
value :FAILED, 3
end
add_message "lnrpc.ListPaymentsRequest" do
optional :include_incomplete, :bool, 1
end
add_message "lnrpc.ListPaymentsResponse" do
repeated :payments, :message, 1, "lnrpc.Payment"
end
add_message "lnrpc.DeleteAllPaymentsRequest" do
end
add_message "lnrpc.DeleteAllPaymentsResponse" do
end
add_message "lnrpc.AbandonChannelRequest" do
optional :channel_point, :message, 1, "lnrpc.ChannelPoint"
end
add_message "lnrpc.AbandonChannelResponse" do
end
add_message "lnrpc.DebugLevelRequest" do
optional :show, :bool, 1
optional :level_spec, :string, 2
end
add_message "lnrpc.DebugLevelResponse" do
optional :sub_systems, :string, 1
end
add_message "lnrpc.PayReqString" do
optional :pay_req, :string, 1
end
add_message "lnrpc.PayReq" do
optional :destination, :string, 1
optional :payment_hash, :string, 2
optional :num_satoshis, :int64, 3
optional :timestamp, :int64, 4
optional :expiry, :int64, 5
optional :description, :string, 6
optional :description_hash, :string, 7
optional :fallback_addr, :string, 8
optional :cltv_expiry, :int64, 9
repeated :route_hints, :message, 10, "lnrpc.RouteHint"
end
add_message "lnrpc.FeeReportRequest" do
end
add_message "lnrpc.ChannelFeeReport" do
optional :chan_point, :string, 1
optional :base_fee_msat, :int64, 2
optional :fee_per_mil, :int64, 3
optional :fee_rate, :double, 4
end
add_message "lnrpc.FeeReportResponse" do
repeated :channel_fees, :message, 1, "lnrpc.ChannelFeeReport"
optional :day_fee_sum, :uint64, 2
optional :week_fee_sum, :uint64, 3
optional :month_fee_sum, :uint64, 4
end
add_message "lnrpc.PolicyUpdateRequest" do
optional :base_fee_msat, :int64, 3
optional :fee_rate, :double, 4
optional :time_lock_delta, :uint32, 5
optional :max_htlc_msat, :uint64, 6
oneof :scope do
optional :global, :bool, 1
optional :chan_point, :message, 2, "lnrpc.ChannelPoint"
end
end
add_message "lnrpc.PolicyUpdateResponse" do
end
add_message "lnrpc.ForwardingHistoryRequest" do
optional :start_time, :uint64, 1
optional :end_time, :uint64, 2
optional :index_offset, :uint32, 3
optional :num_max_events, :uint32, 4
end
add_message "lnrpc.ForwardingEvent" do
optional :timestamp, :uint64, 1
optional :chan_id_in, :uint64, 2
optional :chan_id_out, :uint64, 4
optional :amt_in, :uint64, 5
optional :amt_out, :uint64, 6
optional :fee, :uint64, 7
optional :fee_msat, :uint64, 8
end
add_message "lnrpc.ForwardingHistoryResponse" do
repeated :forwarding_events, :message, 1, "lnrpc.ForwardingEvent"
optional :last_offset_index, :uint32, 2
end
add_message "lnrpc.ExportChannelBackupRequest" do
optional :chan_point, :message, 1, "lnrpc.ChannelPoint"
end
add_message "lnrpc.ChannelBackup" do
optional :chan_point, :message, 1, "lnrpc.ChannelPoint"
optional :chan_backup, :bytes, 2
end
add_message "lnrpc.MultiChanBackup" do
repeated :chan_points, :message, 1, "lnrpc.ChannelPoint"
optional :multi_chan_backup, :bytes, 2
end
add_message "lnrpc.ChanBackupExportRequest" do
end
add_message "lnrpc.ChanBackupSnapshot" do
optional :single_chan_backups, :message, 1, "lnrpc.ChannelBackups"
optional :multi_chan_backup, :message, 2, "lnrpc.MultiChanBackup"
end
add_message "lnrpc.ChannelBackups" do
repeated :chan_backups, :message, 1, "lnrpc.ChannelBackup"
end
add_message "lnrpc.RestoreChanBackupRequest" do
oneof :backup do
optional :chan_backups, :message, 1, "lnrpc.ChannelBackups"
optional :multi_chan_backup, :bytes, 2
end
end
add_message "lnrpc.RestoreBackupResponse" do
end
add_message "lnrpc.ChannelBackupSubscription" do
end
add_message "lnrpc.VerifyChanBackupResponse" do
end
add_enum "lnrpc.AddressType" do
value :WITNESS_PUBKEY_HASH, 0
value :NESTED_PUBKEY_HASH, 1
value :UNUSED_WITNESS_PUBKEY_HASH, 2
value :UNUSED_NESTED_PUBKEY_HASH, 3
end
add_enum "lnrpc.InvoiceHTLCState" do
value :ACCEPTED, 0
value :SETTLED, 1
value :CANCELED, 2
end
end
module Lnrpc
GenSeedRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GenSeedRequest").msgclass
GenSeedResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GenSeedResponse").msgclass
InitWalletRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletRequest").msgclass
InitWalletResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletResponse").msgclass
UnlockWalletRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletRequest").msgclass
UnlockWalletResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletResponse").msgclass
ChangePasswordRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChangePasswordRequest").msgclass
ChangePasswordResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChangePasswordResponse").msgclass
Utxo = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Utxo").msgclass
Transaction = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Transaction").msgclass
GetTransactionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetTransactionsRequest").msgclass
TransactionDetails = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.TransactionDetails").msgclass
FeeLimit = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeeLimit").msgclass
SendRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendRequest").msgclass
SendResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendResponse").msgclass
SendToRouteRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendToRouteRequest").msgclass
ChannelAcceptRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelAcceptRequest").msgclass
ChannelAcceptResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelAcceptResponse").msgclass
ChannelPoint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelPoint").msgclass
OutPoint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OutPoint").msgclass
LightningAddress = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.LightningAddress").msgclass
EstimateFeeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.EstimateFeeRequest").msgclass
EstimateFeeResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.EstimateFeeResponse").msgclass
SendManyRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendManyRequest").msgclass
SendManyResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendManyResponse").msgclass
SendCoinsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendCoinsRequest").msgclass
SendCoinsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendCoinsResponse").msgclass
ListUnspentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListUnspentRequest").msgclass
ListUnspentResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListUnspentResponse").msgclass
NewAddressRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NewAddressRequest").msgclass
NewAddressResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NewAddressResponse").msgclass
SignMessageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SignMessageRequest").msgclass
SignMessageResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SignMessageResponse").msgclass
VerifyMessageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.VerifyMessageRequest").msgclass
VerifyMessageResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.VerifyMessageResponse").msgclass
ConnectPeerRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ConnectPeerRequest").msgclass
ConnectPeerResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ConnectPeerResponse").msgclass
DisconnectPeerRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DisconnectPeerRequest").msgclass
DisconnectPeerResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DisconnectPeerResponse").msgclass
HTLC = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.HTLC").msgclass
Channel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Channel").msgclass
ListChannelsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListChannelsRequest").msgclass
ListChannelsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListChannelsResponse").msgclass
ChannelCloseSummary = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelCloseSummary").msgclass
ChannelCloseSummary::ClosureType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelCloseSummary.ClosureType").enummodule
ClosedChannelsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ClosedChannelsRequest").msgclass
ClosedChannelsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ClosedChannelsResponse").msgclass
Peer = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Peer").msgclass
Peer::SyncType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Peer.SyncType").enummodule
ListPeersRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPeersRequest").msgclass
ListPeersResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPeersResponse").msgclass
GetInfoRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetInfoRequest").msgclass
GetInfoResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetInfoResponse").msgclass
Chain = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Chain").msgclass
ConfirmationUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ConfirmationUpdate").msgclass
ChannelOpenUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelOpenUpdate").msgclass
ChannelCloseUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelCloseUpdate").msgclass
CloseChannelRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CloseChannelRequest").msgclass
CloseStatusUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CloseStatusUpdate").msgclass
PendingUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingUpdate").msgclass
OpenChannelRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenChannelRequest").msgclass
OpenStatusUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenStatusUpdate").msgclass
PendingHTLC = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingHTLC").msgclass
PendingChannelsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsRequest").msgclass
PendingChannelsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse").msgclass
PendingChannelsResponse::PendingChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.PendingChannel").msgclass
PendingChannelsResponse::PendingOpenChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.PendingOpenChannel").msgclass
PendingChannelsResponse::WaitingCloseChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.WaitingCloseChannel").msgclass
PendingChannelsResponse::ClosedChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.ClosedChannel").msgclass
PendingChannelsResponse::ForceClosedChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.ForceClosedChannel").msgclass
ChannelEventSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventSubscription").msgclass
ChannelEventUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate").msgclass
ChannelEventUpdate::UpdateType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate.UpdateType").enummodule
WalletBalanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceRequest").msgclass
WalletBalanceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceResponse").msgclass
ChannelBalanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceRequest").msgclass
ChannelBalanceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceResponse").msgclass
QueryRoutesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesRequest").msgclass
NodePair = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodePair").msgclass
EdgeLocator = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.EdgeLocator").msgclass
QueryRoutesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesResponse").msgclass
Hop = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Hop").msgclass
Route = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Route").msgclass
NodeInfoRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfoRequest").msgclass
NodeInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfo").msgclass
LightningNode = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.LightningNode").msgclass
NodeAddress = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeAddress").msgclass
RoutingPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RoutingPolicy").msgclass
ChannelEdge = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEdge").msgclass
ChannelGraphRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelGraphRequest").msgclass
ChannelGraph = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelGraph").msgclass
ChanInfoRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChanInfoRequest").msgclass
NetworkInfoRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NetworkInfoRequest").msgclass
NetworkInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NetworkInfo").msgclass
StopRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.StopRequest").msgclass
StopResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.StopResponse").msgclass
GraphTopologySubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GraphTopologySubscription").msgclass
GraphTopologyUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GraphTopologyUpdate").msgclass
NodeUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeUpdate").msgclass
ChannelEdgeUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEdgeUpdate").msgclass
ClosedChannelUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ClosedChannelUpdate").msgclass
HopHint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.HopHint").msgclass
RouteHint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RouteHint").msgclass
Invoice = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice").msgclass
Invoice::InvoiceState = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice.InvoiceState").enummodule
InvoiceHTLC = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLC").msgclass
AddInvoiceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddInvoiceResponse").msgclass
PaymentHash = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentHash").msgclass
ListInvoiceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceRequest").msgclass
ListInvoiceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceResponse").msgclass
InvoiceSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceSubscription").msgclass
Payment = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Payment").msgclass
Payment::PaymentStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Payment.PaymentStatus").enummodule
ListPaymentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsRequest").msgclass
ListPaymentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsResponse").msgclass
DeleteAllPaymentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsRequest").msgclass
DeleteAllPaymentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsResponse").msgclass
AbandonChannelRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AbandonChannelRequest").msgclass
AbandonChannelResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AbandonChannelResponse").msgclass
DebugLevelRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DebugLevelRequest").msgclass
DebugLevelResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DebugLevelResponse").msgclass
PayReqString = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PayReqString").msgclass
PayReq = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PayReq").msgclass
FeeReportRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeeReportRequest").msgclass
ChannelFeeReport = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelFeeReport").msgclass
FeeReportResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeeReportResponse").msgclass
PolicyUpdateRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PolicyUpdateRequest").msgclass
PolicyUpdateResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PolicyUpdateResponse").msgclass
ForwardingHistoryRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ForwardingHistoryRequest").msgclass
ForwardingEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ForwardingEvent").msgclass
ForwardingHistoryResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ForwardingHistoryResponse").msgclass
ExportChannelBackupRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ExportChannelBackupRequest").msgclass
ChannelBackup = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBackup").msgclass
MultiChanBackup = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MultiChanBackup").msgclass
ChanBackupExportRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChanBackupExportRequest").msgclass
ChanBackupSnapshot = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChanBackupSnapshot").msgclass
ChannelBackups = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBackups").msgclass
RestoreChanBackupRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RestoreChanBackupRequest").msgclass
RestoreBackupResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RestoreBackupResponse").msgclass
ChannelBackupSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBackupSubscription").msgclass
VerifyChanBackupResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.VerifyChanBackupResponse").msgclass
AddressType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddressType").enummodule
InvoiceHTLCState = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLCState").enummodule
end

View File

@ -0,0 +1,382 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: rpc.proto for package 'lnrpc'
require 'grpc'
require_relative 'rpc_pb'
module Lnrpc
module WalletUnlocker
# *
# 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.
#
# One edge case exists where a // comment followed by a /// comment in the
# next line will cause the description not to show up in the documentation. In
# that instance, simply separate the two comments with a blank line.
#
# 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
#
# The WalletUnlocker service is used to set up a wallet password for
# lnd at first startup, and unlock a previously set up wallet.
class Service
include GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'lnrpc.WalletUnlocker'
# *
# GenSeed is the first method that should be used to instantiate a new lnd
# instance. This method allows a caller to generate a new aezeed cipher seed
# given an optional passphrase. If provided, the passphrase will be necessary
# to decrypt the cipherseed to expose the internal wallet seed.
#
# 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
# wallet.
rpc :GenSeed, GenSeedRequest, GenSeedResponse
# *
# 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
# password must be provided. This will be used to encrypt sensitive material
# on disk.
#
# In the case of a recovery scenario, the user can also specify their aezeed
# mnemonic and passphrase. If set, then the daemon will use this prior state
# to initialize its internal wallet.
#
# 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,
# the seed can be fed into this RPC in order to commit the new wallet.
rpc :InitWallet, InitWalletRequest, InitWalletResponse
# * lncli: `unlock`
# UnlockWallet is used at startup of lnd to provide a password to unlock
# the wallet database.
rpc :UnlockWallet, UnlockWalletRequest, UnlockWalletResponse
# * lncli: `changepassword`
# ChangePassword changes the password of the encrypted wallet. This will
# automatically unlock the wallet database if successful.
rpc :ChangePassword, ChangePasswordRequest, ChangePasswordResponse
end
Stub = Service.rpc_stub_class
end
module Lightning
class Service
include GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'lnrpc.Lightning'
# * lncli: `walletbalance`
# WalletBalance returns total unspent outputs(confirmed and unconfirmed), all
# confirmed unspent outputs and all unconfirmed unspent outputs under control
# of the wallet.
rpc :WalletBalance, WalletBalanceRequest, WalletBalanceResponse
# * lncli: `channelbalance`
# ChannelBalance returns the total funds available across all open channels
# in satoshis.
rpc :ChannelBalance, ChannelBalanceRequest, ChannelBalanceResponse
# * lncli: `listchaintxns`
# GetTransactions returns a list describing all the known transactions
# relevant to the wallet.
rpc :GetTransactions, GetTransactionsRequest, TransactionDetails
# * lncli: `estimatefee`
# EstimateFee asks the chain backend to estimate the fee rate and total fees
# for a transaction that pays to multiple specified outputs.
rpc :EstimateFee, EstimateFeeRequest, EstimateFeeResponse
# * lncli: `sendcoins`
# 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
# neither target_conf, or sat_per_byte are set, then the internal wallet will
# consult its fee model to determine a fee for the default confirmation
# target.
rpc :SendCoins, SendCoinsRequest, SendCoinsResponse
# * lncli: `listunspent`
# ListUnspent returns a list of all utxos spendable by the wallet with a
# number of confirmations between the specified minimum and maximum.
rpc :ListUnspent, ListUnspentRequest, ListUnspentResponse
# *
# SubscribeTransactions creates a uni-directional stream from the server to
# the client in which any newly discovered transactions relevant to the
# wallet are sent over.
rpc :SubscribeTransactions, GetTransactionsRequest, stream(Transaction)
# * lncli: `sendmany`
# 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
# the internal wallet will consult its fee model to determine a fee for the
# default confirmation target.
rpc :SendMany, SendManyRequest, SendManyResponse
# * lncli: `newaddress`
# NewAddress creates a new address under control of the local wallet.
rpc :NewAddress, NewAddressRequest, NewAddressResponse
# * lncli: `signmessage`
# SignMessage signs a message with this node's private key. The returned
# signature string is `zbase32` encoded and pubkey recoverable, meaning that
# only the message digest and signature are needed for verification.
rpc :SignMessage, SignMessageRequest, SignMessageResponse
# * lncli: `verifymessage`
# VerifyMessage verifies a signature over a msg. The signature must be
# zbase32 encoded and signed by an active node in the resident node's
# channel database. In addition to returning the validity of the signature,
# VerifyMessage also returns the recovered pubkey from the signature.
rpc :VerifyMessage, VerifyMessageRequest, VerifyMessageResponse
# * lncli: `connect`
# 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
# distinct from establishing a channel with a peer.
rpc :ConnectPeer, ConnectPeerRequest, ConnectPeerResponse
# * lncli: `disconnect`
# 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
# with the target peer, then this action will be not be allowed.
rpc :DisconnectPeer, DisconnectPeerRequest, DisconnectPeerResponse
# * lncli: `listpeers`
# ListPeers returns a verbose listing of all currently active peers.
rpc :ListPeers, ListPeersRequest, ListPeersResponse
# * lncli: `getinfo`
# GetInfo returns general information concerning the lightning node including
# it's identity pubkey, alias, the chains it is connected to, and information
# concerning the number of open+pending channels.
rpc :GetInfo, GetInfoRequest, GetInfoResponse
# TODO(roasbeef): merge with below with bool?
#
# * lncli: `pendingchannels`
# PendingChannels returns a list of all the channels that are currently
# 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
# process of closure, either initiated cooperatively or non-cooperatively.
rpc :PendingChannels, PendingChannelsRequest, PendingChannelsResponse
# * lncli: `listchannels`
# ListChannels returns a description of all the open channels that this node
# is a participant in.
rpc :ListChannels, ListChannelsRequest, ListChannelsResponse
# *
# SubscribeChannelEvents creates a uni-directional stream from the server to
# 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
# channels.
rpc :SubscribeChannelEvents, ChannelEventSubscription, stream(ChannelEventUpdate)
# * lncli: `closedchannels`
# ClosedChannels returns a description of all the closed channels that
# this node was a participant in.
rpc :ClosedChannels, ClosedChannelsRequest, ClosedChannelsResponse
# *
# 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
# other sync calls, all byte slices are intended to be populated as hex
# encoded strings.
rpc :OpenChannelSync, OpenChannelRequest, ChannelPoint
# * lncli: `openchannel`
# 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
# blocks that the funding transaction should be confirmed in, or a manual fee
# rate to us for the funding transaction. If neither are specified, then a
# lax block confirmation target is used.
rpc :OpenChannel, OpenChannelRequest, stream(OpenStatusUpdate)
# *
# ChannelAcceptor dispatches a bi-directional streaming RPC in which
# 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
# node operators to specify their own criteria for accepting inbound channels
# through a single persistent connection.
rpc :ChannelAcceptor, stream(ChannelAcceptResponse), stream(ChannelAcceptRequest)
# * lncli: `closechannel`
# CloseChannel attempts to close an active channel identified by its channel
# outpoint (ChannelPoint). The actions of this method can additionally be
# augmented to attempt a force close after a timeout period in the case of an
# inactive peer. If a non-force close (cooperative closure) is requested,
# 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
# specified, then a default lax, block confirmation target is used.
rpc :CloseChannel, CloseChannelRequest, stream(CloseStatusUpdate)
# * lncli: `abandonchannel`
# AbandonChannel removes all channel state from the database except for a
# 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
# when in debug builds of lnd.
rpc :AbandonChannel, AbandonChannelRequest, AbandonChannelResponse
# * lncli: `sendpayment`
# SendPayment dispatches a bi-directional streaming RPC for sending payments
# through the Lightning Network. A single RPC invocation creates a persistent
# bi-directional stream allowing clients to rapidly send payments through the
# Lightning Network with a single persistent connection.
rpc :SendPayment, stream(SendRequest), stream(SendResponse)
# *
# SendPaymentSync is the synchronous non-streaming version of SendPayment.
# 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
# hash (if any) to be encoded as hex strings.
rpc :SendPaymentSync, SendRequest, SendResponse
# * lncli: `sendtoroute`
# SendToRoute is a bi-directional streaming RPC for sending payment through
# the Lightning Network. This 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 swaps.
rpc :SendToRoute, stream(SendToRouteRequest), stream(SendResponse)
# *
# SendToRouteSync is a synchronous version of SendToRoute. It Will block
# until the payment either fails or succeeds.
rpc :SendToRouteSync, SendToRouteRequest, SendResponse
# * lncli: `addinvoice`
# AddInvoice attempts to add a new invoice to the invoice database. Any
# duplicated invoices are rejected, therefore all invoices *must* have a
# unique payment preimage.
rpc :AddInvoice, Invoice, AddInvoiceResponse
# * lncli: `listinvoices`
# ListInvoices returns a list of all the invoices currently stored within the
# database. Any active debug invoices are ignored. It has full support for
# paginated responses, allowing users to query for specific invoices through
# their add_index. This can be done by using either the first_index_offset or
# 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.
# Backwards pagination is also supported through the Reversed flag.
rpc :ListInvoices, ListInvoiceRequest, ListInvoiceResponse
# * lncli: `lookupinvoice`
# 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
# returned.
rpc :LookupInvoice, PaymentHash, Invoice
# *
# SubscribeInvoices returns a uni-directional stream (server -> client) for
# notifying the client of newly added/settled invoices. The caller can
# optionally specify the add_index and/or the settle_index. If the add_index
# is specified, then we'll first start by sending add invoice events for all
# invoices with an add_index greater than the specified value. If the
# settle_index is specified, the next, we'll send out all settle events for
# 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
# the latest add/settle events.
rpc :SubscribeInvoices, InvoiceSubscription, stream(Invoice)
# * lncli: `decodepayreq`
# DecodePayReq takes an encoded payment request string and attempts to decode
# it, returning a full description of the conditions encoded within the
# payment request.
rpc :DecodePayReq, PayReqString, PayReq
# * lncli: `listpayments`
# ListPayments returns a list of all outgoing payments.
rpc :ListPayments, ListPaymentsRequest, ListPaymentsResponse
# *
# DeleteAllPayments deletes all outgoing payments from DB.
rpc :DeleteAllPayments, DeleteAllPaymentsRequest, DeleteAllPaymentsResponse
# * lncli: `describegraph`
# DescribeGraph returns a description of the latest graph state from the
# point of view of the node. The graph information is partitioned into two
# components: all the nodes/vertexes, and all the edges that connect the
# vertexes themselves. As this is a directed graph, the edges also contain
# the node directional specific routing policy which includes: the time lock
# delta, fee information, etc.
rpc :DescribeGraph, ChannelGraphRequest, ChannelGraph
# * lncli: `getchaninfo`
# GetChanInfo returns the latest authenticated network announcement for the
# given channel identified by its channel ID: an 8-byte integer which
# uniquely identifies the location of transaction's funding output within the
# blockchain.
rpc :GetChanInfo, ChanInfoRequest, ChannelEdge
# * lncli: `getnodeinfo`
# GetNodeInfo returns the latest advertised, aggregated, and authenticated
# channel information for the specified node identified by its public key.
rpc :GetNodeInfo, NodeInfoRequest, NodeInfo
# * lncli: `queryroutes`
# QueryRoutes attempts to query the daemon's Channel Router for a possible
# route to a target destination capable of carrying a specific amount of
# satoshis. The returned route contains the full details required to craft and
# send an HTLC, also including the necessary information that should be
# present within the Sphinx packet encapsulated within the HTLC.
rpc :QueryRoutes, QueryRoutesRequest, QueryRoutesResponse
# * lncli: `getnetworkinfo`
# GetNetworkInfo returns some basic stats about the known channel graph from
# the point of view of the node.
rpc :GetNetworkInfo, NetworkInfoRequest, NetworkInfo
# * lncli: `stop`
# StopDaemon will send a shutdown request to the interrupt handler, triggering
# a graceful shutdown of the daemon.
rpc :StopDaemon, StopRequest, StopResponse
# *
# SubscribeChannelGraph launches a streaming RPC that allows the caller to
# receive notifications upon any changes to the channel graph topology from
# the point of view of the responding node. Events notified include: new
# nodes coming online, nodes updating their authenticated attributes, new
# channels being advertised, updates in the routing policy for a directional
# channel edge, and when channels are closed on-chain.
rpc :SubscribeChannelGraph, GraphTopologySubscription, stream(GraphTopologyUpdate)
# * lncli: `debuglevel`
# DebugLevel allows a caller to programmatically set the logging verbosity of
# 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
# sub-system.
rpc :DebugLevel, DebugLevelRequest, DebugLevelResponse
# * lncli: `feereport`
# FeeReport allows the caller to obtain a report detailing the current fee
# schedule enforced by the node globally for each channel.
rpc :FeeReport, FeeReportRequest, FeeReportResponse
# * lncli: `updatechanpolicy`
# UpdateChannelPolicy allows the caller to update the fee schedule and
# channel policies for all channels globally, or a particular channel.
rpc :UpdateChannelPolicy, PolicyUpdateRequest, PolicyUpdateResponse
# * lncli: `fwdinghistory`
# ForwardingHistory allows the caller to query the htlcswitch for a record of
# 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
# of the past 24 hrs of forwarding history are returned.
#
# 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.
# 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
# request to allow the caller to skip a series of records.
rpc :ForwardingHistory, ForwardingHistoryRequest, ForwardingHistoryResponse
# * lncli: `exportchanbackup`
# ExportChannelBackup attempts to return an encrypted static channel backup
# for the target channel identified by it channel point. The backup is
# encrypted with a key generated from the aezeed seed of the user. The
# returned backup can either be restored using the RestoreChannelBackup
# method once lnd is running, or via the InitWallet and UnlockWallet methods
# from the WalletUnlocker service.
rpc :ExportChannelBackup, ExportChannelBackupRequest, ChannelBackup
# *
# ExportAllChannelBackups returns static channel backups for all existing
# channels known to lnd. A set of regular singular static channel backups for
# each channel are returned. Additionally, a multi-channel backup is returned
# as well, which contains a single encrypted blob containing the backups of
# each channel.
rpc :ExportAllChannelBackups, ChanBackupExportRequest, ChanBackupSnapshot
# *
# 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.
# Specifying both will result in an error.
rpc :VerifyChanBackup, ChanBackupSnapshot, VerifyChanBackupResponse
# * lncli: `restorechanbackup`
# RestoreChannelBackups accepts a set of singular channel backups, or a
# 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
# new channel will be shown under listchannels, as well as pending channels.
rpc :RestoreChannelBackups, RestoreChanBackupRequest, RestoreBackupResponse
# *
# SubscribeChannelBackups allows a client to sub-subscribe to the most up to
# date information concerning the state of all channel backups. Each time a
# new channel is added, we return the new set of channels, along with a
# multi-chan backup containing the backup info for all channels. Each time a
# 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
# channel(s) removed.
rpc :SubscribeChannelBackups, ChannelBackupSubscription, stream(ChanBackupSnapshot)
end
Stub = Service.rpc_stub_class
end
end

View File

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

View File

@ -14,8 +14,6 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/bumi/lnrpc" spec.homepage = "https://github.com/bumi/lnrpc"
spec.license = "MIT" spec.license = "MIT"
spec.metadata['funding'] = 'lightning:02ad33d99d0bb3bf3bb8ec8e089cbefa8fd7de23a13cfa59aec9af9730816be76f'
# Specify which files should be added to the gem when it is released. # Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git. # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
@ -23,12 +21,12 @@ Gem::Specification.new do |spec|
end end
spec.bindir = "exe" spec.bindir = "exe"
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"]
spec.add_development_dependency "bundler", "> 2.0" spec.add_development_dependency "bundler", "~> 1.17"
spec.add_development_dependency "rake", "~> 13.0" spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.0" spec.add_development_dependency "rspec", "~> 3.0"
spec.add_dependency "grpc", ">= 1.28.0" spec.add_dependency "grpc", ">= 1.19.0"
spec.add_dependency "google-protobuf", ">=3.15.7" spec.add_dependency "google-protobuf", ">=3.7"
end end