lnrpc 0.6.1 → 0.7.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -10
- data/README.md +5 -3
- data/lib/lnrpc/rpc.proto +46 -21
- data/lib/lnrpc/rpc_pb.rb +15 -2
- data/lib/lnrpc/rpc_services_pb.rb +1 -1
- data/lib/lnrpc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71f46657870277fc3ea221589d4f56636db84d94a9a2c6b94c3e5b45be71bf74
|
4
|
+
data.tar.gz: e457e296265023dd2a153a70bcfc1b685f278e042ed511e123b6b81bee103f48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 899ad8d7157862b9a2dddc6c7972b52124c38d049c102d991d6be5588105eb95a7a54adc4d4f22a3183db9353c4c1816a6af9b2acd849e0a9f5eaec69ac6ada9
|
7
|
+
data.tar.gz: e9377803a209e507fd5d33b1a2568708bcf5d1e5d819e2ddf68bb5a6e5915c3f05f4fe28ac96c632ef5d964238dda030b5d040ce05af996e874f7d387b1a0bc9
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lnrpc (0.
|
4
|
+
lnrpc (0.7.0)
|
5
5
|
google-protobuf (>= 3.7)
|
6
6
|
grpc (>= 1.19.0)
|
7
7
|
|
@@ -9,26 +9,26 @@ GEM
|
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
11
|
diff-lcs (1.3)
|
12
|
-
google-protobuf (3.
|
13
|
-
googleapis-common-protos-types (1.0.
|
12
|
+
google-protobuf (3.8.0)
|
13
|
+
googleapis-common-protos-types (1.0.4)
|
14
14
|
google-protobuf (~> 3.0)
|
15
|
-
grpc (1.
|
16
|
-
google-protobuf (~> 3.
|
17
|
-
googleapis-common-protos-types (~> 1.0
|
15
|
+
grpc (1.21.0)
|
16
|
+
google-protobuf (~> 3.7)
|
17
|
+
googleapis-common-protos-types (~> 1.0)
|
18
18
|
rake (10.5.0)
|
19
19
|
rspec (3.8.0)
|
20
20
|
rspec-core (~> 3.8.0)
|
21
21
|
rspec-expectations (~> 3.8.0)
|
22
22
|
rspec-mocks (~> 3.8.0)
|
23
|
-
rspec-core (3.8.
|
23
|
+
rspec-core (3.8.2)
|
24
24
|
rspec-support (~> 3.8.0)
|
25
|
-
rspec-expectations (3.8.
|
25
|
+
rspec-expectations (3.8.4)
|
26
26
|
diff-lcs (>= 1.2.0, < 2.0)
|
27
27
|
rspec-support (~> 3.8.0)
|
28
|
-
rspec-mocks (3.8.
|
28
|
+
rspec-mocks (3.8.1)
|
29
29
|
diff-lcs (>= 1.2.0, < 2.0)
|
30
30
|
rspec-support (~> 3.8.0)
|
31
|
-
rspec-support (3.8.
|
31
|
+
rspec-support (3.8.2)
|
32
32
|
|
33
33
|
PLATFORMS
|
34
34
|
ruby
|
data/README.md
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# Lnrpc - ruby gRPC client for LND
|
2
|
+
[](https://badge.fury.io/rb/lnrpc)
|
2
3
|
|
3
4
|
a [gRPC](https://grpc.io/) client for [LND, the Lightning Network Daemon](https://github.com/lightningnetwork/lnd/) packed as ruby gem.
|
4
5
|
|
5
|
-
Currently published as [beta release](https://rubygems.org/gems/lnrpc) to rubygems for LND v0.5.2.beta. (see [#Versioning](#Versioning))
|
6
|
-
|
7
6
|
|
8
7
|
## Installation
|
9
8
|
|
10
9
|
Add this line to your application's Gemfile:
|
11
10
|
|
12
11
|
```ruby
|
13
|
-
gem 'lnrpc'
|
12
|
+
gem 'lnrpc', '~> 0.6.1'
|
14
13
|
```
|
14
|
+
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)).
|
15
15
|
|
16
16
|
And then execute:
|
17
17
|
|
@@ -140,6 +140,8 @@ Don't have a BTC Pay Server? [Setting one up is easy.](https://medium.com/@Btcpa
|
|
140
140
|
This gem follows the LND versions and will update the gRPC service definitions accordingly.
|
141
141
|
e.g. gem version 0.5.2 includes the gRPC service definitions from LND v0.5.2
|
142
142
|
|
143
|
+
see [rubygems](https://rubygems.org/gems/lnrpc) for all available releases.
|
144
|
+
|
143
145
|
|
144
146
|
### Update service definitions
|
145
147
|
|
data/lib/lnrpc/rpc.proto
CHANGED
@@ -175,7 +175,7 @@ message UnlockWalletRequest {
|
|
175
175
|
/**
|
176
176
|
recovery_window is an optional argument specifying the address lookahead
|
177
177
|
when restoring a wallet seed. The recovery window applies to each
|
178
|
-
|
178
|
+
individual branch of the BIP44 derivation paths. Supplying a recovery
|
179
179
|
window of zero indicates that no addresses should be recovered, such after
|
180
180
|
the first initialization of the wallet.
|
181
181
|
*/
|
@@ -212,7 +212,7 @@ service Lightning {
|
|
212
212
|
/** lncli: `walletbalance`
|
213
213
|
WalletBalance returns total unspent outputs(confirmed and unconfirmed), all
|
214
214
|
confirmed unspent outputs and all unconfirmed unspent outputs under control
|
215
|
-
of the wallet.
|
215
|
+
of the wallet.
|
216
216
|
*/
|
217
217
|
rpc WalletBalance (WalletBalanceRequest) returns (WalletBalanceResponse) {
|
218
218
|
option (google.api.http) = {
|
@@ -398,7 +398,7 @@ service Lightning {
|
|
398
398
|
rpc SubscribeChannelEvents (ChannelEventSubscription) returns (stream ChannelEventUpdate);
|
399
399
|
|
400
400
|
/** lncli: `closedchannels`
|
401
|
-
ClosedChannels returns a description of all the closed channels that
|
401
|
+
ClosedChannels returns a description of all the closed channels that
|
402
402
|
this node was a participant in.
|
403
403
|
*/
|
404
404
|
rpc ClosedChannels (ClosedChannelsRequest) returns (ClosedChannelsResponse) {
|
@@ -621,7 +621,7 @@ service Lightning {
|
|
621
621
|
/** lncli: `queryroutes`
|
622
622
|
QueryRoutes attempts to query the daemon's Channel Router for a possible
|
623
623
|
route to a target destination capable of carrying a specific amount of
|
624
|
-
satoshis. The
|
624
|
+
satoshis. The returned route contains the full details required to craft and
|
625
625
|
send an HTLC, also including the necessary information that should be
|
626
626
|
present within the Sphinx packet encapsulated within the HTLC.
|
627
627
|
*/
|
@@ -814,6 +814,9 @@ message Transaction {
|
|
814
814
|
|
815
815
|
/// Addresses that received funds for this transaction
|
816
816
|
repeated string dest_addresses = 8 [ json_name = "dest_addresses" ];
|
817
|
+
|
818
|
+
/// The raw transaction hex.
|
819
|
+
string raw_tx_hex = 9 [ json_name = "raw_tx_hex" ];
|
817
820
|
}
|
818
821
|
message GetTransactionsRequest {
|
819
822
|
}
|
@@ -896,13 +899,7 @@ message SendToRouteRequest {
|
|
896
899
|
/// An optional hex-encoded payment hash to be used for the HTLC.
|
897
900
|
string payment_hash_string = 2;
|
898
901
|
|
899
|
-
|
900
|
-
Deprecated. The set of routes that should be used to attempt to complete the
|
901
|
-
payment. The possibility to pass in multiple routes is deprecated and
|
902
|
-
instead the single route field below should be used in combination with the
|
903
|
-
streaming variant of SendToRoute.
|
904
|
-
*/
|
905
|
-
repeated Route routes = 3 [deprecated = true];
|
902
|
+
reserved 3;
|
906
903
|
|
907
904
|
/// Route that should be used to attempt to complete the payment.
|
908
905
|
Route route = 4;
|
@@ -1162,7 +1159,7 @@ message Channel {
|
|
1162
1159
|
/// True if we were the ones that created the channel.
|
1163
1160
|
bool initiator = 18 [json_name = "initiator"];
|
1164
1161
|
|
1165
|
-
/// A set of flags showing the current state of the
|
1162
|
+
/// A set of flags showing the current state of the channel.
|
1166
1163
|
string chan_status_flags = 19 [json_name = "chan_status_flags"];
|
1167
1164
|
}
|
1168
1165
|
|
@@ -1335,6 +1332,9 @@ message GetInfoResponse {
|
|
1335
1332
|
|
1336
1333
|
/// A list of active chains the node is connected to
|
1337
1334
|
repeated Chain chains = 16 [json_name = "chains"];
|
1335
|
+
|
1336
|
+
/// The color of the current node in hex code format
|
1337
|
+
string color = 17 [json_name = "color"];
|
1338
1338
|
}
|
1339
1339
|
|
1340
1340
|
message Chain {
|
@@ -1523,7 +1523,7 @@ message PendingChannelsResponse {
|
|
1523
1523
|
/// The balance in satoshis encumbered in this pending channel
|
1524
1524
|
int64 limbo_balance = 3 [ json_name = "limbo_balance" ];
|
1525
1525
|
|
1526
|
-
/// The height at which funds can be
|
1526
|
+
/// The height at which funds can be swept into the wallet
|
1527
1527
|
uint32 maturity_height = 4 [ json_name = "maturity_height" ];
|
1528
1528
|
|
1529
1529
|
/*
|
@@ -1606,11 +1606,7 @@ message QueryRoutesRequest {
|
|
1606
1606
|
/// The amount to send expressed in satoshis
|
1607
1607
|
int64 amt = 2;
|
1608
1608
|
|
1609
|
-
|
1610
|
-
Deprecated. The max number of routes to return. In the future, QueryRoutes
|
1611
|
-
will only return a single route.
|
1612
|
-
*/
|
1613
|
-
int32 num_routes = 3 [deprecated = true];
|
1609
|
+
reserved 3;
|
1614
1610
|
|
1615
1611
|
/// An optional CLTV delta from the current height that should be used for the timelock of the final hop
|
1616
1612
|
int32 final_cltv_delta = 4;
|
@@ -1698,7 +1694,7 @@ message Route {
|
|
1698
1694
|
/**
|
1699
1695
|
The sum of the fees paid at each hop within the final route. In the case
|
1700
1696
|
of a one-hop payment, this value will be zero as we don't need to pay a fee
|
1701
|
-
|
1697
|
+
to ourselves.
|
1702
1698
|
*/
|
1703
1699
|
int64 total_fees = 2 [json_name = "total_fees", deprecated = true];
|
1704
1700
|
|
@@ -1730,6 +1726,9 @@ message Route {
|
|
1730
1726
|
message NodeInfoRequest {
|
1731
1727
|
/// The 33-byte hex-encoded compressed public of the target node
|
1732
1728
|
string pub_key = 1;
|
1729
|
+
|
1730
|
+
/// If true, will include all known channels associated with the node.
|
1731
|
+
bool include_channels = 2;
|
1733
1732
|
}
|
1734
1733
|
|
1735
1734
|
message NodeInfo {
|
@@ -1742,8 +1741,14 @@ message NodeInfo {
|
|
1742
1741
|
*/
|
1743
1742
|
LightningNode node = 1 [json_name = "node"];
|
1744
1743
|
|
1744
|
+
/// The total number of channels for the node.
|
1745
1745
|
uint32 num_channels = 2 [json_name = "num_channels"];
|
1746
|
+
|
1747
|
+
/// The sum of all channels capacity for the node, denominated in satoshis.
|
1746
1748
|
int64 total_capacity = 3 [json_name = "total_capacity"];
|
1749
|
+
|
1750
|
+
/// A list of all public channels for the node.
|
1751
|
+
repeated ChannelEdge channels = 4 [json_name = "channels"];
|
1747
1752
|
}
|
1748
1753
|
|
1749
1754
|
/**
|
@@ -1864,6 +1869,7 @@ message NodeUpdate {
|
|
1864
1869
|
string identity_key = 2;
|
1865
1870
|
bytes global_features = 3;
|
1866
1871
|
string alias = 4;
|
1872
|
+
string color = 5;
|
1867
1873
|
}
|
1868
1874
|
message ChannelEdgeUpdate {
|
1869
1875
|
/**
|
@@ -2152,9 +2158,28 @@ message Payment {
|
|
2152
2158
|
|
2153
2159
|
/// The value of the payment in milli-satoshis
|
2154
2160
|
int64 value_msat = 8 [json_name = "value_msat"];
|
2161
|
+
|
2162
|
+
/// The optional payment request being fulfilled.
|
2163
|
+
string payment_request = 9 [json_name = "payment_request"];
|
2164
|
+
|
2165
|
+
enum PaymentStatus {
|
2166
|
+
UNKNOWN = 0;
|
2167
|
+
IN_FLIGHT = 1;
|
2168
|
+
SUCCEEDED = 2;
|
2169
|
+
FAILED = 3;
|
2170
|
+
}
|
2171
|
+
|
2172
|
+
// The status of the payment.
|
2173
|
+
PaymentStatus status = 10 [json_name = "status"];
|
2155
2174
|
}
|
2156
2175
|
|
2157
2176
|
message ListPaymentsRequest {
|
2177
|
+
/**
|
2178
|
+
If true, then return payments that have not yet fully completed. This means
|
2179
|
+
that pending payments, as well as failed payments will show up if this
|
2180
|
+
field is set to True.
|
2181
|
+
*/
|
2182
|
+
bool include_incomplete = 1;
|
2158
2183
|
}
|
2159
2184
|
|
2160
2185
|
message ListPaymentsResponse {
|
@@ -2298,7 +2323,7 @@ message ForwardingHistoryResponse {
|
|
2298
2323
|
}
|
2299
2324
|
|
2300
2325
|
message ExportChannelBackupRequest {
|
2301
|
-
/// The target
|
2326
|
+
/// The target channel point to obtain a back up for.
|
2302
2327
|
ChannelPoint chan_point = 1;
|
2303
2328
|
}
|
2304
2329
|
|
@@ -2310,7 +2335,7 @@ message ChannelBackup {
|
|
2310
2335
|
|
2311
2336
|
/**
|
2312
2337
|
Is an encrypted single-chan backup. this can be passed to
|
2313
|
-
RestoreChannelBackups, or the WalletUnlocker
|
2338
|
+
RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in
|
2314
2339
|
order to trigger the recovery protocol.
|
2315
2340
|
*/
|
2316
2341
|
bytes chan_backup = 2 [ json_name = "chan_backup" ];
|
data/lib/lnrpc/rpc_pb.rb
CHANGED
@@ -52,6 +52,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
52
52
|
optional :time_stamp, :int64, 6
|
53
53
|
optional :total_fees, :int64, 7
|
54
54
|
repeated :dest_addresses, :string, 8
|
55
|
+
optional :raw_tx_hex, :string, 9
|
55
56
|
end
|
56
57
|
add_message "lnrpc.GetTransactionsRequest" do
|
57
58
|
end
|
@@ -85,7 +86,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
85
86
|
add_message "lnrpc.SendToRouteRequest" do
|
86
87
|
optional :payment_hash, :bytes, 1
|
87
88
|
optional :payment_hash_string, :string, 2
|
88
|
-
repeated :routes, :message, 3, "lnrpc.Route"
|
89
89
|
optional :route, :message, 4, "lnrpc.Route"
|
90
90
|
end
|
91
91
|
add_message "lnrpc.ChannelPoint" do
|
@@ -273,6 +273,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
273
273
|
optional :version, :string, 14
|
274
274
|
optional :num_inactive_channels, :uint32, 15
|
275
275
|
repeated :chains, :message, 16, "lnrpc.Chain"
|
276
|
+
optional :color, :string, 17
|
276
277
|
end
|
277
278
|
add_message "lnrpc.Chain" do
|
278
279
|
optional :chain, :string, 1
|
@@ -406,7 +407,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
406
407
|
add_message "lnrpc.QueryRoutesRequest" do
|
407
408
|
optional :pub_key, :string, 1
|
408
409
|
optional :amt, :int64, 2
|
409
|
-
optional :num_routes, :int32, 3
|
410
410
|
optional :final_cltv_delta, :int32, 4
|
411
411
|
optional :fee_limit, :message, 5, "lnrpc.FeeLimit"
|
412
412
|
repeated :ignored_nodes, :bytes, 6
|
@@ -440,11 +440,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
440
440
|
end
|
441
441
|
add_message "lnrpc.NodeInfoRequest" do
|
442
442
|
optional :pub_key, :string, 1
|
443
|
+
optional :include_channels, :bool, 2
|
443
444
|
end
|
444
445
|
add_message "lnrpc.NodeInfo" do
|
445
446
|
optional :node, :message, 1, "lnrpc.LightningNode"
|
446
447
|
optional :num_channels, :uint32, 2
|
447
448
|
optional :total_capacity, :int64, 3
|
449
|
+
repeated :channels, :message, 4, "lnrpc.ChannelEdge"
|
448
450
|
end
|
449
451
|
add_message "lnrpc.LightningNode" do
|
450
452
|
optional :last_update, :uint32, 1
|
@@ -515,6 +517,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
515
517
|
optional :identity_key, :string, 2
|
516
518
|
optional :global_features, :bytes, 3
|
517
519
|
optional :alias, :string, 4
|
520
|
+
optional :color, :string, 5
|
518
521
|
end
|
519
522
|
add_message "lnrpc.ChannelEdgeUpdate" do
|
520
523
|
optional :chan_id, :uint64, 1
|
@@ -602,8 +605,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
602
605
|
optional :payment_preimage, :string, 6
|
603
606
|
optional :value_sat, :int64, 7
|
604
607
|
optional :value_msat, :int64, 8
|
608
|
+
optional :payment_request, :string, 9
|
609
|
+
optional :status, :enum, 10, "lnrpc.Payment.PaymentStatus"
|
610
|
+
end
|
611
|
+
add_enum "lnrpc.Payment.PaymentStatus" do
|
612
|
+
value :UNKNOWN, 0
|
613
|
+
value :IN_FLIGHT, 1
|
614
|
+
value :SUCCEEDED, 2
|
615
|
+
value :FAILED, 3
|
605
616
|
end
|
606
617
|
add_message "lnrpc.ListPaymentsRequest" do
|
618
|
+
optional :include_incomplete, :bool, 1
|
607
619
|
end
|
608
620
|
add_message "lnrpc.ListPaymentsResponse" do
|
609
621
|
repeated :payments, :message, 1, "lnrpc.Payment"
|
@@ -832,6 +844,7 @@ module Lnrpc
|
|
832
844
|
ListInvoiceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceResponse").msgclass
|
833
845
|
InvoiceSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceSubscription").msgclass
|
834
846
|
Payment = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Payment").msgclass
|
847
|
+
Payment::PaymentStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Payment.PaymentStatus").enummodule
|
835
848
|
ListPaymentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsRequest").msgclass
|
836
849
|
ListPaymentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsResponse").msgclass
|
837
850
|
DeleteAllPaymentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsRequest").msgclass
|
@@ -287,7 +287,7 @@ module Lnrpc
|
|
287
287
|
# * lncli: `queryroutes`
|
288
288
|
# QueryRoutes attempts to query the daemon's Channel Router for a possible
|
289
289
|
# route to a target destination capable of carrying a specific amount of
|
290
|
-
# satoshis. The
|
290
|
+
# satoshis. The returned route contains the full details required to craft and
|
291
291
|
# send an HTLC, also including the necessary information that should be
|
292
292
|
# present within the Sphinx packet encapsulated within the HTLC.
|
293
293
|
rpc :QueryRoutes, QueryRoutesRequest, QueryRoutesResponse
|
data/lib/lnrpc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lnrpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bumann
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|