From 46020e5d0ba7fee93f269105bb8e02796a127178 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Fri, 9 Jul 2021 21:25:49 +0200 Subject: [PATCH] grpc files for v0.13.0-beta --- lib/grpc_services/routerrpc/router_pb.rb | 44 ++++++++++++ .../routerrpc/router_services_pb.rb | 19 ++++++ lib/grpc_services/rpc_pb.rb | 41 +++++++++++ lib/grpc_services/rpc_services_pb.rb | 4 +- lib/grpc_services/walletrpc/walletkit_pb.rb | 68 ++++++++++++++++++- .../walletrpc/walletkit_services_pb.rb | 40 +++++++++++ lib/grpc_services/wtclientrpc/wtclient_pb.rb | 2 + 7 files changed, 215 insertions(+), 3 deletions(-) diff --git a/lib/grpc_services/routerrpc/router_pb.rb b/lib/grpc_services/routerrpc/router_pb.rb index 7880cbf..f74166a 100644 --- a/lib/grpc_services/routerrpc/router_pb.rb +++ b/lib/grpc_services/routerrpc/router_pb.rb @@ -28,6 +28,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :max_parts, :uint32, 17 optional :no_inflight_updates, :bool, 18 optional :max_shard_size_msat, :uint64, 21 + optional :amp, :bool, 22 end add_message "routerrpc.TrackPaymentRequest" do optional :payment_hash, :bytes, 1 @@ -58,6 +59,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "routerrpc.QueryMissionControlResponse" do repeated :pairs, :message, 2, "routerrpc.PairHistory" end + add_message "routerrpc.XImportMissionControlRequest" do + repeated :pairs, :message, 1, "routerrpc.PairHistory" + end + add_message "routerrpc.XImportMissionControlResponse" do + end add_message "routerrpc.PairHistory" do optional :node_from, :bytes, 1 optional :node_to, :bytes, 2 @@ -71,6 +77,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :success_amt_sat, :int64, 6 optional :success_amt_msat, :int64, 7 end + add_message "routerrpc.GetMissionControlConfigRequest" do + end + add_message "routerrpc.GetMissionControlConfigResponse" do + optional :config, :message, 1, "routerrpc.MissionControlConfig" + end + add_message "routerrpc.SetMissionControlConfigRequest" do + optional :config, :message, 1, "routerrpc.MissionControlConfig" + end + add_message "routerrpc.SetMissionControlConfigResponse" do + end + add_message "routerrpc.MissionControlConfig" do + optional :half_life_seconds, :uint64, 1 + optional :hop_probability, :float, 2 + optional :weight, :float, 3 + optional :maximum_payment_results, :uint32, 4 + optional :minimum_failure_relax_interval, :uint64, 5 + end add_message "routerrpc.QueryProbabilityRequest" do optional :from_node, :bytes, 1 optional :to_node, :bytes, 2 @@ -156,6 +179,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :action, :enum, 2, "routerrpc.ResolveHoldForwardAction" optional :preimage, :bytes, 3 end + add_message "routerrpc.UpdateChanStatusRequest" do + optional :chan_point, :message, 1, "lnrpc.ChannelPoint" + optional :action, :enum, 2, "routerrpc.ChanStatusAction" + end + add_message "routerrpc.UpdateChanStatusResponse" do + end add_enum "routerrpc.FailureDetail" do value :UNKNOWN, 0 value :NO_DETAIL, 1 @@ -195,6 +224,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do value :FAIL, 1 value :RESUME, 2 end + add_enum "routerrpc.ChanStatusAction" do + value :ENABLE, 0 + value :DISABLE, 1 + value :AUTO, 2 + end end end @@ -209,8 +243,15 @@ module Routerrpc 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 + XImportMissionControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.XImportMissionControlRequest").msgclass + XImportMissionControlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.XImportMissionControlResponse").msgclass PairHistory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairHistory").msgclass PairData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.PairData").msgclass + GetMissionControlConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.GetMissionControlConfigRequest").msgclass + GetMissionControlConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.GetMissionControlConfigResponse").msgclass + SetMissionControlConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SetMissionControlConfigRequest").msgclass + SetMissionControlConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.SetMissionControlConfigResponse").msgclass + MissionControlConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.MissionControlConfig").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 @@ -227,7 +268,10 @@ module Routerrpc 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 + UpdateChanStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.UpdateChanStatusRequest").msgclass + UpdateChanStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.UpdateChanStatusResponse").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 + ChanStatusAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("routerrpc.ChanStatusAction").enummodule end diff --git a/lib/grpc_services/routerrpc/router_services_pb.rb b/lib/grpc_services/routerrpc/router_services_pb.rb index 2803e98..ab80267 100644 --- a/lib/grpc_services/routerrpc/router_services_pb.rb +++ b/lib/grpc_services/routerrpc/router_services_pb.rb @@ -51,6 +51,19 @@ module Routerrpc # It is a development feature. rpc :QueryMissionControl, ::Routerrpc::QueryMissionControlRequest, ::Routerrpc::QueryMissionControlResponse # + # XImportMissionControl is an experimental API that imports the state provided + # to the internal mission control's state, using all results which are more + # recent than our existing values. These values will only be imported + # in-memory, and will not be persisted across restarts. + rpc :XImportMissionControl, ::Routerrpc::XImportMissionControlRequest, ::Routerrpc::XImportMissionControlResponse + # + # GetMissionControlConfig returns mission control's current config. + rpc :GetMissionControlConfig, ::Routerrpc::GetMissionControlConfigRequest, ::Routerrpc::GetMissionControlConfigResponse + # + # SetMissionControlConfig will set mission control's config, if the config + # provided is valid. + rpc :SetMissionControlConfig, ::Routerrpc::SetMissionControlConfigRequest, ::Routerrpc::SetMissionControlConfigResponse + # # QueryProbability returns the current success probability estimate for a # given node pair and amount. rpc :QueryProbability, ::Routerrpc::QueryProbabilityRequest, ::Routerrpc::QueryProbabilityResponse @@ -79,6 +92,12 @@ module Routerrpc # In case of interception, the htlc can be either settled, cancelled or # resumed later by using the ResolveHoldForward endpoint. rpc :HtlcInterceptor, stream(::Routerrpc::ForwardHtlcInterceptResponse), stream(::Routerrpc::ForwardHtlcInterceptRequest) + # + # UpdateChanStatus attempts to manually set the state of a channel + # (enabled, disabled, or auto). A manual "disable" request will cause the + # channel to stay disabled until a subsequent manual request of either + # "enable" or "auto". + rpc :UpdateChanStatus, ::Routerrpc::UpdateChanStatusRequest, ::Routerrpc::UpdateChanStatusResponse end Stub = Service.rpc_stub_class diff --git a/lib/grpc_services/rpc_pb.rb b/lib/grpc_services/rpc_pb.rb index 90714b3..1de1685 100644 --- a/lib/grpc_services/rpc_pb.rb +++ b/lib/grpc_services/rpc_pb.rb @@ -28,6 +28,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "lnrpc.GetTransactionsRequest" do optional :start_height, :int32, 1 optional :end_height, :int32, 2 + optional :account, :string, 3 end add_message "lnrpc.TransactionDetails" do repeated :transactions, :message, 1, "lnrpc.Transaction" @@ -55,6 +56,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do map :dest_custom_records, :uint64, :bytes, 11 optional :allow_self_payment, :bool, 14 repeated :dest_features, :enum, 15, "lnrpc.FeatureBit" + optional :payment_addr, :bytes, 16 end add_message "lnrpc.SendResponse" do optional :payment_error, :string, 1 @@ -113,14 +115,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "lnrpc.EstimateFeeRequest" do map :AddrToAmount, :string, :int64, 1 optional :target_conf, :int32, 2 + optional :min_confs, :int32, 3 + optional :spend_unconfirmed, :bool, 4 end add_message "lnrpc.EstimateFeeResponse" do optional :fee_sat, :int64, 1 optional :feerate_sat_per_byte, :int64, 2 + optional :sat_per_vbyte, :uint64, 3 end add_message "lnrpc.SendManyRequest" do map :AddrToAmount, :string, :int64, 1 optional :target_conf, :int32, 3 + optional :sat_per_vbyte, :uint64, 4 optional :sat_per_byte, :int64, 5 optional :label, :string, 6 optional :min_confs, :int32, 7 @@ -133,6 +139,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :addr, :string, 1 optional :amount, :int64, 2 optional :target_conf, :int32, 3 + optional :sat_per_vbyte, :uint64, 4 optional :sat_per_byte, :int64, 5 optional :send_all, :bool, 6 optional :label, :string, 7 @@ -145,12 +152,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "lnrpc.ListUnspentRequest" do optional :min_confs, :int32, 1 optional :max_confs, :int32, 2 + optional :account, :string, 3 end add_message "lnrpc.ListUnspentResponse" do repeated :utxos, :message, 1, "lnrpc.Utxo" end add_message "lnrpc.NewAddressRequest" do optional :type, :enum, 1, "lnrpc.AddressType" + optional :account, :string, 2 end add_message "lnrpc.NewAddressResponse" do optional :address, :string, 1 @@ -373,6 +382,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :target_conf, :int32, 3 optional :sat_per_byte, :int64, 4 optional :delivery_address, :string, 5 + optional :sat_per_vbyte, :uint64, 6 end add_message "lnrpc.CloseStatusUpdate" do oneof :update do @@ -390,6 +400,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :psbt, :bytes, 3 end add_message "lnrpc.OpenChannelRequest" do + optional :sat_per_vbyte, :uint64, 1 optional :node_pubkey, :bytes, 2 optional :node_pubkey_string, :string, 3 optional :local_funding_amount, :int64, 4 @@ -550,12 +561,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do value :INACTIVE_CHANNEL, 3 value :PENDING_OPEN_CHANNEL, 4 end + add_message "lnrpc.WalletAccountBalance" do + optional :confirmed_balance, :int64, 1 + optional :unconfirmed_balance, :int64, 2 + end add_message "lnrpc.WalletBalanceRequest" do end add_message "lnrpc.WalletBalanceResponse" do optional :total_balance, :int64, 1 optional :confirmed_balance, :int64, 2 optional :unconfirmed_balance, :int64, 3 + map :account_balance, :string, :message, 4, "lnrpc.WalletAccountBalance" end add_message "lnrpc.Amount" do optional :sat, :uint64, 1 @@ -614,12 +630,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :pub_key, :string, 8 optional :tlv_payload, :bool, 9 optional :mpp_record, :message, 10, "lnrpc.MPPRecord" + optional :amp_record, :message, 12, "lnrpc.AMPRecord" map :custom_records, :uint64, :bytes, 11 end add_message "lnrpc.MPPRecord" do optional :payment_addr, :bytes, 11 optional :total_amt_msat, :int64, 10 end + add_message "lnrpc.AMPRecord" do + optional :root_share, :bytes, 1 + optional :set_id, :bytes, 2 + optional :child_index, :uint32, 3 + end add_message "lnrpc.Route" do optional :total_time_lock, :uint32, 1 optional :total_fees, :int64, 2 @@ -721,6 +743,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :global_features, :bytes, 3 optional :alias, :string, 4 optional :color, :string, 5 + repeated :node_addresses, :message, 7, "lnrpc.NodeAddress" map :features, :uint32, :message, 6, "lnrpc.Feature" end add_message "lnrpc.ChannelEdgeUpdate" do @@ -773,6 +796,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do map :features, :uint32, :message, 24, "lnrpc.Feature" optional :is_keysend, :bool, 25 optional :payment_addr, :bytes, 26 + optional :is_amp, :bool, 27 end add_enum "lnrpc.Invoice.InvoiceState" do value :OPEN, 0 @@ -791,6 +815,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :state, :enum, 8, "lnrpc.InvoiceHTLCState" map :custom_records, :uint64, :bytes, 9 optional :mpp_total_amt_msat, :uint64, 10 + optional :amp, :message, 11, "lnrpc.AMP" + end + add_message "lnrpc.AMP" do + optional :root_share, :bytes, 1 + optional :set_id, :bytes, 2 + optional :child_index, :uint32, 3 + optional :hash, :bytes, 4 + optional :preimage, :bytes, 5 end add_message "lnrpc.AddInvoiceResponse" do optional :r_hash, :bytes, 1 @@ -866,6 +898,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :last_index_offset, :uint64, 3 end add_message "lnrpc.DeleteAllPaymentsRequest" do + optional :failed_payments_only, :bool, 1 + optional :failed_htlcs_only, :bool, 2 end add_message "lnrpc.DeleteAllPaymentsResponse" do end @@ -950,6 +984,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :fee_msat, :uint64, 8 optional :amt_in_msat, :uint64, 9 optional :amt_out_msat, :uint64, 10 + optional :timestamp_ns, :uint64, 11 end add_message "lnrpc.ForwardingHistoryResponse" do repeated :forwarding_events, :message, 1, "lnrpc.ForwardingEvent" @@ -1052,6 +1087,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do value :PERMANENT_CHANNEL_FAILURE, 21 value :EXPIRY_TOO_FAR, 22 value :MPP_TIMEOUT, 23 + value :INVALID_ONION_PAYLOAD, 24 value :INTERNAL_FAILURE, 997 value :UNKNOWN_FAILURE, 998 value :UNREADABLE_FAILURE, 999 @@ -1153,6 +1189,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do value :ANCHORS_OPT, 21 value :ANCHORS_ZERO_FEE_HTLC_REQ, 22 value :ANCHORS_ZERO_FEE_HTLC_OPT, 23 + value :AMP_REQ, 30 + value :AMP_OPT, 31 end end end @@ -1244,6 +1282,7 @@ module Lnrpc ChannelEventSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventSubscription").msgclass ChannelEventUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate").msgclass ChannelEventUpdate::UpdateType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelEventUpdate.UpdateType").enummodule + WalletAccountBalance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.WalletAccountBalance").msgclass 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 @@ -1255,6 +1294,7 @@ module Lnrpc QueryRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.QueryRoutesResponse").msgclass Hop = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Hop").msgclass MPPRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.MPPRecord").msgclass + AMPRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AMPRecord").msgclass Route = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Route").msgclass NodeInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfoRequest").msgclass NodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NodeInfo").msgclass @@ -1282,6 +1322,7 @@ module Lnrpc Invoice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice").msgclass Invoice::InvoiceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice.InvoiceState").enummodule InvoiceHTLC = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.InvoiceHTLC").msgclass + AMP = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AMP").msgclass AddInvoiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddInvoiceResponse").msgclass PaymentHash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentHash").msgclass ListInvoiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceRequest").msgclass diff --git a/lib/grpc_services/rpc_services_pb.rb b/lib/grpc_services/rpc_services_pb.rb index 687f7ab..b2377e9 100644 --- a/lib/grpc_services/rpc_services_pb.rb +++ b/lib/grpc_services/rpc_services_pb.rb @@ -58,7 +58,7 @@ module Lnrpc # 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 + # neither target_conf, or sat_per_vbyte are set, then the internal wallet will # consult its fee model to determine a fee for the default confirmation # target. rpc :SendCoins, ::Lnrpc::SendCoinsRequest, ::Lnrpc::SendCoinsResponse @@ -75,7 +75,7 @@ module Lnrpc 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 + # outputs in parallel. If neither target_conf, or sat_per_vbyte are set, then # the internal wallet will consult its fee model to determine a fee for the # default confirmation target. rpc :SendMany, ::Lnrpc::SendManyRequest, ::Lnrpc::SendManyResponse diff --git a/lib/grpc_services/walletrpc/walletkit_pb.rb b/lib/grpc_services/walletrpc/walletkit_pb.rb index 6116f0a..490b3b4 100644 --- a/lib/grpc_services/walletrpc/walletkit_pb.rb +++ b/lib/grpc_services/walletrpc/walletkit_pb.rb @@ -10,6 +10,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "walletrpc.ListUnspentRequest" do optional :min_confs, :int32, 1 optional :max_confs, :int32, 2 + optional :account, :string, 3 end add_message "walletrpc.ListUnspentResponse" do repeated :utxos, :message, 1, "lnrpc.Utxo" @@ -17,6 +18,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "walletrpc.LeaseOutputRequest" do optional :id, :bytes, 1 optional :outpoint, :message, 2, "lnrpc.OutPoint" + optional :expiration_seconds, :uint64, 3 end add_message "walletrpc.LeaseOutputResponse" do optional :expiration, :uint64, 1 @@ -32,10 +34,46 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :key_family, :int32, 2 end add_message "walletrpc.AddrRequest" do + optional :account, :string, 1 end add_message "walletrpc.AddrResponse" do optional :addr, :string, 1 end + add_message "walletrpc.Account" do + optional :name, :string, 1 + optional :address_type, :enum, 2, "walletrpc.AddressType" + optional :extended_public_key, :string, 3 + optional :master_key_fingerprint, :bytes, 4 + optional :derivation_path, :string, 5 + optional :external_key_count, :uint32, 6 + optional :internal_key_count, :uint32, 7 + optional :watch_only, :bool, 8 + end + add_message "walletrpc.ListAccountsRequest" do + optional :name, :string, 1 + optional :address_type, :enum, 2, "walletrpc.AddressType" + end + add_message "walletrpc.ListAccountsResponse" do + repeated :accounts, :message, 1, "walletrpc.Account" + end + add_message "walletrpc.ImportAccountRequest" do + optional :name, :string, 1 + optional :extended_public_key, :string, 2 + optional :master_key_fingerprint, :bytes, 3 + optional :address_type, :enum, 4, "walletrpc.AddressType" + optional :dry_run, :bool, 5 + end + add_message "walletrpc.ImportAccountResponse" do + optional :account, :message, 1, "walletrpc.Account" + repeated :dry_run_external_addrs, :string, 2 + repeated :dry_run_internal_addrs, :string, 3 + end + add_message "walletrpc.ImportPublicKeyRequest" do + optional :public_key, :bytes, 1 + optional :address_type, :enum, 2, "walletrpc.AddressType" + end + add_message "walletrpc.ImportPublicKeyResponse" do + end add_message "walletrpc.Transaction" do optional :tx_hex, :bytes, 1 optional :label, :string, 2 @@ -68,6 +106,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :next_broadcast_height, :uint32, 6 optional :requested_conf_target, :uint32, 8 optional :requested_sat_per_byte, :uint32, 9 + optional :sat_per_vbyte, :uint64, 10 + optional :requested_sat_per_vbyte, :uint64, 11 optional :force, :bool, 7 end add_message "walletrpc.PendingSweepsRequest" do @@ -80,6 +120,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :target_conf, :uint32, 2 optional :sat_per_byte, :uint32, 3 optional :force, :bool, 4 + optional :sat_per_vbyte, :uint64, 5 end add_message "walletrpc.BumpFeeResponse" do end @@ -103,13 +144,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "walletrpc.LabelTransactionResponse" do end add_message "walletrpc.FundPsbtRequest" do + optional :account, :string, 5 + optional :min_confs, :int32, 6 + optional :spend_unconfirmed, :bool, 7 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 + optional :sat_per_vbyte, :uint64, 4 end end add_message "walletrpc.FundPsbtResponse" do @@ -128,11 +172,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do end add_message "walletrpc.FinalizePsbtRequest" do optional :funded_psbt, :bytes, 1 + optional :account, :string, 5 end add_message "walletrpc.FinalizePsbtResponse" do optional :signed_psbt, :bytes, 1 optional :raw_final_tx, :bytes, 2 end + add_message "walletrpc.ListLeasesRequest" do + end + add_message "walletrpc.ListLeasesResponse" do + repeated :locked_utxos, :message, 1, "walletrpc.UtxoLease" + end + add_enum "walletrpc.AddressType" do + value :UNKNOWN, 0 + value :WITNESS_PUBKEY_HASH, 1 + value :NESTED_WITNESS_PUBKEY_HASH, 2 + value :HYBRID_NESTED_WITNESS_PUBKEY_HASH, 3 + end add_enum "walletrpc.WitnessType" do value :UNKNOWN_WITNESS, 0 value :COMMITMENT_TIME_LOCK, 1 @@ -162,6 +218,13 @@ module Walletrpc KeyReq = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.KeyReq").msgclass AddrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrRequest").msgclass AddrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddrResponse").msgclass + Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Account").msgclass + ListAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAccountsRequest").msgclass + ListAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListAccountsResponse").msgclass + ImportAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountRequest").msgclass + ImportAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportAccountResponse").msgclass + ImportPublicKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportPublicKeyRequest").msgclass + ImportPublicKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ImportPublicKeyResponse").msgclass Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.Transaction").msgclass PublishResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.PublishResponse").msgclass SendOutputsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.SendOutputsRequest").msgclass @@ -184,5 +247,8 @@ module Walletrpc 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 + ListLeasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListLeasesRequest").msgclass + ListLeasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.ListLeasesResponse").msgclass + AddressType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("walletrpc.AddressType").enummodule 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 5707ae8..cca48d4 100644 --- a/lib/grpc_services/walletrpc/walletkit_services_pb.rb +++ b/lib/grpc_services/walletrpc/walletkit_services_pb.rb @@ -33,6 +33,9 @@ module Walletrpc # originally lock the output. rpc :ReleaseOutput, ::Walletrpc::ReleaseOutputRequest, ::Walletrpc::ReleaseOutputResponse # + # ListLeases lists all currently locked utxos. + rpc :ListLeases, ::Walletrpc::ListLeasesRequest, ::Walletrpc::ListLeasesResponse + # # 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. @@ -45,6 +48,43 @@ module Walletrpc # NextAddr returns the next unused address within the wallet. rpc :NextAddr, ::Walletrpc::AddrRequest, ::Walletrpc::AddrResponse # + # ListAccounts retrieves all accounts belonging to the wallet by default. A + # name and key scope filter can be provided to filter through all of the + # wallet accounts and return only those matching. + rpc :ListAccounts, ::Walletrpc::ListAccountsRequest, ::Walletrpc::ListAccountsResponse + # + # ImportAccount imports an account backed by an account extended public key. + # The master key fingerprint denotes the fingerprint of the root key + # corresponding to the account public key (also known as the key with + # derivation path m/). This may be required by some hardware wallets for + # proper identification and signing. + # + # The address type can usually be inferred from the key's version, but may be + # required for certain keys to map them into the proper scope. + # + # For BIP-0044 keys, an address type must be specified as we intend to not + # support importing BIP-0044 keys into the wallet using the legacy + # pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force + # the standard BIP-0049 derivation scheme, while a witness address type will + # force the standard BIP-0084 derivation scheme. + # + # For BIP-0049 keys, an address type must also be specified to make a + # distinction between the standard BIP-0049 address schema (nested witness + # pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys + # externally, witness pubkeys internally). + # + # NOTE: Events (deposits/spends) for keys derived from an account will only be + # detected by lnd if they happen after the import. Rescans to detect past + # events will be supported later on. + rpc :ImportAccount, ::Walletrpc::ImportAccountRequest, ::Walletrpc::ImportAccountResponse + # + # ImportPublicKey imports a public key as watch-only into the wallet. + # + # NOTE: Events (deposits/spends) for a key will only be detected by lnd if + # they happen after the import. Rescans to detect past events will be + # supported later on. + rpc :ImportPublicKey, ::Walletrpc::ImportPublicKeyRequest, ::Walletrpc::ImportPublicKeyResponse + # # 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 diff --git a/lib/grpc_services/wtclientrpc/wtclient_pb.rb b/lib/grpc_services/wtclientrpc/wtclient_pb.rb index 779d3b6..34bd874 100644 --- a/lib/grpc_services/wtclientrpc/wtclient_pb.rb +++ b/lib/grpc_services/wtclientrpc/wtclient_pb.rb @@ -26,6 +26,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :num_pending_backups, :uint32, 2 optional :max_backups, :uint32, 3 optional :sweep_sat_per_byte, :uint32, 4 + optional :sweep_sat_per_vbyte, :uint32, 5 end add_message "wtclientrpc.Tower" do optional :pubkey, :bytes, 1 @@ -55,6 +56,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "wtclientrpc.PolicyResponse" do optional :max_updates, :uint32, 1 optional :sweep_sat_per_byte, :uint32, 2 + optional :sweep_sat_per_vbyte, :uint32, 3 end add_enum "wtclientrpc.PolicyType" do value :LEGACY, 0