mirror of https://github.com/bumi/lnrpc
update rpc and router proto
This commit is contained in:
parent
579fc423ea
commit
e627c3651e
|
@ -6,34 +6,138 @@ package routerrpc;
|
|||
|
||||
option go_package = "github.com/lightningnetwork/lnd/lnrpc/routerrpc";
|
||||
|
||||
message SendPaymentRequest {
|
||||
/// The identity pubkey of the payment recipient
|
||||
bytes dest = 1;
|
||||
// Router is a service that offers advanced interaction with the router
|
||||
// subsystem of the daemon.
|
||||
service Router {
|
||||
/*
|
||||
SendPaymentV2 attempts to route a payment described by the passed
|
||||
PaymentRequest to the final destination. The call returns a stream of
|
||||
payment updates.
|
||||
*/
|
||||
rpc SendPaymentV2 (SendPaymentRequest) returns (stream lnrpc.Payment);
|
||||
|
||||
/*
|
||||
TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
payment hash.
|
||||
*/
|
||||
rpc TrackPaymentV2 (TrackPaymentRequest) returns (stream lnrpc.Payment);
|
||||
|
||||
/*
|
||||
EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
may cost to send an HTLC to the target end destination.
|
||||
*/
|
||||
rpc EstimateRouteFee (RouteFeeRequest) returns (RouteFeeResponse);
|
||||
|
||||
/*
|
||||
Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
the specified route. This method differs from SendPayment in that it
|
||||
allows users to specify a full route manually. This can be used for
|
||||
things like rebalancing, and atomic swaps. It differs from the newer
|
||||
SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
*/
|
||||
rpc SendToRoute (SendToRouteRequest) returns (SendToRouteResponse) {
|
||||
option deprecated = true;
|
||||
}
|
||||
|
||||
/*
|
||||
SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
method differs from SendPayment in that it allows users to specify a full
|
||||
route manually. This can be used for things like rebalancing, and atomic
|
||||
swaps.
|
||||
*/
|
||||
rpc SendToRouteV2 (SendToRouteRequest) returns (lnrpc.HTLCAttempt);
|
||||
|
||||
/*
|
||||
ResetMissionControl clears all mission control state and starts with a clean
|
||||
slate.
|
||||
*/
|
||||
rpc ResetMissionControl (ResetMissionControlRequest)
|
||||
returns (ResetMissionControlResponse);
|
||||
|
||||
/*
|
||||
QueryMissionControl exposes the internal mission control state to callers.
|
||||
It is a development feature.
|
||||
*/
|
||||
rpc QueryMissionControl (QueryMissionControlRequest)
|
||||
returns (QueryMissionControlResponse);
|
||||
|
||||
/*
|
||||
QueryProbability returns the current success probability estimate for a
|
||||
given node pair and amount.
|
||||
*/
|
||||
rpc QueryProbability (QueryProbabilityRequest)
|
||||
returns (QueryProbabilityResponse);
|
||||
|
||||
/*
|
||||
BuildRoute builds a fully specified route based on a list of hop public
|
||||
keys. It retrieves the relevant channel policies from the graph in order to
|
||||
calculate the correct fees and time locks.
|
||||
*/
|
||||
rpc BuildRoute (BuildRouteRequest) returns (BuildRouteResponse);
|
||||
|
||||
/*
|
||||
SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
the client which delivers a stream of htlc events.
|
||||
*/
|
||||
rpc SubscribeHtlcEvents (SubscribeHtlcEventsRequest)
|
||||
returns (stream HtlcEvent);
|
||||
|
||||
/*
|
||||
Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
described by the passed PaymentRequest to the final destination. The call
|
||||
returns a stream of payment status updates.
|
||||
*/
|
||||
rpc SendPayment (SendPaymentRequest) returns (stream PaymentStatus) {
|
||||
option deprecated = true;
|
||||
}
|
||||
|
||||
/*
|
||||
Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
the payment identified by the payment hash.
|
||||
*/
|
||||
rpc TrackPayment (TrackPaymentRequest) returns (stream PaymentStatus) {
|
||||
option deprecated = true;
|
||||
}
|
||||
|
||||
/**
|
||||
HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
Forwarded HTLC requests are sent to the client and the client responds with
|
||||
a boolean that tells LND if this htlc should be intercepted.
|
||||
In case of interception, the htlc can be either settled, cancelled or
|
||||
resumed later by using the ResolveHoldForward endpoint.
|
||||
*/
|
||||
rpc HtlcInterceptor (stream ForwardHtlcInterceptResponse)
|
||||
returns (stream ForwardHtlcInterceptRequest);
|
||||
}
|
||||
|
||||
message SendPaymentRequest {
|
||||
// The identity pubkey of the payment recipient
|
||||
bytes dest = 1;
|
||||
|
||||
/*
|
||||
Number of satoshis to send.
|
||||
|
||||
The fields amt and amt_msat are mutually exclusive.
|
||||
*/
|
||||
int64 amt = 2;
|
||||
|
||||
/**
|
||||
/*
|
||||
Number of millisatoshis to send.
|
||||
|
||||
The fields amt and amt_msat are mutually exclusive.
|
||||
*/
|
||||
int64 amt_msat = 12;
|
||||
|
||||
/// The hash to use within the payment's HTLC
|
||||
// The hash to use within the payment's HTLC
|
||||
bytes payment_hash = 3;
|
||||
|
||||
/**
|
||||
/*
|
||||
The CLTV delta from the current height that should be used to set the
|
||||
timelock for the final hop.
|
||||
*/
|
||||
int32 final_cltv_delta = 4;
|
||||
|
||||
/**
|
||||
/*
|
||||
A bare-bones invoice for a payment within the Lightning Network. With the
|
||||
details of the invoice, the sender has all the data necessary to send a
|
||||
payment to the recipient. The amount in the payment request may be zero. In
|
||||
|
@ -42,7 +146,7 @@ message SendPaymentRequest {
|
|||
*/
|
||||
string payment_request = 5;
|
||||
|
||||
/**
|
||||
/*
|
||||
An upper limit on the amount of time we should spend when attempting to
|
||||
fulfill the payment. This is expressed in seconds. If we cannot make a
|
||||
successful payment within this time frame, an error will be returned.
|
||||
|
@ -50,7 +154,7 @@ message SendPaymentRequest {
|
|||
*/
|
||||
int32 timeout_seconds = 6;
|
||||
|
||||
/**
|
||||
/*
|
||||
The maximum number of satoshis that will be paid as a fee of the payment.
|
||||
If this field is left to the default value of 0, only zero-fee routes will
|
||||
be considered. This usually means single hop routes connecting directly to
|
||||
|
@ -60,7 +164,7 @@ message SendPaymentRequest {
|
|||
*/
|
||||
int64 fee_limit_sat = 7;
|
||||
|
||||
/**
|
||||
/*
|
||||
The maximum number of millisatoshis that will be paid as a fee of the
|
||||
payment. If this field is left to the default value of 0, only zero-fee
|
||||
routes will be considered. This usually means single hop routes connecting
|
||||
|
@ -71,30 +175,37 @@ message SendPaymentRequest {
|
|||
*/
|
||||
int64 fee_limit_msat = 13;
|
||||
|
||||
/**
|
||||
The channel id of the channel that must be taken to the first hop. If zero,
|
||||
/*
|
||||
Deprecated, use outgoing_chan_ids. The channel id of the channel that must
|
||||
be taken to the first hop. If zero, any channel may be used (unless
|
||||
outgoing_chan_ids are set).
|
||||
*/
|
||||
uint64 outgoing_chan_id = 8 [jstype = JS_STRING, deprecated = true];
|
||||
|
||||
/*
|
||||
The channel ids of the channels are allowed for the first hop. If empty,
|
||||
any channel may be used.
|
||||
*/
|
||||
uint64 outgoing_chan_id = 8 [jstype = JS_STRING];
|
||||
repeated uint64 outgoing_chan_ids = 19;
|
||||
|
||||
/**
|
||||
/*
|
||||
The pubkey of the last hop of the route. If empty, any hop may be used.
|
||||
*/
|
||||
bytes last_hop_pubkey = 14;
|
||||
|
||||
/**
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
int32 cltv_limit = 9;
|
||||
|
||||
/**
|
||||
/*
|
||||
Optional route hints to reach the destination through private channels.
|
||||
*/
|
||||
repeated lnrpc.RouteHint route_hints = 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. Record types are
|
||||
|
@ -103,10 +214,10 @@ message SendPaymentRequest {
|
|||
*/
|
||||
map<uint64, bytes> dest_custom_records = 11;
|
||||
|
||||
/// If set, circular payments to self are permitted.
|
||||
// If set, circular payments to self are permitted.
|
||||
bool allow_self_payment = 15;
|
||||
|
||||
/**
|
||||
/*
|
||||
Features assumed to be supported by the final node. All transitive feature
|
||||
dependencies must also be set properly. For a given feature bit pair, either
|
||||
optional or remote may be set, but not both. If this field is nil or empty,
|
||||
|
@ -115,13 +226,13 @@ message SendPaymentRequest {
|
|||
*/
|
||||
repeated lnrpc.FeatureBit dest_features = 16;
|
||||
|
||||
/**
|
||||
/*
|
||||
The maximum number of partial payments that may be use to complete the full
|
||||
amount.
|
||||
*/
|
||||
uint32 max_parts = 17;
|
||||
|
||||
/**
|
||||
/*
|
||||
If set, only the final payment update is streamed back. Intermediate updates
|
||||
that show which htlcs are still in flight are suppressed.
|
||||
*/
|
||||
|
@ -129,10 +240,10 @@ message SendPaymentRequest {
|
|||
}
|
||||
|
||||
message TrackPaymentRequest {
|
||||
/// The hash of the payment to look up.
|
||||
// The hash of the payment to look up.
|
||||
bytes payment_hash = 1;
|
||||
|
||||
/**
|
||||
/*
|
||||
If set, only the final payment update is streamed back. Intermediate updates
|
||||
that show which htlcs are still in flight are suppressed.
|
||||
*/
|
||||
|
@ -140,25 +251,25 @@ message TrackPaymentRequest {
|
|||
}
|
||||
|
||||
message RouteFeeRequest {
|
||||
/**
|
||||
/*
|
||||
The destination once wishes to obtain a routing fee quote to.
|
||||
*/
|
||||
bytes dest = 1;
|
||||
|
||||
/**
|
||||
/*
|
||||
The amount one wishes to send to the target destination.
|
||||
*/
|
||||
int64 amt_sat = 2;
|
||||
}
|
||||
|
||||
message RouteFeeResponse {
|
||||
/**
|
||||
/*
|
||||
A lower bound of the estimated fee to the target destination within the
|
||||
network, expressed in milli-satoshis.
|
||||
*/
|
||||
int64 routing_fee_msat = 1;
|
||||
|
||||
/**
|
||||
/*
|
||||
An estimate of the worst case time delay that can occur. Note that callers
|
||||
will still need to factor in the final CLTV delta of the last hop into this
|
||||
value.
|
||||
|
@ -167,18 +278,18 @@ message RouteFeeResponse {
|
|||
}
|
||||
|
||||
message SendToRouteRequest {
|
||||
/// The payment hash to use for the HTLC.
|
||||
// The payment hash to use for the HTLC.
|
||||
bytes payment_hash = 1;
|
||||
|
||||
/// Route that should be used to attempt to complete the payment.
|
||||
// Route that should be used to attempt to complete the payment.
|
||||
lnrpc.Route route = 2;
|
||||
}
|
||||
|
||||
message SendToRouteResponse {
|
||||
/// The preimage obtained by making the payment.
|
||||
// The preimage obtained by making the payment.
|
||||
bytes preimage = 1;
|
||||
|
||||
/// The failure message in case the payment failed.
|
||||
// The failure message in case the payment failed.
|
||||
lnrpc.Failure failure = 2;
|
||||
}
|
||||
|
||||
|
@ -191,20 +302,20 @@ message ResetMissionControlResponse {
|
|||
message QueryMissionControlRequest {
|
||||
}
|
||||
|
||||
/// QueryMissionControlResponse contains mission control state.
|
||||
// QueryMissionControlResponse contains mission control state.
|
||||
message QueryMissionControlResponse {
|
||||
reserved 1;
|
||||
|
||||
/// Node pair-level mission control state.
|
||||
// Node pair-level mission control state.
|
||||
repeated PairHistory pairs = 2;
|
||||
}
|
||||
|
||||
/// PairHistory contains the mission control state for a particular node pair.
|
||||
// PairHistory contains the mission control state for a particular node pair.
|
||||
message PairHistory {
|
||||
/// The source node pubkey of the pair.
|
||||
// The source node pubkey of the pair.
|
||||
bytes node_from = 1;
|
||||
|
||||
/// The destination node pubkey of the pair.
|
||||
// The destination node pubkey of the pair.
|
||||
bytes node_to = 2;
|
||||
|
||||
reserved 3, 4, 5, 6;
|
||||
|
@ -213,16 +324,16 @@ message PairHistory {
|
|||
}
|
||||
|
||||
message PairData {
|
||||
/// Time of last failure.
|
||||
// Time of last failure.
|
||||
int64 fail_time = 1;
|
||||
|
||||
/**
|
||||
/*
|
||||
Lowest amount that failed to forward rounded to whole sats. This may be
|
||||
set to zero if the failure is independent of amount.
|
||||
*/
|
||||
int64 fail_amt_sat = 2;
|
||||
|
||||
/**
|
||||
/*
|
||||
Lowest amount that failed to forward in millisats. This may be
|
||||
set to zero if the failure is independent of amount.
|
||||
*/
|
||||
|
@ -230,55 +341,55 @@ message PairData {
|
|||
|
||||
reserved 3;
|
||||
|
||||
/// Time of last success.
|
||||
// Time of last success.
|
||||
int64 success_time = 5;
|
||||
|
||||
/// Highest amount that we could successfully forward rounded to whole sats.
|
||||
// Highest amount that we could successfully forward rounded to whole sats.
|
||||
int64 success_amt_sat = 6;
|
||||
|
||||
/// Highest amount that we could successfully forward in millisats.
|
||||
// Highest amount that we could successfully forward in millisats.
|
||||
int64 success_amt_msat = 7;
|
||||
}
|
||||
|
||||
message QueryProbabilityRequest {
|
||||
/// The source node pubkey of the pair.
|
||||
// The source node pubkey of the pair.
|
||||
bytes from_node = 1;
|
||||
|
||||
/// The destination node pubkey of the pair.
|
||||
// The destination node pubkey of the pair.
|
||||
bytes to_node = 2;
|
||||
|
||||
/// The amount for which to calculate a probability.
|
||||
// The amount for which to calculate a probability.
|
||||
int64 amt_msat = 3;
|
||||
}
|
||||
|
||||
message QueryProbabilityResponse {
|
||||
/// The success probability for the requested pair.
|
||||
// The success probability for the requested pair.
|
||||
double probability = 1;
|
||||
|
||||
/// The historical data for the requested pair.
|
||||
// The historical data for the requested pair.
|
||||
PairData history = 2;
|
||||
}
|
||||
|
||||
message BuildRouteRequest {
|
||||
/**
|
||||
/*
|
||||
The amount to send expressed in msat. If set to zero, the minimum routable
|
||||
amount is used.
|
||||
*/
|
||||
int64 amt_msat = 1;
|
||||
|
||||
/**
|
||||
/*
|
||||
CLTV delta from the current height that should be used for the timelock
|
||||
of the final hop
|
||||
*/
|
||||
int32 final_cltv_delta = 2;
|
||||
|
||||
/**
|
||||
/*
|
||||
The channel id of the channel that must be taken to the first hop. If zero,
|
||||
any channel may be used.
|
||||
*/
|
||||
uint64 outgoing_chan_id = 3 [jstype = JS_STRING];
|
||||
|
||||
/**
|
||||
/*
|
||||
A list of hops that defines the route. This does not include the source hop
|
||||
pubkey.
|
||||
*/
|
||||
|
@ -286,7 +397,7 @@ message BuildRouteRequest {
|
|||
}
|
||||
|
||||
message BuildRouteResponse {
|
||||
/**
|
||||
/*
|
||||
Fully specified route that can be used to execute the payment.
|
||||
*/
|
||||
lnrpc.Route route = 1;
|
||||
|
@ -295,7 +406,7 @@ message BuildRouteResponse {
|
|||
message SubscribeHtlcEventsRequest {
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
HtlcEvent contains the htlc event that was processed. These are served on a
|
||||
best-effort basis; events are not persisted, delivery is not guaranteed
|
||||
(in the event of a crash in the switch, forward events may be lost) and
|
||||
|
@ -304,31 +415,31 @@ should be de-duplicated by the htlc's unique combination of incoming and
|
|||
outgoing channel id and htlc id. [EXPERIMENTAL]
|
||||
*/
|
||||
message HtlcEvent {
|
||||
/**
|
||||
/*
|
||||
The short channel id that the incoming htlc arrived at our node on. This
|
||||
value is zero for sends.
|
||||
*/
|
||||
uint64 incoming_channel_id = 1;
|
||||
|
||||
/**
|
||||
/*
|
||||
The short channel id that the outgoing htlc left our node on. This value
|
||||
is zero for receives.
|
||||
*/
|
||||
uint64 outgoing_channel_id = 2;
|
||||
|
||||
/**
|
||||
/*
|
||||
Incoming id is the index of the incoming htlc in the incoming channel.
|
||||
This value is zero for sends.
|
||||
*/
|
||||
uint64 incoming_htlc_id = 3;
|
||||
|
||||
/**
|
||||
/*
|
||||
Outgoing id is the index of the outgoing htlc in the outgoing channel.
|
||||
This value is zero for receives.
|
||||
*/
|
||||
uint64 outgoing_htlc_id = 4;
|
||||
|
||||
/**
|
||||
/*
|
||||
The time in unix nanoseconds that the event occurred.
|
||||
*/
|
||||
uint64 timestamp_ns = 5;
|
||||
|
@ -340,7 +451,7 @@ message HtlcEvent {
|
|||
FORWARD = 3;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
The event type indicates whether the htlc was part of a send, receive or
|
||||
forward.
|
||||
*/
|
||||
|
@ -386,7 +497,7 @@ message LinkFailEvent {
|
|||
// FailureCode is the BOLT error code for the failure.
|
||||
lnrpc.Failure.FailureCode wire_failure = 2;
|
||||
|
||||
/**
|
||||
/*
|
||||
FailureDetail provides additional information about the reason for the
|
||||
failure. This detail enriches the information provided by the wire message
|
||||
and may be 'no detail' if the wire message requires no additional metadata.
|
||||
|
@ -424,137 +535,127 @@ enum FailureDetail {
|
|||
}
|
||||
|
||||
enum PaymentState {
|
||||
/**
|
||||
/*
|
||||
Payment is still in flight.
|
||||
*/
|
||||
IN_FLIGHT = 0;
|
||||
|
||||
/**
|
||||
/*
|
||||
Payment completed successfully.
|
||||
*/
|
||||
SUCCEEDED = 1;
|
||||
|
||||
/**
|
||||
/*
|
||||
There are more routes to try, but the payment timeout was exceeded.
|
||||
*/
|
||||
FAILED_TIMEOUT = 2;
|
||||
|
||||
/**
|
||||
|
||||
/*
|
||||
All possible routes were tried and failed permanently. Or were no
|
||||
routes to the destination at all.
|
||||
*/
|
||||
FAILED_NO_ROUTE = 3;
|
||||
|
||||
/**
|
||||
/*
|
||||
A non-recoverable error has occured.
|
||||
*/
|
||||
FAILED_ERROR = 4;
|
||||
|
||||
/**
|
||||
/*
|
||||
Payment details incorrect (unknown hash, invalid amt or
|
||||
invalid final cltv delta)
|
||||
*/
|
||||
FAILED_INCORRECT_PAYMENT_DETAILS = 5;
|
||||
|
||||
/**
|
||||
/*
|
||||
Insufficient local balance.
|
||||
*/
|
||||
FAILED_INSUFFICIENT_BALANCE = 6;
|
||||
}
|
||||
|
||||
message PaymentStatus {
|
||||
/// Current state the payment is in.
|
||||
// Current state the payment is in.
|
||||
PaymentState state = 1;
|
||||
|
||||
/**
|
||||
/*
|
||||
The pre-image of the payment when state is SUCCEEDED.
|
||||
*/
|
||||
bytes preimage = 2;
|
||||
|
||||
reserved 3;
|
||||
|
||||
/**
|
||||
/*
|
||||
The HTLCs made in attempt to settle the payment [EXPERIMENTAL].
|
||||
*/
|
||||
repeated lnrpc.HTLCAttempt htlcs = 4;
|
||||
}
|
||||
|
||||
service Router {
|
||||
/**
|
||||
SendPaymentV2 attempts to route a payment described by the passed
|
||||
PaymentRequest to the final destination. The call returns a stream of
|
||||
payment updates.
|
||||
*/
|
||||
rpc SendPaymentV2 (SendPaymentRequest) returns (stream lnrpc.Payment);
|
||||
message CircuitKey {
|
||||
/// The id of the channel that the is part of this circuit.
|
||||
uint64 chan_id = 1;
|
||||
|
||||
/**
|
||||
TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
payment hash.
|
||||
*/
|
||||
rpc TrackPaymentV2 (TrackPaymentRequest) returns (stream lnrpc.Payment);
|
||||
|
||||
/**
|
||||
EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
may cost to send an HTLC to the target end destination.
|
||||
*/
|
||||
rpc EstimateRouteFee (RouteFeeRequest) returns (RouteFeeResponse);
|
||||
|
||||
/**
|
||||
SendToRoute attempts to make a payment via the specified route. This method
|
||||
differs from SendPayment in that it allows users to specify a full route
|
||||
manually. This can be used for things like rebalancing, and atomic swaps.
|
||||
*/
|
||||
rpc SendToRoute (SendToRouteRequest) returns (SendToRouteResponse);
|
||||
|
||||
/**
|
||||
ResetMissionControl clears all mission control state and starts with a clean
|
||||
slate.
|
||||
*/
|
||||
rpc ResetMissionControl (ResetMissionControlRequest)
|
||||
returns (ResetMissionControlResponse);
|
||||
|
||||
/**
|
||||
QueryMissionControl exposes the internal mission control state to callers.
|
||||
It is a development feature.
|
||||
*/
|
||||
rpc QueryMissionControl (QueryMissionControlRequest)
|
||||
returns (QueryMissionControlResponse);
|
||||
|
||||
/**
|
||||
QueryProbability returns the current success probability estimate for a
|
||||
given node pair and amount.
|
||||
*/
|
||||
rpc QueryProbability (QueryProbabilityRequest)
|
||||
returns (QueryProbabilityResponse);
|
||||
|
||||
/**
|
||||
BuildRoute builds a fully specified route based on a list of hop public
|
||||
keys. It retrieves the relevant channel policies from the graph in order to
|
||||
calculate the correct fees and time locks.
|
||||
*/
|
||||
rpc BuildRoute (BuildRouteRequest) returns (BuildRouteResponse);
|
||||
|
||||
/**
|
||||
SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
the client which delivers a stream of htlc events.
|
||||
*/
|
||||
rpc SubscribeHtlcEvents (SubscribeHtlcEventsRequest)
|
||||
returns (stream HtlcEvent);
|
||||
|
||||
/**
|
||||
Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
described by the passed PaymentRequest to the final destination. The call
|
||||
returns a stream of payment status updates.
|
||||
*/
|
||||
rpc SendPayment(SendPaymentRequest) returns (stream PaymentStatus) {
|
||||
option deprecated = true;
|
||||
}
|
||||
|
||||
/**
|
||||
Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
the payment identified by the payment hash.
|
||||
*/
|
||||
rpc TrackPayment(TrackPaymentRequest) returns (stream PaymentStatus) {
|
||||
option deprecated = true;
|
||||
}
|
||||
/// The index of the incoming htlc in the incoming channel.
|
||||
uint64 htlc_id = 2;
|
||||
}
|
||||
|
||||
message ForwardHtlcInterceptRequest {
|
||||
/*
|
||||
The key of this forwarded htlc. It defines the incoming channel id and
|
||||
the index in this channel.
|
||||
*/
|
||||
CircuitKey incoming_circuit_key = 1;
|
||||
|
||||
// The incoming htlc amount.
|
||||
uint64 incoming_amount_msat = 5;
|
||||
|
||||
// The incoming htlc expiry.
|
||||
uint32 incoming_expiry = 6;
|
||||
|
||||
/*
|
||||
The htlc payment hash. This value is not guaranteed to be unique per
|
||||
request.
|
||||
*/
|
||||
bytes payment_hash = 2;
|
||||
|
||||
// The requested outgoing channel id for this forwarded htlc. Because of
|
||||
// non-strict forwarding, this isn't necessarily the channel over which the
|
||||
// packet will be forwarded eventually. A different channel to the same peer
|
||||
// may be selected as well.
|
||||
uint64 outgoing_requested_chan_id = 7;
|
||||
|
||||
// The outgoing htlc amount.
|
||||
uint64 outgoing_amount_msat = 3;
|
||||
|
||||
// The outgoing htlc expiry.
|
||||
uint32 outgoing_expiry = 4;
|
||||
|
||||
// Any custom records that were present in the payload.
|
||||
map<uint64, bytes> custom_records = 8;
|
||||
}
|
||||
|
||||
/**
|
||||
ForwardHtlcInterceptResponse enables the caller to resolve a previously hold
|
||||
forward. The caller can choose either to:
|
||||
- `Resume`: Execute the default behavior (usually forward).
|
||||
- `Reject`: Fail the htlc backwards.
|
||||
- `Settle`: Settle this htlc with a given preimage.
|
||||
*/
|
||||
message ForwardHtlcInterceptResponse {
|
||||
/**
|
||||
The key of this forwarded htlc. It defines the incoming channel id and
|
||||
the index in this channel.
|
||||
*/
|
||||
CircuitKey incoming_circuit_key = 1;
|
||||
|
||||
// The resolve action for this intercepted htlc.
|
||||
ResolveHoldForwardAction action = 2;
|
||||
|
||||
// The preimage in case the resolve action is Settle.
|
||||
bytes preimage = 3;
|
||||
}
|
||||
|
||||
enum ResolveHoldForwardAction {
|
||||
SETTLE = 0;
|
||||
FAIL = 1;
|
||||
RESUME = 2;
|
||||
}
|
||||
|
|
|
@ -3,196 +3,227 @@
|
|||
|
||||
require 'google/protobuf'
|
||||
|
||||
require_relative 'rpc_pb'
|
||||
require 'rpc_pb'
|
||||
Google::Protobuf::DescriptorPool.generated_pool.build do
|
||||
add_message "routerrpc.SendPaymentRequest" do
|
||||
optional :dest, :bytes, 1
|
||||
optional :amt, :int64, 2
|
||||
optional :amt_msat, :int64, 12
|
||||
optional :payment_hash, :bytes, 3
|
||||
optional :final_cltv_delta, :int32, 4
|
||||
optional :payment_request, :string, 5
|
||||
optional :timeout_seconds, :int32, 6
|
||||
optional :fee_limit_sat, :int64, 7
|
||||
optional :fee_limit_msat, :int64, 13
|
||||
optional :outgoing_chan_id, :uint64, 8
|
||||
optional :last_hop_pubkey, :bytes, 14
|
||||
optional :cltv_limit, :int32, 9
|
||||
repeated :route_hints, :message, 10, "lnrpc.RouteHint"
|
||||
map :dest_custom_records, :uint64, :bytes, 11
|
||||
optional :allow_self_payment, :bool, 15
|
||||
repeated :dest_features, :enum, 16, "lnrpc.FeatureBit"
|
||||
optional :max_parts, :uint32, 17
|
||||
optional :no_inflight_updates, :bool, 18
|
||||
end
|
||||
add_message "routerrpc.TrackPaymentRequest" do
|
||||
optional :payment_hash, :bytes, 1
|
||||
optional :no_inflight_updates, :bool, 2
|
||||
end
|
||||
add_message "routerrpc.RouteFeeRequest" do
|
||||
optional :dest, :bytes, 1
|
||||
optional :amt_sat, :int64, 2
|
||||
end
|
||||
add_message "routerrpc.RouteFeeResponse" do
|
||||
optional :routing_fee_msat, :int64, 1
|
||||
optional :time_lock_delay, :int64, 2
|
||||
end
|
||||
add_message "routerrpc.SendToRouteRequest" do
|
||||
optional :payment_hash, :bytes, 1
|
||||
optional :route, :message, 2, "lnrpc.Route"
|
||||
end
|
||||
add_message "routerrpc.SendToRouteResponse" do
|
||||
optional :preimage, :bytes, 1
|
||||
optional :failure, :message, 2, "lnrpc.Failure"
|
||||
end
|
||||
add_message "routerrpc.ResetMissionControlRequest" do
|
||||
end
|
||||
add_message "routerrpc.ResetMissionControlResponse" do
|
||||
end
|
||||
add_message "routerrpc.QueryMissionControlRequest" do
|
||||
end
|
||||
add_message "routerrpc.QueryMissionControlResponse" do
|
||||
repeated :pairs, :message, 2, "routerrpc.PairHistory"
|
||||
end
|
||||
add_message "routerrpc.PairHistory" do
|
||||
optional :node_from, :bytes, 1
|
||||
optional :node_to, :bytes, 2
|
||||
optional :history, :message, 7, "routerrpc.PairData"
|
||||
end
|
||||
add_message "routerrpc.PairData" do
|
||||
optional :fail_time, :int64, 1
|
||||
optional :fail_amt_sat, :int64, 2
|
||||
optional :fail_amt_msat, :int64, 4
|
||||
optional :success_time, :int64, 5
|
||||
optional :success_amt_sat, :int64, 6
|
||||
optional :success_amt_msat, :int64, 7
|
||||
end
|
||||
add_message "routerrpc.QueryProbabilityRequest" do
|
||||
optional :from_node, :bytes, 1
|
||||
optional :to_node, :bytes, 2
|
||||
optional :amt_msat, :int64, 3
|
||||
end
|
||||
add_message "routerrpc.QueryProbabilityResponse" do
|
||||
optional :probability, :double, 1
|
||||
optional :history, :message, 2, "routerrpc.PairData"
|
||||
end
|
||||
add_message "routerrpc.BuildRouteRequest" do
|
||||
optional :amt_msat, :int64, 1
|
||||
optional :final_cltv_delta, :int32, 2
|
||||
optional :outgoing_chan_id, :uint64, 3
|
||||
repeated :hop_pubkeys, :bytes, 4
|
||||
end
|
||||
add_message "routerrpc.BuildRouteResponse" do
|
||||
optional :route, :message, 1, "lnrpc.Route"
|
||||
end
|
||||
add_message "routerrpc.SubscribeHtlcEventsRequest" do
|
||||
end
|
||||
add_message "routerrpc.HtlcEvent" do
|
||||
optional :incoming_channel_id, :uint64, 1
|
||||
optional :outgoing_channel_id, :uint64, 2
|
||||
optional :incoming_htlc_id, :uint64, 3
|
||||
optional :outgoing_htlc_id, :uint64, 4
|
||||
optional :timestamp_ns, :uint64, 5
|
||||
optional :event_type, :enum, 6, "routerrpc.HtlcEvent.EventType"
|
||||
oneof :event do
|
||||
optional :forward_event, :message, 7, "routerrpc.ForwardEvent"
|
||||
optional :forward_fail_event, :message, 8, "routerrpc.ForwardFailEvent"
|
||||
optional :settle_event, :message, 9, "routerrpc.SettleEvent"
|
||||
optional :link_fail_event, :message, 10, "routerrpc.LinkFailEvent"
|
||||
add_file("router.proto", :syntax => :proto3) do
|
||||
add_message "routerrpc.SendPaymentRequest" do
|
||||
optional :dest, :bytes, 1
|
||||
optional :amt, :int64, 2
|
||||
optional :amt_msat, :int64, 12
|
||||
optional :payment_hash, :bytes, 3
|
||||
optional :final_cltv_delta, :int32, 4
|
||||
optional :payment_request, :string, 5
|
||||
optional :timeout_seconds, :int32, 6
|
||||
optional :fee_limit_sat, :int64, 7
|
||||
optional :fee_limit_msat, :int64, 13
|
||||
optional :outgoing_chan_id, :uint64, 8
|
||||
repeated :outgoing_chan_ids, :uint64, 19
|
||||
optional :last_hop_pubkey, :bytes, 14
|
||||
optional :cltv_limit, :int32, 9
|
||||
repeated :route_hints, :message, 10, "lnrpc.RouteHint"
|
||||
map :dest_custom_records, :uint64, :bytes, 11
|
||||
optional :allow_self_payment, :bool, 15
|
||||
repeated :dest_features, :enum, 16, "lnrpc.FeatureBit"
|
||||
optional :max_parts, :uint32, 17
|
||||
optional :no_inflight_updates, :bool, 18
|
||||
end
|
||||
add_message "routerrpc.TrackPaymentRequest" do
|
||||
optional :payment_hash, :bytes, 1
|
||||
optional :no_inflight_updates, :bool, 2
|
||||
end
|
||||
add_message "routerrpc.RouteFeeRequest" do
|
||||
optional :dest, :bytes, 1
|
||||
optional :amt_sat, :int64, 2
|
||||
end
|
||||
add_message "routerrpc.RouteFeeResponse" do
|
||||
optional :routing_fee_msat, :int64, 1
|
||||
optional :time_lock_delay, :int64, 2
|
||||
end
|
||||
add_message "routerrpc.SendToRouteRequest" do
|
||||
optional :payment_hash, :bytes, 1
|
||||
optional :route, :message, 2, "lnrpc.Route"
|
||||
end
|
||||
add_message "routerrpc.SendToRouteResponse" do
|
||||
optional :preimage, :bytes, 1
|
||||
optional :failure, :message, 2, "lnrpc.Failure"
|
||||
end
|
||||
add_message "routerrpc.ResetMissionControlRequest" do
|
||||
end
|
||||
add_message "routerrpc.ResetMissionControlResponse" do
|
||||
end
|
||||
add_message "routerrpc.QueryMissionControlRequest" do
|
||||
end
|
||||
add_message "routerrpc.QueryMissionControlResponse" do
|
||||
repeated :pairs, :message, 2, "routerrpc.PairHistory"
|
||||
end
|
||||
add_message "routerrpc.PairHistory" do
|
||||
optional :node_from, :bytes, 1
|
||||
optional :node_to, :bytes, 2
|
||||
optional :history, :message, 7, "routerrpc.PairData"
|
||||
end
|
||||
add_message "routerrpc.PairData" do
|
||||
optional :fail_time, :int64, 1
|
||||
optional :fail_amt_sat, :int64, 2
|
||||
optional :fail_amt_msat, :int64, 4
|
||||
optional :success_time, :int64, 5
|
||||
optional :success_amt_sat, :int64, 6
|
||||
optional :success_amt_msat, :int64, 7
|
||||
end
|
||||
add_message "routerrpc.QueryProbabilityRequest" do
|
||||
optional :from_node, :bytes, 1
|
||||
optional :to_node, :bytes, 2
|
||||
optional :amt_msat, :int64, 3
|
||||
end
|
||||
add_message "routerrpc.QueryProbabilityResponse" do
|
||||
optional :probability, :double, 1
|
||||
optional :history, :message, 2, "routerrpc.PairData"
|
||||
end
|
||||
add_message "routerrpc.BuildRouteRequest" do
|
||||
optional :amt_msat, :int64, 1
|
||||
optional :final_cltv_delta, :int32, 2
|
||||
optional :outgoing_chan_id, :uint64, 3
|
||||
repeated :hop_pubkeys, :bytes, 4
|
||||
end
|
||||
add_message "routerrpc.BuildRouteResponse" do
|
||||
optional :route, :message, 1, "lnrpc.Route"
|
||||
end
|
||||
add_message "routerrpc.SubscribeHtlcEventsRequest" do
|
||||
end
|
||||
add_message "routerrpc.HtlcEvent" do
|
||||
optional :incoming_channel_id, :uint64, 1
|
||||
optional :outgoing_channel_id, :uint64, 2
|
||||
optional :incoming_htlc_id, :uint64, 3
|
||||
optional :outgoing_htlc_id, :uint64, 4
|
||||
optional :timestamp_ns, :uint64, 5
|
||||
optional :event_type, :enum, 6, "routerrpc.HtlcEvent.EventType"
|
||||
oneof :event do
|
||||
optional :forward_event, :message, 7, "routerrpc.ForwardEvent"
|
||||
optional :forward_fail_event, :message, 8, "routerrpc.ForwardFailEvent"
|
||||
optional :settle_event, :message, 9, "routerrpc.SettleEvent"
|
||||
optional :link_fail_event, :message, 10, "routerrpc.LinkFailEvent"
|
||||
end
|
||||
end
|
||||
add_enum "routerrpc.HtlcEvent.EventType" do
|
||||
value :UNKNOWN, 0
|
||||
value :SEND, 1
|
||||
value :RECEIVE, 2
|
||||
value :FORWARD, 3
|
||||
end
|
||||
add_message "routerrpc.HtlcInfo" do
|
||||
optional :incoming_timelock, :uint32, 1
|
||||
optional :outgoing_timelock, :uint32, 2
|
||||
optional :incoming_amt_msat, :uint64, 3
|
||||
optional :outgoing_amt_msat, :uint64, 4
|
||||
end
|
||||
add_message "routerrpc.ForwardEvent" do
|
||||
optional :info, :message, 1, "routerrpc.HtlcInfo"
|
||||
end
|
||||
add_message "routerrpc.ForwardFailEvent" do
|
||||
end
|
||||
add_message "routerrpc.SettleEvent" do
|
||||
end
|
||||
add_message "routerrpc.LinkFailEvent" do
|
||||
optional :info, :message, 1, "routerrpc.HtlcInfo"
|
||||
optional :wire_failure, :enum, 2, "lnrpc.Failure.FailureCode"
|
||||
optional :failure_detail, :enum, 3, "routerrpc.FailureDetail"
|
||||
optional :failure_string, :string, 4
|
||||
end
|
||||
add_message "routerrpc.PaymentStatus" do
|
||||
optional :state, :enum, 1, "routerrpc.PaymentState"
|
||||
optional :preimage, :bytes, 2
|
||||
repeated :htlcs, :message, 4, "lnrpc.HTLCAttempt"
|
||||
end
|
||||
add_message "routerrpc.CircuitKey" do
|
||||
optional :chan_id, :uint64, 1
|
||||
optional :htlc_id, :uint64, 2
|
||||
end
|
||||
add_message "routerrpc.ForwardHtlcInterceptRequest" do
|
||||
optional :incoming_circuit_key, :message, 1, "routerrpc.CircuitKey"
|
||||
optional :incoming_amount_msat, :uint64, 5
|
||||
optional :incoming_expiry, :uint32, 6
|
||||
optional :payment_hash, :bytes, 2
|
||||
optional :outgoing_requested_chan_id, :uint64, 7
|
||||
optional :outgoing_amount_msat, :uint64, 3
|
||||
optional :outgoing_expiry, :uint32, 4
|
||||
map :custom_records, :uint64, :bytes, 8
|
||||
end
|
||||
add_message "routerrpc.ForwardHtlcInterceptResponse" do
|
||||
optional :incoming_circuit_key, :message, 1, "routerrpc.CircuitKey"
|
||||
optional :action, :enum, 2, "routerrpc.ResolveHoldForwardAction"
|
||||
optional :preimage, :bytes, 3
|
||||
end
|
||||
add_enum "routerrpc.FailureDetail" do
|
||||
value :UNKNOWN, 0
|
||||
value :NO_DETAIL, 1
|
||||
value :ONION_DECODE, 2
|
||||
value :LINK_NOT_ELIGIBLE, 3
|
||||
value :ON_CHAIN_TIMEOUT, 4
|
||||
value :HTLC_EXCEEDS_MAX, 5
|
||||
value :INSUFFICIENT_BALANCE, 6
|
||||
value :INCOMPLETE_FORWARD, 7
|
||||
value :HTLC_ADD_FAILED, 8
|
||||
value :FORWARDS_DISABLED, 9
|
||||
value :INVOICE_CANCELED, 10
|
||||
value :INVOICE_UNDERPAID, 11
|
||||
value :INVOICE_EXPIRY_TOO_SOON, 12
|
||||
value :INVOICE_NOT_OPEN, 13
|
||||
value :MPP_INVOICE_TIMEOUT, 14
|
||||
value :ADDRESS_MISMATCH, 15
|
||||
value :SET_TOTAL_MISMATCH, 16
|
||||
value :SET_TOTAL_TOO_LOW, 17
|
||||
value :SET_OVERPAID, 18
|
||||
value :UNKNOWN_INVOICE, 19
|
||||
value :INVALID_KEYSEND, 20
|
||||
value :MPP_IN_PROGRESS, 21
|
||||
value :CIRCULAR_ROUTE, 22
|
||||
end
|
||||
add_enum "routerrpc.PaymentState" do
|
||||
value :IN_FLIGHT, 0
|
||||
value :SUCCEEDED, 1
|
||||
value :FAILED_TIMEOUT, 2
|
||||
value :FAILED_NO_ROUTE, 3
|
||||
value :FAILED_ERROR, 4
|
||||
value :FAILED_INCORRECT_PAYMENT_DETAILS, 5
|
||||
value :FAILED_INSUFFICIENT_BALANCE, 6
|
||||
end
|
||||
add_enum "routerrpc.ResolveHoldForwardAction" do
|
||||
value :SETTLE, 0
|
||||
value :FAIL, 1
|
||||
value :RESUME, 2
|
||||
end
|
||||
end
|
||||
add_enum "routerrpc.HtlcEvent.EventType" do
|
||||
value :UNKNOWN, 0
|
||||
value :SEND, 1
|
||||
value :RECEIVE, 2
|
||||
value :FORWARD, 3
|
||||
end
|
||||
add_message "routerrpc.HtlcInfo" do
|
||||
optional :incoming_timelock, :uint32, 1
|
||||
optional :outgoing_timelock, :uint32, 2
|
||||
optional :incoming_amt_msat, :uint64, 3
|
||||
optional :outgoing_amt_msat, :uint64, 4
|
||||
end
|
||||
add_message "routerrpc.ForwardEvent" do
|
||||
optional :info, :message, 1, "routerrpc.HtlcInfo"
|
||||
end
|
||||
add_message "routerrpc.ForwardFailEvent" do
|
||||
end
|
||||
add_message "routerrpc.SettleEvent" do
|
||||
end
|
||||
add_message "routerrpc.LinkFailEvent" do
|
||||
optional :info, :message, 1, "routerrpc.HtlcInfo"
|
||||
optional :wire_failure, :enum, 2, "lnrpc.Failure.FailureCode"
|
||||
optional :failure_detail, :enum, 3, "routerrpc.FailureDetail"
|
||||
optional :failure_string, :string, 4
|
||||
end
|
||||
add_message "routerrpc.PaymentStatus" do
|
||||
optional :state, :enum, 1, "routerrpc.PaymentState"
|
||||
optional :preimage, :bytes, 2
|
||||
repeated :htlcs, :message, 4, "lnrpc.HTLCAttempt"
|
||||
end
|
||||
add_enum "routerrpc.FailureDetail" do
|
||||
value :UNKNOWN, 0
|
||||
value :NO_DETAIL, 1
|
||||
value :ONION_DECODE, 2
|
||||
value :LINK_NOT_ELIGIBLE, 3
|
||||
value :ON_CHAIN_TIMEOUT, 4
|
||||
value :HTLC_EXCEEDS_MAX, 5
|
||||
value :INSUFFICIENT_BALANCE, 6
|
||||
value :INCOMPLETE_FORWARD, 7
|
||||
value :HTLC_ADD_FAILED, 8
|
||||
value :FORWARDS_DISABLED, 9
|
||||
value :INVOICE_CANCELED, 10
|
||||
value :INVOICE_UNDERPAID, 11
|
||||
value :INVOICE_EXPIRY_TOO_SOON, 12
|
||||
value :INVOICE_NOT_OPEN, 13
|
||||
value :MPP_INVOICE_TIMEOUT, 14
|
||||
value :ADDRESS_MISMATCH, 15
|
||||
value :SET_TOTAL_MISMATCH, 16
|
||||
value :SET_TOTAL_TOO_LOW, 17
|
||||
value :SET_OVERPAID, 18
|
||||
value :UNKNOWN_INVOICE, 19
|
||||
value :INVALID_KEYSEND, 20
|
||||
value :MPP_IN_PROGRESS, 21
|
||||
value :CIRCULAR_ROUTE, 22
|
||||
end
|
||||
add_enum "routerrpc.PaymentState" do
|
||||
value :IN_FLIGHT, 0
|
||||
value :SUCCEEDED, 1
|
||||
value :FAILED_TIMEOUT, 2
|
||||
value :FAILED_NO_ROUTE, 3
|
||||
value :FAILED_ERROR, 4
|
||||
value :FAILED_INCORRECT_PAYMENT_DETAILS, 5
|
||||
value :FAILED_INSUFFICIENT_BALANCE, 6
|
||||
end
|
||||
end
|
||||
|
||||
module Routerrpc
|
||||
SendPaymentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendPaymentRequest").msgclass
|
||||
TrackPaymentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.TrackPaymentRequest").msgclass
|
||||
RouteFeeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.RouteFeeRequest").msgclass
|
||||
RouteFeeResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.RouteFeeResponse").msgclass
|
||||
SendToRouteRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendToRouteRequest").msgclass
|
||||
SendToRouteResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendToRouteResponse").msgclass
|
||||
ResetMissionControlRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlRequest").msgclass
|
||||
ResetMissionControlResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlResponse").msgclass
|
||||
QueryMissionControlRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlRequest").msgclass
|
||||
QueryMissionControlResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlResponse").msgclass
|
||||
PairHistory = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairHistory").msgclass
|
||||
PairData = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairData").msgclass
|
||||
QueryProbabilityRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityRequest").msgclass
|
||||
QueryProbabilityResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityResponse").msgclass
|
||||
BuildRouteRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteRequest").msgclass
|
||||
BuildRouteResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteResponse").msgclass
|
||||
SubscribeHtlcEventsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SubscribeHtlcEventsRequest").msgclass
|
||||
HtlcEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcEvent").msgclass
|
||||
HtlcEvent::EventType = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcEvent.EventType").enummodule
|
||||
HtlcInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcInfo").msgclass
|
||||
ForwardEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardEvent").msgclass
|
||||
ForwardFailEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardFailEvent").msgclass
|
||||
SettleEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SettleEvent").msgclass
|
||||
LinkFailEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.LinkFailEvent").msgclass
|
||||
PaymentStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentStatus").msgclass
|
||||
FailureDetail = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.FailureDetail").enummodule
|
||||
PaymentState = Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentState").enummodule
|
||||
SendPaymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendPaymentRequest").msgclass
|
||||
TrackPaymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.TrackPaymentRequest").msgclass
|
||||
RouteFeeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.RouteFeeRequest").msgclass
|
||||
RouteFeeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.RouteFeeResponse").msgclass
|
||||
SendToRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendToRouteRequest").msgclass
|
||||
SendToRouteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SendToRouteResponse").msgclass
|
||||
ResetMissionControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlRequest").msgclass
|
||||
ResetMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResetMissionControlResponse").msgclass
|
||||
QueryMissionControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlRequest").msgclass
|
||||
QueryMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryMissionControlResponse").msgclass
|
||||
PairHistory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairHistory").msgclass
|
||||
PairData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairData").msgclass
|
||||
QueryProbabilityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityRequest").msgclass
|
||||
QueryProbabilityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.QueryProbabilityResponse").msgclass
|
||||
BuildRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteRequest").msgclass
|
||||
BuildRouteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.BuildRouteResponse").msgclass
|
||||
SubscribeHtlcEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SubscribeHtlcEventsRequest").msgclass
|
||||
HtlcEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcEvent").msgclass
|
||||
HtlcEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcEvent.EventType").enummodule
|
||||
HtlcInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.HtlcInfo").msgclass
|
||||
ForwardEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardEvent").msgclass
|
||||
ForwardFailEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardFailEvent").msgclass
|
||||
SettleEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SettleEvent").msgclass
|
||||
LinkFailEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.LinkFailEvent").msgclass
|
||||
PaymentStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentStatus").msgclass
|
||||
CircuitKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.CircuitKey").msgclass
|
||||
ForwardHtlcInterceptRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptRequest").msgclass
|
||||
ForwardHtlcInterceptResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptResponse").msgclass
|
||||
FailureDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.FailureDetail").enummodule
|
||||
PaymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentState").enummodule
|
||||
ResolveHoldForwardAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResolveHoldForwardAction").enummodule
|
||||
end
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
# Source: router.proto for package 'routerrpc'
|
||||
|
||||
require 'grpc'
|
||||
require_relative 'router_pb'
|
||||
require 'router_pb'
|
||||
|
||||
module Routerrpc
|
||||
module Router
|
||||
# Router is a service that offers advanced interaction with the router
|
||||
# subsystem of the daemon.
|
||||
class Service
|
||||
|
||||
include GRPC::GenericService
|
||||
|
@ -14,54 +16,69 @@ module Routerrpc
|
|||
self.unmarshal_class_method = :decode
|
||||
self.service_name = 'routerrpc.Router'
|
||||
|
||||
# *
|
||||
#
|
||||
# SendPaymentV2 attempts to route a payment described by the passed
|
||||
# PaymentRequest to the final destination. The call returns a stream of
|
||||
# payment updates.
|
||||
rpc :SendPaymentV2, SendPaymentRequest, stream(Lnrpc::Payment)
|
||||
# *
|
||||
rpc :SendPaymentV2, ::Routerrpc::SendPaymentRequest, stream(::Lnrpc::Payment)
|
||||
#
|
||||
# TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
# payment hash.
|
||||
rpc :TrackPaymentV2, TrackPaymentRequest, stream(Lnrpc::Payment)
|
||||
# *
|
||||
rpc :TrackPaymentV2, ::Routerrpc::TrackPaymentRequest, stream(::Lnrpc::Payment)
|
||||
#
|
||||
# EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
# may cost to send an HTLC to the target end destination.
|
||||
rpc :EstimateRouteFee, RouteFeeRequest, RouteFeeResponse
|
||||
# *
|
||||
# SendToRoute attempts to make a payment via the specified route. This method
|
||||
# differs from SendPayment in that it allows users to specify a full route
|
||||
# manually. This can be used for things like rebalancing, and atomic swaps.
|
||||
rpc :SendToRoute, SendToRouteRequest, SendToRouteResponse
|
||||
# *
|
||||
rpc :EstimateRouteFee, ::Routerrpc::RouteFeeRequest, ::Routerrpc::RouteFeeResponse
|
||||
#
|
||||
# Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
# the specified route. This method differs from SendPayment in that it
|
||||
# allows users to specify a full route manually. This can be used for
|
||||
# things like rebalancing, and atomic swaps. It differs from the newer
|
||||
# SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
rpc :SendToRoute, ::Routerrpc::SendToRouteRequest, ::Routerrpc::SendToRouteResponse
|
||||
#
|
||||
# SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
# method differs from SendPayment in that it allows users to specify a full
|
||||
# route manually. This can be used for things like rebalancing, and atomic
|
||||
# swaps.
|
||||
rpc :SendToRouteV2, ::Routerrpc::SendToRouteRequest, ::Lnrpc::HTLCAttempt
|
||||
#
|
||||
# ResetMissionControl clears all mission control state and starts with a clean
|
||||
# slate.
|
||||
rpc :ResetMissionControl, ResetMissionControlRequest, ResetMissionControlResponse
|
||||
# *
|
||||
rpc :ResetMissionControl, ::Routerrpc::ResetMissionControlRequest, ::Routerrpc::ResetMissionControlResponse
|
||||
#
|
||||
# QueryMissionControl exposes the internal mission control state to callers.
|
||||
# It is a development feature.
|
||||
rpc :QueryMissionControl, QueryMissionControlRequest, QueryMissionControlResponse
|
||||
# *
|
||||
rpc :QueryMissionControl, ::Routerrpc::QueryMissionControlRequest, ::Routerrpc::QueryMissionControlResponse
|
||||
#
|
||||
# QueryProbability returns the current success probability estimate for a
|
||||
# given node pair and amount.
|
||||
rpc :QueryProbability, QueryProbabilityRequest, QueryProbabilityResponse
|
||||
# *
|
||||
rpc :QueryProbability, ::Routerrpc::QueryProbabilityRequest, ::Routerrpc::QueryProbabilityResponse
|
||||
#
|
||||
# BuildRoute builds a fully specified route based on a list of hop public
|
||||
# keys. It retrieves the relevant channel policies from the graph in order to
|
||||
# calculate the correct fees and time locks.
|
||||
rpc :BuildRoute, BuildRouteRequest, BuildRouteResponse
|
||||
# *
|
||||
rpc :BuildRoute, ::Routerrpc::BuildRouteRequest, ::Routerrpc::BuildRouteResponse
|
||||
#
|
||||
# SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
# the client which delivers a stream of htlc events.
|
||||
rpc :SubscribeHtlcEvents, SubscribeHtlcEventsRequest, stream(HtlcEvent)
|
||||
# *
|
||||
rpc :SubscribeHtlcEvents, ::Routerrpc::SubscribeHtlcEventsRequest, stream(::Routerrpc::HtlcEvent)
|
||||
#
|
||||
# Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
# described by the passed PaymentRequest to the final destination. The call
|
||||
# returns a stream of payment status updates.
|
||||
rpc :SendPayment, SendPaymentRequest, stream(PaymentStatus)
|
||||
# *
|
||||
rpc :SendPayment, ::Routerrpc::SendPaymentRequest, stream(::Routerrpc::PaymentStatus)
|
||||
#
|
||||
# Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
# the payment identified by the payment hash.
|
||||
rpc :TrackPayment, TrackPaymentRequest, stream(PaymentStatus)
|
||||
rpc :TrackPayment, ::Routerrpc::TrackPaymentRequest, stream(::Routerrpc::PaymentStatus)
|
||||
# *
|
||||
# HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
# Forwarded HTLC requests are sent to the client and the client responds with
|
||||
# a boolean that tells LND if this htlc should be intercepted.
|
||||
# In case of interception, the htlc can be either settled, cancelled or
|
||||
# resumed later by using the ResolveHoldForward endpoint.
|
||||
rpc :HtlcInterceptor, stream(::Routerrpc::ForwardHtlcInterceptResponse), stream(::Routerrpc::ForwardHtlcInterceptRequest)
|
||||
end
|
||||
|
||||
Stub = Service.rpc_stub_class
|
||||
|
|
1820
lib/lnrpc/rpc.proto
1820
lib/lnrpc/rpc.proto
File diff suppressed because it is too large
Load Diff
2469
lib/lnrpc/rpc_pb.rb
2469
lib/lnrpc/rpc_pb.rb
File diff suppressed because it is too large
Load Diff
|
@ -2,19 +2,15 @@
|
|||
# Source: rpc.proto for package 'lnrpc'
|
||||
|
||||
require 'grpc'
|
||||
require_relative 'rpc_pb'
|
||||
require 'rpc_pb'
|
||||
|
||||
module Lnrpc
|
||||
module WalletUnlocker
|
||||
# *
|
||||
module Lightning
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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.
|
||||
# can be in either block or // comment format.
|
||||
#
|
||||
# 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:
|
||||
|
@ -27,53 +23,7 @@ module Lnrpc
|
|||
# this proto file can be found here:
|
||||
# https://github.com/lightninglabs/lightning-api
|
||||
#
|
||||
# The WalletUnlocker service is used to set up a wallet password for
|
||||
# lnd at first startup, and unlock a previously set up wallet.
|
||||
class Service
|
||||
|
||||
include GRPC::GenericService
|
||||
|
||||
self.marshal_class_method = :encode
|
||||
self.unmarshal_class_method = :decode
|
||||
self.service_name = 'lnrpc.WalletUnlocker'
|
||||
|
||||
# *
|
||||
# GenSeed is the first method that should be used to instantiate a new lnd
|
||||
# instance. This method allows a caller to generate a new aezeed cipher seed
|
||||
# given an optional passphrase. If provided, the passphrase will be necessary
|
||||
# to decrypt the cipherseed to expose the internal wallet seed.
|
||||
#
|
||||
# Once the cipherseed is obtained and verified by the user, the InitWallet
|
||||
# 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
|
||||
# on disk.
|
||||
#
|
||||
# In the case of a recovery scenario, the user can also specify their aezeed
|
||||
# mnemonic and passphrase. If set, then the daemon will use this prior state
|
||||
# to initialize its internal wallet.
|
||||
#
|
||||
# Alternatively, this can be used along with the GenSeed RPC to obtain a
|
||||
# seed, then present it to the user. Once it has been verified by the user,
|
||||
# the seed can be fed into this RPC in order to commit the new wallet.
|
||||
rpc :InitWallet, InitWalletRequest, InitWalletResponse
|
||||
# * lncli: `unlock`
|
||||
# UnlockWallet is used at startup of lnd to provide a password to unlock
|
||||
# the wallet database.
|
||||
rpc :UnlockWallet, UnlockWalletRequest, UnlockWalletResponse
|
||||
# * lncli: `changepassword`
|
||||
# ChangePassword changes the password of the encrypted wallet. This will
|
||||
# automatically unlock the wallet database if successful.
|
||||
rpc :ChangePassword, ChangePasswordRequest, ChangePasswordResponse
|
||||
end
|
||||
|
||||
Stub = Service.rpc_stub_class
|
||||
end
|
||||
module Lightning
|
||||
# Lightning is the main RPC server of the daemon.
|
||||
class Service
|
||||
|
||||
include GRPC::GenericService
|
||||
|
@ -82,111 +32,123 @@ module Lnrpc
|
|||
self.unmarshal_class_method = :decode
|
||||
self.service_name = 'lnrpc.Lightning'
|
||||
|
||||
# * lncli: `walletbalance`
|
||||
# lncli: `walletbalance`
|
||||
# WalletBalance returns total unspent outputs(confirmed and unconfirmed), all
|
||||
# confirmed unspent outputs and all unconfirmed unspent outputs under control
|
||||
# of the wallet.
|
||||
rpc :WalletBalance, WalletBalanceRequest, WalletBalanceResponse
|
||||
# * lncli: `channelbalance`
|
||||
rpc :WalletBalance, ::Lnrpc::WalletBalanceRequest, ::Lnrpc::WalletBalanceResponse
|
||||
# lncli: `channelbalance`
|
||||
# ChannelBalance returns the total funds available across all open channels
|
||||
# in satoshis.
|
||||
rpc :ChannelBalance, ChannelBalanceRequest, ChannelBalanceResponse
|
||||
# * lncli: `listchaintxns`
|
||||
rpc :ChannelBalance, ::Lnrpc::ChannelBalanceRequest, ::Lnrpc::ChannelBalanceResponse
|
||||
# lncli: `listchaintxns`
|
||||
# GetTransactions returns a list describing all the known transactions
|
||||
# relevant to the wallet.
|
||||
rpc :GetTransactions, GetTransactionsRequest, TransactionDetails
|
||||
# * lncli: `estimatefee`
|
||||
rpc :GetTransactions, ::Lnrpc::GetTransactionsRequest, ::Lnrpc::TransactionDetails
|
||||
# lncli: `estimatefee`
|
||||
# EstimateFee asks the chain backend to estimate the fee rate and total fees
|
||||
# for a transaction that pays to multiple specified outputs.
|
||||
rpc :EstimateFee, EstimateFeeRequest, EstimateFeeResponse
|
||||
# * lncli: `sendcoins`
|
||||
#
|
||||
# When using REST, the `AddrToAmount` map type can be set by appending
|
||||
# `&AddrToAmount[<address>]=<amount_to_send>` to the URL. Unfortunately this
|
||||
# map type doesn't appear in the REST API documentation because of a bug in
|
||||
# the grpc-gateway library.
|
||||
rpc :EstimateFee, ::Lnrpc::EstimateFeeRequest, ::Lnrpc::EstimateFeeResponse
|
||||
# lncli: `sendcoins`
|
||||
# SendCoins executes a request to send coins to a particular address. Unlike
|
||||
# SendMany, this RPC call only allows creating a single output at a time. If
|
||||
# neither target_conf, or sat_per_byte are set, then the internal wallet will
|
||||
# consult its fee model to determine a fee for the default confirmation
|
||||
# target.
|
||||
rpc :SendCoins, SendCoinsRequest, SendCoinsResponse
|
||||
# * lncli: `listunspent`
|
||||
rpc :SendCoins, ::Lnrpc::SendCoinsRequest, ::Lnrpc::SendCoinsResponse
|
||||
# lncli: `listunspent`
|
||||
# Deprecated, use walletrpc.ListUnspent instead.
|
||||
#
|
||||
# ListUnspent returns a list of all utxos spendable by the wallet with a
|
||||
# number of confirmations between the specified minimum and maximum.
|
||||
rpc :ListUnspent, ListUnspentRequest, ListUnspentResponse
|
||||
# *
|
||||
rpc :ListUnspent, ::Lnrpc::ListUnspentRequest, ::Lnrpc::ListUnspentResponse
|
||||
#
|
||||
# SubscribeTransactions creates a uni-directional stream from the server to
|
||||
# the client in which any newly discovered transactions relevant to the
|
||||
# wallet are sent over.
|
||||
rpc :SubscribeTransactions, GetTransactionsRequest, stream(Transaction)
|
||||
# * lncli: `sendmany`
|
||||
rpc :SubscribeTransactions, ::Lnrpc::GetTransactionsRequest, stream(::Lnrpc::Transaction)
|
||||
# lncli: `sendmany`
|
||||
# SendMany handles a request for a transaction that creates multiple specified
|
||||
# outputs in parallel. If neither target_conf, or sat_per_byte are set, then
|
||||
# the internal wallet will consult its fee model to determine a fee for the
|
||||
# default confirmation target.
|
||||
rpc :SendMany, SendManyRequest, SendManyResponse
|
||||
# * lncli: `newaddress`
|
||||
rpc :SendMany, ::Lnrpc::SendManyRequest, ::Lnrpc::SendManyResponse
|
||||
# lncli: `newaddress`
|
||||
# NewAddress creates a new address under control of the local wallet.
|
||||
rpc :NewAddress, NewAddressRequest, NewAddressResponse
|
||||
# * lncli: `signmessage`
|
||||
rpc :NewAddress, ::Lnrpc::NewAddressRequest, ::Lnrpc::NewAddressResponse
|
||||
# lncli: `signmessage`
|
||||
# SignMessage signs a message with this node's private key. The returned
|
||||
# signature string is `zbase32` encoded and pubkey recoverable, meaning that
|
||||
# only the message digest and signature are needed for verification.
|
||||
rpc :SignMessage, SignMessageRequest, SignMessageResponse
|
||||
# * lncli: `verifymessage`
|
||||
rpc :SignMessage, ::Lnrpc::SignMessageRequest, ::Lnrpc::SignMessageResponse
|
||||
# lncli: `verifymessage`
|
||||
# VerifyMessage verifies a signature over a msg. The signature must be
|
||||
# zbase32 encoded and signed by an active node in the resident node's
|
||||
# channel database. In addition to returning the validity of the signature,
|
||||
# VerifyMessage also returns the recovered pubkey from the signature.
|
||||
rpc :VerifyMessage, VerifyMessageRequest, VerifyMessageResponse
|
||||
# * lncli: `connect`
|
||||
rpc :VerifyMessage, ::Lnrpc::VerifyMessageRequest, ::Lnrpc::VerifyMessageResponse
|
||||
# lncli: `connect`
|
||||
# ConnectPeer attempts to establish a connection to a remote peer. This is at
|
||||
# the networking level, and is used for communication between nodes. This is
|
||||
# distinct from establishing a channel with a peer.
|
||||
rpc :ConnectPeer, ConnectPeerRequest, ConnectPeerResponse
|
||||
# * lncli: `disconnect`
|
||||
rpc :ConnectPeer, ::Lnrpc::ConnectPeerRequest, ::Lnrpc::ConnectPeerResponse
|
||||
# lncli: `disconnect`
|
||||
# DisconnectPeer attempts to disconnect one peer from another identified by a
|
||||
# given pubKey. In the case that we currently have a pending or active channel
|
||||
# with the target peer, then this action will be not be allowed.
|
||||
rpc :DisconnectPeer, DisconnectPeerRequest, DisconnectPeerResponse
|
||||
# * lncli: `listpeers`
|
||||
rpc :DisconnectPeer, ::Lnrpc::DisconnectPeerRequest, ::Lnrpc::DisconnectPeerResponse
|
||||
# lncli: `listpeers`
|
||||
# ListPeers returns a verbose listing of all currently active peers.
|
||||
rpc :ListPeers, ListPeersRequest, ListPeersResponse
|
||||
# *
|
||||
rpc :ListPeers, ::Lnrpc::ListPeersRequest, ::Lnrpc::ListPeersResponse
|
||||
#
|
||||
# SubscribePeerEvents creates a uni-directional stream from the server to
|
||||
# the client in which any events relevant to the state of peers are sent
|
||||
# over. Events include peers going online and offline.
|
||||
rpc :SubscribePeerEvents, PeerEventSubscription, stream(PeerEvent)
|
||||
# * lncli: `getinfo`
|
||||
rpc :SubscribePeerEvents, ::Lnrpc::PeerEventSubscription, stream(::Lnrpc::PeerEvent)
|
||||
# lncli: `getinfo`
|
||||
# GetInfo returns general information concerning the lightning node including
|
||||
# it's identity pubkey, alias, the chains it is connected to, and information
|
||||
# concerning the number of open+pending channels.
|
||||
rpc :GetInfo, GetInfoRequest, GetInfoResponse
|
||||
rpc :GetInfo, ::Lnrpc::GetInfoRequest, ::Lnrpc::GetInfoResponse
|
||||
# * lncli: `getrecoveryinfo`
|
||||
# GetRecoveryInfo returns information concerning the recovery mode including
|
||||
# whether it's in a recovery mode, whether the recovery is finished, and the
|
||||
# progress made so far.
|
||||
rpc :GetRecoveryInfo, ::Lnrpc::GetRecoveryInfoRequest, ::Lnrpc::GetRecoveryInfoResponse
|
||||
# TODO(roasbeef): merge with below with bool?
|
||||
#
|
||||
# * lncli: `pendingchannels`
|
||||
# lncli: `pendingchannels`
|
||||
# PendingChannels returns a list of all the channels that are currently
|
||||
# considered "pending". A channel is pending if it has finished the funding
|
||||
# workflow and is waiting for confirmations for the funding txn, or is in the
|
||||
# process of closure, either initiated cooperatively or non-cooperatively.
|
||||
rpc :PendingChannels, PendingChannelsRequest, PendingChannelsResponse
|
||||
# * lncli: `listchannels`
|
||||
rpc :PendingChannels, ::Lnrpc::PendingChannelsRequest, ::Lnrpc::PendingChannelsResponse
|
||||
# lncli: `listchannels`
|
||||
# ListChannels returns a description of all the open channels that this node
|
||||
# is a participant in.
|
||||
rpc :ListChannels, ListChannelsRequest, ListChannelsResponse
|
||||
# *
|
||||
rpc :ListChannels, ::Lnrpc::ListChannelsRequest, ::Lnrpc::ListChannelsResponse
|
||||
#
|
||||
# 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
|
||||
# channels.
|
||||
rpc :SubscribeChannelEvents, ChannelEventSubscription, stream(ChannelEventUpdate)
|
||||
# * lncli: `closedchannels`
|
||||
rpc :SubscribeChannelEvents, ::Lnrpc::ChannelEventSubscription, stream(::Lnrpc::ChannelEventUpdate)
|
||||
# lncli: `closedchannels`
|
||||
# ClosedChannels returns a description of all the closed channels that
|
||||
# this node was a participant in.
|
||||
rpc :ClosedChannels, ClosedChannelsRequest, ClosedChannelsResponse
|
||||
# *
|
||||
rpc :ClosedChannels, ::Lnrpc::ClosedChannelsRequest, ::Lnrpc::ClosedChannelsResponse
|
||||
#
|
||||
# OpenChannelSync is a synchronous version of the OpenChannel RPC call. This
|
||||
# call is meant to be consumed by clients to the REST proxy. As with all
|
||||
# other sync calls, all byte slices are intended to be populated as hex
|
||||
# encoded strings.
|
||||
rpc :OpenChannelSync, OpenChannelRequest, ChannelPoint
|
||||
# * lncli: `openchannel`
|
||||
rpc :OpenChannelSync, ::Lnrpc::OpenChannelRequest, ::Lnrpc::ChannelPoint
|
||||
# lncli: `openchannel`
|
||||
# OpenChannel attempts to open a singly funded channel specified in the
|
||||
# request to a remote peer. Users are able to specify a target number of
|
||||
# blocks that the funding transaction should be confirmed in, or a manual fee
|
||||
|
@ -195,8 +157,8 @@ module Lnrpc
|
|||
# the pending channel ID of the in-progress channel. Depending on the
|
||||
# arguments specified in the OpenChannelRequest, this pending channel ID can
|
||||
# then be used to manually progress the channel funding flow.
|
||||
rpc :OpenChannel, OpenChannelRequest, stream(OpenStatusUpdate)
|
||||
# *
|
||||
rpc :OpenChannel, ::Lnrpc::OpenChannelRequest, stream(::Lnrpc::OpenStatusUpdate)
|
||||
#
|
||||
# FundingStateStep is an advanced funding related call that allows the caller
|
||||
# to either execute some preparatory steps for a funding workflow, or
|
||||
# manually progress a funding workflow. The primary way a funding flow is
|
||||
|
@ -205,15 +167,15 @@ module Lnrpc
|
|||
# pending channel ID, for which we need to use specific parameters.
|
||||
# Alternatively, this can be used to interactively drive PSBT signing for
|
||||
# funding for partially complete funding transactions.
|
||||
rpc :FundingStateStep, FundingTransitionMsg, FundingStateStepResp
|
||||
# *
|
||||
rpc :FundingStateStep, ::Lnrpc::FundingTransitionMsg, ::Lnrpc::FundingStateStepResp
|
||||
#
|
||||
# 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`
|
||||
rpc :ChannelAcceptor, stream(::Lnrpc::ChannelAcceptResponse), stream(::Lnrpc::ChannelAcceptRequest)
|
||||
# lncli: `closechannel`
|
||||
# CloseChannel attempts to close an active channel identified by its channel
|
||||
# outpoint (ChannelPoint). The actions of this method can additionally be
|
||||
# augmented to attempt a force close after a timeout period in the case of an
|
||||
|
@ -221,42 +183,43 @@ module Lnrpc
|
|||
# then the user can specify either a target number of blocks until the
|
||||
# closure transaction is confirmed, or a manual fee rate. If neither are
|
||||
# specified, then a default lax, block confirmation target is used.
|
||||
rpc :CloseChannel, CloseChannelRequest, stream(CloseStatusUpdate)
|
||||
# * lncli: `abandonchannel`
|
||||
rpc :CloseChannel, ::Lnrpc::CloseChannelRequest, stream(::Lnrpc::CloseStatusUpdate)
|
||||
# lncli: `abandonchannel`
|
||||
# AbandonChannel removes all channel state from the database except for a
|
||||
# close summary. This method can be used to get rid of permanently unusable
|
||||
# channels due to bugs fixed in newer versions of lnd. Only available
|
||||
# when in debug builds of lnd.
|
||||
rpc :AbandonChannel, AbandonChannelRequest, AbandonChannelResponse
|
||||
# * lncli: `sendpayment`
|
||||
# Deprecated, use routerrpc.SendPayment. SendPayment dispatches a
|
||||
rpc :AbandonChannel, ::Lnrpc::AbandonChannelRequest, ::Lnrpc::AbandonChannelResponse
|
||||
# lncli: `sendpayment`
|
||||
# Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a
|
||||
# bi-directional streaming RPC for sending payments through the Lightning
|
||||
# Network. A single RPC invocation creates a persistent bi-directional
|
||||
# stream allowing clients to rapidly send payments through the Lightning
|
||||
# Network with a single persistent connection.
|
||||
rpc :SendPayment, stream(SendRequest), stream(SendResponse)
|
||||
# *
|
||||
rpc :SendPayment, stream(::Lnrpc::SendRequest), stream(::Lnrpc::SendResponse)
|
||||
#
|
||||
# SendPaymentSync is the synchronous non-streaming version of SendPayment.
|
||||
# This RPC is intended to be consumed by clients of the REST proxy.
|
||||
# Additionally, this RPC expects the destination's public key and the payment
|
||||
# hash (if any) to be encoded as hex strings.
|
||||
rpc :SendPaymentSync, SendRequest, SendResponse
|
||||
# * lncli: `sendtoroute`
|
||||
# SendToRoute is a bi-directional streaming RPC for sending payment through
|
||||
# the Lightning Network. This method differs from SendPayment in that it
|
||||
# allows users to specify a full route manually. This can be used for things
|
||||
# like rebalancing, and atomic swaps.
|
||||
rpc :SendToRoute, stream(SendToRouteRequest), stream(SendResponse)
|
||||
# *
|
||||
rpc :SendPaymentSync, ::Lnrpc::SendRequest, ::Lnrpc::SendResponse
|
||||
# lncli: `sendtoroute`
|
||||
# Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional
|
||||
# streaming RPC for sending payment through the Lightning Network. This
|
||||
# method differs from SendPayment in that it allows users to specify a full
|
||||
# route manually. This can be used for things like rebalancing, and atomic
|
||||
# swaps.
|
||||
rpc :SendToRoute, stream(::Lnrpc::SendToRouteRequest), stream(::Lnrpc::SendResponse)
|
||||
#
|
||||
# SendToRouteSync is a synchronous version of SendToRoute. It Will block
|
||||
# until the payment either fails or succeeds.
|
||||
rpc :SendToRouteSync, SendToRouteRequest, SendResponse
|
||||
# * lncli: `addinvoice`
|
||||
rpc :SendToRouteSync, ::Lnrpc::SendToRouteRequest, ::Lnrpc::SendResponse
|
||||
# lncli: `addinvoice`
|
||||
# AddInvoice attempts to add a new invoice to the invoice database. Any
|
||||
# duplicated invoices are rejected, therefore all invoices *must* have a
|
||||
# unique payment preimage.
|
||||
rpc :AddInvoice, Invoice, AddInvoiceResponse
|
||||
# * lncli: `listinvoices`
|
||||
rpc :AddInvoice, ::Lnrpc::Invoice, ::Lnrpc::AddInvoiceResponse
|
||||
# lncli: `listinvoices`
|
||||
# ListInvoices returns a list of all the invoices currently stored within the
|
||||
# database. Any active debug invoices are ignored. It has full support for
|
||||
# paginated responses, allowing users to query for specific invoices through
|
||||
|
@ -264,13 +227,13 @@ module Lnrpc
|
|||
# last_index_offset fields included in the response as the index_offset of the
|
||||
# next request. By default, the first 100 invoices created will be returned.
|
||||
# Backwards pagination is also supported through the Reversed flag.
|
||||
rpc :ListInvoices, ListInvoiceRequest, ListInvoiceResponse
|
||||
# * lncli: `lookupinvoice`
|
||||
rpc :ListInvoices, ::Lnrpc::ListInvoiceRequest, ::Lnrpc::ListInvoiceResponse
|
||||
# lncli: `lookupinvoice`
|
||||
# LookupInvoice attempts to look up an invoice according to its payment hash.
|
||||
# The passed payment hash *must* be exactly 32 bytes, if not, an error is
|
||||
# returned.
|
||||
rpc :LookupInvoice, PaymentHash, Invoice
|
||||
# *
|
||||
rpc :LookupInvoice, ::Lnrpc::PaymentHash, ::Lnrpc::Invoice
|
||||
#
|
||||
# SubscribeInvoices returns a uni-directional stream (server -> client) for
|
||||
# notifying the client of newly added/settled invoices. The caller can
|
||||
# optionally specify the add_index and/or the settle_index. If the add_index
|
||||
|
@ -280,78 +243,83 @@ module Lnrpc
|
|||
# invoices with a settle_index greater than the specified value. One or both
|
||||
# of these fields can be set. If no fields are set, then we'll only send out
|
||||
# the latest add/settle events.
|
||||
rpc :SubscribeInvoices, InvoiceSubscription, stream(Invoice)
|
||||
# * lncli: `decodepayreq`
|
||||
rpc :SubscribeInvoices, ::Lnrpc::InvoiceSubscription, stream(::Lnrpc::Invoice)
|
||||
# lncli: `decodepayreq`
|
||||
# DecodePayReq takes an encoded payment request string and attempts to decode
|
||||
# it, returning a full description of the conditions encoded within the
|
||||
# payment request.
|
||||
rpc :DecodePayReq, PayReqString, PayReq
|
||||
# * lncli: `listpayments`
|
||||
rpc :DecodePayReq, ::Lnrpc::PayReqString, ::Lnrpc::PayReq
|
||||
# lncli: `listpayments`
|
||||
# ListPayments returns a list of all outgoing payments.
|
||||
rpc :ListPayments, ListPaymentsRequest, ListPaymentsResponse
|
||||
# *
|
||||
rpc :ListPayments, ::Lnrpc::ListPaymentsRequest, ::Lnrpc::ListPaymentsResponse
|
||||
#
|
||||
# DeleteAllPayments deletes all outgoing payments from DB.
|
||||
rpc :DeleteAllPayments, DeleteAllPaymentsRequest, DeleteAllPaymentsResponse
|
||||
# * lncli: `describegraph`
|
||||
rpc :DeleteAllPayments, ::Lnrpc::DeleteAllPaymentsRequest, ::Lnrpc::DeleteAllPaymentsResponse
|
||||
# lncli: `describegraph`
|
||||
# DescribeGraph returns a description of the latest graph state from the
|
||||
# point of view of the node. The graph information is partitioned into two
|
||||
# components: all the nodes/vertexes, and all the edges that connect the
|
||||
# vertexes themselves. As this is a directed graph, the edges also contain
|
||||
# the node directional specific routing policy which includes: the time lock
|
||||
# delta, fee information, etc.
|
||||
rpc :DescribeGraph, ChannelGraphRequest, ChannelGraph
|
||||
# * lncli: `getnodemetrics`
|
||||
rpc :DescribeGraph, ::Lnrpc::ChannelGraphRequest, ::Lnrpc::ChannelGraph
|
||||
# lncli: `getnodemetrics`
|
||||
# GetNodeMetrics returns node metrics calculated from the graph. Currently
|
||||
# the only supported metric is betweenness centrality of individual nodes.
|
||||
rpc :GetNodeMetrics, NodeMetricsRequest, NodeMetricsResponse
|
||||
# * lncli: `getchaninfo`
|
||||
rpc :GetNodeMetrics, ::Lnrpc::NodeMetricsRequest, ::Lnrpc::NodeMetricsResponse
|
||||
# lncli: `getchaninfo`
|
||||
# GetChanInfo returns the latest authenticated network announcement for the
|
||||
# given channel identified by its channel ID: an 8-byte integer which
|
||||
# uniquely identifies the location of transaction's funding output within the
|
||||
# blockchain.
|
||||
rpc :GetChanInfo, ChanInfoRequest, ChannelEdge
|
||||
# * lncli: `getnodeinfo`
|
||||
rpc :GetChanInfo, ::Lnrpc::ChanInfoRequest, ::Lnrpc::ChannelEdge
|
||||
# lncli: `getnodeinfo`
|
||||
# GetNodeInfo returns the latest advertised, aggregated, and authenticated
|
||||
# channel information for the specified node identified by its public key.
|
||||
rpc :GetNodeInfo, NodeInfoRequest, NodeInfo
|
||||
# * lncli: `queryroutes`
|
||||
rpc :GetNodeInfo, ::Lnrpc::NodeInfoRequest, ::Lnrpc::NodeInfo
|
||||
# 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 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
|
||||
# * lncli: `getnetworkinfo`
|
||||
#
|
||||
# When using REST, the `dest_custom_records` map type can be set by appending
|
||||
# `&dest_custom_records[<record_number>]=<record_data_base64_url_encoded>`
|
||||
# to the URL. Unfortunately this map type doesn't appear in the REST API
|
||||
# documentation because of a bug in the grpc-gateway library.
|
||||
rpc :QueryRoutes, ::Lnrpc::QueryRoutesRequest, ::Lnrpc::QueryRoutesResponse
|
||||
# lncli: `getnetworkinfo`
|
||||
# GetNetworkInfo returns some basic stats about the known channel graph from
|
||||
# the point of view of the node.
|
||||
rpc :GetNetworkInfo, NetworkInfoRequest, NetworkInfo
|
||||
# * lncli: `stop`
|
||||
rpc :GetNetworkInfo, ::Lnrpc::NetworkInfoRequest, ::Lnrpc::NetworkInfo
|
||||
# lncli: `stop`
|
||||
# StopDaemon will send a shutdown request to the interrupt handler, triggering
|
||||
# a graceful shutdown of the daemon.
|
||||
rpc :StopDaemon, StopRequest, StopResponse
|
||||
# *
|
||||
rpc :StopDaemon, ::Lnrpc::StopRequest, ::Lnrpc::StopResponse
|
||||
#
|
||||
# SubscribeChannelGraph launches a streaming RPC that allows the caller to
|
||||
# receive notifications upon any changes to the channel graph topology from
|
||||
# the point of view of the responding node. Events notified include: new
|
||||
# nodes coming online, nodes updating their authenticated attributes, new
|
||||
# channels being advertised, updates in the routing policy for a directional
|
||||
# channel edge, and when channels are closed on-chain.
|
||||
rpc :SubscribeChannelGraph, GraphTopologySubscription, stream(GraphTopologyUpdate)
|
||||
# * lncli: `debuglevel`
|
||||
rpc :SubscribeChannelGraph, ::Lnrpc::GraphTopologySubscription, stream(::Lnrpc::GraphTopologyUpdate)
|
||||
# lncli: `debuglevel`
|
||||
# DebugLevel allows a caller to programmatically set the logging verbosity of
|
||||
# lnd. The logging can be targeted according to a coarse daemon-wide logging
|
||||
# level, or in a granular fashion to specify the logging for a target
|
||||
# sub-system.
|
||||
rpc :DebugLevel, DebugLevelRequest, DebugLevelResponse
|
||||
# * lncli: `feereport`
|
||||
rpc :DebugLevel, ::Lnrpc::DebugLevelRequest, ::Lnrpc::DebugLevelResponse
|
||||
# lncli: `feereport`
|
||||
# FeeReport allows the caller to obtain a report detailing the current fee
|
||||
# schedule enforced by the node globally for each channel.
|
||||
rpc :FeeReport, FeeReportRequest, FeeReportResponse
|
||||
# * lncli: `updatechanpolicy`
|
||||
rpc :FeeReport, ::Lnrpc::FeeReportRequest, ::Lnrpc::FeeReportResponse
|
||||
# lncli: `updatechanpolicy`
|
||||
# UpdateChannelPolicy allows the caller to update the fee schedule and
|
||||
# channel policies for all channels globally, or a particular channel.
|
||||
rpc :UpdateChannelPolicy, PolicyUpdateRequest, PolicyUpdateResponse
|
||||
# * lncli: `fwdinghistory`
|
||||
rpc :UpdateChannelPolicy, ::Lnrpc::PolicyUpdateRequest, ::Lnrpc::PolicyUpdateResponse
|
||||
# lncli: `fwdinghistory`
|
||||
# ForwardingHistory allows the caller to query the htlcswitch for a record of
|
||||
# all HTLCs forwarded within the target time range, and integer offset
|
||||
# within that time range. If no time-range is specified, then the first chunk
|
||||
|
@ -362,34 +330,34 @@ module Lnrpc
|
|||
# As a result each message can only contain 50k entries. Each response has
|
||||
# the index offset of the last entry. The index offset can be provided to the
|
||||
# request to allow the caller to skip a series of records.
|
||||
rpc :ForwardingHistory, ForwardingHistoryRequest, ForwardingHistoryResponse
|
||||
# * lncli: `exportchanbackup`
|
||||
rpc :ForwardingHistory, ::Lnrpc::ForwardingHistoryRequest, ::Lnrpc::ForwardingHistoryResponse
|
||||
# lncli: `exportchanbackup`
|
||||
# ExportChannelBackup attempts to return an encrypted static channel backup
|
||||
# for the target channel identified by it channel point. The backup is
|
||||
# encrypted with a key generated from the aezeed seed of the user. The
|
||||
# returned backup can either be restored using the RestoreChannelBackup
|
||||
# method once lnd is running, or via the InitWallet and UnlockWallet methods
|
||||
# from the WalletUnlocker service.
|
||||
rpc :ExportChannelBackup, ExportChannelBackupRequest, ChannelBackup
|
||||
# *
|
||||
rpc :ExportChannelBackup, ::Lnrpc::ExportChannelBackupRequest, ::Lnrpc::ChannelBackup
|
||||
#
|
||||
# ExportAllChannelBackups returns static channel backups for all existing
|
||||
# channels known to lnd. A set of regular singular static channel backups for
|
||||
# each channel are returned. Additionally, a multi-channel backup is returned
|
||||
# as well, which contains a single encrypted blob containing the backups of
|
||||
# each channel.
|
||||
rpc :ExportAllChannelBackups, ChanBackupExportRequest, ChanBackupSnapshot
|
||||
# *
|
||||
rpc :ExportAllChannelBackups, ::Lnrpc::ChanBackupExportRequest, ::Lnrpc::ChanBackupSnapshot
|
||||
#
|
||||
# VerifyChanBackup allows a caller to verify the integrity of a channel backup
|
||||
# snapshot. This method will accept either a packed Single or a packed Multi.
|
||||
# Specifying both will result in an error.
|
||||
rpc :VerifyChanBackup, ChanBackupSnapshot, VerifyChanBackupResponse
|
||||
# * lncli: `restorechanbackup`
|
||||
rpc :VerifyChanBackup, ::Lnrpc::ChanBackupSnapshot, ::Lnrpc::VerifyChanBackupResponse
|
||||
# lncli: `restorechanbackup`
|
||||
# RestoreChannelBackups accepts a set of singular channel backups, or a
|
||||
# single encrypted multi-chan backup and attempts to recover any funds
|
||||
# remaining within the channel. If we are able to unpack the backup, then the
|
||||
# new channel will be shown under listchannels, as well as pending channels.
|
||||
rpc :RestoreChannelBackups, RestoreChanBackupRequest, RestoreBackupResponse
|
||||
# *
|
||||
rpc :RestoreChannelBackups, ::Lnrpc::RestoreChanBackupRequest, ::Lnrpc::RestoreBackupResponse
|
||||
#
|
||||
# SubscribeChannelBackups allows a client to sub-subscribe to the most up to
|
||||
# date information concerning the state of all channel backups. Each time a
|
||||
# new channel is added, we return the new set of channels, along with a
|
||||
|
@ -397,12 +365,12 @@ module Lnrpc
|
|||
# channel is closed, we send a new update, which contains new new chan back
|
||||
# ups, but the updated set of encrypted multi-chan backups with the closed
|
||||
# channel(s) removed.
|
||||
rpc :SubscribeChannelBackups, ChannelBackupSubscription, stream(ChanBackupSnapshot)
|
||||
# * lncli: `bakemacaroon`
|
||||
rpc :SubscribeChannelBackups, ::Lnrpc::ChannelBackupSubscription, stream(::Lnrpc::ChanBackupSnapshot)
|
||||
# lncli: `bakemacaroon`
|
||||
# BakeMacaroon allows the creation of a new macaroon with custom read and
|
||||
# write permissions. No first-party caveats are added since this can be done
|
||||
# offline.
|
||||
rpc :BakeMacaroon, BakeMacaroonRequest, BakeMacaroonResponse
|
||||
rpc :BakeMacaroon, ::Lnrpc::BakeMacaroonRequest, ::Lnrpc::BakeMacaroonResponse
|
||||
end
|
||||
|
||||
Stub = Service.rpc_stub_class
|
||||
|
|
Loading…
Reference in New Issue