Update grpc files for v8.0.0.beta-rc1

This commit is contained in:
bumi 2019-09-30 00:18:22 +02:00
parent 1b0a8a7df2
commit bdcc1d008d
3 changed files with 234 additions and 11 deletions

View File

@ -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
@ -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
@ -883,6 +892,13 @@ message SendRequest {
maximum 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 {
@ -905,6 +921,58 @@ message SendToRouteRequest {
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
@ -1169,6 +1237,14 @@ message Channel {
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"];
}
@ -1343,6 +1419,9 @@ message GetInfoResponse {
/// 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 {
@ -1642,9 +1721,9 @@ 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,
@ -1657,6 +1736,27 @@ message QueryRoutesRequest {
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 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. If the destination
does not support the specified recrods, and error will be returned.
*/
map<uint64, bytes> dest_tlv = 11;
}
message NodePair {
/// The sending node of the pair.
bytes from = 1;
/// The receiving node of the pair.
bytes to = 2;
}
message EdgeLocator {
@ -1673,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 {
@ -1695,6 +1805,20 @@ 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. Note that if any custom tlv_records below are specified, then
this field MUST be set to true for them to be encoded properly.
*/
bool tlv_payload = 9 [json_name = "tlv_payload"];
/**
An optional set of key-value TLV records. This is useful within the context
of the SendToRoute call as it allows callers to specify arbitrary K-V pairs
to drop off at each hop within the onion.
*/
map<uint64, bytes> tlv_records = 10 [json_name = "tlv_records"];
}
/**
@ -2072,6 +2196,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;
CANCELLED = 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 cancelled.
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 {
@ -2304,6 +2464,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 {
}

View File

@ -76,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
@ -88,6 +89,25 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :payment_hash_string, :string, 2
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
@ -196,6 +216,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -276,6 +297,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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
@ -417,6 +439,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
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"
map :dest_tlv, :uint64, :bytes, 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
@ -424,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
@ -434,6 +463,8 @@ 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
map :tlv_records, :uint64, :bytes, 10
end
add_message "lnrpc.Route" do
optional :total_time_lock, :uint32, 1
@ -572,6 +603,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
@ -579,6 +611,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
@ -678,6 +720,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"
@ -742,6 +785,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 :CANCELLED, 2
end
end
module Lnrpc
@ -761,6 +809,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
@ -821,6 +871,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
@ -847,6 +898,7 @@ 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
@ -883,4 +935,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

View File

@ -2,7 +2,7 @@
# Source: rpc.proto for package 'lnrpc'
require 'grpc'
require_relative 'rpc_pb'
require 'rpc_pb'
module Lnrpc
module WalletUnlocker
@ -10,19 +10,19 @@ module Lnrpc
# Comments in this file will be directly parsed into the API
# Documentation as descriptions of the associated method, message, or field.
# These descriptions should go right above the definition of the object, and
# can be in either block or /// comment format.
#
# can be in either block or /// comment format.
#
# One edge case exists where a // comment followed by a /// comment in the
# next line will cause the description not to show up in the documentation. In
# that instance, simply separate the two comments with a blank line.
#
#
# An RPC method can be matched to an lncli command by placing a line in the
# beginning of the description in exactly the following format:
# lncli: `methodname`
#
#
# Failure to specify the exact name of the command will cause documentation
# generation to fail.
#
#
# More information on how exactly the gRPC documentation is generated from
# this proto file can be found here:
# https://github.com/lightninglabs/lightning-api
@ -47,7 +47,7 @@ module Lnrpc
# method should be used to commit the newly generated seed, and create the
# wallet.
rpc :GenSeed, GenSeedRequest, GenSeedResponse
# *
# *
# InitWallet is used when lnd is starting up for the first time to fully
# initialize the daemon and its internal wallet. At the very least a wallet
# password must be provided. This will be used to encrypt sensitive material
@ -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