1
0
mirror of https://github.com/bumi/lnrpc synced 2024-10-07 12:46:44 +00:00

Update to lnd version 0.7 (beta)

This commit is contained in:
bumi 2019-07-03 17:30:43 +02:00
parent 2e65af5fcf
commit 26fc81e177
6 changed files with 74 additions and 36 deletions

View File

@ -1,7 +1,7 @@
PATH
remote: .
specs:
lnrpc (0.5.2)
lnrpc (0.7.0)
google-protobuf (>= 3.7)
grpc (>= 1.19.0)
@ -9,26 +9,26 @@ GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.3)
google-protobuf (3.7.0-x86_64-linux)
googleapis-common-protos-types (1.0.3)
google-protobuf (3.8.0)
googleapis-common-protos-types (1.0.4)
google-protobuf (~> 3.0)
grpc (1.19.0-x86_64-linux)
google-protobuf (~> 3.1)
googleapis-common-protos-types (~> 1.0.0)
grpc (1.21.0)
google-protobuf (~> 3.7)
googleapis-common-protos-types (~> 1.0)
rake (10.5.0)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-core (3.8.2)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.2)
rspec-expectations (3.8.4)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
rspec-mocks (3.8.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rspec-support (3.8.2)
PLATFORMS
ruby

View File

@ -1,11 +1,11 @@
# Lnrpc - ruby gRPC client for LND
[![Gem Version](https://badge.fury.io/rb/lnrpc.svg)](https://badge.fury.io/rb/lnrpc)
a [gRPC](https://grpc.io/) client for [LND, the Lightning Network Daemon](https://github.com/lightningnetwork/lnd/) packed as ruby gem.
## Installation
Add this line to your application's Gemfile:
```ruby

View File

@ -175,7 +175,7 @@ message UnlockWalletRequest {
/**
recovery_window is an optional argument specifying the address lookahead
when restoring a wallet seed. The recovery window applies to each
invdividual branch of the BIP44 derivation paths. Supplying a recovery
individual branch of the BIP44 derivation paths. Supplying a recovery
window of zero indicates that no addresses should be recovered, such after
the first initialization of the wallet.
*/
@ -212,7 +212,7 @@ service Lightning {
/** lncli: `walletbalance`
WalletBalance returns total unspent outputs(confirmed and unconfirmed), all
confirmed unspent outputs and all unconfirmed unspent outputs under control
of the wallet.
of the wallet.
*/
rpc WalletBalance (WalletBalanceRequest) returns (WalletBalanceResponse) {
option (google.api.http) = {
@ -398,7 +398,7 @@ service Lightning {
rpc SubscribeChannelEvents (ChannelEventSubscription) returns (stream ChannelEventUpdate);
/** lncli: `closedchannels`
ClosedChannels returns a description of all the closed channels that
ClosedChannels returns a description of all the closed channels that
this node was a participant in.
*/
rpc ClosedChannels (ClosedChannelsRequest) returns (ClosedChannelsResponse) {
@ -621,7 +621,7 @@ service Lightning {
/** lncli: `queryroutes`
QueryRoutes attempts to query the daemon's Channel Router for a possible
route to a target destination capable of carrying a specific amount of
satoshis. The retuned route contains the full details required to craft and
satoshis. The returned route contains the full details required to craft and
send an HTLC, also including the necessary information that should be
present within the Sphinx packet encapsulated within the HTLC.
*/
@ -814,6 +814,9 @@ message Transaction {
/// Addresses that received funds for this transaction
repeated string dest_addresses = 8 [ json_name = "dest_addresses" ];
/// The raw transaction hex.
string raw_tx_hex = 9 [ json_name = "raw_tx_hex" ];
}
message GetTransactionsRequest {
}
@ -896,13 +899,7 @@ message SendToRouteRequest {
/// An optional hex-encoded payment hash to be used for the HTLC.
string payment_hash_string = 2;
/**
Deprecated. The set of routes that should be used to attempt to complete the
payment. The possibility to pass in multiple routes is deprecated and
instead the single route field below should be used in combination with the
streaming variant of SendToRoute.
*/
repeated Route routes = 3 [deprecated = true];
reserved 3;
/// Route that should be used to attempt to complete the payment.
Route route = 4;
@ -1162,7 +1159,7 @@ message Channel {
/// True if we were the ones that created the channel.
bool initiator = 18 [json_name = "initiator"];
/// A set of flags showing the current state of the cahnnel.
/// A set of flags showing the current state of the channel.
string chan_status_flags = 19 [json_name = "chan_status_flags"];
}
@ -1335,6 +1332,9 @@ message GetInfoResponse {
/// A list of active chains the node is connected to
repeated Chain chains = 16 [json_name = "chains"];
/// The color of the current node in hex code format
string color = 17 [json_name = "color"];
}
message Chain {
@ -1523,7 +1523,7 @@ message PendingChannelsResponse {
/// The balance in satoshis encumbered in this pending channel
int64 limbo_balance = 3 [ json_name = "limbo_balance" ];
/// The height at which funds can be sweeped into the wallet
/// The height at which funds can be swept into the wallet
uint32 maturity_height = 4 [ json_name = "maturity_height" ];
/*
@ -1606,11 +1606,7 @@ message QueryRoutesRequest {
/// The amount to send expressed in satoshis
int64 amt = 2;
/**
Deprecated. The max number of routes to return. In the future, QueryRoutes
will only return a single route.
*/
int32 num_routes = 3 [deprecated = true];
reserved 3;
/// An optional CLTV delta from the current height that should be used for the timelock of the final hop
int32 final_cltv_delta = 4;
@ -1698,7 +1694,7 @@ message Route {
/**
The sum of the fees paid at each hop within the final route. In the case
of a one-hop payment, this value will be zero as we don't need to pay a fee
it ourself.
to ourselves.
*/
int64 total_fees = 2 [json_name = "total_fees", deprecated = true];
@ -1730,6 +1726,9 @@ message Route {
message NodeInfoRequest {
/// The 33-byte hex-encoded compressed public of the target node
string pub_key = 1;
/// If true, will include all known channels associated with the node.
bool include_channels = 2;
}
message NodeInfo {
@ -1742,8 +1741,14 @@ message NodeInfo {
*/
LightningNode node = 1 [json_name = "node"];
/// The total number of channels for the node.
uint32 num_channels = 2 [json_name = "num_channels"];
/// The sum of all channels capacity for the node, denominated in satoshis.
int64 total_capacity = 3 [json_name = "total_capacity"];
/// A list of all public channels for the node.
repeated ChannelEdge channels = 4 [json_name = "channels"];
}
/**
@ -1864,6 +1869,7 @@ message NodeUpdate {
string identity_key = 2;
bytes global_features = 3;
string alias = 4;
string color = 5;
}
message ChannelEdgeUpdate {
/**
@ -2152,9 +2158,28 @@ message Payment {
/// The value of the payment in milli-satoshis
int64 value_msat = 8 [json_name = "value_msat"];
/// The optional payment request being fulfilled.
string payment_request = 9 [json_name = "payment_request"];
enum PaymentStatus {
UNKNOWN = 0;
IN_FLIGHT = 1;
SUCCEEDED = 2;
FAILED = 3;
}
// The status of the payment.
PaymentStatus status = 10 [json_name = "status"];
}
message ListPaymentsRequest {
/**
If true, then return payments that have not yet fully completed. This means
that pending payments, as well as failed payments will show up if this
field is set to True.
*/
bool include_incomplete = 1;
}
message ListPaymentsResponse {
@ -2298,7 +2323,7 @@ message ForwardingHistoryResponse {
}
message ExportChannelBackupRequest {
/// The target chanenl point to obtain a back up for.
/// The target channel point to obtain a back up for.
ChannelPoint chan_point = 1;
}
@ -2310,7 +2335,7 @@ message ChannelBackup {
/**
Is an encrypted single-chan backup. this can be passed to
RestoreChannelBackups, or the WalletUnlocker Innit and Unlock methods in
RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in
order to trigger the recovery protocol.
*/
bytes chan_backup = 2 [ json_name = "chan_backup" ];

View File

@ -52,6 +52,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :time_stamp, :int64, 6
optional :total_fees, :int64, 7
repeated :dest_addresses, :string, 8
optional :raw_tx_hex, :string, 9
end
add_message "lnrpc.GetTransactionsRequest" do
end
@ -85,7 +86,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.SendToRouteRequest" do
optional :payment_hash, :bytes, 1
optional :payment_hash_string, :string, 2
repeated :routes, :message, 3, "lnrpc.Route"
optional :route, :message, 4, "lnrpc.Route"
end
add_message "lnrpc.ChannelPoint" do
@ -273,6 +273,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :version, :string, 14
optional :num_inactive_channels, :uint32, 15
repeated :chains, :message, 16, "lnrpc.Chain"
optional :color, :string, 17
end
add_message "lnrpc.Chain" do
optional :chain, :string, 1
@ -406,7 +407,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "lnrpc.QueryRoutesRequest" do
optional :pub_key, :string, 1
optional :amt, :int64, 2
optional :num_routes, :int32, 3
optional :final_cltv_delta, :int32, 4
optional :fee_limit, :message, 5, "lnrpc.FeeLimit"
repeated :ignored_nodes, :bytes, 6
@ -440,11 +440,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end
add_message "lnrpc.NodeInfoRequest" do
optional :pub_key, :string, 1
optional :include_channels, :bool, 2
end
add_message "lnrpc.NodeInfo" do
optional :node, :message, 1, "lnrpc.LightningNode"
optional :num_channels, :uint32, 2
optional :total_capacity, :int64, 3
repeated :channels, :message, 4, "lnrpc.ChannelEdge"
end
add_message "lnrpc.LightningNode" do
optional :last_update, :uint32, 1
@ -515,6 +517,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :identity_key, :string, 2
optional :global_features, :bytes, 3
optional :alias, :string, 4
optional :color, :string, 5
end
add_message "lnrpc.ChannelEdgeUpdate" do
optional :chan_id, :uint64, 1
@ -602,8 +605,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :payment_preimage, :string, 6
optional :value_sat, :int64, 7
optional :value_msat, :int64, 8
optional :payment_request, :string, 9
optional :status, :enum, 10, "lnrpc.Payment.PaymentStatus"
end
add_enum "lnrpc.Payment.PaymentStatus" do
value :UNKNOWN, 0
value :IN_FLIGHT, 1
value :SUCCEEDED, 2
value :FAILED, 3
end
add_message "lnrpc.ListPaymentsRequest" do
optional :include_incomplete, :bool, 1
end
add_message "lnrpc.ListPaymentsResponse" do
repeated :payments, :message, 1, "lnrpc.Payment"
@ -832,6 +844,7 @@ module Lnrpc
ListInvoiceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceResponse").msgclass
InvoiceSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceSubscription").msgclass
Payment = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Payment").msgclass
Payment::PaymentStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Payment.PaymentStatus").enummodule
ListPaymentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsRequest").msgclass
ListPaymentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsResponse").msgclass
DeleteAllPaymentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsRequest").msgclass

View File

@ -287,7 +287,7 @@ module Lnrpc
# * lncli: `queryroutes`
# QueryRoutes attempts to query the daemon's Channel Router for a possible
# route to a target destination capable of carrying a specific amount of
# satoshis. The retuned route contains the full details required to craft and
# satoshis. The returned route contains the full details required to craft and
# send an HTLC, also including the necessary information that should be
# present within the Sphinx packet encapsulated within the HTLC.
rpc :QueryRoutes, QueryRoutesRequest, QueryRoutesResponse

View File

@ -1,3 +1,3 @@
module Lnrpc
VERSION = "0.6.1"
VERSION = "0.7.0"
end