Add support for v0.11 GRPC services

This also refactors the client GRPC wrapper to dynamically load the
request objects.
All GRPC generated client files now live under lib/grpc_services
feature/payment-response-wrapper
bumi 2 years ago
parent 579fc423ea
commit 404ed3b99e
  1. 48
      lib/grpc_services/autopilotrpc/autopilot_pb.rb
  2. 40
      lib/grpc_services/autopilotrpc/autopilot_services_pb.rb
  3. 67
      lib/grpc_services/chainrpc/chainnotifier_pb.rb
  4. 51
      lib/grpc_services/chainrpc/chainnotifier_services_pb.rb
  5. 48
      lib/grpc_services/invoicesrpc/invoices_pb.rb
  6. 41
      lib/grpc_services/invoicesrpc/invoices_services_pb.rb
  7. 18
      lib/grpc_services/lnclipb/lncli_pb.rb
  8. 229
      lib/grpc_services/routerrpc/router_pb.rb
  9. 49
      lib/grpc_services/routerrpc/router_services_pb.rb
  10. 1265
      lib/grpc_services/rpc_pb.rb
  11. 198
      lib/grpc_services/rpc_services_pb.rb
  12. 83
      lib/grpc_services/signrpc/signer_pb.rb
  13. 68
      lib/grpc_services/signrpc/signer_services_pb.rb
  14. 27
      lib/grpc_services/verrpc/verrpc_pb.rb
  15. 27
      lib/grpc_services/verrpc/verrpc_services_pb.rb
  16. 149
      lib/grpc_services/walletrpc/walletkit_pb.rb
  17. 115
      lib/grpc_services/walletrpc/walletkit_services_pb.rb
  18. 51
      lib/grpc_services/walletunlocker_pb.rb
  19. 72
      lib/grpc_services/walletunlocker_services_pb.rb
  20. 21
      lib/grpc_services/watchtowerrpc/watchtower_pb.rb
  21. 28
      lib/grpc_services/watchtowerrpc/watchtower_services_pb.rb
  22. 75
      lib/grpc_services/wtclientrpc/wtclient_pb.rb
  23. 43
      lib/grpc_services/wtclientrpc/wtclient_services_pb.rb
  24. 8
      lib/lnrpc.rb
  25. 59
      lib/lnrpc/client.rb
  26. 61
      lib/lnrpc/grpc_wrapper.rb
  27. 560
      lib/lnrpc/router.proto
  28. 198
      lib/lnrpc/router_pb.rb
  29. 3687
      lib/lnrpc/rpc.proto
  30. 1248
      lib/lnrpc/rpc_pb.rb
  31. 2
      lnrpc.gemspec

@ -0,0 +1,48 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: autopilotrpc/autopilot.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("autopilotrpc/autopilot.proto", :syntax => :proto3) do
add_message "autopilotrpc.StatusRequest" do
end
add_message "autopilotrpc.StatusResponse" do
optional :active, :bool, 1
end
add_message "autopilotrpc.ModifyStatusRequest" do
optional :enable, :bool, 1
end
add_message "autopilotrpc.ModifyStatusResponse" do
end
add_message "autopilotrpc.QueryScoresRequest" do
repeated :pubkeys, :string, 1
optional :ignore_local_state, :bool, 2
end
add_message "autopilotrpc.QueryScoresResponse" do
repeated :results, :message, 1, "autopilotrpc.QueryScoresResponse.HeuristicResult"
end
add_message "autopilotrpc.QueryScoresResponse.HeuristicResult" do
optional :heuristic, :string, 1
map :scores, :string, :double, 2
end
add_message "autopilotrpc.SetScoresRequest" do
optional :heuristic, :string, 1
map :scores, :string, :double, 2
end
add_message "autopilotrpc.SetScoresResponse" do
end
end
end
module Autopilotrpc
StatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.StatusRequest").msgclass
StatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.StatusResponse").msgclass
ModifyStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.ModifyStatusRequest").msgclass
ModifyStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.ModifyStatusResponse").msgclass
QueryScoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.QueryScoresRequest").msgclass
QueryScoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.QueryScoresResponse").msgclass
QueryScoresResponse::HeuristicResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.QueryScoresResponse.HeuristicResult").msgclass
SetScoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.SetScoresRequest").msgclass
SetScoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.SetScoresResponse").msgclass
end

@ -0,0 +1,40 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: autopilotrpc/autopilot.proto for package 'autopilotrpc'
require 'grpc'
require 'autopilotrpc/autopilot_pb'
module Autopilotrpc
module Autopilot
# Autopilot is a service that can be used to get information about the current
# state of the daemon's autopilot agent, and also supply it with information
# that can be used when deciding where to open channels.
class Service
include GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'autopilotrpc.Autopilot'
#
# Status returns whether the daemon's autopilot agent is active.
rpc :Status, StatusRequest, StatusResponse
#
# ModifyStatus is used to modify the status of the autopilot agent, like
# enabling or disabling it.
rpc :ModifyStatus, ModifyStatusRequest, ModifyStatusResponse
#
# QueryScores queries all available autopilot heuristics, in addition to any
# active combination of these heruristics, for the scores they would give to
# the given nodes.
rpc :QueryScores, QueryScoresRequest, QueryScoresResponse
#
# SetScores attempts to set the scores used by the running autopilot agent,
# if the external scoring heuristic is enabled.
rpc :SetScores, SetScoresRequest, SetScoresResponse
end
Stub = Service.rpc_stub_class
end
end

@ -0,0 +1,67 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: chainrpc/chainnotifier.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("chainrpc/chainnotifier.proto", :syntax => :proto3) do
add_message "chainrpc.ConfRequest" do
optional :txid, :bytes, 1
optional :script, :bytes, 2
optional :num_confs, :uint32, 3
optional :height_hint, :uint32, 4
end
add_message "chainrpc.ConfDetails" do
optional :raw_tx, :bytes, 1
optional :block_hash, :bytes, 2
optional :block_height, :uint32, 3
optional :tx_index, :uint32, 4
end
add_message "chainrpc.Reorg" do
end
add_message "chainrpc.ConfEvent" do
oneof :event do
optional :conf, :message, 1, "chainrpc.ConfDetails"
optional :reorg, :message, 2, "chainrpc.Reorg"
end
end
add_message "chainrpc.Outpoint" do
optional :hash, :bytes, 1
optional :index, :uint32, 2
end
add_message "chainrpc.SpendRequest" do
optional :outpoint, :message, 1, "chainrpc.Outpoint"
optional :script, :bytes, 2
optional :height_hint, :uint32, 3
end
add_message "chainrpc.SpendDetails" do
optional :spending_outpoint, :message, 1, "chainrpc.Outpoint"
optional :raw_spending_tx, :bytes, 2
optional :spending_tx_hash, :bytes, 3
optional :spending_input_index, :uint32, 4
optional :spending_height, :uint32, 5
end
add_message "chainrpc.SpendEvent" do
oneof :event do
optional :spend, :message, 1, "chainrpc.SpendDetails"
optional :reorg, :message, 2, "chainrpc.Reorg"
end
end
add_message "chainrpc.BlockEpoch" do
optional :hash, :bytes, 1
optional :height, :uint32, 2
end
end
end
module Chainrpc
ConfRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.ConfRequest").msgclass
ConfDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.ConfDetails").msgclass
Reorg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.Reorg").msgclass
ConfEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.ConfEvent").msgclass
Outpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.Outpoint").msgclass
SpendRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.SpendRequest").msgclass
SpendDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.SpendDetails").msgclass
SpendEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.SpendEvent").msgclass
BlockEpoch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("chainrpc.BlockEpoch").msgclass
end

@ -0,0 +1,51 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: chainrpc/chainnotifier.proto for package 'chainrpc'
require 'grpc'
require 'chainrpc/chainnotifier_pb'
module Chainrpc
module ChainNotifier
# ChainNotifier is a service that can be used to get information about the
# chain backend by registering notifiers for chain events.
class Service
include GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'chainrpc.ChainNotifier'
#
# RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
# registers an intent for a client to be notified once a confirmation request
# has reached its required number of confirmations on-chain.
#
# A client can specify whether the confirmation request should be for a
# particular transaction by its hash or for an output script by specifying a
# zero hash.
rpc :RegisterConfirmationsNtfn, ConfRequest, stream(ConfEvent)
#
# RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
# intent for a client to be notification once a spend request has been spent
# by a transaction that has confirmed on-chain.
#
# A client can specify whether the spend request should be for a particular
# outpoint or for an output script by specifying a zero outpoint.
rpc :RegisterSpendNtfn, SpendRequest, stream(SpendEvent)
#
# RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
# registers an intent for a client to be notified of blocks in the chain. The
# stream will return a hash and height tuple of a block for each new/stale
# block in the chain. It is the client's responsibility to determine whether
# the tuple returned is for a new or stale block in the chain.
#
# A client can also request a historical backlog of blocks from a particular
# point. This allows clients to be idempotent by ensuring that they do not
# missing processing a single block within the chain.
rpc :RegisterBlockEpochNtfn, BlockEpoch, stream(BlockEpoch)
end
Stub = Service.rpc_stub_class
end
end

@ -0,0 +1,48 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: invoicesrpc/invoices.proto
require 'google/protobuf'
require 'rpc_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("invoicesrpc/invoices.proto", :syntax => :proto3) do
add_message "invoicesrpc.CancelInvoiceMsg" do
optional :payment_hash, :bytes, 1
end
add_message "invoicesrpc.CancelInvoiceResp" do
end
add_message "invoicesrpc.AddHoldInvoiceRequest" do
optional :memo, :string, 1
optional :hash, :bytes, 2
optional :value, :int64, 3
optional :value_msat, :int64, 10
optional :description_hash, :bytes, 4
optional :expiry, :int64, 5
optional :fallback_addr, :string, 6
optional :cltv_expiry, :uint64, 7
repeated :route_hints, :message, 8, "lnrpc.RouteHint"
optional :private, :bool, 9
end
add_message "invoicesrpc.AddHoldInvoiceResp" do
optional :payment_request, :string, 1
end
add_message "invoicesrpc.SettleInvoiceMsg" do
optional :preimage, :bytes, 1
end
add_message "invoicesrpc.SettleInvoiceResp" do
end
add_message "invoicesrpc.SubscribeSingleInvoiceRequest" do
optional :r_hash, :bytes, 2
end
end
end
module Invoicesrpc
CancelInvoiceMsg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.CancelInvoiceMsg").msgclass
CancelInvoiceResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.CancelInvoiceResp").msgclass
AddHoldInvoiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.AddHoldInvoiceRequest").msgclass
AddHoldInvoiceResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.AddHoldInvoiceResp").msgclass
SettleInvoiceMsg = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SettleInvoiceMsg").msgclass
SettleInvoiceResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SettleInvoiceResp").msgclass
SubscribeSingleInvoiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("invoicesrpc.SubscribeSingleInvoiceRequest").msgclass
end

@ -0,0 +1,41 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: invoicesrpc/invoices.proto for package 'invoicesrpc'
require 'grpc'
require 'invoicesrpc/invoices_pb'
module Invoicesrpc
module Invoices
# Invoices is a service that can be used to create, accept, settle and cancel
# invoices.
class Service
include GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'invoicesrpc.Invoices'
#
# SubscribeSingleInvoice returns a uni-directional stream (server -> client)
# to notify the client of state transitions of the specified invoice.
# Initially the current invoice state is always sent out.
rpc :SubscribeSingleInvoice, SubscribeSingleInvoiceRequest, stream(Lnrpc::Invoice)
#
# CancelInvoice cancels a currently open invoice. If the invoice is already
# canceled, this call will succeed. If the invoice is already settled, it will
# fail.
rpc :CancelInvoice, CancelInvoiceMsg, CancelInvoiceResp
#
# AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
# supplied in the request.
rpc :AddHoldInvoice, AddHoldInvoiceRequest, AddHoldInvoiceResp
#
# SettleInvoice settles an accepted invoice. If the invoice is already
# settled, this call will succeed.
rpc :SettleInvoice, SettleInvoiceMsg, SettleInvoiceResp
end
Stub = Service.rpc_stub_class
end
end

@ -0,0 +1,18 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: lnclipb/lncli.proto
require 'google/protobuf'
require 'verrpc/verrpc_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("lnclipb/lncli.proto", :syntax => :proto3) do
add_message "lnclipb.VersionResponse" do
optional :lncli, :message, 1, "verrpc.Version"
optional :lnd, :message, 2, "verrpc.Version"
end
end
end
module Lnclipb
VersionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnclipb.VersionResponse").msgclass
end

@ -0,0 +1,229 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: routerrpc/router.proto
require 'google/protobuf'
require 'rpc_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("routerrpc/router.proto", :syntax => :proto3) do
add_message "routerrpc.SendPaymentRequest" do
optional :dest, :bytes, 1
optional :amt, :int64, 2
optional :amt_msat, :int64, 12
optional :payment_hash, :bytes, 3
optional :final_cltv_delta, :int32, 4
optional :payment_request, :string, 5
optional :timeout_seconds, :int32, 6
optional :fee_limit_sat, :int64, 7
optional :fee_limit_msat, :int64, 13
optional :outgoing_chan_id, :uint64, 8
repeated :outgoing_chan_ids, :uint64, 19
optional :last_hop_pubkey, :bytes, 14
optional :cltv_limit, :int32, 9
repeated :route_hints, :message, 10, "lnrpc.RouteHint"
map :dest_custom_records, :uint64, :bytes, 11
optional :allow_self_payment, :bool, 15
repeated :dest_features, :enum, 16, "lnrpc.FeatureBit"
optional :max_parts, :uint32, 17
optional :no_inflight_updates, :bool, 18
end
add_message "routerrpc.TrackPaymentRequest" do
optional :payment_hash, :bytes, 1
optional :no_inflight_updates, :bool, 2
end
add_message "routerrpc.RouteFeeRequest" do
optional :dest, :bytes, 1
optional :amt_sat, :int64, 2
end
add_message "routerrpc.RouteFeeResponse" do
optional :routing_fee_msat, :int64, 1
optional :time_lock_delay, :int64, 2
end
add_message "routerrpc.SendToRouteRequest" do
optional :payment_hash, :bytes, 1
optional :route, :message, 2, "lnrpc.Route"
end
add_message "routerrpc.SendToRouteResponse" do
optional :preimage, :bytes, 1
optional :failure, :message, 2, "lnrpc.Failure"
end
add_message "routerrpc.ResetMissionControlRequest" do
end
add_message "routerrpc.ResetMissionControlResponse" do
end
add_message "routerrpc.QueryMissionControlRequest" do
end
add_message "routerrpc.QueryMissionControlResponse" do
repeated :pairs, :message, 2, "routerrpc.PairHistory"
end
add_message "routerrpc.PairHistory" do
optional :node_from, :bytes, 1
optional :node_to, :bytes, 2
optional :history, :message, 7, "routerrpc.PairData"
end
add_message "routerrpc.PairData" do
optional :fail_time, :int64, 1
optional :fail_amt_sat, :int64, 2
optional :fail_amt_msat, :int64, 4
optional :success_time, :int64, 5
optional :success_amt_sat, :int64, 6
optional :success_amt_msat, :int64, 7
end
add_message "routerrpc.QueryProbabilityRequest" do
optional :from_node, :bytes, 1
optional :to_node, :bytes, 2
optional :amt_msat, :int64, 3
end
add_message "routerrpc.QueryProbabilityResponse" do
optional :probability, :double, 1
optional :history, :message, 2, "routerrpc.PairData"
end
add_message "routerrpc.BuildRouteRequest" do
optional :amt_msat, :int64, 1
optional :final_cltv_delta, :int32, 2
optional :outgoing_chan_id, :uint64, 3
repeated :hop_pubkeys, :bytes, 4
end
add_message "routerrpc.BuildRouteResponse" do
optional :route, :message, 1, "lnrpc.Route"
end
add_message "routerrpc.SubscribeHtlcEventsRequest" do
end
add_message "routerrpc.HtlcEvent" do
optional :incoming_channel_id, :uint64, 1
optional :outgoing_channel_id, :uint64, 2
optional :incoming_htlc_id, :uint64, 3
optional :outgoing_htlc_id, :uint64, 4
optional :timestamp_ns, :uint64, 5
optional :event_type, :enum, 6, "routerrpc.HtlcEvent.EventType"
oneof :event do
optional :forward_event, :message, 7, "routerrpc.ForwardEvent"
optional :forward_fail_event, :message, 8, "routerrpc.ForwardFailEvent"
optional :settle_event, :message, 9, "routerrpc.SettleEvent"
optional :link_fail_event, :message, 10, "routerrpc.LinkFailEvent"
end
end
add_enum "routerrpc.HtlcEvent.EventType" do
value :UNKNOWN, 0
value :SEND, 1
value :RECEIVE, 2
value :FORWARD, 3
end
add_message "routerrpc.HtlcInfo" do
optional :incoming_timelock, :uint32, 1
optional :outgoing_timelock, :uint32, 2
optional :incoming_amt_msat, :uint64, 3
optional :outgoing_amt_msat, :uint64, 4
end
add_message "routerrpc.ForwardEvent" do
optional :info, :message, 1, "routerrpc.HtlcInfo"
end
add_message "routerrpc.ForwardFailEvent" do
end
add_message "routerrpc.SettleEvent" do
end
add_message "routerrpc.LinkFailEvent" do
optional :info, :message, 1, "routerrpc.HtlcInfo"
optional :wire_failure, :enum, 2, "lnrpc.Failure.FailureCode"
optional :failure_detail, :enum, 3, "routerrpc.FailureDetail"
optional :failure_string, :string, 4
end
add_message "routerrpc.PaymentStatus" do
optional :state, :enum, 1, "routerrpc.PaymentState"
optional :preimage, :bytes, 2
repeated :htlcs, :message, 4, "lnrpc.HTLCAttempt"
end
add_message "routerrpc.CircuitKey" do
optional :chan_id, :uint64, 1
optional :htlc_id, :uint64, 2
end
add_message "routerrpc.ForwardHtlcInterceptRequest" do
optional :incoming_circuit_key, :message, 1, "routerrpc.CircuitKey"
optional :incoming_amount_msat, :uint64, 5
optional :incoming_expiry, :uint32, 6
optional :payment_hash, :bytes, 2
optional :outgoing_requested_chan_id, :uint64, 7
optional :outgoing_amount_msat, :uint64, 3
optional :outgoing_expiry, :uint32, 4
map :custom_records, :uint64, :bytes, 8
end
add_message "routerrpc.ForwardHtlcInterceptResponse" do
optional :incoming_circuit_key, :message, 1, "routerrpc.CircuitKey"
optional :action, :enum, 2, "routerrpc.ResolveHoldForwardAction"
optional :preimage, :bytes, 3
end
add_enum "routerrpc.FailureDetail" do
value :UNKNOWN, 0
value :NO_DETAIL, 1
value :ONION_DECODE, 2
value :LINK_NOT_ELIGIBLE, 3
value :ON_CHAIN_TIMEOUT, 4
value :HTLC_EXCEEDS_MAX, 5
value :INSUFFICIENT_BALANCE, 6
value :INCOMPLETE_FORWARD, 7
value :HTLC_ADD_FAILED, 8
value :FORWARDS_DISABLED, 9
value :INVOICE_CANCELED, 10
value :INVOICE_UNDERPAID, 11
value :INVOICE_EXPIRY_TOO_SOON, 12
value :INVOICE_NOT_OPEN, 13
value :MPP_INVOICE_TIMEOUT, 14
value :ADDRESS_MISMATCH, 15
value :SET_TOTAL_MISMATCH, 16
value :SET_TOTAL_TOO_LOW, 17
value :SET_OVERPAID, 18
value :UNKNOWN_INVOICE, 19
value :INVALID_KEYSEND, 20
value :MPP_IN_PROGRESS, 21
value :CIRCULAR_ROUTE, 22
end
add_enum "routerrpc.PaymentState" do
value :IN_FLIGHT, 0
value :SUCCEEDED, 1
value :FAILED_TIMEOUT, 2
value :FAILED_NO_ROUTE, 3
value :FAILED_ERROR, 4
value :FAILED_INCORRECT_PAYMENT_DETAILS, 5
value :FAILED_INSUFFICIENT_BALANCE, 6
end
add_enum "routerrpc.ResolveHoldForwardAction" do
value :SETTLE, 0
value :FAIL, 1
value :RESUME, 2
end
end
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
CircuitKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.CircuitKey").msgclass
ForwardHtlcInterceptRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptRequest").msgclass
ForwardHtlcInterceptResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ForwardHtlcInterceptResponse").msgclass
FailureDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.FailureDetail").enummodule
PaymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PaymentState").enummodule
ResolveHoldForwardAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ResolveHoldForwardAction").enummodule
end

@ -1,11 +1,13 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: router.proto for package 'routerrpc'
# Source: routerrpc/router.proto for package 'routerrpc'
require 'grpc'
require_relative 'router_pb'
require 'routerrpc/router_pb'
module Routerrpc
module Router
# Router is a service that offers advanced interaction with the router
# subsystem of the daemon.
class Service
include GRPC::GenericService
@ -14,54 +16,69 @@ module Routerrpc
self.unmarshal_class_method = :decode
self.service_name = 'routerrpc.Router'
# *
#
# SendPaymentV2 attempts to route a payment described by the passed
# PaymentRequest to the final destination. The call returns a stream of
# payment updates.
rpc :SendPaymentV2, SendPaymentRequest, stream(Lnrpc::Payment)
# *
#
# 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.
#
# Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
# the specified route. This method differs from SendPayment in that it
# allows users to specify a full route manually. This can be used for
# things like rebalancing, and atomic swaps. It differs from the newer
# SendToRouteV2 in that it doesn't return the full HTLC information.
rpc :SendToRoute, SendToRouteRequest, SendToRouteResponse
# *
#
# SendToRouteV2 attempts to make a payment via the specified route. This
# method differs from SendPayment in that it allows users to specify a full
# route manually. This can be used for things like rebalancing, and atomic
# swaps.
rpc :SendToRouteV2, SendToRouteRequest, Lnrpc::HTLCAttempt
#
# 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)
# *
# HtlcInterceptor dispatches a bi-directional streaming RPC in which
# Forwarded HTLC requests are sent to the client and the client responds with
# a boolean that tells LND if this htlc should be intercepted.
# In case of interception, the htlc can be either settled, cancelled or
# resumed later by using the ResolveHoldForward endpoint.
rpc :HtlcInterceptor, stream(ForwardHtlcInterceptResponse), stream(ForwardHtlcInterceptRequest)
end
Stub = Service.rpc_stub_class

File diff suppressed because it is too large Load Diff

@ -2,19 +2,15 @@
# Source: rpc.proto for package 'lnrpc'
require 'grpc'
require_relative 'rpc_pb'
require 'rpc_pb'
module Lnrpc
module WalletUnlocker
# *
module Lightning
#
# Comments in this file will be directly parsed into the API
# Documentation as descriptions of the associated method, message, or field.
# These descriptions should go right above the definition of the object, and
# can be in either block or /// comment format.
#
# One edge case exists where a // comment followed by a /// comment in the
# next line will cause the description not to show up in the documentation. In
# that instance, simply separate the two comments with a blank line.
# can be in either block or // comment format.
#
# An RPC method can be matched to an lncli command by placing a line in the
# beginning of the description in exactly the following format:
@ -27,53 +23,7 @@ module Lnrpc
# this proto file can be found here:
# https://github.com/lightninglabs/lightning-api
#
# The WalletUnlocker service is used to set up a wallet password for
# lnd at first startup, and unlock a previously set up wallet.
class Service
include GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'lnrpc.WalletUnlocker'
# *
# GenSeed is the first method that should be used to instantiate a new lnd
# instance. This method allows a caller to generate a new aezeed cipher seed
# given an optional passphrase. If provided, the passphrase will be necessary
# to decrypt the cipherseed to expose the internal wallet seed.
#
# Once the cipherseed is obtained and verified by the user, the InitWallet
# method should be used to commit the newly generated seed, and create the
# wallet.
rpc :GenSeed, GenSeedRequest, GenSeedResponse
# *
# InitWallet is used when lnd is starting up for the first time to fully
# initialize the daemon and its internal wallet. At the very least a wallet
# password must be provided. This will be used to encrypt sensitive material
# on disk.
#
# In the case of a recovery scenario, the user can also specify their aezeed
# mnemonic and passphrase. If set, then the daemon will use this prior state
# to initialize its internal wallet.
#
# Alternatively, this can be used along with the GenSeed RPC to obtain a
# seed, then present it to the user. Once it has been verified by the user,
# the seed can be fed into this RPC in order to commit the new wallet.
rpc :InitWallet, InitWalletRequest, InitWalletResponse
# * lncli: `unlock`
# UnlockWallet is used at startup of lnd to provide a password to unlock
# the wallet database.
rpc :UnlockWallet, UnlockWalletRequest, UnlockWalletResponse
# * lncli: `changepassword`
# ChangePassword changes the password of the encrypted wallet. This will
# automatically unlock the wallet database if successful.
rpc :ChangePassword, ChangePasswordRequest, ChangePasswordResponse
end
Stub = Service.rpc_stub_class
end
module Lightning
# Lightning is the main RPC server of the daemon.
class Service
include GRPC::GenericService
@ -82,111 +32,123 @@ module Lnrpc
self.unmarshal_class_method = :decode
self.service_name = 'lnrpc.Lightning'
# * lncli: `walletbalance`
# lncli: `walletbalance`
# WalletBalance returns total unspent outputs(confirmed and unconfirmed), all
# confirmed unspent outputs and all unconfirmed unspent outputs under control
# of the wallet.
rpc :WalletBalance, WalletBalanceRequest, WalletBalanceResponse
# * lncli: `channelbalance`
# lncli: `channelbalance`
# ChannelBalance returns the total funds available across all open channels
# in satoshis.
rpc :ChannelBalance, ChannelBalanceRequest, ChannelBalanceResponse
# * lncli: `listchaintxns`
# lncli: `listchaintxns`
# GetTransactions returns a list describing all the known transactions
# relevant to the wallet.
rpc :GetTransactions, GetTransactionsRequest, TransactionDetails
# * lncli: `estimatefee`
# lncli: `estimatefee`
# EstimateFee asks the chain backend to estimate the fee rate and total fees
# for a transaction that pays to multiple specified outputs.
#
# When using REST, the `AddrToAmount` map type can be set by appending
# `&AddrToAmount[<address>]=<amount_to_send>` to the URL. Unfortunately this
# map type doesn't appear in the REST API documentation because of a bug in
# the grpc-gateway library.
rpc :EstimateFee, EstimateFeeRequest, EstimateFeeResponse
# * lncli: `sendcoins`
# lncli: `sendcoins`
# SendCoins executes a request to send coins to a particular address. Unlike
# SendMany, this RPC call only allows creating a single output at a time. If
# neither target_conf, or sat_per_byte are set, then the internal wallet will
# consult its fee model to determine a fee for the default confirmation
# target.
rpc :SendCoins, SendCoinsRequest, SendCoinsResponse
# * lncli: `listunspent`
# lncli: `listunspent`
# Deprecated, use walletrpc.ListUnspent instead.
#
# ListUnspent returns a list of all utxos spendable by the wallet with a
# number of confirmations between the specified minimum and maximum.
rpc :ListUnspent, ListUnspentRequest, ListUnspentResponse
# *
#
# SubscribeTransactions creates a uni-directional stream from the server to
# the client in which any newly discovered transactions relevant to the
# wallet are sent over.
rpc :SubscribeTransactions, GetTransactionsRequest, stream(Transaction)
# * lncli: `sendmany`
# lncli: `sendmany`
# SendMany handles a request for a transaction that creates multiple specified
# outputs in parallel. If neither target_conf, or sat_per_byte are set, then
# the internal wallet will consult its fee model to determine a fee for the
# default confirmation target.
rpc :SendMany, SendManyRequest, SendManyResponse
# * lncli: `newaddress`
# lncli: `newaddress`
# NewAddress creates a new address under control of the local wallet.
rpc :NewAddress, NewAddressRequest, NewAddressResponse
# * lncli: `signmessage`
# lncli: `signmessage`
# SignMessage signs a message with this node's private key. The returned
# signature string is `zbase32` encoded and pubkey recoverable, meaning that
# only the message digest and signature are needed for verification.
rpc :SignMessage, SignMessageRequest, SignMessageResponse
# * lncli: `verifymessage`
# lncli: `verifymessage`
# VerifyMessage verifies a signature over a msg. The signature must be
# zbase32 encoded and signed by an active node in the resident node's
# channel database. In addition to returning the validity of the signature,
# VerifyMessage also returns the recovered pubkey from the signature.
rpc :VerifyMessage, VerifyMessageRequest, VerifyMessageResponse
# * lncli: `connect`
# lncli: `connect`
# ConnectPeer attempts to establish a connection to a remote peer. This is at
# the networking level, and is used for communication between nodes. This is
# distinct from establishing a channel with a peer.
rpc :ConnectPeer, ConnectPeerRequest, ConnectPeerResponse
# * lncli: `disconnect`
# lncli: `disconnect`
# DisconnectPeer attempts to disconnect one peer from another identified by a
# given pubKey. In the case that we currently have a pending or active channel
# with the target peer, then this action will be not be allowed.
rpc :DisconnectPeer, DisconnectPeerRequest, DisconnectPeerResponse
# * lncli: `listpeers`
# lncli: `listpeers`
# ListPeers returns a verbose listing of all currently active peers.
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
# it's identity pubkey, alias, the chains it is connected to, and information
# concerning the number of open+pending channels.
rpc :GetInfo, GetInfoRequest, GetInfoResponse
# * lncli: `getrecoveryinfo`
# GetRecoveryInfo returns information concerning the recovery mode including
# whether it's in a recovery mode, whether the recovery is finished, and the
# progress made so far.
rpc :GetRecoveryInfo, GetRecoveryInfoRequest, GetRecoveryInfoResponse
# TODO(roasbeef): merge with below with bool?
#
# * lncli: `pendingchannels`
# lncli: `pendingchannels`
# PendingChannels returns a list of all the channels that are currently
# considered "pending". A channel is pending if it has finished the funding
# workflow and is waiting for confirmations for the funding txn, or is in the
# process of closure, either initiated cooperatively or non-cooperatively.
rpc :PendingChannels, PendingChannelsRequest, PendingChannelsResponse
# * lncli: `listchannels`
# lncli: `listchannels`
# ListChannels returns a description of all the open channels that this node
# is a participant in.
rpc :ListChannels, ListChannelsRequest, ListChannelsResponse
# *
#
# SubscribeChannelEvents creates a uni-directional stream from the server to
# the client in which any updates relevant to the state of the channels are
# sent over. Events include new active channels, inactive channels, and closed
# channels.
rpc :SubscribeChannelEvents, ChannelEventSubscription, stream(ChannelEventUpdate)
# * lncli: `closedchannels`
# lncli: `closedchannels`
# ClosedChannels returns a description of all the closed channels that
# this node was a participant in.
rpc :ClosedChannels, ClosedChannelsRequest, ClosedChannelsResponse
# *
#
# OpenChannelSync is a synchronous version of the OpenChannel RPC call. This
# call is meant to be consumed by clients to the REST proxy. As with all
# other sync calls, all byte slices are intended to be populated as hex
# encoded strings.
rpc :OpenChannelSync, OpenChannelRequest, ChannelPoint
# * lncli: `openchannel`
# lncli: `openchannel`
# OpenChannel attempts to open a singly funded channel specified in the
# request to a remote peer. Users are able to specify a target number of
# blocks that the funding transaction should be confirmed in, or a manual fee
@ -196,7 +158,7 @@ module Lnrpc
# 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)
# *
#
# 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
@ -206,14 +168,14 @@ module Lnrpc
# 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
# OpenChannel requests are sent to the client and the client responds with
# a boolean that tells LND whether or not to accept the channel. This allows
# node operators to specify their own criteria for accepting inbound channels
# through a single persistent connection.
rpc :ChannelAcceptor, stream(ChannelAcceptResponse), stream(ChannelAcceptRequest)
# * lncli: `closechannel`
# lncli: `closechannel`
# CloseChannel attempts to close an active channel identified by its channel
# outpoint (ChannelPoint). The actions of this method can additionally be
# augmented to attempt a force close after a timeout period in the case of an
@ -222,41 +184,42 @@ module Lnrpc
# closure transaction is confirmed, or a manual fee rate. If neither are
# specified, then a default lax, block confirmation target is used.
rpc :CloseChannel, CloseChannelRequest, stream(CloseStatusUpdate)
# * lncli: `abandonchannel`
# lncli: `abandonchannel`
# AbandonChannel removes all channel state from the database except for a
# close summary. This method can be used to get rid of permanently unusable
# channels due to bugs fixed in newer versions of lnd. Only available
# when in debug builds of lnd.
rpc :AbandonChannel, AbandonChannelRequest, AbandonChannelResponse
# * lncli: `sendpayment`
# Deprecated, use routerrpc.SendPayment. SendPayment dispatches a
# lncli: `sendpayment`
# Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a
# bi-directional streaming RPC for sending payments through the Lightning
# Network. A single RPC invocation creates a persistent bi-directional
# stream allowing clients to rapidly send payments through the Lightning
# Network with a single persistent connection.
rpc :SendPayment, stream(SendRequest), stream(SendResponse)
# *
#
# SendPaymentSync is the synchronous non-streaming version of SendPayment.
# This RPC is intended to be consumed by clients of the REST proxy.
# Additionally, this RPC expects the destination's public key and the payment
# hash (if any) to be encoded as hex strings.
rpc :SendPaymentSync, SendRequest, SendResponse
# * lncli: `sendtoroute`
# SendToRoute is a bi-directional streaming RPC for sending payment through
# the Lightning Network. This method differs from SendPayment in that it
# allows users to specify a full route manually. This can be used for things
# like rebalancing, and atomic swaps.
# lncli: `sendtoroute`
# Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional
# streaming RPC for sending payment through the Lightning Network. This
# method differs from SendPayment in that it allows users to specify a full
# route manually. This can be used for things like rebalancing, and atomic
# swaps.
rpc :SendToRoute, stream(SendToRouteRequest), stream(SendResponse)
# *
#
# SendToRouteSync is a synchronous version of SendToRoute. It Will block
# until the payment either fails or succeeds.
rpc :SendToRouteSync, SendToRouteRequest, SendResponse
# * lncli: `addinvoice`
# lncli: `addinvoice`
# AddInvoice attempts to add a new invoice to the invoice database. Any
# duplicated invoices are rejected, therefore all invoices *must* have a
# unique payment preimage.
rpc :AddInvoice, Invoice, AddInvoiceResponse
# * lncli: `listinvoices`
# lncli: `listinvoices`
# ListInvoices returns a list of all the invoices currently stored within the
# database. Any active debug invoices are ignored. It has full support for
# paginated responses, allowing users to query for specific invoices through
@ -265,12 +228,12 @@ module Lnrpc
# next request. By default, the first 100 invoices created will be returned.
# Backwards pagination is also supported through the Reversed flag.
rpc :ListInvoices, ListInvoiceRequest, ListInvoiceResponse
# * lncli: `lookupinvoice`
# lncli: `lookupinvoice`
# LookupInvoice attempts to look up an invoice according to its payment hash.
# The passed payment hash *must* be exactly 32 bytes, if not, an error is
# returned.
rpc :LookupInvoice, PaymentHash, Invoice
# *
#
# SubscribeInvoices returns a uni-directional stream (server -> client) for
# notifying the client of newly added/settled invoices. The caller can
# optionally specify the add_index and/or the settle_index. If the add_index
@ -281,18 +244,18 @@ module Lnrpc
# of these fields can be set. If no fields are set, then we'll only send out
# the latest add/settle events.
rpc :SubscribeInvoices, InvoiceSubscription, stream(Invoice)
# * lncli: `decodepayreq`
# lncli: `decodepayreq`
# DecodePayReq takes an encoded payment request string and attempts to decode
# it, returning a full description of the conditions encoded within the
# payment request.
rpc :DecodePayReq, PayReqString, PayReq
# * lncli: `listpayments`
# lncli: `listpayments`
# ListPayments returns a list of all outgoing payments.
rpc :ListPayments, ListPaymentsRequest, ListPaymentsResponse
# *
#
# DeleteAllPayments deletes all outgoing payments from DB.
rpc :DeleteAllPayments, DeleteAllPaymentsRequest, DeleteAllPaymentsResponse
# * lncli: `describegraph`
# lncli: `describegraph`
# DescribeGraph returns a description of the latest graph state from the
# point of view of the node. The graph information is partitioned into two
# components: all the nodes/vertexes, and all the edges that connect the
@ -300,36 +263,41 @@ module Lnrpc
# the node directional specific routing policy which includes: the time lock
# delta, fee information, etc.
rpc :DescribeGraph, ChannelGraphRequest, ChannelGraph
# * lncli: `getnodemetrics`
# 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
# given channel identified by its channel ID: an 8-byte integer which
# uniquely identifies the location of transaction's funding output within the
# blockchain.
rpc :GetChanInfo, ChanInfoRequest, ChannelEdge
# * lncli: `getnodeinfo`
# lncli: `getnodeinfo`
# GetNodeInfo returns the latest advertised, aggregated, and authenticated
# channel information for the specified node identified by its public key.
rpc :GetNodeInfo, NodeInfoRequest, NodeInfo
# * lncli: `queryroutes`
# lncli: `queryroutes`
# QueryRoutes attempts to query the daemon's Channel Router for a possible
# route to a target destination capable of carrying a specific amount of
# satoshis. The returned route contains the full details required to craft and
# send an HTLC, also including the necessary information that should be
# present within the Sphinx packet encapsulated within the HTLC.
#
# When using REST, the `dest_custom_records` map type can be set by appending
# `&dest_custom_records[<record_number>]=<record_data_base64_url_encoded>`
# to the URL. Unfortunately this map type doesn't appear in the REST API
# documentation because of a bug in the grpc-gateway library.
rpc :QueryRoutes, QueryRoutesRequest, QueryRoutesResponse
# * lncli: `getnetworkinfo`
# lncli: `getnetworkinfo`
# GetNetworkInfo returns some basic stats about the known channel graph from
# the point of view of the node.
rpc :GetNetworkInfo, NetworkInfoRequest, NetworkInfo
# * lncli: `stop`
# lncli: `stop`
# StopDaemon will send a shutdown request to the interrupt handler, triggering
# a graceful shutdown of the daemon.
rpc :StopDaemon, StopRequest, StopResponse
# *
#
# SubscribeChannelGraph launches a streaming RPC that allows the caller to
# receive notifications upon any changes to the channel graph topology from
# the point of view of the responding node. Events notified include: new
@ -337,21 +305,21 @@ module Lnrpc
# channels being advertised, updates in the routing policy for a directional
# channel edge, and when channels are closed on-chain.
rpc :SubscribeChannelGraph, GraphTopologySubscription, stream(GraphTopologyUpdate)
# * lncli: `debuglevel`
# lncli: `debuglevel`
# DebugLevel allows a caller to programmatically set the logging verbosity of
# lnd. The logging can be targeted according to a coarse daemon-wide logging
# level, or in a granular fashion to specify the logging for a target
# sub-system.
rpc :DebugLevel, DebugLevelRequest, DebugLevelResponse
# * lncli: `feereport`
# lncli: `feereport`
# FeeReport allows the caller to obtain a report detailing the current fee
# schedule enforced by the node globally for each channel.
rpc :FeeReport, FeeReportRequest, FeeReportResponse
# * lncli: `updatechanpolicy`
# lncli: `updatechanpolicy`
# UpdateChannelPolicy allows the caller to update the fee schedule and
# channel policies for all channels globally, or a particular channel.
rpc :UpdateChannelPolicy, PolicyUpdateRequest, PolicyUpdateResponse
# * lncli: `fwdinghistory`
# lncli: `fwdinghistory`
# ForwardingHistory allows the caller to query the htlcswitch for a record of
# all HTLCs forwarded within the target time range, and integer offset
# within that time range. If no time-range is specified, then the first chunk
@ -363,7 +331,7 @@ module Lnrpc
# the index offset of the last entry. The index offset can be provided to the
# request to allow the caller to skip a series of records.
rpc :ForwardingHistory, ForwardingHistoryRequest, ForwardingHistoryResponse
# * lncli: `exportchanbackup`
# lncli: `exportchanbackup`
# ExportChannelBackup attempts to return an encrypted static channel backup
# for the target channel identified by it channel point. The backup is
# encrypted with a key generated from the aezeed seed of the user. The
@ -371,25 +339,25 @@ module Lnrpc
# method once lnd is running, or via the InitWallet and UnlockWallet methods
# from the WalletUnlocker service.
rpc :ExportChannelBackup, ExportChannelBackupRequest, ChannelBackup
# *
#
# ExportAllChannelBackups returns static channel backups for all existing
# channels known to lnd. A set of regular singular static channel backups for
# each channel are returned. Additionally, a multi-channel backup is returned
# as well, which contains a single encrypted blob containing the backups of
# each channel.
rpc :ExportAllChannelBackups, ChanBackupExportRequest, ChanBackupSnapshot
# *
#
# VerifyChanBackup allows a caller to verify the integrity of a channel backup
# snapshot. This method will accept either a packed Single or a packed Multi.
# Specifying both will result in an error.
rpc :VerifyChanBackup, ChanBackupSnapshot, VerifyChanBackupResponse
# * lncli: `restorechanbackup`
# lncli: `restorechanbackup`
# RestoreChannelBackups accepts a set of singular channel backups, or a
# single encrypted multi-chan backup and attempts to recover any funds
# remaining within the channel. If we are able to unpack the backup, then the
# new channel will be shown under listchannels, as well as pending channels.
rpc :RestoreChannelBackups, RestoreChanBackupRequest, RestoreBackupResponse
# *
#
# SubscribeChannelBackups allows a client to sub-subscribe to the most up to
# date information concerning the state of all channel backups. Each time a
# new channel is added, we return the new set of channels, along with a
@ -398,7 +366,7 @@ module Lnrpc
# ups, but the updated set of encrypted multi-chan backups with the closed
# channel(s) removed.
rpc :SubscribeChannelBackups, ChannelBackupSubscription, stream(ChanBackupSnapshot)
# * lncli: `bakemacaroon`
# 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.

@ -0,0 +1,83 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: signrpc/signer.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("signrpc/signer.proto", :syntax => :proto3) do
add_message "signrpc.KeyLocator" do
optional :key_family, :int32, 1
optional :key_index, :int32, 2
end
add_message "signrpc.KeyDescriptor" do
optional :raw_key_bytes, :bytes, 1
optional :key_loc, :message, 2, "signrpc.KeyLocator"
end
add_message "signrpc.TxOut" do
optional :value, :int64, 1
optional :pk_script, :bytes, 2
end
add_message "signrpc.SignDescriptor" do
optional :key_desc, :message, 1, "signrpc.KeyDescriptor"
optional :single_tweak, :bytes, 2
optional :double_tweak, :bytes, 3
optional :witness_script, :bytes, 4
optional :output, :message, 5, "signrpc.TxOut"
optional :sighash, :uint32, 7
optional :input_index, :int32, 8
end
add_message "signrpc.SignReq" do
optional :raw_tx_bytes, :bytes, 1
repeated :sign_descs, :message, 2, "signrpc.SignDescriptor"
end
add_message "signrpc.SignResp" do
repeated :raw_sigs, :bytes, 1
end
add_message "signrpc.InputScript" do
repeated :witness, :bytes, 1
optional :sig_script, :bytes, 2
end
add_message "signrpc.InputScriptResp" do
repeated :input_scripts, :message, 1, "signrpc.InputScript"
end
add_message "signrpc.SignMessageReq" do
optional :msg, :bytes, 1
optional :key_loc, :message, 2, "signrpc.KeyLocator"
end
add_message "signrpc.SignMessageResp" do
optional :signature, :bytes, 1
end
add_message "signrpc.VerifyMessageReq" do
optional :msg, :bytes, 1
optional :signature, :bytes, 2
optional :pubkey, :bytes, 3
end
add_message "signrpc.VerifyMessageResp" do
optional :valid, :bool, 1
end
add_message "signrpc.SharedKeyRequest" do
optional :ephemeral_pubkey, :bytes, 1
optional :key_loc, :message, 2, "signrpc.KeyLocator"
end
add_message "signrpc.SharedKeyResponse" do
optional :shared_key, :bytes, 1
end
end
end
module Signrpc
KeyLocator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.KeyLocator").msgclass
KeyDescriptor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.KeyDescriptor").msgclass
TxOut = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.TxOut").msgclass
SignDescriptor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignDescriptor").msgclass
SignReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignReq").msgclass
SignResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignResp").msgclass
InputScript = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.InputScript").msgclass
InputScriptResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.InputScriptResp").msgclass
SignMessageReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignMessageReq").msgclass
SignMessageResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SignMessageResp").msgclass
VerifyMessageReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.VerifyMessageReq").msgclass
VerifyMessageResp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.VerifyMessageResp").msgclass
SharedKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyRequest").msgclass
SharedKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("signrpc.SharedKeyResponse").msgclass
end

@ -0,0 +1,68 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: signrpc/signer.proto for package 'signrpc'
require 'grpc'
require 'signrpc/signer_pb'
module Signrpc
module Signer
# Signer is a service that gives access to the signing functionality of the
# daemon's wallet.
class Service
include GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'signrpc.Signer'
#
# SignOutputRaw is a method that can be used to generated a signature for a
# set of inputs/outputs to a transaction. Each request specifies details
# concerning how the outputs should be signed, which keys they should be
# signed with, and also any optional tweaks. The return value is a fixed
# 64-byte signature (the same format as we use on the wire in Lightning).
#
# If we are unable to sign using the specified keys, then an error will be
# returned.
rpc :SignOutputRaw, SignReq, SignResp
#
# ComputeInputScript generates a complete InputIndex for the passed
# transaction with the signature as defined within the passed SignDescriptor.
# This method should be capable of generating the proper input script for
# both regular p2wkh output and p2wkh outputs nested within a regular p2sh
# output.
#
# Note that when using this method to sign inputs belonging to the wallet,
# the only items of the SignDescriptor that need to be populated are pkScript
# in the TxOut field, the value in that same field, and finally the input
# index.
rpc :ComputeInputScript, SignReq, InputScriptResp
#
# SignMessage signs a message with the key specified in the key locator. The
# returned signature is fixed-size LN wire format encoded.
#
# The main difference to SignMessage in the main RPC is that a specific key is
# used to sign the message instead of the node identity private key.
rpc :SignMessage, SignMessageReq, SignMessageResp
#
# VerifyMessage verifies a signature over a message using the public key
# provided. The signature must be fixed-size LN wire format encoded.
#
# The main difference to VerifyMessage in the main RPC is that the public key
# used to sign the message does not have to be a node known to the network.
rpc :VerifyMessage, VerifyMessageReq, VerifyMessageResp
#
# DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key
# derivation between the ephemeral public key in the request and the node's
# key specified in the key_loc parameter (or the node's identity private key
# if no key locator is specified):
# P_shared = privKeyNode * ephemeralPubkey
# The resulting shared public key is serialized in the compressed format and
# hashed with sha256, resulting in the final key length of 256bit.
rpc :DeriveSharedKey, SharedKeyRequest, SharedKeyResponse
end
Stub = Service.rpc_stub_class
end
end

@ -0,0 +1,27 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: verrpc/verrpc.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("verrpc/verrpc.proto", :syntax => :proto3) do
add_message "verrpc.VersionRequest" do
end
add_message "verrpc.Version" do
optional :commit, :string, 1
optional :commit_hash, :string, 2
optional :version, :string, 3
optional :app_major, :uint32, 4
optional :app_minor, :uint32, 5
optional :app_patch, :uint32, 6
optional :app_pre_release, :string, 7
repeated :build_tags, :string, 8
optional :go_version, :string, 9
end
end
end
module Verrpc
VersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("verrpc.VersionRequest").msgclass
Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("verrpc.Version").msgclass
end

@ -0,0 +1,27 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: verrpc/verrpc.proto for package 'verrpc'
require 'grpc'
require 'verrpc/verrpc_pb'
module Verrpc
module Versioner
# Versioner is a service that can be used to get information about the version
# and build information of the running daemon.
class Service
include GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'verrpc.Versioner'
# lncli: `version`
# GetVersion returns the current version and build information of the running
# daemon.
rpc :GetVersion, VersionRequest, Version
end
Stub = Service.rpc_stub_class
end
end

@ -0,0 +1,149 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: walletrpc/walletkit.proto
require 'google/protobuf'
require 'rpc_pb'
require 'signrpc/signer_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("walletrpc/walletkit.proto", :syntax => :proto3) do
add_message "walletrpc.ListUnspentRequest" do
optional :min_confs, :int32, 1
optional :max_confs, :int32, 2
end
add_message "walletrpc.ListUnspentResponse" do
repeated :utxos, :message, 1, "lnrpc.Utxo"
end
add_message "walletrpc.LeaseOutputRequest" do
optional :id, :bytes, 1
optional :outpoint, :message, 2, "lnrpc.OutPoint"
end
add_message "walletrpc.LeaseOutputResponse" do
optional :expiration, :uint64, 1
end
add_message "walletrpc.ReleaseOutputRequest" do
optional :id, :bytes, 1
optional :outpoint, :message, 2, "lnrpc.OutPoint"