mirror of
https://github.com/bumi/lnrpc
synced 2026-02-20 09:27:50 +00:00
Compare commits
8 Commits
v0.7.0-bet
...
v0.8.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
| f219a4f254 | |||
| ebc8dc7b37 | |||
| 3e622ebb54 | |||
| ac284d3e06 | |||
| bdcc1d008d | |||
| 1b0a8a7df2 | |||
| 809f80a8ed | |||
| 83d71fae31 |
30
Gemfile.lock
30
Gemfile.lock
@@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
lnrpc (0.7.0)
|
lnrpc (0.8.0.beta)
|
||||||
google-protobuf (>= 3.7)
|
google-protobuf (>= 3.7)
|
||||||
grpc (>= 1.19.0)
|
grpc (>= 1.19.0)
|
||||||
|
|
||||||
@@ -9,26 +9,26 @@ GEM
|
|||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
diff-lcs (1.3)
|
diff-lcs (1.3)
|
||||||
google-protobuf (3.8.0)
|
google-protobuf (3.9.2)
|
||||||
googleapis-common-protos-types (1.0.4)
|
googleapis-common-protos-types (1.0.4)
|
||||||
google-protobuf (~> 3.0)
|
google-protobuf (~> 3.0)
|
||||||
grpc (1.21.0)
|
grpc (1.24.0)
|
||||||
google-protobuf (~> 3.7)
|
google-protobuf (~> 3.8)
|
||||||
googleapis-common-protos-types (~> 1.0)
|
googleapis-common-protos-types (~> 1.0)
|
||||||
rake (10.5.0)
|
rake (10.5.0)
|
||||||
rspec (3.8.0)
|
rspec (3.9.0)
|
||||||
rspec-core (~> 3.8.0)
|
rspec-core (~> 3.9.0)
|
||||||
rspec-expectations (~> 3.8.0)
|
rspec-expectations (~> 3.9.0)
|
||||||
rspec-mocks (~> 3.8.0)
|
rspec-mocks (~> 3.9.0)
|
||||||
rspec-core (3.8.2)
|
rspec-core (3.9.0)
|
||||||
rspec-support (~> 3.8.0)
|
rspec-support (~> 3.9.0)
|
||||||
rspec-expectations (3.8.4)
|
rspec-expectations (3.9.0)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.8.0)
|
rspec-support (~> 3.9.0)
|
||||||
rspec-mocks (3.8.1)
|
rspec-mocks (3.9.0)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.8.0)
|
rspec-support (~> 3.9.0)
|
||||||
rspec-support (3.8.2)
|
rspec-support (3.9.0)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ a [gRPC](https://grpc.io/) client for [LND, the Lightning Network Daemon](https:
|
|||||||
Add this line to your application's Gemfile:
|
Add this line to your application's Gemfile:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
gem 'lnrpc', '~> 0.6.1'
|
gem 'lnrpc', '~> 0.7.0'
|
||||||
```
|
```
|
||||||
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)).
|
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)).
|
||||||
|
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ service Lightning {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/** lncli: `subscribechannelevents`
|
/**
|
||||||
SubscribeChannelEvents creates a uni-directional stream from the server to
|
SubscribeChannelEvents creates a uni-directional stream from the server to
|
||||||
the client in which any updates relevant to the state of the channels are
|
the client in which any updates relevant to the state of the channels are
|
||||||
sent over. Events include new active channels, inactive channels, and closed
|
sent over. Events include new active channels, inactive channels, and closed
|
||||||
@@ -430,6 +430,15 @@ service Lightning {
|
|||||||
*/
|
*/
|
||||||
rpc OpenChannel (OpenChannelRequest) returns (stream OpenStatusUpdate);
|
rpc OpenChannel (OpenChannelRequest) returns (stream OpenStatusUpdate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
ChannelAcceptor dispatches a bi-directional streaming RPC in which
|
||||||
|
OpenChannel requests are sent to the client and the client responds with
|
||||||
|
a boolean that tells LND whether or not to accept the channel. This allows
|
||||||
|
node operators to specify their own criteria for accepting inbound channels
|
||||||
|
through a single persistent connection.
|
||||||
|
*/
|
||||||
|
rpc ChannelAcceptor (stream ChannelAcceptResponse) returns (stream ChannelAcceptRequest);
|
||||||
|
|
||||||
/** lncli: `closechannel`
|
/** lncli: `closechannel`
|
||||||
CloseChannel attempts to close an active channel identified by its channel
|
CloseChannel attempts to close an active channel identified by its channel
|
||||||
outpoint (ChannelPoint). The actions of this method can additionally be
|
outpoint (ChannelPoint). The actions of this method can additionally be
|
||||||
@@ -879,10 +888,18 @@ message SendRequest {
|
|||||||
uint64 outgoing_chan_id = 9;
|
uint64 outgoing_chan_id = 9;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
An optional maximum total time lock for the route. If zero, there is no
|
An optional maximum total time lock for the route. This should not exceed
|
||||||
maximum enforced.
|
lnd's `--max-cltv-expiry` setting. If zero, then the value of
|
||||||
|
`--max-cltv-expiry` is enforced.
|
||||||
*/
|
*/
|
||||||
uint32 cltv_limit = 10;
|
uint32 cltv_limit = 10;
|
||||||
|
|
||||||
|
/**
|
||||||
|
An optional field that can be used to pass an arbitrary set of TLV records
|
||||||
|
to a peer which understands the new records. This can be used to pass
|
||||||
|
application specific data during the payment attempt.
|
||||||
|
*/
|
||||||
|
map<uint64, bytes> dest_tlv = 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SendResponse {
|
message SendResponse {
|
||||||
@@ -905,6 +922,58 @@ message SendToRouteRequest {
|
|||||||
Route route = 4;
|
Route route = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message ChannelAcceptRequest {
|
||||||
|
/// The pubkey of the node that wishes to open an inbound channel.
|
||||||
|
bytes node_pubkey = 1;
|
||||||
|
|
||||||
|
/// The hash of the genesis block that the proposed channel resides in.
|
||||||
|
bytes chain_hash = 2;
|
||||||
|
|
||||||
|
/// The pending channel id.
|
||||||
|
bytes pending_chan_id = 3;
|
||||||
|
|
||||||
|
/// The funding amount in satoshis that initiator wishes to use in the channel.
|
||||||
|
uint64 funding_amt = 4;
|
||||||
|
|
||||||
|
/// The push amount of the proposed channel in millisatoshis.
|
||||||
|
uint64 push_amt = 5;
|
||||||
|
|
||||||
|
/// The dust limit of the initiator's commitment tx.
|
||||||
|
uint64 dust_limit = 6;
|
||||||
|
|
||||||
|
/// The maximum amount of coins in millisatoshis that can be pending in this channel.
|
||||||
|
uint64 max_value_in_flight = 7;
|
||||||
|
|
||||||
|
/// The minimum amount of satoshis the initiator requires us to have at all times.
|
||||||
|
uint64 channel_reserve = 8;
|
||||||
|
|
||||||
|
/// The smallest HTLC in millisatoshis that the initiator will accept.
|
||||||
|
uint64 min_htlc = 9;
|
||||||
|
|
||||||
|
/// The initial fee rate that the initiator suggests for both commitment transactions.
|
||||||
|
uint64 fee_per_kw = 10;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The number of blocks to use for the relative time lock in the pay-to-self output
|
||||||
|
of both commitment transactions.
|
||||||
|
*/
|
||||||
|
uint32 csv_delay = 11;
|
||||||
|
|
||||||
|
/// The total number of incoming HTLC's that the initiator will accept.
|
||||||
|
uint32 max_accepted_htlcs = 12;
|
||||||
|
|
||||||
|
/// A bit-field which the initiator uses to specify proposed channel behavior.
|
||||||
|
uint32 channel_flags = 13;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ChannelAcceptResponse {
|
||||||
|
/// Whether or not the client accepts the channel.
|
||||||
|
bool accept = 1;
|
||||||
|
|
||||||
|
/// The pending channel id to which this response applies.
|
||||||
|
bytes pending_chan_id = 2;
|
||||||
|
}
|
||||||
|
|
||||||
message ChannelPoint {
|
message ChannelPoint {
|
||||||
oneof funding_txid {
|
oneof funding_txid {
|
||||||
/// Txid of the funding transaction
|
/// Txid of the funding transaction
|
||||||
@@ -1161,6 +1230,22 @@ message Channel {
|
|||||||
|
|
||||||
/// A set of flags showing the current state of the channel.
|
/// A set of flags showing the current state of the channel.
|
||||||
string chan_status_flags = 19 [json_name = "chan_status_flags"];
|
string chan_status_flags = 19 [json_name = "chan_status_flags"];
|
||||||
|
|
||||||
|
/// The minimum satoshis this node is required to reserve in its balance.
|
||||||
|
int64 local_chan_reserve_sat = 20 [json_name = "local_chan_reserve_sat"];
|
||||||
|
|
||||||
|
/**
|
||||||
|
The minimum satoshis the other node is required to reserve in its balance.
|
||||||
|
*/
|
||||||
|
int64 remote_chan_reserve_sat = 21 [json_name = "remote_chan_reserve_sat"];
|
||||||
|
|
||||||
|
/**
|
||||||
|
If true, then this channel uses the modern commitment format where the key
|
||||||
|
in the output of the remote party does not change each state. This makes
|
||||||
|
back up and recovery easier as when the channel is closed, the funds go
|
||||||
|
directly to that key.
|
||||||
|
*/
|
||||||
|
bool static_remote_key = 22 [json_name = "static_remote_key"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1335,6 +1420,9 @@ message GetInfoResponse {
|
|||||||
|
|
||||||
/// The color of the current node in hex code format
|
/// The color of the current node in hex code format
|
||||||
string color = 17 [json_name = "color"];
|
string color = 17 [json_name = "color"];
|
||||||
|
|
||||||
|
// Whether we consider ourselves synced with the public channel graph.
|
||||||
|
bool synced_to_graph = 18 [json_name = "synced_to_graph"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message Chain {
|
message Chain {
|
||||||
@@ -1468,6 +1556,15 @@ message PendingChannelsResponse {
|
|||||||
|
|
||||||
int64 local_balance = 4 [ json_name = "local_balance" ];
|
int64 local_balance = 4 [ json_name = "local_balance" ];
|
||||||
int64 remote_balance = 5 [ json_name = "remote_balance" ];
|
int64 remote_balance = 5 [ json_name = "remote_balance" ];
|
||||||
|
|
||||||
|
/// The minimum satoshis this node is required to reserve in its balance.
|
||||||
|
int64 local_chan_reserve_sat = 6 [json_name = "local_chan_reserve_sat"];
|
||||||
|
|
||||||
|
/**
|
||||||
|
The minimum satoshis the other node is required to reserve in its
|
||||||
|
balance.
|
||||||
|
*/
|
||||||
|
int64 remote_chan_reserve_sat = 7 [json_name = "remote_chan_reserve_sat"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message PendingOpenChannel {
|
message PendingOpenChannel {
|
||||||
@@ -1625,15 +1722,41 @@ message QueryRoutesRequest {
|
|||||||
repeated bytes ignored_nodes = 6;
|
repeated bytes ignored_nodes = 6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A list of edges to ignore during path finding.
|
Deprecated. A list of edges to ignore during path finding.
|
||||||
*/
|
*/
|
||||||
repeated EdgeLocator ignored_edges = 7;
|
repeated EdgeLocator ignored_edges = 7 [deprecated = true];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The source node where the request route should originated from. If empty,
|
The source node where the request route should originated from. If empty,
|
||||||
self is assumed.
|
self is assumed.
|
||||||
*/
|
*/
|
||||||
string source_pub_key = 8;
|
string source_pub_key = 8;
|
||||||
|
|
||||||
|
/**
|
||||||
|
If set to true, edge probabilities from mission control will be used to get
|
||||||
|
the optimal route.
|
||||||
|
*/
|
||||||
|
bool use_mission_control = 9;
|
||||||
|
|
||||||
|
/**
|
||||||
|
A list of directed node pairs that will be ignored during path finding.
|
||||||
|
*/
|
||||||
|
repeated NodePair ignored_pairs = 10;
|
||||||
|
|
||||||
|
/**
|
||||||
|
An optional maximum total time lock for the route. If the source is empty or
|
||||||
|
ourselves, this should not exceed lnd's `--max-cltv-expiry` setting. If
|
||||||
|
zero, then the value of `--max-cltv-expiry` is used as the limit.
|
||||||
|
*/
|
||||||
|
uint32 cltv_limit = 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
message NodePair {
|
||||||
|
/// The sending node of the pair.
|
||||||
|
bytes from = 1;
|
||||||
|
|
||||||
|
/// The receiving node of the pair.
|
||||||
|
bytes to = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message EdgeLocator {
|
message EdgeLocator {
|
||||||
@@ -1650,7 +1773,17 @@ message EdgeLocator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message QueryRoutesResponse {
|
message QueryRoutesResponse {
|
||||||
|
/**
|
||||||
|
The route that results from the path finding operation. This is still a
|
||||||
|
repeated field to retain backwards compatibility.
|
||||||
|
*/
|
||||||
repeated Route routes = 1 [json_name = "routes"];
|
repeated Route routes = 1 [json_name = "routes"];
|
||||||
|
|
||||||
|
/**
|
||||||
|
The success probability of the returned route based on the current mission
|
||||||
|
control state. [EXPERIMENTAL]
|
||||||
|
*/
|
||||||
|
double success_prob = 2 [json_name = "success_prob"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message Hop {
|
message Hop {
|
||||||
@@ -1672,6 +1805,12 @@ message Hop {
|
|||||||
can be executed without relying on a copy of the channel graph.
|
can be executed without relying on a copy of the channel graph.
|
||||||
*/
|
*/
|
||||||
string pub_key = 8 [json_name = "pub_key"];
|
string pub_key = 8 [json_name = "pub_key"];
|
||||||
|
|
||||||
|
/**
|
||||||
|
If set to true, then this hop will be encoded using the new variable length
|
||||||
|
TLV format.
|
||||||
|
*/
|
||||||
|
bool tlv_payload = 9 [json_name = "tlv_payload"];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1777,6 +1916,7 @@ message RoutingPolicy {
|
|||||||
int64 fee_rate_milli_msat = 4 [json_name = "fee_rate_milli_msat"];
|
int64 fee_rate_milli_msat = 4 [json_name = "fee_rate_milli_msat"];
|
||||||
bool disabled = 5 [json_name = "disabled"];
|
bool disabled = 5 [json_name = "disabled"];
|
||||||
uint64 max_htlc_msat = 6 [json_name = "max_htlc_msat"];
|
uint64 max_htlc_msat = 6 [json_name = "max_htlc_msat"];
|
||||||
|
uint32 last_update = 7 [json_name = "last_update"];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1796,7 +1936,7 @@ message ChannelEdge {
|
|||||||
uint64 channel_id = 1 [json_name = "channel_id"];
|
uint64 channel_id = 1 [json_name = "channel_id"];
|
||||||
string chan_point = 2 [json_name = "chan_point"];
|
string chan_point = 2 [json_name = "chan_point"];
|
||||||
|
|
||||||
uint32 last_update = 3 [json_name = "last_update"];
|
uint32 last_update = 3 [json_name = "last_update", deprecated = true];
|
||||||
|
|
||||||
string node1_pub = 4 [json_name = "node1_pub"];
|
string node1_pub = 4 [json_name = "node1_pub"];
|
||||||
string node2_pub = 5 [json_name = "node2_pub"];
|
string node2_pub = 5 [json_name = "node2_pub"];
|
||||||
@@ -1851,6 +1991,9 @@ message NetworkInfo {
|
|||||||
int64 max_channel_size = 9 [json_name = "max_channel_size"];
|
int64 max_channel_size = 9 [json_name = "max_channel_size"];
|
||||||
int64 median_channel_size_sat = 10 [json_name = "median_channel_size_sat"];
|
int64 median_channel_size_sat = 10 [json_name = "median_channel_size_sat"];
|
||||||
|
|
||||||
|
// The number of edges marked as zombies.
|
||||||
|
uint64 num_zombie_chans = 11 [json_name = "num_zombie_chans"];
|
||||||
|
|
||||||
// TODO(roasbeef): fee rate info, expiry
|
// TODO(roasbeef): fee rate info, expiry
|
||||||
// * also additional RPC for tracking fee info once in
|
// * also additional RPC for tracking fee info once in
|
||||||
}
|
}
|
||||||
@@ -2045,6 +2188,42 @@ message Invoice {
|
|||||||
The state the invoice is in.
|
The state the invoice is in.
|
||||||
*/
|
*/
|
||||||
InvoiceState state = 21 [json_name = "state"];
|
InvoiceState state = 21 [json_name = "state"];
|
||||||
|
|
||||||
|
/// List of HTLCs paying to this invoice [EXPERIMENTAL].
|
||||||
|
repeated InvoiceHTLC htlcs = 22 [json_name = "htlcs"];
|
||||||
|
}
|
||||||
|
|
||||||
|
enum InvoiceHTLCState {
|
||||||
|
ACCEPTED = 0;
|
||||||
|
SETTLED = 1;
|
||||||
|
CANCELED = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Details of an HTLC that paid to an invoice
|
||||||
|
message InvoiceHTLC {
|
||||||
|
/// Short channel id over which the htlc was received.
|
||||||
|
uint64 chan_id = 1 [json_name = "chan_id"];
|
||||||
|
|
||||||
|
/// Index identifying the htlc on the channel.
|
||||||
|
uint64 htlc_index = 2 [json_name = "htlc_index"];
|
||||||
|
|
||||||
|
/// The amount of the htlc in msat.
|
||||||
|
uint64 amt_msat = 3 [json_name = "amt_msat"];
|
||||||
|
|
||||||
|
/// Block height at which this htlc was accepted.
|
||||||
|
int32 accept_height = 4 [json_name = "accept_height"];
|
||||||
|
|
||||||
|
/// Time at which this htlc was accepted.
|
||||||
|
int64 accept_time = 5 [json_name = "accept_time"];
|
||||||
|
|
||||||
|
/// Time at which this htlc was settled or canceled.
|
||||||
|
int64 resolve_time = 6 [json_name = "resolve_time"];
|
||||||
|
|
||||||
|
/// Block height at which this htlc expires.
|
||||||
|
int32 expiry_height = 7 [json_name = "expiry_height"];
|
||||||
|
|
||||||
|
/// Current state the htlc is in.
|
||||||
|
InvoiceHTLCState state = 8 [json_name = "state"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message AddInvoiceResponse {
|
message AddInvoiceResponse {
|
||||||
@@ -2147,8 +2326,8 @@ message Payment {
|
|||||||
/// The path this payment took
|
/// The path this payment took
|
||||||
repeated string path = 4 [ json_name = "path" ];
|
repeated string path = 4 [ json_name = "path" ];
|
||||||
|
|
||||||
/// The fee paid for this payment in satoshis
|
/// Deprecated, use fee_sat or fee_msat.
|
||||||
int64 fee = 5 [json_name = "fee"];
|
int64 fee = 5 [json_name = "fee", deprecated = true];
|
||||||
|
|
||||||
/// The payment preimage
|
/// The payment preimage
|
||||||
string payment_preimage = 6 [json_name = "payment_preimage"];
|
string payment_preimage = 6 [json_name = "payment_preimage"];
|
||||||
@@ -2171,6 +2350,12 @@ message Payment {
|
|||||||
|
|
||||||
// The status of the payment.
|
// The status of the payment.
|
||||||
PaymentStatus status = 10 [json_name = "status"];
|
PaymentStatus status = 10 [json_name = "status"];
|
||||||
|
|
||||||
|
/// The fee paid for this payment in satoshis
|
||||||
|
int64 fee_sat = 11 [json_name = "fee_sat"];
|
||||||
|
|
||||||
|
/// The fee paid for this payment in milli-satoshis
|
||||||
|
int64 fee_msat = 12 [json_name = "fee_msat"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message ListPaymentsRequest {
|
message ListPaymentsRequest {
|
||||||
@@ -2271,6 +2456,9 @@ message PolicyUpdateRequest {
|
|||||||
|
|
||||||
/// The required timelock delta for HTLCs forwarded over the channel.
|
/// The required timelock delta for HTLCs forwarded over the channel.
|
||||||
uint32 time_lock_delta = 5 [json_name = "time_lock_delta"];
|
uint32 time_lock_delta = 5 [json_name = "time_lock_delta"];
|
||||||
|
|
||||||
|
/// If set, the maximum HTLC size in milli-satoshis. If unset, the maximum HTLC will be unchanged.
|
||||||
|
uint64 max_htlc_msat = 6 [json_name = "max_htlc_msat"];
|
||||||
}
|
}
|
||||||
message PolicyUpdateResponse {
|
message PolicyUpdateResponse {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :fee_limit, :message, 8, "lnrpc.FeeLimit"
|
optional :fee_limit, :message, 8, "lnrpc.FeeLimit"
|
||||||
optional :outgoing_chan_id, :uint64, 9
|
optional :outgoing_chan_id, :uint64, 9
|
||||||
optional :cltv_limit, :uint32, 10
|
optional :cltv_limit, :uint32, 10
|
||||||
|
map :dest_tlv, :uint64, :bytes, 11
|
||||||
end
|
end
|
||||||
add_message "lnrpc.SendResponse" do
|
add_message "lnrpc.SendResponse" do
|
||||||
optional :payment_error, :string, 1
|
optional :payment_error, :string, 1
|
||||||
@@ -88,6 +89,25 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :payment_hash_string, :string, 2
|
optional :payment_hash_string, :string, 2
|
||||||
optional :route, :message, 4, "lnrpc.Route"
|
optional :route, :message, 4, "lnrpc.Route"
|
||||||
end
|
end
|
||||||
|
add_message "lnrpc.ChannelAcceptRequest" do
|
||||||
|
optional :node_pubkey, :bytes, 1
|
||||||
|
optional :chain_hash, :bytes, 2
|
||||||
|
optional :pending_chan_id, :bytes, 3
|
||||||
|
optional :funding_amt, :uint64, 4
|
||||||
|
optional :push_amt, :uint64, 5
|
||||||
|
optional :dust_limit, :uint64, 6
|
||||||
|
optional :max_value_in_flight, :uint64, 7
|
||||||
|
optional :channel_reserve, :uint64, 8
|
||||||
|
optional :min_htlc, :uint64, 9
|
||||||
|
optional :fee_per_kw, :uint64, 10
|
||||||
|
optional :csv_delay, :uint32, 11
|
||||||
|
optional :max_accepted_htlcs, :uint32, 12
|
||||||
|
optional :channel_flags, :uint32, 13
|
||||||
|
end
|
||||||
|
add_message "lnrpc.ChannelAcceptResponse" do
|
||||||
|
optional :accept, :bool, 1
|
||||||
|
optional :pending_chan_id, :bytes, 2
|
||||||
|
end
|
||||||
add_message "lnrpc.ChannelPoint" do
|
add_message "lnrpc.ChannelPoint" do
|
||||||
optional :output_index, :uint32, 3
|
optional :output_index, :uint32, 3
|
||||||
oneof :funding_txid do
|
oneof :funding_txid do
|
||||||
@@ -194,6 +214,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :private, :bool, 17
|
optional :private, :bool, 17
|
||||||
optional :initiator, :bool, 18
|
optional :initiator, :bool, 18
|
||||||
optional :chan_status_flags, :string, 19
|
optional :chan_status_flags, :string, 19
|
||||||
|
optional :local_chan_reserve_sat, :int64, 20
|
||||||
|
optional :remote_chan_reserve_sat, :int64, 21
|
||||||
|
optional :static_remote_key, :bool, 22
|
||||||
end
|
end
|
||||||
add_message "lnrpc.ListChannelsRequest" do
|
add_message "lnrpc.ListChannelsRequest" do
|
||||||
optional :active_only, :bool, 1
|
optional :active_only, :bool, 1
|
||||||
@@ -274,6 +297,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :num_inactive_channels, :uint32, 15
|
optional :num_inactive_channels, :uint32, 15
|
||||||
repeated :chains, :message, 16, "lnrpc.Chain"
|
repeated :chains, :message, 16, "lnrpc.Chain"
|
||||||
optional :color, :string, 17
|
optional :color, :string, 17
|
||||||
|
optional :synced_to_graph, :bool, 18
|
||||||
end
|
end
|
||||||
add_message "lnrpc.Chain" do
|
add_message "lnrpc.Chain" do
|
||||||
optional :chain, :string, 1
|
optional :chain, :string, 1
|
||||||
@@ -349,6 +373,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :capacity, :int64, 3
|
optional :capacity, :int64, 3
|
||||||
optional :local_balance, :int64, 4
|
optional :local_balance, :int64, 4
|
||||||
optional :remote_balance, :int64, 5
|
optional :remote_balance, :int64, 5
|
||||||
|
optional :local_chan_reserve_sat, :int64, 6
|
||||||
|
optional :remote_chan_reserve_sat, :int64, 7
|
||||||
end
|
end
|
||||||
add_message "lnrpc.PendingChannelsResponse.PendingOpenChannel" do
|
add_message "lnrpc.PendingChannelsResponse.PendingOpenChannel" do
|
||||||
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
|
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
|
||||||
@@ -412,6 +438,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
repeated :ignored_nodes, :bytes, 6
|
repeated :ignored_nodes, :bytes, 6
|
||||||
repeated :ignored_edges, :message, 7, "lnrpc.EdgeLocator"
|
repeated :ignored_edges, :message, 7, "lnrpc.EdgeLocator"
|
||||||
optional :source_pub_key, :string, 8
|
optional :source_pub_key, :string, 8
|
||||||
|
optional :use_mission_control, :bool, 9
|
||||||
|
repeated :ignored_pairs, :message, 10, "lnrpc.NodePair"
|
||||||
|
optional :cltv_limit, :uint32, 11
|
||||||
|
end
|
||||||
|
add_message "lnrpc.NodePair" do
|
||||||
|
optional :from, :bytes, 1
|
||||||
|
optional :to, :bytes, 2
|
||||||
end
|
end
|
||||||
add_message "lnrpc.EdgeLocator" do
|
add_message "lnrpc.EdgeLocator" do
|
||||||
optional :channel_id, :uint64, 1
|
optional :channel_id, :uint64, 1
|
||||||
@@ -419,6 +452,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
end
|
end
|
||||||
add_message "lnrpc.QueryRoutesResponse" do
|
add_message "lnrpc.QueryRoutesResponse" do
|
||||||
repeated :routes, :message, 1, "lnrpc.Route"
|
repeated :routes, :message, 1, "lnrpc.Route"
|
||||||
|
optional :success_prob, :double, 2
|
||||||
end
|
end
|
||||||
add_message "lnrpc.Hop" do
|
add_message "lnrpc.Hop" do
|
||||||
optional :chan_id, :uint64, 1
|
optional :chan_id, :uint64, 1
|
||||||
@@ -429,6 +463,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :amt_to_forward_msat, :int64, 6
|
optional :amt_to_forward_msat, :int64, 6
|
||||||
optional :fee_msat, :int64, 7
|
optional :fee_msat, :int64, 7
|
||||||
optional :pub_key, :string, 8
|
optional :pub_key, :string, 8
|
||||||
|
optional :tlv_payload, :bool, 9
|
||||||
end
|
end
|
||||||
add_message "lnrpc.Route" do
|
add_message "lnrpc.Route" do
|
||||||
optional :total_time_lock, :uint32, 1
|
optional :total_time_lock, :uint32, 1
|
||||||
@@ -466,6 +501,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :fee_rate_milli_msat, :int64, 4
|
optional :fee_rate_milli_msat, :int64, 4
|
||||||
optional :disabled, :bool, 5
|
optional :disabled, :bool, 5
|
||||||
optional :max_htlc_msat, :uint64, 6
|
optional :max_htlc_msat, :uint64, 6
|
||||||
|
optional :last_update, :uint32, 7
|
||||||
end
|
end
|
||||||
add_message "lnrpc.ChannelEdge" do
|
add_message "lnrpc.ChannelEdge" do
|
||||||
optional :channel_id, :uint64, 1
|
optional :channel_id, :uint64, 1
|
||||||
@@ -500,6 +536,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :min_channel_size, :int64, 8
|
optional :min_channel_size, :int64, 8
|
||||||
optional :max_channel_size, :int64, 9
|
optional :max_channel_size, :int64, 9
|
||||||
optional :median_channel_size_sat, :int64, 10
|
optional :median_channel_size_sat, :int64, 10
|
||||||
|
optional :num_zombie_chans, :uint64, 11
|
||||||
end
|
end
|
||||||
add_message "lnrpc.StopRequest" do
|
add_message "lnrpc.StopRequest" do
|
||||||
end
|
end
|
||||||
@@ -565,6 +602,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :amt_paid_sat, :int64, 19
|
optional :amt_paid_sat, :int64, 19
|
||||||
optional :amt_paid_msat, :int64, 20
|
optional :amt_paid_msat, :int64, 20
|
||||||
optional :state, :enum, 21, "lnrpc.Invoice.InvoiceState"
|
optional :state, :enum, 21, "lnrpc.Invoice.InvoiceState"
|
||||||
|
repeated :htlcs, :message, 22, "lnrpc.InvoiceHTLC"
|
||||||
end
|
end
|
||||||
add_enum "lnrpc.Invoice.InvoiceState" do
|
add_enum "lnrpc.Invoice.InvoiceState" do
|
||||||
value :OPEN, 0
|
value :OPEN, 0
|
||||||
@@ -572,6 +610,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
value :CANCELED, 2
|
value :CANCELED, 2
|
||||||
value :ACCEPTED, 3
|
value :ACCEPTED, 3
|
||||||
end
|
end
|
||||||
|
add_message "lnrpc.InvoiceHTLC" do
|
||||||
|
optional :chan_id, :uint64, 1
|
||||||
|
optional :htlc_index, :uint64, 2
|
||||||
|
optional :amt_msat, :uint64, 3
|
||||||
|
optional :accept_height, :int32, 4
|
||||||
|
optional :accept_time, :int64, 5
|
||||||
|
optional :resolve_time, :int64, 6
|
||||||
|
optional :expiry_height, :int32, 7
|
||||||
|
optional :state, :enum, 8, "lnrpc.InvoiceHTLCState"
|
||||||
|
end
|
||||||
add_message "lnrpc.AddInvoiceResponse" do
|
add_message "lnrpc.AddInvoiceResponse" do
|
||||||
optional :r_hash, :bytes, 1
|
optional :r_hash, :bytes, 1
|
||||||
optional :payment_request, :string, 2
|
optional :payment_request, :string, 2
|
||||||
@@ -607,6 +655,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :value_msat, :int64, 8
|
optional :value_msat, :int64, 8
|
||||||
optional :payment_request, :string, 9
|
optional :payment_request, :string, 9
|
||||||
optional :status, :enum, 10, "lnrpc.Payment.PaymentStatus"
|
optional :status, :enum, 10, "lnrpc.Payment.PaymentStatus"
|
||||||
|
optional :fee_sat, :int64, 11
|
||||||
|
optional :fee_msat, :int64, 12
|
||||||
end
|
end
|
||||||
add_enum "lnrpc.Payment.PaymentStatus" do
|
add_enum "lnrpc.Payment.PaymentStatus" do
|
||||||
value :UNKNOWN, 0
|
value :UNKNOWN, 0
|
||||||
@@ -669,6 +719,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :base_fee_msat, :int64, 3
|
optional :base_fee_msat, :int64, 3
|
||||||
optional :fee_rate, :double, 4
|
optional :fee_rate, :double, 4
|
||||||
optional :time_lock_delta, :uint32, 5
|
optional :time_lock_delta, :uint32, 5
|
||||||
|
optional :max_htlc_msat, :uint64, 6
|
||||||
oneof :scope do
|
oneof :scope do
|
||||||
optional :global, :bool, 1
|
optional :global, :bool, 1
|
||||||
optional :chan_point, :message, 2, "lnrpc.ChannelPoint"
|
optional :chan_point, :message, 2, "lnrpc.ChannelPoint"
|
||||||
@@ -733,6 +784,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
value :UNUSED_WITNESS_PUBKEY_HASH, 2
|
value :UNUSED_WITNESS_PUBKEY_HASH, 2
|
||||||
value :UNUSED_NESTED_PUBKEY_HASH, 3
|
value :UNUSED_NESTED_PUBKEY_HASH, 3
|
||||||
end
|
end
|
||||||
|
add_enum "lnrpc.InvoiceHTLCState" do
|
||||||
|
value :ACCEPTED, 0
|
||||||
|
value :SETTLED, 1
|
||||||
|
value :CANCELED, 2
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
module Lnrpc
|
module Lnrpc
|
||||||
@@ -752,6 +808,8 @@ module Lnrpc
|
|||||||
SendRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendRequest").msgclass
|
SendRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendRequest").msgclass
|
||||||
SendResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendResponse").msgclass
|
SendResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendResponse").msgclass
|
||||||
SendToRouteRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendToRouteRequest").msgclass
|
SendToRouteRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendToRouteRequest").msgclass
|
||||||
|
ChannelAcceptRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelAcceptRequest").msgclass
|
||||||
|
ChannelAcceptResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelAcceptResponse").msgclass
|
||||||
ChannelPoint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelPoint").msgclass
|
ChannelPoint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelPoint").msgclass
|
||||||
OutPoint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OutPoint").msgclass
|
OutPoint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OutPoint").msgclass
|
||||||
LightningAddress = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.LightningAddress").msgclass
|
LightningAddress = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.LightningAddress").msgclass
|
||||||
@@ -812,6 +870,7 @@ module Lnrpc
|
|||||||
ChannelBalanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceRequest").msgclass
|
ChannelBalanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceRequest").msgclass
|
||||||
ChannelBalanceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceResponse").msgclass
|
ChannelBalanceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceResponse").msgclass
|
||||||
QueryRoutesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesRequest").msgclass
|
QueryRoutesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesRequest").msgclass
|
||||||
|
NodePair = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodePair").msgclass
|
||||||
EdgeLocator = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.EdgeLocator").msgclass
|
EdgeLocator = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.EdgeLocator").msgclass
|
||||||
QueryRoutesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesResponse").msgclass
|
QueryRoutesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesResponse").msgclass
|
||||||
Hop = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Hop").msgclass
|
Hop = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Hop").msgclass
|
||||||
@@ -838,6 +897,7 @@ module Lnrpc
|
|||||||
RouteHint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RouteHint").msgclass
|
RouteHint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RouteHint").msgclass
|
||||||
Invoice = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice").msgclass
|
Invoice = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice").msgclass
|
||||||
Invoice::InvoiceState = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice.InvoiceState").enummodule
|
Invoice::InvoiceState = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice.InvoiceState").enummodule
|
||||||
|
InvoiceHTLC = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLC").msgclass
|
||||||
AddInvoiceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddInvoiceResponse").msgclass
|
AddInvoiceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddInvoiceResponse").msgclass
|
||||||
PaymentHash = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentHash").msgclass
|
PaymentHash = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentHash").msgclass
|
||||||
ListInvoiceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceRequest").msgclass
|
ListInvoiceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceRequest").msgclass
|
||||||
@@ -874,4 +934,5 @@ module Lnrpc
|
|||||||
ChannelBackupSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBackupSubscription").msgclass
|
ChannelBackupSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBackupSubscription").msgclass
|
||||||
VerifyChanBackupResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.VerifyChanBackupResponse").msgclass
|
VerifyChanBackupResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.VerifyChanBackupResponse").msgclass
|
||||||
AddressType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddressType").enummodule
|
AddressType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddressType").enummodule
|
||||||
|
InvoiceHTLCState = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLCState").enummodule
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ module Lnrpc
|
|||||||
# ListChannels returns a description of all the open channels that this node
|
# ListChannels returns a description of all the open channels that this node
|
||||||
# is a participant in.
|
# is a participant in.
|
||||||
rpc :ListChannels, ListChannelsRequest, ListChannelsResponse
|
rpc :ListChannels, ListChannelsRequest, ListChannelsResponse
|
||||||
# * lncli: `subscribechannelevents`
|
# *
|
||||||
# SubscribeChannelEvents creates a uni-directional stream from the server to
|
# SubscribeChannelEvents creates a uni-directional stream from the server to
|
||||||
# the client in which any updates relevant to the state of the channels are
|
# the client in which any updates relevant to the state of the channels are
|
||||||
# sent over. Events include new active channels, inactive channels, and closed
|
# sent over. Events include new active channels, inactive channels, and closed
|
||||||
@@ -188,6 +188,13 @@ module Lnrpc
|
|||||||
# rate to us for the funding transaction. If neither are specified, then a
|
# rate to us for the funding transaction. If neither are specified, then a
|
||||||
# lax block confirmation target is used.
|
# lax block confirmation target is used.
|
||||||
rpc :OpenChannel, OpenChannelRequest, stream(OpenStatusUpdate)
|
rpc :OpenChannel, OpenChannelRequest, stream(OpenStatusUpdate)
|
||||||
|
# *
|
||||||
|
# ChannelAcceptor dispatches a bi-directional streaming RPC in which
|
||||||
|
# OpenChannel requests are sent to the client and the client responds with
|
||||||
|
# a boolean that tells LND whether or not to accept the channel. This allows
|
||||||
|
# node operators to specify their own criteria for accepting inbound channels
|
||||||
|
# through a single persistent connection.
|
||||||
|
rpc :ChannelAcceptor, stream(ChannelAcceptResponse), stream(ChannelAcceptRequest)
|
||||||
# * lncli: `closechannel`
|
# * lncli: `closechannel`
|
||||||
# CloseChannel attempts to close an active channel identified by its channel
|
# CloseChannel attempts to close an active channel identified by its channel
|
||||||
# outpoint (ChannelPoint). The actions of this method can additionally be
|
# outpoint (ChannelPoint). The actions of this method can additionally be
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module Lnrpc
|
module Lnrpc
|
||||||
VERSION = "0.7.0"
|
VERSION = "0.8.0.beta"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|||||||
spec.add_development_dependency "bundler", "~> 1.17"
|
spec.add_development_dependency "bundler", "~> 1.17"
|
||||||
spec.add_development_dependency "rake", "~> 10.0"
|
spec.add_development_dependency "rake", "~> 10.0"
|
||||||
spec.add_development_dependency "rspec", "~> 3.0"
|
spec.add_development_dependency "rspec", "~> 3.0"
|
||||||
|
|
||||||
spec.add_dependency "grpc", ">= 1.19.0"
|
spec.add_dependency "grpc", ">= 1.19.0"
|
||||||
spec.add_dependency "google-protobuf", ">=3.7"
|
spec.add_dependency "google-protobuf", ">=3.7"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user