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

20 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
15 changed files with 142 additions and 33 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
@@ -61,6 +62,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end end
add_message "routerrpc.XImportMissionControlRequest" do add_message "routerrpc.XImportMissionControlRequest" do
repeated :pairs, :message, 1, "routerrpc.PairHistory" repeated :pairs, :message, 1, "routerrpc.PairHistory"
optional :force, :bool, 2
end end
add_message "routerrpc.XImportMissionControlResponse" do add_message "routerrpc.XImportMissionControlResponse" do
end end
@@ -147,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"

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,6 +5,7 @@ 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
@@ -35,6 +36,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end end
add_message "walletrpc.AddrRequest" do add_message "walletrpc.AddrRequest" do
optional :account, :string, 1 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
@@ -170,6 +173,12 @@ 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 optional :account, :string, 5
@@ -245,6 +254,8 @@ 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 ListLeasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListLeasesRequest").msgclass

View File

@@ -169,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

@@ -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.13.0" 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