diff --git a/lib/grpc_services/autopilotrpc/autopilot_services_pb.rb b/lib/grpc_services/autopilotrpc/autopilot_services_pb.rb index 661a489..c633261 100644 --- a/lib/grpc_services/autopilotrpc/autopilot_services_pb.rb +++ b/lib/grpc_services/autopilotrpc/autopilot_services_pb.rb @@ -11,7 +11,7 @@ module Autopilotrpc # that can be used when deciding where to open channels. class Service - include GRPC::GenericService + include ::GRPC::GenericService self.marshal_class_method = :encode self.unmarshal_class_method = :decode @@ -19,20 +19,20 @@ module Autopilotrpc # # Status returns whether the daemon's autopilot agent is active. - rpc :Status, StatusRequest, StatusResponse + rpc :Status, ::Autopilotrpc::StatusRequest, ::Autopilotrpc::StatusResponse # # ModifyStatus is used to modify the status of the autopilot agent, like # enabling or disabling it. - rpc :ModifyStatus, ModifyStatusRequest, ModifyStatusResponse + rpc :ModifyStatus, ::Autopilotrpc::ModifyStatusRequest, ::Autopilotrpc::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 + rpc :QueryScores, ::Autopilotrpc::QueryScoresRequest, ::Autopilotrpc::QueryScoresResponse # # SetScores attempts to set the scores used by the running autopilot agent, # if the external scoring heuristic is enabled. - rpc :SetScores, SetScoresRequest, SetScoresResponse + rpc :SetScores, ::Autopilotrpc::SetScoresRequest, ::Autopilotrpc::SetScoresResponse end Stub = Service.rpc_stub_class diff --git a/lib/grpc_services/chainrpc/chainnotifier_services_pb.rb b/lib/grpc_services/chainrpc/chainnotifier_services_pb.rb index 5be66dc..99a0aa4 100644 --- a/lib/grpc_services/chainrpc/chainnotifier_services_pb.rb +++ b/lib/grpc_services/chainrpc/chainnotifier_services_pb.rb @@ -10,7 +10,7 @@ module Chainrpc # chain backend by registering notifiers for chain events. class Service - include GRPC::GenericService + include ::GRPC::GenericService self.marshal_class_method = :encode self.unmarshal_class_method = :decode @@ -24,7 +24,7 @@ module Chainrpc # 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) + rpc :RegisterConfirmationsNtfn, ::Chainrpc::ConfRequest, stream(::Chainrpc::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 @@ -32,7 +32,7 @@ module Chainrpc # # 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) + rpc :RegisterSpendNtfn, ::Chainrpc::SpendRequest, stream(::Chainrpc::SpendEvent) # # RegisterBlockEpochNtfn is a synchronous response-streaming RPC that # registers an intent for a client to be notified of blocks in the chain. The @@ -43,7 +43,7 @@ module Chainrpc # 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) + rpc :RegisterBlockEpochNtfn, ::Chainrpc::BlockEpoch, stream(::Chainrpc::BlockEpoch) end Stub = Service.rpc_stub_class diff --git a/lib/grpc_services/invoicesrpc/invoices_services_pb.rb b/lib/grpc_services/invoicesrpc/invoices_services_pb.rb index fa0d659..a01b2bc 100644 --- a/lib/grpc_services/invoicesrpc/invoices_services_pb.rb +++ b/lib/grpc_services/invoicesrpc/invoices_services_pb.rb @@ -10,7 +10,7 @@ module Invoicesrpc # invoices. class Service - include GRPC::GenericService + include ::GRPC::GenericService self.marshal_class_method = :encode self.unmarshal_class_method = :decode @@ -20,20 +20,20 @@ module Invoicesrpc # 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) + rpc :SubscribeSingleInvoice, ::Invoicesrpc::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 + rpc :CancelInvoice, ::Invoicesrpc::CancelInvoiceMsg, ::Invoicesrpc::CancelInvoiceResp # # AddHoldInvoice creates a hold invoice. It ties the invoice to the hash # supplied in the request. - rpc :AddHoldInvoice, AddHoldInvoiceRequest, AddHoldInvoiceResp + rpc :AddHoldInvoice, ::Invoicesrpc::AddHoldInvoiceRequest, ::Invoicesrpc::AddHoldInvoiceResp # # SettleInvoice settles an accepted invoice. If the invoice is already # settled, this call will succeed. - rpc :SettleInvoice, SettleInvoiceMsg, SettleInvoiceResp + rpc :SettleInvoice, ::Invoicesrpc::SettleInvoiceMsg, ::Invoicesrpc::SettleInvoiceResp end Stub = Service.rpc_stub_class diff --git a/lib/grpc_services/routerrpc/router_pb.rb b/lib/grpc_services/routerrpc/router_pb.rb index 3dae26a..7880cbf 100644 --- a/lib/grpc_services/routerrpc/router_pb.rb +++ b/lib/grpc_services/routerrpc/router_pb.rb @@ -12,6 +12,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :amt_msat, :int64, 12 optional :payment_hash, :bytes, 3 optional :final_cltv_delta, :int32, 4 + optional :payment_addr, :bytes, 20 optional :payment_request, :string, 5 optional :timeout_seconds, :int32, 6 optional :fee_limit_sat, :int64, 7 @@ -26,6 +27,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do repeated :dest_features, :enum, 16, "lnrpc.FeatureBit" optional :max_parts, :uint32, 17 optional :no_inflight_updates, :bool, 18 + optional :max_shard_size_msat, :uint64, 21 end add_message "routerrpc.TrackPaymentRequest" do optional :payment_hash, :bytes, 1 @@ -83,6 +85,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :final_cltv_delta, :int32, 2 optional :outgoing_chan_id, :uint64, 3 repeated :hop_pubkeys, :bytes, 4 + optional :payment_addr, :bytes, 5 end add_message "routerrpc.BuildRouteResponse" do optional :route, :message, 1, "lnrpc.Route" @@ -146,6 +149,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :outgoing_amount_msat, :uint64, 3 optional :outgoing_expiry, :uint32, 4 map :custom_records, :uint64, :bytes, 8 + optional :onion_blob, :bytes, 9 end add_message "routerrpc.ForwardHtlcInterceptResponse" do optional :incoming_circuit_key, :message, 1, "routerrpc.CircuitKey" diff --git a/lib/grpc_services/routerrpc/router_services_pb.rb b/lib/grpc_services/routerrpc/router_services_pb.rb index 3aad783..2803e98 100644 --- a/lib/grpc_services/routerrpc/router_services_pb.rb +++ b/lib/grpc_services/routerrpc/router_services_pb.rb @@ -10,7 +10,7 @@ module Routerrpc # subsystem of the daemon. class Service - include GRPC::GenericService + include ::GRPC::GenericService self.marshal_class_method = :encode self.unmarshal_class_method = :decode @@ -20,65 +20,65 @@ module Routerrpc # SendPaymentV2 attempts to route a payment described by the passed # PaymentRequest to the final destination. The call returns a stream of # payment updates. - rpc :SendPaymentV2, SendPaymentRequest, stream(Lnrpc::Payment) + rpc :SendPaymentV2, ::Routerrpc::SendPaymentRequest, stream(::Lnrpc::Payment) # # TrackPaymentV2 returns an update stream for the payment identified by the # payment hash. - rpc :TrackPaymentV2, TrackPaymentRequest, stream(Lnrpc::Payment) + rpc :TrackPaymentV2, ::Routerrpc::TrackPaymentRequest, stream(::Lnrpc::Payment) # # EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it # may cost to send an HTLC to the target end destination. - rpc :EstimateRouteFee, RouteFeeRequest, RouteFeeResponse + rpc :EstimateRouteFee, ::Routerrpc::RouteFeeRequest, ::Routerrpc::RouteFeeResponse # # Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via # the specified route. This method differs from SendPayment in that it # allows users to specify a full route manually. This can be used for # things like rebalancing, and atomic swaps. It differs from the newer # SendToRouteV2 in that it doesn't return the full HTLC information. - rpc :SendToRoute, SendToRouteRequest, SendToRouteResponse + rpc :SendToRoute, ::Routerrpc::SendToRouteRequest, ::Routerrpc::SendToRouteResponse # # SendToRouteV2 attempts to make a payment via the specified route. This # method differs from SendPayment in that it allows users to specify a full # route manually. This can be used for things like rebalancing, and atomic # swaps. - rpc :SendToRouteV2, SendToRouteRequest, Lnrpc::HTLCAttempt + rpc :SendToRouteV2, ::Routerrpc::SendToRouteRequest, ::Lnrpc::HTLCAttempt # # ResetMissionControl clears all mission control state and starts with a clean # slate. - rpc :ResetMissionControl, ResetMissionControlRequest, ResetMissionControlResponse + rpc :ResetMissionControl, ::Routerrpc::ResetMissionControlRequest, ::Routerrpc::ResetMissionControlResponse # # QueryMissionControl exposes the internal mission control state to callers. # It is a development feature. - rpc :QueryMissionControl, QueryMissionControlRequest, QueryMissionControlResponse + rpc :QueryMissionControl, ::Routerrpc::QueryMissionControlRequest, ::Routerrpc::QueryMissionControlResponse # # QueryProbability returns the current success probability estimate for a # given node pair and amount. - rpc :QueryProbability, QueryProbabilityRequest, QueryProbabilityResponse + rpc :QueryProbability, ::Routerrpc::QueryProbabilityRequest, ::Routerrpc::QueryProbabilityResponse # # BuildRoute builds a fully specified route based on a list of hop public # keys. It retrieves the relevant channel policies from the graph in order to # calculate the correct fees and time locks. - rpc :BuildRoute, BuildRouteRequest, BuildRouteResponse + rpc :BuildRoute, ::Routerrpc::BuildRouteRequest, ::Routerrpc::BuildRouteResponse # # SubscribeHtlcEvents creates a uni-directional stream from the server to # the client which delivers a stream of htlc events. - rpc :SubscribeHtlcEvents, SubscribeHtlcEventsRequest, stream(HtlcEvent) + rpc :SubscribeHtlcEvents, ::Routerrpc::SubscribeHtlcEventsRequest, stream(::Routerrpc::HtlcEvent) # # Deprecated, use SendPaymentV2. SendPayment attempts to route a payment # described by the passed PaymentRequest to the final destination. The call # returns a stream of payment status updates. - rpc :SendPayment, SendPaymentRequest, stream(PaymentStatus) + rpc :SendPayment, ::Routerrpc::SendPaymentRequest, stream(::Routerrpc::PaymentStatus) # # Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for # the payment identified by the payment hash. - rpc :TrackPayment, TrackPaymentRequest, stream(PaymentStatus) + rpc :TrackPayment, ::Routerrpc::TrackPaymentRequest, stream(::Routerrpc::PaymentStatus) # * # HtlcInterceptor dispatches a bi-directional streaming RPC in which # Forwarded HTLC requests are sent to the client and the client responds with # a boolean that tells LND if this htlc should be intercepted. # In case of interception, the htlc can be either settled, cancelled or # resumed later by using the ResolveHoldForward endpoint. - rpc :HtlcInterceptor, stream(ForwardHtlcInterceptResponse), stream(ForwardHtlcInterceptRequest) + rpc :HtlcInterceptor, stream(::Routerrpc::ForwardHtlcInterceptResponse), stream(::Routerrpc::ForwardHtlcInterceptRequest) end Stub = Service.rpc_stub_class diff --git a/lib/grpc_services/rpc_pb.rb b/lib/grpc_services/rpc_pb.rb index 2ceb4dc..90714b3 100644 --- a/lib/grpc_services/rpc_pb.rb +++ b/lib/grpc_services/rpc_pb.rb @@ -85,6 +85,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "lnrpc.ChannelAcceptResponse" do optional :accept, :bool, 1 optional :pending_chan_id, :bytes, 2 + optional :error, :string, 3 + optional :upfront_shutdown, :string, 4 + optional :csv_delay, :uint32, 5 + optional :reserve_sat, :uint64, 6 + optional :in_flight_max_msat, :uint64, 7 + optional :max_htlc_count, :uint32, 8 + optional :min_htlc_in, :uint64, 9 + optional :min_accept_depth, :uint32, 10 end add_message "lnrpc.ChannelPoint" do optional :output_index, :uint32, 3 @@ -115,6 +123,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :target_conf, :int32, 3 optional :sat_per_byte, :int64, 5 optional :label, :string, 6 + optional :min_confs, :int32, 7 + optional :spend_unconfirmed, :bool, 8 end add_message "lnrpc.SendManyResponse" do optional :txid, :string, 1 @@ -126,6 +136,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :sat_per_byte, :int64, 5 optional :send_all, :bool, 6 optional :label, :string, 7 + optional :min_confs, :int32, 8 + optional :spend_unconfirmed, :bool, 9 end add_message "lnrpc.SendCoinsResponse" do optional :txid, :string, 1 @@ -160,6 +172,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "lnrpc.ConnectPeerRequest" do optional :addr, :message, 1, "lnrpc.LightningAddress" optional :perm, :bool, 2 + optional :timeout, :uint64, 3 end add_message "lnrpc.ConnectPeerResponse" do end @@ -173,6 +186,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :amount, :int64, 2 optional :hash_lock, :bytes, 3 optional :expiration_height, :uint32, 4 + optional :htlc_index, :uint64, 5 + optional :forwarding_channel, :uint64, 6 + optional :forwarding_htlc_index, :uint64, 7 end add_message "lnrpc.ChannelConstraints" do optional :csv_delay, :uint32, 1 @@ -277,11 +293,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :sync_type, :enum, 10, "lnrpc.Peer.SyncType" map :features, :uint32, :message, 11, "lnrpc.Feature" repeated :errors, :message, 12, "lnrpc.TimestampedError" + optional :flap_count, :int32, 13 + optional :last_flap_ns, :int64, 14 end add_enum "lnrpc.Peer.SyncType" do value :UNKNOWN_SYNC, 0 value :ACTIVE_SYNC, 1 value :PASSIVE_SYNC, 2 + value :PINNED_SYNC, 3 end add_message "lnrpc.TimestampedError" do optional :timestamp, :uint64, 1 @@ -385,6 +404,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :close_address, :string, 13 optional :funding_shim, :message, 14, "lnrpc.FundingShim" optional :remote_max_value_in_flight_msat, :uint64, 15 + optional :remote_max_htlcs, :uint32, 16 + optional :max_local_csv, :uint32, 17 end add_message "lnrpc.OpenStatusUpdate" do optional :pending_chan_id, :bytes, 4 @@ -431,6 +452,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "lnrpc.FundingPsbtFinalize" do optional :signed_psbt, :bytes, 1 optional :pending_chan_id, :bytes, 2 + optional :final_raw_tx, :bytes, 3 end add_message "lnrpc.FundingTransitionMsg" do oneof :trigger do @@ -535,11 +557,21 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :confirmed_balance, :int64, 2 optional :unconfirmed_balance, :int64, 3 end + add_message "lnrpc.Amount" do + optional :sat, :uint64, 1 + optional :msat, :uint64, 2 + end add_message "lnrpc.ChannelBalanceRequest" do end add_message "lnrpc.ChannelBalanceResponse" do optional :balance, :int64, 1 optional :pending_open_balance, :int64, 2 + optional :local_balance, :message, 3, "lnrpc.Amount" + optional :remote_balance, :message, 4, "lnrpc.Amount" + optional :unsettled_local_balance, :message, 5, "lnrpc.Amount" + optional :unsettled_remote_balance, :message, 6, "lnrpc.Amount" + optional :pending_open_local_balance, :message, 7, "lnrpc.Amount" + optional :pending_open_remote_balance, :message, 8, "lnrpc.Amount" end add_message "lnrpc.QueryRoutesRequest" do optional :pub_key, :string, 1 @@ -689,6 +721,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :global_features, :bytes, 3 optional :alias, :string, 4 optional :color, :string, 5 + map :features, :uint32, :message, 6, "lnrpc.Feature" end add_message "lnrpc.ChannelEdgeUpdate" do optional :chan_id, :uint64, 1 @@ -739,6 +772,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do repeated :htlcs, :message, 22, "lnrpc.InvoiceHTLC" map :features, :uint32, :message, 24, "lnrpc.Feature" optional :is_keysend, :bool, 25 + optional :payment_addr, :bytes, 26 end add_enum "lnrpc.Invoice.InvoiceState" do value :OPEN, 0 @@ -762,6 +796,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :r_hash, :bytes, 1 optional :payment_request, :string, 2 optional :add_index, :uint64, 16 + optional :payment_addr, :bytes, 17 end add_message "lnrpc.PaymentHash" do optional :r_hash_str, :string, 1 @@ -806,6 +841,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do value :FAILED, 3 end add_message "lnrpc.HTLCAttempt" do + optional :attempt_id, :uint64, 7 optional :status, :enum, 1, "lnrpc.HTLCAttempt.HTLCStatus" optional :route, :message, 2, "lnrpc.Route" optional :attempt_time_ns, :int64, 3 @@ -835,6 +871,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do end add_message "lnrpc.AbandonChannelRequest" do optional :channel_point, :message, 1, "lnrpc.ChannelPoint" + optional :pending_funding_shim_only, :bool, 2 end add_message "lnrpc.AbandonChannelResponse" do end @@ -956,10 +993,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do end add_message "lnrpc.BakeMacaroonRequest" do repeated :permissions, :message, 1, "lnrpc.MacaroonPermission" + optional :root_key_id, :uint64, 2 end add_message "lnrpc.BakeMacaroonResponse" do optional :macaroon, :string, 1 end + add_message "lnrpc.ListMacaroonIDsRequest" do + end + add_message "lnrpc.ListMacaroonIDsResponse" do + repeated :root_key_ids, :uint64, 1 + end + add_message "lnrpc.DeleteMacaroonIDRequest" do + optional :root_key_id, :uint64, 1 + end + add_message "lnrpc.DeleteMacaroonIDResponse" do + optional :deleted, :bool, 1 + end + add_message "lnrpc.MacaroonPermissionList" do + repeated :permissions, :message, 1, "lnrpc.MacaroonPermission" + end + add_message "lnrpc.ListPermissionsRequest" do + end + add_message "lnrpc.ListPermissionsResponse" do + map :method_permissions, :string, :message, 1, "lnrpc.MacaroonPermissionList" + end add_message "lnrpc.Failure" do optional :code, :enum, 1, "lnrpc.Failure.FailureCode" optional :channel_update, :message, 3, "lnrpc.ChannelUpdate" @@ -1013,6 +1070,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :htlc_maximum_msat, :uint64, 11 optional :extra_opaque_data, :bytes, 12 end + add_message "lnrpc.MacaroonId" do + optional :nonce, :bytes, 1 + optional :storageId, :bytes, 2 + repeated :ops, :message, 3, "lnrpc.Op" + end + add_message "lnrpc.Op" do + optional :entity, :string, 1 + repeated :actions, :string, 2 + end add_enum "lnrpc.AddressType" do value :WITNESS_PUBKEY_HASH, 0 value :NESTED_PUBKEY_HASH, 1 @@ -1081,6 +1147,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do value :PAYMENT_ADDR_OPT, 15 value :MPP_REQ, 16 value :MPP_OPT, 17 + value :WUMBO_CHANNELS_REQ, 18 + value :WUMBO_CHANNELS_OPT, 19 + value :ANCHORS_REQ, 20 + value :ANCHORS_OPT, 21 + value :ANCHORS_ZERO_FEE_HTLC_REQ, 22 + value :ANCHORS_ZERO_FEE_HTLC_OPT, 23 end end end @@ -1174,6 +1246,7 @@ module Lnrpc ChannelEventUpdate::UpdateType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate.UpdateType").enummodule WalletBalanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceRequest").msgclass WalletBalanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletBalanceResponse").msgclass + Amount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Amount").msgclass ChannelBalanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceRequest").msgclass ChannelBalanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelBalanceResponse").msgclass QueryRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesRequest").msgclass @@ -1250,9 +1323,18 @@ module Lnrpc 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 + ListMacaroonIDsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListMacaroonIDsRequest").msgclass + ListMacaroonIDsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListMacaroonIDsResponse").msgclass + DeleteMacaroonIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteMacaroonIDRequest").msgclass + DeleteMacaroonIDResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteMacaroonIDResponse").msgclass + MacaroonPermissionList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MacaroonPermissionList").msgclass + ListPermissionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPermissionsRequest").msgclass + ListPermissionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPermissionsResponse").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 + MacaroonId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MacaroonId").msgclass + Op = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Op").msgclass 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 diff --git a/lib/grpc_services/rpc_services_pb.rb b/lib/grpc_services/rpc_services_pb.rb index cd02013..687f7ab 100644 --- a/lib/grpc_services/rpc_services_pb.rb +++ b/lib/grpc_services/rpc_services_pb.rb @@ -26,7 +26,7 @@ module Lnrpc # Lightning is the main RPC server of the daemon. class Service - include GRPC::GenericService + include ::GRPC::GenericService self.marshal_class_method = :encode self.unmarshal_class_method = :decode @@ -36,15 +36,16 @@ module Lnrpc # 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 + rpc :WalletBalance, ::Lnrpc::WalletBalanceRequest, ::Lnrpc::WalletBalanceResponse # lncli: `channelbalance` - # ChannelBalance returns the total funds available across all open channels - # in satoshis. - rpc :ChannelBalance, ChannelBalanceRequest, ChannelBalanceResponse + # ChannelBalance returns a report on the total funds across all open channels, + # categorized in local/remote, pending local/remote and unsettled local/remote + # balances. + rpc :ChannelBalance, ::Lnrpc::ChannelBalanceRequest, ::Lnrpc::ChannelBalanceResponse # lncli: `listchaintxns` # GetTransactions returns a list describing all the known transactions # relevant to the wallet. - rpc :GetTransactions, GetTransactionsRequest, TransactionDetails + rpc :GetTransactions, ::Lnrpc::GetTransactionsRequest, ::Lnrpc::TransactionDetails # lncli: `estimatefee` # EstimateFee asks the chain backend to estimate the fee rate and total fees # for a transaction that pays to multiple specified outputs. @@ -53,73 +54,73 @@ module Lnrpc # `&AddrToAmount[
]=` 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 + rpc :EstimateFee, ::Lnrpc::EstimateFeeRequest, ::Lnrpc::EstimateFeeResponse # lncli: `sendcoins` # SendCoins executes a request to send coins to a particular address. Unlike # SendMany, this RPC call only allows creating a single output at a time. If # neither target_conf, or sat_per_byte are set, then the internal wallet will # consult its fee model to determine a fee for the default confirmation # target. - rpc :SendCoins, SendCoinsRequest, SendCoinsResponse + rpc :SendCoins, ::Lnrpc::SendCoinsRequest, ::Lnrpc::SendCoinsResponse # lncli: `listunspent` # Deprecated, use walletrpc.ListUnspent instead. # # ListUnspent returns a list of all utxos spendable by the wallet with a # number of confirmations between the specified minimum and maximum. - rpc :ListUnspent, ListUnspentRequest, ListUnspentResponse + rpc :ListUnspent, ::Lnrpc::ListUnspentRequest, ::Lnrpc::ListUnspentResponse # # SubscribeTransactions creates a uni-directional stream from the server to # the client in which any newly discovered transactions relevant to the # wallet are sent over. - rpc :SubscribeTransactions, GetTransactionsRequest, stream(Transaction) + rpc :SubscribeTransactions, ::Lnrpc::GetTransactionsRequest, stream(::Lnrpc::Transaction) # lncli: `sendmany` # SendMany handles a request for a transaction that creates multiple specified # outputs in parallel. If neither target_conf, or sat_per_byte are set, then # the internal wallet will consult its fee model to determine a fee for the # default confirmation target. - rpc :SendMany, SendManyRequest, SendManyResponse + rpc :SendMany, ::Lnrpc::SendManyRequest, ::Lnrpc::SendManyResponse # lncli: `newaddress` # NewAddress creates a new address under control of the local wallet. - rpc :NewAddress, NewAddressRequest, NewAddressResponse + rpc :NewAddress, ::Lnrpc::NewAddressRequest, ::Lnrpc::NewAddressResponse # lncli: `signmessage` # SignMessage signs a message with this node's private key. The returned # signature string is `zbase32` encoded and pubkey recoverable, meaning that # only the message digest and signature are needed for verification. - rpc :SignMessage, SignMessageRequest, SignMessageResponse + rpc :SignMessage, ::Lnrpc::SignMessageRequest, ::Lnrpc::SignMessageResponse # lncli: `verifymessage` # VerifyMessage verifies a signature over a msg. The signature must be # zbase32 encoded and signed by an active node in the resident node's # channel database. In addition to returning the validity of the signature, # VerifyMessage also returns the recovered pubkey from the signature. - rpc :VerifyMessage, VerifyMessageRequest, VerifyMessageResponse + rpc :VerifyMessage, ::Lnrpc::VerifyMessageRequest, ::Lnrpc::VerifyMessageResponse # lncli: `connect` # ConnectPeer attempts to establish a connection to a remote peer. This is at # the networking level, and is used for communication between nodes. This is # distinct from establishing a channel with a peer. - rpc :ConnectPeer, ConnectPeerRequest, ConnectPeerResponse + rpc :ConnectPeer, ::Lnrpc::ConnectPeerRequest, ::Lnrpc::ConnectPeerResponse # lncli: `disconnect` # DisconnectPeer attempts to disconnect one peer from another identified by a # given pubKey. In the case that we currently have a pending or active channel # with the target peer, then this action will be not be allowed. - rpc :DisconnectPeer, DisconnectPeerRequest, DisconnectPeerResponse + rpc :DisconnectPeer, ::Lnrpc::DisconnectPeerRequest, ::Lnrpc::DisconnectPeerResponse # lncli: `listpeers` # ListPeers returns a verbose listing of all currently active peers. - rpc :ListPeers, ListPeersRequest, ListPeersResponse + rpc :ListPeers, ::Lnrpc::ListPeersRequest, ::Lnrpc::ListPeersResponse # # SubscribePeerEvents creates a uni-directional stream from the server to # the client in which any events relevant to the state of peers are sent # over. Events include peers going online and offline. - rpc :SubscribePeerEvents, PeerEventSubscription, stream(PeerEvent) + rpc :SubscribePeerEvents, ::Lnrpc::PeerEventSubscription, stream(::Lnrpc::PeerEvent) # lncli: `getinfo` # GetInfo returns general information concerning the lightning node including # it's identity pubkey, alias, the chains it is connected to, and information # concerning the number of open+pending channels. - rpc :GetInfo, GetInfoRequest, GetInfoResponse + rpc :GetInfo, ::Lnrpc::GetInfoRequest, ::Lnrpc::GetInfoResponse # * lncli: `getrecoveryinfo` # GetRecoveryInfo returns information concerning the recovery mode including # whether it's in a recovery mode, whether the recovery is finished, and the # progress made so far. - rpc :GetRecoveryInfo, GetRecoveryInfoRequest, GetRecoveryInfoResponse + rpc :GetRecoveryInfo, ::Lnrpc::GetRecoveryInfoRequest, ::Lnrpc::GetRecoveryInfoResponse # TODO(roasbeef): merge with below with bool? # # lncli: `pendingchannels` @@ -127,27 +128,27 @@ module Lnrpc # 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 + rpc :PendingChannels, ::Lnrpc::PendingChannelsRequest, ::Lnrpc::PendingChannelsResponse # lncli: `listchannels` # ListChannels returns a description of all the open channels that this node # is a participant in. - rpc :ListChannels, ListChannelsRequest, ListChannelsResponse + rpc :ListChannels, ::Lnrpc::ListChannelsRequest, ::Lnrpc::ListChannelsResponse # # SubscribeChannelEvents creates a uni-directional stream from the server to # the client in which any updates relevant to the state of the channels are # sent over. Events include new active channels, inactive channels, and closed # channels. - rpc :SubscribeChannelEvents, ChannelEventSubscription, stream(ChannelEventUpdate) + rpc :SubscribeChannelEvents, ::Lnrpc::ChannelEventSubscription, stream(::Lnrpc::ChannelEventUpdate) # lncli: `closedchannels` # ClosedChannels returns a description of all the closed channels that # this node was a participant in. - rpc :ClosedChannels, ClosedChannelsRequest, ClosedChannelsResponse + rpc :ClosedChannels, ::Lnrpc::ClosedChannelsRequest, ::Lnrpc::ClosedChannelsResponse # # OpenChannelSync is a synchronous version of the OpenChannel RPC call. This # call is meant to be consumed by clients to the REST proxy. As with all # other sync calls, all byte slices are intended to be populated as hex # encoded strings. - rpc :OpenChannelSync, OpenChannelRequest, ChannelPoint + rpc :OpenChannelSync, ::Lnrpc::OpenChannelRequest, ::Lnrpc::ChannelPoint # lncli: `openchannel` # OpenChannel attempts to open a singly funded channel specified in the # request to a remote peer. Users are able to specify a target number of @@ -157,7 +158,7 @@ module Lnrpc # the pending channel ID of the in-progress channel. Depending on the # arguments specified in the OpenChannelRequest, this pending channel ID can # then be used to manually progress the channel funding flow. - rpc :OpenChannel, OpenChannelRequest, stream(OpenStatusUpdate) + rpc :OpenChannel, ::Lnrpc::OpenChannelRequest, stream(::Lnrpc::OpenStatusUpdate) # # FundingStateStep is an advanced funding related call that allows the caller # to either execute some preparatory steps for a funding workflow, or @@ -167,14 +168,14 @@ module Lnrpc # pending channel ID, for which we need to use specific parameters. # Alternatively, this can be used to interactively drive PSBT signing for # funding for partially complete funding transactions. - rpc :FundingStateStep, FundingTransitionMsg, FundingStateStepResp + rpc :FundingStateStep, ::Lnrpc::FundingTransitionMsg, ::Lnrpc::FundingStateStepResp # # ChannelAcceptor dispatches a bi-directional streaming RPC in which # OpenChannel requests are sent to the client and the client responds with # a boolean that tells LND whether or not to accept the channel. This allows # node operators to specify their own criteria for accepting inbound channels # through a single persistent connection. - rpc :ChannelAcceptor, stream(ChannelAcceptResponse), stream(ChannelAcceptRequest) + rpc :ChannelAcceptor, stream(::Lnrpc::ChannelAcceptResponse), stream(::Lnrpc::ChannelAcceptRequest) # lncli: `closechannel` # CloseChannel attempts to close an active channel identified by its channel # outpoint (ChannelPoint). The actions of this method can additionally be @@ -183,42 +184,44 @@ module Lnrpc # then the user can specify either a target number of blocks until the # closure transaction is confirmed, or a manual fee rate. If neither are # specified, then a default lax, block confirmation target is used. - rpc :CloseChannel, CloseChannelRequest, stream(CloseStatusUpdate) + rpc :CloseChannel, ::Lnrpc::CloseChannelRequest, stream(::Lnrpc::CloseStatusUpdate) # lncli: `abandonchannel` # AbandonChannel removes all channel state from the database except for a # close summary. This method can be used to get rid of permanently unusable - # channels due to bugs fixed in newer versions of lnd. Only available - # when in debug builds of lnd. - rpc :AbandonChannel, AbandonChannelRequest, AbandonChannelResponse + # channels due to bugs fixed in newer versions of lnd. This method can also be + # used to remove externally funded channels where the funding transaction was + # never broadcast. Only available for non-externally funded channels in dev + # build. + rpc :AbandonChannel, ::Lnrpc::AbandonChannelRequest, ::Lnrpc::AbandonChannelResponse # lncli: `sendpayment` # Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a # bi-directional streaming RPC for sending payments through the Lightning # Network. A single RPC invocation creates a persistent bi-directional # stream allowing clients to rapidly send payments through the Lightning # Network with a single persistent connection. - rpc :SendPayment, stream(SendRequest), stream(SendResponse) + rpc :SendPayment, stream(::Lnrpc::SendRequest), stream(::Lnrpc::SendResponse) # # SendPaymentSync is the synchronous non-streaming version of SendPayment. # This RPC is intended to be consumed by clients of the REST proxy. # Additionally, this RPC expects the destination's public key and the payment # hash (if any) to be encoded as hex strings. - rpc :SendPaymentSync, SendRequest, SendResponse + rpc :SendPaymentSync, ::Lnrpc::SendRequest, ::Lnrpc::SendResponse # lncli: `sendtoroute` # Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional # streaming RPC for sending payment through the Lightning Network. This # method differs from SendPayment in that it allows users to specify a full # route manually. This can be used for things like rebalancing, and atomic # swaps. - rpc :SendToRoute, stream(SendToRouteRequest), stream(SendResponse) + rpc :SendToRoute, stream(::Lnrpc::SendToRouteRequest), stream(::Lnrpc::SendResponse) # # SendToRouteSync is a synchronous version of SendToRoute. It Will block # until the payment either fails or succeeds. - rpc :SendToRouteSync, SendToRouteRequest, SendResponse + rpc :SendToRouteSync, ::Lnrpc::SendToRouteRequest, ::Lnrpc::SendResponse # lncli: `addinvoice` # AddInvoice attempts to add a new invoice to the invoice database. Any # duplicated invoices are rejected, therefore all invoices *must* have a # unique payment preimage. - rpc :AddInvoice, Invoice, AddInvoiceResponse + rpc :AddInvoice, ::Lnrpc::Invoice, ::Lnrpc::AddInvoiceResponse # lncli: `listinvoices` # ListInvoices returns a list of all the invoices currently stored within the # database. Any active debug invoices are ignored. It has full support for @@ -227,12 +230,12 @@ module Lnrpc # last_index_offset fields included in the response as the index_offset of the # next request. By default, the first 100 invoices created will be returned. # Backwards pagination is also supported through the Reversed flag. - rpc :ListInvoices, ListInvoiceRequest, ListInvoiceResponse + rpc :ListInvoices, ::Lnrpc::ListInvoiceRequest, ::Lnrpc::ListInvoiceResponse # lncli: `lookupinvoice` # LookupInvoice attempts to look up an invoice according to its payment hash. # The passed payment hash *must* be exactly 32 bytes, if not, an error is # returned. - rpc :LookupInvoice, PaymentHash, Invoice + rpc :LookupInvoice, ::Lnrpc::PaymentHash, ::Lnrpc::Invoice # # SubscribeInvoices returns a uni-directional stream (server -> client) for # notifying the client of newly added/settled invoices. The caller can @@ -243,18 +246,18 @@ module Lnrpc # invoices with a settle_index greater than the specified value. One or both # of these fields can be set. If no fields are set, then we'll only send out # the latest add/settle events. - rpc :SubscribeInvoices, InvoiceSubscription, stream(Invoice) + rpc :SubscribeInvoices, ::Lnrpc::InvoiceSubscription, stream(::Lnrpc::Invoice) # lncli: `decodepayreq` # DecodePayReq takes an encoded payment request string and attempts to decode # it, returning a full description of the conditions encoded within the # payment request. - rpc :DecodePayReq, PayReqString, PayReq + rpc :DecodePayReq, ::Lnrpc::PayReqString, ::Lnrpc::PayReq # lncli: `listpayments` # ListPayments returns a list of all outgoing payments. - rpc :ListPayments, ListPaymentsRequest, ListPaymentsResponse + rpc :ListPayments, ::Lnrpc::ListPaymentsRequest, ::Lnrpc::ListPaymentsResponse # # DeleteAllPayments deletes all outgoing payments from DB. - rpc :DeleteAllPayments, DeleteAllPaymentsRequest, DeleteAllPaymentsResponse + rpc :DeleteAllPayments, ::Lnrpc::DeleteAllPaymentsRequest, ::Lnrpc::DeleteAllPaymentsResponse # lncli: `describegraph` # DescribeGraph returns a description of the latest graph state from the # point of view of the node. The graph information is partitioned into two @@ -262,21 +265,21 @@ module Lnrpc # vertexes themselves. As this is a directed graph, the edges also contain # the node directional specific routing policy which includes: the time lock # delta, fee information, etc. - rpc :DescribeGraph, ChannelGraphRequest, ChannelGraph + rpc :DescribeGraph, ::Lnrpc::ChannelGraphRequest, ::Lnrpc::ChannelGraph # lncli: `getnodemetrics` # GetNodeMetrics returns node metrics calculated from the graph. Currently # the only supported metric is betweenness centrality of individual nodes. - rpc :GetNodeMetrics, NodeMetricsRequest, NodeMetricsResponse + rpc :GetNodeMetrics, ::Lnrpc::NodeMetricsRequest, ::Lnrpc::NodeMetricsResponse # lncli: `getchaninfo` # GetChanInfo returns the latest authenticated network announcement for the # given channel identified by its channel ID: an 8-byte integer which # uniquely identifies the location of transaction's funding output within the # blockchain. - rpc :GetChanInfo, ChanInfoRequest, ChannelEdge + rpc :GetChanInfo, ::Lnrpc::ChanInfoRequest, ::Lnrpc::ChannelEdge # lncli: `getnodeinfo` # GetNodeInfo returns the latest advertised, aggregated, and authenticated # channel information for the specified node identified by its public key. - rpc :GetNodeInfo, NodeInfoRequest, NodeInfo + rpc :GetNodeInfo, ::Lnrpc::NodeInfoRequest, ::Lnrpc::NodeInfo # lncli: `queryroutes` # QueryRoutes attempts to query the daemon's Channel Router for a possible # route to a target destination capable of carrying a specific amount of @@ -288,15 +291,15 @@ module Lnrpc # `&dest_custom_records[]=` # 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 + rpc :QueryRoutes, ::Lnrpc::QueryRoutesRequest, ::Lnrpc::QueryRoutesResponse # lncli: `getnetworkinfo` # GetNetworkInfo returns some basic stats about the known channel graph from # the point of view of the node. - rpc :GetNetworkInfo, NetworkInfoRequest, NetworkInfo + rpc :GetNetworkInfo, ::Lnrpc::NetworkInfoRequest, ::Lnrpc::NetworkInfo # lncli: `stop` # StopDaemon will send a shutdown request to the interrupt handler, triggering # a graceful shutdown of the daemon. - rpc :StopDaemon, StopRequest, StopResponse + rpc :StopDaemon, ::Lnrpc::StopRequest, ::Lnrpc::StopResponse # # SubscribeChannelGraph launches a streaming RPC that allows the caller to # receive notifications upon any changes to the channel graph topology from @@ -304,21 +307,21 @@ module Lnrpc # nodes coming online, nodes updating their authenticated attributes, new # channels being advertised, updates in the routing policy for a directional # channel edge, and when channels are closed on-chain. - rpc :SubscribeChannelGraph, GraphTopologySubscription, stream(GraphTopologyUpdate) + rpc :SubscribeChannelGraph, ::Lnrpc::GraphTopologySubscription, stream(::Lnrpc::GraphTopologyUpdate) # lncli: `debuglevel` # DebugLevel allows a caller to programmatically set the logging verbosity of # lnd. The logging can be targeted according to a coarse daemon-wide logging # level, or in a granular fashion to specify the logging for a target # sub-system. - rpc :DebugLevel, DebugLevelRequest, DebugLevelResponse + rpc :DebugLevel, ::Lnrpc::DebugLevelRequest, ::Lnrpc::DebugLevelResponse # lncli: `feereport` # FeeReport allows the caller to obtain a report detailing the current fee # schedule enforced by the node globally for each channel. - rpc :FeeReport, FeeReportRequest, FeeReportResponse + rpc :FeeReport, ::Lnrpc::FeeReportRequest, ::Lnrpc::FeeReportResponse # lncli: `updatechanpolicy` # UpdateChannelPolicy allows the caller to update the fee schedule and # channel policies for all channels globally, or a particular channel. - rpc :UpdateChannelPolicy, PolicyUpdateRequest, PolicyUpdateResponse + rpc :UpdateChannelPolicy, ::Lnrpc::PolicyUpdateRequest, ::Lnrpc::PolicyUpdateResponse # lncli: `fwdinghistory` # ForwardingHistory allows the caller to query the htlcswitch for a record of # all HTLCs forwarded within the target time range, and integer offset @@ -330,7 +333,7 @@ module Lnrpc # As a result each message can only contain 50k entries. Each response has # the index offset of the last entry. The index offset can be provided to the # request to allow the caller to skip a series of records. - rpc :ForwardingHistory, ForwardingHistoryRequest, ForwardingHistoryResponse + rpc :ForwardingHistory, ::Lnrpc::ForwardingHistoryRequest, ::Lnrpc::ForwardingHistoryResponse # lncli: `exportchanbackup` # ExportChannelBackup attempts to return an encrypted static channel backup # for the target channel identified by it channel point. The backup is @@ -338,25 +341,25 @@ module Lnrpc # returned backup can either be restored using the RestoreChannelBackup # method once lnd is running, or via the InitWallet and UnlockWallet methods # from the WalletUnlocker service. - rpc :ExportChannelBackup, ExportChannelBackupRequest, ChannelBackup + rpc :ExportChannelBackup, ::Lnrpc::ExportChannelBackupRequest, ::Lnrpc::ChannelBackup # # ExportAllChannelBackups returns static channel backups for all existing # channels known to lnd. A set of regular singular static channel backups for # each channel are returned. Additionally, a multi-channel backup is returned # as well, which contains a single encrypted blob containing the backups of # each channel. - rpc :ExportAllChannelBackups, ChanBackupExportRequest, ChanBackupSnapshot + rpc :ExportAllChannelBackups, ::Lnrpc::ChanBackupExportRequest, ::Lnrpc::ChanBackupSnapshot # # VerifyChanBackup allows a caller to verify the integrity of a channel backup # snapshot. This method will accept either a packed Single or a packed Multi. # Specifying both will result in an error. - rpc :VerifyChanBackup, ChanBackupSnapshot, VerifyChanBackupResponse + rpc :VerifyChanBackup, ::Lnrpc::ChanBackupSnapshot, ::Lnrpc::VerifyChanBackupResponse # lncli: `restorechanbackup` # RestoreChannelBackups accepts a set of singular channel backups, or a # single encrypted multi-chan backup and attempts to recover any funds # remaining within the channel. If we are able to unpack the backup, then the # new channel will be shown under listchannels, as well as pending channels. - rpc :RestoreChannelBackups, RestoreChanBackupRequest, RestoreBackupResponse + rpc :RestoreChannelBackups, ::Lnrpc::RestoreChanBackupRequest, ::Lnrpc::RestoreBackupResponse # # SubscribeChannelBackups allows a client to sub-subscribe to the most up to # date information concerning the state of all channel backups. Each time a @@ -365,12 +368,23 @@ module Lnrpc # channel is closed, we send a new update, which contains new new chan back # ups, but the updated set of encrypted multi-chan backups with the closed # channel(s) removed. - rpc :SubscribeChannelBackups, ChannelBackupSubscription, stream(ChanBackupSnapshot) + rpc :SubscribeChannelBackups, ::Lnrpc::ChannelBackupSubscription, stream(::Lnrpc::ChanBackupSnapshot) # lncli: `bakemacaroon` # BakeMacaroon allows the creation of a new macaroon with custom read and # write permissions. No first-party caveats are added since this can be done # offline. - rpc :BakeMacaroon, BakeMacaroonRequest, BakeMacaroonResponse + rpc :BakeMacaroon, ::Lnrpc::BakeMacaroonRequest, ::Lnrpc::BakeMacaroonResponse + # lncli: `listmacaroonids` + # ListMacaroonIDs returns all root key IDs that are in use. + rpc :ListMacaroonIDs, ::Lnrpc::ListMacaroonIDsRequest, ::Lnrpc::ListMacaroonIDsResponse + # lncli: `deletemacaroonid` + # DeleteMacaroonID deletes the specified macaroon ID and invalidates all + # macaroons derived from that ID. + rpc :DeleteMacaroonID, ::Lnrpc::DeleteMacaroonIDRequest, ::Lnrpc::DeleteMacaroonIDResponse + # lncli: `listpermissions` + # ListPermissions lists all RPC method URIs and their required macaroon + # permissions to access them. + rpc :ListPermissions, ::Lnrpc::ListPermissionsRequest, ::Lnrpc::ListPermissionsResponse end Stub = Service.rpc_stub_class diff --git a/lib/grpc_services/signrpc/signer_pb.rb b/lib/grpc_services/signrpc/signer_pb.rb index 8165123..32d063c 100644 --- a/lib/grpc_services/signrpc/signer_pb.rb +++ b/lib/grpc_services/signrpc/signer_pb.rb @@ -58,6 +58,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "signrpc.SharedKeyRequest" do optional :ephemeral_pubkey, :bytes, 1 optional :key_loc, :message, 2, "signrpc.KeyLocator" + optional :key_desc, :message, 3, "signrpc.KeyDescriptor" end add_message "signrpc.SharedKeyResponse" do optional :shared_key, :bytes, 1 diff --git a/lib/grpc_services/signrpc/signer_services_pb.rb b/lib/grpc_services/signrpc/signer_services_pb.rb index a8bc4e7..1dfc814 100644 --- a/lib/grpc_services/signrpc/signer_services_pb.rb +++ b/lib/grpc_services/signrpc/signer_services_pb.rb @@ -10,7 +10,7 @@ module Signrpc # daemon's wallet. class Service - include GRPC::GenericService + include ::GRPC::GenericService self.marshal_class_method = :encode self.unmarshal_class_method = :decode @@ -25,7 +25,7 @@ module Signrpc # # If we are unable to sign using the specified keys, then an error will be # returned. - rpc :SignOutputRaw, SignReq, SignResp + rpc :SignOutputRaw, ::Signrpc::SignReq, ::Signrpc::SignResp # # ComputeInputScript generates a complete InputIndex for the passed # transaction with the signature as defined within the passed SignDescriptor. @@ -37,30 +37,31 @@ module Signrpc # 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 + rpc :ComputeInputScript, ::Signrpc::SignReq, ::Signrpc::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 + rpc :SignMessage, ::Signrpc::SignMessageReq, ::Signrpc::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 + rpc :VerifyMessage, ::Signrpc::VerifyMessageReq, ::Signrpc::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): + # key specified in the key_desc parameter. Either a key locator or a raw + # public key is expected in the key_desc, if neither is supplied, defaults to + # the node's identity private key: # 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 + rpc :DeriveSharedKey, ::Signrpc::SharedKeyRequest, ::Signrpc::SharedKeyResponse end Stub = Service.rpc_stub_class diff --git a/lib/grpc_services/verrpc/verrpc_services_pb.rb b/lib/grpc_services/verrpc/verrpc_services_pb.rb index 6642a60..91751e7 100644 --- a/lib/grpc_services/verrpc/verrpc_services_pb.rb +++ b/lib/grpc_services/verrpc/verrpc_services_pb.rb @@ -10,7 +10,7 @@ module Verrpc # and build information of the running daemon. class Service - include GRPC::GenericService + include ::GRPC::GenericService self.marshal_class_method = :encode self.unmarshal_class_method = :decode @@ -19,7 +19,7 @@ module Verrpc # lncli: `version` # GetVersion returns the current version and build information of the running # daemon. - rpc :GetVersion, VersionRequest, Version + rpc :GetVersion, ::Verrpc::VersionRequest, ::Verrpc::Version end Stub = Service.rpc_stub_class diff --git a/lib/grpc_services/walletrpc/walletkit_pb.rb b/lib/grpc_services/walletrpc/walletkit_pb.rb index 61765a7..6116f0a 100644 --- a/lib/grpc_services/walletrpc/walletkit_pb.rb +++ b/lib/grpc_services/walletrpc/walletkit_pb.rb @@ -47,6 +47,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :sat_per_kw, :int64, 1 repeated :outputs, :message, 2, "signrpc.TxOut" optional :label, :string, 3 + optional :min_confs, :int32, 4 + optional :spend_unconfirmed, :bool, 5 end add_message "walletrpc.SendOutputsResponse" do optional :raw_tx, :bytes, 1 @@ -100,6 +102,37 @@ Google::Protobuf::DescriptorPool.generated_pool.build do end add_message "walletrpc.LabelTransactionResponse" do end + add_message "walletrpc.FundPsbtRequest" do + oneof :template do + optional :psbt, :bytes, 1 + optional :raw, :message, 2, "walletrpc.TxTemplate" + end + oneof :fees do + optional :target_conf, :uint32, 3 + optional :sat_per_vbyte, :uint32, 4 + end + end + add_message "walletrpc.FundPsbtResponse" do + optional :funded_psbt, :bytes, 1 + optional :change_output_index, :int32, 2 + repeated :locked_utxos, :message, 3, "walletrpc.UtxoLease" + end + add_message "walletrpc.TxTemplate" do + repeated :inputs, :message, 1, "lnrpc.OutPoint" + map :outputs, :string, :uint64, 2 + end + add_message "walletrpc.UtxoLease" do + optional :id, :bytes, 1 + optional :outpoint, :message, 2, "lnrpc.OutPoint" + optional :expiration, :uint64, 3 + end + add_message "walletrpc.FinalizePsbtRequest" do + optional :funded_psbt, :bytes, 1 + end + add_message "walletrpc.FinalizePsbtResponse" do + optional :signed_psbt, :bytes, 1 + optional :raw_final_tx, :bytes, 2 + end add_enum "walletrpc.WitnessType" do value :UNKNOWN_WITNESS, 0 value :COMMITMENT_TIME_LOCK, 1 @@ -145,5 +178,11 @@ module Walletrpc ListSweepsResponse::TransactionIDs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListSweepsResponse.TransactionIDs").msgclass LabelTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LabelTransactionRequest").msgclass LabelTransactionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.LabelTransactionResponse").msgclass + FundPsbtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FundPsbtRequest").msgclass + FundPsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FundPsbtResponse").msgclass + TxTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.TxTemplate").msgclass + UtxoLease = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.UtxoLease").msgclass + FinalizePsbtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FinalizePsbtRequest").msgclass + FinalizePsbtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.FinalizePsbtResponse").msgclass WitnessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.WitnessType").enummodule end diff --git a/lib/grpc_services/walletrpc/walletkit_services_pb.rb b/lib/grpc_services/walletrpc/walletkit_services_pb.rb index f2fa243..5707ae8 100644 --- a/lib/grpc_services/walletrpc/walletkit_services_pb.rb +++ b/lib/grpc_services/walletrpc/walletkit_services_pb.rb @@ -10,7 +10,7 @@ module Walletrpc # daemon's wallet. class Service - include GRPC::GenericService + include ::GRPC::GenericService self.marshal_class_method = :encode self.unmarshal_class_method = :decode @@ -19,47 +19,47 @@ module Walletrpc # # ListUnspent returns a list of all utxos spendable by the wallet with a # number of confirmations between the specified minimum and maximum. - rpc :ListUnspent, ListUnspentRequest, ListUnspentResponse + rpc :ListUnspent, ::Walletrpc::ListUnspentRequest, ::Walletrpc::ListUnspentResponse # # LeaseOutput locks an output to the given ID, preventing it from being # available for any future coin selection attempts. The absolute time of the # lock's expiration is returned. The expiration of the lock can be extended by # successive invocations of this RPC. Outputs can be unlocked before their # expiration through `ReleaseOutput`. - rpc :LeaseOutput, LeaseOutputRequest, LeaseOutputResponse + rpc :LeaseOutput, ::Walletrpc::LeaseOutputRequest, ::Walletrpc::LeaseOutputResponse # # ReleaseOutput unlocks an output, allowing it to be available for coin # selection if it remains unspent. The ID should match the one used to # originally lock the output. - rpc :ReleaseOutput, ReleaseOutputRequest, ReleaseOutputResponse + rpc :ReleaseOutput, ::Walletrpc::ReleaseOutputRequest, ::Walletrpc::ReleaseOutputResponse # # DeriveNextKey attempts to derive the *next* key within the key family # (account in BIP43) specified. This method should return the next external # child within this branch. - rpc :DeriveNextKey, KeyReq, Signrpc::KeyDescriptor + rpc :DeriveNextKey, ::Walletrpc::KeyReq, ::Signrpc::KeyDescriptor # # DeriveKey attempts to derive an arbitrary key specified by the passed # KeyLocator. - rpc :DeriveKey, Signrpc::KeyLocator, Signrpc::KeyDescriptor + rpc :DeriveKey, ::Signrpc::KeyLocator, ::Signrpc::KeyDescriptor # # NextAddr returns the next unused address within the wallet. - rpc :NextAddr, AddrRequest, AddrResponse + rpc :NextAddr, ::Walletrpc::AddrRequest, ::Walletrpc::AddrResponse # # PublishTransaction attempts to publish the passed transaction to the # network. Once this returns without an error, the wallet will continually # attempt to re-broadcast the transaction on start up, until it enters the # chain. - rpc :PublishTransaction, Transaction, PublishResponse + rpc :PublishTransaction, ::Walletrpc::Transaction, ::Walletrpc::PublishResponse # # SendOutputs is similar to the existing sendmany call in Bitcoind, and # allows the caller to create a transaction that sends to several outputs at # once. This is ideal when wanting to batch create a set of transactions. - rpc :SendOutputs, SendOutputsRequest, SendOutputsResponse + rpc :SendOutputs, ::Walletrpc::SendOutputsRequest, ::Walletrpc::SendOutputsResponse # # EstimateFee attempts to query the internal fee estimator of the wallet to # determine the fee (in sat/kw) to attach to a transaction in order to # achieve the confirmation target. - rpc :EstimateFee, EstimateFeeRequest, EstimateFeeResponse + rpc :EstimateFee, ::Walletrpc::EstimateFeeRequest, ::Walletrpc::EstimateFeeResponse # # PendingSweeps returns lists of on-chain outputs that lnd is currently # attempting to sweep within its central batching engine. Outputs with similar @@ -69,7 +69,7 @@ module Walletrpc # NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to # remain supported. This is an advanced API that depends on the internals of # the UtxoSweeper, so things may change. - rpc :PendingSweeps, PendingSweepsRequest, PendingSweepsResponse + rpc :PendingSweeps, ::Walletrpc::PendingSweepsRequest, ::Walletrpc::PendingSweepsResponse # # BumpFee bumps the fee of an arbitrary input within a transaction. This RPC # takes a different approach than bitcoind's bumpfee command. lnd has a @@ -96,18 +96,51 @@ module Walletrpc # Note that this RPC currently doesn't perform any validation checks on the # fee preference being provided. For now, the responsibility of ensuring that # the new fee preference is sufficient is delegated to the user. - rpc :BumpFee, BumpFeeRequest, BumpFeeResponse + rpc :BumpFee, ::Walletrpc::BumpFeeRequest, ::Walletrpc::BumpFeeResponse # # ListSweeps returns a list of the sweep transactions our node has produced. # Note that these sweeps may not be confirmed yet, as we record sweeps on # broadcast, not confirmation. - rpc :ListSweeps, ListSweepsRequest, ListSweepsResponse + rpc :ListSweeps, ::Walletrpc::ListSweepsRequest, ::Walletrpc::ListSweepsResponse # # LabelTransaction adds a label to a transaction. If the transaction already # has a label the call will fail unless the overwrite bool is set. This will # overwrite the exiting transaction label. Labels must not be empty, and # cannot exceed 500 characters. - rpc :LabelTransaction, LabelTransactionRequest, LabelTransactionResponse + rpc :LabelTransaction, ::Walletrpc::LabelTransactionRequest, ::Walletrpc::LabelTransactionResponse + # + # FundPsbt creates a fully populated PSBT that contains enough inputs to fund + # the outputs specified in the template. There are two ways of specifying a + # template: Either by passing in a PSBT with at least one output declared or + # by passing in a raw TxTemplate message. + # + # If there are no inputs specified in the template, coin selection is + # performed automatically. If the template does contain any inputs, it is + # assumed that full coin selection happened externally and no additional + # inputs are added. If the specified inputs aren't enough to fund the outputs + # with the given fee rate, an error is returned. + # + # After either selecting or verifying the inputs, all input UTXOs are locked + # with an internal app ID. + # + # NOTE: If this method returns without an error, it is the caller's + # responsibility to either spend the locked UTXOs (by finalizing and then + # publishing the transaction) or to unlock/release the locked UTXOs in case of + # an error on the caller's side. + rpc :FundPsbt, ::Walletrpc::FundPsbtRequest, ::Walletrpc::FundPsbtResponse + # + # FinalizePsbt expects a partial transaction with all inputs and outputs fully + # declared and tries to sign all inputs that belong to the wallet. Lnd must be + # the last signer of the transaction. That means, if there are any unsigned + # non-witness inputs or inputs without UTXO information attached or inputs + # without witness data that do not belong to lnd's wallet, this method will + # fail. If no error is returned, the PSBT is ready to be extracted and the + # final TX within to be broadcast. + # + # NOTE: This method does NOT publish the transaction once finalized. It is the + # caller's responsibility to either publish the transaction on success or + # unlock/release any locked UTXOs in case of an error in this method. + rpc :FinalizePsbt, ::Walletrpc::FinalizePsbtRequest, ::Walletrpc::FinalizePsbtResponse end Stub = Service.rpc_stub_class diff --git a/lib/grpc_services/walletunlocker_pb.rb b/lib/grpc_services/walletunlocker_pb.rb index 62827c2..67d548c 100644 --- a/lib/grpc_services/walletunlocker_pb.rb +++ b/lib/grpc_services/walletunlocker_pb.rb @@ -20,21 +20,27 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :aezeed_passphrase, :bytes, 3 optional :recovery_window, :int32, 4 optional :channel_backups, :message, 5, "lnrpc.ChanBackupSnapshot" + optional :stateless_init, :bool, 6 end add_message "lnrpc.InitWalletResponse" do + optional :admin_macaroon, :bytes, 1 end add_message "lnrpc.UnlockWalletRequest" do optional :wallet_password, :bytes, 1 optional :recovery_window, :int32, 2 optional :channel_backups, :message, 3, "lnrpc.ChanBackupSnapshot" + optional :stateless_init, :bool, 4 end add_message "lnrpc.UnlockWalletResponse" do end add_message "lnrpc.ChangePasswordRequest" do optional :current_password, :bytes, 1 optional :new_password, :bytes, 2 + optional :stateless_init, :bool, 3 + optional :new_macaroon_root_key, :bool, 4 end add_message "lnrpc.ChangePasswordResponse" do + optional :admin_macaroon, :bytes, 1 end end end diff --git a/lib/grpc_services/walletunlocker_services_pb.rb b/lib/grpc_services/walletunlocker_services_pb.rb index 073f827..f661341 100644 --- a/lib/grpc_services/walletunlocker_services_pb.rb +++ b/lib/grpc_services/walletunlocker_services_pb.rb @@ -27,7 +27,7 @@ module Lnrpc # lnd at first startup, and unlock a previously set up wallet. class Service - include GRPC::GenericService + include ::GRPC::GenericService self.marshal_class_method = :encode self.unmarshal_class_method = :decode @@ -42,7 +42,7 @@ module Lnrpc # 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 + rpc :GenSeed, ::Lnrpc::GenSeedRequest, ::Lnrpc::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 @@ -56,15 +56,15 @@ module Lnrpc # 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 + rpc :InitWallet, ::Lnrpc::InitWalletRequest, ::Lnrpc::InitWalletResponse # lncli: `unlock` # UnlockWallet is used at startup of lnd to provide a password to unlock # the wallet database. - rpc :UnlockWallet, UnlockWalletRequest, UnlockWalletResponse + rpc :UnlockWallet, ::Lnrpc::UnlockWalletRequest, ::Lnrpc::UnlockWalletResponse # lncli: `changepassword` # ChangePassword changes the password of the encrypted wallet. This will # automatically unlock the wallet database if successful. - rpc :ChangePassword, ChangePasswordRequest, ChangePasswordResponse + rpc :ChangePassword, ::Lnrpc::ChangePasswordRequest, ::Lnrpc::ChangePasswordResponse end Stub = Service.rpc_stub_class diff --git a/lib/grpc_services/watchtowerrpc/watchtower_services_pb.rb b/lib/grpc_services/watchtowerrpc/watchtower_services_pb.rb index b18afc9..186e87d 100644 --- a/lib/grpc_services/watchtowerrpc/watchtower_services_pb.rb +++ b/lib/grpc_services/watchtowerrpc/watchtower_services_pb.rb @@ -10,7 +10,7 @@ module Watchtowerrpc # functionality of the daemon. class Service - include GRPC::GenericService + include ::GRPC::GenericService self.marshal_class_method = :encode self.unmarshal_class_method = :decode @@ -20,7 +20,7 @@ module Watchtowerrpc # GetInfo returns general information concerning the companion watchtower # including its public key and URIs where the server is currently # listening for clients. - rpc :GetInfo, GetInfoRequest, GetInfoResponse + rpc :GetInfo, ::Watchtowerrpc::GetInfoRequest, ::Watchtowerrpc::GetInfoResponse end Stub = Service.rpc_stub_class diff --git a/lib/grpc_services/wtclientrpc/wtclient_pb.rb b/lib/grpc_services/wtclientrpc/wtclient_pb.rb index be981fd..779d3b6 100644 --- a/lib/grpc_services/wtclientrpc/wtclient_pb.rb +++ b/lib/grpc_services/wtclientrpc/wtclient_pb.rb @@ -50,11 +50,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :num_sessions_exhausted, :uint32, 5 end add_message "wtclientrpc.PolicyRequest" do + optional :policy_type, :enum, 1, "wtclientrpc.PolicyType" end add_message "wtclientrpc.PolicyResponse" do optional :max_updates, :uint32, 1 optional :sweep_sat_per_byte, :uint32, 2 end + add_enum "wtclientrpc.PolicyType" do + value :LEGACY, 0 + value :ANCHOR, 1 + end end end @@ -72,4 +77,5 @@ module Wtclientrpc StatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.StatsResponse").msgclass PolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyRequest").msgclass PolicyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyResponse").msgclass + PolicyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("wtclientrpc.PolicyType").enummodule end diff --git a/lib/grpc_services/wtclientrpc/wtclient_services_pb.rb b/lib/grpc_services/wtclientrpc/wtclient_services_pb.rb index 54512f1..6336476 100644 --- a/lib/grpc_services/wtclientrpc/wtclient_services_pb.rb +++ b/lib/grpc_services/wtclientrpc/wtclient_services_pb.rb @@ -10,7 +10,7 @@ module Wtclientrpc # functionality of the daemon. class Service - include GRPC::GenericService + include ::GRPC::GenericService self.marshal_class_method = :encode self.unmarshal_class_method = :decode @@ -21,21 +21,21 @@ module Wtclientrpc # considers it for new sessions. If the watchtower already exists, then # any new addresses included will be considered when dialing it for # session negotiations and backups. - rpc :AddTower, AddTowerRequest, AddTowerResponse + rpc :AddTower, ::Wtclientrpc::AddTowerRequest, ::Wtclientrpc::AddTowerResponse # # RemoveTower removes a watchtower from being considered for future session # negotiations and from being used for any subsequent backups until it's added # again. If an address is provided, then this RPC only serves as a way of # removing the address from the watchtower instead. - rpc :RemoveTower, RemoveTowerRequest, RemoveTowerResponse + rpc :RemoveTower, ::Wtclientrpc::RemoveTowerRequest, ::Wtclientrpc::RemoveTowerResponse # ListTowers returns the list of watchtowers registered with the client. - rpc :ListTowers, ListTowersRequest, ListTowersResponse + rpc :ListTowers, ::Wtclientrpc::ListTowersRequest, ::Wtclientrpc::ListTowersResponse # GetTowerInfo retrieves information for a registered watchtower. - rpc :GetTowerInfo, GetTowerInfoRequest, Tower + rpc :GetTowerInfo, ::Wtclientrpc::GetTowerInfoRequest, ::Wtclientrpc::Tower # Stats returns the in-memory statistics of the client since startup. - rpc :Stats, StatsRequest, StatsResponse + rpc :Stats, ::Wtclientrpc::StatsRequest, ::Wtclientrpc::StatsResponse # Policy returns the active watchtower client policy configuration. - rpc :Policy, PolicyRequest, PolicyResponse + rpc :Policy, ::Wtclientrpc::PolicyRequest, ::Wtclientrpc::PolicyResponse end Stub = Service.rpc_stub_class