lnrpc 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -13
  3. data/examples.rb +5 -5
  4. data/generate-grpc-service-files.sh +30 -0
  5. data/lib/grpc_services/autopilotrpc/autopilot_pb.rb +48 -0
  6. data/lib/grpc_services/autopilotrpc/autopilot_services_pb.rb +40 -0
  7. data/lib/grpc_services/chainrpc/chainnotifier_pb.rb +67 -0
  8. data/lib/grpc_services/chainrpc/chainnotifier_services_pb.rb +51 -0
  9. data/lib/grpc_services/invoicesrpc/invoices_pb.rb +48 -0
  10. data/lib/grpc_services/invoicesrpc/invoices_services_pb.rb +41 -0
  11. data/lib/grpc_services/lnclipb/lncli_pb.rb +18 -0
  12. data/lib/grpc_services/routerrpc/router_pb.rb +229 -0
  13. data/lib/{lnrpc → grpc_services/routerrpc}/router_services_pb.rb +33 -16
  14. data/lib/grpc_services/rpc_pb.rb +1265 -0
  15. data/lib/{lnrpc → grpc_services}/rpc_services_pb.rb +83 -115
  16. data/lib/grpc_services/signrpc/signer_pb.rb +83 -0
  17. data/lib/grpc_services/signrpc/signer_services_pb.rb +68 -0
  18. data/lib/grpc_services/verrpc/verrpc_pb.rb +27 -0
  19. data/lib/grpc_services/verrpc/verrpc_services_pb.rb +27 -0
  20. data/lib/grpc_services/walletrpc/walletkit_pb.rb +149 -0
  21. data/lib/grpc_services/walletrpc/walletkit_services_pb.rb +115 -0
  22. data/lib/grpc_services/walletunlocker_pb.rb +51 -0
  23. data/lib/grpc_services/walletunlocker_services_pb.rb +72 -0
  24. data/lib/grpc_services/watchtowerrpc/watchtower_pb.rb +21 -0
  25. data/lib/grpc_services/watchtowerrpc/watchtower_services_pb.rb +28 -0
  26. data/lib/grpc_services/wtclientrpc/wtclient_pb.rb +75 -0
  27. data/lib/grpc_services/wtclientrpc/wtclient_services_pb.rb +43 -0
  28. data/lib/lnrpc.rb +6 -2
  29. data/lib/lnrpc/client.rb +50 -9
  30. data/lib/lnrpc/grpc_wrapper.rb +19 -42
  31. data/lib/lnrpc/version.rb +1 -1
  32. data/lnrpc.gemspec +1 -1
  33. metadata +27 -8
  34. data/lib/lnrpc/router.proto +0 -560
  35. data/lib/lnrpc/router_pb.rb +0 -198
  36. data/lib/lnrpc/rpc.proto +0 -3687
  37. data/lib/lnrpc/rpc_pb.rb +0 -1248
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a50669372559c0f119a65b3b3c28807aef5f08b3dc6bb34661ac5c2cd65c3c1
4
- data.tar.gz: a0792b47d9062ab479857b24f04ed6ef16dde19bb8cc64f907bb032619d37d5f
3
+ metadata.gz: 076e28dc0a94e3142ceb908180dea59365aa5dc1caee369499fdcaaeda2b6ece
4
+ data.tar.gz: a58e71947369db675771cec91858159a5b0fbc481cec1f1a167c425a25e7076f
5
5
  SHA512:
6
- metadata.gz: 818af8a8ea58e2ea57fadc1767b8575059a744d5953ac275f8e2f7d58fc766fb44977a7850c9014d9063254502578bb8488da9d72a97483ec63d278adad4f89d
7
- data.tar.gz: 7514a4eb8bd482459cceded2c990d10f2d39cfedc5d06163d6bcf067bdee59404d97b4e3d599e57c1c18951639896dc2ca7c3862a0c6a936e378d444b6d75d1b
6
+ metadata.gz: ee72084b683e9970e70bb45d1f4a62d71077f7fd6d64e2204d9af1ba83558380fdbbe358ae8424c2e61e1ddbecbb3124d2904b1fba1b6fc8b3bb9326aa625538
7
+ data.tar.gz: fd0ae3ca2488ada61c8020f9f2c246a0da05b22f6fe5c52e3cb755b479cd77b0a3afcbdf499d5851c05b9ce1449cca7f591bda998f552817c0eb759290def573
data/README.md CHANGED
@@ -159,21 +159,11 @@ see [rubygems](https://rubygems.org/gems/lnrpc) for all available releases.
159
159
 
160
160
  ### Update service definitions
161
161
 
162
- 1. Generate `prc_pb.rb` and `rpc_services_pb.rb`
162
+ The script `generate-grpc-service-files.sh` can be used to generate the GRPC ruby files.
163
+ The files will be stored in `lib/grpc_services`
163
164
 
164
- $ grpc_tools_ruby_protoc -I/usr/local/include -I. -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --ruby_out=plugins=grpc,paths=source_relative:. --grpc_out=. rpc.proto
165
+ $ ./generate-grpc-service-files.sh
165
166
 
166
- 2. Copy `rpc.proto`, `rpc_pb.rb` and `rpc_services_pb.rb` to `lib`
167
-
168
- 3. Update `rpc_services_pb.rb` to use `require_relative` to load `rpc_pb`
169
-
170
- 4. Generate `router_pb.rb` and `router_services_pb.rb`
171
-
172
- $ grpc_tools_ruby_protoc -I/usr/local/include -I. -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I$GOPATH/src/github.com/lightningnetwork/lnd/lnrpc --ruby_out=plugins=grpc,paths=source_relative:. --grpc_out=. router.proto
173
-
174
- 5. Copy `router.proto`, `router_pb.rb` and `router_services_pb.rb` to `lib`
175
-
176
- 6. Update `router_services_pb.rb` to use `require_relative` to load `router_pb`
177
167
 
178
168
  ## Other resources
179
169
 
@@ -2,18 +2,18 @@ require "lnrpc"
2
2
 
3
3
  lnd = Lnrpc::Client.new() # use defaults for credentials, macaraoon and address
4
4
 
5
- get_info_res = lnd.get_info
5
+ get_info_res = lnd.lightning.get_info
6
6
  puts get_info_res.alias
7
7
 
8
- puts lnd.wallet_balance.total_balance
8
+ puts lnd.lightning.wallet_balance.total_balance
9
9
 
10
10
  pay_request = "lntb50u1pw9mmndpp5nvnff958pxc9eqknwntyxapjw7l5grt5e2y70cmmnu0lljfa0sdqdpsgfkx7cmtwd68yetpd5s9xct5v4kxc6t5v5s8yatz0ysxwetdcqzysxqyz5vqjkhlyn40z76gyn7dx32p9j58dftve9xrlvnqqazht7w2fdauukhyhr9y4k3ngjn8s6srglj8swk7tm70ng54wdkq47ahytpwffvaeusp500csz"
11
11
  lnd.pay(pay_request) # or:
12
- lnd.send_payment_sync(payment_request: pay_request)
12
+ lnd.router.send_payment_v2(payment_request: pay_request)
13
13
 
14
- invoice_res = lnd.add_invoice(value: 1000, memo: 'I :heart: ruby')
14
+ invoice_res = lnd.lightning.add_invoice(value: 1000, memo: 'I :heart: ruby')
15
15
  puts invoice_res.payment_request
16
16
 
17
- lnd.subscribe_invoices(settle_index: 1).each do |invoice|
17
+ lnd.lightning.subscribe_invoices(settle_index: 1).each do |invoice|
18
18
  puts invoice.payment_request
19
19
  end
@@ -0,0 +1,30 @@
1
+ #!/bin/sh
2
+ set -o xtrace
3
+
4
+ FULL_PATH=$(realpath $0)
5
+ GEM_DIR=$(dirname $FULL_PATH)
6
+ LNRPC_TARGET_DIR="$GEM_DIR/lib/grpc_services"
7
+ CURRENT_DIR=$(pwd)
8
+ echo $CURRENT_DIR
9
+ cd $GOPATH/src/github.com/lightningnetwork/lnd/lnrpc
10
+
11
+ echo "Generating Ruby GRPC Service Files"
12
+
13
+ PROTOS="rpc.proto walletunlocker.proto **/*.proto"
14
+
15
+ # generate files for each proto
16
+ for file in $PROTOS; do
17
+ DIRECTORY=$(dirname "${file}")
18
+ echo "Generating protos from ${file}, into ${LNRPC_TARGET_DIR}/${DIRECTORY}"
19
+
20
+ # writes all ruby files in the ruby directory
21
+ grpc_tools_ruby_protoc -I/usr/local/include \
22
+ -I. \
23
+ -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
24
+ -I$GOPATH/src/github.com/lightningnetwork/lnd/lnrpc \
25
+ --ruby_out=plugins=grpc,paths=source_relative:${LNRPC_TARGET_DIR} \
26
+ --grpc_out=${LNRPC_TARGET_DIR} "${file}"
27
+
28
+ done
29
+
30
+ cd $CURRENT_DIR
@@ -0,0 +1,48 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: autopilotrpc/autopilot.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("autopilotrpc/autopilot.proto", :syntax => :proto3) do
8
+ add_message "autopilotrpc.StatusRequest" do
9
+ end
10
+ add_message "autopilotrpc.StatusResponse" do
11
+ optional :active, :bool, 1
12
+ end
13
+ add_message "autopilotrpc.ModifyStatusRequest" do
14
+ optional :enable, :bool, 1
15
+ end
16
+ add_message "autopilotrpc.ModifyStatusResponse" do
17
+ end
18
+ add_message "autopilotrpc.QueryScoresRequest" do
19
+ repeated :pubkeys, :string, 1
20
+ optional :ignore_local_state, :bool, 2
21
+ end
22
+ add_message "autopilotrpc.QueryScoresResponse" do
23
+ repeated :results, :message, 1, "autopilotrpc.QueryScoresResponse.HeuristicResult"
24
+ end
25
+ add_message "autopilotrpc.QueryScoresResponse.HeuristicResult" do
26
+ optional :heuristic, :string, 1
27
+ map :scores, :string, :double, 2
28
+ end
29
+ add_message "autopilotrpc.SetScoresRequest" do
30
+ optional :heuristic, :string, 1
31
+ map :scores, :string, :double, 2
32
+ end
33
+ add_message "autopilotrpc.SetScoresResponse" do
34
+ end
35
+ end
36
+ end
37
+
38
+ module Autopilotrpc
39
+ StatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.StatusRequest").msgclass
40
+ StatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.StatusResponse").msgclass
41
+ ModifyStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.ModifyStatusRequest").msgclass
42
+ ModifyStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.ModifyStatusResponse").msgclass
43
+ QueryScoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.QueryScoresRequest").msgclass
44
+ QueryScoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.QueryScoresResponse").msgclass
45
+ QueryScoresResponse::HeuristicResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.QueryScoresResponse.HeuristicResult").msgclass
46
+ SetScoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.SetScoresRequest").msgclass
47
+ SetScoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.SetScoresResponse").msgclass
48
+ end
@@ -0,0 +1,40 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: autopilotrpc/autopilot.proto for package 'autopilotrpc'
3
+
4
+ require 'grpc'
5
+ require 'autopilotrpc/autopilot_pb'
6
+
7
+ module Autopilotrpc
8
+ module Autopilot
9
+ # Autopilot is a service that can be used to get information about the current
10
+ # state of the daemon's autopilot agent, and also supply it with information
11
+ # that can be used when deciding where to open channels.
12
+ class Service
13
+
14
+ include GRPC::GenericService
15
+
16
+ self.marshal_class_method = :encode
17
+ self.unmarshal_class_method = :decode
18
+ self.service_name = 'autopilotrpc.Autopilot'
19
+
20
+ #
21
+ # Status returns whether the daemon's autopilot agent is active.
22
+ rpc :Status, StatusRequest, StatusResponse
23
+ #
24
+ # ModifyStatus is used to modify the status of the autopilot agent, like
25
+ # enabling or disabling it.
26
+ rpc :ModifyStatus, ModifyStatusRequest, ModifyStatusResponse
27
+ #
28
+ # QueryScores queries all available autopilot heuristics, in addition to any
29
+ # active combination of these heruristics, for the scores they would give to
30
+ # the given nodes.
31
+ rpc :QueryScores, QueryScoresRequest, QueryScoresResponse
32
+ #
33
+ # SetScores attempts to set the scores used by the running autopilot agent,
34
+ # if the external scoring heuristic is enabled.
35
+ rpc :SetScores, SetScoresRequest, SetScoresResponse
36
+ end
37
+
38
+ Stub = Service.rpc_stub_class
39
+ end
40
+ end
@@ -0,0 +1,67 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: chainrpc/chainnotifier.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("chainrpc/chainnotifier.proto", :syntax => :proto3) do
8
+ add_message "chainrpc.ConfRequest" do
9
+ optional :txid, :bytes, 1
10
+ optional :script, :bytes, 2
11
+ optional :num_confs, :uint32, 3
12
+ optional :height_hint, :uint32, 4
13
+ end
14
+ add_message "chainrpc.ConfDetails" do
15
+ optional :raw_tx, :bytes, 1
16
+ optional :block_hash, :bytes, 2
17
+ optional :block_height, :uint32, 3
18
+ optional :tx_index, :uint32, 4
19
+ end
20
+ add_message "chainrpc.Reorg" do
21
+ end
22
+ add_message "chainrpc.ConfEvent" do
23
+ oneof :event do
24
+ optional :conf, :message, 1, "chainrpc.ConfDetails"
25
+ optional :reorg, :message, 2, "chainrpc.Reorg"
26
+ end
27
+ end
28
+ add_message "chainrpc.Outpoint" do
29
+ optional :hash, :bytes, 1
30
+ optional :index, :uint32, 2
31
+ end
32
+ add_message "chainrpc.SpendRequest" do
33
+ optional :outpoint, :message, 1, "chainrpc.Outpoint"
34
+ optional :script, :bytes, 2
35
+ optional :height_hint, :uint32, 3
36
+ end
37
+ add_message "chainrpc.SpendDetails" do
38
+ optional :spending_outpoint, :message, 1, "chainrpc.Outpoint"
39
+ optional :raw_spending_tx, :bytes, 2
40
+ optional :spending_tx_hash, :bytes, 3
41
+ optional :spending_input_index, :uint32, 4
42
+ optional :spending_height, :uint32, 5
43
+ end
44
+ add_message "chainrpc.SpendEvent" do
45
+ oneof :event do
46
+ optional :spend, :message, 1, "chainrpc.SpendDetails"
47
+ optional :reorg, :message, 2, "chainrpc.Reorg"
48
+ end
49
+ end
50
+ add_message "chainrpc.BlockEpoch" do
51
+ optional :hash, :bytes, 1
52
+ optional :height, :uint32, 2
53
+ end
54
+ end
55
+ end
56
+
57
+ module Chainrpc
58
+ ConfRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.ConfRequest").msgclass
59
+ ConfDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.ConfDetails").msgclass
60
+ Reorg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.Reorg").msgclass
61
+ ConfEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.ConfEvent").msgclass
62
+ Outpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.Outpoint").msgclass
63
+ SpendRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.SpendRequest").msgclass
64
+ SpendDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.SpendDetails").msgclass
65
+ SpendEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.SpendEvent").msgclass
66
+ BlockEpoch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.BlockEpoch").msgclass
67
+ end
@@ -0,0 +1,51 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: chainrpc/chainnotifier.proto for package 'chainrpc'
3
+
4
+ require 'grpc'
5
+ require 'chainrpc/chainnotifier_pb'
6
+
7
+ module Chainrpc
8
+ module ChainNotifier
9
+ # ChainNotifier is a service that can be used to get information about the
10
+ # chain backend by registering notifiers for chain events.
11
+ class Service
12
+
13
+ include GRPC::GenericService
14
+
15
+ self.marshal_class_method = :encode
16
+ self.unmarshal_class_method = :decode
17
+ self.service_name = 'chainrpc.ChainNotifier'
18
+
19
+ #
20
+ # RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
21
+ # registers an intent for a client to be notified once a confirmation request
22
+ # has reached its required number of confirmations on-chain.
23
+ #
24
+ # A client can specify whether the confirmation request should be for a
25
+ # particular transaction by its hash or for an output script by specifying a
26
+ # zero hash.
27
+ rpc :RegisterConfirmationsNtfn, ConfRequest, stream(ConfEvent)
28
+ #
29
+ # RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
30
+ # intent for a client to be notification once a spend request has been spent
31
+ # by a transaction that has confirmed on-chain.
32
+ #
33
+ # A client can specify whether the spend request should be for a particular
34
+ # outpoint or for an output script by specifying a zero outpoint.
35
+ rpc :RegisterSpendNtfn, SpendRequest, stream(SpendEvent)
36
+ #
37
+ # RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
38
+ # registers an intent for a client to be notified of blocks in the chain. The
39
+ # stream will return a hash and height tuple of a block for each new/stale
40
+ # block in the chain. It is the client's responsibility to determine whether
41
+ # the tuple returned is for a new or stale block in the chain.
42
+ #
43
+ # A client can also request a historical backlog of blocks from a particular
44
+ # point. This allows clients to be idempotent by ensuring that they do not
45
+ # missing processing a single block within the chain.
46
+ rpc :RegisterBlockEpochNtfn, BlockEpoch, stream(BlockEpoch)
47
+ end
48
+
49
+ Stub = Service.rpc_stub_class
50
+ end
51
+ end
@@ -0,0 +1,48 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: invoicesrpc/invoices.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'rpc_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("invoicesrpc/invoices.proto", :syntax => :proto3) do
9
+ add_message "invoicesrpc.CancelInvoiceMsg" do
10
+ optional :payment_hash, :bytes, 1
11
+ end
12
+ add_message "invoicesrpc.CancelInvoiceResp" do
13
+ end
14
+ add_message "invoicesrpc.AddHoldInvoiceRequest" do
15
+ optional :memo, :string, 1
16
+ optional :hash, :bytes, 2
17
+ optional :value, :int64, 3
18
+ optional :value_msat, :int64, 10
19
+ optional :description_hash, :bytes, 4
20
+ optional :expiry, :int64, 5
21
+ optional :fallback_addr, :string, 6
22
+ optional :cltv_expiry, :uint64, 7
23
+ repeated :route_hints, :message, 8, "lnrpc.RouteHint"
24
+ optional :private, :bool, 9
25
+ end
26
+ add_message "invoicesrpc.AddHoldInvoiceResp" do
27
+ optional :payment_request, :string, 1
28
+ end
29
+ add_message "invoicesrpc.SettleInvoiceMsg" do
30
+ optional :preimage, :bytes, 1
31
+ end
32
+ add_message "invoicesrpc.SettleInvoiceResp" do
33
+ end
34
+ add_message "invoicesrpc.SubscribeSingleInvoiceRequest" do
35
+ optional :r_hash, :bytes, 2
36
+ end
37
+ end
38
+ end
39
+
40
+ module Invoicesrpc
41
+ CancelInvoiceMsg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.CancelInvoiceMsg").msgclass
42
+ CancelInvoiceResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.CancelInvoiceResp").msgclass
43
+ AddHoldInvoiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.AddHoldInvoiceRequest").msgclass
44
+ AddHoldInvoiceResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.AddHoldInvoiceResp").msgclass
45
+ SettleInvoiceMsg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SettleInvoiceMsg").msgclass
46
+ SettleInvoiceResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SettleInvoiceResp").msgclass
47
+ SubscribeSingleInvoiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SubscribeSingleInvoiceRequest").msgclass
48
+ end
@@ -0,0 +1,41 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: invoicesrpc/invoices.proto for package 'invoicesrpc'
3
+
4
+ require 'grpc'
5
+ require 'invoicesrpc/invoices_pb'
6
+
7
+ module Invoicesrpc
8
+ module Invoices
9
+ # Invoices is a service that can be used to create, accept, settle and cancel
10
+ # invoices.
11
+ class Service
12
+
13
+ include GRPC::GenericService
14
+
15
+ self.marshal_class_method = :encode
16
+ self.unmarshal_class_method = :decode
17
+ self.service_name = 'invoicesrpc.Invoices'
18
+
19
+ #
20
+ # SubscribeSingleInvoice returns a uni-directional stream (server -> client)
21
+ # to notify the client of state transitions of the specified invoice.
22
+ # Initially the current invoice state is always sent out.
23
+ rpc :SubscribeSingleInvoice, SubscribeSingleInvoiceRequest, stream(Lnrpc::Invoice)
24
+ #
25
+ # CancelInvoice cancels a currently open invoice. If the invoice is already
26
+ # canceled, this call will succeed. If the invoice is already settled, it will
27
+ # fail.
28
+ rpc :CancelInvoice, CancelInvoiceMsg, CancelInvoiceResp
29
+ #
30
+ # AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
31
+ # supplied in the request.
32
+ rpc :AddHoldInvoice, AddHoldInvoiceRequest, AddHoldInvoiceResp
33
+ #
34
+ # SettleInvoice settles an accepted invoice. If the invoice is already
35
+ # settled, this call will succeed.
36
+ rpc :SettleInvoice, SettleInvoiceMsg, SettleInvoiceResp
37
+ end
38
+
39
+ Stub = Service.rpc_stub_class
40
+ end
41
+ end
@@ -0,0 +1,18 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: lnclipb/lncli.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'verrpc/verrpc_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("lnclipb/lncli.proto", :syntax => :proto3) do
9
+ add_message "lnclipb.VersionResponse" do
10
+ optional :lncli, :message, 1, "verrpc.Version"
11
+ optional :lnd, :message, 2, "verrpc.Version"
12
+ end
13
+ end
14
+ end
15
+
16
+ module Lnclipb
17
+ VersionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnclipb.VersionResponse").msgclass
18
+ end
@@ -0,0 +1,229 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: routerrpc/router.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'rpc_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("routerrpc/router.proto", :syntax => :proto3) do
9
+ add_message "routerrpc.SendPaymentRequest" do
10
+ optional :dest, :bytes, 1
11
+ optional :amt, :int64, 2
12
+ optional :amt_msat, :int64, 12
13
+ optional :payment_hash, :bytes, 3
14
+ optional :final_cltv_delta, :int32, 4
15
+ optional :payment_request, :string, 5
16
+ optional :timeout_seconds, :int32, 6
17
+ optional :fee_limit_sat, :int64, 7
18
+ optional :fee_limit_msat, :int64, 13
19
+ optional :outgoing_chan_id, :uint64, 8
20
+ repeated :outgoing_chan_ids, :uint64, 19
21
+ optional :last_hop_pubkey, :bytes, 14
22
+ optional :cltv_limit, :int32, 9
23
+ repeated :route_hints, :message, 10, "lnrpc.RouteHint"
24
+ map :dest_custom_records, :uint64, :bytes, 11
25
+ optional :allow_self_payment, :bool, 15
26
+ repeated :dest_features, :enum, 16, "lnrpc.FeatureBit"
27
+ optional :max_parts, :uint32, 17
28
+ optional :no_inflight_updates, :bool, 18
29
+ end
30
+ add_message "routerrpc.TrackPaymentRequest" do
31
+ optional :payment_hash, :bytes, 1
32
+ optional :no_inflight_updates, :bool, 2
33
+ end
34
+ add_message "routerrpc.RouteFeeRequest" do
35
+ optional :dest, :bytes, 1
36
+ optional :amt_sat, :int64, 2
37
+ end
38
+ add_message "routerrpc.RouteFeeResponse" do
39
+ optional :routing_fee_msat, :int64, 1
40
+ optional :time_lock_delay, :int64, 2
41
+ end
42
+ add_message "routerrpc.SendToRouteRequest" do
43
+ optional :payment_hash, :bytes, 1
44
+ optional :route, :message, 2, "lnrpc.Route"
45
+ end
46
+ add_message "routerrpc.SendToRouteResponse" do
47
+ optional :preimage, :bytes, 1
48
+ optional :failure, :message, 2, "lnrpc.Failure"
49
+ end
50
+ add_message "routerrpc.ResetMissionControlRequest" do
51
+ end
52
+ add_message "routerrpc.ResetMissionControlResponse" do
53
+ end
54
+ add_message "routerrpc.QueryMissionControlRequest" do
55
+ end
56
+ add_message "routerrpc.QueryMissionControlResponse" do
57
+ repeated :pairs, :message, 2, "routerrpc.PairHistory"
58
+ end
59
+ add_message "routerrpc.PairHistory" do
60
+ optional :node_from, :bytes, 1
61
+ optional :node_to, :bytes, 2
62
+ optional :history, :message, 7, "routerrpc.PairData"
63
+ end
64
+ add_message "routerrpc.PairData" do
65
+ optional :fail_time, :int64, 1
66
+ optional :fail_amt_sat, :int64, 2
67
+ optional :fail_amt_msat, :int64, 4
68
+ optional :success_time, :int64, 5
69
+ optional :success_amt_sat, :int64, 6
70
+ optional :success_amt_msat, :int64, 7
71
+ end
72
+ add_message "routerrpc.QueryProbabilityRequest" do
73
+ optional :from_node, :bytes, 1
74
+ optional :to_node, :bytes, 2
75
+ optional :amt_msat, :int64, 3
76
+ end
77
+ add_message "routerrpc.QueryProbabilityResponse" do
78
+ optional :probability, :double, 1
79
+ optional :history, :message, 2, "routerrpc.PairData"
80
+ end
81
+ add_message "routerrpc.BuildRouteRequest" do
82
+ optional :amt_msat, :int64, 1
83
+ optional :final_cltv_delta, :int32, 2
84
+ optional :outgoing_chan_id, :uint64, 3
85
+ repeated :hop_pubkeys, :bytes, 4
86
+ end
87
+ add_message "routerrpc.BuildRouteResponse" do
88
+ optional :route, :message, 1, "lnrpc.Route"
89
+ end
90
+ add_message "routerrpc.SubscribeHtlcEventsRequest" do
91
+ end
92
+ add_message "routerrpc.HtlcEvent" do
93
+ optional :incoming_channel_id, :uint64, 1
94
+ optional :outgoing_channel_id, :uint64, 2
95
+ optional :incoming_htlc_id, :uint64, 3
96
+ optional :outgoing_htlc_id, :uint64, 4
97
+ optional :timestamp_ns, :uint64, 5
98
+ optional :event_type, :enum, 6, "routerrpc.HtlcEvent.EventType"
99
+ oneof :event do
100
+ optional :forward_event, :message, 7, "routerrpc.ForwardEvent"
101
+ optional :forward_fail_event, :message, 8, "routerrpc.ForwardFailEvent"
102
+ optional :settle_event, :message, 9, "routerrpc.SettleEvent"
103
+ optional :link_fail_event, :message, 10, "routerrpc.LinkFailEvent"
104
+ end
105
+ end
106
+ add_enum "routerrpc.HtlcEvent.EventType" do
107
+ value :UNKNOWN, 0
108
+ value :SEND, 1
109
+ value :RECEIVE, 2
110
+ value :FORWARD, 3
111
+ end
112
+ add_message "routerrpc.HtlcInfo" do
113
+ optional :incoming_timelock, :uint32, 1
114
+ optional :outgoing_timelock, :uint32, 2
115
+ optional :incoming_amt_msat, :uint64, 3
116
+ optional :outgoing_amt_msat, :uint64, 4
117
+ end
118
+ add_message "routerrpc.ForwardEvent" do
119
+ optional :info, :message, 1, "routerrpc.HtlcInfo"
120
+ end
121
+ add_message "routerrpc.ForwardFailEvent" do
122
+ end
123
+ add_message "routerrpc.SettleEvent" do
124
+ end
125
+ add_message "routerrpc.LinkFailEvent" do
126
+ optional :info, :message, 1, "routerrpc.HtlcInfo"
127
+ optional :wire_failure, :enum, 2, "lnrpc.Failure.FailureCode"
128
+ optional :failure_detail, :enum, 3, "routerrpc.FailureDetail"
129
+ optional :failure_string, :string, 4
130
+ end
131
+ add_message "routerrpc.PaymentStatus" do
132
+ optional :state, :enum, 1, "routerrpc.PaymentState"
133
+ optional :preimage, :bytes, 2
134
+ repeated :htlcs, :message, 4, "lnrpc.HTLCAttempt"
135
+ end
136
+ add_message "routerrpc.CircuitKey" do
137
+ optional :chan_id, :uint64, 1
138
+ optional :htlc_id, :uint64, 2
139
+ end
140
+ add_message "routerrpc.ForwardHtlcInterceptRequest" do
141
+ optional :incoming_circuit_key, :message, 1, "routerrpc.CircuitKey"
142
+ optional :incoming_amount_msat, :uint64, 5
143
+ optional :incoming_expiry, :uint32, 6
144
+ optional :payment_hash, :bytes, 2
145
+ optional :outgoing_requested_chan_id, :uint64, 7
146
+ optional :outgoing_amount_msat, :uint64, 3
147
+ optional :outgoing_expiry, :uint32, 4
148
+ map :custom_records, :uint64, :bytes, 8
149
+ end
150
+ add_message "routerrpc.ForwardHtlcInterceptResponse" do
151
+ optional :incoming_circuit_key, :message, 1, "routerrpc.CircuitKey"
152
+ optional :action, :enum, 2, "routerrpc.ResolveHoldForwardAction"
153
+ optional :preimage, :bytes, 3
154
+ end
155
+ add_enum "routerrpc.FailureDetail" do
156
+ value :UNKNOWN, 0
157
+ value :NO_DETAIL, 1
158
+ value :ONION_DECODE, 2
159
+ value :LINK_NOT_ELIGIBLE, 3
160
+ value :ON_CHAIN_TIMEOUT, 4
161
+ value :HTLC_EXCEEDS_MAX, 5
162
+ value :INSUFFICIENT_BALANCE, 6
163
+ value :INCOMPLETE_FORWARD, 7
164
+ value :HTLC_ADD_FAILED, 8
165
+ value :FORWARDS_DISABLED, 9
166
+ value :INVOICE_CANCELED, 10
167
+ value :INVOICE_UNDERPAID, 11
168
+ value :INVOICE_EXPIRY_TOO_SOON, 12
169
+ value :INVOICE_NOT_OPEN, 13
170
+ value :MPP_INVOICE_TIMEOUT, 14
171
+ value :ADDRESS_MISMATCH, 15
172
+ value :SET_TOTAL_MISMATCH, 16
173
+ value :SET_TOTAL_TOO_LOW, 17
174
+ value :SET_OVERPAID, 18
175
+ value :UNKNOWN_INVOICE, 19
176
+ value :INVALID_KEYSEND, 20
177
+ value :MPP_IN_PROGRESS, 21
178
+ value :CIRCULAR_ROUTE, 22
179
+ end
180
+ add_enum "routerrpc.PaymentState" do
181
+ value :IN_FLIGHT, 0
182
+ value :SUCCEEDED, 1
183
+ value :FAILED_TIMEOUT, 2
184
+ value :FAILED_NO_ROUTE, 3
185
+ value :FAILED_ERROR, 4
186
+ value :FAILED_INCORRECT_PAYMENT_DETAILS, 5
187
+ value :FAILED_INSUFFICIENT_BALANCE, 6
188
+ end
189
+ add_enum "routerrpc.ResolveHoldForwardAction" do
190
+ value :SETTLE, 0
191
+ value :FAIL, 1
192
+ value :RESUME, 2
193
+ end
194
+ end
195
+ end
196
+
197
+ module Routerrpc
198
+ SendPaymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendPaymentRequest").msgclass
199
+ TrackPaymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.TrackPaymentRequest").msgclass
200
+ RouteFeeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.RouteFeeRequest").msgclass
201
+ RouteFeeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.RouteFeeResponse").msgclass
202
+ SendToRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendToRouteRequest").msgclass
203
+ SendToRouteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendToRouteResponse").msgclass
204
+ ResetMissionControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlRequest").msgclass
205
+ ResetMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlResponse").msgclass
206
+ QueryMissionControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlRequest").msgclass
207
+ QueryMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlResponse").msgclass
208
+ PairHistory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairHistory").msgclass
209
+ PairData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairData").msgclass
210
+ QueryProbabilityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityRequest").msgclass
211
+ QueryProbabilityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityResponse").msgclass
212
+ BuildRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteRequest").msgclass
213
+ BuildRouteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteResponse").msgclass
214
+ SubscribeHtlcEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SubscribeHtlcEventsRequest").msgclass
215
+ HtlcEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcEvent").msgclass
216
+ HtlcEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcEvent.EventType").enummodule
217
+ HtlcInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcInfo").msgclass
218
+ ForwardEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardEvent").msgclass
219
+ ForwardFailEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardFailEvent").msgclass
220
+ SettleEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SettleEvent").msgclass
221
+ LinkFailEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.LinkFailEvent").msgclass
222
+ PaymentStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentStatus").msgclass
223
+ CircuitKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.CircuitKey").msgclass
224
+ ForwardHtlcInterceptRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptRequest").msgclass
225
+ ForwardHtlcInterceptResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptResponse").msgclass
226
+ FailureDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.FailureDetail").enummodule
227
+ PaymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentState").enummodule
228
+ ResolveHoldForwardAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResolveHoldForwardAction").enummodule
229
+ end