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

Compare commits

..

34 Commits

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

View File

@ -1,34 +1,34 @@
PATH
remote: .
specs:
lnrpc (0.11.1)
google-protobuf (>= 3.12)
lnrpc (0.15.5)
google-protobuf (>= 3.15.7)
grpc (>= 1.28.0)
GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.4.4)
google-protobuf (3.17.3)
googleapis-common-protos-types (1.1.0)
diff-lcs (1.5.0)
google-protobuf (3.22.1)
googleapis-common-protos-types (1.5.0)
google-protobuf (~> 3.14)
grpc (1.38.0)
google-protobuf (~> 3.15)
grpc (1.52.0)
google-protobuf (~> 3.21)
googleapis-common-protos-types (~> 1.0)
rake (13.0.6)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
PLATFORMS
ruby
@ -40,4 +40,4 @@ DEPENDENCIES
rspec (~> 3.0)
BUNDLED WITH
2.1.4
2.4.4

View File

@ -5,13 +5,10 @@ a [gRPC](https://grpc.io/) client for [LND, the Lightning Network Daemon](https:
## Installation
Note: there is still an GRPC/protobuf [issue with Ruby 2.7](https://github.com/protocolbuffers/protobuf/issues/7070).
So lnrpc requires Ruby < 2.7.
Add this line to your application's Gemfile:
```ruby
gem 'lnrpc', '~> 0.11.0'
gem 'lnrpc', '~> 0.15.5'
```
lnrpc follows the lnd versioning, thus it is recommended to specify the exact version you need for your lnd node as dependency (see [#Versioning](#Versioning)).
@ -27,7 +24,7 @@ Or install it yourself as:
## Usage
This gem makes the gRPC client classes created from the [LND service defintions](https://github.com/lightningnetwork/lnd/tree/master/lnrpc) available.
This gem makes the gRPC client classes created from the [LND service definitions](https://github.com/lightningnetwork/lnd/tree/master/lnrpc) available.
```ruby
require "lnrpc"
@ -35,7 +32,7 @@ require "lnrpc"
# With the changes in LND v.10.0 this load the `Lnrpc` and `Routerrpc` namespace
Lnrpc::Lightning::Stub
Routerrpc:::Routerrpc::Stub
Routerrpc::Routerrpc::Stub
Lnrpc::GetInfoRequest
...
```
@ -78,7 +75,7 @@ lnd = Lnrpc::Client.new({credentials_path: '/path/to.cert.cls', macaroon_path: '
lnd.lightning # => Lnrpc::Lightning::Stub
lnd.router # => Lnrpc::Router::Stub
lnd.ligthning.get_info
lnd.lightning.get_info
```
Also have a look at [examples.rb](https://github.com/bumi/lnrpc/blob/master/examples.rb)
@ -133,7 +130,7 @@ client.lightning.grpc.list_channels(request)
client.lightning.wallet_balance.total_balance
# is the same as:
request = Lnrpc::WalletBalanceRequest.new()
request = Lnrpc::WalletBalanceRequest.new
client.lightning.grpc.wallet_balance(request).total_balance
```

View File

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

View File

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

View File

@ -21,9 +21,11 @@ module Chainrpc
# registers an intent for a client to be notified once a confirmation request
# has reached its required number of confirmations on-chain.
#
# A client can specify whether the confirmation request should be for a
# particular transaction by its hash or for an output script by specifying a
# zero hash.
# 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

View File

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

View File

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

View File

@ -3,7 +3,8 @@
require 'google/protobuf'
require 'rpc_pb'
require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("invoicesrpc/invoices.proto", :syntax => :proto3) do
add_message "invoicesrpc.CancelInvoiceMsg" do
@ -25,6 +26,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -34,6 +37,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -45,4 +61,6 @@ module Invoicesrpc
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

@ -34,6 +34,10 @@ module Invoicesrpc
# 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

View File

@ -1,10 +1,24 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: rpc.proto
# source: lightning.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("rpc.proto", :syntax => :proto3) do
add_file("lightning.proto", :syntax => :proto3) do
add_message "lnrpc.SubscribeCustomMessagesRequest" do
end
add_message "lnrpc.CustomMessage" do
optional :peer, :bytes, 1
optional :type, :uint32, 2
optional :data, :bytes, 3
end
add_message "lnrpc.SendCustomMessageRequest" do
optional :peer, :bytes, 1
optional :type, :uint32, 2
optional :data, :bytes, 3
end
add_message "lnrpc.SendCustomMessageResponse" do
end
add_message "lnrpc.Utxo" do
optional :address_type, :enum, 1, "lnrpc.AddressType"
optional :address, :string, 2
@ -13,6 +27,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :outpoint, :message, 5, "lnrpc.OutPoint"
optional :confirmations, :int64, 6
end
add_message "lnrpc.OutputDetail" do
optional :output_type, :enum, 1, "lnrpc.OutputScriptType"
optional :address, :string, 2
optional :pk_script, :string, 3
optional :output_index, :int64, 4
optional :amount, :int64, 5
optional :is_our_address, :bool, 6
end
add_message "lnrpc.Transaction" do
optional :tx_hash, :string, 1
optional :amount, :int64, 2
@ -22,12 +44,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :time_stamp, :int64, 6
optional :total_fees, :int64, 7
repeated :dest_addresses, :string, 8
repeated :output_details, :message, 11, "lnrpc.OutputDetail"
optional :raw_tx_hex, :string, 9
optional :label, :string, 10
repeated :previous_outpoints, :message, 12, "lnrpc.PreviousOutPoint"
end
add_message "lnrpc.GetTransactionsRequest" do
optional :start_height, :int32, 1
optional :end_height, :int32, 2
optional :account, :string, 3
end
add_message "lnrpc.TransactionDetails" do
repeated :transactions, :message, 1, "lnrpc.Transaction"
@ -55,6 +80,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
map :dest_custom_records, :uint64, :bytes, 11
optional :allow_self_payment, :bool, 14
repeated :dest_features, :enum, 15, "lnrpc.FeatureBit"
optional :payment_addr, :bytes, 16
end
add_message "lnrpc.SendResponse" do
optional :payment_error, :string, 1
@ -81,6 +107,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :csv_delay, :uint32, 11
optional :max_accepted_htlcs, :uint32, 12
optional :channel_flags, :uint32, 13
optional :commitment_type, :enum, 14, "lnrpc.CommitmentType"
optional :wants_zero_conf, :bool, 15
optional :wants_scid_alias, :bool, 16
end
add_message "lnrpc.ChannelAcceptResponse" do
optional :accept, :bool, 1
@ -93,6 +122,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :max_htlc_count, :uint32, 8
optional :min_htlc_in, :uint64, 9
optional :min_accept_depth, :uint32, 10
optional :zero_conf, :bool, 11
end
add_message "lnrpc.ChannelPoint" do
optional :output_index, :uint32, 3
@ -106,6 +136,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :txid_str, :string, 2
optional :output_index, :uint32, 3
end
add_message "lnrpc.PreviousOutPoint" do
optional :outpoint, :string, 1
optional :is_our_output, :bool, 2
end
add_message "lnrpc.LightningAddress" do
optional :pubkey, :string, 1
optional :host, :string, 2
@ -113,14 +147,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.EstimateFeeRequest" do
map :AddrToAmount, :string, :int64, 1
optional :target_conf, :int32, 2
optional :min_confs, :int32, 3
optional :spend_unconfirmed, :bool, 4
end
add_message "lnrpc.EstimateFeeResponse" do
optional :fee_sat, :int64, 1
optional :feerate_sat_per_byte, :int64, 2
optional :sat_per_vbyte, :uint64, 3
end
add_message "lnrpc.SendManyRequest" do
map :AddrToAmount, :string, :int64, 1
optional :target_conf, :int32, 3
optional :sat_per_vbyte, :uint64, 4
optional :sat_per_byte, :int64, 5
optional :label, :string, 6
optional :min_confs, :int32, 7
@ -133,6 +171,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :addr, :string, 1
optional :amount, :int64, 2
optional :target_conf, :int32, 3
optional :sat_per_vbyte, :uint64, 4
optional :sat_per_byte, :int64, 5
optional :send_all, :bool, 6
optional :label, :string, 7
@ -145,18 +184,21 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.ListUnspentRequest" do
optional :min_confs, :int32, 1
optional :max_confs, :int32, 2
optional :account, :string, 3
end
add_message "lnrpc.ListUnspentResponse" do
repeated :utxos, :message, 1, "lnrpc.Utxo"
end
add_message "lnrpc.NewAddressRequest" do
optional :type, :enum, 1, "lnrpc.AddressType"
optional :account, :string, 2
end
add_message "lnrpc.NewAddressResponse" do
optional :address, :string, 1
end
add_message "lnrpc.SignMessageRequest" do
optional :msg, :bytes, 1
optional :single_hash, :bool, 2
end
add_message "lnrpc.SignMessageResponse" do
optional :signature, :string, 1
@ -229,6 +271,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :thaw_height, :uint32, 28
optional :local_constraints, :message, 29, "lnrpc.ChannelConstraints"
optional :remote_constraints, :message, 30, "lnrpc.ChannelConstraints"
repeated :alias_scids, :uint64, 31
optional :zero_conf, :bool, 32
optional :zero_conf_confirmed_scid, :uint64, 33
end
add_message "lnrpc.ListChannelsRequest" do
optional :active_only, :bool, 1
@ -240,6 +285,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.ListChannelsResponse" do
repeated :channels, :message, 11, "lnrpc.Channel"
end
add_message "lnrpc.AliasMap" do
optional :base_scid, :uint64, 1
repeated :aliases, :uint64, 2
end
add_message "lnrpc.ListAliasesRequest" do
end
add_message "lnrpc.ListAliasesResponse" do
repeated :alias_maps, :message, 1, "lnrpc.AliasMap"
end
add_message "lnrpc.ChannelCloseSummary" do
optional :channel_point, :string, 1
optional :chan_id, :uint64, 2
@ -254,6 +308,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :open_initiator, :enum, 11, "lnrpc.Initiator"
optional :close_initiator, :enum, 12, "lnrpc.Initiator"
repeated :resolutions, :message, 13, "lnrpc.Resolution"
repeated :alias_scids, :uint64, 14
optional :zero_conf_confirmed_scid, :uint64, 15
end
add_enum "lnrpc.ChannelCloseSummary.ClosureType" do
value :COOPERATIVE_CLOSE, 0
@ -295,6 +351,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
repeated :errors, :message, 12, "lnrpc.TimestampedError"
optional :flap_count, :int32, 13
optional :last_flap_ns, :int64, 14
optional :last_ping_payload, :bytes, 15
end
add_enum "lnrpc.Peer.SyncType" do
value :UNKNOWN_SYNC, 0
@ -343,6 +400,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
repeated :chains, :message, 16, "lnrpc.Chain"
repeated :uris, :string, 12
map :features, :uint32, :message, 19, "lnrpc.Feature"
optional :require_htlc_interceptor, :bool, 21
end
add_message "lnrpc.GetRecoveryInfoRequest" do
end
@ -373,6 +431,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :target_conf, :int32, 3
optional :sat_per_byte, :int64, 4
optional :delivery_address, :string, 5
optional :sat_per_vbyte, :uint64, 6
optional :max_fee_per_vbyte, :uint64, 7
end
add_message "lnrpc.CloseStatusUpdate" do
oneof :update do
@ -389,7 +449,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :funding_amount, :int64, 2
optional :psbt, :bytes, 3
end
add_message "lnrpc.BatchOpenChannelRequest" do
repeated :channels, :message, 1, "lnrpc.BatchOpenChannel"
optional :target_conf, :int32, 2
optional :sat_per_vbyte, :int64, 3
optional :min_confs, :int32, 4
optional :spend_unconfirmed, :bool, 5
optional :label, :string, 6
end
add_message "lnrpc.BatchOpenChannel" do
optional :node_pubkey, :bytes, 1
optional :local_funding_amount, :int64, 2
optional :push_sat, :int64, 3
optional :private, :bool, 4
optional :min_htlc_msat, :int64, 5
optional :remote_csv_delay, :uint32, 6
optional :close_address, :string, 7
optional :pending_chan_id, :bytes, 8
optional :commitment_type, :enum, 9, "lnrpc.CommitmentType"
end
add_message "lnrpc.BatchOpenChannelResponse" do
repeated :pending_channels, :message, 1, "lnrpc.PendingUpdate"
end
add_message "lnrpc.OpenChannelRequest" do
optional :sat_per_vbyte, :uint64, 1
optional :node_pubkey, :bytes, 2
optional :node_pubkey_string, :string, 3
optional :local_funding_amount, :int64, 4
@ -406,6 +489,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :remote_max_value_in_flight_msat, :uint64, 15
optional :remote_max_htlcs, :uint32, 16
optional :max_local_csv, :uint32, 17
optional :commitment_type, :enum, 18, "lnrpc.CommitmentType"
optional :zero_conf, :bool, 19
optional :scid_alias, :bool, 20
end
add_message "lnrpc.OpenStatusUpdate" do
optional :pending_chan_id, :bytes, 4
@ -448,6 +534,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.FundingPsbtVerify" do
optional :funded_psbt, :bytes, 1
optional :pending_chan_id, :bytes, 2
optional :skip_finalize, :bool, 3
end
add_message "lnrpc.FundingPsbtFinalize" do
optional :signed_psbt, :bytes, 1
@ -491,10 +578,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :remote_chan_reserve_sat, :int64, 7
optional :initiator, :enum, 8, "lnrpc.Initiator"
optional :commitment_type, :enum, 9, "lnrpc.CommitmentType"
optional :num_forwarding_packages, :int64, 10
optional :chan_status_flags, :string, 11
optional :private, :bool, 12
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
@ -503,6 +592,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
optional :limbo_balance, :int64, 2
optional :commitments, :message, 3, "lnrpc.PendingChannelsResponse.Commitments"
optional :closing_txid, :string, 4
end
add_message "lnrpc.PendingChannelsResponse.Commitments" do
optional :local_txid, :string, 1
@ -541,6 +631,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :active_channel, :message, 3, "lnrpc.ChannelPoint"
optional :inactive_channel, :message, 4, "lnrpc.ChannelPoint"
optional :pending_open_channel, :message, 6, "lnrpc.PendingUpdate"
optional :fully_resolved_channel, :message, 7, "lnrpc.ChannelPoint"
end
end
add_enum "lnrpc.ChannelEventUpdate.UpdateType" do
@ -549,6 +640,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :ACTIVE_CHANNEL, 2
value :INACTIVE_CHANNEL, 3
value :PENDING_OPEN_CHANNEL, 4
value :FULLY_RESOLVED_CHANNEL, 5
end
add_message "lnrpc.WalletAccountBalance" do
optional :confirmed_balance, :int64, 1
optional :unconfirmed_balance, :int64, 2
end
add_message "lnrpc.WalletBalanceRequest" do
end
@ -556,6 +652,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :total_balance, :int64, 1
optional :confirmed_balance, :int64, 2
optional :unconfirmed_balance, :int64, 3
optional :locked_balance, :int64, 5
optional :reserved_balance_anchor_chan, :int64, 6
map :account_balance, :string, :message, 4, "lnrpc.WalletAccountBalance"
end
add_message "lnrpc.Amount" do
optional :sat, :uint64, 1
@ -590,6 +689,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :last_hop_pubkey, :bytes, 15
repeated :route_hints, :message, 16, "lnrpc.RouteHint"
repeated :dest_features, :enum, 17, "lnrpc.FeatureBit"
optional :time_pref, :double, 18
end
add_message "lnrpc.NodePair" do
optional :from, :bytes, 1
@ -614,12 +714,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :pub_key, :string, 8
optional :tlv_payload, :bool, 9
optional :mpp_record, :message, 10, "lnrpc.MPPRecord"
optional :amp_record, :message, 12, "lnrpc.AMPRecord"
map :custom_records, :uint64, :bytes, 11
optional :metadata, :bytes, 13
end
add_message "lnrpc.MPPRecord" do
optional :payment_addr, :bytes, 11
optional :total_amt_msat, :int64, 10
end
add_message "lnrpc.AMPRecord" do
optional :root_share, :bytes, 1
optional :set_id, :bytes, 2
optional :child_index, :uint32, 3
end
add_message "lnrpc.Route" do
optional :total_time_lock, :uint32, 1
optional :total_fees, :int64, 2
@ -721,6 +828,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :global_features, :bytes, 3
optional :alias, :string, 4
optional :color, :string, 5
repeated :node_addresses, :message, 7, "lnrpc.NodeAddress"
map :features, :uint32, :message, 6, "lnrpc.Feature"
end
add_message "lnrpc.ChannelEdgeUpdate" do
@ -744,9 +852,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :fee_proportional_millionths, :uint32, 4
optional :cltv_expiry_delta, :uint32, 5
end
add_message "lnrpc.SetID" do
optional :set_id, :bytes, 1
end
add_message "lnrpc.RouteHint" do
repeated :hop_hints, :message, 1, "lnrpc.HopHint"
end
add_message "lnrpc.AMPInvoiceState" do
optional :state, :enum, 1, "lnrpc.InvoiceHTLCState"
optional :settle_index, :uint64, 2
optional :settle_time, :int64, 3
optional :amt_paid_msat, :int64, 5
end
add_message "lnrpc.Invoice" do
optional :memo, :string, 1
optional :r_preimage, :bytes, 3
@ -773,6 +890,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
map :features, :uint32, :message, 24, "lnrpc.Feature"
optional :is_keysend, :bool, 25
optional :payment_addr, :bytes, 26
optional :is_amp, :bool, 27
map :amp_invoice_state, :string, :message, 28, "lnrpc.AMPInvoiceState"
end
add_enum "lnrpc.Invoice.InvoiceState" do
value :OPEN, 0
@ -791,6 +910,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :state, :enum, 8, "lnrpc.InvoiceHTLCState"
map :custom_records, :uint64, :bytes, 9
optional :mpp_total_amt_msat, :uint64, 10
optional :amp, :message, 11, "lnrpc.AMP"
end
add_message "lnrpc.AMP" do
optional :root_share, :bytes, 1
optional :set_id, :bytes, 2
optional :child_index, :uint32, 3
optional :hash, :bytes, 4
optional :preimage, :bytes, 5
end
add_message "lnrpc.AddInvoiceResponse" do
optional :r_hash, :bytes, 1
@ -859,19 +986,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :index_offset, :uint64, 2
optional :max_payments, :uint64, 3
optional :reversed, :bool, 4
optional :count_total_payments, :bool, 5
end
add_message "lnrpc.ListPaymentsResponse" do
repeated :payments, :message, 1, "lnrpc.Payment"
optional :first_index_offset, :uint64, 2
optional :last_index_offset, :uint64, 3
optional :total_num_payments, :uint64, 4
end
add_message "lnrpc.DeletePaymentRequest" do
optional :payment_hash, :bytes, 1
optional :failed_htlcs_only, :bool, 2
end
add_message "lnrpc.DeleteAllPaymentsRequest" do
optional :failed_payments_only, :bool, 1
optional :failed_htlcs_only, :bool, 2
end
add_message "lnrpc.DeletePaymentResponse" do
end
add_message "lnrpc.DeleteAllPaymentsResponse" do
end
add_message "lnrpc.AbandonChannelRequest" do
optional :channel_point, :message, 1, "lnrpc.ChannelPoint"
optional :pending_funding_shim_only, :bool, 2
optional :i_know_what_i_am_doing, :bool, 3
end
add_message "lnrpc.AbandonChannelResponse" do
end
@ -923,6 +1061,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.PolicyUpdateRequest" do
optional :base_fee_msat, :int64, 3
optional :fee_rate, :double, 4
optional :fee_rate_ppm, :uint32, 9
optional :time_lock_delta, :uint32, 5
optional :max_htlc_msat, :uint64, 6
optional :min_htlc_msat, :uint64, 7
@ -932,7 +1071,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :chan_point, :message, 2, "lnrpc.ChannelPoint"
end
end
add_message "lnrpc.FailedUpdate" do
optional :outpoint, :message, 1, "lnrpc.OutPoint"
optional :reason, :enum, 2, "lnrpc.UpdateFailure"
optional :update_error, :string, 3
end
add_message "lnrpc.PolicyUpdateResponse" do
repeated :failed_updates, :message, 1, "lnrpc.FailedUpdate"
end
add_message "lnrpc.ForwardingHistoryRequest" do
optional :start_time, :uint64, 1
@ -950,6 +1095,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :fee_msat, :uint64, 8
optional :amt_in_msat, :uint64, 9
optional :amt_out_msat, :uint64, 10
optional :timestamp_ns, :uint64, 11
end
add_message "lnrpc.ForwardingHistoryResponse" do
repeated :forwarding_events, :message, 1, "lnrpc.ForwardingEvent"
@ -994,6 +1140,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.BakeMacaroonRequest" do
repeated :permissions, :message, 1, "lnrpc.MacaroonPermission"
optional :root_key_id, :uint64, 2
optional :allow_external_permissions, :bool, 3
end
add_message "lnrpc.BakeMacaroonResponse" do
optional :macaroon, :string, 1
@ -1052,6 +1199,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :PERMANENT_CHANNEL_FAILURE, 21
value :EXPIRY_TOO_FAR, 22
value :MPP_TIMEOUT, 23
value :INVALID_ONION_PAYLOAD, 24
value :INTERNAL_FAILURE, 997
value :UNKNOWN_FAILURE, 998
value :UNREADABLE_FAILURE, 999
@ -1079,17 +1227,79 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :entity, :string, 1
repeated :actions, :string, 2
end
add_message "lnrpc.CheckMacPermRequest" do
optional :macaroon, :bytes, 1
repeated :permissions, :message, 2, "lnrpc.MacaroonPermission"
optional :fullMethod, :string, 3
end
add_message "lnrpc.CheckMacPermResponse" do
optional :valid, :bool, 1
end
add_message "lnrpc.RPCMiddlewareRequest" do
optional :request_id, :uint64, 1
optional :raw_macaroon, :bytes, 2
optional :custom_caveat_condition, :string, 3
optional :msg_id, :uint64, 7
oneof :intercept_type do
optional :stream_auth, :message, 4, "lnrpc.StreamAuth"
optional :request, :message, 5, "lnrpc.RPCMessage"
optional :response, :message, 6, "lnrpc.RPCMessage"
optional :reg_complete, :bool, 8
end
end
add_message "lnrpc.StreamAuth" do
optional :method_full_uri, :string, 1
end
add_message "lnrpc.RPCMessage" do
optional :method_full_uri, :string, 1
optional :stream_rpc, :bool, 2
optional :type_name, :string, 3
optional :serialized, :bytes, 4
optional :is_error, :bool, 5
end
add_message "lnrpc.RPCMiddlewareResponse" do
optional :ref_msg_id, :uint64, 1
oneof :middleware_message do
optional :register, :message, 2, "lnrpc.MiddlewareRegistration"
optional :feedback, :message, 3, "lnrpc.InterceptFeedback"
end
end
add_message "lnrpc.MiddlewareRegistration" do
optional :middleware_name, :string, 1
optional :custom_macaroon_caveat_name, :string, 2
optional :read_only_mode, :bool, 3
end
add_message "lnrpc.InterceptFeedback" do
optional :error, :string, 1
optional :replace_response, :bool, 2
optional :replacement_serialized, :bytes, 3
end
add_enum "lnrpc.OutputScriptType" do
value :SCRIPT_TYPE_PUBKEY_HASH, 0
value :SCRIPT_TYPE_SCRIPT_HASH, 1
value :SCRIPT_TYPE_WITNESS_V0_PUBKEY_HASH, 2
value :SCRIPT_TYPE_WITNESS_V0_SCRIPT_HASH, 3
value :SCRIPT_TYPE_PUBKEY, 4
value :SCRIPT_TYPE_MULTISIG, 5
value :SCRIPT_TYPE_NULLDATA, 6
value :SCRIPT_TYPE_NON_STANDARD, 7
value :SCRIPT_TYPE_WITNESS_UNKNOWN, 8
value :SCRIPT_TYPE_WITNESS_V1_TAPROOT, 9
end
add_enum "lnrpc.AddressType" do
value :WITNESS_PUBKEY_HASH, 0
value :NESTED_PUBKEY_HASH, 1
value :UNUSED_WITNESS_PUBKEY_HASH, 2
value :UNUSED_NESTED_PUBKEY_HASH, 3
value :TAPROOT_PUBKEY, 4
value :UNUSED_TAPROOT_PUBKEY, 5
end
add_enum "lnrpc.CommitmentType" do
value :LEGACY, 0
value :STATIC_REMOTE_KEY, 1
value :ANCHORS, 2
value :UNKNOWN_COMMITMENT_TYPE, 999
value :UNKNOWN_COMMITMENT_TYPE, 0
value :LEGACY, 1
value :STATIC_REMOTE_KEY, 2
value :ANCHORS, 3
value :SCRIPT_ENFORCED_LEASE, 4
end
add_enum "lnrpc.Initiator" do
value :INITIATOR_UNKNOWN, 0
@ -1153,12 +1363,26 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :ANCHORS_OPT, 21
value :ANCHORS_ZERO_FEE_HTLC_REQ, 22
value :ANCHORS_ZERO_FEE_HTLC_OPT, 23
value :AMP_REQ, 30
value :AMP_OPT, 31
end
add_enum "lnrpc.UpdateFailure" do
value :UPDATE_FAILURE_UNKNOWN, 0
value :UPDATE_FAILURE_PENDING, 1
value :UPDATE_FAILURE_NOT_FOUND, 2
value :UPDATE_FAILURE_INTERNAL_ERR, 3
value :UPDATE_FAILURE_INVALID_PARAMETER, 4
end
end
end
module Lnrpc
SubscribeCustomMessagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SubscribeCustomMessagesRequest").msgclass
CustomMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CustomMessage").msgclass
SendCustomMessageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendCustomMessageRequest").msgclass
SendCustomMessageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendCustomMessageResponse").msgclass
Utxo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Utxo").msgclass
OutputDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OutputDetail").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
@ -1170,6 +1394,7 @@ module Lnrpc
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
PreviousOutPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PreviousOutPoint").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
@ -1194,6 +1419,9 @@ module Lnrpc
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
AliasMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AliasMap").msgclass
ListAliasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListAliasesRequest").msgclass
ListAliasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListAliasesResponse").msgclass
ChannelCloseSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelCloseSummary").msgclass
ChannelCloseSummary::ClosureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelCloseSummary.ClosureType").enummodule
Resolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Resolution").msgclass
@ -1219,6 +1447,9 @@ module Lnrpc
CloseStatusUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CloseStatusUpdate").msgclass
PendingUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingUpdate").msgclass
ReadyForPsbtFunding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ReadyForPsbtFunding").msgclass
BatchOpenChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BatchOpenChannelRequest").msgclass
BatchOpenChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BatchOpenChannel").msgclass
BatchOpenChannelResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BatchOpenChannelResponse").msgclass
OpenChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenChannelRequest").msgclass
OpenStatusUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenStatusUpdate").msgclass
KeyLocator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.KeyLocator").msgclass
@ -1244,6 +1475,7 @@ module Lnrpc
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
WalletAccountBalance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletAccountBalance").msgclass
WalletBalanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceRequest").msgclass
WalletBalanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceResponse").msgclass
Amount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Amount").msgclass
@ -1255,6 +1487,7 @@ module Lnrpc
QueryRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesResponse").msgclass
Hop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Hop").msgclass
MPPRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MPPRecord").msgclass
AMPRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AMPRecord").msgclass
Route = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Route").msgclass
NodeInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfoRequest").msgclass
NodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfo").msgclass
@ -1278,10 +1511,13 @@ module Lnrpc
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
SetID = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SetID").msgclass
RouteHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RouteHint").msgclass
AMPInvoiceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AMPInvoiceState").msgclass
Invoice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice").msgclass
Invoice::InvoiceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice.InvoiceState").enummodule
InvoiceHTLC = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLC").msgclass
AMP = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AMP").msgclass
AddInvoiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddInvoiceResponse").msgclass
PaymentHash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentHash").msgclass
ListInvoiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceRequest").msgclass
@ -1293,7 +1529,9 @@ module Lnrpc
HTLCAttempt::HTLCStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.HTLCAttempt.HTLCStatus").enummodule
ListPaymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsRequest").msgclass
ListPaymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsResponse").msgclass
DeletePaymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeletePaymentRequest").msgclass
DeleteAllPaymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsRequest").msgclass
DeletePaymentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeletePaymentResponse").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
@ -1306,6 +1544,7 @@ module Lnrpc
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
FailedUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FailedUpdate").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
@ -1335,6 +1574,15 @@ module Lnrpc
ChannelUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelUpdate").msgclass
MacaroonId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MacaroonId").msgclass
Op = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Op").msgclass
CheckMacPermRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CheckMacPermRequest").msgclass
CheckMacPermResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CheckMacPermResponse").msgclass
RPCMiddlewareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RPCMiddlewareRequest").msgclass
StreamAuth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.StreamAuth").msgclass
RPCMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RPCMessage").msgclass
RPCMiddlewareResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RPCMiddlewareResponse").msgclass
MiddlewareRegistration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MiddlewareRegistration").msgclass
InterceptFeedback = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InterceptFeedback").msgclass
OutputScriptType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OutputScriptType").enummodule
AddressType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddressType").enummodule
CommitmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CommitmentType").enummodule
Initiator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Initiator").enummodule
@ -1344,4 +1592,5 @@ module Lnrpc
InvoiceHTLCState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLCState").enummodule
PaymentFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentFailureReason").enummodule
FeatureBit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeatureBit").enummodule
UpdateFailure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UpdateFailure").enummodule
end

View File

@ -1,8 +1,8 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: rpc.proto for package 'lnrpc'
# Source: lightning.proto for package 'lnrpc'
require 'grpc'
require 'rpc_pb'
require 'lightning_pb'
module Lnrpc
module Lightning
@ -58,7 +58,7 @@ module Lnrpc
# 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
# 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
@ -75,7 +75,7 @@ module Lnrpc
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_byte are set, then
# outputs in parallel. If neither target_conf, or sat_per_vbyte are set, then
# the internal wallet will consult its fee model to determine a fee for the
# default confirmation target.
rpc :SendMany, ::Lnrpc::SendManyRequest, ::Lnrpc::SendManyResponse
@ -159,6 +159,13 @@ module Lnrpc
# 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
@ -256,7 +263,12 @@ module Lnrpc
# ListPayments returns a list of all outgoing payments.
rpc :ListPayments, ::Lnrpc::ListPaymentsRequest, ::Lnrpc::ListPaymentsResponse
#
# DeleteAllPayments deletes all outgoing payments from DB.
# DeletePayment deletes an outgoing payment from DB. Note that it will not
# 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
@ -325,8 +337,9 @@ module Lnrpc
# 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.
# 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.
@ -385,6 +398,37 @@ module Lnrpc
# 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

View File

@ -4,6 +4,7 @@
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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,8 @@
require 'google/protobuf'
require 'rpc_pb'
require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("routerrpc/router.proto", :syntax => :proto3) do
add_message "routerrpc.SendPaymentRequest" do
@ -28,6 +29,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -44,6 +47,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -58,6 +62,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -71,6 +81,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -124,6 +151,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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"
@ -155,6 +183,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build 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
@ -195,6 +231,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :FAIL, 1
value :RESUME, 2
end
add_enum "routerrpc.ChanStatusAction" do
value :ENABLE, 0
value :DISABLE, 1
value :AUTO, 2
end
end
end
@ -209,8 +250,15 @@ module Routerrpc
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
@ -227,7 +275,10 @@ module Routerrpc
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

@ -51,6 +51,19 @@ module Routerrpc
# 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
@ -79,6 +92,12 @@ module Routerrpc
# 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

View File

@ -21,14 +21,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build 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
@ -43,6 +46,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -51,6 +58,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build 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
@ -63,6 +71,71 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -81,4 +154,19 @@ module Signrpc
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

@ -29,8 +29,8 @@ module Signrpc
#
# 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 output and p2wkh outputs nested within a regular p2sh
# 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,
@ -62,6 +62,71 @@ module Signrpc
# 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

View File

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

View File

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

View File

@ -3,13 +3,16 @@
require 'google/protobuf'
require 'rpc_pb'
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"
@ -17,6 +20,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -32,10 +36,54 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -68,6 +116,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -80,6 +130,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -103,13 +154,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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, :uint32, 4
optional :sat_per_vbyte, :uint64, 4
end
end
add_message "walletrpc.FundPsbtResponse" do
@ -125,14 +179,35 @@ Google::Protobuf::DescriptorPool.generated_pool.build 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
@ -162,6 +237,15 @@ module Walletrpc
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
@ -182,7 +266,12 @@ module Walletrpc
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

@ -18,7 +18,9 @@ module Walletrpc
#
# ListUnspent returns a list of all utxos spendable by the wallet with a
# number of confirmations between the specified minimum and maximum.
# number of confirmations between the specified minimum and maximum. By
# 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
@ -33,6 +35,9 @@ module Walletrpc
# 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.
@ -45,6 +50,48 @@ module Walletrpc
# 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
@ -129,6 +176,19 @@ module Walletrpc
# 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

View File

@ -3,7 +3,8 @@
require 'google/protobuf'
require 'rpc_pb'
require 'lightning_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("walletunlocker.proto", :syntax => :proto3) do
add_message "lnrpc.GenSeedRequest" do
@ -21,10 +22,24 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -50,6 +65,8 @@ module Lnrpc
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

View File

@ -26,6 +26,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -55,6 +56,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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

View File

@ -1,4 +1,5 @@
require "grpc"
require "digest"
require "lnrpc/macaroon_interceptor"
module Lnrpc
class Client
@ -15,13 +16,13 @@ module Lnrpc
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].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))
else
self.credentials = nil
end
if !options.has_key?(:macaroon) && File.exists?(::File.expand_path(options[:macaroon_path] || DEFAULT_MACAROON_PATH))
if !options.has_key?(:macaroon) && File.exist?(::File.expand_path(options[:macaroon_path] || DEFAULT_MACAROON_PATH))
options[:macaroon] = ::File.read(::File.expand_path(options[:macaroon_path] || DEFAULT_MACAROON_PATH)).unpack("H*")
end
self.macaroon = options[:macaroon]

View File

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

View File

@ -30,5 +30,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_dependency "grpc", ">= 1.28.0"
spec.add_dependency "google-protobuf", ">=3.12"
spec.add_dependency "google-protobuf", ">=3.15.7"
end