mirror of
https://github.com/bumi/lnrpc
synced 2026-02-20 09:27:50 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f3366b2d7e | |||
| 7f7d125be6 | |||
| 2d5e0d0de4 | |||
| ef17006051 | |||
| 54dd714064 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -11,3 +11,5 @@
|
|||||||
.rspec_status
|
.rspec_status
|
||||||
|
|
||||||
.ruby-version
|
.ruby-version
|
||||||
|
|
||||||
|
*.gem
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
lnrpc (0.8.0.beta)
|
lnrpc (0.10.0)
|
||||||
google-protobuf (>= 3.7)
|
google-protobuf (>= 3.7)
|
||||||
grpc (>= 1.19.0)
|
grpc (>= 1.19.0)
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ a [gRPC](https://grpc.io/) client for [LND, the Lightning Network Daemon](https:
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
Note: there is still an GRPC/protobuf [issue with Ruby 2.7](https://github.com/protocolbuffers/protobuf/issues/7070).
|
||||||
|
So lnrpc requires Ruby < 2.7.
|
||||||
|
|
||||||
Add this line to your application's Gemfile:
|
Add this line to your application's Gemfile:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|||||||
20
lib/lnrpc.rb
20
lib/lnrpc.rb
@@ -1,10 +1,22 @@
|
|||||||
require "lnrpc/version"
|
require 'lnrpc/version'
|
||||||
require "lnrpc/rpc_services_pb"
|
require 'lnrpc/rpc_services_pb'
|
||||||
|
require 'lnrpc/router_services_pb'
|
||||||
|
require 'securerandom'
|
||||||
|
|
||||||
module Lnrpc
|
module Lnrpc
|
||||||
class Error < StandardError; end
|
class Error < StandardError; end
|
||||||
autoload :Client, 'lnrpc/client'
|
autoload :Client, 'lnrpc/client'
|
||||||
|
autoload :GrpcWrapper, 'lnrpc/grpc_wrapper'
|
||||||
autoload :MacaroonInterceptor, 'lnrpc/macaroon_interceptor'
|
autoload :MacaroonInterceptor, 'lnrpc/macaroon_interceptor'
|
||||||
|
|
||||||
|
PREIMAGE_BYTE_LENGTH = 32
|
||||||
|
KEY_SEND_PREIMAGE_TYPE = 5482373484
|
||||||
|
|
||||||
|
def self.create_preimage
|
||||||
|
SecureRandom.random_bytes(PREIMAGE_BYTE_LENGTH)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.to_byte_array(str)
|
||||||
|
[str].pack("H*")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,32 +3,12 @@ require "lnrpc/macaroon_interceptor"
|
|||||||
module Lnrpc
|
module Lnrpc
|
||||||
class Client
|
class Client
|
||||||
attr_accessor :address, :credentials, :macaroon
|
attr_accessor :address, :credentials, :macaroon
|
||||||
attr_writer :grpc_client
|
|
||||||
|
|
||||||
LND_HOME_DIR = ENV['LND_HOME'] || "~/.lnd"
|
LND_HOME_DIR = ENV['LND_HOME'] || "~/.lnd"
|
||||||
DEFAULT_ADDRESS = 'localhost:10009'
|
DEFAULT_ADDRESS = 'localhost:10009'
|
||||||
DEFAULT_CREDENTIALS_PATH = "#{LND_HOME_DIR}/tls.cert"
|
DEFAULT_CREDENTIALS_PATH = "#{LND_HOME_DIR}/tls.cert"
|
||||||
DEFAULT_MACAROON_PATH = "#{LND_HOME_DIR}/data/chain/bitcoin/mainnet/admin.macaroon"
|
DEFAULT_MACAROON_PATH = "#{LND_HOME_DIR}/data/chain/bitcoin/mainnet/admin.macaroon"
|
||||||
|
|
||||||
NON_CONVENTION_REQUEST_CLASSES = {
|
|
||||||
add_invoice: Lnrpc::Invoice,
|
|
||||||
send_payment: Lnrpc::SendRequest,
|
|
||||||
send_payment_sync: Lnrpc::SendRequest,
|
|
||||||
open_channel_sync: Lnrpc::OpenChannelRequest,
|
|
||||||
send_to_route_sync: Lnrpc::SendToRouteRequest,
|
|
||||||
lookup_invoice: Lnrpc::PaymentHash,
|
|
||||||
decode_pay_req: Lnrpc::PayReqString,
|
|
||||||
describe_graph: Lnrpc::ChannelGraphRequest,
|
|
||||||
get_chan_info: Lnrpc::ChanInfoRequest,
|
|
||||||
get_node_info: Lnrpc::NodeInfoRequest,
|
|
||||||
get_network_info: Lnrpc::NetworkInfoRequest,
|
|
||||||
stop_daemon: Lnrpc::StopRequest,
|
|
||||||
update_channel_policy: Lnrpc::PolicyUpdateResponse,
|
|
||||||
subscribe_channel_graph: Lnrpc::GraphTopologySubscription,
|
|
||||||
subscribe_invoices: Lnrpc::InvoiceSubscription,
|
|
||||||
subscribe_transactions: Lnrpc::GetTransactionsRequest
|
|
||||||
}
|
|
||||||
|
|
||||||
def initialize(options={})
|
def initialize(options={})
|
||||||
self.address = options[:address] || DEFAULT_ADDRESS
|
self.address = options[:address] || DEFAULT_ADDRESS
|
||||||
|
|
||||||
@@ -46,42 +26,36 @@ module Lnrpc
|
|||||||
self.macaroon = options[:macaroon]
|
self.macaroon = options[:macaroon]
|
||||||
end
|
end
|
||||||
|
|
||||||
def grpc_client
|
def lightning
|
||||||
@grpc_client ||= Lnrpc::Lightning::Stub.new(self.address,
|
@lightning ||= GrpcWrapper.new(Lnrpc::Lightning::Stub.new(address,
|
||||||
GRPC::Core::ChannelCredentials.new(self.credentials),
|
GRPC::Core::ChannelCredentials.new(credentials),
|
||||||
interceptors: [Lnrpc::MacaroonInterceptor.new(self.macaroon)]
|
interceptors: [Lnrpc::MacaroonInterceptor.new(macaroon)]
|
||||||
)
|
))
|
||||||
end
|
end
|
||||||
|
|
||||||
def pay(payreq)
|
def router
|
||||||
self.send_payment_sync(Lnrpc::SendRequest.new(payment_request: payreq))
|
@router ||= GrpcWrapper.new(Routerrpc::Router::Stub.new(address,
|
||||||
|
GRPC::Core::ChannelCredentials.new(credentials),
|
||||||
|
interceptors: [Lnrpc::MacaroonInterceptor.new(macaroon)]
|
||||||
|
))
|
||||||
end
|
end
|
||||||
|
|
||||||
def method_missing(m, *args, &block)
|
def keysend(args)
|
||||||
if self.grpc_client.respond_to?(m)
|
args[:dest_custom_records] ||= {}
|
||||||
params = args[0]
|
args[:dest_custom_records][Lnrpc::KEY_SEND_PREIMAGE_TYPE] ||= Lnrpc.create_preimage
|
||||||
|
args[:payment_hash] ||= Digest::SHA256.digest(args[:dest_custom_records][Lnrpc::KEY_SEND_PREIMAGE_TYPE])
|
||||||
|
args[:timeout_seconds] ||= 60
|
||||||
|
router.send_payment_v2(args)
|
||||||
|
end
|
||||||
|
|
||||||
args[0] = params.nil? ? request_class_for(m).new : request_class_for(m).new(params)
|
def pay(args)
|
||||||
self.grpc_client.send(m, *args, &block)
|
args[:timeout_seconds] ||= 60
|
||||||
else
|
router.send_payment_v2(args)
|
||||||
super
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def inspect
|
def inspect
|
||||||
"#{self.to_s} @address=\"#{self.address}\""
|
"#{self.to_s} @address=\"#{self.address}\""
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
def request_class_for(method_name)
|
|
||||||
if NON_CONVENTION_REQUEST_CLASSES.key?(method_name.to_sym)
|
|
||||||
NON_CONVENTION_REQUEST_CLASSES[method_name.to_sym]
|
|
||||||
else
|
|
||||||
klass = method_name.to_s.sub(/^[a-z\d]*/) { |match| match.capitalize }
|
|
||||||
klass.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{$1}#{$2.capitalize}" }
|
|
||||||
Lnrpc.const_get("#{klass}Request")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
66
lib/lnrpc/grpc_wrapper.rb
Normal file
66
lib/lnrpc/grpc_wrapper.rb
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
module Lnrpc
|
||||||
|
class GrpcWrapper
|
||||||
|
NON_CONVENTION_REQUEST_CLASSES = {
|
||||||
|
add_invoice: Lnrpc::Invoice,
|
||||||
|
decode_pay_req: Lnrpc::PayReqString,
|
||||||
|
describe_graph: Lnrpc::ChannelGraphRequest,
|
||||||
|
export_all_channel_backups: Lnrpc::ChanBackupExportRequest,
|
||||||
|
funding_state_step: Lnrpc::FundingTransitionMsg,
|
||||||
|
get_chan_info: Lnrpc::ChanInfoRequest,
|
||||||
|
get_network_info: Lnrpc::NetworkInfoRequest,
|
||||||
|
get_node_info: Lnrpc::NodeInfoRequest,
|
||||||
|
get_node_metrics: Lnrpc::NodeMetricsRequest,
|
||||||
|
lookup_invoice: Lnrpc::PaymentHash,
|
||||||
|
open_channel_sync: Lnrpc::OpenChannelRequest,
|
||||||
|
send_payment_sync: Lnrpc::SendRequest,
|
||||||
|
send_to_route_sync: Lnrpc::SendToRouteRequest,
|
||||||
|
stop_daemon: Lnrpc::StopRequest,
|
||||||
|
subscribe_channel_backups: Lnrpc::ChannelBackupSubscription,
|
||||||
|
subscribe_channel_event: Lnrpc::ChannelEventSubscription,
|
||||||
|
subscribe_channel_graph: Lnrpc::GraphTopologySubscription,
|
||||||
|
subscribe_invoices: Lnrpc::InvoiceSubscription,
|
||||||
|
subscribe_peer_event: Lnrpc::PeerEventSubscription,
|
||||||
|
subscribe_transactions: Lnrpc::GetTransactionsRequest,
|
||||||
|
update_channel_policy: Lnrpc::PolicyUpdateResponse,
|
||||||
|
varify_channel_backup: Lnrpc::ChanBackupSnapshot,
|
||||||
|
|
||||||
|
estimate_route_fee: Routerrpc::RouteFeeRequest,
|
||||||
|
send_payment: Routerrpc::SendPaymentRequest,
|
||||||
|
send_payment_v2: Routerrpc::SendPaymentRequest,
|
||||||
|
track_payment_v2: Routerrpc::TrackPaymentRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
attr_reader :grpc
|
||||||
|
|
||||||
|
def initialize(grpc)
|
||||||
|
@grpc = grpc
|
||||||
|
end
|
||||||
|
|
||||||
|
def method_missing(m, *args, &block)
|
||||||
|
if self.grpc.respond_to?(m)
|
||||||
|
params = args[0]
|
||||||
|
|
||||||
|
args[0] = params.nil? ? request_class_for(m).new : request_class_for(m).new(params)
|
||||||
|
self.grpc.send(m, *args, &block)
|
||||||
|
else
|
||||||
|
super
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def inspect
|
||||||
|
"#{self.to_s} @grpc=\"#{self.grpc.to_s}\""
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def request_class_for(method_name)
|
||||||
|
if NON_CONVENTION_REQUEST_CLASSES.key?(method_name.to_sym)
|
||||||
|
NON_CONVENTION_REQUEST_CLASSES[method_name.to_sym]
|
||||||
|
else
|
||||||
|
klass = method_name.to_s.sub(/^[a-z\d]*/) { |match| match.capitalize }
|
||||||
|
klass.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{$1}#{$2.capitalize}" }
|
||||||
|
Module.const_get(grpc.class.name.to_s[/.+?(?=::)/]).const_get("#{klass}Request")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
560
lib/lnrpc/router.proto
Normal file
560
lib/lnrpc/router.proto
Normal file
@@ -0,0 +1,560 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
import "rpc.proto";
|
||||||
|
|
||||||
|
package routerrpc;
|
||||||
|
|
||||||
|
option go_package = "github.com/lightningnetwork/lnd/lnrpc/routerrpc";
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
that case it is required to set the amt field as well. If no payment request
|
||||||
|
is specified, the following fields are required: dest, amt and payment_hash.
|
||||||
|
*/
|
||||||
|
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.
|
||||||
|
This field must be non-zero.
|
||||||
|
*/
|
||||||
|
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
|
||||||
|
the destination. To send the payment without a fee limit, use max int here.
|
||||||
|
|
||||||
|
The fields fee_limit_sat and fee_limit_msat are mutually exclusive.
|
||||||
|
*/
|
||||||
|
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
|
||||||
|
directly to the destination. To send the payment without a fee limit, use
|
||||||
|
max int here.
|
||||||
|
|
||||||
|
The fields fee_limit_sat and fee_limit_msat are mutually exclusive.
|
||||||
|
*/
|
||||||
|
int64 fee_limit_msat = 13;
|
||||||
|
|
||||||
|
/**
|
||||||
|
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 = 8 [jstype = JS_STRING];
|
||||||
|
|
||||||
|
/**
|
||||||
|
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
|
||||||
|
required to be in the custom range >= 65536. When using REST, the values
|
||||||
|
must be encoded as base64.
|
||||||
|
*/
|
||||||
|
map<uint64, bytes> dest_custom_records = 11;
|
||||||
|
|
||||||
|
/// 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,
|
||||||
|
the router will try to load destination features from the graph as a
|
||||||
|
fallback.
|
||||||
|
*/
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
bool no_inflight_updates = 18;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TrackPaymentRequest {
|
||||||
|
/// 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.
|
||||||
|
*/
|
||||||
|
bool no_inflight_updates = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
int64 time_lock_delay = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SendToRouteRequest {
|
||||||
|
/// The payment hash to use for the HTLC.
|
||||||
|
bytes payment_hash = 1;
|
||||||
|
|
||||||
|
/// Route that should be used to attempt to complete the payment.
|
||||||
|
lnrpc.Route route = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SendToRouteResponse {
|
||||||
|
/// The preimage obtained by making the payment.
|
||||||
|
bytes preimage = 1;
|
||||||
|
|
||||||
|
/// The failure message in case the payment failed.
|
||||||
|
lnrpc.Failure failure = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ResetMissionControlRequest {
|
||||||
|
}
|
||||||
|
|
||||||
|
message ResetMissionControlResponse {
|
||||||
|
}
|
||||||
|
|
||||||
|
message QueryMissionControlRequest {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// QueryMissionControlResponse contains mission control state.
|
||||||
|
message QueryMissionControlResponse {
|
||||||
|
reserved 1;
|
||||||
|
|
||||||
|
/// Node pair-level mission control state.
|
||||||
|
repeated PairHistory pairs = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// PairHistory contains the mission control state for a particular node pair.
|
||||||
|
message PairHistory {
|
||||||
|
/// The source node pubkey of the pair.
|
||||||
|
bytes node_from = 1;
|
||||||
|
|
||||||
|
/// The destination node pubkey of the pair.
|
||||||
|
bytes node_to = 2;
|
||||||
|
|
||||||
|
reserved 3, 4, 5, 6;
|
||||||
|
|
||||||
|
PairData history = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PairData {
|
||||||
|
/// 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.
|
||||||
|
*/
|
||||||
|
int64 fail_amt_msat = 4;
|
||||||
|
|
||||||
|
reserved 3;
|
||||||
|
|
||||||
|
/// Time of last success.
|
||||||
|
int64 success_time = 5;
|
||||||
|
|
||||||
|
/// 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.
|
||||||
|
int64 success_amt_msat = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
message QueryProbabilityRequest {
|
||||||
|
/// The source node pubkey of the pair.
|
||||||
|
bytes from_node = 1;
|
||||||
|
|
||||||
|
/// The destination node pubkey of the pair.
|
||||||
|
bytes to_node = 2;
|
||||||
|
|
||||||
|
/// The amount for which to calculate a probability.
|
||||||
|
int64 amt_msat = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message QueryProbabilityResponse {
|
||||||
|
/// The success probability for the requested pair.
|
||||||
|
double probability = 1;
|
||||||
|
|
||||||
|
/// 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.
|
||||||
|
*/
|
||||||
|
repeated bytes hop_pubkeys = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BuildRouteResponse {
|
||||||
|
/**
|
||||||
|
Fully specified route that can be used to execute the payment.
|
||||||
|
*/
|
||||||
|
lnrpc.Route route = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
some events may be replayed upon restart. Events consumed from this package
|
||||||
|
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;
|
||||||
|
|
||||||
|
enum EventType {
|
||||||
|
UNKNOWN = 0;
|
||||||
|
SEND = 1;
|
||||||
|
RECEIVE = 2;
|
||||||
|
FORWARD = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
The event type indicates whether the htlc was part of a send, receive or
|
||||||
|
forward.
|
||||||
|
*/
|
||||||
|
EventType event_type = 6;
|
||||||
|
|
||||||
|
oneof event {
|
||||||
|
ForwardEvent forward_event = 7;
|
||||||
|
ForwardFailEvent forward_fail_event = 8;
|
||||||
|
SettleEvent settle_event = 9;
|
||||||
|
LinkFailEvent link_fail_event = 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message HtlcInfo {
|
||||||
|
// The timelock on the incoming htlc.
|
||||||
|
uint32 incoming_timelock = 1;
|
||||||
|
|
||||||
|
// The timelock on the outgoing htlc.
|
||||||
|
uint32 outgoing_timelock = 2;
|
||||||
|
|
||||||
|
// The amount of the incoming htlc.
|
||||||
|
uint64 incoming_amt_msat = 3;
|
||||||
|
|
||||||
|
// The amount of the outgoing htlc.
|
||||||
|
uint64 outgoing_amt_msat = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ForwardEvent {
|
||||||
|
// Info contains details about the htlc that was forwarded.
|
||||||
|
HtlcInfo info = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ForwardFailEvent {
|
||||||
|
}
|
||||||
|
|
||||||
|
message SettleEvent {
|
||||||
|
}
|
||||||
|
|
||||||
|
message LinkFailEvent {
|
||||||
|
// Info contains details about the htlc that we failed.
|
||||||
|
HtlcInfo info = 1;
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
*/
|
||||||
|
FailureDetail failure_detail = 3;
|
||||||
|
|
||||||
|
// A string representation of the link failure.
|
||||||
|
string failure_string = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum FailureDetail {
|
||||||
|
UNKNOWN = 0;
|
||||||
|
NO_DETAIL = 1;
|
||||||
|
ONION_DECODE = 2;
|
||||||
|
LINK_NOT_ELIGIBLE = 3;
|
||||||
|
ON_CHAIN_TIMEOUT = 4;
|
||||||
|
HTLC_EXCEEDS_MAX = 5;
|
||||||
|
INSUFFICIENT_BALANCE = 6;
|
||||||
|
INCOMPLETE_FORWARD = 7;
|
||||||
|
HTLC_ADD_FAILED = 8;
|
||||||
|
FORWARDS_DISABLED = 9;
|
||||||
|
INVOICE_CANCELED = 10;
|
||||||
|
INVOICE_UNDERPAID = 11;
|
||||||
|
INVOICE_EXPIRY_TOO_SOON = 12;
|
||||||
|
INVOICE_NOT_OPEN = 13;
|
||||||
|
MPP_INVOICE_TIMEOUT = 14;
|
||||||
|
ADDRESS_MISMATCH = 15;
|
||||||
|
SET_TOTAL_MISMATCH = 16;
|
||||||
|
SET_TOTAL_TOO_LOW = 17;
|
||||||
|
SET_OVERPAID = 18;
|
||||||
|
UNKNOWN_INVOICE = 19;
|
||||||
|
INVALID_KEYSEND = 20;
|
||||||
|
MPP_IN_PROGRESS = 21;
|
||||||
|
CIRCULAR_ROUTE = 22;
|
||||||
|
}
|
||||||
|
|
||||||
|
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.
|
||||||
|
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);
|
||||||
|
|
||||||
|
/**
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
198
lib/lnrpc/router_pb.rb
Normal file
198
lib/lnrpc/router_pb.rb
Normal file
@@ -0,0 +1,198 @@
|
|||||||
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
# source: router.proto
|
||||||
|
|
||||||
|
require 'google/protobuf'
|
||||||
|
|
||||||
|
require_relative '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"
|
||||||
|
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
|
||||||
|
end
|
||||||
69
lib/lnrpc/router_services_pb.rb
Normal file
69
lib/lnrpc/router_services_pb.rb
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
# Source: router.proto for package 'routerrpc'
|
||||||
|
|
||||||
|
require 'grpc'
|
||||||
|
require_relative 'router_pb'
|
||||||
|
|
||||||
|
module Routerrpc
|
||||||
|
module Router
|
||||||
|
class Service
|
||||||
|
|
||||||
|
include GRPC::GenericService
|
||||||
|
|
||||||
|
self.marshal_class_method = :encode
|
||||||
|
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)
|
||||||
|
# *
|
||||||
|
# TrackPaymentV2 returns an update stream for the payment identified by the
|
||||||
|
# payment hash.
|
||||||
|
rpc :TrackPaymentV2, 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
|
||||||
|
# *
|
||||||
|
# ResetMissionControl clears all mission control state and starts with a clean
|
||||||
|
# slate.
|
||||||
|
rpc :ResetMissionControl, ResetMissionControlRequest, ResetMissionControlResponse
|
||||||
|
# *
|
||||||
|
# QueryMissionControl exposes the internal mission control state to callers.
|
||||||
|
# It is a development feature.
|
||||||
|
rpc :QueryMissionControl, QueryMissionControlRequest, QueryMissionControlResponse
|
||||||
|
# *
|
||||||
|
# QueryProbability returns the current success probability estimate for a
|
||||||
|
# given node pair and amount.
|
||||||
|
rpc :QueryProbability, QueryProbabilityRequest, 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
|
||||||
|
# *
|
||||||
|
# SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||||
|
# the client which delivers a stream of htlc events.
|
||||||
|
rpc :SubscribeHtlcEvents, SubscribeHtlcEventsRequest, 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, stream(PaymentStatus)
|
||||||
|
# *
|
||||||
|
# Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||||
|
# the payment identified by the payment hash.
|
||||||
|
rpc :TrackPayment, TrackPaymentRequest, stream(PaymentStatus)
|
||||||
|
end
|
||||||
|
|
||||||
|
Stub = Service.rpc_stub_class
|
||||||
|
end
|
||||||
|
end
|
||||||
2219
lib/lnrpc/rpc.proto
2219
lib/lnrpc/rpc.proto
File diff suppressed because it is too large
Load Diff
@@ -36,7 +36,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
add_message "lnrpc.ChangePasswordResponse" do
|
add_message "lnrpc.ChangePasswordResponse" do
|
||||||
end
|
end
|
||||||
add_message "lnrpc.Utxo" do
|
add_message "lnrpc.Utxo" do
|
||||||
optional :type, :enum, 1, "lnrpc.AddressType"
|
optional :address_type, :enum, 1, "lnrpc.AddressType"
|
||||||
optional :address, :string, 2
|
optional :address, :string, 2
|
||||||
optional :amount_sat, :int64, 3
|
optional :amount_sat, :int64, 3
|
||||||
optional :pk_script, :string, 4
|
optional :pk_script, :string, 4
|
||||||
@@ -62,6 +62,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
add_message "lnrpc.FeeLimit" do
|
add_message "lnrpc.FeeLimit" do
|
||||||
oneof :limit do
|
oneof :limit do
|
||||||
optional :fixed, :int64, 1
|
optional :fixed, :int64, 1
|
||||||
|
optional :fixed_msat, :int64, 3
|
||||||
optional :percent, :int64, 2
|
optional :percent, :int64, 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -69,14 +70,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :dest, :bytes, 1
|
optional :dest, :bytes, 1
|
||||||
optional :dest_string, :string, 2
|
optional :dest_string, :string, 2
|
||||||
optional :amt, :int64, 3
|
optional :amt, :int64, 3
|
||||||
|
optional :amt_msat, :int64, 12
|
||||||
optional :payment_hash, :bytes, 4
|
optional :payment_hash, :bytes, 4
|
||||||
optional :payment_hash_string, :string, 5
|
optional :payment_hash_string, :string, 5
|
||||||
optional :payment_request, :string, 6
|
optional :payment_request, :string, 6
|
||||||
optional :final_cltv_delta, :int32, 7
|
optional :final_cltv_delta, :int32, 7
|
||||||
optional :fee_limit, :message, 8, "lnrpc.FeeLimit"
|
optional :fee_limit, :message, 8, "lnrpc.FeeLimit"
|
||||||
optional :outgoing_chan_id, :uint64, 9
|
optional :outgoing_chan_id, :uint64, 9
|
||||||
|
optional :last_hop_pubkey, :bytes, 13
|
||||||
optional :cltv_limit, :uint32, 10
|
optional :cltv_limit, :uint32, 10
|
||||||
map :dest_tlv, :uint64, :bytes, 11
|
map :dest_custom_records, :uint64, :bytes, 11
|
||||||
|
optional :allow_self_payment, :bool, 14
|
||||||
|
repeated :dest_features, :enum, 15, "lnrpc.FeatureBit"
|
||||||
end
|
end
|
||||||
add_message "lnrpc.SendResponse" do
|
add_message "lnrpc.SendResponse" do
|
||||||
optional :payment_error, :string, 1
|
optional :payment_error, :string, 1
|
||||||
@@ -217,12 +222,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :local_chan_reserve_sat, :int64, 20
|
optional :local_chan_reserve_sat, :int64, 20
|
||||||
optional :remote_chan_reserve_sat, :int64, 21
|
optional :remote_chan_reserve_sat, :int64, 21
|
||||||
optional :static_remote_key, :bool, 22
|
optional :static_remote_key, :bool, 22
|
||||||
|
optional :commitment_type, :enum, 26, "lnrpc.CommitmentType"
|
||||||
|
optional :lifetime, :int64, 23
|
||||||
|
optional :uptime, :int64, 24
|
||||||
|
optional :close_address, :string, 25
|
||||||
|
optional :push_amount_sat, :uint64, 27
|
||||||
|
optional :thaw_height, :uint32, 28
|
||||||
end
|
end
|
||||||
add_message "lnrpc.ListChannelsRequest" do
|
add_message "lnrpc.ListChannelsRequest" do
|
||||||
optional :active_only, :bool, 1
|
optional :active_only, :bool, 1
|
||||||
optional :inactive_only, :bool, 2
|
optional :inactive_only, :bool, 2
|
||||||
optional :public_only, :bool, 3
|
optional :public_only, :bool, 3
|
||||||
optional :private_only, :bool, 4
|
optional :private_only, :bool, 4
|
||||||
|
optional :peer, :bytes, 5
|
||||||
end
|
end
|
||||||
add_message "lnrpc.ListChannelsResponse" do
|
add_message "lnrpc.ListChannelsResponse" do
|
||||||
repeated :channels, :message, 11, "lnrpc.Channel"
|
repeated :channels, :message, 11, "lnrpc.Channel"
|
||||||
@@ -238,6 +250,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :settled_balance, :int64, 8
|
optional :settled_balance, :int64, 8
|
||||||
optional :time_locked_balance, :int64, 9
|
optional :time_locked_balance, :int64, 9
|
||||||
optional :close_type, :enum, 10, "lnrpc.ChannelCloseSummary.ClosureType"
|
optional :close_type, :enum, 10, "lnrpc.ChannelCloseSummary.ClosureType"
|
||||||
|
optional :open_initiator, :enum, 11, "lnrpc.Initiator"
|
||||||
|
optional :close_initiator, :enum, 12, "lnrpc.Initiator"
|
||||||
end
|
end
|
||||||
add_enum "lnrpc.ChannelCloseSummary.ClosureType" do
|
add_enum "lnrpc.ChannelCloseSummary.ClosureType" do
|
||||||
value :COOPERATIVE_CLOSE, 0
|
value :COOPERATIVE_CLOSE, 0
|
||||||
@@ -268,36 +282,55 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :inbound, :bool, 8
|
optional :inbound, :bool, 8
|
||||||
optional :ping_time, :int64, 9
|
optional :ping_time, :int64, 9
|
||||||
optional :sync_type, :enum, 10, "lnrpc.Peer.SyncType"
|
optional :sync_type, :enum, 10, "lnrpc.Peer.SyncType"
|
||||||
|
map :features, :uint32, :message, 11, "lnrpc.Feature"
|
||||||
|
repeated :errors, :message, 12, "lnrpc.TimestampedError"
|
||||||
end
|
end
|
||||||
add_enum "lnrpc.Peer.SyncType" do
|
add_enum "lnrpc.Peer.SyncType" do
|
||||||
value :UNKNOWN_SYNC, 0
|
value :UNKNOWN_SYNC, 0
|
||||||
value :ACTIVE_SYNC, 1
|
value :ACTIVE_SYNC, 1
|
||||||
value :PASSIVE_SYNC, 2
|
value :PASSIVE_SYNC, 2
|
||||||
end
|
end
|
||||||
|
add_message "lnrpc.TimestampedError" do
|
||||||
|
optional :timestamp, :uint64, 1
|
||||||
|
optional :error, :string, 2
|
||||||
|
end
|
||||||
add_message "lnrpc.ListPeersRequest" do
|
add_message "lnrpc.ListPeersRequest" do
|
||||||
|
optional :latest_error, :bool, 1
|
||||||
end
|
end
|
||||||
add_message "lnrpc.ListPeersResponse" do
|
add_message "lnrpc.ListPeersResponse" do
|
||||||
repeated :peers, :message, 1, "lnrpc.Peer"
|
repeated :peers, :message, 1, "lnrpc.Peer"
|
||||||
end
|
end
|
||||||
|
add_message "lnrpc.PeerEventSubscription" do
|
||||||
|
end
|
||||||
|
add_message "lnrpc.PeerEvent" do
|
||||||
|
optional :pub_key, :string, 1
|
||||||
|
optional :type, :enum, 2, "lnrpc.PeerEvent.EventType"
|
||||||
|
end
|
||||||
|
add_enum "lnrpc.PeerEvent.EventType" do
|
||||||
|
value :PEER_ONLINE, 0
|
||||||
|
value :PEER_OFFLINE, 1
|
||||||
|
end
|
||||||
add_message "lnrpc.GetInfoRequest" do
|
add_message "lnrpc.GetInfoRequest" do
|
||||||
end
|
end
|
||||||
add_message "lnrpc.GetInfoResponse" do
|
add_message "lnrpc.GetInfoResponse" do
|
||||||
|
optional :version, :string, 14
|
||||||
|
optional :commit_hash, :string, 20
|
||||||
optional :identity_pubkey, :string, 1
|
optional :identity_pubkey, :string, 1
|
||||||
optional :alias, :string, 2
|
optional :alias, :string, 2
|
||||||
|
optional :color, :string, 17
|
||||||
optional :num_pending_channels, :uint32, 3
|
optional :num_pending_channels, :uint32, 3
|
||||||
optional :num_active_channels, :uint32, 4
|
optional :num_active_channels, :uint32, 4
|
||||||
|
optional :num_inactive_channels, :uint32, 15
|
||||||
optional :num_peers, :uint32, 5
|
optional :num_peers, :uint32, 5
|
||||||
optional :block_height, :uint32, 6
|
optional :block_height, :uint32, 6
|
||||||
optional :block_hash, :string, 8
|
optional :block_hash, :string, 8
|
||||||
optional :synced_to_chain, :bool, 9
|
|
||||||
optional :testnet, :bool, 10
|
|
||||||
repeated :uris, :string, 12
|
|
||||||
optional :best_header_timestamp, :int64, 13
|
optional :best_header_timestamp, :int64, 13
|
||||||
optional :version, :string, 14
|
optional :synced_to_chain, :bool, 9
|
||||||
optional :num_inactive_channels, :uint32, 15
|
|
||||||
repeated :chains, :message, 16, "lnrpc.Chain"
|
|
||||||
optional :color, :string, 17
|
|
||||||
optional :synced_to_graph, :bool, 18
|
optional :synced_to_graph, :bool, 18
|
||||||
|
optional :testnet, :bool, 10
|
||||||
|
repeated :chains, :message, 16, "lnrpc.Chain"
|
||||||
|
repeated :uris, :string, 12
|
||||||
|
map :features, :uint32, :message, 19, "lnrpc.Feature"
|
||||||
end
|
end
|
||||||
add_message "lnrpc.Chain" do
|
add_message "lnrpc.Chain" do
|
||||||
optional :chain, :string, 1
|
optional :chain, :string, 1
|
||||||
@@ -320,6 +353,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :force, :bool, 2
|
optional :force, :bool, 2
|
||||||
optional :target_conf, :int32, 3
|
optional :target_conf, :int32, 3
|
||||||
optional :sat_per_byte, :int64, 4
|
optional :sat_per_byte, :int64, 4
|
||||||
|
optional :delivery_address, :string, 5
|
||||||
end
|
end
|
||||||
add_message "lnrpc.CloseStatusUpdate" do
|
add_message "lnrpc.CloseStatusUpdate" do
|
||||||
oneof :update do
|
oneof :update do
|
||||||
@@ -331,6 +365,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :txid, :bytes, 1
|
optional :txid, :bytes, 1
|
||||||
optional :output_index, :uint32, 2
|
optional :output_index, :uint32, 2
|
||||||
end
|
end
|
||||||
|
add_message "lnrpc.ReadyForPsbtFunding" do
|
||||||
|
optional :funding_address, :string, 1
|
||||||
|
optional :funding_amount, :int64, 2
|
||||||
|
optional :psbt, :bytes, 3
|
||||||
|
end
|
||||||
add_message "lnrpc.OpenChannelRequest" do
|
add_message "lnrpc.OpenChannelRequest" do
|
||||||
optional :node_pubkey, :bytes, 2
|
optional :node_pubkey, :bytes, 2
|
||||||
optional :node_pubkey_string, :string, 3
|
optional :node_pubkey_string, :string, 3
|
||||||
@@ -343,13 +382,64 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :remote_csv_delay, :uint32, 10
|
optional :remote_csv_delay, :uint32, 10
|
||||||
optional :min_confs, :int32, 11
|
optional :min_confs, :int32, 11
|
||||||
optional :spend_unconfirmed, :bool, 12
|
optional :spend_unconfirmed, :bool, 12
|
||||||
|
optional :close_address, :string, 13
|
||||||
|
optional :funding_shim, :message, 14, "lnrpc.FundingShim"
|
||||||
end
|
end
|
||||||
add_message "lnrpc.OpenStatusUpdate" do
|
add_message "lnrpc.OpenStatusUpdate" do
|
||||||
|
optional :pending_chan_id, :bytes, 4
|
||||||
oneof :update do
|
oneof :update do
|
||||||
optional :chan_pending, :message, 1, "lnrpc.PendingUpdate"
|
optional :chan_pending, :message, 1, "lnrpc.PendingUpdate"
|
||||||
optional :chan_open, :message, 3, "lnrpc.ChannelOpenUpdate"
|
optional :chan_open, :message, 3, "lnrpc.ChannelOpenUpdate"
|
||||||
|
optional :psbt_fund, :message, 5, "lnrpc.ReadyForPsbtFunding"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
add_message "lnrpc.KeyLocator" do
|
||||||
|
optional :key_family, :int32, 1
|
||||||
|
optional :key_index, :int32, 2
|
||||||
|
end
|
||||||
|
add_message "lnrpc.KeyDescriptor" do
|
||||||
|
optional :raw_key_bytes, :bytes, 1
|
||||||
|
optional :key_loc, :message, 2, "lnrpc.KeyLocator"
|
||||||
|
end
|
||||||
|
add_message "lnrpc.ChanPointShim" do
|
||||||
|
optional :amt, :int64, 1
|
||||||
|
optional :chan_point, :message, 2, "lnrpc.ChannelPoint"
|
||||||
|
optional :local_key, :message, 3, "lnrpc.KeyDescriptor"
|
||||||
|
optional :remote_key, :bytes, 4
|
||||||
|
optional :pending_chan_id, :bytes, 5
|
||||||
|
optional :thaw_height, :uint32, 6
|
||||||
|
end
|
||||||
|
add_message "lnrpc.PsbtShim" do
|
||||||
|
optional :pending_chan_id, :bytes, 1
|
||||||
|
optional :base_psbt, :bytes, 2
|
||||||
|
end
|
||||||
|
add_message "lnrpc.FundingShim" do
|
||||||
|
oneof :shim do
|
||||||
|
optional :chan_point_shim, :message, 1, "lnrpc.ChanPointShim"
|
||||||
|
optional :psbt_shim, :message, 2, "lnrpc.PsbtShim"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
add_message "lnrpc.FundingShimCancel" do
|
||||||
|
optional :pending_chan_id, :bytes, 1
|
||||||
|
end
|
||||||
|
add_message "lnrpc.FundingPsbtVerify" do
|
||||||
|
optional :funded_psbt, :bytes, 1
|
||||||
|
optional :pending_chan_id, :bytes, 2
|
||||||
|
end
|
||||||
|
add_message "lnrpc.FundingPsbtFinalize" do
|
||||||
|
optional :signed_psbt, :bytes, 1
|
||||||
|
optional :pending_chan_id, :bytes, 2
|
||||||
|
end
|
||||||
|
add_message "lnrpc.FundingTransitionMsg" do
|
||||||
|
oneof :trigger do
|
||||||
|
optional :shim_register, :message, 1, "lnrpc.FundingShim"
|
||||||
|
optional :shim_cancel, :message, 2, "lnrpc.FundingShimCancel"
|
||||||
|
optional :psbt_verify, :message, 3, "lnrpc.FundingPsbtVerify"
|
||||||
|
optional :psbt_finalize, :message, 4, "lnrpc.FundingPsbtFinalize"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
add_message "lnrpc.FundingStateStepResp" do
|
||||||
|
end
|
||||||
add_message "lnrpc.PendingHTLC" do
|
add_message "lnrpc.PendingHTLC" do
|
||||||
optional :incoming, :bool, 1
|
optional :incoming, :bool, 1
|
||||||
optional :amount, :int64, 2
|
optional :amount, :int64, 2
|
||||||
@@ -375,6 +465,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :remote_balance, :int64, 5
|
optional :remote_balance, :int64, 5
|
||||||
optional :local_chan_reserve_sat, :int64, 6
|
optional :local_chan_reserve_sat, :int64, 6
|
||||||
optional :remote_chan_reserve_sat, :int64, 7
|
optional :remote_chan_reserve_sat, :int64, 7
|
||||||
|
optional :initiator, :enum, 8, "lnrpc.Initiator"
|
||||||
|
optional :commitment_type, :enum, 9, "lnrpc.CommitmentType"
|
||||||
end
|
end
|
||||||
add_message "lnrpc.PendingChannelsResponse.PendingOpenChannel" do
|
add_message "lnrpc.PendingChannelsResponse.PendingOpenChannel" do
|
||||||
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
|
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
|
||||||
@@ -386,6 +478,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
add_message "lnrpc.PendingChannelsResponse.WaitingCloseChannel" do
|
add_message "lnrpc.PendingChannelsResponse.WaitingCloseChannel" do
|
||||||
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
|
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
|
||||||
optional :limbo_balance, :int64, 2
|
optional :limbo_balance, :int64, 2
|
||||||
|
optional :commitments, :message, 3, "lnrpc.PendingChannelsResponse.Commitments"
|
||||||
|
end
|
||||||
|
add_message "lnrpc.PendingChannelsResponse.Commitments" do
|
||||||
|
optional :local_txid, :string, 1
|
||||||
|
optional :remote_txid, :string, 2
|
||||||
|
optional :remote_pending_txid, :string, 3
|
||||||
|
optional :local_commit_fee_sat, :uint64, 4
|
||||||
|
optional :remote_commit_fee_sat, :uint64, 5
|
||||||
|
optional :remote_pending_commit_fee_sat, :uint64, 6
|
||||||
end
|
end
|
||||||
add_message "lnrpc.PendingChannelsResponse.ClosedChannel" do
|
add_message "lnrpc.PendingChannelsResponse.ClosedChannel" do
|
||||||
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
|
optional :channel, :message, 1, "lnrpc.PendingChannelsResponse.PendingChannel"
|
||||||
@@ -399,6 +500,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :blocks_til_maturity, :int32, 5
|
optional :blocks_til_maturity, :int32, 5
|
||||||
optional :recovered_balance, :int64, 6
|
optional :recovered_balance, :int64, 6
|
||||||
repeated :pending_htlcs, :message, 8, "lnrpc.PendingHTLC"
|
repeated :pending_htlcs, :message, 8, "lnrpc.PendingHTLC"
|
||||||
|
optional :anchor, :enum, 9, "lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState"
|
||||||
|
end
|
||||||
|
add_enum "lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState" do
|
||||||
|
value :LIMBO, 0
|
||||||
|
value :RECOVERED, 1
|
||||||
|
value :LOST, 2
|
||||||
end
|
end
|
||||||
add_message "lnrpc.ChannelEventSubscription" do
|
add_message "lnrpc.ChannelEventSubscription" do
|
||||||
end
|
end
|
||||||
@@ -409,6 +516,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :closed_channel, :message, 2, "lnrpc.ChannelCloseSummary"
|
optional :closed_channel, :message, 2, "lnrpc.ChannelCloseSummary"
|
||||||
optional :active_channel, :message, 3, "lnrpc.ChannelPoint"
|
optional :active_channel, :message, 3, "lnrpc.ChannelPoint"
|
||||||
optional :inactive_channel, :message, 4, "lnrpc.ChannelPoint"
|
optional :inactive_channel, :message, 4, "lnrpc.ChannelPoint"
|
||||||
|
optional :pending_open_channel, :message, 6, "lnrpc.PendingUpdate"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
add_enum "lnrpc.ChannelEventUpdate.UpdateType" do
|
add_enum "lnrpc.ChannelEventUpdate.UpdateType" do
|
||||||
@@ -416,6 +524,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
value :CLOSED_CHANNEL, 1
|
value :CLOSED_CHANNEL, 1
|
||||||
value :ACTIVE_CHANNEL, 2
|
value :ACTIVE_CHANNEL, 2
|
||||||
value :INACTIVE_CHANNEL, 3
|
value :INACTIVE_CHANNEL, 3
|
||||||
|
value :PENDING_OPEN_CHANNEL, 4
|
||||||
end
|
end
|
||||||
add_message "lnrpc.WalletBalanceRequest" do
|
add_message "lnrpc.WalletBalanceRequest" do
|
||||||
end
|
end
|
||||||
@@ -433,6 +542,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
add_message "lnrpc.QueryRoutesRequest" do
|
add_message "lnrpc.QueryRoutesRequest" do
|
||||||
optional :pub_key, :string, 1
|
optional :pub_key, :string, 1
|
||||||
optional :amt, :int64, 2
|
optional :amt, :int64, 2
|
||||||
|
optional :amt_msat, :int64, 12
|
||||||
optional :final_cltv_delta, :int32, 4
|
optional :final_cltv_delta, :int32, 4
|
||||||
optional :fee_limit, :message, 5, "lnrpc.FeeLimit"
|
optional :fee_limit, :message, 5, "lnrpc.FeeLimit"
|
||||||
repeated :ignored_nodes, :bytes, 6
|
repeated :ignored_nodes, :bytes, 6
|
||||||
@@ -441,6 +551,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :use_mission_control, :bool, 9
|
optional :use_mission_control, :bool, 9
|
||||||
repeated :ignored_pairs, :message, 10, "lnrpc.NodePair"
|
repeated :ignored_pairs, :message, 10, "lnrpc.NodePair"
|
||||||
optional :cltv_limit, :uint32, 11
|
optional :cltv_limit, :uint32, 11
|
||||||
|
map :dest_custom_records, :uint64, :bytes, 13
|
||||||
|
optional :outgoing_chan_id, :uint64, 14
|
||||||
|
optional :last_hop_pubkey, :bytes, 15
|
||||||
|
repeated :route_hints, :message, 16, "lnrpc.RouteHint"
|
||||||
|
repeated :dest_features, :enum, 17, "lnrpc.FeatureBit"
|
||||||
end
|
end
|
||||||
add_message "lnrpc.NodePair" do
|
add_message "lnrpc.NodePair" do
|
||||||
optional :from, :bytes, 1
|
optional :from, :bytes, 1
|
||||||
@@ -464,6 +579,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :fee_msat, :int64, 7
|
optional :fee_msat, :int64, 7
|
||||||
optional :pub_key, :string, 8
|
optional :pub_key, :string, 8
|
||||||
optional :tlv_payload, :bool, 9
|
optional :tlv_payload, :bool, 9
|
||||||
|
optional :mpp_record, :message, 10, "lnrpc.MPPRecord"
|
||||||
|
map :custom_records, :uint64, :bytes, 11
|
||||||
|
end
|
||||||
|
add_message "lnrpc.MPPRecord" do
|
||||||
|
optional :payment_addr, :bytes, 11
|
||||||
|
optional :total_amt_msat, :int64, 10
|
||||||
end
|
end
|
||||||
add_message "lnrpc.Route" do
|
add_message "lnrpc.Route" do
|
||||||
optional :total_time_lock, :uint32, 1
|
optional :total_time_lock, :uint32, 1
|
||||||
@@ -489,6 +610,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :alias, :string, 3
|
optional :alias, :string, 3
|
||||||
repeated :addresses, :message, 4, "lnrpc.NodeAddress"
|
repeated :addresses, :message, 4, "lnrpc.NodeAddress"
|
||||||
optional :color, :string, 5
|
optional :color, :string, 5
|
||||||
|
map :features, :uint32, :message, 6, "lnrpc.Feature"
|
||||||
end
|
end
|
||||||
add_message "lnrpc.NodeAddress" do
|
add_message "lnrpc.NodeAddress" do
|
||||||
optional :network, :string, 1
|
optional :network, :string, 1
|
||||||
@@ -520,6 +642,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
repeated :nodes, :message, 1, "lnrpc.LightningNode"
|
repeated :nodes, :message, 1, "lnrpc.LightningNode"
|
||||||
repeated :edges, :message, 2, "lnrpc.ChannelEdge"
|
repeated :edges, :message, 2, "lnrpc.ChannelEdge"
|
||||||
end
|
end
|
||||||
|
add_message "lnrpc.NodeMetricsRequest" do
|
||||||
|
repeated :types, :enum, 1, "lnrpc.NodeMetricType"
|
||||||
|
end
|
||||||
|
add_message "lnrpc.NodeMetricsResponse" do
|
||||||
|
map :betweenness_centrality, :string, :message, 1, "lnrpc.FloatMetric"
|
||||||
|
end
|
||||||
|
add_message "lnrpc.FloatMetric" do
|
||||||
|
optional :value, :double, 1
|
||||||
|
optional :normalized_value, :double, 2
|
||||||
|
end
|
||||||
add_message "lnrpc.ChanInfoRequest" do
|
add_message "lnrpc.ChanInfoRequest" do
|
||||||
optional :chan_id, :uint64, 1
|
optional :chan_id, :uint64, 1
|
||||||
end
|
end
|
||||||
@@ -582,10 +714,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
end
|
end
|
||||||
add_message "lnrpc.Invoice" do
|
add_message "lnrpc.Invoice" do
|
||||||
optional :memo, :string, 1
|
optional :memo, :string, 1
|
||||||
optional :receipt, :bytes, 2
|
|
||||||
optional :r_preimage, :bytes, 3
|
optional :r_preimage, :bytes, 3
|
||||||
optional :r_hash, :bytes, 4
|
optional :r_hash, :bytes, 4
|
||||||
optional :value, :int64, 5
|
optional :value, :int64, 5
|
||||||
|
optional :value_msat, :int64, 23
|
||||||
optional :settled, :bool, 6
|
optional :settled, :bool, 6
|
||||||
optional :creation_date, :int64, 7
|
optional :creation_date, :int64, 7
|
||||||
optional :settle_date, :int64, 8
|
optional :settle_date, :int64, 8
|
||||||
@@ -603,6 +735,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :amt_paid_msat, :int64, 20
|
optional :amt_paid_msat, :int64, 20
|
||||||
optional :state, :enum, 21, "lnrpc.Invoice.InvoiceState"
|
optional :state, :enum, 21, "lnrpc.Invoice.InvoiceState"
|
||||||
repeated :htlcs, :message, 22, "lnrpc.InvoiceHTLC"
|
repeated :htlcs, :message, 22, "lnrpc.InvoiceHTLC"
|
||||||
|
map :features, :uint32, :message, 24, "lnrpc.Feature"
|
||||||
|
optional :is_keysend, :bool, 25
|
||||||
end
|
end
|
||||||
add_enum "lnrpc.Invoice.InvoiceState" do
|
add_enum "lnrpc.Invoice.InvoiceState" do
|
||||||
value :OPEN, 0
|
value :OPEN, 0
|
||||||
@@ -619,6 +753,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :resolve_time, :int64, 6
|
optional :resolve_time, :int64, 6
|
||||||
optional :expiry_height, :int32, 7
|
optional :expiry_height, :int32, 7
|
||||||
optional :state, :enum, 8, "lnrpc.InvoiceHTLCState"
|
optional :state, :enum, 8, "lnrpc.InvoiceHTLCState"
|
||||||
|
map :custom_records, :uint64, :bytes, 9
|
||||||
|
optional :mpp_total_amt_msat, :uint64, 10
|
||||||
end
|
end
|
||||||
add_message "lnrpc.AddInvoiceResponse" do
|
add_message "lnrpc.AddInvoiceResponse" do
|
||||||
optional :r_hash, :bytes, 1
|
optional :r_hash, :bytes, 1
|
||||||
@@ -648,7 +784,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :payment_hash, :string, 1
|
optional :payment_hash, :string, 1
|
||||||
optional :value, :int64, 2
|
optional :value, :int64, 2
|
||||||
optional :creation_date, :int64, 3
|
optional :creation_date, :int64, 3
|
||||||
repeated :path, :string, 4
|
|
||||||
optional :fee, :int64, 5
|
optional :fee, :int64, 5
|
||||||
optional :payment_preimage, :string, 6
|
optional :payment_preimage, :string, 6
|
||||||
optional :value_sat, :int64, 7
|
optional :value_sat, :int64, 7
|
||||||
@@ -657,6 +792,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :status, :enum, 10, "lnrpc.Payment.PaymentStatus"
|
optional :status, :enum, 10, "lnrpc.Payment.PaymentStatus"
|
||||||
optional :fee_sat, :int64, 11
|
optional :fee_sat, :int64, 11
|
||||||
optional :fee_msat, :int64, 12
|
optional :fee_msat, :int64, 12
|
||||||
|
optional :creation_time_ns, :int64, 13
|
||||||
|
repeated :htlcs, :message, 14, "lnrpc.HTLCAttempt"
|
||||||
|
optional :payment_index, :uint64, 15
|
||||||
|
optional :failure_reason, :enum, 16, "lnrpc.PaymentFailureReason"
|
||||||
end
|
end
|
||||||
add_enum "lnrpc.Payment.PaymentStatus" do
|
add_enum "lnrpc.Payment.PaymentStatus" do
|
||||||
value :UNKNOWN, 0
|
value :UNKNOWN, 0
|
||||||
@@ -664,11 +803,28 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
value :SUCCEEDED, 2
|
value :SUCCEEDED, 2
|
||||||
value :FAILED, 3
|
value :FAILED, 3
|
||||||
end
|
end
|
||||||
|
add_message "lnrpc.HTLCAttempt" do
|
||||||
|
optional :status, :enum, 1, "lnrpc.HTLCAttempt.HTLCStatus"
|
||||||
|
optional :route, :message, 2, "lnrpc.Route"
|
||||||
|
optional :attempt_time_ns, :int64, 3
|
||||||
|
optional :resolve_time_ns, :int64, 4
|
||||||
|
optional :failure, :message, 5, "lnrpc.Failure"
|
||||||
|
end
|
||||||
|
add_enum "lnrpc.HTLCAttempt.HTLCStatus" do
|
||||||
|
value :IN_FLIGHT, 0
|
||||||
|
value :SUCCEEDED, 1
|
||||||
|
value :FAILED, 2
|
||||||
|
end
|
||||||
add_message "lnrpc.ListPaymentsRequest" do
|
add_message "lnrpc.ListPaymentsRequest" do
|
||||||
optional :include_incomplete, :bool, 1
|
optional :include_incomplete, :bool, 1
|
||||||
|
optional :index_offset, :uint64, 2
|
||||||
|
optional :max_payments, :uint64, 3
|
||||||
|
optional :reversed, :bool, 4
|
||||||
end
|
end
|
||||||
add_message "lnrpc.ListPaymentsResponse" do
|
add_message "lnrpc.ListPaymentsResponse" do
|
||||||
repeated :payments, :message, 1, "lnrpc.Payment"
|
repeated :payments, :message, 1, "lnrpc.Payment"
|
||||||
|
optional :first_index_offset, :uint64, 2
|
||||||
|
optional :last_index_offset, :uint64, 3
|
||||||
end
|
end
|
||||||
add_message "lnrpc.DeleteAllPaymentsRequest" do
|
add_message "lnrpc.DeleteAllPaymentsRequest" do
|
||||||
end
|
end
|
||||||
@@ -700,11 +856,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :fallback_addr, :string, 8
|
optional :fallback_addr, :string, 8
|
||||||
optional :cltv_expiry, :int64, 9
|
optional :cltv_expiry, :int64, 9
|
||||||
repeated :route_hints, :message, 10, "lnrpc.RouteHint"
|
repeated :route_hints, :message, 10, "lnrpc.RouteHint"
|
||||||
|
optional :payment_addr, :bytes, 11
|
||||||
|
optional :num_msat, :int64, 12
|
||||||
|
map :features, :uint32, :message, 13, "lnrpc.Feature"
|
||||||
|
end
|
||||||
|
add_message "lnrpc.Feature" do
|
||||||
|
optional :name, :string, 2
|
||||||
|
optional :is_required, :bool, 3
|
||||||
|
optional :is_known, :bool, 4
|
||||||
end
|
end
|
||||||
add_message "lnrpc.FeeReportRequest" do
|
add_message "lnrpc.FeeReportRequest" do
|
||||||
end
|
end
|
||||||
add_message "lnrpc.ChannelFeeReport" do
|
add_message "lnrpc.ChannelFeeReport" do
|
||||||
optional :chan_point, :string, 1
|
optional :chan_id, :uint64, 5
|
||||||
|
optional :channel_point, :string, 1
|
||||||
optional :base_fee_msat, :int64, 2
|
optional :base_fee_msat, :int64, 2
|
||||||
optional :fee_per_mil, :int64, 3
|
optional :fee_per_mil, :int64, 3
|
||||||
optional :fee_rate, :double, 4
|
optional :fee_rate, :double, 4
|
||||||
@@ -720,6 +885,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :fee_rate, :double, 4
|
optional :fee_rate, :double, 4
|
||||||
optional :time_lock_delta, :uint32, 5
|
optional :time_lock_delta, :uint32, 5
|
||||||
optional :max_htlc_msat, :uint64, 6
|
optional :max_htlc_msat, :uint64, 6
|
||||||
|
optional :min_htlc_msat, :uint64, 7
|
||||||
|
optional :min_htlc_msat_specified, :bool, 8
|
||||||
oneof :scope do
|
oneof :scope do
|
||||||
optional :global, :bool, 1
|
optional :global, :bool, 1
|
||||||
optional :chan_point, :message, 2, "lnrpc.ChannelPoint"
|
optional :chan_point, :message, 2, "lnrpc.ChannelPoint"
|
||||||
@@ -741,6 +908,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
optional :amt_out, :uint64, 6
|
optional :amt_out, :uint64, 6
|
||||||
optional :fee, :uint64, 7
|
optional :fee, :uint64, 7
|
||||||
optional :fee_msat, :uint64, 8
|
optional :fee_msat, :uint64, 8
|
||||||
|
optional :amt_in_msat, :uint64, 9
|
||||||
|
optional :amt_out_msat, :uint64, 10
|
||||||
end
|
end
|
||||||
add_message "lnrpc.ForwardingHistoryResponse" do
|
add_message "lnrpc.ForwardingHistoryResponse" do
|
||||||
repeated :forwarding_events, :message, 1, "lnrpc.ForwardingEvent"
|
repeated :forwarding_events, :message, 1, "lnrpc.ForwardingEvent"
|
||||||
@@ -778,17 +947,123 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|||||||
end
|
end
|
||||||
add_message "lnrpc.VerifyChanBackupResponse" do
|
add_message "lnrpc.VerifyChanBackupResponse" do
|
||||||
end
|
end
|
||||||
|
add_message "lnrpc.MacaroonPermission" do
|
||||||
|
optional :entity, :string, 1
|
||||||
|
optional :action, :string, 2
|
||||||
|
end
|
||||||
|
add_message "lnrpc.BakeMacaroonRequest" do
|
||||||
|
repeated :permissions, :message, 1, "lnrpc.MacaroonPermission"
|
||||||
|
end
|
||||||
|
add_message "lnrpc.BakeMacaroonResponse" do
|
||||||
|
optional :macaroon, :string, 1
|
||||||
|
end
|
||||||
|
add_message "lnrpc.Failure" do
|
||||||
|
optional :code, :enum, 1, "lnrpc.Failure.FailureCode"
|
||||||
|
optional :channel_update, :message, 3, "lnrpc.ChannelUpdate"
|
||||||
|
optional :htlc_msat, :uint64, 4
|
||||||
|
optional :onion_sha_256, :bytes, 5
|
||||||
|
optional :cltv_expiry, :uint32, 6
|
||||||
|
optional :flags, :uint32, 7
|
||||||
|
optional :failure_source_index, :uint32, 8
|
||||||
|
optional :height, :uint32, 9
|
||||||
|
end
|
||||||
|
add_enum "lnrpc.Failure.FailureCode" do
|
||||||
|
value :RESERVED, 0
|
||||||
|
value :INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS, 1
|
||||||
|
value :INCORRECT_PAYMENT_AMOUNT, 2
|
||||||
|
value :FINAL_INCORRECT_CLTV_EXPIRY, 3
|
||||||
|
value :FINAL_INCORRECT_HTLC_AMOUNT, 4
|
||||||
|
value :FINAL_EXPIRY_TOO_SOON, 5
|
||||||
|
value :INVALID_REALM, 6
|
||||||
|
value :EXPIRY_TOO_SOON, 7
|
||||||
|
value :INVALID_ONION_VERSION, 8
|
||||||
|
value :INVALID_ONION_HMAC, 9
|
||||||
|
value :INVALID_ONION_KEY, 10
|
||||||
|
value :AMOUNT_BELOW_MINIMUM, 11
|
||||||
|
value :FEE_INSUFFICIENT, 12
|
||||||
|
value :INCORRECT_CLTV_EXPIRY, 13
|
||||||
|
value :CHANNEL_DISABLED, 14
|
||||||
|
value :TEMPORARY_CHANNEL_FAILURE, 15
|
||||||
|
value :REQUIRED_NODE_FEATURE_MISSING, 16
|
||||||
|
value :REQUIRED_CHANNEL_FEATURE_MISSING, 17
|
||||||
|
value :UNKNOWN_NEXT_PEER, 18
|
||||||
|
value :TEMPORARY_NODE_FAILURE, 19
|
||||||
|
value :PERMANENT_NODE_FAILURE, 20
|
||||||
|
value :PERMANENT_CHANNEL_FAILURE, 21
|
||||||
|
value :EXPIRY_TOO_FAR, 22
|
||||||
|
value :MPP_TIMEOUT, 23
|
||||||
|
value :INTERNAL_FAILURE, 997
|
||||||
|
value :UNKNOWN_FAILURE, 998
|
||||||
|
value :UNREADABLE_FAILURE, 999
|
||||||
|
end
|
||||||
|
add_message "lnrpc.ChannelUpdate" do
|
||||||
|
optional :signature, :bytes, 1
|
||||||
|
optional :chain_hash, :bytes, 2
|
||||||
|
optional :chan_id, :uint64, 3
|
||||||
|
optional :timestamp, :uint32, 4
|
||||||
|
optional :message_flags, :uint32, 10
|
||||||
|
optional :channel_flags, :uint32, 5
|
||||||
|
optional :time_lock_delta, :uint32, 6
|
||||||
|
optional :htlc_minimum_msat, :uint64, 7
|
||||||
|
optional :base_fee, :uint32, 8
|
||||||
|
optional :fee_rate, :uint32, 9
|
||||||
|
optional :htlc_maximum_msat, :uint64, 11
|
||||||
|
optional :extra_opaque_data, :bytes, 12
|
||||||
|
end
|
||||||
add_enum "lnrpc.AddressType" do
|
add_enum "lnrpc.AddressType" do
|
||||||
value :WITNESS_PUBKEY_HASH, 0
|
value :WITNESS_PUBKEY_HASH, 0
|
||||||
value :NESTED_PUBKEY_HASH, 1
|
value :NESTED_PUBKEY_HASH, 1
|
||||||
value :UNUSED_WITNESS_PUBKEY_HASH, 2
|
value :UNUSED_WITNESS_PUBKEY_HASH, 2
|
||||||
value :UNUSED_NESTED_PUBKEY_HASH, 3
|
value :UNUSED_NESTED_PUBKEY_HASH, 3
|
||||||
end
|
end
|
||||||
|
add_enum "lnrpc.CommitmentType" do
|
||||||
|
value :LEGACY, 0
|
||||||
|
value :STATIC_REMOTE_KEY, 1
|
||||||
|
value :ANCHORS, 2
|
||||||
|
value :UNKNOWN_COMMITMENT_TYPE, 999
|
||||||
|
end
|
||||||
|
add_enum "lnrpc.Initiator" do
|
||||||
|
value :INITIATOR_UNKNOWN, 0
|
||||||
|
value :INITIATOR_LOCAL, 1
|
||||||
|
value :INITIATOR_REMOTE, 2
|
||||||
|
value :INITIATOR_BOTH, 3
|
||||||
|
end
|
||||||
|
add_enum "lnrpc.NodeMetricType" do
|
||||||
|
value :UNKNOWN, 0
|
||||||
|
value :BETWEENNESS_CENTRALITY, 1
|
||||||
|
end
|
||||||
add_enum "lnrpc.InvoiceHTLCState" do
|
add_enum "lnrpc.InvoiceHTLCState" do
|
||||||
value :ACCEPTED, 0
|
value :ACCEPTED, 0
|
||||||
value :SETTLED, 1
|
value :SETTLED, 1
|
||||||
value :CANCELED, 2
|
value :CANCELED, 2
|
||||||
end
|
end
|
||||||
|
add_enum "lnrpc.PaymentFailureReason" do
|
||||||
|
value :FAILURE_REASON_NONE, 0
|
||||||
|
value :FAILURE_REASON_TIMEOUT, 1
|
||||||
|
value :FAILURE_REASON_NO_ROUTE, 2
|
||||||
|
value :FAILURE_REASON_ERROR, 3
|
||||||
|
value :FAILURE_REASON_INCORRECT_PAYMENT_DETAILS, 4
|
||||||
|
value :FAILURE_REASON_INSUFFICIENT_BALANCE, 5
|
||||||
|
end
|
||||||
|
add_enum "lnrpc.FeatureBit" do
|
||||||
|
value :DATALOSS_PROTECT_REQ, 0
|
||||||
|
value :DATALOSS_PROTECT_OPT, 1
|
||||||
|
value :INITIAL_ROUING_SYNC, 3
|
||||||
|
value :UPFRONT_SHUTDOWN_SCRIPT_REQ, 4
|
||||||
|
value :UPFRONT_SHUTDOWN_SCRIPT_OPT, 5
|
||||||
|
value :GOSSIP_QUERIES_REQ, 6
|
||||||
|
value :GOSSIP_QUERIES_OPT, 7
|
||||||
|
value :TLV_ONION_REQ, 8
|
||||||
|
value :TLV_ONION_OPT, 9
|
||||||
|
value :EXT_GOSSIP_QUERIES_REQ, 10
|
||||||
|
value :EXT_GOSSIP_QUERIES_OPT, 11
|
||||||
|
value :STATIC_REMOTE_KEY_REQ, 12
|
||||||
|
value :STATIC_REMOTE_KEY_OPT, 13
|
||||||
|
value :PAYMENT_ADDR_REQ, 14
|
||||||
|
value :PAYMENT_ADDR_OPT, 15
|
||||||
|
value :MPP_REQ, 16
|
||||||
|
value :MPP_OPT, 17
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
module Lnrpc
|
module Lnrpc
|
||||||
@@ -841,8 +1116,12 @@ module Lnrpc
|
|||||||
ClosedChannelsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ClosedChannelsResponse").msgclass
|
ClosedChannelsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ClosedChannelsResponse").msgclass
|
||||||
Peer = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Peer").msgclass
|
Peer = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Peer").msgclass
|
||||||
Peer::SyncType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Peer.SyncType").enummodule
|
Peer::SyncType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Peer.SyncType").enummodule
|
||||||
|
TimestampedError = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.TimestampedError").msgclass
|
||||||
ListPeersRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPeersRequest").msgclass
|
ListPeersRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPeersRequest").msgclass
|
||||||
ListPeersResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPeersResponse").msgclass
|
ListPeersResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPeersResponse").msgclass
|
||||||
|
PeerEventSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PeerEventSubscription").msgclass
|
||||||
|
PeerEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PeerEvent").msgclass
|
||||||
|
PeerEvent::EventType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PeerEvent.EventType").enummodule
|
||||||
GetInfoRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetInfoRequest").msgclass
|
GetInfoRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetInfoRequest").msgclass
|
||||||
GetInfoResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetInfoResponse").msgclass
|
GetInfoResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetInfoResponse").msgclass
|
||||||
Chain = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Chain").msgclass
|
Chain = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Chain").msgclass
|
||||||
@@ -852,16 +1131,29 @@ module Lnrpc
|
|||||||
CloseChannelRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CloseChannelRequest").msgclass
|
CloseChannelRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CloseChannelRequest").msgclass
|
||||||
CloseStatusUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CloseStatusUpdate").msgclass
|
CloseStatusUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CloseStatusUpdate").msgclass
|
||||||
PendingUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingUpdate").msgclass
|
PendingUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingUpdate").msgclass
|
||||||
|
ReadyForPsbtFunding = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ReadyForPsbtFunding").msgclass
|
||||||
OpenChannelRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenChannelRequest").msgclass
|
OpenChannelRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenChannelRequest").msgclass
|
||||||
OpenStatusUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenStatusUpdate").msgclass
|
OpenStatusUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.OpenStatusUpdate").msgclass
|
||||||
|
KeyLocator = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.KeyLocator").msgclass
|
||||||
|
KeyDescriptor = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.KeyDescriptor").msgclass
|
||||||
|
ChanPointShim = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChanPointShim").msgclass
|
||||||
|
PsbtShim = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PsbtShim").msgclass
|
||||||
|
FundingShim = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FundingShim").msgclass
|
||||||
|
FundingShimCancel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FundingShimCancel").msgclass
|
||||||
|
FundingPsbtVerify = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FundingPsbtVerify").msgclass
|
||||||
|
FundingPsbtFinalize = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FundingPsbtFinalize").msgclass
|
||||||
|
FundingTransitionMsg = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FundingTransitionMsg").msgclass
|
||||||
|
FundingStateStepResp = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FundingStateStepResp").msgclass
|
||||||
PendingHTLC = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingHTLC").msgclass
|
PendingHTLC = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingHTLC").msgclass
|
||||||
PendingChannelsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsRequest").msgclass
|
PendingChannelsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsRequest").msgclass
|
||||||
PendingChannelsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse").msgclass
|
PendingChannelsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse").msgclass
|
||||||
PendingChannelsResponse::PendingChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.PendingChannel").msgclass
|
PendingChannelsResponse::PendingChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.PendingChannel").msgclass
|
||||||
PendingChannelsResponse::PendingOpenChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.PendingOpenChannel").msgclass
|
PendingChannelsResponse::PendingOpenChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.PendingOpenChannel").msgclass
|
||||||
PendingChannelsResponse::WaitingCloseChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.WaitingCloseChannel").msgclass
|
PendingChannelsResponse::WaitingCloseChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.WaitingCloseChannel").msgclass
|
||||||
|
PendingChannelsResponse::Commitments = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.Commitments").msgclass
|
||||||
PendingChannelsResponse::ClosedChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.ClosedChannel").msgclass
|
PendingChannelsResponse::ClosedChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.ClosedChannel").msgclass
|
||||||
PendingChannelsResponse::ForceClosedChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.ForceClosedChannel").msgclass
|
PendingChannelsResponse::ForceClosedChannel = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.ForceClosedChannel").msgclass
|
||||||
|
PendingChannelsResponse::ForceClosedChannel::AnchorState = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState").enummodule
|
||||||
ChannelEventSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventSubscription").msgclass
|
ChannelEventSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventSubscription").msgclass
|
||||||
ChannelEventUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate").msgclass
|
ChannelEventUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate").msgclass
|
||||||
ChannelEventUpdate::UpdateType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate.UpdateType").enummodule
|
ChannelEventUpdate::UpdateType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate.UpdateType").enummodule
|
||||||
@@ -874,6 +1166,7 @@ module Lnrpc
|
|||||||
EdgeLocator = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.EdgeLocator").msgclass
|
EdgeLocator = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.EdgeLocator").msgclass
|
||||||
QueryRoutesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesResponse").msgclass
|
QueryRoutesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesResponse").msgclass
|
||||||
Hop = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Hop").msgclass
|
Hop = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Hop").msgclass
|
||||||
|
MPPRecord = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MPPRecord").msgclass
|
||||||
Route = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Route").msgclass
|
Route = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Route").msgclass
|
||||||
NodeInfoRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfoRequest").msgclass
|
NodeInfoRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfoRequest").msgclass
|
||||||
NodeInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfo").msgclass
|
NodeInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfo").msgclass
|
||||||
@@ -883,6 +1176,9 @@ module Lnrpc
|
|||||||
ChannelEdge = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEdge").msgclass
|
ChannelEdge = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEdge").msgclass
|
||||||
ChannelGraphRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelGraphRequest").msgclass
|
ChannelGraphRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelGraphRequest").msgclass
|
||||||
ChannelGraph = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelGraph").msgclass
|
ChannelGraph = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelGraph").msgclass
|
||||||
|
NodeMetricsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeMetricsRequest").msgclass
|
||||||
|
NodeMetricsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeMetricsResponse").msgclass
|
||||||
|
FloatMetric = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FloatMetric").msgclass
|
||||||
ChanInfoRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChanInfoRequest").msgclass
|
ChanInfoRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChanInfoRequest").msgclass
|
||||||
NetworkInfoRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NetworkInfoRequest").msgclass
|
NetworkInfoRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NetworkInfoRequest").msgclass
|
||||||
NetworkInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NetworkInfo").msgclass
|
NetworkInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NetworkInfo").msgclass
|
||||||
@@ -905,6 +1201,8 @@ module Lnrpc
|
|||||||
InvoiceSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceSubscription").msgclass
|
InvoiceSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceSubscription").msgclass
|
||||||
Payment = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Payment").msgclass
|
Payment = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Payment").msgclass
|
||||||
Payment::PaymentStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Payment.PaymentStatus").enummodule
|
Payment::PaymentStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Payment.PaymentStatus").enummodule
|
||||||
|
HTLCAttempt = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.HTLCAttempt").msgclass
|
||||||
|
HTLCAttempt::HTLCStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.HTLCAttempt.HTLCStatus").enummodule
|
||||||
ListPaymentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsRequest").msgclass
|
ListPaymentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsRequest").msgclass
|
||||||
ListPaymentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsResponse").msgclass
|
ListPaymentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsResponse").msgclass
|
||||||
DeleteAllPaymentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsRequest").msgclass
|
DeleteAllPaymentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsRequest").msgclass
|
||||||
@@ -915,6 +1213,7 @@ module Lnrpc
|
|||||||
DebugLevelResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DebugLevelResponse").msgclass
|
DebugLevelResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DebugLevelResponse").msgclass
|
||||||
PayReqString = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PayReqString").msgclass
|
PayReqString = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PayReqString").msgclass
|
||||||
PayReq = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PayReq").msgclass
|
PayReq = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PayReq").msgclass
|
||||||
|
Feature = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Feature").msgclass
|
||||||
FeeReportRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeeReportRequest").msgclass
|
FeeReportRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeeReportRequest").msgclass
|
||||||
ChannelFeeReport = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelFeeReport").msgclass
|
ChannelFeeReport = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelFeeReport").msgclass
|
||||||
FeeReportResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeeReportResponse").msgclass
|
FeeReportResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeeReportResponse").msgclass
|
||||||
@@ -933,6 +1232,17 @@ module Lnrpc
|
|||||||
RestoreBackupResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RestoreBackupResponse").msgclass
|
RestoreBackupResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RestoreBackupResponse").msgclass
|
||||||
ChannelBackupSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBackupSubscription").msgclass
|
ChannelBackupSubscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBackupSubscription").msgclass
|
||||||
VerifyChanBackupResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.VerifyChanBackupResponse").msgclass
|
VerifyChanBackupResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.VerifyChanBackupResponse").msgclass
|
||||||
|
MacaroonPermission = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MacaroonPermission").msgclass
|
||||||
|
BakeMacaroonRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BakeMacaroonRequest").msgclass
|
||||||
|
BakeMacaroonResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.BakeMacaroonResponse").msgclass
|
||||||
|
Failure = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Failure").msgclass
|
||||||
|
Failure::FailureCode = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Failure.FailureCode").enummodule
|
||||||
|
ChannelUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelUpdate").msgclass
|
||||||
AddressType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddressType").enummodule
|
AddressType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddressType").enummodule
|
||||||
|
CommitmentType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.CommitmentType").enummodule
|
||||||
|
Initiator = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Initiator").enummodule
|
||||||
|
NodeMetricType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeMetricType").enummodule
|
||||||
InvoiceHTLCState = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLCState").enummodule
|
InvoiceHTLCState = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLCState").enummodule
|
||||||
|
PaymentFailureReason = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentFailureReason").enummodule
|
||||||
|
FeatureBit = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.FeatureBit").enummodule
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -148,6 +148,11 @@ module Lnrpc
|
|||||||
# * lncli: `listpeers`
|
# * lncli: `listpeers`
|
||||||
# ListPeers returns a verbose listing of all currently active peers.
|
# ListPeers returns a verbose listing of all currently active peers.
|
||||||
rpc :ListPeers, ListPeersRequest, ListPeersResponse
|
rpc :ListPeers, ListPeersRequest, 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`
|
# * lncli: `getinfo`
|
||||||
# GetInfo returns general information concerning the lightning node including
|
# GetInfo returns general information concerning the lightning node including
|
||||||
# it's identity pubkey, alias, the chains it is connected to, and information
|
# it's identity pubkey, alias, the chains it is connected to, and information
|
||||||
@@ -186,9 +191,22 @@ module Lnrpc
|
|||||||
# request to a remote peer. Users are able to specify a target number of
|
# 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
|
# blocks that the funding transaction should be confirmed in, or a manual fee
|
||||||
# rate to us for the funding transaction. If neither are specified, then a
|
# rate to us for the funding transaction. If neither are specified, then a
|
||||||
# lax block confirmation target is used.
|
# lax block confirmation target is used. Each OpenStatusUpdate will return
|
||||||
|
# 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, OpenChannelRequest, stream(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
|
||||||
|
# identified is via its pending channel ID. As an example, this method can be
|
||||||
|
# used to specify that we're expecting a funding flow for a particular
|
||||||
|
# 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
|
||||||
|
# *
|
||||||
# ChannelAcceptor dispatches a bi-directional streaming RPC in which
|
# ChannelAcceptor dispatches a bi-directional streaming RPC in which
|
||||||
# OpenChannel requests are sent to the client and the client responds with
|
# 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
|
# a boolean that tells LND whether or not to accept the channel. This allows
|
||||||
@@ -211,10 +229,11 @@ module Lnrpc
|
|||||||
# when in debug builds of lnd.
|
# when in debug builds of lnd.
|
||||||
rpc :AbandonChannel, AbandonChannelRequest, AbandonChannelResponse
|
rpc :AbandonChannel, AbandonChannelRequest, AbandonChannelResponse
|
||||||
# * lncli: `sendpayment`
|
# * lncli: `sendpayment`
|
||||||
# SendPayment dispatches a bi-directional streaming RPC for sending payments
|
# Deprecated, use routerrpc.SendPayment. SendPayment dispatches a
|
||||||
# through the Lightning Network. A single RPC invocation creates a persistent
|
# bi-directional streaming RPC for sending payments through the Lightning
|
||||||
# bi-directional stream allowing clients to rapidly send payments through the
|
# Network. A single RPC invocation creates a persistent bi-directional
|
||||||
# Lightning Network with a single persistent connection.
|
# 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(SendRequest), stream(SendResponse)
|
||||||
# *
|
# *
|
||||||
# SendPaymentSync is the synchronous non-streaming version of SendPayment.
|
# SendPaymentSync is the synchronous non-streaming version of SendPayment.
|
||||||
@@ -256,9 +275,9 @@ module Lnrpc
|
|||||||
# notifying the client of newly added/settled invoices. The caller can
|
# 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
|
# optionally specify the add_index and/or the settle_index. If the add_index
|
||||||
# is specified, then we'll first start by sending add invoice events for all
|
# is specified, then we'll first start by sending add invoice events for all
|
||||||
# invoices with an add_index greater than the specified value. If the
|
# invoices with an add_index greater than the specified value. If the
|
||||||
# settle_index is specified, the next, we'll send out all settle events for
|
# settle_index is specified, the next, we'll send out all settle events for
|
||||||
# invoices with a settle_index greater than the specified value. One or both
|
# 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
|
# of these fields can be set. If no fields are set, then we'll only send out
|
||||||
# the latest add/settle events.
|
# the latest add/settle events.
|
||||||
rpc :SubscribeInvoices, InvoiceSubscription, stream(Invoice)
|
rpc :SubscribeInvoices, InvoiceSubscription, stream(Invoice)
|
||||||
@@ -277,10 +296,14 @@ module Lnrpc
|
|||||||
# DescribeGraph returns a description of the latest graph state from the
|
# DescribeGraph returns a description of the latest graph state from the
|
||||||
# point of view of the node. The graph information is partitioned into two
|
# 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
|
# components: all the nodes/vertexes, and all the edges that connect the
|
||||||
# vertexes themselves. As this is a directed graph, the edges also contain
|
# vertexes themselves. As this is a directed graph, the edges also contain
|
||||||
# the node directional specific routing policy which includes: the time lock
|
# the node directional specific routing policy which includes: the time lock
|
||||||
# delta, fee information, etc.
|
# delta, fee information, etc.
|
||||||
rpc :DescribeGraph, ChannelGraphRequest, ChannelGraph
|
rpc :DescribeGraph, ChannelGraphRequest, 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`
|
# * lncli: `getchaninfo`
|
||||||
# GetChanInfo returns the latest authenticated network announcement for the
|
# GetChanInfo returns the latest authenticated network announcement for the
|
||||||
# given channel identified by its channel ID: an 8-byte integer which
|
# given channel identified by its channel ID: an 8-byte integer which
|
||||||
@@ -336,7 +359,7 @@ module Lnrpc
|
|||||||
#
|
#
|
||||||
# A list of forwarding events are returned. The size of each forwarding event
|
# A list of forwarding events are returned. The size of each forwarding event
|
||||||
# is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB.
|
# is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB.
|
||||||
# As a result each message can only contain 50k entries. Each response has
|
# 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
|
# 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.
|
# request to allow the caller to skip a series of records.
|
||||||
rpc :ForwardingHistory, ForwardingHistoryRequest, ForwardingHistoryResponse
|
rpc :ForwardingHistory, ForwardingHistoryRequest, ForwardingHistoryResponse
|
||||||
@@ -375,6 +398,11 @@ module Lnrpc
|
|||||||
# ups, but the updated set of encrypted multi-chan backups with the closed
|
# ups, but the updated set of encrypted multi-chan backups with the closed
|
||||||
# channel(s) removed.
|
# channel(s) removed.
|
||||||
rpc :SubscribeChannelBackups, ChannelBackupSubscription, stream(ChanBackupSnapshot)
|
rpc :SubscribeChannelBackups, ChannelBackupSubscription, stream(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
|
||||||
end
|
end
|
||||||
|
|
||||||
Stub = Service.rpc_stub_class
|
Stub = Service.rpc_stub_class
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module Lnrpc
|
module Lnrpc
|
||||||
VERSION = "0.8.0"
|
VERSION = "0.10.0"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user