mirror of
https://github.com/bumi/lnrpc
synced 2026-02-20 01:27:48 +00:00
Compare commits
9 Commits
v0.6.1-bet
...
v0.8.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
| f219a4f254 | |||
| ebc8dc7b37 | |||
| 3e622ebb54 | |||
| ac284d3e06 | |||
| bdcc1d008d | |||
| 1b0a8a7df2 | |||
| 809f80a8ed | |||
| 83d71fae31 | |||
| 26fc81e177 |
34
Gemfile.lock
34
Gemfile.lock
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
lnrpc (0.5.2)
|
||||
lnrpc (0.8.0.beta)
|
||||
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.9.2)
|
||||
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.24.0)
|
||||
google-protobuf (~> 3.8)
|
||||
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-support (~> 3.8.0)
|
||||
rspec-expectations (3.8.2)
|
||||
rspec (3.9.0)
|
||||
rspec-core (~> 3.9.0)
|
||||
rspec-expectations (~> 3.9.0)
|
||||
rspec-mocks (~> 3.9.0)
|
||||
rspec-core (3.9.0)
|
||||
rspec-support (~> 3.9.0)
|
||||
rspec-expectations (3.9.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-mocks (3.8.0)
|
||||
rspec-support (~> 3.9.0)
|
||||
rspec-mocks (3.9.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-support (3.8.0)
|
||||
rspec-support (~> 3.9.0)
|
||||
rspec-support (3.9.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# Lnrpc - ruby gRPC client for LND
|
||||
[](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
|
||||
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)).
|
||||
|
||||
|
||||
@@ -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) = {
|
||||
@@ -389,7 +389,7 @@ service Lightning {
|
||||
};
|
||||
}
|
||||
|
||||
/** lncli: `subscribechannelevents`
|
||||
/**
|
||||
SubscribeChannelEvents creates a uni-directional stream from the server to
|
||||
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
|
||||
@@ -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) {
|
||||
@@ -430,6 +430,15 @@ service Lightning {
|
||||
*/
|
||||
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`
|
||||
CloseChannel attempts to close an active channel identified by its channel
|
||||
outpoint (ChannelPoint). The actions of this method can additionally be
|
||||
@@ -621,7 +630,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 +823,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 {
|
||||
}
|
||||
@@ -876,10 +888,18 @@ message SendRequest {
|
||||
uint64 outgoing_chan_id = 9;
|
||||
|
||||
/**
|
||||
An optional maximum total time lock for the route. If zero, there is no
|
||||
maximum enforced.
|
||||
An optional maximum total time lock for the route. This should not exceed
|
||||
lnd's `--max-cltv-expiry` setting. If zero, then the value of
|
||||
`--max-cltv-expiry` is enforced.
|
||||
*/
|
||||
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 {
|
||||
@@ -896,18 +916,64 @@ 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;
|
||||
}
|
||||
|
||||
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 {
|
||||
oneof funding_txid {
|
||||
/// Txid of the funding transaction
|
||||
@@ -1162,8 +1228,24 @@ 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"];
|
||||
|
||||
/// 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 +1417,12 @@ 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"];
|
||||
|
||||
// Whether we consider ourselves synced with the public channel graph.
|
||||
bool synced_to_graph = 18 [json_name = "synced_to_graph"];
|
||||
}
|
||||
|
||||
message Chain {
|
||||
@@ -1468,6 +1556,15 @@ message PendingChannelsResponse {
|
||||
|
||||
int64 local_balance = 4 [ json_name = "local_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 {
|
||||
@@ -1523,7 +1620,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 +1703,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;
|
||||
@@ -1629,15 +1722,41 @@ message QueryRoutesRequest {
|
||||
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,
|
||||
self is assumed.
|
||||
*/
|
||||
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 {
|
||||
@@ -1654,7 +1773,17 @@ message EdgeLocator {
|
||||
}
|
||||
|
||||
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"];
|
||||
|
||||
/**
|
||||
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 {
|
||||
@@ -1676,6 +1805,12 @@ message Hop {
|
||||
can be executed without relying on a copy of the channel graph.
|
||||
*/
|
||||
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"];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1698,7 +1833,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 +1865,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 +1880,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"];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1772,6 +1916,7 @@ message RoutingPolicy {
|
||||
int64 fee_rate_milli_msat = 4 [json_name = "fee_rate_milli_msat"];
|
||||
bool disabled = 5 [json_name = "disabled"];
|
||||
uint64 max_htlc_msat = 6 [json_name = "max_htlc_msat"];
|
||||
uint32 last_update = 7 [json_name = "last_update"];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1791,7 +1936,7 @@ message ChannelEdge {
|
||||
uint64 channel_id = 1 [json_name = "channel_id"];
|
||||
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 node2_pub = 5 [json_name = "node2_pub"];
|
||||
@@ -1846,6 +1991,9 @@ message NetworkInfo {
|
||||
int64 max_channel_size = 9 [json_name = "max_channel_size"];
|
||||
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
|
||||
// * also additional RPC for tracking fee info once in
|
||||
}
|
||||
@@ -1864,6 +2012,7 @@ message NodeUpdate {
|
||||
string identity_key = 2;
|
||||
bytes global_features = 3;
|
||||
string alias = 4;
|
||||
string color = 5;
|
||||
}
|
||||
message ChannelEdgeUpdate {
|
||||
/**
|
||||
@@ -2039,6 +2188,42 @@ message Invoice {
|
||||
The state the invoice is in.
|
||||
*/
|
||||
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 {
|
||||
@@ -2141,8 +2326,8 @@ message Payment {
|
||||
/// The path this payment took
|
||||
repeated string path = 4 [ json_name = "path" ];
|
||||
|
||||
/// The fee paid for this payment in satoshis
|
||||
int64 fee = 5 [json_name = "fee"];
|
||||
/// Deprecated, use fee_sat or fee_msat.
|
||||
int64 fee = 5 [json_name = "fee", deprecated = true];
|
||||
|
||||
/// The payment preimage
|
||||
string payment_preimage = 6 [json_name = "payment_preimage"];
|
||||
@@ -2152,9 +2337,34 @@ 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"];
|
||||
|
||||
/// 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 {
|
||||
/**
|
||||
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 {
|
||||
@@ -2246,6 +2456,9 @@ message PolicyUpdateRequest {
|
||||
|
||||
/// The required timelock delta for HTLCs forwarded over the channel.
|
||||
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 {
|
||||
}
|
||||
@@ -2298,7 +2511,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 +2523,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" ];
|
||||
|
||||
@@ -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
|
||||
@@ -75,6 +76,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
||||
optional :fee_limit, :message, 8, "lnrpc.FeeLimit"
|
||||
optional :outgoing_chan_id, :uint64, 9
|
||||
optional :cltv_limit, :uint32, 10
|
||||
map :dest_tlv, :uint64, :bytes, 11
|
||||
end
|
||||
add_message "lnrpc.SendResponse" do
|
||||
optional :payment_error, :string, 1
|
||||
@@ -85,9 +87,27 @@ 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.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
|
||||
optional :output_index, :uint32, 3
|
||||
oneof :funding_txid do
|
||||
@@ -194,6 +214,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
||||
optional :private, :bool, 17
|
||||
optional :initiator, :bool, 18
|
||||
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
|
||||
add_message "lnrpc.ListChannelsRequest" do
|
||||
optional :active_only, :bool, 1
|
||||
@@ -273,6 +296,8 @@ 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
|
||||
optional :synced_to_graph, :bool, 18
|
||||
end
|
||||
add_message "lnrpc.Chain" do
|
||||
optional :chain, :string, 1
|
||||
@@ -348,6 +373,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
||||
optional :capacity, :int64, 3
|
||||
optional :local_balance, :int64, 4
|
||||
optional :remote_balance, :int64, 5
|
||||
optional :local_chan_reserve_sat, :int64, 6
|
||||
optional :remote_chan_reserve_sat, :int64, 7
|
||||
end
|
||||
add_message "lnrpc.PendingChannelsResponse.PendingOpenChannel" do
|
||||
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
|
||||
@@ -406,12 +433,18 @@ 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
|
||||
repeated :ignored_edges, :message, 7, "lnrpc.EdgeLocator"
|
||||
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
|
||||
add_message "lnrpc.EdgeLocator" do
|
||||
optional :channel_id, :uint64, 1
|
||||
@@ -419,6 +452,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
||||
end
|
||||
add_message "lnrpc.QueryRoutesResponse" do
|
||||
repeated :routes, :message, 1, "lnrpc.Route"
|
||||
optional :success_prob, :double, 2
|
||||
end
|
||||
add_message "lnrpc.Hop" do
|
||||
optional :chan_id, :uint64, 1
|
||||
@@ -429,6 +463,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
||||
optional :amt_to_forward_msat, :int64, 6
|
||||
optional :fee_msat, :int64, 7
|
||||
optional :pub_key, :string, 8
|
||||
optional :tlv_payload, :bool, 9
|
||||
end
|
||||
add_message "lnrpc.Route" do
|
||||
optional :total_time_lock, :uint32, 1
|
||||
@@ -440,11 +475,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
|
||||
@@ -464,6 +501,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
||||
optional :fee_rate_milli_msat, :int64, 4
|
||||
optional :disabled, :bool, 5
|
||||
optional :max_htlc_msat, :uint64, 6
|
||||
optional :last_update, :uint32, 7
|
||||
end
|
||||
add_message "lnrpc.ChannelEdge" do
|
||||
optional :channel_id, :uint64, 1
|
||||
@@ -498,6 +536,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
||||
optional :min_channel_size, :int64, 8
|
||||
optional :max_channel_size, :int64, 9
|
||||
optional :median_channel_size_sat, :int64, 10
|
||||
optional :num_zombie_chans, :uint64, 11
|
||||
end
|
||||
add_message "lnrpc.StopRequest" do
|
||||
end
|
||||
@@ -515,6 +554,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
|
||||
@@ -562,6 +602,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
||||
optional :amt_paid_sat, :int64, 19
|
||||
optional :amt_paid_msat, :int64, 20
|
||||
optional :state, :enum, 21, "lnrpc.Invoice.InvoiceState"
|
||||
repeated :htlcs, :message, 22, "lnrpc.InvoiceHTLC"
|
||||
end
|
||||
add_enum "lnrpc.Invoice.InvoiceState" do
|
||||
value :OPEN, 0
|
||||
@@ -569,6 +610,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
||||
value :CANCELED, 2
|
||||
value :ACCEPTED, 3
|
||||
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
|
||||
optional :r_hash, :bytes, 1
|
||||
optional :payment_request, :string, 2
|
||||
@@ -602,8 +653,19 @@ 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"
|
||||
optional :fee_sat, :int64, 11
|
||||
optional :fee_msat, :int64, 12
|
||||
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"
|
||||
@@ -657,6 +719,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
||||
optional :base_fee_msat, :int64, 3
|
||||
optional :fee_rate, :double, 4
|
||||
optional :time_lock_delta, :uint32, 5
|
||||
optional :max_htlc_msat, :uint64, 6
|
||||
oneof :scope do
|
||||
optional :global, :bool, 1
|
||||
optional :chan_point, :message, 2, "lnrpc.ChannelPoint"
|
||||
@@ -721,6 +784,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
||||
value :UNUSED_WITNESS_PUBKEY_HASH, 2
|
||||
value :UNUSED_NESTED_PUBKEY_HASH, 3
|
||||
end
|
||||
add_enum "lnrpc.InvoiceHTLCState" do
|
||||
value :ACCEPTED, 0
|
||||
value :SETTLED, 1
|
||||
value :CANCELED, 2
|
||||
end
|
||||
end
|
||||
|
||||
module Lnrpc
|
||||
@@ -740,6 +808,8 @@ module Lnrpc
|
||||
SendRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendRequest").msgclass
|
||||
SendResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendResponse").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
|
||||
OutPoint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OutPoint").msgclass
|
||||
LightningAddress = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.LightningAddress").msgclass
|
||||
@@ -800,6 +870,7 @@ module Lnrpc
|
||||
ChannelBalanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceRequest").msgclass
|
||||
ChannelBalanceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceResponse").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
|
||||
QueryRoutesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesResponse").msgclass
|
||||
Hop = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Hop").msgclass
|
||||
@@ -826,12 +897,14 @@ module Lnrpc
|
||||
RouteHint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RouteHint").msgclass
|
||||
Invoice = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice").msgclass
|
||||
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
|
||||
PaymentHash = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentHash").msgclass
|
||||
ListInvoiceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceRequest").msgclass
|
||||
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
|
||||
@@ -861,4 +934,5 @@ module Lnrpc
|
||||
ChannelBackupSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBackupSubscription").msgclass
|
||||
VerifyChanBackupResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.VerifyChanBackupResponse").msgclass
|
||||
AddressType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddressType").enummodule
|
||||
InvoiceHTLCState = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLCState").enummodule
|
||||
end
|
||||
|
||||
@@ -165,7 +165,7 @@ module Lnrpc
|
||||
# ListChannels returns a description of all the open channels that this node
|
||||
# is a participant in.
|
||||
rpc :ListChannels, ListChannelsRequest, ListChannelsResponse
|
||||
# * lncli: `subscribechannelevents`
|
||||
# *
|
||||
# SubscribeChannelEvents creates a uni-directional stream from the server to
|
||||
# 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
|
||||
@@ -188,6 +188,13 @@ module Lnrpc
|
||||
# rate to us for the funding transaction. If neither are specified, then a
|
||||
# lax block confirmation target is used.
|
||||
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`
|
||||
# CloseChannel attempts to close an active channel identified by its channel
|
||||
# outpoint (ChannelPoint). The actions of this method can additionally be
|
||||
@@ -287,7 +294,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
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module Lnrpc
|
||||
VERSION = "0.6.1"
|
||||
VERSION = "0.8.0.beta"
|
||||
end
|
||||
|
||||
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
||||
spec.add_development_dependency "bundler", "~> 1.17"
|
||||
spec.add_development_dependency "rake", "~> 10.0"
|
||||
spec.add_development_dependency "rspec", "~> 3.0"
|
||||
|
||||
|
||||
spec.add_dependency "grpc", ">= 1.19.0"
|
||||
spec.add_dependency "google-protobuf", ">=3.7"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user