1
0
mirror of https://github.com/bumi/lnrpc synced 2026-02-22 10:17:49 +00:00

22 Commits

Author SHA1 Message Date
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
19 changed files with 357 additions and 36 deletions

View File

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

View File

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

View File

@@ -24,3 +24,46 @@ puts lnd.wallet_kit.next_addr
lnd.lightning.subscribe_invoices(settle_index: 1).each do |invoice| lnd.lightning.subscribe_invoices(settle_index: 1).each do |invoice|
puts invoice.payment_request puts invoice.payment_request
end end
# sign a message with your node
signed_message = lnd.lightning.sign_message({ msg: "Money printer goes brrr" })
puts "Signature: " + signed_message.signature
# verify a signed message by another node
verification_response = lnd.lightning.verify_message({
msg: "Money printer goes brrr",
signature: signed_message.signature
})
puts "Pubkey: " + verification_response.pubkey # pubkey of the node that signed
puts "Valid: " + verification_response.valid.to_s
# get information on a node
node_info_response = lnd.lightning.get_node_info(pub_key: verification_response.pubkey, include_channels: true)
puts "Updated: " + Time.at(node_info_response.node.last_update).to_s
puts "Pubkey: " + node_info_response.node.pub_key.to_s
puts "Alias: " + node_info_response.node.alias.to_s
puts "Color: " + node_info_response.node.color.to_s
puts "Channels: " + node_info_response.num_channels.to_s
puts "Capacity SAT: " + node_info_response.total_capacity.to_s
puts "Address: " + node_info_response.node.addresses.first["addr"].to_s
# extract channel information
node_info_response.channels.each do |channel|
puts "Channel ID: " + channel["channel_id"].to_s
puts "Channel 1:" + channel["node1_pub"].to_s # pubkey of the first node
puts "Channel 2:" + channel["node2_pub"].to_s # pubkey of the second node
puts "Channel Capacity:" + channel["capacity"].to_s
end
# update channel policy
channel = lnd.lightning.list_channels.channels[0]
puts lnd.lightning.get_chan_info(chan_id: channel.chan_id)
channel_point = {
funding_txid_str: channel.channel_point.split(":")[0],
output_index: channel.channel_point.split(":")[1].to_i
}
lnd.lightning.update_channel_policy({
time_lock_delta: 40,
base_fee_msat: 1100,
chan_point: channel_point
})

View File

@@ -18,9 +18,8 @@ for file in $PROTOS; do
echo "Generating protos from ${file}, into ${LNRPC_TARGET_DIR}/${DIRECTORY}" echo "Generating protos from ${file}, into ${LNRPC_TARGET_DIR}/${DIRECTORY}"
# writes all ruby files in the ruby directory # writes all ruby files in the ruby directory
grpc_tools_ruby_protoc -I/usr/local/include \ grpc_tools_ruby_protoc -I. \
-I. \ -I$GOPATH/src/github.com/googleapis/googleapis \
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
-I$GOPATH/src/github.com/lightningnetwork/lnd/lnrpc \ -I$GOPATH/src/github.com/lightningnetwork/lnd/lnrpc \
--ruby_out=plugins=grpc,paths=source_relative:${LNRPC_TARGET_DIR} \ --ruby_out=plugins=grpc,paths=source_relative:${LNRPC_TARGET_DIR} \
--grpc_out=${LNRPC_TARGET_DIR} "${file}" --grpc_out=${LNRPC_TARGET_DIR} "${file}"

View File

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

View File

@@ -34,6 +34,10 @@ module Invoicesrpc
# SettleInvoice settles an accepted invoice. If the invoice is already # SettleInvoice settles an accepted invoice. If the invoice is already
# settled, this call will succeed. # settled, this call will succeed.
rpc :SettleInvoice, ::Invoicesrpc::SettleInvoiceMsg, ::Invoicesrpc::SettleInvoiceResp rpc :SettleInvoice, ::Invoicesrpc::SettleInvoiceMsg, ::Invoicesrpc::SettleInvoiceResp
#
# LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
# using either its payment hash, payment address, or set ID.
rpc :LookupInvoiceV2, ::Invoicesrpc::LookupInvoiceMsg, ::Lnrpc::Invoice
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

View File

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

View File

@@ -4,6 +4,7 @@
require 'google/protobuf' require 'google/protobuf'
require 'rpc_pb' require 'rpc_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("routerrpc/router.proto", :syntax => :proto3) do add_file("routerrpc/router.proto", :syntax => :proto3) do
add_message "routerrpc.SendPaymentRequest" do add_message "routerrpc.SendPaymentRequest" do
@@ -28,6 +29,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :max_parts, :uint32, 17 optional :max_parts, :uint32, 17
optional :no_inflight_updates, :bool, 18 optional :no_inflight_updates, :bool, 18
optional :max_shard_size_msat, :uint64, 21 optional :max_shard_size_msat, :uint64, 21
optional :amp, :bool, 22
end end
add_message "routerrpc.TrackPaymentRequest" do add_message "routerrpc.TrackPaymentRequest" do
optional :payment_hash, :bytes, 1 optional :payment_hash, :bytes, 1
@@ -58,6 +60,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "routerrpc.QueryMissionControlResponse" do add_message "routerrpc.QueryMissionControlResponse" do
repeated :pairs, :message, 2, "routerrpc.PairHistory" repeated :pairs, :message, 2, "routerrpc.PairHistory"
end end
add_message "routerrpc.XImportMissionControlRequest" do
repeated :pairs, :message, 1, "routerrpc.PairHistory"
optional :force, :bool, 2
end
add_message "routerrpc.XImportMissionControlResponse" do
end
add_message "routerrpc.PairHistory" do add_message "routerrpc.PairHistory" do
optional :node_from, :bytes, 1 optional :node_from, :bytes, 1
optional :node_to, :bytes, 2 optional :node_to, :bytes, 2
@@ -71,6 +79,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :success_amt_sat, :int64, 6 optional :success_amt_sat, :int64, 6
optional :success_amt_msat, :int64, 7 optional :success_amt_msat, :int64, 7
end end
add_message "routerrpc.GetMissionControlConfigRequest" do
end
add_message "routerrpc.GetMissionControlConfigResponse" do
optional :config, :message, 1, "routerrpc.MissionControlConfig"
end
add_message "routerrpc.SetMissionControlConfigRequest" do
optional :config, :message, 1, "routerrpc.MissionControlConfig"
end
add_message "routerrpc.SetMissionControlConfigResponse" do
end
add_message "routerrpc.MissionControlConfig" do
optional :half_life_seconds, :uint64, 1
optional :hop_probability, :float, 2
optional :weight, :float, 3
optional :maximum_payment_results, :uint32, 4
optional :minimum_failure_relax_interval, :uint64, 5
end
add_message "routerrpc.QueryProbabilityRequest" do add_message "routerrpc.QueryProbabilityRequest" do
optional :from_node, :bytes, 1 optional :from_node, :bytes, 1
optional :to_node, :bytes, 2 optional :to_node, :bytes, 2
@@ -124,6 +149,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "routerrpc.ForwardFailEvent" do add_message "routerrpc.ForwardFailEvent" do
end end
add_message "routerrpc.SettleEvent" do add_message "routerrpc.SettleEvent" do
optional :preimage, :bytes, 1
end end
add_message "routerrpc.LinkFailEvent" do add_message "routerrpc.LinkFailEvent" do
optional :info, :message, 1, "routerrpc.HtlcInfo" optional :info, :message, 1, "routerrpc.HtlcInfo"
@@ -156,6 +182,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :action, :enum, 2, "routerrpc.ResolveHoldForwardAction" optional :action, :enum, 2, "routerrpc.ResolveHoldForwardAction"
optional :preimage, :bytes, 3 optional :preimage, :bytes, 3
end 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 add_enum "routerrpc.FailureDetail" do
value :UNKNOWN, 0 value :UNKNOWN, 0
value :NO_DETAIL, 1 value :NO_DETAIL, 1
@@ -195,6 +227,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :FAIL, 1 value :FAIL, 1
value :RESUME, 2 value :RESUME, 2
end end
add_enum "routerrpc.ChanStatusAction" do
value :ENABLE, 0
value :DISABLE, 1
value :AUTO, 2
end
end end
end end
@@ -209,8 +246,15 @@ module Routerrpc
ResetMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlResponse").msgclass ResetMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlResponse").msgclass
QueryMissionControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlRequest").msgclass QueryMissionControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlRequest").msgclass
QueryMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlResponse").msgclass QueryMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlResponse").msgclass
XImportMissionControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.XImportMissionControlRequest").msgclass
XImportMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.XImportMissionControlResponse").msgclass
PairHistory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairHistory").msgclass PairHistory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairHistory").msgclass
PairData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairData").msgclass PairData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairData").msgclass
GetMissionControlConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.GetMissionControlConfigRequest").msgclass
GetMissionControlConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.GetMissionControlConfigResponse").msgclass
SetMissionControlConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SetMissionControlConfigRequest").msgclass
SetMissionControlConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SetMissionControlConfigResponse").msgclass
MissionControlConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.MissionControlConfig").msgclass
QueryProbabilityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityRequest").msgclass QueryProbabilityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityRequest").msgclass
QueryProbabilityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityResponse").msgclass QueryProbabilityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityResponse").msgclass
BuildRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteRequest").msgclass BuildRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteRequest").msgclass
@@ -227,7 +271,10 @@ module Routerrpc
CircuitKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.CircuitKey").msgclass CircuitKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.CircuitKey").msgclass
ForwardHtlcInterceptRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptRequest").msgclass ForwardHtlcInterceptRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptRequest").msgclass
ForwardHtlcInterceptResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptResponse").msgclass ForwardHtlcInterceptResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptResponse").msgclass
UpdateChanStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.UpdateChanStatusRequest").msgclass
UpdateChanStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.UpdateChanStatusResponse").msgclass
FailureDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.FailureDetail").enummodule FailureDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.FailureDetail").enummodule
PaymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentState").enummodule PaymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentState").enummodule
ResolveHoldForwardAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResolveHoldForwardAction").enummodule ResolveHoldForwardAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResolveHoldForwardAction").enummodule
ChanStatusAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ChanStatusAction").enummodule
end end

View File

@@ -51,6 +51,19 @@ module Routerrpc
# It is a development feature. # It is a development feature.
rpc :QueryMissionControl, ::Routerrpc::QueryMissionControlRequest, ::Routerrpc::QueryMissionControlResponse rpc :QueryMissionControl, ::Routerrpc::QueryMissionControlRequest, ::Routerrpc::QueryMissionControlResponse
# #
# XImportMissionControl is an experimental API that imports the state provided
# to the internal mission control's state, using all results which are more
# recent than our existing values. These values will only be imported
# in-memory, and will not be persisted across restarts.
rpc :XImportMissionControl, ::Routerrpc::XImportMissionControlRequest, ::Routerrpc::XImportMissionControlResponse
#
# GetMissionControlConfig returns mission control's current config.
rpc :GetMissionControlConfig, ::Routerrpc::GetMissionControlConfigRequest, ::Routerrpc::GetMissionControlConfigResponse
#
# SetMissionControlConfig will set mission control's config, if the config
# provided is valid.
rpc :SetMissionControlConfig, ::Routerrpc::SetMissionControlConfigRequest, ::Routerrpc::SetMissionControlConfigResponse
#
# QueryProbability returns the current success probability estimate for a # QueryProbability returns the current success probability estimate for a
# given node pair and amount. # given node pair and amount.
rpc :QueryProbability, ::Routerrpc::QueryProbabilityRequest, ::Routerrpc::QueryProbabilityResponse rpc :QueryProbability, ::Routerrpc::QueryProbabilityRequest, ::Routerrpc::QueryProbabilityResponse
@@ -79,6 +92,12 @@ module Routerrpc
# In case of interception, the htlc can be either settled, cancelled or # In case of interception, the htlc can be either settled, cancelled or
# resumed later by using the ResolveHoldForward endpoint. # resumed later by using the ResolveHoldForward endpoint.
rpc :HtlcInterceptor, stream(::Routerrpc::ForwardHtlcInterceptResponse), stream(::Routerrpc::ForwardHtlcInterceptRequest) rpc :HtlcInterceptor, stream(::Routerrpc::ForwardHtlcInterceptResponse), stream(::Routerrpc::ForwardHtlcInterceptRequest)
#
# UpdateChanStatus attempts to manually set the state of a channel
# (enabled, disabled, or auto). A manual "disable" request will cause the
# channel to stay disabled until a subsequent manual request of either
# "enable" or "auto".
rpc :UpdateChanStatus, ::Routerrpc::UpdateChanStatusRequest, ::Routerrpc::UpdateChanStatusResponse
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

View File

@@ -28,6 +28,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.GetTransactionsRequest" do add_message "lnrpc.GetTransactionsRequest" do
optional :start_height, :int32, 1 optional :start_height, :int32, 1
optional :end_height, :int32, 2 optional :end_height, :int32, 2
optional :account, :string, 3
end end
add_message "lnrpc.TransactionDetails" do add_message "lnrpc.TransactionDetails" do
repeated :transactions, :message, 1, "lnrpc.Transaction" repeated :transactions, :message, 1, "lnrpc.Transaction"
@@ -55,6 +56,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
map :dest_custom_records, :uint64, :bytes, 11 map :dest_custom_records, :uint64, :bytes, 11
optional :allow_self_payment, :bool, 14 optional :allow_self_payment, :bool, 14
repeated :dest_features, :enum, 15, "lnrpc.FeatureBit" repeated :dest_features, :enum, 15, "lnrpc.FeatureBit"
optional :payment_addr, :bytes, 16
end end
add_message "lnrpc.SendResponse" do add_message "lnrpc.SendResponse" do
optional :payment_error, :string, 1 optional :payment_error, :string, 1
@@ -113,14 +115,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.EstimateFeeRequest" do add_message "lnrpc.EstimateFeeRequest" do
map :AddrToAmount, :string, :int64, 1 map :AddrToAmount, :string, :int64, 1
optional :target_conf, :int32, 2 optional :target_conf, :int32, 2
optional :min_confs, :int32, 3
optional :spend_unconfirmed, :bool, 4
end end
add_message "lnrpc.EstimateFeeResponse" do add_message "lnrpc.EstimateFeeResponse" do
optional :fee_sat, :int64, 1 optional :fee_sat, :int64, 1
optional :feerate_sat_per_byte, :int64, 2 optional :feerate_sat_per_byte, :int64, 2
optional :sat_per_vbyte, :uint64, 3
end end
add_message "lnrpc.SendManyRequest" do add_message "lnrpc.SendManyRequest" do
map :AddrToAmount, :string, :int64, 1 map :AddrToAmount, :string, :int64, 1
optional :target_conf, :int32, 3 optional :target_conf, :int32, 3
optional :sat_per_vbyte, :uint64, 4
optional :sat_per_byte, :int64, 5 optional :sat_per_byte, :int64, 5
optional :label, :string, 6 optional :label, :string, 6
optional :min_confs, :int32, 7 optional :min_confs, :int32, 7
@@ -133,6 +139,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :addr, :string, 1 optional :addr, :string, 1
optional :amount, :int64, 2 optional :amount, :int64, 2
optional :target_conf, :int32, 3 optional :target_conf, :int32, 3
optional :sat_per_vbyte, :uint64, 4
optional :sat_per_byte, :int64, 5 optional :sat_per_byte, :int64, 5
optional :send_all, :bool, 6 optional :send_all, :bool, 6
optional :label, :string, 7 optional :label, :string, 7
@@ -145,12 +152,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.ListUnspentRequest" do add_message "lnrpc.ListUnspentRequest" do
optional :min_confs, :int32, 1 optional :min_confs, :int32, 1
optional :max_confs, :int32, 2 optional :max_confs, :int32, 2
optional :account, :string, 3
end end
add_message "lnrpc.ListUnspentResponse" do add_message "lnrpc.ListUnspentResponse" do
repeated :utxos, :message, 1, "lnrpc.Utxo" repeated :utxos, :message, 1, "lnrpc.Utxo"
end end
add_message "lnrpc.NewAddressRequest" do add_message "lnrpc.NewAddressRequest" do
optional :type, :enum, 1, "lnrpc.AddressType" optional :type, :enum, 1, "lnrpc.AddressType"
optional :account, :string, 2
end end
add_message "lnrpc.NewAddressResponse" do add_message "lnrpc.NewAddressResponse" do
optional :address, :string, 1 optional :address, :string, 1
@@ -373,6 +382,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :target_conf, :int32, 3 optional :target_conf, :int32, 3
optional :sat_per_byte, :int64, 4 optional :sat_per_byte, :int64, 4
optional :delivery_address, :string, 5 optional :delivery_address, :string, 5
optional :sat_per_vbyte, :uint64, 6
end end
add_message "lnrpc.CloseStatusUpdate" do add_message "lnrpc.CloseStatusUpdate" do
oneof :update do oneof :update do
@@ -390,6 +400,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :psbt, :bytes, 3 optional :psbt, :bytes, 3
end end
add_message "lnrpc.OpenChannelRequest" do add_message "lnrpc.OpenChannelRequest" do
optional :sat_per_vbyte, :uint64, 1
optional :node_pubkey, :bytes, 2 optional :node_pubkey, :bytes, 2
optional :node_pubkey_string, :string, 3 optional :node_pubkey_string, :string, 3
optional :local_funding_amount, :int64, 4 optional :local_funding_amount, :int64, 4
@@ -550,12 +561,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :INACTIVE_CHANNEL, 3 value :INACTIVE_CHANNEL, 3
value :PENDING_OPEN_CHANNEL, 4 value :PENDING_OPEN_CHANNEL, 4
end end
add_message "lnrpc.WalletAccountBalance" do
optional :confirmed_balance, :int64, 1
optional :unconfirmed_balance, :int64, 2
end
add_message "lnrpc.WalletBalanceRequest" do add_message "lnrpc.WalletBalanceRequest" do
end end
add_message "lnrpc.WalletBalanceResponse" do add_message "lnrpc.WalletBalanceResponse" do
optional :total_balance, :int64, 1 optional :total_balance, :int64, 1
optional :confirmed_balance, :int64, 2 optional :confirmed_balance, :int64, 2
optional :unconfirmed_balance, :int64, 3 optional :unconfirmed_balance, :int64, 3
map :account_balance, :string, :message, 4, "lnrpc.WalletAccountBalance"
end end
add_message "lnrpc.Amount" do add_message "lnrpc.Amount" do
optional :sat, :uint64, 1 optional :sat, :uint64, 1
@@ -614,12 +630,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :pub_key, :string, 8 optional :pub_key, :string, 8
optional :tlv_payload, :bool, 9 optional :tlv_payload, :bool, 9
optional :mpp_record, :message, 10, "lnrpc.MPPRecord" optional :mpp_record, :message, 10, "lnrpc.MPPRecord"
optional :amp_record, :message, 12, "lnrpc.AMPRecord"
map :custom_records, :uint64, :bytes, 11 map :custom_records, :uint64, :bytes, 11
end end
add_message "lnrpc.MPPRecord" do add_message "lnrpc.MPPRecord" do
optional :payment_addr, :bytes, 11 optional :payment_addr, :bytes, 11
optional :total_amt_msat, :int64, 10 optional :total_amt_msat, :int64, 10
end end
add_message "lnrpc.AMPRecord" do
optional :root_share, :bytes, 1
optional :set_id, :bytes, 2
optional :child_index, :uint32, 3
end
add_message "lnrpc.Route" do add_message "lnrpc.Route" do
optional :total_time_lock, :uint32, 1 optional :total_time_lock, :uint32, 1
optional :total_fees, :int64, 2 optional :total_fees, :int64, 2
@@ -721,6 +743,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :global_features, :bytes, 3 optional :global_features, :bytes, 3
optional :alias, :string, 4 optional :alias, :string, 4
optional :color, :string, 5 optional :color, :string, 5
repeated :node_addresses, :message, 7, "lnrpc.NodeAddress"
map :features, :uint32, :message, 6, "lnrpc.Feature" map :features, :uint32, :message, 6, "lnrpc.Feature"
end end
add_message "lnrpc.ChannelEdgeUpdate" do add_message "lnrpc.ChannelEdgeUpdate" do
@@ -773,6 +796,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
map :features, :uint32, :message, 24, "lnrpc.Feature" map :features, :uint32, :message, 24, "lnrpc.Feature"
optional :is_keysend, :bool, 25 optional :is_keysend, :bool, 25
optional :payment_addr, :bytes, 26 optional :payment_addr, :bytes, 26
optional :is_amp, :bool, 27
end end
add_enum "lnrpc.Invoice.InvoiceState" do add_enum "lnrpc.Invoice.InvoiceState" do
value :OPEN, 0 value :OPEN, 0
@@ -791,6 +815,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :state, :enum, 8, "lnrpc.InvoiceHTLCState" optional :state, :enum, 8, "lnrpc.InvoiceHTLCState"
map :custom_records, :uint64, :bytes, 9 map :custom_records, :uint64, :bytes, 9
optional :mpp_total_amt_msat, :uint64, 10 optional :mpp_total_amt_msat, :uint64, 10
optional :amp, :message, 11, "lnrpc.AMP"
end
add_message "lnrpc.AMP" do
optional :root_share, :bytes, 1
optional :set_id, :bytes, 2
optional :child_index, :uint32, 3
optional :hash, :bytes, 4
optional :preimage, :bytes, 5
end end
add_message "lnrpc.AddInvoiceResponse" do add_message "lnrpc.AddInvoiceResponse" do
optional :r_hash, :bytes, 1 optional :r_hash, :bytes, 1
@@ -866,6 +898,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :last_index_offset, :uint64, 3 optional :last_index_offset, :uint64, 3
end end
add_message "lnrpc.DeleteAllPaymentsRequest" do add_message "lnrpc.DeleteAllPaymentsRequest" do
optional :failed_payments_only, :bool, 1
optional :failed_htlcs_only, :bool, 2
end end
add_message "lnrpc.DeleteAllPaymentsResponse" do add_message "lnrpc.DeleteAllPaymentsResponse" do
end end
@@ -950,6 +984,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :fee_msat, :uint64, 8 optional :fee_msat, :uint64, 8
optional :amt_in_msat, :uint64, 9 optional :amt_in_msat, :uint64, 9
optional :amt_out_msat, :uint64, 10 optional :amt_out_msat, :uint64, 10
optional :timestamp_ns, :uint64, 11
end end
add_message "lnrpc.ForwardingHistoryResponse" do add_message "lnrpc.ForwardingHistoryResponse" do
repeated :forwarding_events, :message, 1, "lnrpc.ForwardingEvent" repeated :forwarding_events, :message, 1, "lnrpc.ForwardingEvent"
@@ -1052,6 +1087,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :PERMANENT_CHANNEL_FAILURE, 21 value :PERMANENT_CHANNEL_FAILURE, 21
value :EXPIRY_TOO_FAR, 22 value :EXPIRY_TOO_FAR, 22
value :MPP_TIMEOUT, 23 value :MPP_TIMEOUT, 23
value :INVALID_ONION_PAYLOAD, 24
value :INTERNAL_FAILURE, 997 value :INTERNAL_FAILURE, 997
value :UNKNOWN_FAILURE, 998 value :UNKNOWN_FAILURE, 998
value :UNREADABLE_FAILURE, 999 value :UNREADABLE_FAILURE, 999
@@ -1153,6 +1189,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
value :ANCHORS_OPT, 21 value :ANCHORS_OPT, 21
value :ANCHORS_ZERO_FEE_HTLC_REQ, 22 value :ANCHORS_ZERO_FEE_HTLC_REQ, 22
value :ANCHORS_ZERO_FEE_HTLC_OPT, 23 value :ANCHORS_ZERO_FEE_HTLC_OPT, 23
value :AMP_REQ, 30
value :AMP_OPT, 31
end end
end end
end end
@@ -1244,6 +1282,7 @@ module Lnrpc
ChannelEventSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventSubscription").msgclass ChannelEventSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventSubscription").msgclass
ChannelEventUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate").msgclass ChannelEventUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate").msgclass
ChannelEventUpdate::UpdateType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate.UpdateType").enummodule ChannelEventUpdate::UpdateType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate.UpdateType").enummodule
WalletAccountBalance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletAccountBalance").msgclass
WalletBalanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceRequest").msgclass WalletBalanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceRequest").msgclass
WalletBalanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceResponse").msgclass WalletBalanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceResponse").msgclass
Amount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Amount").msgclass Amount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Amount").msgclass
@@ -1255,6 +1294,7 @@ module Lnrpc
QueryRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesResponse").msgclass QueryRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesResponse").msgclass
Hop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Hop").msgclass Hop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Hop").msgclass
MPPRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MPPRecord").msgclass MPPRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MPPRecord").msgclass
AMPRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AMPRecord").msgclass
Route = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Route").msgclass Route = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Route").msgclass
NodeInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfoRequest").msgclass NodeInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfoRequest").msgclass
NodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfo").msgclass NodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfo").msgclass
@@ -1282,6 +1322,7 @@ module Lnrpc
Invoice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice").msgclass Invoice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice").msgclass
Invoice::InvoiceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice.InvoiceState").enummodule Invoice::InvoiceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice.InvoiceState").enummodule
InvoiceHTLC = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLC").msgclass InvoiceHTLC = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLC").msgclass
AMP = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AMP").msgclass
AddInvoiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddInvoiceResponse").msgclass AddInvoiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddInvoiceResponse").msgclass
PaymentHash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentHash").msgclass PaymentHash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentHash").msgclass
ListInvoiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceRequest").msgclass ListInvoiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceRequest").msgclass

View File

@@ -58,7 +58,7 @@ module Lnrpc
# lncli: `sendcoins` # lncli: `sendcoins`
# SendCoins executes a request to send coins to a particular address. Unlike # SendCoins executes a request to send coins to a particular address. Unlike
# SendMany, this RPC call only allows creating a single output at a time. If # SendMany, this RPC call only allows creating a single output at a time. If
# neither target_conf, or sat_per_byte are set, then the internal wallet will # neither target_conf, or sat_per_vbyte are set, then the internal wallet will
# consult its fee model to determine a fee for the default confirmation # consult its fee model to determine a fee for the default confirmation
# target. # target.
rpc :SendCoins, ::Lnrpc::SendCoinsRequest, ::Lnrpc::SendCoinsResponse rpc :SendCoins, ::Lnrpc::SendCoinsRequest, ::Lnrpc::SendCoinsResponse
@@ -75,7 +75,7 @@ module Lnrpc
rpc :SubscribeTransactions, ::Lnrpc::GetTransactionsRequest, stream(::Lnrpc::Transaction) rpc :SubscribeTransactions, ::Lnrpc::GetTransactionsRequest, stream(::Lnrpc::Transaction)
# lncli: `sendmany` # lncli: `sendmany`
# SendMany handles a request for a transaction that creates multiple specified # SendMany handles a request for a transaction that creates multiple specified
# outputs in parallel. If neither target_conf, or sat_per_byte are set, then # outputs in parallel. If neither target_conf, or sat_per_vbyte are set, then
# the internal wallet will consult its fee model to determine a fee for the # the internal wallet will consult its fee model to determine a fee for the
# default confirmation target. # default confirmation target.
rpc :SendMany, ::Lnrpc::SendManyRequest, ::Lnrpc::SendManyResponse rpc :SendMany, ::Lnrpc::SendManyRequest, ::Lnrpc::SendManyResponse

View File

@@ -43,6 +43,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "signrpc.SignMessageReq" do add_message "signrpc.SignMessageReq" do
optional :msg, :bytes, 1 optional :msg, :bytes, 1
optional :key_loc, :message, 2, "signrpc.KeyLocator" optional :key_loc, :message, 2, "signrpc.KeyLocator"
optional :double_hash, :bool, 3
optional :compact_sig, :bool, 4
end end
add_message "signrpc.SignMessageResp" do add_message "signrpc.SignMessageResp" do
optional :signature, :bytes, 1 optional :signature, :bytes, 1

View File

@@ -5,11 +5,13 @@ require 'google/protobuf'
require 'rpc_pb' require 'rpc_pb'
require 'signrpc/signer_pb' require 'signrpc/signer_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("walletrpc/walletkit.proto", :syntax => :proto3) do add_file("walletrpc/walletkit.proto", :syntax => :proto3) do
add_message "walletrpc.ListUnspentRequest" do add_message "walletrpc.ListUnspentRequest" do
optional :min_confs, :int32, 1 optional :min_confs, :int32, 1
optional :max_confs, :int32, 2 optional :max_confs, :int32, 2
optional :account, :string, 3
end end
add_message "walletrpc.ListUnspentResponse" do add_message "walletrpc.ListUnspentResponse" do
repeated :utxos, :message, 1, "lnrpc.Utxo" repeated :utxos, :message, 1, "lnrpc.Utxo"
@@ -17,6 +19,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "walletrpc.LeaseOutputRequest" do add_message "walletrpc.LeaseOutputRequest" do
optional :id, :bytes, 1 optional :id, :bytes, 1
optional :outpoint, :message, 2, "lnrpc.OutPoint" optional :outpoint, :message, 2, "lnrpc.OutPoint"
optional :expiration_seconds, :uint64, 3
end end
add_message "walletrpc.LeaseOutputResponse" do add_message "walletrpc.LeaseOutputResponse" do
optional :expiration, :uint64, 1 optional :expiration, :uint64, 1
@@ -32,10 +35,48 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :key_family, :int32, 2 optional :key_family, :int32, 2
end end
add_message "walletrpc.AddrRequest" do add_message "walletrpc.AddrRequest" do
optional :account, :string, 1
optional :type, :enum, 2, "walletrpc.AddressType"
optional :change, :bool, 3
end end
add_message "walletrpc.AddrResponse" do add_message "walletrpc.AddrResponse" do
optional :addr, :string, 1 optional :addr, :string, 1
end end
add_message "walletrpc.Account" do
optional :name, :string, 1
optional :address_type, :enum, 2, "walletrpc.AddressType"
optional :extended_public_key, :string, 3
optional :master_key_fingerprint, :bytes, 4
optional :derivation_path, :string, 5
optional :external_key_count, :uint32, 6
optional :internal_key_count, :uint32, 7
optional :watch_only, :bool, 8
end
add_message "walletrpc.ListAccountsRequest" do
optional :name, :string, 1
optional :address_type, :enum, 2, "walletrpc.AddressType"
end
add_message "walletrpc.ListAccountsResponse" do
repeated :accounts, :message, 1, "walletrpc.Account"
end
add_message "walletrpc.ImportAccountRequest" do
optional :name, :string, 1
optional :extended_public_key, :string, 2
optional :master_key_fingerprint, :bytes, 3
optional :address_type, :enum, 4, "walletrpc.AddressType"
optional :dry_run, :bool, 5
end
add_message "walletrpc.ImportAccountResponse" do
optional :account, :message, 1, "walletrpc.Account"
repeated :dry_run_external_addrs, :string, 2
repeated :dry_run_internal_addrs, :string, 3
end
add_message "walletrpc.ImportPublicKeyRequest" do
optional :public_key, :bytes, 1
optional :address_type, :enum, 2, "walletrpc.AddressType"
end
add_message "walletrpc.ImportPublicKeyResponse" do
end
add_message "walletrpc.Transaction" do add_message "walletrpc.Transaction" do
optional :tx_hex, :bytes, 1 optional :tx_hex, :bytes, 1
optional :label, :string, 2 optional :label, :string, 2
@@ -68,6 +109,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :next_broadcast_height, :uint32, 6 optional :next_broadcast_height, :uint32, 6
optional :requested_conf_target, :uint32, 8 optional :requested_conf_target, :uint32, 8
optional :requested_sat_per_byte, :uint32, 9 optional :requested_sat_per_byte, :uint32, 9
optional :sat_per_vbyte, :uint64, 10
optional :requested_sat_per_vbyte, :uint64, 11
optional :force, :bool, 7 optional :force, :bool, 7
end end
add_message "walletrpc.PendingSweepsRequest" do add_message "walletrpc.PendingSweepsRequest" do
@@ -80,6 +123,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :target_conf, :uint32, 2 optional :target_conf, :uint32, 2
optional :sat_per_byte, :uint32, 3 optional :sat_per_byte, :uint32, 3
optional :force, :bool, 4 optional :force, :bool, 4
optional :sat_per_vbyte, :uint64, 5
end end
add_message "walletrpc.BumpFeeResponse" do add_message "walletrpc.BumpFeeResponse" do
end end
@@ -103,13 +147,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "walletrpc.LabelTransactionResponse" do add_message "walletrpc.LabelTransactionResponse" do
end end
add_message "walletrpc.FundPsbtRequest" do add_message "walletrpc.FundPsbtRequest" do
optional :account, :string, 5
optional :min_confs, :int32, 6
optional :spend_unconfirmed, :bool, 7
oneof :template do oneof :template do
optional :psbt, :bytes, 1 optional :psbt, :bytes, 1
optional :raw, :message, 2, "walletrpc.TxTemplate" optional :raw, :message, 2, "walletrpc.TxTemplate"
end end
oneof :fees do oneof :fees do
optional :target_conf, :uint32, 3 optional :target_conf, :uint32, 3
optional :sat_per_vbyte, :uint32, 4 optional :sat_per_vbyte, :uint64, 4
end end
end end
add_message "walletrpc.FundPsbtResponse" do add_message "walletrpc.FundPsbtResponse" do
@@ -126,13 +173,31 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :outpoint, :message, 2, "lnrpc.OutPoint" optional :outpoint, :message, 2, "lnrpc.OutPoint"
optional :expiration, :uint64, 3 optional :expiration, :uint64, 3
end 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 add_message "walletrpc.FinalizePsbtRequest" do
optional :funded_psbt, :bytes, 1 optional :funded_psbt, :bytes, 1
optional :account, :string, 5
end end
add_message "walletrpc.FinalizePsbtResponse" do add_message "walletrpc.FinalizePsbtResponse" do
optional :signed_psbt, :bytes, 1 optional :signed_psbt, :bytes, 1
optional :raw_final_tx, :bytes, 2 optional :raw_final_tx, :bytes, 2
end 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
end
add_enum "walletrpc.WitnessType" do add_enum "walletrpc.WitnessType" do
value :UNKNOWN_WITNESS, 0 value :UNKNOWN_WITNESS, 0
value :COMMITMENT_TIME_LOCK, 1 value :COMMITMENT_TIME_LOCK, 1
@@ -162,6 +227,13 @@ module Walletrpc
KeyReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.KeyReq").msgclass KeyReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.KeyReq").msgclass
AddrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrRequest").msgclass AddrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrRequest").msgclass
AddrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrResponse").msgclass AddrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrResponse").msgclass
Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Account").msgclass
ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAccountsRequest").msgclass
ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAccountsResponse").msgclass
ImportAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountRequest").msgclass
ImportAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountResponse").msgclass
ImportPublicKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportPublicKeyRequest").msgclass
ImportPublicKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportPublicKeyResponse").msgclass
Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Transaction").msgclass Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Transaction").msgclass
PublishResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PublishResponse").msgclass PublishResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PublishResponse").msgclass
SendOutputsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SendOutputsRequest").msgclass SendOutputsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SendOutputsRequest").msgclass
@@ -182,7 +254,12 @@ module Walletrpc
FundPsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FundPsbtResponse").msgclass FundPsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FundPsbtResponse").msgclass
TxTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.TxTemplate").msgclass TxTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.TxTemplate").msgclass
UtxoLease = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.UtxoLease").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 FinalizePsbtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FinalizePsbtRequest").msgclass
FinalizePsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FinalizePsbtResponse").msgclass FinalizePsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FinalizePsbtResponse").msgclass
ListLeasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListLeasesRequest").msgclass
ListLeasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListLeasesResponse").msgclass
AddressType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddressType").enummodule
WitnessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.WitnessType").enummodule WitnessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.WitnessType").enummodule
end end

View File

@@ -33,6 +33,9 @@ module Walletrpc
# originally lock the output. # originally lock the output.
rpc :ReleaseOutput, ::Walletrpc::ReleaseOutputRequest, ::Walletrpc::ReleaseOutputResponse rpc :ReleaseOutput, ::Walletrpc::ReleaseOutputRequest, ::Walletrpc::ReleaseOutputResponse
# #
# ListLeases lists all currently locked utxos.
rpc :ListLeases, ::Walletrpc::ListLeasesRequest, ::Walletrpc::ListLeasesResponse
#
# DeriveNextKey attempts to derive the *next* key within the key family # DeriveNextKey attempts to derive the *next* key within the key family
# (account in BIP43) specified. This method should return the next external # (account in BIP43) specified. This method should return the next external
# child within this branch. # child within this branch.
@@ -45,6 +48,43 @@ module Walletrpc
# NextAddr returns the next unused address within the wallet. # NextAddr returns the next unused address within the wallet.
rpc :NextAddr, ::Walletrpc::AddrRequest, ::Walletrpc::AddrResponse rpc :NextAddr, ::Walletrpc::AddrRequest, ::Walletrpc::AddrResponse
# #
# ListAccounts retrieves all accounts belonging to the wallet by default. A
# name and key scope filter can be provided to filter through all of the
# wallet accounts and return only those matching.
rpc :ListAccounts, ::Walletrpc::ListAccountsRequest, ::Walletrpc::ListAccountsResponse
#
# ImportAccount imports an account backed by an account extended public key.
# The master key fingerprint denotes the fingerprint of the root key
# corresponding to the account public key (also known as the key with
# derivation path m/). This may be required by some hardware wallets for
# proper identification and signing.
#
# The address type can usually be inferred from the key's version, but may be
# required for certain keys to map them into the proper scope.
#
# For BIP-0044 keys, an address type must be specified as we intend to not
# support importing BIP-0044 keys into the wallet using the legacy
# pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force
# the standard BIP-0049 derivation scheme, while a witness address type will
# force the standard BIP-0084 derivation scheme.
#
# For BIP-0049 keys, an address type must also be specified to make a
# distinction between the standard BIP-0049 address schema (nested witness
# pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys
# externally, witness pubkeys internally).
#
# NOTE: Events (deposits/spends) for keys derived from an account will only be
# detected by lnd if they happen after the import. Rescans to detect past
# events will be supported later on.
rpc :ImportAccount, ::Walletrpc::ImportAccountRequest, ::Walletrpc::ImportAccountResponse
#
# ImportPublicKey imports a public key as watch-only into the wallet.
#
# NOTE: Events (deposits/spends) for a key will only be detected by lnd if
# they happen after the import. Rescans to detect past events will be
# supported later on.
rpc :ImportPublicKey, ::Walletrpc::ImportPublicKeyRequest, ::Walletrpc::ImportPublicKeyResponse
#
# PublishTransaction attempts to publish the passed transaction to the # PublishTransaction attempts to publish the passed transaction to the
# network. Once this returns without an error, the wallet will continually # network. Once this returns without an error, the wallet will continually
# attempt to re-broadcast the transaction on start up, until it enters the # attempt to re-broadcast the transaction on start up, until it enters the
@@ -129,6 +169,19 @@ module Walletrpc
# an error on the caller's side. # an error on the caller's side.
rpc :FundPsbt, ::Walletrpc::FundPsbtRequest, ::Walletrpc::FundPsbtResponse 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 # 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 # 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 # the last signer of the transaction. That means, if there are any unsigned

View File

@@ -4,6 +4,7 @@
require 'google/protobuf' require 'google/protobuf'
require 'rpc_pb' require 'rpc_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("walletunlocker.proto", :syntax => :proto3) do add_file("walletunlocker.proto", :syntax => :proto3) do
add_message "lnrpc.GenSeedRequest" do add_message "lnrpc.GenSeedRequest" do
@@ -21,10 +22,24 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :recovery_window, :int32, 4 optional :recovery_window, :int32, 4
optional :channel_backups, :message, 5, "lnrpc.ChanBackupSnapshot" optional :channel_backups, :message, 5, "lnrpc.ChanBackupSnapshot"
optional :stateless_init, :bool, 6 optional :stateless_init, :bool, 6
optional :extended_master_key, :string, 7
optional :extended_master_key_birthday_timestamp, :uint64, 8
optional :watch_only, :message, 9, "lnrpc.WatchOnly"
end end
add_message "lnrpc.InitWalletResponse" do add_message "lnrpc.InitWalletResponse" do
optional :admin_macaroon, :bytes, 1 optional :admin_macaroon, :bytes, 1
end 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 add_message "lnrpc.UnlockWalletRequest" do
optional :wallet_password, :bytes, 1 optional :wallet_password, :bytes, 1
optional :recovery_window, :int32, 2 optional :recovery_window, :int32, 2
@@ -50,6 +65,8 @@ module Lnrpc
GenSeedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GenSeedResponse").msgclass GenSeedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GenSeedResponse").msgclass
InitWalletRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletRequest").msgclass InitWalletRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletRequest").msgclass
InitWalletResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletResponse").msgclass InitWalletResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InitWalletResponse").msgclass
WatchOnly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WatchOnly").msgclass
WatchOnlyAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WatchOnlyAccount").msgclass
UnlockWalletRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletRequest").msgclass UnlockWalletRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletRequest").msgclass
UnlockWalletResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletResponse").msgclass UnlockWalletResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletResponse").msgclass
ChangePasswordRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChangePasswordRequest").msgclass ChangePasswordRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChangePasswordRequest").msgclass

View File

@@ -26,6 +26,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :num_pending_backups, :uint32, 2 optional :num_pending_backups, :uint32, 2
optional :max_backups, :uint32, 3 optional :max_backups, :uint32, 3
optional :sweep_sat_per_byte, :uint32, 4 optional :sweep_sat_per_byte, :uint32, 4
optional :sweep_sat_per_vbyte, :uint32, 5
end end
add_message "wtclientrpc.Tower" do add_message "wtclientrpc.Tower" do
optional :pubkey, :bytes, 1 optional :pubkey, :bytes, 1
@@ -55,6 +56,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "wtclientrpc.PolicyResponse" do add_message "wtclientrpc.PolicyResponse" do
optional :max_updates, :uint32, 1 optional :max_updates, :uint32, 1
optional :sweep_sat_per_byte, :uint32, 2 optional :sweep_sat_per_byte, :uint32, 2
optional :sweep_sat_per_vbyte, :uint32, 3
end end
add_enum "wtclientrpc.PolicyType" do add_enum "wtclientrpc.PolicyType" do
value :LEGACY, 0 value :LEGACY, 0

View File

@@ -1,4 +1,5 @@
require "grpc" require "grpc"
require "digest"
require "lnrpc/macaroon_interceptor" require "lnrpc/macaroon_interceptor"
module Lnrpc module Lnrpc
class Client class Client

View File

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

View File

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