Merge pull request #20 from bumi/v0.14.1-beta

V0.14.1 beta
This commit is contained in:
bumi 2022-06-09 19:56:57 +02:00 committed by GitHub
commit 30b1f2bddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 79 additions and 18 deletions

View File

@ -8,27 +8,27 @@ PATH
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.21.0)
googleapis-common-protos-types (1.3.1)
google-protobuf (~> 3.14)
grpc (1.38.0)
google-protobuf (~> 3.15)
grpc (1.46.3)
google-protobuf (~> 3.19)
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.2.23
2.2.33

View File

@ -53,4 +53,17 @@ node_info_response.channels.each do |channel|
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
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

@ -4,6 +4,7 @@
require 'google/protobuf'
require 'rpc_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

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

@ -4,6 +4,7 @@
require 'google/protobuf'
require 'rpc_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("routerrpc/router.proto", :syntax => :proto3) do
add_message "routerrpc.SendPaymentRequest" do
@ -147,6 +148,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"

View File

@ -43,6 +43,8 @@ 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
end
add_message "signrpc.SignMessageResp" do
optional :signature, :bytes, 1

View File

@ -5,6 +5,7 @@ require 'google/protobuf'
require 'rpc_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
@ -35,6 +36,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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

View File

@ -4,6 +4,7 @@
require 'google/protobuf'
require 'rpc_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

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