lnd-client 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6bde884b1430f8dd73f527adf0f90578bf7151bf411b77e7b3ba952f937bf675
4
- data.tar.gz: 805112d53eaee06c7dc868f40a8ab4287805555c57dc6419dc8398223dc6a555
3
+ metadata.gz: d169513dce6b41f740e1ab3b5de2f7e8683d2fec7d2eed11c2eb7e801f9dcd75
4
+ data.tar.gz: dc117b4301560c50628f01859a3644130999b4b460c0b0799a9427e90e3c166f
5
5
  SHA512:
6
- metadata.gz: '087f58186e24b63d1fdaa79efb7c367f85c0715b231c233a81a671186967996f97184f5f857a783e2508f19b307cf7fa804beef61e127c30de77437ad8f81d61'
7
- data.tar.gz: 4cecdf60d139163bebed559e0dbf74a4695a6990ba5925096e17452c4984fbd9f4e7ab3e6dabe6126b40fde01f33a58ebf8235726b87f5b8843193770c9c8709
6
+ metadata.gz: f4b3d495e9753dff86d8ac04f8152dc39faeebaf1a2b34ee88b4aab4e1693154fab3d91e2b0dbdd59c609dd9447f91337b1d764b33244d29c1263cadd1704f89
7
+ data.tar.gz: 0062754fa1d875403b8cb3b976fcd7aea76ee12ff95fdf4e20dc28f708577df7e262a33745fd352f78ae5deef8e8bf29d64eb2d282e67c71a96e5ed093ea5d28
data/Gemfile CHANGED
@@ -7,12 +7,13 @@ gemspec
7
7
  group :test, :development do
8
8
  gem 'babosa', '~> 2.0'
9
9
  gem 'dotenv', '~> 2.8', '>= 2.8.1'
10
+ gem 'grpc-tools', '~> 1.53'
10
11
  gem 'pry-byebug', '~> 3.10', '>= 3.10.1'
11
12
  gem 'rainbow', '~> 3.1', '>= 3.1.1'
12
13
  gem 'rake', '~> 13.0', '>= 13.0.6'
13
14
  gem 'rspec', '~> 3.12'
14
- gem 'rubocop', '~> 1.48'
15
+ gem 'rubocop', '~> 1.48', '>= 1.48.1'
15
16
  gem 'rubocop-rake', '~> 0.6.0'
16
17
  gem 'rubocop-rspec', '~> 2.19'
17
- gem 'ruby-progressbar', '~> 1.8', '>= 1.8.1'
18
+ gem 'ruby-progressbar', '~> 1.13'
18
19
  end
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lnd-client (0.0.8)
5
- grpc (~> 1.52)
4
+ lnd-client (0.0.9)
5
+ grpc (~> 1.53)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -16,9 +16,10 @@ GEM
16
16
  google-protobuf (3.22.2-x86_64-linux)
17
17
  googleapis-common-protos-types (1.5.0)
18
18
  google-protobuf (~> 3.14)
19
- grpc (1.52.0-x86_64-linux)
19
+ grpc (1.53.0-x86_64-linux)
20
20
  google-protobuf (~> 3.21)
21
21
  googleapis-common-protos-types (~> 1.0)
22
+ grpc-tools (1.53.0)
22
23
  json (2.6.3)
23
24
  method_source (1.0.0)
24
25
  parallel (1.22.1)
@@ -57,7 +58,7 @@ GEM
57
58
  rubocop-ast (>= 1.26.0, < 2.0)
58
59
  ruby-progressbar (~> 1.7)
59
60
  unicode-display_width (>= 2.4.0, < 3.0)
60
- rubocop-ast (1.27.0)
61
+ rubocop-ast (1.28.0)
61
62
  parser (>= 3.2.1.0)
62
63
  rubocop-capybara (2.17.1)
63
64
  rubocop (~> 1.41)
@@ -75,15 +76,16 @@ PLATFORMS
75
76
  DEPENDENCIES
76
77
  babosa (~> 2.0)
77
78
  dotenv (~> 2.8, >= 2.8.1)
79
+ grpc-tools (~> 1.53)
78
80
  lnd-client!
79
81
  pry-byebug (~> 3.10, >= 3.10.1)
80
82
  rainbow (~> 3.1, >= 3.1.1)
81
83
  rake (~> 13.0, >= 13.0.6)
82
84
  rspec (~> 3.12)
83
- rubocop (~> 1.48)
85
+ rubocop (~> 1.48, >= 1.48.1)
84
86
  rubocop-rake (~> 0.6.0)
85
87
  rubocop-rspec (~> 2.19)
86
- ruby-progressbar (~> 1.8, >= 1.8.1)
88
+ ruby-progressbar (~> 1.13)
87
89
 
88
90
  BUNDLED WITH
89
91
  2.4.4
data/README.md CHANGED
@@ -6,6 +6,7 @@ This is a low-level client library. For a better experience, you may want to che
6
6
 
7
7
  - [Usage](#usage)
8
8
  - [Documentation](https://icebaker.github.io/lnd-client)
9
+ - [Available Supported Services](#available-supported-services)
9
10
  - [Development](#development)
10
11
  - [Upgrading gRPC Proto Files](#upgrading-grpc-proto-files)
11
12
  - [Generating Documentation](#generating-documentation)
@@ -16,13 +17,13 @@ This is a low-level client library. For a better experience, you may want to che
16
17
  Add to your `Gemfile`:
17
18
 
18
19
  ```ruby
19
- gem 'lnd-client', '~> 0.0.8'
20
+ gem 'lnd-client', '~> 0.0.9'
20
21
  ```
21
22
 
22
23
  ```ruby
23
24
  require 'lnd-client'
24
25
 
25
- puts LNDClient.version # => 0.0.8
26
+ puts LNDClient.version # => 0.0.9
26
27
 
27
28
  client = LNDClient.new(
28
29
  'lndconnect://127.0.0.1:10009?cert=MIICJz...JBEERQ&macaroon=AgEDbG...45ukJ4'
@@ -56,6 +57,25 @@ end
56
57
 
57
58
  Check the [full documentation](https://icebaker.github.io/lnd-client).
58
59
 
60
+ ## Available Supported Services
61
+
62
+ - [autopilot](https://icebaker.github.io/lnd-client/#/README?id=autopilot)
63
+ - [chain_kit](https://icebaker.github.io/lnd-client/#/README?id=chain_kit)
64
+ - [chain_notifier](https://icebaker.github.io/lnd-client/#/README?id=chain_notifier)
65
+ - [dev](https://icebaker.github.io/lnd-client/#/README?id=dev)
66
+ - [invoices](https://icebaker.github.io/lnd-client/#/README?id=invoices)
67
+ - [lightning](https://icebaker.github.io/lnd-client/#/README?id=lightning)
68
+ - [neutrino_kit](https://icebaker.github.io/lnd-client/#/README?id=neutrino_kit)
69
+ - [peers](https://icebaker.github.io/lnd-client/#/README?id=peers)
70
+ - [router](https://icebaker.github.io/lnd-client/#/README?id=router)
71
+ - [signer](https://icebaker.github.io/lnd-client/#/README?id=signer)
72
+ - [state](https://icebaker.github.io/lnd-client/#/README?id=state)
73
+ - [versioner](https://icebaker.github.io/lnd-client/#/README?id=versioner)
74
+ - [wallet_kit](https://icebaker.github.io/lnd-client/#/README?id=wallet_kit)
75
+ - [wallet_unlocker](https://icebaker.github.io/lnd-client/#/README?id=wallet_unlocker)
76
+ - [watchtower](https://icebaker.github.io/lnd-client/#/README?id=watchtower)
77
+ - [watchtower_client](https://icebaker.github.io/lnd-client/#/README?id=watchtower_client)
78
+
59
79
  ## Development
60
80
 
61
81
  Copy the `.env.example` file to `.env` and provide the required data.
@@ -98,5 +118,5 @@ gem build lnd-client.gemspec
98
118
 
99
119
  gem signin
100
120
 
101
- gem push lnd-client-0.0.8.gem
121
+ gem push lnd-client-0.0.9.gem
102
122
  ```
@@ -2,7 +2,7 @@
2
2
  # Source: autopilotrpc/autopilot.proto for package 'autopilotrpc'
3
3
 
4
4
  require 'grpc'
5
- require_relative 'autopilotrpc/autopilot_pb'
5
+ require_relative './autopilot_pb'
6
6
 
7
7
  module Autopilotrpc
8
8
  module Autopilot
@@ -2,7 +2,7 @@
2
2
  # Source: chainrpc/chainkit.proto for package 'chainrpc'
3
3
 
4
4
  require 'grpc'
5
- require_relative 'chainrpc/chainkit_pb'
5
+ require_relative './chainkit_pb'
6
6
 
7
7
  module Chainrpc
8
8
  module ChainKit
@@ -2,7 +2,7 @@
2
2
  # Source: chainrpc/chainnotifier.proto for package 'chainrpc'
3
3
 
4
4
  require 'grpc'
5
- require_relative 'chainrpc/chainnotifier_pb'
5
+ require_relative './chainnotifier_pb'
6
6
 
7
7
  module Chainrpc
8
8
  module ChainNotifier
@@ -3,7 +3,7 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
- require_relative 'lightning_pb'
6
+ require_relative '../lightning_pb'
7
7
 
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("devrpc/dev.proto", :syntax => :proto3) do
@@ -2,7 +2,7 @@
2
2
  # Source: devrpc/dev.proto for package 'devrpc'
3
3
 
4
4
  require 'grpc'
5
- require_relative 'devrpc/dev_pb'
5
+ require_relative './dev_pb'
6
6
 
7
7
  module Devrpc
8
8
  module Dev
@@ -3,7 +3,7 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
- require_relative 'lightning_pb'
6
+ require_relative '../lightning_pb'
7
7
 
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("invoicesrpc/invoices.proto", :syntax => :proto3) do
@@ -2,7 +2,7 @@
2
2
  # Source: invoicesrpc/invoices.proto for package 'invoicesrpc'
3
3
 
4
4
  require 'grpc'
5
- require_relative 'invoicesrpc/invoices_pb'
5
+ require_relative './invoices_pb'
6
6
 
7
7
  module Invoicesrpc
8
8
  module Invoices
@@ -5,11 +5,11 @@ require 'google/protobuf'
5
5
 
6
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
7
7
  add_file("lightning.proto", :syntax => :proto3) do
8
- add_message "lnrpc.LookupHtlcRequest" do
8
+ add_message "lnrpc.LookupHtlcResolutionRequest" do
9
9
  optional :chan_id, :uint64, 1
10
10
  optional :htlc_index, :uint64, 2
11
11
  end
12
- add_message "lnrpc.LookupHtlcResponse" do
12
+ add_message "lnrpc.LookupHtlcResolutionResponse" do
13
13
  optional :settled, :bool, 1
14
14
  optional :offchain, :bool, 2
15
15
  end
@@ -282,6 +282,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
282
282
  repeated :alias_scids, :uint64, 31
283
283
  optional :zero_conf, :bool, 32
284
284
  optional :zero_conf_confirmed_scid, :uint64, 33
285
+ optional :peer_alias, :string, 34
285
286
  end
286
287
  add_message "lnrpc.ListChannelsRequest" do
287
288
  optional :active_only, :bool, 1
@@ -289,6 +290,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
289
290
  optional :public_only, :bool, 3
290
291
  optional :private_only, :bool, 4
291
292
  optional :peer, :bytes, 5
293
+ optional :peer_alias_lookup, :bool, 6
292
294
  end
293
295
  add_message "lnrpc.ListChannelsResponse" do
294
296
  repeated :channels, :message, 11, "lnrpc.Channel"
@@ -409,6 +411,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
409
411
  repeated :uris, :string, 12
410
412
  map :features, :uint32, :message, 19, "lnrpc.Feature"
411
413
  optional :require_htlc_interceptor, :bool, 21
414
+ optional :store_final_htlc_resolutions, :bool, 22
412
415
  end
413
416
  add_message "lnrpc.GetRecoveryInfoRequest" do
414
417
  end
@@ -1400,8 +1403,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
1400
1403
  end
1401
1404
 
1402
1405
  module Lnrpc
1403
- LookupHtlcRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.LookupHtlcRequest").msgclass
1404
- LookupHtlcResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.LookupHtlcResponse").msgclass
1406
+ LookupHtlcResolutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.LookupHtlcResolutionRequest").msgclass
1407
+ LookupHtlcResolutionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.LookupHtlcResolutionResponse").msgclass
1405
1408
  SubscribeCustomMessagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SubscribeCustomMessagesRequest").msgclass
1406
1409
  CustomMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CustomMessage").msgclass
1407
1410
  SendCustomMessageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendCustomMessageRequest").msgclass
@@ -433,7 +433,11 @@ module Lnrpc
433
433
  # their confirmed SCID (if it exists) and/or the base SCID (in the case of
434
434
  # zero conf).
435
435
  rpc :ListAliases, ::Lnrpc::ListAliasesRequest, ::Lnrpc::ListAliasesResponse
436
- rpc :LookupHtlc, ::Lnrpc::LookupHtlcRequest, ::Lnrpc::LookupHtlcResponse
436
+ #
437
+ # LookupHtlcResolution retrieves a final htlc resolution from the database.
438
+ # If the htlc has no final resolution yet, a NotFound grpc status code is
439
+ # returned.
440
+ rpc :LookupHtlcResolution, ::Lnrpc::LookupHtlcResolutionRequest, ::Lnrpc::LookupHtlcResolutionResponse
437
441
  end
438
442
 
439
443
  Stub = Service.rpc_stub_class
@@ -3,7 +3,7 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
- require_relative 'verrpc/verrpc_pb'
6
+ require_relative '../verrpc/verrpc_pb'
7
7
 
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("lnclipb/lncli.proto", :syntax => :proto3) do
@@ -2,7 +2,7 @@
2
2
  # Source: neutrinorpc/neutrino.proto for package 'neutrinorpc'
3
3
 
4
4
  require 'grpc'
5
- require_relative 'neutrinorpc/neutrino_pb'
5
+ require_relative './neutrino_pb'
6
6
 
7
7
  module Neutrinorpc
8
8
  module NeutrinoKit
@@ -3,7 +3,7 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
- require_relative 'lightning_pb'
6
+ require_relative '../lightning_pb'
7
7
 
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("peersrpc/peers.proto", :syntax => :proto3) do
@@ -2,7 +2,7 @@
2
2
  # Source: peersrpc/peers.proto for package 'peersrpc'
3
3
 
4
4
  require 'grpc'
5
- require_relative 'peersrpc/peers_pb'
5
+ require_relative './peers_pb'
6
6
 
7
7
  module Peersrpc
8
8
  module Peers
@@ -100,6 +100,26 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
100
100
  optional :weight, :float, 3
101
101
  optional :maximum_payment_results, :uint32, 4
102
102
  optional :minimum_failure_relax_interval, :uint64, 5
103
+ optional :model, :enum, 6, "routerrpc.MissionControlConfig.ProbabilityModel"
104
+ oneof :EstimatorConfig do
105
+ optional :apriori, :message, 7, "routerrpc.AprioriParameters"
106
+ optional :bimodal, :message, 8, "routerrpc.BimodalParameters"
107
+ end
108
+ end
109
+ add_enum "routerrpc.MissionControlConfig.ProbabilityModel" do
110
+ value :APRIORI, 0
111
+ value :BIMODAL, 1
112
+ end
113
+ add_message "routerrpc.BimodalParameters" do
114
+ optional :node_weight, :double, 1
115
+ optional :scale_msat, :uint64, 2
116
+ optional :decay_time, :uint64, 3
117
+ end
118
+ add_message "routerrpc.AprioriParameters" do
119
+ optional :half_life_seconds, :uint64, 1
120
+ optional :hop_probability, :double, 2
121
+ optional :weight, :double, 3
122
+ optional :capacity_fraction, :double, 4
103
123
  end
104
124
  add_message "routerrpc.QueryProbabilityRequest" do
105
125
  optional :from_node, :bytes, 1
@@ -272,6 +292,9 @@ module Routerrpc
272
292
  SetMissionControlConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SetMissionControlConfigRequest").msgclass
273
293
  SetMissionControlConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SetMissionControlConfigResponse").msgclass
274
294
  MissionControlConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.MissionControlConfig").msgclass
295
+ MissionControlConfig::ProbabilityModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.MissionControlConfig.ProbabilityModel").enummodule
296
+ BimodalParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BimodalParameters").msgclass
297
+ AprioriParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.AprioriParameters").msgclass
275
298
  QueryProbabilityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityRequest").msgclass
276
299
  QueryProbabilityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityResponse").msgclass
277
300
  BuildRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteRequest").msgclass
@@ -83,10 +83,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
83
83
  repeated :all_signer_pubkeys, :bytes, 1
84
84
  repeated :tweaks, :message, 2, "signrpc.TweakDesc"
85
85
  optional :taproot_tweak, :message, 3, "signrpc.TaprootTweakDesc"
86
+ optional :version, :enum, 4, "signrpc.MuSig2Version"
86
87
  end
87
88
  add_message "signrpc.MuSig2CombineKeysResponse" do
88
89
  optional :combined_key, :bytes, 1
89
90
  optional :taproot_internal_key, :bytes, 2
91
+ optional :version, :enum, 4, "signrpc.MuSig2Version"
90
92
  end
91
93
  add_message "signrpc.MuSig2SessionRequest" do
92
94
  optional :key_loc, :message, 1, "signrpc.KeyLocator"
@@ -94,6 +96,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
94
96
  repeated :other_signer_public_nonces, :bytes, 3
95
97
  repeated :tweaks, :message, 4, "signrpc.TweakDesc"
96
98
  optional :taproot_tweak, :message, 5, "signrpc.TaprootTweakDesc"
99
+ optional :version, :enum, 6, "signrpc.MuSig2Version"
97
100
  end
98
101
  add_message "signrpc.MuSig2SessionResponse" do
99
102
  optional :session_id, :bytes, 1
@@ -101,6 +104,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
101
104
  optional :taproot_internal_key, :bytes, 3
102
105
  optional :local_public_nonces, :bytes, 4
103
106
  optional :have_all_nonces, :bool, 5
107
+ optional :version, :enum, 6, "signrpc.MuSig2Version"
104
108
  end
105
109
  add_message "signrpc.MuSig2RegisterNoncesRequest" do
106
110
  optional :session_id, :bytes, 1
@@ -136,6 +140,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
136
140
  value :SIGN_METHOD_TAPROOT_KEY_SPEND, 2
137
141
  value :SIGN_METHOD_TAPROOT_SCRIPT_SPEND, 3
138
142
  end
143
+ add_enum "signrpc.MuSig2Version" do
144
+ value :MUSIG2_VERSION_UNDEFINED, 0
145
+ value :MUSIG2_VERSION_V040, 1
146
+ value :MUSIG2_VERSION_V100RC2, 2
147
+ end
139
148
  end
140
149
  end
141
150
 
@@ -169,4 +178,5 @@ module Signrpc
169
178
  MuSig2CleanupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CleanupRequest").msgclass
170
179
  MuSig2CleanupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2CleanupResponse").msgclass
171
180
  SignMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignMethod").enummodule
181
+ MuSig2Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.MuSig2Version").enummodule
172
182
  end
@@ -2,7 +2,7 @@
2
2
  # Source: signrpc/signer.proto for package 'signrpc'
3
3
 
4
4
  require 'grpc'
5
- require_relative 'signrpc/signer_pb'
5
+ require_relative './signer_pb'
6
6
 
7
7
  module Signrpc
8
8
  module Signer
@@ -2,7 +2,7 @@
2
2
  # Source: verrpc/verrpc.proto for package 'verrpc'
3
3
 
4
4
  require 'grpc'
5
- require_relative 'verrpc/verrpc_pb'
5
+ require_relative './verrpc_pb'
6
6
 
7
7
  module Verrpc
8
8
  module Versioner
@@ -3,8 +3,8 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
- require_relative 'lightning_pb'
7
- require_relative 'signrpc/signer_pb'
6
+ require_relative '../lightning_pb'
7
+ require_relative '../signrpc/signer_pb'
8
8
 
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("walletrpc/walletkit.proto", :syntax => :proto3) do
@@ -84,6 +84,22 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
84
84
  add_message "walletrpc.ListAddressesResponse" do
85
85
  repeated :account_with_addresses, :message, 1, "walletrpc.AccountWithAddresses"
86
86
  end
87
+ add_message "walletrpc.SignMessageWithAddrRequest" do
88
+ optional :msg, :bytes, 1
89
+ optional :addr, :string, 2
90
+ end
91
+ add_message "walletrpc.SignMessageWithAddrResponse" do
92
+ optional :signature, :string, 1
93
+ end
94
+ add_message "walletrpc.VerifyMessageWithAddrRequest" do
95
+ optional :msg, :bytes, 1
96
+ optional :signature, :string, 2
97
+ optional :addr, :string, 3
98
+ end
99
+ add_message "walletrpc.VerifyMessageWithAddrResponse" do
100
+ optional :valid, :bool, 1
101
+ optional :pubkey, :bytes, 2
102
+ end
87
103
  add_message "walletrpc.ImportAccountRequest" do
88
104
  optional :name, :string, 1
89
105
  optional :extended_public_key, :string, 2
@@ -198,6 +214,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
198
214
  optional :account, :string, 5
199
215
  optional :min_confs, :int32, 6
200
216
  optional :spend_unconfirmed, :bool, 7
217
+ optional :change_type, :enum, 8, "walletrpc.ChangeAddressType"
201
218
  oneof :template do
202
219
  optional :psbt, :bytes, 1
203
220
  optional :raw, :message, 2, "walletrpc.TxTemplate"
@@ -266,6 +283,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
266
283
  value :NESTED_WITNESS_KEY_HASH, 12
267
284
  value :COMMITMENT_ANCHOR, 13
268
285
  end
286
+ add_enum "walletrpc.ChangeAddressType" do
287
+ value :CHANGE_ADDRESS_TYPE_UNSPECIFIED, 0
288
+ value :CHANGE_ADDRESS_TYPE_P2TR, 1
289
+ end
269
290
  end
270
291
  end
271
292
 
@@ -288,6 +309,10 @@ module Walletrpc
288
309
  RequiredReserveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.RequiredReserveResponse").msgclass
289
310
  ListAddressesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAddressesRequest").msgclass
290
311
  ListAddressesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAddressesResponse").msgclass
312
+ SignMessageWithAddrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SignMessageWithAddrRequest").msgclass
313
+ SignMessageWithAddrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SignMessageWithAddrResponse").msgclass
314
+ VerifyMessageWithAddrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.VerifyMessageWithAddrRequest").msgclass
315
+ VerifyMessageWithAddrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.VerifyMessageWithAddrResponse").msgclass
291
316
  ImportAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountRequest").msgclass
292
317
  ImportAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountResponse").msgclass
293
318
  ImportPublicKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportPublicKeyRequest").msgclass
@@ -325,4 +350,5 @@ module Walletrpc
325
350
  ListLeasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListLeasesResponse").msgclass
326
351
  AddressType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddressType").enummodule
327
352
  WitnessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.WitnessType").enummodule
353
+ ChangeAddressType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ChangeAddressType").enummodule
328
354
  end
@@ -2,7 +2,7 @@
2
2
  # Source: walletrpc/walletkit.proto for package 'walletrpc'
3
3
 
4
4
  require 'grpc'
5
- require_relative 'walletrpc/walletkit_pb'
5
+ require_relative './walletkit_pb'
6
6
 
7
7
  module Walletrpc
8
8
  module WalletKit
@@ -65,6 +65,41 @@ module Walletrpc
65
65
  # wallet accounts and return the addresses of only those matching.
66
66
  rpc :ListAddresses, ::Walletrpc::ListAddressesRequest, ::Walletrpc::ListAddressesResponse
67
67
  #
68
+ # SignMessageWithAddr returns the compact signature (base64 encoded) created
69
+ # with the private key of the provided address. This requires the address
70
+ # to be solely based on a public key lock (no scripts). Obviously the internal
71
+ # lnd wallet has to possess the private key of the address otherwise
72
+ # an error is returned.
73
+ #
74
+ # This method aims to provide full compatibility with the bitcoin-core and
75
+ # btcd implementation. Bitcoin-core's algorithm is not specified in a
76
+ # BIP and only applicable for legacy addresses. This method enhances the
77
+ # signing for additional address types: P2WKH, NP2WKH, P2TR.
78
+ # For P2TR addresses this represents a special case. ECDSA is used to create
79
+ # a compact signature which makes the public key of the signature recoverable.
80
+ rpc :SignMessageWithAddr, ::Walletrpc::SignMessageWithAddrRequest, ::Walletrpc::SignMessageWithAddrResponse
81
+ #
82
+ # VerifyMessageWithAddr returns the validity and the recovered public key of
83
+ # the provided compact signature (base64 encoded). The verification is
84
+ # twofold. First the validity of the signature itself is checked and then
85
+ # it is verified that the recovered public key of the signature equals
86
+ # the public key of the provided address. There is no dependence on the
87
+ # private key of the address therefore also external addresses are allowed
88
+ # to verify signatures.
89
+ # Supported address types are P2PKH, P2WKH, NP2WKH, P2TR.
90
+ #
91
+ # This method is the counterpart of the related signing method
92
+ # (SignMessageWithAddr) and aims to provide full compatibility to
93
+ # bitcoin-core's implementation. Although bitcoin-core/btcd only provide
94
+ # this functionality for legacy addresses this function enhances it to
95
+ # the address types: P2PKH, P2WKH, NP2WKH, P2TR.
96
+ #
97
+ # The verification for P2TR addresses is a special case and requires the
98
+ # ECDSA compact signature to compare the reovered public key to the internal
99
+ # taproot key. The compact ECDSA signature format was used because there
100
+ # are still no known compact signature schemes for schnorr signatures.
101
+ rpc :VerifyMessageWithAddr, ::Walletrpc::VerifyMessageWithAddrRequest, ::Walletrpc::VerifyMessageWithAddrResponse
102
+ #
68
103
  # ImportAccount imports an account backed by an account extended public key.
69
104
  # The master key fingerprint denotes the fingerprint of the root key
70
105
  # corresponding to the account public key (also known as the key with
@@ -2,7 +2,7 @@
2
2
  # Source: watchtowerrpc/watchtower.proto for package 'watchtowerrpc'
3
3
 
4
4
  require 'grpc'
5
- require_relative 'watchtowerrpc/watchtower_pb'
5
+ require_relative './watchtower_pb'
6
6
 
7
7
  module Watchtowerrpc
8
8
  module Watchtower
@@ -2,7 +2,7 @@
2
2
  # Source: wtclientrpc/wtclient.proto for package 'wtclientrpc'
3
3
 
4
4
  require 'grpc'
5
- require_relative 'wtclientrpc/wtclient_pb'
5
+ require_relative './wtclient_pb'
6
6
 
7
7
  module Wtclientrpc
8
8
  module WatchtowerClient
data/components/grpc.rb CHANGED
@@ -1,13 +1,41 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative './grpc/autopilotrpc/autopilot_services_pb'
4
+ require_relative './grpc/chainrpc/chainkit_services_pb'
5
+ require_relative './grpc/chainrpc/chainnotifier_services_pb'
6
+ require_relative './grpc/devrpc/dev_services_pb'
7
+ require_relative './grpc/invoicesrpc/invoices_services_pb'
3
8
  require_relative './grpc/lightning_services_pb'
9
+ require_relative './grpc/neutrinorpc/neutrino_services_pb'
10
+ require_relative './grpc/peersrpc/peers_services_pb'
4
11
  require_relative './grpc/routerrpc/router_services_pb'
12
+ require_relative './grpc/signrpc/signer_services_pb'
13
+ require_relative './grpc/stateservice_services_pb'
14
+ require_relative './grpc/verrpc/verrpc_services_pb'
15
+ require_relative './grpc/walletrpc/walletkit_services_pb'
16
+ require_relative './grpc/walletunlocker_services_pb'
17
+ require_relative './grpc/watchtowerrpc/watchtower_services_pb'
18
+ require_relative './grpc/wtclientrpc/wtclient_services_pb'
5
19
 
6
20
  module LNDClientInternal
7
21
  module GRPC
8
22
  SERVICES = {
23
+ autopilot: Autopilotrpc::Autopilot,
24
+ chain_kit: Chainrpc::ChainKit,
25
+ chain_notifier: Chainrpc::ChainNotifier,
26
+ dev: Devrpc::Dev,
27
+ invoices: Invoicesrpc::Invoices,
9
28
  lightning: Lnrpc::Lightning,
10
- router: Routerrpc::Router
29
+ neutrino_kit: Neutrinorpc::NeutrinoKit,
30
+ peers: Peersrpc::Peers,
31
+ router: Routerrpc::Router,
32
+ signer: Signrpc::Signer,
33
+ state: Lnrpc::State,
34
+ versioner: Verrpc::Versioner,
35
+ wallet_kit: Walletrpc::WalletKit,
36
+ wallet_unlocker: Lnrpc::WalletUnlocker,
37
+ watchtower: Watchtowerrpc::Watchtower,
38
+ watchtower_client: Wtclientrpc::WatchtowerClient
11
39
  }.freeze
12
40
  end
13
41
  end
@@ -10,6 +10,7 @@ module LNDClientInternal
10
10
  PROGRESS = true
11
11
  PATH = 'docs/README.md'
12
12
  KEY = '<!-- [INJECT:GRP:DOCS] -->'
13
+ KEY_INDEX = '<!-- [INJECT:GRP:INDEX] -->'
13
14
 
14
15
  attr_reader :available_methods
15
16
 
@@ -35,6 +36,18 @@ module LNDClientInternal
35
36
  progressbar = ProgressBar.create(total: total, format: '%a %e |%b>>%i| %P% | %c of %C')
36
37
  end
37
38
 
39
+ document = File.read(PATH)
40
+
41
+ content = ''
42
+
43
+ services.each do |service|
44
+ content += "- [#{service}](?id=#{service})\n"
45
+ end
46
+
47
+ parts = document.split(KEY_INDEX)
48
+
49
+ document = "#{parts[0]}#{KEY_INDEX}\n\n#{content}\n#{KEY_INDEX}#{parts[2]}"
50
+
38
51
  content = ''
39
52
 
40
53
  services.each do |service|
@@ -44,9 +57,11 @@ module LNDClientInternal
44
57
  doc.available_methods.each do |method_name|
45
58
  content += "\n### #{method_name}\n"
46
59
 
47
- url = "https://lightning.engineering/api-docs/api/lnd/#{service}/#{method_name.gsub('_', '-')}/index.html"
60
+ url = "https://lightning.engineering/api-docs/api/lnd/#{service.to_s.gsub('_',
61
+ '-')}/#{method_name.gsub('_',
62
+ '-')}/index.html"
48
63
 
49
- content += "\n[lightning.engineering/#{service}/#{method_name.gsub('_', '-')}](#{url})\n"
64
+ content += "\n[lightning.engineering/#{service.to_s.gsub('_', '-')}/#{method_name.gsub('_', '-')}](#{url})\n"
50
65
 
51
66
  description = doc.describe(method_name)
52
67
  content += "\n```ruby\n"
@@ -74,11 +89,11 @@ module LNDClientInternal
74
89
  end
75
90
  end
76
91
 
77
- document = File.read(PATH)
78
-
79
92
  parts = document.split(KEY)
80
93
 
81
- File.write(PATH, "#{parts[0]}#{KEY}\n\n#{content}\n#{KEY}#{parts[2]}")
94
+ document = "#{parts[0]}#{KEY}\n\n#{content}\n#{KEY}#{parts[2]}"
95
+
96
+ File.write(PATH, document)
82
97
 
83
98
  progressbar.finish
84
99
 
data/lnd-client.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  spec.require_paths = ['ports/dsl']
33
33
 
34
- spec.add_dependency 'grpc', '~> 1.52'
34
+ spec.add_dependency 'grpc', '~> 1.53'
35
35
 
36
36
  spec.metadata['rubygems_mfa_required'] = 'true'
37
37
  end
data/static/spec.rb CHANGED
@@ -4,7 +4,7 @@ module LNDClientInternal
4
4
  module Static
5
5
  SPEC = {
6
6
  name: 'lnd-client',
7
- version: '0.0.8',
7
+ version: '0.0.9',
8
8
  author: 'icebaker',
9
9
  summary: 'Ruby Lightning Network Daemon (lnd) Client',
10
10
  description: 'Ruby Lightning Network Daemon (lnd) Client',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lnd-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - icebaker
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.52'
19
+ version: '1.53'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.52'
26
+ version: '1.53'
27
27
  description: Ruby Lightning Network Daemon (lnd) Client
28
28
  email:
29
29
  executables: []