From 08dbb8e764a06f2f4c185ed5615bd7386d8daa04 Mon Sep 17 00:00:00 2001 From: Eric P Date: Sat, 20 Jul 2024 11:32:35 -0500 Subject: [PATCH 1/3] Ignore all target build directories --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4db42f6..6c95f71 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ # Generated by Cargo # will have compiled files and executables -/target/ +**/target # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html From 4d7588753d7edfac8908edbd59c44dba5adc381d Mon Sep 17 00:00:00 2001 From: Eric P Date: Sat, 20 Jul 2024 11:30:44 -0500 Subject: [PATCH 2/3] Added crate containing CLN GRPC bindings --- Cargo.toml | 1 + cln-rs/Cargo.toml | 14 + cln-rs/README.md | 6 + cln-rs/build.rs | 8 + cln-rs/protos/node.proto | 3626 ++++++++++ cln-rs/protos/primitives.proto | 147 + cln-rs/src/cln.rs | 11456 +++++++++++++++++++++++++++++++ cln-rs/src/lib.rs | 74 + 8 files changed, 15332 insertions(+) create mode 100644 cln-rs/Cargo.toml create mode 100644 cln-rs/README.md create mode 100644 cln-rs/build.rs create mode 100644 cln-rs/protos/node.proto create mode 100644 cln-rs/protos/primitives.proto create mode 100644 cln-rs/src/cln.rs create mode 100644 cln-rs/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index 884df2b..f910cdc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,7 @@ url = "2.2.1" drop-root = "0.1.1" dbif = { path = 'dbif'} lnd-rs = { path = "lnd-rs" } +cln-rs = { path = "cln-rs" } configure_me = "0.4.0" handlebars = "4.2.1" chrono = "0.4.35" diff --git a/cln-rs/Cargo.toml b/cln-rs/Cargo.toml new file mode 100644 index 0000000..db79004 --- /dev/null +++ b/cln-rs/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "cln-rs" +version = "0.1.0" +edition = "2021" + +[lib] +name = "cln_rs" + +[dependencies] +prost = "0.13.1" +tonic = { version = "0.12.1", features = ["tls"] } + +[build-dependencies] +tonic-build = "0.12.1" diff --git a/cln-rs/README.md b/cln-rs/README.md new file mode 100644 index 0000000..fb63816 --- /dev/null +++ b/cln-rs/README.md @@ -0,0 +1,6 @@ +### Note + +CLN provides a `cln-grpc` crate that provides the same definitions as this crate. I was not able to get CLN's crate to work, due to potential version +differences in tonic, prost, axum, or maybe another library we're using. + +As a result, I've built this crate using the proto files extracted from the `cln-gprc` crate. diff --git a/cln-rs/build.rs b/cln-rs/build.rs new file mode 100644 index 0000000..9b343b5 --- /dev/null +++ b/cln-rs/build.rs @@ -0,0 +1,8 @@ +// builds the src/cln.rs from the node.proto and primities.proto definitions +fn main() -> Result<(), std::io::Error> { + tonic_build::configure() + .build_client(true) + .build_server(false) + .out_dir("src") + .compile(&["protos/node.proto", "protos/primitives.proto"], &["protos"]) +} diff --git a/cln-rs/protos/node.proto b/cln-rs/protos/node.proto new file mode 100644 index 0000000..193dc8f --- /dev/null +++ b/cln-rs/protos/node.proto @@ -0,0 +1,3626 @@ +syntax = "proto3"; +package cln; + +// This file was automatically derived from the JSON-RPC schemas in +// `doc/schemas`. Do not edit this file manually as it would get +// overwritten. + +import "primitives.proto"; + +service Node { + rpc Getinfo(GetinfoRequest) returns (GetinfoResponse) {} + rpc ListPeers(ListpeersRequest) returns (ListpeersResponse) {} + rpc ListFunds(ListfundsRequest) returns (ListfundsResponse) {} + rpc SendPay(SendpayRequest) returns (SendpayResponse) {} + rpc ListChannels(ListchannelsRequest) returns (ListchannelsResponse) {} + rpc AddGossip(AddgossipRequest) returns (AddgossipResponse) {} + rpc AddPsbtOutput(AddpsbtoutputRequest) returns (AddpsbtoutputResponse) {} + rpc AutoCleanOnce(AutocleanonceRequest) returns (AutocleanonceResponse) {} + rpc AutoCleanStatus(AutocleanstatusRequest) returns (AutocleanstatusResponse) {} + rpc CheckMessage(CheckmessageRequest) returns (CheckmessageResponse) {} + rpc Close(CloseRequest) returns (CloseResponse) {} + rpc ConnectPeer(ConnectRequest) returns (ConnectResponse) {} + rpc CreateInvoice(CreateinvoiceRequest) returns (CreateinvoiceResponse) {} + rpc Datastore(DatastoreRequest) returns (DatastoreResponse) {} + rpc DatastoreUsage(DatastoreusageRequest) returns (DatastoreusageResponse) {} + rpc CreateOnion(CreateonionRequest) returns (CreateonionResponse) {} + rpc DelDatastore(DeldatastoreRequest) returns (DeldatastoreResponse) {} + rpc DelInvoice(DelinvoiceRequest) returns (DelinvoiceResponse) {} + rpc DevForgetChannel(DevforgetchannelRequest) returns (DevforgetchannelResponse) {} + rpc EmergencyRecover(EmergencyrecoverRequest) returns (EmergencyrecoverResponse) {} + rpc Recover(RecoverRequest) returns (RecoverResponse) {} + rpc RecoverChannel(RecoverchannelRequest) returns (RecoverchannelResponse) {} + rpc Invoice(InvoiceRequest) returns (InvoiceResponse) {} + rpc CreateInvoiceRequest(InvoicerequestRequest) returns (InvoicerequestResponse) {} + rpc DisableInvoiceRequest(DisableinvoicerequestRequest) returns (DisableinvoicerequestResponse) {} + rpc ListInvoiceRequests(ListinvoicerequestsRequest) returns (ListinvoicerequestsResponse) {} + rpc ListDatastore(ListdatastoreRequest) returns (ListdatastoreResponse) {} + rpc ListInvoices(ListinvoicesRequest) returns (ListinvoicesResponse) {} + rpc SendOnion(SendonionRequest) returns (SendonionResponse) {} + rpc ListSendPays(ListsendpaysRequest) returns (ListsendpaysResponse) {} + rpc ListTransactions(ListtransactionsRequest) returns (ListtransactionsResponse) {} + rpc MakeSecret(MakesecretRequest) returns (MakesecretResponse) {} + rpc Pay(PayRequest) returns (PayResponse) {} + rpc ListNodes(ListnodesRequest) returns (ListnodesResponse) {} + rpc WaitAnyInvoice(WaitanyinvoiceRequest) returns (WaitanyinvoiceResponse) {} + rpc WaitInvoice(WaitinvoiceRequest) returns (WaitinvoiceResponse) {} + rpc WaitSendPay(WaitsendpayRequest) returns (WaitsendpayResponse) {} + rpc NewAddr(NewaddrRequest) returns (NewaddrResponse) {} + rpc Withdraw(WithdrawRequest) returns (WithdrawResponse) {} + rpc KeySend(KeysendRequest) returns (KeysendResponse) {} + rpc FundPsbt(FundpsbtRequest) returns (FundpsbtResponse) {} + rpc SendPsbt(SendpsbtRequest) returns (SendpsbtResponse) {} + rpc SignPsbt(SignpsbtRequest) returns (SignpsbtResponse) {} + rpc UtxoPsbt(UtxopsbtRequest) returns (UtxopsbtResponse) {} + rpc TxDiscard(TxdiscardRequest) returns (TxdiscardResponse) {} + rpc TxPrepare(TxprepareRequest) returns (TxprepareResponse) {} + rpc TxSend(TxsendRequest) returns (TxsendResponse) {} + rpc ListPeerChannels(ListpeerchannelsRequest) returns (ListpeerchannelsResponse) {} + rpc ListClosedChannels(ListclosedchannelsRequest) returns (ListclosedchannelsResponse) {} + rpc DecodePay(DecodepayRequest) returns (DecodepayResponse) {} + rpc Decode(DecodeRequest) returns (DecodeResponse) {} + rpc DelPay(DelpayRequest) returns (DelpayResponse) {} + rpc DelForward(DelforwardRequest) returns (DelforwardResponse) {} + rpc DisableOffer(DisableofferRequest) returns (DisableofferResponse) {} + rpc Disconnect(DisconnectRequest) returns (DisconnectResponse) {} + rpc Feerates(FeeratesRequest) returns (FeeratesResponse) {} + rpc FetchInvoice(FetchinvoiceRequest) returns (FetchinvoiceResponse) {} + rpc FundChannel_Cancel(Fundchannel_cancelRequest) returns (Fundchannel_cancelResponse) {} + rpc FundChannel_Complete(Fundchannel_completeRequest) returns (Fundchannel_completeResponse) {} + rpc FundChannel(FundchannelRequest) returns (FundchannelResponse) {} + rpc FundChannel_Start(Fundchannel_startRequest) returns (Fundchannel_startResponse) {} + rpc GetLog(GetlogRequest) returns (GetlogResponse) {} + rpc FunderUpdate(FunderupdateRequest) returns (FunderupdateResponse) {} + rpc GetRoute(GetrouteRequest) returns (GetrouteResponse) {} + rpc ListForwards(ListforwardsRequest) returns (ListforwardsResponse) {} + rpc ListOffers(ListoffersRequest) returns (ListoffersResponse) {} + rpc ListPays(ListpaysRequest) returns (ListpaysResponse) {} + rpc ListHtlcs(ListhtlcsRequest) returns (ListhtlcsResponse) {} + rpc MultiFundChannel(MultifundchannelRequest) returns (MultifundchannelResponse) {} + rpc MultiWithdraw(MultiwithdrawRequest) returns (MultiwithdrawResponse) {} + rpc Offer(OfferRequest) returns (OfferResponse) {} + rpc OpenChannel_Abort(Openchannel_abortRequest) returns (Openchannel_abortResponse) {} + rpc OpenChannel_Bump(Openchannel_bumpRequest) returns (Openchannel_bumpResponse) {} + rpc OpenChannel_Init(Openchannel_initRequest) returns (Openchannel_initResponse) {} + rpc OpenChannel_Signed(Openchannel_signedRequest) returns (Openchannel_signedResponse) {} + rpc OpenChannel_Update(Openchannel_updateRequest) returns (Openchannel_updateResponse) {} + rpc Ping(PingRequest) returns (PingResponse) {} + rpc Plugin(PluginRequest) returns (PluginResponse) {} + rpc RenePayStatus(RenepaystatusRequest) returns (RenepaystatusResponse) {} + rpc RenePay(RenepayRequest) returns (RenepayResponse) {} + rpc ReserveInputs(ReserveinputsRequest) returns (ReserveinputsResponse) {} + rpc SendCustomMsg(SendcustommsgRequest) returns (SendcustommsgResponse) {} + rpc SendInvoice(SendinvoiceRequest) returns (SendinvoiceResponse) {} + rpc SetChannel(SetchannelRequest) returns (SetchannelResponse) {} + rpc SetConfig(SetconfigRequest) returns (SetconfigResponse) {} + rpc SetPsbtVersion(SetpsbtversionRequest) returns (SetpsbtversionResponse) {} + rpc SignInvoice(SigninvoiceRequest) returns (SigninvoiceResponse) {} + rpc SignMessage(SignmessageRequest) returns (SignmessageResponse) {} + rpc Splice_Init(Splice_initRequest) returns (Splice_initResponse) {} + rpc Splice_Signed(Splice_signedRequest) returns (Splice_signedResponse) {} + rpc Splice_Update(Splice_updateRequest) returns (Splice_updateResponse) {} + rpc UnreserveInputs(UnreserveinputsRequest) returns (UnreserveinputsResponse) {} + rpc UpgradeWallet(UpgradewalletRequest) returns (UpgradewalletResponse) {} + rpc WaitBlockHeight(WaitblockheightRequest) returns (WaitblockheightResponse) {} + rpc Wait(WaitRequest) returns (WaitResponse) {} + rpc ListConfigs(ListconfigsRequest) returns (ListconfigsResponse) {} + rpc Stop(StopRequest) returns (StopResponse) {} + rpc Help(HelpRequest) returns (HelpResponse) {} + rpc PreApproveKeysend(PreapprovekeysendRequest) returns (PreapprovekeysendResponse) {} + rpc PreApproveInvoice(PreapproveinvoiceRequest) returns (PreapproveinvoiceResponse) {} + rpc StaticBackup(StaticbackupRequest) returns (StaticbackupResponse) {} + rpc BkprChannelsApy(BkprchannelsapyRequest) returns (BkprchannelsapyResponse) {} + rpc BkprDumpIncomeCsv(BkprdumpincomecsvRequest) returns (BkprdumpincomecsvResponse) {} + rpc BkprInspect(BkprinspectRequest) returns (BkprinspectResponse) {} + rpc BkprListAccountEvents(BkprlistaccounteventsRequest) returns (BkprlistaccounteventsResponse) {} + rpc BkprListBalances(BkprlistbalancesRequest) returns (BkprlistbalancesResponse) {} + rpc BkprListIncome(BkprlistincomeRequest) returns (BkprlistincomeResponse) {} + rpc BlacklistRune(BlacklistruneRequest) returns (BlacklistruneResponse) {} + rpc CheckRune(CheckruneRequest) returns (CheckruneResponse) {} + rpc CreateRune(CreateruneRequest) returns (CreateruneResponse) {} + rpc ShowRunes(ShowrunesRequest) returns (ShowrunesResponse) {} + + rpc SubscribeBlockAdded(StreamBlockAddedRequest) returns (stream BlockAddedNotification) {} + rpc SubscribeChannelOpenFailed(StreamChannelOpenFailedRequest) returns (stream ChannelOpenFailedNotification) {} + rpc SubscribeChannelOpened(StreamChannelOpenedRequest) returns (stream ChannelOpenedNotification) {} + rpc SubscribeConnect(StreamConnectRequest) returns (stream PeerConnectNotification) {} + rpc SubscribeCustomMsg(StreamCustomMsgRequest) returns (stream CustomMsgNotification) {} +} + +message GetinfoRequest { +} + +message GetinfoResponse { + bytes id = 1; + optional string alias = 2; + bytes color = 3; + uint32 num_peers = 4; + uint32 num_pending_channels = 5; + uint32 num_active_channels = 6; + uint32 num_inactive_channels = 7; + string version = 8; + string lightning_dir = 9; + optional GetinfoOur_features our_features = 10; + uint32 blockheight = 11; + string network = 12; + Amount fees_collected_msat = 13; + repeated GetinfoAddress address = 14; + repeated GetinfoBinding binding = 15; + optional string warning_bitcoind_sync = 16; + optional string warning_lightningd_sync = 17; +} + +message GetinfoOur_features { + bytes init = 1; + bytes node = 2; + bytes channel = 3; + bytes invoice = 4; +} + +message GetinfoAddress { + // Getinfo.address[].type + enum GetinfoAddressType { + DNS = 0; + IPV4 = 1; + IPV6 = 2; + TORV2 = 3; + TORV3 = 4; + } + GetinfoAddressType item_type = 1; + uint32 port = 2; + optional string address = 3; +} + +message GetinfoBinding { + // Getinfo.binding[].type + enum GetinfoBindingType { + LOCAL_SOCKET = 0; + IPV4 = 1; + IPV6 = 2; + TORV2 = 3; + TORV3 = 4; + WEBSOCKET = 5; + } + GetinfoBindingType item_type = 1; + optional string address = 2; + optional uint32 port = 3; + optional string socket = 4; + optional string subtype = 5; +} + +message ListpeersRequest { + // ListPeers.level + enum ListpeersLevel { + IO = 0; + DEBUG = 1; + INFO = 2; + UNUSUAL = 3; + TRACE = 4; + } + optional bytes id = 1; + optional ListpeersLevel level = 2; +} + +message ListpeersResponse { + repeated ListpeersPeers peers = 1; +} + +message ListpeersPeers { + bytes id = 1; + bool connected = 2; + repeated ListpeersPeersLog log = 3; + repeated string netaddr = 5; + optional bytes features = 6; + optional string remote_addr = 7; + optional uint32 num_channels = 8; +} + +message ListpeersPeersLog { + // ListPeers.peers[].log[].type + enum ListpeersPeersLogType { + SKIPPED = 0; + BROKEN = 1; + UNUSUAL = 2; + INFO = 3; + DEBUG = 4; + IO_IN = 5; + IO_OUT = 6; + TRACE = 7; + } + ListpeersPeersLogType item_type = 1; + optional uint32 num_skipped = 2; + optional string time = 3; + optional string source = 4; + optional string log = 5; + optional bytes node_id = 6; + optional bytes data = 7; +} + +message ListfundsRequest { + optional bool spent = 1; +} + +message ListfundsResponse { + repeated ListfundsOutputs outputs = 1; + repeated ListfundsChannels channels = 2; +} + +message ListfundsOutputs { + // ListFunds.outputs[].status + enum ListfundsOutputsStatus { + UNCONFIRMED = 0; + CONFIRMED = 1; + SPENT = 2; + IMMATURE = 3; + } + bytes txid = 1; + uint32 output = 2; + Amount amount_msat = 3; + bytes scriptpubkey = 4; + optional string address = 5; + optional bytes redeemscript = 6; + ListfundsOutputsStatus status = 7; + optional uint32 blockheight = 8; + bool reserved = 9; + optional uint32 reserved_to_block = 10; +} + +message ListfundsChannels { + bytes peer_id = 1; + Amount our_amount_msat = 2; + Amount amount_msat = 3; + bytes funding_txid = 4; + uint32 funding_output = 5; + bool connected = 6; + ChannelState state = 7; + optional string short_channel_id = 8; + optional bytes channel_id = 9; +} + +message SendpayRequest { + repeated SendpayRoute route = 1; + bytes payment_hash = 2; + optional string label = 3; + optional string bolt11 = 5; + optional bytes payment_secret = 6; + optional uint64 partid = 7; + optional uint64 groupid = 9; + optional Amount amount_msat = 10; + optional bytes localinvreqid = 11; + optional bytes payment_metadata = 12; + optional string description = 13; +} + +message SendpayResponse { + // SendPay.status + enum SendpayStatus { + PENDING = 0; + COMPLETE = 1; + } + uint64 id = 1; + optional uint64 groupid = 2; + bytes payment_hash = 3; + SendpayStatus status = 4; + optional Amount amount_msat = 5; + optional bytes destination = 6; + uint64 created_at = 7; + Amount amount_sent_msat = 8; + optional string label = 9; + optional uint64 partid = 10; + optional string bolt11 = 11; + optional string bolt12 = 12; + optional bytes payment_preimage = 13; + optional string message = 14; + optional uint64 completed_at = 15; + optional uint64 created_index = 16; + optional uint64 updated_index = 17; +} + +message SendpayRoute { + bytes id = 2; + uint32 delay = 3; + string channel = 4; + Amount amount_msat = 5; +} + +message ListchannelsRequest { + optional string short_channel_id = 1; + optional bytes source = 2; + optional bytes destination = 3; +} + +message ListchannelsResponse { + repeated ListchannelsChannels channels = 1; +} + +message ListchannelsChannels { + bytes source = 1; + bytes destination = 2; + string short_channel_id = 3; + bool public = 4; + Amount amount_msat = 5; + uint32 message_flags = 6; + uint32 channel_flags = 7; + bool active = 8; + uint32 last_update = 9; + uint32 base_fee_millisatoshi = 10; + uint32 fee_per_millionth = 11; + uint32 delay = 12; + Amount htlc_minimum_msat = 13; + optional Amount htlc_maximum_msat = 14; + bytes features = 15; + uint32 direction = 16; +} + +message AddgossipRequest { + bytes message = 1; +} + +message AddgossipResponse { +} + +message AddpsbtoutputRequest { + Amount satoshi = 1; + optional uint32 locktime = 2; + optional string initialpsbt = 3; + optional string destination = 4; +} + +message AddpsbtoutputResponse { + string psbt = 1; + uint32 estimated_added_weight = 2; + uint32 outnum = 3; +} + +message AutocleanonceRequest { + AutocleanSubsystem subsystem = 1; + uint64 age = 2; +} + +message AutocleanonceResponse { + AutocleanonceAutoclean autoclean = 1; +} + +message AutocleanonceAutoclean { + optional AutocleanonceAutocleanSucceededforwards succeededforwards = 1; + optional AutocleanonceAutocleanFailedforwards failedforwards = 2; + optional AutocleanonceAutocleanSucceededpays succeededpays = 3; + optional AutocleanonceAutocleanFailedpays failedpays = 4; + optional AutocleanonceAutocleanPaidinvoices paidinvoices = 5; + optional AutocleanonceAutocleanExpiredinvoices expiredinvoices = 6; +} + +message AutocleanonceAutocleanSucceededforwards { + uint64 cleaned = 1; + uint64 uncleaned = 2; +} + +message AutocleanonceAutocleanFailedforwards { + uint64 cleaned = 1; + uint64 uncleaned = 2; +} + +message AutocleanonceAutocleanSucceededpays { + uint64 cleaned = 1; + uint64 uncleaned = 2; +} + +message AutocleanonceAutocleanFailedpays { + uint64 cleaned = 1; + uint64 uncleaned = 2; +} + +message AutocleanonceAutocleanPaidinvoices { + uint64 cleaned = 1; + uint64 uncleaned = 2; +} + +message AutocleanonceAutocleanExpiredinvoices { + uint64 cleaned = 1; + uint64 uncleaned = 2; +} + +message AutocleanstatusRequest { + optional AutocleanSubsystem subsystem = 1; +} + +message AutocleanstatusResponse { + AutocleanstatusAutoclean autoclean = 1; +} + +message AutocleanstatusAutoclean { + optional AutocleanstatusAutocleanSucceededforwards succeededforwards = 1; + optional AutocleanstatusAutocleanFailedforwards failedforwards = 2; + optional AutocleanstatusAutocleanSucceededpays succeededpays = 3; + optional AutocleanstatusAutocleanFailedpays failedpays = 4; + optional AutocleanstatusAutocleanPaidinvoices paidinvoices = 5; + optional AutocleanstatusAutocleanExpiredinvoices expiredinvoices = 6; +} + +message AutocleanstatusAutocleanSucceededforwards { + bool enabled = 1; + uint64 cleaned = 2; + optional uint64 age = 3; +} + +message AutocleanstatusAutocleanFailedforwards { + bool enabled = 1; + uint64 cleaned = 2; + optional uint64 age = 3; +} + +message AutocleanstatusAutocleanSucceededpays { + bool enabled = 1; + uint64 cleaned = 2; + optional uint64 age = 3; +} + +message AutocleanstatusAutocleanFailedpays { + bool enabled = 1; + uint64 cleaned = 2; + optional uint64 age = 3; +} + +message AutocleanstatusAutocleanPaidinvoices { + bool enabled = 1; + uint64 cleaned = 2; + optional uint64 age = 3; +} + +message AutocleanstatusAutocleanExpiredinvoices { + bool enabled = 1; + uint64 cleaned = 2; + optional uint64 age = 3; +} + +message CheckmessageRequest { + string message = 1; + string zbase = 2; + optional bytes pubkey = 3; +} + +message CheckmessageResponse { + bool verified = 1; + bytes pubkey = 2; +} + +message CloseRequest { + string id = 1; + optional uint32 unilateraltimeout = 2; + optional string destination = 3; + optional string fee_negotiation_step = 4; + optional Outpoint wrong_funding = 5; + optional bool force_lease_closed = 6; + repeated Feerate feerange = 7; +} + +message CloseResponse { + // Close.type + enum CloseType { + MUTUAL = 0; + UNILATERAL = 1; + UNOPENED = 2; + } + CloseType item_type = 1; + optional bytes tx = 2; + optional bytes txid = 3; +} + +message ConnectRequest { + string id = 1; + optional string host = 2; + optional uint32 port = 3; +} + +message ConnectResponse { + // Connect.direction + enum ConnectDirection { + IN = 0; + OUT = 1; + } + bytes id = 1; + bytes features = 2; + ConnectDirection direction = 3; + ConnectAddress address = 4; +} + +message ConnectAddress { + // Connect.address.type + enum ConnectAddressType { + LOCAL_SOCKET = 0; + IPV4 = 1; + IPV6 = 2; + TORV2 = 3; + TORV3 = 4; + } + ConnectAddressType item_type = 1; + optional string socket = 2; + optional string address = 3; + optional uint32 port = 4; +} + +message CreateinvoiceRequest { + string invstring = 1; + string label = 2; + bytes preimage = 3; +} + +message CreateinvoiceResponse { + // CreateInvoice.status + enum CreateinvoiceStatus { + PAID = 0; + EXPIRED = 1; + UNPAID = 2; + } + string label = 1; + optional string bolt11 = 2; + optional string bolt12 = 3; + bytes payment_hash = 4; + optional Amount amount_msat = 5; + CreateinvoiceStatus status = 6; + string description = 7; + uint64 expires_at = 8; + optional uint64 pay_index = 9; + optional Amount amount_received_msat = 10; + optional uint64 paid_at = 11; + optional bytes payment_preimage = 12; + optional bytes local_offer_id = 13; + optional string invreq_payer_note = 15; + optional uint64 created_index = 16; + optional CreateinvoicePaid_outpoint paid_outpoint = 17; +} + +message CreateinvoicePaid_outpoint { + bytes txid = 1; + uint32 outnum = 2; +} + +message DatastoreRequest { + // Datastore.mode + enum DatastoreMode { + MUST_CREATE = 0; + MUST_REPLACE = 1; + CREATE_OR_REPLACE = 2; + MUST_APPEND = 3; + CREATE_OR_APPEND = 4; + } + optional bytes hex = 2; + optional DatastoreMode mode = 3; + optional uint64 generation = 4; + repeated string key = 5; + optional string string = 6; +} + +message DatastoreResponse { + optional uint64 generation = 2; + optional bytes hex = 3; + optional string string = 4; + repeated string key = 5; +} + +message DatastoreusageRequest { + repeated string key = 1; +} + +message DatastoreusageResponse { + DatastoreusageDatastoreusage datastoreusage = 1; +} + +message DatastoreusageDatastoreusage { + string key = 1; + uint64 total_bytes = 2; +} + +message CreateonionRequest { + repeated CreateonionHops hops = 1; + bytes assocdata = 2; + optional bytes session_key = 3; + optional uint32 onion_size = 4; +} + +message CreateonionResponse { + bytes onion = 1; + repeated bytes shared_secrets = 2; +} + +message CreateonionHops { + bytes pubkey = 1; + bytes payload = 2; +} + +message DeldatastoreRequest { + optional uint64 generation = 2; + repeated string key = 3; +} + +message DeldatastoreResponse { + optional uint64 generation = 2; + optional bytes hex = 3; + optional string string = 4; + repeated string key = 5; +} + +message DelinvoiceRequest { + // DelInvoice.status + enum DelinvoiceStatus { + PAID = 0; + EXPIRED = 1; + UNPAID = 2; + } + string label = 1; + DelinvoiceStatus status = 2; + optional bool desconly = 3; +} + +message DelinvoiceResponse { + // DelInvoice.status + enum DelinvoiceStatus { + PAID = 0; + EXPIRED = 1; + UNPAID = 2; + } + string label = 1; + optional string bolt11 = 2; + optional string bolt12 = 3; + optional Amount amount_msat = 4; + optional string description = 5; + bytes payment_hash = 6; + DelinvoiceStatus status = 7; + uint64 expires_at = 8; + optional bytes local_offer_id = 9; + optional string invreq_payer_note = 11; + optional uint64 created_index = 12; + optional uint64 updated_index = 13; + optional uint64 pay_index = 14; + optional Amount amount_received_msat = 15; + optional uint64 paid_at = 16; + optional bytes payment_preimage = 17; +} + +message DevforgetchannelRequest { + bytes id = 1; + optional string short_channel_id = 2; + optional bytes channel_id = 3; + optional bool force = 4; +} + +message DevforgetchannelResponse { + bool forced = 1; + bool funding_unspent = 2; + bytes funding_txid = 3; +} + +message EmergencyrecoverRequest { +} + +message EmergencyrecoverResponse { + repeated bytes stubs = 1; +} + +message RecoverRequest { + string hsmsecret = 1; +} + +message RecoverResponse { + // Recover.result + enum RecoverResult { + RECOVERY_RESTART_IN_PROGRESS = 0; + } + optional RecoverResult result = 1; +} + +message RecoverchannelRequest { + repeated bytes scb = 1; +} + +message RecoverchannelResponse { + repeated string stubs = 1; +} + +message InvoiceRequest { + string description = 2; + string label = 3; + repeated string fallbacks = 4; + optional bytes preimage = 5; + optional uint32 cltv = 6; + optional uint64 expiry = 7; + repeated string exposeprivatechannels = 8; + optional bool deschashonly = 9; + AmountOrAny amount_msat = 10; +} + +message InvoiceResponse { + string bolt11 = 1; + bytes payment_hash = 2; + bytes payment_secret = 3; + uint64 expires_at = 4; + optional string warning_capacity = 5; + optional string warning_offline = 6; + optional string warning_deadends = 7; + optional string warning_private_unused = 8; + optional string warning_mpp = 9; + optional uint64 created_index = 10; +} + +message InvoicerequestRequest { + Amount amount = 1; + string description = 2; + optional string issuer = 3; + optional string label = 4; + optional uint64 absolute_expiry = 5; + optional bool single_use = 6; +} + +message InvoicerequestResponse { + bytes invreq_id = 1; + bool active = 2; + bool single_use = 3; + string bolt12 = 4; + bool used = 5; + optional string label = 6; +} + +message DisableinvoicerequestRequest { + string invreq_id = 1; +} + +message DisableinvoicerequestResponse { + bytes invreq_id = 1; + bool active = 2; + bool single_use = 3; + string bolt12 = 4; + bool used = 5; + optional string label = 6; +} + +message ListinvoicerequestsRequest { + optional string invreq_id = 1; + optional bool active_only = 2; +} + +message ListinvoicerequestsResponse { + repeated ListinvoicerequestsInvoicerequests invoicerequests = 1; +} + +message ListinvoicerequestsInvoicerequests { + bytes invreq_id = 1; + bool active = 2; + bool single_use = 3; + string bolt12 = 4; + bool used = 5; + optional string label = 6; +} + +message ListdatastoreRequest { + repeated string key = 2; +} + +message ListdatastoreResponse { + repeated ListdatastoreDatastore datastore = 1; +} + +message ListdatastoreDatastore { + repeated string key = 1; + optional uint64 generation = 2; + optional bytes hex = 3; + optional string string = 4; +} + +message ListinvoicesRequest { + // ListInvoices.index + enum ListinvoicesIndex { + CREATED = 0; + UPDATED = 1; + } + optional string label = 1; + optional string invstring = 2; + optional bytes payment_hash = 3; + optional string offer_id = 4; + optional ListinvoicesIndex index = 5; + optional uint64 start = 6; + optional uint32 limit = 7; +} + +message ListinvoicesResponse { + repeated ListinvoicesInvoices invoices = 1; +} + +message ListinvoicesInvoices { + // ListInvoices.invoices[].status + enum ListinvoicesInvoicesStatus { + UNPAID = 0; + PAID = 1; + EXPIRED = 2; + } + string label = 1; + optional string description = 2; + bytes payment_hash = 3; + ListinvoicesInvoicesStatus status = 4; + uint64 expires_at = 5; + optional Amount amount_msat = 6; + optional string bolt11 = 7; + optional string bolt12 = 8; + optional bytes local_offer_id = 9; + optional uint64 pay_index = 11; + optional Amount amount_received_msat = 12; + optional uint64 paid_at = 13; + optional bytes payment_preimage = 14; + optional string invreq_payer_note = 15; + optional uint64 created_index = 16; + optional uint64 updated_index = 17; + optional ListinvoicesInvoicesPaid_outpoint paid_outpoint = 18; +} + +message ListinvoicesInvoicesPaid_outpoint { + bytes txid = 1; + uint32 outnum = 2; +} + +message SendonionRequest { + bytes onion = 1; + SendonionFirst_hop first_hop = 2; + bytes payment_hash = 3; + optional string label = 4; + repeated bytes shared_secrets = 5; + optional uint32 partid = 6; + optional string bolt11 = 7; + optional bytes destination = 9; + optional uint64 groupid = 11; + optional Amount amount_msat = 12; + optional bytes localinvreqid = 13; + optional string description = 14; +} + +message SendonionResponse { + // SendOnion.status + enum SendonionStatus { + PENDING = 0; + COMPLETE = 1; + } + uint64 id = 1; + bytes payment_hash = 2; + SendonionStatus status = 3; + optional Amount amount_msat = 4; + optional bytes destination = 5; + uint64 created_at = 6; + Amount amount_sent_msat = 7; + optional string label = 8; + optional string bolt11 = 9; + optional string bolt12 = 10; + optional bytes payment_preimage = 11; + optional string message = 12; + optional uint64 partid = 13; + optional uint64 created_index = 14; + optional uint64 updated_index = 15; +} + +message SendonionFirst_hop { + bytes id = 1; + Amount amount_msat = 2; + uint32 delay = 3; +} + +message ListsendpaysRequest { + // ListSendPays.status + enum ListsendpaysStatus { + PENDING = 0; + COMPLETE = 1; + FAILED = 2; + } + // ListSendPays.index + enum ListsendpaysIndex { + CREATED = 0; + UPDATED = 1; + } + optional string bolt11 = 1; + optional bytes payment_hash = 2; + optional ListsendpaysStatus status = 3; + optional ListsendpaysIndex index = 4; + optional uint64 start = 5; + optional uint32 limit = 6; +} + +message ListsendpaysResponse { + repeated ListsendpaysPayments payments = 1; +} + +message ListsendpaysPayments { + // ListSendPays.payments[].status + enum ListsendpaysPaymentsStatus { + PENDING = 0; + FAILED = 1; + COMPLETE = 2; + } + uint64 id = 1; + uint64 groupid = 2; + bytes payment_hash = 3; + ListsendpaysPaymentsStatus status = 4; + optional Amount amount_msat = 5; + optional bytes destination = 6; + uint64 created_at = 7; + Amount amount_sent_msat = 8; + optional string label = 9; + optional string bolt11 = 10; + optional string bolt12 = 11; + optional bytes payment_preimage = 12; + optional bytes erroronion = 13; + optional string description = 14; + optional uint64 partid = 15; + optional uint64 created_index = 16; + optional uint64 updated_index = 17; + optional uint64 completed_at = 18; +} + +message ListtransactionsRequest { +} + +message ListtransactionsResponse { + repeated ListtransactionsTransactions transactions = 1; +} + +message ListtransactionsTransactions { + bytes hash = 1; + bytes rawtx = 2; + uint32 blockheight = 3; + uint32 txindex = 4; + uint32 locktime = 7; + uint32 version = 8; + repeated ListtransactionsTransactionsInputs inputs = 9; + repeated ListtransactionsTransactionsOutputs outputs = 10; +} + +message ListtransactionsTransactionsInputs { + bytes txid = 1; + uint32 index = 2; + uint32 sequence = 3; +} + +message ListtransactionsTransactionsOutputs { + uint32 index = 1; + bytes scriptPubKey = 3; + Amount amount_msat = 6; +} + +message MakesecretRequest { + optional bytes hex = 1; + optional string string = 2; +} + +message MakesecretResponse { + bytes secret = 1; +} + +message PayRequest { + string bolt11 = 1; + optional string label = 3; + optional double maxfeepercent = 4; + optional uint32 retry_for = 5; + optional uint32 maxdelay = 6; + optional Amount exemptfee = 7; + optional double riskfactor = 8; + repeated string exclude = 10; + optional Amount maxfee = 11; + optional string description = 12; + optional Amount amount_msat = 13; + optional bytes localinvreqid = 14; + optional Amount partial_msat = 15; +} + +message PayResponse { + // Pay.status + enum PayStatus { + COMPLETE = 0; + PENDING = 1; + FAILED = 2; + } + bytes payment_preimage = 1; + optional bytes destination = 2; + bytes payment_hash = 3; + double created_at = 4; + uint32 parts = 5; + Amount amount_msat = 6; + Amount amount_sent_msat = 7; + optional string warning_partial_completion = 8; + PayStatus status = 9; +} + +message ListnodesRequest { + optional bytes id = 1; +} + +message ListnodesResponse { + repeated ListnodesNodes nodes = 1; +} + +message ListnodesNodes { + bytes nodeid = 1; + optional uint32 last_timestamp = 2; + optional string alias = 3; + optional bytes color = 4; + optional bytes features = 5; + repeated ListnodesNodesAddresses addresses = 6; + optional ListnodesNodesOption_will_fund option_will_fund = 7; +} + +message ListnodesNodesOption_will_fund { + Amount lease_fee_base_msat = 1; + uint32 lease_fee_basis = 2; + uint32 funding_weight = 3; + Amount channel_fee_max_base_msat = 4; + uint32 channel_fee_max_proportional_thousandths = 5; + bytes compact_lease = 6; +} + +message ListnodesNodesAddresses { + // ListNodes.nodes[].addresses[].type + enum ListnodesNodesAddressesType { + DNS = 0; + IPV4 = 1; + IPV6 = 2; + TORV2 = 3; + TORV3 = 4; + } + ListnodesNodesAddressesType item_type = 1; + uint32 port = 2; + optional string address = 3; +} + +message WaitanyinvoiceRequest { + optional uint64 lastpay_index = 1; + optional uint64 timeout = 2; +} + +message WaitanyinvoiceResponse { + // WaitAnyInvoice.status + enum WaitanyinvoiceStatus { + PAID = 0; + EXPIRED = 1; + } + string label = 1; + string description = 2; + bytes payment_hash = 3; + WaitanyinvoiceStatus status = 4; + uint64 expires_at = 5; + optional Amount amount_msat = 6; + optional string bolt11 = 7; + optional string bolt12 = 8; + optional uint64 pay_index = 9; + optional Amount amount_received_msat = 10; + optional uint64 paid_at = 11; + optional bytes payment_preimage = 12; + optional uint64 created_index = 13; + optional uint64 updated_index = 14; + optional WaitanyinvoicePaid_outpoint paid_outpoint = 15; +} + +message WaitanyinvoicePaid_outpoint { + bytes txid = 1; + uint32 outnum = 2; +} + +message WaitinvoiceRequest { + string label = 1; +} + +message WaitinvoiceResponse { + // WaitInvoice.status + enum WaitinvoiceStatus { + PAID = 0; + EXPIRED = 1; + } + string label = 1; + string description = 2; + bytes payment_hash = 3; + WaitinvoiceStatus status = 4; + uint64 expires_at = 5; + optional Amount amount_msat = 6; + optional string bolt11 = 7; + optional string bolt12 = 8; + optional uint64 pay_index = 9; + optional Amount amount_received_msat = 10; + optional uint64 paid_at = 11; + optional bytes payment_preimage = 12; + optional uint64 created_index = 13; + optional uint64 updated_index = 14; + optional WaitinvoicePaid_outpoint paid_outpoint = 15; +} + +message WaitinvoicePaid_outpoint { + bytes txid = 1; + uint32 outnum = 2; +} + +message WaitsendpayRequest { + bytes payment_hash = 1; + optional uint64 partid = 2; + optional uint32 timeout = 3; + optional uint64 groupid = 4; +} + +message WaitsendpayResponse { + // WaitSendPay.status + enum WaitsendpayStatus { + COMPLETE = 0; + } + uint64 id = 1; + optional uint64 groupid = 2; + bytes payment_hash = 3; + WaitsendpayStatus status = 4; + optional Amount amount_msat = 5; + optional bytes destination = 6; + uint64 created_at = 7; + Amount amount_sent_msat = 8; + optional string label = 9; + optional uint64 partid = 10; + optional string bolt11 = 11; + optional string bolt12 = 12; + optional bytes payment_preimage = 13; + optional double completed_at = 14; + optional uint64 created_index = 15; + optional uint64 updated_index = 16; +} + +message NewaddrRequest { + // NewAddr.addresstype + enum NewaddrAddresstype { + BECH32 = 0; + ALL = 2; + P2TR = 3; + } + optional NewaddrAddresstype addresstype = 1; +} + +message NewaddrResponse { + optional string bech32 = 1; + optional string p2tr = 3; +} + +message WithdrawRequest { + string destination = 1; + AmountOrAll satoshi = 2; + optional uint32 minconf = 3; + repeated Outpoint utxos = 4; + optional Feerate feerate = 5; +} + +message WithdrawResponse { + bytes tx = 1; + bytes txid = 2; + string psbt = 3; +} + +message KeysendRequest { + bytes destination = 1; + optional string label = 3; + optional double maxfeepercent = 4; + optional uint32 retry_for = 5; + optional uint32 maxdelay = 6; + optional Amount exemptfee = 7; + optional RoutehintList routehints = 8; + optional TlvStream extratlvs = 9; + Amount amount_msat = 10; +} + +message KeysendResponse { + // KeySend.status + enum KeysendStatus { + COMPLETE = 0; + } + bytes payment_preimage = 1; + optional bytes destination = 2; + bytes payment_hash = 3; + double created_at = 4; + uint32 parts = 5; + Amount amount_msat = 6; + Amount amount_sent_msat = 7; + optional string warning_partial_completion = 8; + KeysendStatus status = 9; +} + +message FundpsbtRequest { + AmountOrAll satoshi = 1; + Feerate feerate = 2; + uint32 startweight = 3; + optional uint32 minconf = 4; + optional uint32 reserve = 5; + optional uint32 locktime = 6; + optional uint32 min_witness_weight = 7; + optional bool excess_as_change = 8; + optional bool nonwrapped = 9; + optional bool opening_anchor_channel = 10; +} + +message FundpsbtResponse { + string psbt = 1; + uint32 feerate_per_kw = 2; + uint32 estimated_final_weight = 3; + Amount excess_msat = 4; + optional uint32 change_outnum = 5; + repeated FundpsbtReservations reservations = 6; +} + +message FundpsbtReservations { + bytes txid = 1; + uint32 vout = 2; + bool was_reserved = 3; + bool reserved = 4; + uint32 reserved_to_block = 5; +} + +message SendpsbtRequest { + string psbt = 1; + optional uint32 reserve = 2; +} + +message SendpsbtResponse { + bytes tx = 1; + bytes txid = 2; +} + +message SignpsbtRequest { + string psbt = 1; + repeated uint32 signonly = 2; +} + +message SignpsbtResponse { + string signed_psbt = 1; +} + +message UtxopsbtRequest { + AmountOrAll satoshi = 1; + Feerate feerate = 2; + uint32 startweight = 3; + repeated Outpoint utxos = 4; + optional uint32 reserve = 5; + optional uint32 locktime = 6; + optional uint32 min_witness_weight = 7; + optional bool reservedok = 8; + optional bool excess_as_change = 9; + optional bool opening_anchor_channel = 10; +} + +message UtxopsbtResponse { + string psbt = 1; + uint32 feerate_per_kw = 2; + uint32 estimated_final_weight = 3; + Amount excess_msat = 4; + optional uint32 change_outnum = 5; + repeated UtxopsbtReservations reservations = 6; +} + +message UtxopsbtReservations { + bytes txid = 1; + uint32 vout = 2; + bool was_reserved = 3; + bool reserved = 4; + uint32 reserved_to_block = 5; +} + +message TxdiscardRequest { + bytes txid = 1; +} + +message TxdiscardResponse { + bytes unsigned_tx = 1; + bytes txid = 2; +} + +message TxprepareRequest { + optional Feerate feerate = 2; + optional uint32 minconf = 3; + repeated Outpoint utxos = 4; + repeated OutputDesc outputs = 5; +} + +message TxprepareResponse { + string psbt = 1; + bytes unsigned_tx = 2; + bytes txid = 3; +} + +message TxsendRequest { + bytes txid = 1; +} + +message TxsendResponse { + string psbt = 1; + bytes tx = 2; + bytes txid = 3; +} + +message ListpeerchannelsRequest { + optional bytes id = 1; +} + +message ListpeerchannelsResponse { + repeated ListpeerchannelsChannels channels = 1; +} + +message ListpeerchannelsChannels { + // ListPeerChannels.channels[].state + enum ListpeerchannelsChannelsState { + OPENINGD = 0; + CHANNELD_AWAITING_LOCKIN = 1; + CHANNELD_NORMAL = 2; + CHANNELD_SHUTTING_DOWN = 3; + CLOSINGD_SIGEXCHANGE = 4; + CLOSINGD_COMPLETE = 5; + AWAITING_UNILATERAL = 6; + FUNDING_SPEND_SEEN = 7; + ONCHAIN = 8; + DUALOPEND_OPEN_INIT = 9; + DUALOPEND_AWAITING_LOCKIN = 10; + CHANNELD_AWAITING_SPLICE = 11; + DUALOPEND_OPEN_COMMITTED = 12; + DUALOPEND_OPEN_COMMIT_READY = 13; + } + bytes peer_id = 1; + bool peer_connected = 2; + ListpeerchannelsChannelsState state = 3; + optional bytes scratch_txid = 4; + optional ListpeerchannelsChannelsFeerate feerate = 6; + optional string owner = 7; + optional string short_channel_id = 8; + optional bytes channel_id = 9; + optional bytes funding_txid = 10; + optional uint32 funding_outnum = 11; + optional string initial_feerate = 12; + optional string last_feerate = 13; + optional string next_feerate = 14; + optional uint32 next_fee_step = 15; + repeated ListpeerchannelsChannelsInflight inflight = 16; + optional bytes close_to = 17; + optional bool private = 18; + ChannelSide opener = 19; + optional ChannelSide closer = 20; + optional ListpeerchannelsChannelsFunding funding = 22; + optional Amount to_us_msat = 23; + optional Amount min_to_us_msat = 24; + optional Amount max_to_us_msat = 25; + optional Amount total_msat = 26; + optional Amount fee_base_msat = 27; + optional uint32 fee_proportional_millionths = 28; + optional Amount dust_limit_msat = 29; + optional Amount max_total_htlc_in_msat = 30; + optional Amount their_reserve_msat = 31; + optional Amount our_reserve_msat = 32; + optional Amount spendable_msat = 33; + optional Amount receivable_msat = 34; + optional Amount minimum_htlc_in_msat = 35; + optional Amount minimum_htlc_out_msat = 36; + optional Amount maximum_htlc_out_msat = 37; + optional uint32 their_to_self_delay = 38; + optional uint32 our_to_self_delay = 39; + optional uint32 max_accepted_htlcs = 40; + optional ListpeerchannelsChannelsAlias alias = 41; + repeated string status = 43; + optional uint64 in_payments_offered = 44; + optional Amount in_offered_msat = 45; + optional uint64 in_payments_fulfilled = 46; + optional Amount in_fulfilled_msat = 47; + optional uint64 out_payments_offered = 48; + optional Amount out_offered_msat = 49; + optional uint64 out_payments_fulfilled = 50; + optional Amount out_fulfilled_msat = 51; + repeated ListpeerchannelsChannelsHtlcs htlcs = 52; + optional string close_to_addr = 53; + optional bool ignore_fee_limits = 54; + optional ListpeerchannelsChannelsUpdates updates = 55; + optional uint64 last_stable_connection = 56; + optional bool lost_state = 57; + optional bool reestablished = 58; + optional Amount last_tx_fee_msat = 59; + optional uint32 direction = 60; +} + +message ListpeerchannelsChannelsUpdates { + ListpeerchannelsChannelsUpdatesLocal local = 1; + optional ListpeerchannelsChannelsUpdatesRemote remote = 2; +} + +message ListpeerchannelsChannelsUpdatesLocal { + Amount htlc_minimum_msat = 1; + Amount htlc_maximum_msat = 2; + uint32 cltv_expiry_delta = 3; + Amount fee_base_msat = 4; + uint32 fee_proportional_millionths = 5; +} + +message ListpeerchannelsChannelsUpdatesRemote { + Amount htlc_minimum_msat = 1; + Amount htlc_maximum_msat = 2; + uint32 cltv_expiry_delta = 3; + Amount fee_base_msat = 4; + uint32 fee_proportional_millionths = 5; +} + +message ListpeerchannelsChannelsFeerate { + uint32 perkw = 1; + uint32 perkb = 2; +} + +message ListpeerchannelsChannelsInflight { + bytes funding_txid = 1; + uint32 funding_outnum = 2; + string feerate = 3; + Amount total_funding_msat = 4; + Amount our_funding_msat = 5; + optional bytes scratch_txid = 6; + optional sint64 splice_amount = 7; +} + +message ListpeerchannelsChannelsFunding { + optional Amount pushed_msat = 1; + Amount local_funds_msat = 2; + Amount remote_funds_msat = 3; + optional Amount fee_paid_msat = 4; + optional Amount fee_rcvd_msat = 5; +} + +message ListpeerchannelsChannelsAlias { + optional string local = 1; + optional string remote = 2; +} + +message ListpeerchannelsChannelsHtlcs { + // ListPeerChannels.channels[].htlcs[].direction + enum ListpeerchannelsChannelsHtlcsDirection { + IN = 0; + OUT = 1; + } + ListpeerchannelsChannelsHtlcsDirection direction = 1; + uint64 id = 2; + Amount amount_msat = 3; + uint32 expiry = 4; + bytes payment_hash = 5; + optional bool local_trimmed = 6; + optional string status = 7; + HtlcState state = 8; +} + +message ListclosedchannelsRequest { + optional bytes id = 1; +} + +message ListclosedchannelsResponse { + repeated ListclosedchannelsClosedchannels closedchannels = 1; +} + +message ListclosedchannelsClosedchannels { + // ListClosedChannels.closedchannels[].close_cause + enum ListclosedchannelsClosedchannelsClose_cause { + UNKNOWN = 0; + LOCAL = 1; + USER = 2; + REMOTE = 3; + PROTOCOL = 4; + ONCHAIN = 5; + } + optional bytes peer_id = 1; + bytes channel_id = 2; + optional string short_channel_id = 3; + optional ListclosedchannelsClosedchannelsAlias alias = 4; + ChannelSide opener = 5; + optional ChannelSide closer = 6; + bool private = 7; + uint64 total_local_commitments = 9; + uint64 total_remote_commitments = 10; + uint64 total_htlcs_sent = 11; + bytes funding_txid = 12; + uint32 funding_outnum = 13; + bool leased = 14; + optional Amount funding_fee_paid_msat = 15; + optional Amount funding_fee_rcvd_msat = 16; + optional Amount funding_pushed_msat = 17; + Amount total_msat = 18; + Amount final_to_us_msat = 19; + Amount min_to_us_msat = 20; + Amount max_to_us_msat = 21; + optional bytes last_commitment_txid = 22; + optional Amount last_commitment_fee_msat = 23; + ListclosedchannelsClosedchannelsClose_cause close_cause = 24; + optional uint64 last_stable_connection = 25; +} + +message ListclosedchannelsClosedchannelsAlias { + optional string local = 1; + optional string remote = 2; +} + +message DecodepayRequest { + string bolt11 = 1; + optional string description = 2; +} + +message DecodepayResponse { + string currency = 1; + uint64 created_at = 2; + uint64 expiry = 3; + bytes payee = 4; + optional Amount amount_msat = 5; + bytes payment_hash = 6; + string signature = 7; + optional string description = 8; + optional bytes description_hash = 9; + uint32 min_final_cltv_expiry = 10; + optional bytes payment_secret = 11; + optional bytes features = 12; + optional bytes payment_metadata = 13; + repeated DecodepayFallbacks fallbacks = 14; + repeated DecodepayExtra extra = 16; + optional DecodeRoutehintList routes = 17; +} + +message DecodepayFallbacks { + // DecodePay.fallbacks[].type + enum DecodepayFallbacksType { + P2PKH = 0; + P2SH = 1; + P2WPKH = 2; + P2WSH = 3; + P2TR = 4; + } + DecodepayFallbacksType item_type = 1; + optional string addr = 2; + bytes hex = 3; +} + +message DecodepayExtra { + string tag = 1; + string data = 2; +} + +message DecodeRequest { + string string = 1; +} + +message DecodeResponse { + // Decode.type + enum DecodeType { + BOLT12_OFFER = 0; + BOLT12_INVOICE = 1; + BOLT12_INVOICE_REQUEST = 2; + BOLT11_INVOICE = 3; + RUNE = 4; + EMERGENCY_RECOVER = 5; + } + DecodeType item_type = 1; + bool valid = 2; + optional bytes offer_id = 3; + repeated bytes offer_chains = 4; + optional bytes offer_metadata = 5; + optional string offer_currency = 6; + optional string warning_unknown_offer_currency = 7; + optional uint32 currency_minor_unit = 8; + optional uint64 offer_amount = 9; + optional Amount offer_amount_msat = 10; + optional string offer_description = 11; + optional string offer_issuer = 12; + optional bytes offer_features = 13; + optional uint64 offer_absolute_expiry = 14; + optional uint64 offer_quantity_max = 15; + repeated DecodeOffer_paths offer_paths = 16; + optional bytes offer_node_id = 17; + optional string warning_missing_offer_node_id = 20; + optional string warning_invalid_offer_description = 21; + optional string warning_missing_offer_description = 22; + optional string warning_invalid_offer_currency = 23; + optional string warning_invalid_offer_issuer = 24; + optional bytes invreq_metadata = 25; + optional bytes invreq_payer_id = 26; + optional bytes invreq_chain = 27; + optional Amount invreq_amount_msat = 28; + optional bytes invreq_features = 29; + optional uint64 invreq_quantity = 30; + optional string invreq_payer_note = 31; + optional uint32 invreq_recurrence_counter = 32; + optional uint32 invreq_recurrence_start = 33; + optional string warning_missing_invreq_metadata = 35; + optional string warning_missing_invreq_payer_id = 36; + optional string warning_invalid_invreq_payer_note = 37; + optional string warning_missing_invoice_request_signature = 38; + optional string warning_invalid_invoice_request_signature = 39; + optional uint64 invoice_created_at = 41; + optional uint32 invoice_relative_expiry = 42; + optional bytes invoice_payment_hash = 43; + optional Amount invoice_amount_msat = 44; + repeated DecodeInvoice_fallbacks invoice_fallbacks = 45; + optional bytes invoice_features = 46; + optional bytes invoice_node_id = 47; + optional uint64 invoice_recurrence_basetime = 48; + optional string warning_missing_invoice_paths = 50; + optional string warning_missing_invoice_blindedpay = 51; + optional string warning_missing_invoice_created_at = 52; + optional string warning_missing_invoice_payment_hash = 53; + optional string warning_missing_invoice_amount = 54; + optional string warning_missing_invoice_recurrence_basetime = 55; + optional string warning_missing_invoice_node_id = 56; + optional string warning_missing_invoice_signature = 57; + optional string warning_invalid_invoice_signature = 58; + repeated DecodeFallbacks fallbacks = 59; + optional uint64 created_at = 60; + optional uint64 expiry = 61; + optional bytes payee = 62; + optional bytes payment_hash = 63; + optional bytes description_hash = 64; + optional uint32 min_final_cltv_expiry = 65; + optional bytes payment_secret = 66; + optional bytes payment_metadata = 67; + repeated DecodeExtra extra = 69; + optional string unique_id = 70; + optional string version = 71; + optional string string = 72; + repeated DecodeRestrictions restrictions = 73; + optional string warning_rune_invalid_utf8 = 74; + optional bytes hex = 75; + optional bytes decrypted = 76; + optional string signature = 77; + optional string currency = 78; + optional Amount amount_msat = 79; + optional string description = 80; + optional bytes features = 81; + optional DecodeRoutehintList routes = 82; +} + +message DecodeOffer_paths { + optional bytes first_node_id = 1; + bytes blinding = 2; + optional uint32 first_scid_dir = 4; + optional string first_scid = 5; +} + +message DecodeOffer_recurrencePaywindow { + uint32 seconds_before = 1; + uint32 seconds_after = 2; + optional bool proportional_amount = 3; +} + +message DecodeInvoice_pathsPath { + bytes blinded_node_id = 1; + bytes encrypted_recipient_data = 2; +} + +message DecodeInvoice_fallbacks { + uint32 version = 1; + bytes hex = 2; + optional string address = 3; +} + +message DecodeFallbacks { + // Decode.fallbacks[].type + enum DecodeFallbacksType { + P2PKH = 0; + P2SH = 1; + P2WPKH = 2; + P2WSH = 3; + P2TR = 4; + } + optional string warning_invoice_fallbacks_version_invalid = 1; + DecodeFallbacksType item_type = 2; + optional string addr = 3; + bytes hex = 4; +} + +message DecodeExtra { + string tag = 1; + string data = 2; +} + +message DecodeRestrictions { + repeated string alternatives = 1; + string summary = 2; +} + +message DelpayRequest { + // DelPay.status + enum DelpayStatus { + COMPLETE = 0; + FAILED = 1; + } + bytes payment_hash = 1; + DelpayStatus status = 2; + optional uint64 partid = 3; + optional uint64 groupid = 4; +} + +message DelpayResponse { + repeated DelpayPayments payments = 1; +} + +message DelpayPayments { + // DelPay.payments[].status + enum DelpayPaymentsStatus { + PENDING = 0; + FAILED = 1; + COMPLETE = 2; + } + optional uint64 created_index = 1; + uint64 id = 2; + bytes payment_hash = 3; + DelpayPaymentsStatus status = 4; + Amount amount_sent_msat = 5; + optional uint64 partid = 6; + optional bytes destination = 7; + optional Amount amount_msat = 8; + uint64 created_at = 9; + optional uint64 updated_index = 10; + optional uint64 completed_at = 11; + optional uint64 groupid = 12; + optional bytes payment_preimage = 13; + optional string label = 14; + optional string bolt11 = 15; + optional string bolt12 = 16; + optional bytes erroronion = 17; +} + +message DelforwardRequest { + // DelForward.status + enum DelforwardStatus { + SETTLED = 0; + LOCAL_FAILED = 1; + FAILED = 2; + } + string in_channel = 1; + uint64 in_htlc_id = 2; + DelforwardStatus status = 3; +} + +message DelforwardResponse { +} + +message DisableofferRequest { + bytes offer_id = 1; +} + +message DisableofferResponse { + bytes offer_id = 1; + bool active = 2; + bool single_use = 3; + string bolt12 = 4; + bool used = 5; + optional string label = 6; +} + +message DisconnectRequest { + bytes id = 1; + optional bool force = 2; +} + +message DisconnectResponse { +} + +message FeeratesRequest { + // Feerates.style + enum FeeratesStyle { + PERKB = 0; + PERKW = 1; + } + FeeratesStyle style = 1; +} + +message FeeratesResponse { + optional string warning_missing_feerates = 1; + optional FeeratesPerkb perkb = 2; + optional FeeratesPerkw perkw = 3; + optional FeeratesOnchain_fee_estimates onchain_fee_estimates = 4; +} + +message FeeratesPerkb { + uint32 min_acceptable = 1; + uint32 max_acceptable = 2; + optional uint32 opening = 3; + optional uint32 mutual_close = 4; + optional uint32 unilateral_close = 5; + optional uint32 delayed_to_us = 6; + optional uint32 htlc_resolution = 7; + optional uint32 penalty = 8; + repeated FeeratesPerkbEstimates estimates = 9; + optional uint32 floor = 10; + optional uint32 unilateral_anchor_close = 11; +} + +message FeeratesPerkbEstimates { + uint32 blockcount = 1; + uint32 feerate = 2; + uint32 smoothed_feerate = 3; +} + +message FeeratesPerkw { + uint32 min_acceptable = 1; + uint32 max_acceptable = 2; + optional uint32 opening = 3; + optional uint32 mutual_close = 4; + optional uint32 unilateral_close = 5; + optional uint32 delayed_to_us = 6; + optional uint32 htlc_resolution = 7; + optional uint32 penalty = 8; + repeated FeeratesPerkwEstimates estimates = 9; + optional uint32 floor = 10; + optional uint32 unilateral_anchor_close = 11; +} + +message FeeratesPerkwEstimates { + uint32 blockcount = 1; + uint32 feerate = 2; + uint32 smoothed_feerate = 3; +} + +message FeeratesOnchain_fee_estimates { + uint64 opening_channel_satoshis = 1; + uint64 mutual_close_satoshis = 2; + uint64 unilateral_close_satoshis = 3; + uint64 htlc_timeout_satoshis = 4; + uint64 htlc_success_satoshis = 5; + optional uint64 unilateral_close_nonanchor_satoshis = 6; +} + +message FetchinvoiceRequest { + string offer = 1; + optional Amount amount_msat = 2; + optional uint64 quantity = 3; + optional uint64 recurrence_counter = 4; + optional double recurrence_start = 5; + optional string recurrence_label = 6; + optional double timeout = 7; + optional string payer_note = 8; +} + +message FetchinvoiceResponse { + string invoice = 1; + FetchinvoiceChanges changes = 2; + optional FetchinvoiceNext_period next_period = 3; +} + +message FetchinvoiceChanges { + optional string description_appended = 1; + optional string description = 2; + optional string vendor_removed = 3; + optional string vendor = 4; + optional Amount amount_msat = 5; +} + +message FetchinvoiceNext_period { + uint64 counter = 1; + uint64 starttime = 2; + uint64 endtime = 3; + uint64 paywindow_start = 4; + uint64 paywindow_end = 5; +} + +message Fundchannel_cancelRequest { + bytes id = 1; +} + +message Fundchannel_cancelResponse { + string cancelled = 1; +} + +message Fundchannel_completeRequest { + bytes id = 1; + string psbt = 2; +} + +message Fundchannel_completeResponse { + bytes channel_id = 1; + bool commitments_secured = 2; +} + +message FundchannelRequest { + AmountOrAll amount = 1; + optional Feerate feerate = 2; + optional bool announce = 3; + optional Amount push_msat = 5; + optional string close_to = 6; + optional Amount request_amt = 7; + optional string compact_lease = 8; + bytes id = 9; + optional uint32 minconf = 10; + repeated Outpoint utxos = 11; + optional uint32 mindepth = 12; + optional Amount reserve = 13; + repeated uint32 channel_type = 14; +} + +message FundchannelResponse { + bytes tx = 1; + bytes txid = 2; + uint32 outnum = 3; + bytes channel_id = 4; + optional bytes close_to = 5; + optional uint32 mindepth = 6; + optional FundchannelChannel_type channel_type = 7; +} + +message FundchannelChannel_type { + repeated uint32 bits = 1; + repeated ChannelTypeName names = 2; +} + +message Fundchannel_startRequest { + bytes id = 1; + Amount amount = 2; + optional Feerate feerate = 3; + optional bool announce = 4; + optional string close_to = 5; + optional Amount push_msat = 6; + optional uint32 mindepth = 7; + optional Amount reserve = 8; + repeated uint32 channel_type = 9; +} + +message Fundchannel_startResponse { + string funding_address = 1; + bytes scriptpubkey = 2; + optional Fundchannel_startChannel_type channel_type = 3; + optional bytes close_to = 4; + string warning_usage = 5; + optional uint32 mindepth = 6; +} + +message Fundchannel_startChannel_type { + repeated uint32 bits = 1; + repeated ChannelTypeName names = 2; +} + +message GetlogRequest { + // GetLog.level + enum GetlogLevel { + BROKEN = 0; + UNUSUAL = 1; + INFO = 2; + DEBUG = 3; + IO = 4; + TRACE = 5; + } + optional GetlogLevel level = 1; +} + +message GetlogResponse { + string created_at = 1; + uint32 bytes_used = 2; + uint32 bytes_max = 3; + repeated GetlogLog log = 4; +} + +message GetlogLog { + // GetLog.log[].type + enum GetlogLogType { + SKIPPED = 0; + BROKEN = 1; + UNUSUAL = 2; + INFO = 3; + DEBUG = 4; + IO_IN = 5; + IO_OUT = 6; + TRACE = 7; + } + GetlogLogType item_type = 1; + optional uint32 num_skipped = 2; + optional string time = 3; + optional string source = 4; + optional string log = 5; + optional bytes node_id = 6; + optional bytes data = 7; +} + +message FunderupdateRequest { + // FunderUpdate.policy + enum FunderupdatePolicy { + MATCH = 0; + AVAILABLE = 1; + FIXED = 2; + } + optional FunderupdatePolicy policy = 1; + optional Amount policy_mod = 2; + optional bool leases_only = 3; + optional Amount min_their_funding_msat = 4; + optional Amount max_their_funding_msat = 5; + optional Amount per_channel_min_msat = 6; + optional Amount per_channel_max_msat = 7; + optional Amount reserve_tank_msat = 8; + optional uint32 fuzz_percent = 9; + optional uint32 fund_probability = 10; + optional Amount lease_fee_base_msat = 11; + optional uint32 lease_fee_basis = 12; + optional uint32 funding_weight = 13; + optional Amount channel_fee_max_base_msat = 14; + optional uint32 channel_fee_max_proportional_thousandths = 15; + optional bytes compact_lease = 16; +} + +message FunderupdateResponse { + // FunderUpdate.policy + enum FunderupdatePolicy { + MATCH = 0; + AVAILABLE = 1; + FIXED = 2; + } + string summary = 1; + FunderupdatePolicy policy = 2; + uint32 policy_mod = 3; + bool leases_only = 4; + Amount min_their_funding_msat = 5; + Amount max_their_funding_msat = 6; + Amount per_channel_min_msat = 7; + Amount per_channel_max_msat = 8; + Amount reserve_tank_msat = 9; + uint32 fuzz_percent = 10; + uint32 fund_probability = 11; + optional Amount lease_fee_base_msat = 12; + optional uint32 lease_fee_basis = 13; + optional uint32 funding_weight = 14; + optional Amount channel_fee_max_base_msat = 15; + optional uint32 channel_fee_max_proportional_thousandths = 16; + optional bytes compact_lease = 17; +} + +message GetrouteRequest { + bytes id = 1; + uint64 riskfactor = 3; + optional uint32 cltv = 4; + optional bytes fromid = 5; + optional uint32 fuzzpercent = 6; + repeated string exclude = 7; + optional uint32 maxhops = 8; + Amount amount_msat = 9; +} + +message GetrouteResponse { + repeated GetrouteRoute route = 1; +} + +message GetrouteRoute { + // GetRoute.route[].style + enum GetrouteRouteStyle { + TLV = 0; + } + bytes id = 1; + string channel = 2; + uint32 direction = 3; + Amount amount_msat = 4; + uint32 delay = 5; + GetrouteRouteStyle style = 6; +} + +message ListforwardsRequest { + // ListForwards.status + enum ListforwardsStatus { + OFFERED = 0; + SETTLED = 1; + LOCAL_FAILED = 2; + FAILED = 3; + } + // ListForwards.index + enum ListforwardsIndex { + CREATED = 0; + UPDATED = 1; + } + optional ListforwardsStatus status = 1; + optional string in_channel = 2; + optional string out_channel = 3; + optional ListforwardsIndex index = 4; + optional uint64 start = 5; + optional uint32 limit = 6; +} + +message ListforwardsResponse { + repeated ListforwardsForwards forwards = 1; +} + +message ListforwardsForwards { + // ListForwards.forwards[].status + enum ListforwardsForwardsStatus { + OFFERED = 0; + SETTLED = 1; + LOCAL_FAILED = 2; + FAILED = 3; + } + // ListForwards.forwards[].style + enum ListforwardsForwardsStyle { + LEGACY = 0; + TLV = 1; + } + string in_channel = 1; + Amount in_msat = 2; + ListforwardsForwardsStatus status = 3; + double received_time = 4; + optional string out_channel = 5; + optional Amount fee_msat = 7; + optional Amount out_msat = 8; + optional ListforwardsForwardsStyle style = 9; + optional uint64 in_htlc_id = 10; + optional uint64 out_htlc_id = 11; + optional uint64 created_index = 12; + optional uint64 updated_index = 13; + optional double resolved_time = 14; + optional uint32 failcode = 15; + optional string failreason = 16; +} + +message ListoffersRequest { + optional bytes offer_id = 1; + optional bool active_only = 2; +} + +message ListoffersResponse { + repeated ListoffersOffers offers = 1; +} + +message ListoffersOffers { + bytes offer_id = 1; + bool active = 2; + bool single_use = 3; + string bolt12 = 4; + bool used = 5; + optional string label = 6; +} + +message ListpaysRequest { + // ListPays.status + enum ListpaysStatus { + PENDING = 0; + COMPLETE = 1; + FAILED = 2; + } + optional string bolt11 = 1; + optional bytes payment_hash = 2; + optional ListpaysStatus status = 3; +} + +message ListpaysResponse { + repeated ListpaysPays pays = 1; +} + +message ListpaysPays { + // ListPays.pays[].status + enum ListpaysPaysStatus { + PENDING = 0; + FAILED = 1; + COMPLETE = 2; + } + bytes payment_hash = 1; + ListpaysPaysStatus status = 2; + optional bytes destination = 3; + uint64 created_at = 4; + optional string label = 5; + optional string bolt11 = 6; + optional string bolt12 = 7; + optional Amount amount_msat = 8; + optional Amount amount_sent_msat = 9; + optional bytes erroronion = 10; + optional string description = 11; + optional uint64 completed_at = 12; + optional bytes preimage = 13; + optional uint64 number_of_parts = 14; +} + +message ListhtlcsRequest { + optional string id = 1; +} + +message ListhtlcsResponse { + repeated ListhtlcsHtlcs htlcs = 1; +} + +message ListhtlcsHtlcs { + // ListHtlcs.htlcs[].direction + enum ListhtlcsHtlcsDirection { + OUT = 0; + IN = 1; + } + string short_channel_id = 1; + uint64 id = 2; + uint32 expiry = 3; + Amount amount_msat = 4; + ListhtlcsHtlcsDirection direction = 5; + bytes payment_hash = 6; + HtlcState state = 7; +} + +message MultifundchannelRequest { + repeated MultifundchannelDestinations destinations = 1; + optional Feerate feerate = 2; + optional sint64 minconf = 3; + repeated Outpoint utxos = 4; + optional sint64 minchannels = 5; + optional Feerate commitment_feerate = 6; +} + +message MultifundchannelResponse { + bytes tx = 1; + bytes txid = 2; + repeated MultifundchannelChannel_ids channel_ids = 3; + repeated MultifundchannelFailed failed = 4; +} + +message MultifundchannelDestinations { + string id = 1; + AmountOrAll amount = 2; + optional bool announce = 3; + optional Amount push_msat = 4; + optional string close_to = 5; + optional Amount request_amt = 6; + optional string compact_lease = 7; + optional uint32 mindepth = 8; + optional Amount reserve = 9; +} + +message MultifundchannelChannel_ids { + bytes id = 1; + uint32 outnum = 2; + bytes channel_id = 3; + optional MultifundchannelChannel_idsChannel_type channel_type = 4; + optional bytes close_to = 5; +} + +message MultifundchannelChannel_idsChannel_type { + repeated uint32 bits = 1; + repeated ChannelTypeName names = 2; +} + +message MultifundchannelFailed { + // MultiFundChannel.failed[].method + enum MultifundchannelFailedMethod { + CONNECT = 0; + OPENCHANNEL_INIT = 1; + FUNDCHANNEL_START = 2; + FUNDCHANNEL_COMPLETE = 3; + } + bytes id = 1; + MultifundchannelFailedMethod method = 2; + MultifundchannelFailedError error = 3; +} + +message MultifundchannelFailedError { + sint64 code = 1; + string message = 2; +} + +message MultiwithdrawRequest { + repeated OutputDesc outputs = 1; + optional Feerate feerate = 2; + optional uint32 minconf = 3; + repeated Outpoint utxos = 4; +} + +message MultiwithdrawResponse { + bytes tx = 1; + bytes txid = 2; +} + +message OfferRequest { + string amount = 1; + optional string description = 2; + optional string issuer = 3; + optional string label = 4; + optional uint64 quantity_max = 5; + optional uint64 absolute_expiry = 6; + optional string recurrence = 7; + optional string recurrence_base = 8; + optional string recurrence_paywindow = 9; + optional uint32 recurrence_limit = 10; + optional bool single_use = 11; + optional bool recurrence_start_any_period = 12; +} + +message OfferResponse { + bytes offer_id = 1; + bool active = 2; + bool single_use = 3; + string bolt12 = 4; + bool used = 5; + bool created = 6; + optional string label = 7; +} + +message Openchannel_abortRequest { + bytes channel_id = 1; +} + +message Openchannel_abortResponse { + bytes channel_id = 1; + bool channel_canceled = 2; + string reason = 3; +} + +message Openchannel_bumpRequest { + bytes channel_id = 1; + string initialpsbt = 2; + optional Feerate funding_feerate = 3; + Amount amount = 4; +} + +message Openchannel_bumpResponse { + bytes channel_id = 1; + optional Openchannel_bumpChannel_type channel_type = 2; + string psbt = 3; + bool commitments_secured = 4; + uint64 funding_serial = 5; + optional bool requires_confirmed_inputs = 6; +} + +message Openchannel_bumpChannel_type { + repeated uint32 bits = 1; + repeated ChannelTypeName names = 2; +} + +message Openchannel_initRequest { + bytes id = 1; + string initialpsbt = 2; + optional Feerate commitment_feerate = 3; + optional Feerate funding_feerate = 4; + optional bool announce = 5; + optional string close_to = 6; + optional Amount request_amt = 7; + optional bytes compact_lease = 8; + repeated uint32 channel_type = 9; + Amount amount = 10; +} + +message Openchannel_initResponse { + bytes channel_id = 1; + string psbt = 2; + optional Openchannel_initChannel_type channel_type = 3; + bool commitments_secured = 4; + uint64 funding_serial = 5; + optional bool requires_confirmed_inputs = 6; +} + +message Openchannel_initChannel_type { + repeated uint32 bits = 1; + repeated ChannelTypeName names = 2; +} + +message Openchannel_signedRequest { + bytes channel_id = 1; + string signed_psbt = 2; +} + +message Openchannel_signedResponse { + bytes channel_id = 1; + bytes tx = 2; + bytes txid = 3; +} + +message Openchannel_updateRequest { + bytes channel_id = 1; + string psbt = 2; +} + +message Openchannel_updateResponse { + bytes channel_id = 1; + optional Openchannel_updateChannel_type channel_type = 2; + string psbt = 3; + bool commitments_secured = 4; + uint32 funding_outnum = 5; + optional bytes close_to = 6; + optional bool requires_confirmed_inputs = 7; +} + +message Openchannel_updateChannel_type { + repeated uint32 bits = 1; + repeated ChannelTypeName names = 2; +} + +message PingRequest { + bytes id = 1; + optional uint32 len = 2; + optional uint32 pongbytes = 3; +} + +message PingResponse { + uint32 totlen = 1; +} + +message PluginRequest { + PluginSubcommand subcommand = 1; + optional string plugin = 2; + optional string directory = 3; + repeated string options = 4; +} + +message PluginResponse { + PluginSubcommand command = 1; + repeated PluginPlugins plugins = 2; + optional string result = 3; +} + +message PluginPlugins { + string name = 1; + bool active = 2; + bool dynamic = 3; +} + +message RenepaystatusRequest { + optional string invstring = 1; +} + +message RenepaystatusResponse { + repeated RenepaystatusPaystatus paystatus = 1; +} + +message RenepaystatusPaystatus { + // RenePayStatus.paystatus[].status + enum RenepaystatusPaystatusStatus { + COMPLETE = 0; + PENDING = 1; + FAILED = 2; + } + string bolt11 = 1; + optional bytes payment_preimage = 2; + bytes payment_hash = 3; + double created_at = 4; + uint32 groupid = 5; + optional uint32 parts = 6; + Amount amount_msat = 7; + optional Amount amount_sent_msat = 8; + RenepaystatusPaystatusStatus status = 9; + optional bytes destination = 10; + repeated string notes = 11; +} + +message RenepayRequest { + string invstring = 1; + optional Amount amount_msat = 2; + optional Amount maxfee = 3; + optional uint32 maxdelay = 4; + optional uint32 retry_for = 5; + optional string description = 6; + optional string label = 7; + optional bool dev_use_shadow = 8; +} + +message RenepayResponse { + // RenePay.status + enum RenepayStatus { + COMPLETE = 0; + PENDING = 1; + FAILED = 2; + } + bytes payment_preimage = 1; + bytes payment_hash = 2; + double created_at = 3; + uint32 parts = 4; + Amount amount_msat = 5; + Amount amount_sent_msat = 6; + RenepayStatus status = 7; + optional bytes destination = 8; +} + +message ReserveinputsRequest { + string psbt = 1; + optional bool exclusive = 2; + optional uint32 reserve = 3; +} + +message ReserveinputsResponse { + repeated ReserveinputsReservations reservations = 1; +} + +message ReserveinputsReservations { + bytes txid = 1; + uint32 vout = 2; + bool was_reserved = 3; + bool reserved = 4; + uint32 reserved_to_block = 5; +} + +message SendcustommsgRequest { + bytes node_id = 1; + bytes msg = 2; +} + +message SendcustommsgResponse { + string status = 1; +} + +message SendinvoiceRequest { + string invreq = 1; + string label = 2; + optional Amount amount_msat = 3; + optional uint32 timeout = 4; + optional uint64 quantity = 5; +} + +message SendinvoiceResponse { + // SendInvoice.status + enum SendinvoiceStatus { + UNPAID = 0; + PAID = 1; + EXPIRED = 2; + } + string label = 1; + string description = 2; + bytes payment_hash = 3; + SendinvoiceStatus status = 4; + uint64 expires_at = 5; + optional Amount amount_msat = 6; + optional string bolt12 = 7; + optional uint64 created_index = 8; + optional uint64 updated_index = 9; + optional uint64 pay_index = 10; + optional Amount amount_received_msat = 11; + optional uint64 paid_at = 12; + optional bytes payment_preimage = 13; +} + +message SetchannelRequest { + string id = 1; + optional Amount feebase = 2; + optional uint32 feeppm = 3; + optional Amount htlcmin = 4; + optional Amount htlcmax = 5; + optional uint32 enforcedelay = 6; + optional bool ignorefeelimits = 7; +} + +message SetchannelResponse { + repeated SetchannelChannels channels = 1; +} + +message SetchannelChannels { + bytes peer_id = 1; + bytes channel_id = 2; + optional string short_channel_id = 3; + Amount fee_base_msat = 4; + uint32 fee_proportional_millionths = 5; + Amount minimum_htlc_out_msat = 6; + optional string warning_htlcmin_too_low = 7; + Amount maximum_htlc_out_msat = 8; + optional string warning_htlcmax_too_high = 9; + optional bool ignore_fee_limits = 10; +} + +message SetconfigRequest { + string config = 1; + optional string val = 2; +} + +message SetconfigResponse { + SetconfigConfig config = 1; +} + +message SetconfigConfig { + string config = 1; + string source = 2; + optional string plugin = 3; + bool dynamic = 4; + optional bool set = 5; + optional string value_str = 6; + optional Amount value_msat = 7; + optional sint64 value_int = 8; + optional bool value_bool = 9; +} + +message SetpsbtversionRequest { + string psbt = 1; + uint32 version = 2; +} + +message SetpsbtversionResponse { + string psbt = 1; +} + +message SigninvoiceRequest { + string invstring = 1; +} + +message SigninvoiceResponse { + string bolt11 = 1; +} + +message SignmessageRequest { + string message = 1; +} + +message SignmessageResponse { + bytes signature = 1; + bytes recid = 2; + string zbase = 3; +} + +message Splice_initRequest { + bytes channel_id = 1; + sint64 relative_amount = 2; + optional string initialpsbt = 3; + optional uint32 feerate_per_kw = 4; + optional bool force_feerate = 5; +} + +message Splice_initResponse { + string psbt = 1; +} + +message Splice_signedRequest { + bytes channel_id = 1; + string psbt = 2; + optional bool sign_first = 3; +} + +message Splice_signedResponse { + bytes tx = 1; + bytes txid = 2; + optional uint32 outnum = 3; +} + +message Splice_updateRequest { + bytes channel_id = 1; + string psbt = 2; +} + +message Splice_updateResponse { + string psbt = 1; + bool commitments_secured = 2; +} + +message UnreserveinputsRequest { + string psbt = 1; + optional uint32 reserve = 2; +} + +message UnreserveinputsResponse { + repeated UnreserveinputsReservations reservations = 1; +} + +message UnreserveinputsReservations { + bytes txid = 1; + uint32 vout = 2; + bool was_reserved = 3; + bool reserved = 4; + optional uint32 reserved_to_block = 5; +} + +message UpgradewalletRequest { + optional Feerate feerate = 1; + optional bool reservedok = 2; +} + +message UpgradewalletResponse { + optional uint64 upgraded_outs = 1; + optional string psbt = 2; + optional bytes tx = 3; + optional bytes txid = 4; +} + +message WaitblockheightRequest { + uint32 blockheight = 1; + optional uint32 timeout = 2; +} + +message WaitblockheightResponse { + uint32 blockheight = 1; +} + +message WaitRequest { + // Wait.subsystem + enum WaitSubsystem { + INVOICES = 0; + FORWARDS = 1; + SENDPAYS = 2; + } + // Wait.indexname + enum WaitIndexname { + CREATED = 0; + UPDATED = 1; + DELETED = 2; + } + WaitSubsystem subsystem = 1; + WaitIndexname indexname = 2; + uint64 nextvalue = 3; +} + +message WaitResponse { + // Wait.subsystem + enum WaitSubsystem { + INVOICES = 0; + FORWARDS = 1; + SENDPAYS = 2; + } + WaitSubsystem subsystem = 1; + optional uint64 created = 2; + optional uint64 updated = 3; + optional uint64 deleted = 4; + optional WaitDetails details = 5; +} + +message WaitDetails { + // Wait.details.status + enum WaitDetailsStatus { + UNPAID = 0; + PAID = 1; + EXPIRED = 2; + PENDING = 3; + FAILED = 4; + COMPLETE = 5; + OFFERED = 6; + SETTLED = 7; + LOCAL_FAILED = 8; + } + optional WaitDetailsStatus status = 1; + optional string label = 2; + optional string description = 3; + optional string bolt11 = 4; + optional string bolt12 = 5; + optional uint64 partid = 6; + optional uint64 groupid = 7; + optional bytes payment_hash = 8; + optional string in_channel = 9; + optional uint64 in_htlc_id = 10; + optional Amount in_msat = 11; + optional string out_channel = 12; +} + +message ListconfigsRequest { + optional string config = 1; +} + +message ListconfigsResponse { + optional ListconfigsConfigs configs = 1; + repeated ListconfigsPlugins plugins = 3; + repeated ListconfigsImportantplugins important_plugins = 4; + optional string conf = 5; + optional string lightning_dir = 6; + optional string network = 7; + optional bool allow_deprecated_apis = 8; + optional string rpc_file = 9; + repeated string disable_plugin = 10; + optional string bookkeeper_dir = 11; + optional string bookkeeper_db = 12; + optional bool always_use_proxy = 13; + optional bool daemon = 14; + optional string wallet = 15; + optional bool large_channels = 16; + optional bool experimental_dual_fund = 17; + optional bool experimental_splicing = 18; + optional bool experimental_onion_messages = 19; + optional bool experimental_offers = 20; + optional bool experimental_shutdown_wrong_funding = 21; + optional bool experimental_peer_storage = 22; + optional bool experimental_quiesce = 23; + optional bool experimental_upgrade_protocol = 24; + optional bool invoices_onchain_fallback = 25; + optional bool database_upgrade = 26; + optional bytes rgb = 27; + optional string alias = 28; + optional string pid_file = 29; + optional bool ignore_fee_limits = 30; + optional uint32 watchtime_blocks = 31; + optional uint32 max_locktime_blocks = 32; + optional uint32 funding_confirms = 33; + optional uint32 cltv_delta = 34; + optional uint32 cltv_final = 35; + optional uint32 commit_time = 36; + optional uint32 fee_base = 37; + optional sint64 rescan = 38; + optional uint32 fee_per_satoshi = 39; + optional uint32 max_concurrent_htlcs = 40; + optional Amount htlc_minimum_msat = 41; + optional Amount htlc_maximum_msat = 42; + optional Amount max_dust_htlc_exposure_msat = 43; + optional uint64 min_capacity_sat = 44; + optional string addr = 45; + optional string announce_addr = 46; + optional string bind_addr = 47; + optional bool offline = 48; + optional bool autolisten = 49; + optional string proxy = 50; + optional bool disable_dns = 51; + optional string announce_addr_discovered = 52; + optional sint64 announce_addr_discovered_port = 53; + optional bool encrypted_hsm = 54; + optional string rpc_file_mode = 55; + optional string log_level = 56; + optional string log_prefix = 57; + optional string log_file = 58; + optional bool log_timestamps = 59; + optional string force_feerates = 60; + optional string subdaemon = 61; + optional bool fetchinvoice_noconnect = 62; + optional string accept_htlc_tlv_types = 63; + optional string tor_service_password = 64; + optional bool dev_allowdustreserve = 65; + optional bool announce_addr_dns = 66; + optional bool require_confirmed_inputs = 67; + optional bool developer = 68; + optional uint64 commit_fee = 69; + optional Amount min_emergency_msat = 70; + optional uint32 commit_feerate_offset = 71; +} + +message ListconfigsConfigs { + optional ListconfigsConfigsConf conf = 1; + optional ListconfigsConfigsDeveloper developer = 2; + optional ListconfigsConfigsClearplugins clear_plugins = 3; + optional ListconfigsConfigsDisablempp disable_mpp = 4; + optional ListconfigsConfigsMainnet mainnet = 5; + optional ListconfigsConfigsRegtest regtest = 6; + optional ListconfigsConfigsSignet signet = 7; + optional ListconfigsConfigsTestnet testnet = 8; + optional ListconfigsConfigsImportantplugin important_plugin = 9; + optional ListconfigsConfigsPlugin plugin = 10; + optional ListconfigsConfigsPlugindir plugin_dir = 11; + optional ListconfigsConfigsLightningdir lightning_dir = 12; + optional ListconfigsConfigsNetwork network = 13; + optional ListconfigsConfigsAllowdeprecatedapis allow_deprecated_apis = 14; + optional ListconfigsConfigsRpcfile rpc_file = 15; + optional ListconfigsConfigsDisableplugin disable_plugin = 16; + optional ListconfigsConfigsAlwaysuseproxy always_use_proxy = 17; + optional ListconfigsConfigsDaemon daemon = 18; + optional ListconfigsConfigsWallet wallet = 19; + optional ListconfigsConfigsLargechannels large_channels = 20; + optional ListconfigsConfigsExperimentaldualfund experimental_dual_fund = 21; + optional ListconfigsConfigsExperimentalsplicing experimental_splicing = 22; + optional ListconfigsConfigsExperimentalonionmessages experimental_onion_messages = 23; + optional ListconfigsConfigsExperimentaloffers experimental_offers = 24; + optional ListconfigsConfigsExperimentalshutdownwrongfunding experimental_shutdown_wrong_funding = 25; + optional ListconfigsConfigsExperimentalpeerstorage experimental_peer_storage = 26; + optional ListconfigsConfigsExperimentalanchors experimental_anchors = 27; + optional ListconfigsConfigsDatabaseupgrade database_upgrade = 28; + optional ListconfigsConfigsRgb rgb = 29; + optional ListconfigsConfigsAlias alias = 30; + optional ListconfigsConfigsPidfile pid_file = 31; + optional ListconfigsConfigsIgnorefeelimits ignore_fee_limits = 32; + optional ListconfigsConfigsWatchtimeblocks watchtime_blocks = 33; + optional ListconfigsConfigsMaxlocktimeblocks max_locktime_blocks = 34; + optional ListconfigsConfigsFundingconfirms funding_confirms = 35; + optional ListconfigsConfigsCltvdelta cltv_delta = 36; + optional ListconfigsConfigsCltvfinal cltv_final = 37; + optional ListconfigsConfigsCommittime commit_time = 38; + optional ListconfigsConfigsFeebase fee_base = 39; + optional ListconfigsConfigsRescan rescan = 40; + optional ListconfigsConfigsFeepersatoshi fee_per_satoshi = 41; + optional ListconfigsConfigsMaxconcurrenthtlcs max_concurrent_htlcs = 42; + optional ListconfigsConfigsHtlcminimummsat htlc_minimum_msat = 43; + optional ListconfigsConfigsHtlcmaximummsat htlc_maximum_msat = 44; + optional ListconfigsConfigsMaxdusthtlcexposuremsat max_dust_htlc_exposure_msat = 45; + optional ListconfigsConfigsMincapacitysat min_capacity_sat = 46; + optional ListconfigsConfigsAddr addr = 47; + optional ListconfigsConfigsAnnounceaddr announce_addr = 48; + optional ListconfigsConfigsBindaddr bind_addr = 49; + optional ListconfigsConfigsOffline offline = 50; + optional ListconfigsConfigsAutolisten autolisten = 51; + optional ListconfigsConfigsProxy proxy = 52; + optional ListconfigsConfigsDisabledns disable_dns = 53; + optional ListconfigsConfigsAnnounceaddrdiscovered announce_addr_discovered = 54; + optional ListconfigsConfigsAnnounceaddrdiscoveredport announce_addr_discovered_port = 55; + optional ListconfigsConfigsEncryptedhsm encrypted_hsm = 56; + optional ListconfigsConfigsRpcfilemode rpc_file_mode = 57; + optional ListconfigsConfigsLoglevel log_level = 58; + optional ListconfigsConfigsLogprefix log_prefix = 59; + optional ListconfigsConfigsLogfile log_file = 60; + optional ListconfigsConfigsLogtimestamps log_timestamps = 61; + optional ListconfigsConfigsForcefeerates force_feerates = 62; + optional ListconfigsConfigsSubdaemon subdaemon = 63; + optional ListconfigsConfigsFetchinvoicenoconnect fetchinvoice_noconnect = 64; + optional ListconfigsConfigsAccepthtlctlvtypes accept_htlc_tlv_types = 65; + optional ListconfigsConfigsTorservicepassword tor_service_password = 66; + optional ListconfigsConfigsAnnounceaddrdns announce_addr_dns = 67; + optional ListconfigsConfigsRequireconfirmedinputs require_confirmed_inputs = 68; + optional ListconfigsConfigsCommitfee commit_fee = 69; + optional ListconfigsConfigsCommitfeerateoffset commit_feerate_offset = 70; +} + +message ListconfigsConfigsConf { + // ListConfigs.configs.conf.source + enum ListconfigsConfigsConfSource { + CMDLINE = 0; + } + string value_str = 1; + ListconfigsConfigsConfSource source = 2; +} + +message ListconfigsConfigsDeveloper { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsClearplugins { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsDisablempp { + bool set = 1; + string source = 2; + optional string plugin = 3; +} + +message ListconfigsConfigsMainnet { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsRegtest { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsSignet { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsTestnet { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsImportantplugin { + repeated string values_str = 1; + repeated string sources = 2; +} + +message ListconfigsConfigsPlugin { + repeated string values_str = 1; + repeated string sources = 2; +} + +message ListconfigsConfigsPlugindir { + repeated string values_str = 1; + repeated string sources = 2; +} + +message ListconfigsConfigsLightningdir { + string value_str = 1; + string source = 2; +} + +message ListconfigsConfigsNetwork { + string value_str = 1; + string source = 2; +} + +message ListconfigsConfigsAllowdeprecatedapis { + bool value_bool = 1; + string source = 2; +} + +message ListconfigsConfigsRpcfile { + string value_str = 1; + string source = 2; +} + +message ListconfigsConfigsDisableplugin { + repeated string values_str = 1; + repeated string sources = 2; +} + +message ListconfigsConfigsAlwaysuseproxy { + bool value_bool = 1; + string source = 2; +} + +message ListconfigsConfigsDaemon { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsWallet { + string value_str = 1; + string source = 2; +} + +message ListconfigsConfigsLargechannels { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsExperimentaldualfund { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsExperimentalsplicing { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsExperimentalonionmessages { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsExperimentaloffers { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsExperimentalshutdownwrongfunding { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsExperimentalpeerstorage { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsExperimentalanchors { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsDatabaseupgrade { + bool value_bool = 1; + string source = 2; +} + +message ListconfigsConfigsRgb { + bytes value_str = 1; + string source = 2; +} + +message ListconfigsConfigsAlias { + string value_str = 1; + string source = 2; +} + +message ListconfigsConfigsPidfile { + string value_str = 1; + string source = 2; +} + +message ListconfigsConfigsIgnorefeelimits { + bool value_bool = 1; + string source = 2; +} + +message ListconfigsConfigsWatchtimeblocks { + uint32 value_int = 1; + string source = 2; +} + +message ListconfigsConfigsMaxlocktimeblocks { + uint32 value_int = 1; + string source = 2; +} + +message ListconfigsConfigsFundingconfirms { + uint32 value_int = 1; + string source = 2; +} + +message ListconfigsConfigsCltvdelta { + uint32 value_int = 1; + string source = 2; +} + +message ListconfigsConfigsCltvfinal { + uint32 value_int = 1; + string source = 2; +} + +message ListconfigsConfigsCommittime { + uint32 value_int = 1; + string source = 2; +} + +message ListconfigsConfigsFeebase { + uint32 value_int = 1; + string source = 2; +} + +message ListconfigsConfigsRescan { + sint64 value_int = 1; + string source = 2; +} + +message ListconfigsConfigsFeepersatoshi { + uint32 value_int = 1; + string source = 2; +} + +message ListconfigsConfigsMaxconcurrenthtlcs { + uint32 value_int = 1; + string source = 2; +} + +message ListconfigsConfigsHtlcminimummsat { + Amount value_msat = 1; + string source = 2; +} + +message ListconfigsConfigsHtlcmaximummsat { + Amount value_msat = 1; + string source = 2; +} + +message ListconfigsConfigsMaxdusthtlcexposuremsat { + Amount value_msat = 1; + string source = 2; +} + +message ListconfigsConfigsMincapacitysat { + uint64 value_int = 1; + string source = 2; + optional bool dynamic = 3; +} + +message ListconfigsConfigsAddr { + repeated string values_str = 1; + repeated string sources = 2; +} + +message ListconfigsConfigsAnnounceaddr { + repeated string values_str = 1; + repeated string sources = 2; +} + +message ListconfigsConfigsBindaddr { + repeated string values_str = 1; + repeated string sources = 2; +} + +message ListconfigsConfigsOffline { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsAutolisten { + bool value_bool = 1; + string source = 2; +} + +message ListconfigsConfigsProxy { + string value_str = 1; + string source = 2; +} + +message ListconfigsConfigsDisabledns { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsAnnounceaddrdiscovered { + // ListConfigs.configs.announce-addr-discovered.value_str + enum ListconfigsConfigsAnnounceaddrdiscoveredValue_str { + TRUE = 0; + FALSE = 1; + AUTO = 2; + } + ListconfigsConfigsAnnounceaddrdiscoveredValue_str value_str = 1; + string source = 2; +} + +message ListconfigsConfigsAnnounceaddrdiscoveredport { + uint32 value_int = 1; + string source = 2; +} + +message ListconfigsConfigsEncryptedhsm { + bool set = 1; + string source = 2; +} + +message ListconfigsConfigsRpcfilemode { + string value_str = 1; + string source = 2; +} + +message ListconfigsConfigsLoglevel { + string value_str = 1; + string source = 2; +} + +message ListconfigsConfigsLogprefix { + string value_str = 1; + string source = 2; +} + +message ListconfigsConfigsLogfile { + repeated string values_str = 1; + repeated string sources = 2; +} + +message ListconfigsConfigsLogtimestamps { + bool value_bool = 1; + string source = 2; +} + +message ListconfigsConfigsForcefeerates { + string value_str = 1; + string source = 2; +} + +message ListconfigsConfigsSubdaemon { + repeated string values_str = 1; + repeated string sources = 2; +} + +message ListconfigsConfigsFetchinvoicenoconnect { + bool set = 1; + string source = 2; + optional string plugin = 3; +} + +message ListconfigsConfigsAccepthtlctlvtypes { + string value_str = 1; + string source = 2; +} + +message ListconfigsConfigsTorservicepassword { + string value_str = 1; + string source = 2; +} + +message ListconfigsConfigsAnnounceaddrdns { + bool value_bool = 1; + string source = 2; +} + +message ListconfigsConfigsRequireconfirmedinputs { + bool value_bool = 1; + string source = 2; +} + +message ListconfigsConfigsCommitfee { + uint64 value_int = 1; + string source = 2; +} + +message ListconfigsConfigsCommitfeerateoffset { + uint32 value_int = 1; + string source = 2; +} + +message ListconfigsPlugins { + string path = 1; + string name = 2; + optional ListconfigsPluginsOptions options = 3; +} + +message ListconfigsPluginsOptions { +} + +message ListconfigsImportantplugins { + string path = 1; + string name = 2; + optional ListconfigsImportantpluginsOptions options = 3; +} + +message ListconfigsImportantpluginsOptions { +} + +message StopRequest { +} + +message StopResponse { + // Stop.result + enum StopResult { + SHUTDOWN_COMPLETE = 0; + } + optional StopResult result = 1; +} + +message HelpRequest { + optional string command = 1; +} + +message HelpResponse { + // Help.format-hint + enum HelpFormathint { + SIMPLE = 0; + } + repeated HelpHelp help = 1; + optional HelpFormathint format_hint = 2; +} + +message HelpHelp { + string command = 1; + string category = 2; + string description = 3; + string verbose = 4; +} + +message PreapprovekeysendRequest { + bytes destination = 1; + bytes payment_hash = 2; + Amount amount_msat = 3; +} + +message PreapprovekeysendResponse { +} + +message PreapproveinvoiceRequest { + string bolt11 = 1; +} + +message PreapproveinvoiceResponse { +} + +message StaticbackupRequest { +} + +message StaticbackupResponse { + repeated bytes scb = 1; +} + +message BkprchannelsapyRequest { + optional uint64 start_time = 1; + optional uint64 end_time = 2; +} + +message BkprchannelsapyResponse { + repeated BkprchannelsapyChannels_apy channels_apy = 1; +} + +message BkprchannelsapyChannels_apy { + string account = 1; + Amount routed_out_msat = 2; + Amount routed_in_msat = 3; + Amount lease_fee_paid_msat = 4; + Amount lease_fee_earned_msat = 5; + Amount pushed_out_msat = 6; + Amount pushed_in_msat = 7; + Amount our_start_balance_msat = 8; + Amount channel_start_balance_msat = 9; + Amount fees_out_msat = 10; + optional Amount fees_in_msat = 11; + string utilization_out = 12; + optional string utilization_out_initial = 13; + string utilization_in = 14; + optional string utilization_in_initial = 15; + string apy_out = 16; + optional string apy_out_initial = 17; + string apy_in = 18; + optional string apy_in_initial = 19; + string apy_total = 20; + optional string apy_total_initial = 21; + optional string apy_lease = 22; +} + +message BkprdumpincomecsvRequest { + string csv_format = 1; + optional string csv_file = 2; + optional bool consolidate_fees = 3; + optional uint64 start_time = 4; + optional uint64 end_time = 5; +} + +message BkprdumpincomecsvResponse { + // Bkpr-DumpIncomeCsv.csv_format + enum BkprdumpincomecsvCsv_format { + COINTRACKER = 0; + KOINLY = 1; + HARMONY = 2; + QUICKBOOKS = 3; + } + string csv_file = 1; + BkprdumpincomecsvCsv_format csv_format = 2; +} + +message BkprinspectRequest { + string account = 1; +} + +message BkprinspectResponse { + repeated BkprinspectTxs txs = 1; +} + +message BkprinspectTxs { + bytes txid = 1; + optional uint32 blockheight = 2; + Amount fees_paid_msat = 3; + repeated BkprinspectTxsOutputs outputs = 4; +} + +message BkprinspectTxsOutputs { + string account = 1; + uint32 outnum = 2; + Amount output_value_msat = 3; + string currency = 4; + optional Amount credit_msat = 5; + optional Amount debit_msat = 6; + optional string originating_account = 7; + optional string output_tag = 8; + optional string spend_tag = 9; + optional bytes spending_txid = 10; + optional bytes payment_id = 11; +} + +message BkprlistaccounteventsRequest { + optional string account = 1; +} + +message BkprlistaccounteventsResponse { + repeated BkprlistaccounteventsEvents events = 1; +} + +message BkprlistaccounteventsEvents { + // Bkpr-ListAccountEvents.events[].type + enum BkprlistaccounteventsEventsType { + ONCHAIN_FEE = 0; + CHAIN = 1; + CHANNEL = 2; + } + string account = 1; + BkprlistaccounteventsEventsType item_type = 2; + string tag = 3; + Amount credit_msat = 4; + Amount debit_msat = 5; + string currency = 6; + uint32 timestamp = 7; + optional string outpoint = 8; + optional uint32 blockheight = 9; + optional string origin = 10; + optional bytes payment_id = 11; + optional bytes txid = 12; + optional string description = 13; + optional Amount fees_msat = 14; + optional bool is_rebalance = 15; + optional uint32 part_id = 16; +} + +message BkprlistbalancesRequest { +} + +message BkprlistbalancesResponse { + repeated BkprlistbalancesAccounts accounts = 1; +} + +message BkprlistbalancesAccounts { + string account = 1; + repeated BkprlistbalancesAccountsBalances balances = 2; + optional bytes peer_id = 3; + optional bool we_opened = 4; + optional bool account_closed = 5; + optional bool account_resolved = 6; + optional uint32 resolved_at_block = 7; +} + +message BkprlistbalancesAccountsBalances { + Amount balance_msat = 1; + string coin_type = 2; +} + +message BkprlistincomeRequest { + optional bool consolidate_fees = 1; + optional uint32 start_time = 2; + optional uint32 end_time = 3; +} + +message BkprlistincomeResponse { + repeated BkprlistincomeIncome_events income_events = 1; +} + +message BkprlistincomeIncome_events { + string account = 1; + string tag = 2; + Amount credit_msat = 3; + Amount debit_msat = 4; + string currency = 5; + uint32 timestamp = 6; + optional string description = 7; + optional string outpoint = 8; + optional bytes txid = 9; + optional bytes payment_id = 10; +} + +message BlacklistruneRequest { + optional uint64 start = 1; + optional uint64 end = 2; +} + +message BlacklistruneResponse { + repeated BlacklistruneBlacklist blacklist = 1; +} + +message BlacklistruneBlacklist { + uint64 start = 1; + uint64 end = 2; +} + +message CheckruneRequest { + string rune = 1; + optional string nodeid = 2; + optional string method = 3; + repeated string params = 4; +} + +message CheckruneResponse { + bool valid = 1; +} + +message CreateruneRequest { + optional string rune = 1; + repeated string restrictions = 2; +} + +message CreateruneResponse { + string rune = 1; + string unique_id = 2; + optional string warning_unrestricted_rune = 3; +} + +message ShowrunesRequest { + optional string rune = 1; +} + +message ShowrunesResponse { + repeated ShowrunesRunes runes = 1; +} + +message ShowrunesRunes { + string rune = 1; + string unique_id = 2; + repeated ShowrunesRunesRestrictions restrictions = 3; + string restrictions_as_english = 4; + optional bool stored = 5; + optional bool blacklisted = 6; + optional double last_used = 7; + optional bool our_rune = 8; +} + +message ShowrunesRunesRestrictions { + repeated ShowrunesRunesRestrictionsAlternatives alternatives = 1; + string english = 2; +} + +message ShowrunesRunesRestrictionsAlternatives { + string fieldname = 1; + string value = 2; + string condition = 3; + string english = 4; +} + +message StreamBlockAddedRequest { +} + +message BlockAddedNotification { + bytes hash = 1; + uint32 height = 2; +} + +message StreamChannelOpenFailedRequest { +} + +message ChannelOpenFailedNotification { + bytes channel_id = 1; +} + +message StreamChannelOpenedRequest { +} + +message ChannelOpenedNotification { + bytes id = 1; + Amount funding_msat = 2; + bytes funding_txid = 3; + bool channel_ready = 4; +} + +message StreamConnectRequest { +} + +message PeerConnectNotification { + // connect.direction + enum PeerConnectDirection { + IN = 0; + OUT = 1; + } + bytes id = 1; + PeerConnectDirection direction = 2; + PeerConnectAddress address = 3; +} + +message PeerConnectAddress { + // connect.address.type + enum PeerConnectAddressType { + LOCAL_SOCKET = 0; + IPV4 = 1; + IPV6 = 2; + TORV2 = 3; + TORV3 = 4; + } + PeerConnectAddressType item_type = 1; + optional string socket = 2; + optional string address = 3; + optional uint32 port = 4; +} + +message StreamCustomMsgRequest { +} + +message CustomMsgNotification { + bytes peer_id = 1; + bytes payload = 2; +} diff --git a/cln-rs/protos/primitives.proto b/cln-rs/protos/primitives.proto new file mode 100644 index 0000000..8916b84 --- /dev/null +++ b/cln-rs/protos/primitives.proto @@ -0,0 +1,147 @@ +syntax = "proto3"; +package cln; + +message Amount { + uint64 msat = 1; +} + +message AmountOrAll { + oneof value { + Amount amount = 1; + bool all = 2; + } +} + +message AmountOrAny { + oneof value { + Amount amount = 1; + bool any = 2; + } +} + +enum ChannelSide { + LOCAL = 0; + REMOTE = 1; +} + +enum ChannelState { + Openingd = 0; + ChanneldAwaitingLockin = 1; + ChanneldNormal = 2; + ChanneldShuttingDown = 3; + ClosingdSigexchange = 4; + ClosingdComplete = 5; + AwaitingUnilateral = 6; + FundingSpendSeen = 7; + Onchain = 8; + DualopendOpenInit = 9; + DualopendAwaitingLockin = 10; + ChanneldAwaitingSplice = 11; +} + +enum HtlcState { + SentAddHtlc = 0; + SentAddCommit = 1; + RcvdAddRevocation = 2; + RcvdAddAckCommit = 3; + SentAddAckRevocation = 4; + RcvdAddAckRevocation = 5; + RcvdRemoveHtlc = 6; + RcvdRemoveCommit = 7; + SentRemoveRevocation = 8; + SentRemoveAckCommit = 9; + RcvdRemoveAckRevocation = 10; + RcvdAddHtlc = 11; + RcvdAddCommit = 12; + SentAddRevocation = 13; + SentAddAckCommit = 14; + SentRemoveHtlc = 15; + SentRemoveCommit = 16; + RcvdRemoveRevocation = 17; + RcvdRemoveAckCommit = 18; + SentRemoveAckRevocation = 19; +} + +message ChannelStateChangeCause {} + +message Outpoint { + bytes txid = 1; + uint32 outnum = 2; +} + +message Feerate { + oneof style { + bool slow = 1; + bool normal = 2; + bool urgent = 3; + uint32 perkb = 4; + uint32 perkw = 5; + } +} + +message OutputDesc { + string address = 1; + Amount amount = 2; +} + +message RouteHop { + bytes id = 1; + string scid = 2; + Amount feebase = 3; + uint32 feeprop = 4; + uint32 expirydelta = 5; +} +message Routehint { + repeated RouteHop hops = 1; +} +message RoutehintList { + repeated Routehint hints = 2; +} + +message DecodeRouteHop { + bytes pubkey = 1; + string short_channel_id = 2; + Amount fee_base_msat = 3; + uint32 fee_proportional_millionths = 4; + uint32 cltv_expiry_delta = 5; +} +message DecodeRoutehint { + repeated DecodeRouteHop hops = 1; +} +message DecodeRoutehintList { + repeated DecodeRoutehint hints = 2; +} + +message TlvEntry { + uint64 type = 1; + bytes value = 2; +} + +message TlvStream { + repeated TlvEntry entries = 1; +} + +enum ChannelTypeName { + static_remotekey_even = 0; + anchor_outputs_even = 1; + anchors_zero_fee_htlc_tx_even = 2; + scid_alias_even = 3; + zeroconf_even = 4; +} + +enum AutocleanSubsystem { + SUCCEEDEDFORWARDS = 0; + FAILEDFORWARDS = 1; + SUCCEEDEDPAYS = 2; + FAILEDPAYS = 3; + PAIDINVOICES = 4; + EXPIREDINVOICES = 5; +} + +enum PluginSubcommand { + START = 0; + STOP = 1; + RESCAN = 2; + STARTDIR = 3; + LIST = 4; +} diff --git a/cln-rs/src/cln.rs b/cln-rs/src/cln.rs new file mode 100644 index 0000000..b70fc8c --- /dev/null +++ b/cln-rs/src/cln.rs @@ -0,0 +1,11456 @@ +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct Amount { + #[prost(uint64, tag = "1")] + pub msat: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AmountOrAll { + #[prost(oneof = "amount_or_all::Value", tags = "1, 2")] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `AmountOrAll`. +pub mod amount_or_all { + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(message, tag = "1")] + Amount(super::Amount), + #[prost(bool, tag = "2")] + All(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AmountOrAny { + #[prost(oneof = "amount_or_any::Value", tags = "1, 2")] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `AmountOrAny`. +pub mod amount_or_any { + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(message, tag = "1")] + Amount(super::Amount), + #[prost(bool, tag = "2")] + Any(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ChannelStateChangeCause {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Outpoint { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub outnum: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct Feerate { + #[prost(oneof = "feerate::Style", tags = "1, 2, 3, 4, 5")] + pub style: ::core::option::Option, +} +/// Nested message and enum types in `Feerate`. +pub mod feerate { + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Style { + #[prost(bool, tag = "1")] + Slow(bool), + #[prost(bool, tag = "2")] + Normal(bool), + #[prost(bool, tag = "3")] + Urgent(bool), + #[prost(uint32, tag = "4")] + Perkb(u32), + #[prost(uint32, tag = "5")] + Perkw(u32), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OutputDesc { + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub amount: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RouteHop { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub scid: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub feebase: ::core::option::Option, + #[prost(uint32, tag = "4")] + pub feeprop: u32, + #[prost(uint32, tag = "5")] + pub expirydelta: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Routehint { + #[prost(message, repeated, tag = "1")] + pub hops: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RoutehintList { + #[prost(message, repeated, tag = "2")] + pub hints: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodeRouteHop { + #[prost(bytes = "vec", tag = "1")] + pub pubkey: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub short_channel_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub fee_base_msat: ::core::option::Option, + #[prost(uint32, tag = "4")] + pub fee_proportional_millionths: u32, + #[prost(uint32, tag = "5")] + pub cltv_expiry_delta: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodeRoutehint { + #[prost(message, repeated, tag = "1")] + pub hops: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodeRoutehintList { + #[prost(message, repeated, tag = "2")] + pub hints: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TlvEntry { + #[prost(uint64, tag = "1")] + pub r#type: u64, + #[prost(bytes = "vec", tag = "2")] + pub value: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TlvStream { + #[prost(message, repeated, tag = "1")] + pub entries: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ChannelSide { + Local = 0, + Remote = 1, +} +impl ChannelSide { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ChannelSide::Local => "LOCAL", + ChannelSide::Remote => "REMOTE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "LOCAL" => Some(Self::Local), + "REMOTE" => Some(Self::Remote), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ChannelState { + Openingd = 0, + ChanneldAwaitingLockin = 1, + ChanneldNormal = 2, + ChanneldShuttingDown = 3, + ClosingdSigexchange = 4, + ClosingdComplete = 5, + AwaitingUnilateral = 6, + FundingSpendSeen = 7, + Onchain = 8, + DualopendOpenInit = 9, + DualopendAwaitingLockin = 10, + ChanneldAwaitingSplice = 11, +} +impl ChannelState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ChannelState::Openingd => "Openingd", + ChannelState::ChanneldAwaitingLockin => "ChanneldAwaitingLockin", + ChannelState::ChanneldNormal => "ChanneldNormal", + ChannelState::ChanneldShuttingDown => "ChanneldShuttingDown", + ChannelState::ClosingdSigexchange => "ClosingdSigexchange", + ChannelState::ClosingdComplete => "ClosingdComplete", + ChannelState::AwaitingUnilateral => "AwaitingUnilateral", + ChannelState::FundingSpendSeen => "FundingSpendSeen", + ChannelState::Onchain => "Onchain", + ChannelState::DualopendOpenInit => "DualopendOpenInit", + ChannelState::DualopendAwaitingLockin => "DualopendAwaitingLockin", + ChannelState::ChanneldAwaitingSplice => "ChanneldAwaitingSplice", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "Openingd" => Some(Self::Openingd), + "ChanneldAwaitingLockin" => Some(Self::ChanneldAwaitingLockin), + "ChanneldNormal" => Some(Self::ChanneldNormal), + "ChanneldShuttingDown" => Some(Self::ChanneldShuttingDown), + "ClosingdSigexchange" => Some(Self::ClosingdSigexchange), + "ClosingdComplete" => Some(Self::ClosingdComplete), + "AwaitingUnilateral" => Some(Self::AwaitingUnilateral), + "FundingSpendSeen" => Some(Self::FundingSpendSeen), + "Onchain" => Some(Self::Onchain), + "DualopendOpenInit" => Some(Self::DualopendOpenInit), + "DualopendAwaitingLockin" => Some(Self::DualopendAwaitingLockin), + "ChanneldAwaitingSplice" => Some(Self::ChanneldAwaitingSplice), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum HtlcState { + SentAddHtlc = 0, + SentAddCommit = 1, + RcvdAddRevocation = 2, + RcvdAddAckCommit = 3, + SentAddAckRevocation = 4, + RcvdAddAckRevocation = 5, + RcvdRemoveHtlc = 6, + RcvdRemoveCommit = 7, + SentRemoveRevocation = 8, + SentRemoveAckCommit = 9, + RcvdRemoveAckRevocation = 10, + RcvdAddHtlc = 11, + RcvdAddCommit = 12, + SentAddRevocation = 13, + SentAddAckCommit = 14, + SentRemoveHtlc = 15, + SentRemoveCommit = 16, + RcvdRemoveRevocation = 17, + RcvdRemoveAckCommit = 18, + SentRemoveAckRevocation = 19, +} +impl HtlcState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + HtlcState::SentAddHtlc => "SentAddHtlc", + HtlcState::SentAddCommit => "SentAddCommit", + HtlcState::RcvdAddRevocation => "RcvdAddRevocation", + HtlcState::RcvdAddAckCommit => "RcvdAddAckCommit", + HtlcState::SentAddAckRevocation => "SentAddAckRevocation", + HtlcState::RcvdAddAckRevocation => "RcvdAddAckRevocation", + HtlcState::RcvdRemoveHtlc => "RcvdRemoveHtlc", + HtlcState::RcvdRemoveCommit => "RcvdRemoveCommit", + HtlcState::SentRemoveRevocation => "SentRemoveRevocation", + HtlcState::SentRemoveAckCommit => "SentRemoveAckCommit", + HtlcState::RcvdRemoveAckRevocation => "RcvdRemoveAckRevocation", + HtlcState::RcvdAddHtlc => "RcvdAddHtlc", + HtlcState::RcvdAddCommit => "RcvdAddCommit", + HtlcState::SentAddRevocation => "SentAddRevocation", + HtlcState::SentAddAckCommit => "SentAddAckCommit", + HtlcState::SentRemoveHtlc => "SentRemoveHtlc", + HtlcState::SentRemoveCommit => "SentRemoveCommit", + HtlcState::RcvdRemoveRevocation => "RcvdRemoveRevocation", + HtlcState::RcvdRemoveAckCommit => "RcvdRemoveAckCommit", + HtlcState::SentRemoveAckRevocation => "SentRemoveAckRevocation", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SentAddHtlc" => Some(Self::SentAddHtlc), + "SentAddCommit" => Some(Self::SentAddCommit), + "RcvdAddRevocation" => Some(Self::RcvdAddRevocation), + "RcvdAddAckCommit" => Some(Self::RcvdAddAckCommit), + "SentAddAckRevocation" => Some(Self::SentAddAckRevocation), + "RcvdAddAckRevocation" => Some(Self::RcvdAddAckRevocation), + "RcvdRemoveHtlc" => Some(Self::RcvdRemoveHtlc), + "RcvdRemoveCommit" => Some(Self::RcvdRemoveCommit), + "SentRemoveRevocation" => Some(Self::SentRemoveRevocation), + "SentRemoveAckCommit" => Some(Self::SentRemoveAckCommit), + "RcvdRemoveAckRevocation" => Some(Self::RcvdRemoveAckRevocation), + "RcvdAddHtlc" => Some(Self::RcvdAddHtlc), + "RcvdAddCommit" => Some(Self::RcvdAddCommit), + "SentAddRevocation" => Some(Self::SentAddRevocation), + "SentAddAckCommit" => Some(Self::SentAddAckCommit), + "SentRemoveHtlc" => Some(Self::SentRemoveHtlc), + "SentRemoveCommit" => Some(Self::SentRemoveCommit), + "RcvdRemoveRevocation" => Some(Self::RcvdRemoveRevocation), + "RcvdRemoveAckCommit" => Some(Self::RcvdRemoveAckCommit), + "SentRemoveAckRevocation" => Some(Self::SentRemoveAckRevocation), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ChannelTypeName { + StaticRemotekeyEven = 0, + AnchorOutputsEven = 1, + AnchorsZeroFeeHtlcTxEven = 2, + ScidAliasEven = 3, + ZeroconfEven = 4, +} +impl ChannelTypeName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ChannelTypeName::StaticRemotekeyEven => "static_remotekey_even", + ChannelTypeName::AnchorOutputsEven => "anchor_outputs_even", + ChannelTypeName::AnchorsZeroFeeHtlcTxEven => "anchors_zero_fee_htlc_tx_even", + ChannelTypeName::ScidAliasEven => "scid_alias_even", + ChannelTypeName::ZeroconfEven => "zeroconf_even", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "static_remotekey_even" => Some(Self::StaticRemotekeyEven), + "anchor_outputs_even" => Some(Self::AnchorOutputsEven), + "anchors_zero_fee_htlc_tx_even" => Some(Self::AnchorsZeroFeeHtlcTxEven), + "scid_alias_even" => Some(Self::ScidAliasEven), + "zeroconf_even" => Some(Self::ZeroconfEven), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AutocleanSubsystem { + Succeededforwards = 0, + Failedforwards = 1, + Succeededpays = 2, + Failedpays = 3, + Paidinvoices = 4, + Expiredinvoices = 5, +} +impl AutocleanSubsystem { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AutocleanSubsystem::Succeededforwards => "SUCCEEDEDFORWARDS", + AutocleanSubsystem::Failedforwards => "FAILEDFORWARDS", + AutocleanSubsystem::Succeededpays => "SUCCEEDEDPAYS", + AutocleanSubsystem::Failedpays => "FAILEDPAYS", + AutocleanSubsystem::Paidinvoices => "PAIDINVOICES", + AutocleanSubsystem::Expiredinvoices => "EXPIREDINVOICES", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SUCCEEDEDFORWARDS" => Some(Self::Succeededforwards), + "FAILEDFORWARDS" => Some(Self::Failedforwards), + "SUCCEEDEDPAYS" => Some(Self::Succeededpays), + "FAILEDPAYS" => Some(Self::Failedpays), + "PAIDINVOICES" => Some(Self::Paidinvoices), + "EXPIREDINVOICES" => Some(Self::Expiredinvoices), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum PluginSubcommand { + Start = 0, + Stop = 1, + Rescan = 2, + Startdir = 3, + List = 4, +} +impl PluginSubcommand { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + PluginSubcommand::Start => "START", + PluginSubcommand::Stop => "STOP", + PluginSubcommand::Rescan => "RESCAN", + PluginSubcommand::Startdir => "STARTDIR", + PluginSubcommand::List => "LIST", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "START" => Some(Self::Start), + "STOP" => Some(Self::Stop), + "RESCAN" => Some(Self::Rescan), + "STARTDIR" => Some(Self::Startdir), + "LIST" => Some(Self::List), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetinfoRequest {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetinfoResponse { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "2")] + pub alias: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", tag = "3")] + pub color: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "4")] + pub num_peers: u32, + #[prost(uint32, tag = "5")] + pub num_pending_channels: u32, + #[prost(uint32, tag = "6")] + pub num_active_channels: u32, + #[prost(uint32, tag = "7")] + pub num_inactive_channels: u32, + #[prost(string, tag = "8")] + pub version: ::prost::alloc::string::String, + #[prost(string, tag = "9")] + pub lightning_dir: ::prost::alloc::string::String, + #[prost(message, optional, tag = "10")] + pub our_features: ::core::option::Option, + #[prost(uint32, tag = "11")] + pub blockheight: u32, + #[prost(string, tag = "12")] + pub network: ::prost::alloc::string::String, + #[prost(message, optional, tag = "13")] + pub fees_collected_msat: ::core::option::Option, + #[prost(message, repeated, tag = "14")] + pub address: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "15")] + pub binding: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "16")] + pub warning_bitcoind_sync: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "17")] + pub warning_lightningd_sync: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetinfoOurFeatures { + #[prost(bytes = "vec", tag = "1")] + pub init: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub node: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "3")] + pub channel: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "4")] + pub invoice: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetinfoAddress { + #[prost(enumeration = "getinfo_address::GetinfoAddressType", tag = "1")] + pub item_type: i32, + #[prost(uint32, tag = "2")] + pub port: u32, + #[prost(string, optional, tag = "3")] + pub address: ::core::option::Option<::prost::alloc::string::String>, +} +/// Nested message and enum types in `GetinfoAddress`. +pub mod getinfo_address { + /// Getinfo.address\[\].type + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum GetinfoAddressType { + Dns = 0, + Ipv4 = 1, + Ipv6 = 2, + Torv2 = 3, + Torv3 = 4, + } + impl GetinfoAddressType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + GetinfoAddressType::Dns => "DNS", + GetinfoAddressType::Ipv4 => "IPV4", + GetinfoAddressType::Ipv6 => "IPV6", + GetinfoAddressType::Torv2 => "TORV2", + GetinfoAddressType::Torv3 => "TORV3", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "DNS" => Some(Self::Dns), + "IPV4" => Some(Self::Ipv4), + "IPV6" => Some(Self::Ipv6), + "TORV2" => Some(Self::Torv2), + "TORV3" => Some(Self::Torv3), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetinfoBinding { + #[prost(enumeration = "getinfo_binding::GetinfoBindingType", tag = "1")] + pub item_type: i32, + #[prost(string, optional, tag = "2")] + pub address: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint32, optional, tag = "3")] + pub port: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub socket: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "5")] + pub subtype: ::core::option::Option<::prost::alloc::string::String>, +} +/// Nested message and enum types in `GetinfoBinding`. +pub mod getinfo_binding { + /// Getinfo.binding\[\].type + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum GetinfoBindingType { + LocalSocket = 0, + Ipv4 = 1, + Ipv6 = 2, + Torv2 = 3, + Torv3 = 4, + Websocket = 5, + } + impl GetinfoBindingType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + GetinfoBindingType::LocalSocket => "LOCAL_SOCKET", + GetinfoBindingType::Ipv4 => "IPV4", + GetinfoBindingType::Ipv6 => "IPV6", + GetinfoBindingType::Torv2 => "TORV2", + GetinfoBindingType::Torv3 => "TORV3", + GetinfoBindingType::Websocket => "WEBSOCKET", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "LOCAL_SOCKET" => Some(Self::LocalSocket), + "IPV4" => Some(Self::Ipv4), + "IPV6" => Some(Self::Ipv6), + "TORV2" => Some(Self::Torv2), + "TORV3" => Some(Self::Torv3), + "WEBSOCKET" => Some(Self::Websocket), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListpeersRequest { + #[prost(bytes = "vec", optional, tag = "1")] + pub id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(enumeration = "listpeers_request::ListpeersLevel", optional, tag = "2")] + pub level: ::core::option::Option, +} +/// Nested message and enum types in `ListpeersRequest`. +pub mod listpeers_request { + /// ListPeers.level + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListpeersLevel { + Io = 0, + Debug = 1, + Info = 2, + Unusual = 3, + Trace = 4, + } + impl ListpeersLevel { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListpeersLevel::Io => "IO", + ListpeersLevel::Debug => "DEBUG", + ListpeersLevel::Info => "INFO", + ListpeersLevel::Unusual => "UNUSUAL", + ListpeersLevel::Trace => "TRACE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IO" => Some(Self::Io), + "DEBUG" => Some(Self::Debug), + "INFO" => Some(Self::Info), + "UNUSUAL" => Some(Self::Unusual), + "TRACE" => Some(Self::Trace), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListpeersResponse { + #[prost(message, repeated, tag = "1")] + pub peers: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListpeersPeers { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(bool, tag = "2")] + pub connected: bool, + #[prost(message, repeated, tag = "3")] + pub log: ::prost::alloc::vec::Vec, + #[prost(string, repeated, tag = "5")] + pub netaddr: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "6")] + pub features: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "7")] + pub remote_addr: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint32, optional, tag = "8")] + pub num_channels: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListpeersPeersLog { + #[prost(enumeration = "listpeers_peers_log::ListpeersPeersLogType", tag = "1")] + pub item_type: i32, + #[prost(uint32, optional, tag = "2")] + pub num_skipped: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub time: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "4")] + pub source: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "5")] + pub log: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "6")] + pub node_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "7")] + pub data: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// Nested message and enum types in `ListpeersPeersLog`. +pub mod listpeers_peers_log { + /// ListPeers.peers\[\].log\[\].type + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListpeersPeersLogType { + Skipped = 0, + Broken = 1, + Unusual = 2, + Info = 3, + Debug = 4, + IoIn = 5, + IoOut = 6, + Trace = 7, + } + impl ListpeersPeersLogType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListpeersPeersLogType::Skipped => "SKIPPED", + ListpeersPeersLogType::Broken => "BROKEN", + ListpeersPeersLogType::Unusual => "UNUSUAL", + ListpeersPeersLogType::Info => "INFO", + ListpeersPeersLogType::Debug => "DEBUG", + ListpeersPeersLogType::IoIn => "IO_IN", + ListpeersPeersLogType::IoOut => "IO_OUT", + ListpeersPeersLogType::Trace => "TRACE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SKIPPED" => Some(Self::Skipped), + "BROKEN" => Some(Self::Broken), + "UNUSUAL" => Some(Self::Unusual), + "INFO" => Some(Self::Info), + "DEBUG" => Some(Self::Debug), + "IO_IN" => Some(Self::IoIn), + "IO_OUT" => Some(Self::IoOut), + "TRACE" => Some(Self::Trace), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListfundsRequest { + #[prost(bool, optional, tag = "1")] + pub spent: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListfundsResponse { + #[prost(message, repeated, tag = "1")] + pub outputs: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "2")] + pub channels: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListfundsOutputs { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub output: u32, + #[prost(message, optional, tag = "3")] + pub amount_msat: ::core::option::Option, + #[prost(bytes = "vec", tag = "4")] + pub scriptpubkey: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "5")] + pub address: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "6")] + pub redeemscript: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(enumeration = "listfunds_outputs::ListfundsOutputsStatus", tag = "7")] + pub status: i32, + #[prost(uint32, optional, tag = "8")] + pub blockheight: ::core::option::Option, + #[prost(bool, tag = "9")] + pub reserved: bool, + #[prost(uint32, optional, tag = "10")] + pub reserved_to_block: ::core::option::Option, +} +/// Nested message and enum types in `ListfundsOutputs`. +pub mod listfunds_outputs { + /// ListFunds.outputs\[\].status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListfundsOutputsStatus { + Unconfirmed = 0, + Confirmed = 1, + Spent = 2, + Immature = 3, + } + impl ListfundsOutputsStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListfundsOutputsStatus::Unconfirmed => "UNCONFIRMED", + ListfundsOutputsStatus::Confirmed => "CONFIRMED", + ListfundsOutputsStatus::Spent => "SPENT", + ListfundsOutputsStatus::Immature => "IMMATURE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "UNCONFIRMED" => Some(Self::Unconfirmed), + "CONFIRMED" => Some(Self::Confirmed), + "SPENT" => Some(Self::Spent), + "IMMATURE" => Some(Self::Immature), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListfundsChannels { + #[prost(bytes = "vec", tag = "1")] + pub peer_id: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub our_amount_msat: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub amount_msat: ::core::option::Option, + #[prost(bytes = "vec", tag = "4")] + pub funding_txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "5")] + pub funding_output: u32, + #[prost(bool, tag = "6")] + pub connected: bool, + #[prost(enumeration = "ChannelState", tag = "7")] + pub state: i32, + #[prost(string, optional, tag = "8")] + pub short_channel_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "9")] + pub channel_id: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendpayRequest { + #[prost(message, repeated, tag = "1")] + pub route: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "3")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "5")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "6")] + pub payment_secret: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, optional, tag = "7")] + pub partid: ::core::option::Option, + #[prost(uint64, optional, tag = "9")] + pub groupid: ::core::option::Option, + #[prost(message, optional, tag = "10")] + pub amount_msat: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "11")] + pub localinvreqid: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "12")] + pub payment_metadata: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "13")] + pub description: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendpayResponse { + #[prost(uint64, tag = "1")] + pub id: u64, + #[prost(uint64, optional, tag = "2")] + pub groupid: ::core::option::Option, + #[prost(bytes = "vec", tag = "3")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(enumeration = "sendpay_response::SendpayStatus", tag = "4")] + pub status: i32, + #[prost(message, optional, tag = "5")] + pub amount_msat: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "6")] + pub destination: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, tag = "7")] + pub created_at: u64, + #[prost(message, optional, tag = "8")] + pub amount_sent_msat: ::core::option::Option, + #[prost(string, optional, tag = "9")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "10")] + pub partid: ::core::option::Option, + #[prost(string, optional, tag = "11")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "12")] + pub bolt12: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "13")] + pub payment_preimage: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "14")] + pub message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "15")] + pub completed_at: ::core::option::Option, + #[prost(uint64, optional, tag = "16")] + pub created_index: ::core::option::Option, + #[prost(uint64, optional, tag = "17")] + pub updated_index: ::core::option::Option, +} +/// Nested message and enum types in `SendpayResponse`. +pub mod sendpay_response { + /// SendPay.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum SendpayStatus { + Pending = 0, + Complete = 1, + } + impl SendpayStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SendpayStatus::Pending => "PENDING", + SendpayStatus::Complete => "COMPLETE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PENDING" => Some(Self::Pending), + "COMPLETE" => Some(Self::Complete), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendpayRoute { + #[prost(bytes = "vec", tag = "2")] + pub id: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "3")] + pub delay: u32, + #[prost(string, tag = "4")] + pub channel: ::prost::alloc::string::String, + #[prost(message, optional, tag = "5")] + pub amount_msat: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListchannelsRequest { + #[prost(string, optional, tag = "1")] + pub short_channel_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "2")] + pub source: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "3")] + pub destination: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListchannelsResponse { + #[prost(message, repeated, tag = "1")] + pub channels: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListchannelsChannels { + #[prost(bytes = "vec", tag = "1")] + pub source: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub destination: ::prost::alloc::vec::Vec, + #[prost(string, tag = "3")] + pub short_channel_id: ::prost::alloc::string::String, + #[prost(bool, tag = "4")] + pub public: bool, + #[prost(message, optional, tag = "5")] + pub amount_msat: ::core::option::Option, + #[prost(uint32, tag = "6")] + pub message_flags: u32, + #[prost(uint32, tag = "7")] + pub channel_flags: u32, + #[prost(bool, tag = "8")] + pub active: bool, + #[prost(uint32, tag = "9")] + pub last_update: u32, + #[prost(uint32, tag = "10")] + pub base_fee_millisatoshi: u32, + #[prost(uint32, tag = "11")] + pub fee_per_millionth: u32, + #[prost(uint32, tag = "12")] + pub delay: u32, + #[prost(message, optional, tag = "13")] + pub htlc_minimum_msat: ::core::option::Option, + #[prost(message, optional, tag = "14")] + pub htlc_maximum_msat: ::core::option::Option, + #[prost(bytes = "vec", tag = "15")] + pub features: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "16")] + pub direction: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddgossipRequest { + #[prost(bytes = "vec", tag = "1")] + pub message: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddgossipResponse {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddpsbtoutputRequest { + #[prost(message, optional, tag = "1")] + pub satoshi: ::core::option::Option, + #[prost(uint32, optional, tag = "2")] + pub locktime: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub initialpsbt: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "4")] + pub destination: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddpsbtoutputResponse { + #[prost(string, tag = "1")] + pub psbt: ::prost::alloc::string::String, + #[prost(uint32, tag = "2")] + pub estimated_added_weight: u32, + #[prost(uint32, tag = "3")] + pub outnum: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanonceRequest { + #[prost(enumeration = "AutocleanSubsystem", tag = "1")] + pub subsystem: i32, + #[prost(uint64, tag = "2")] + pub age: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanonceResponse { + #[prost(message, optional, tag = "1")] + pub autoclean: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanonceAutoclean { + #[prost(message, optional, tag = "1")] + pub succeededforwards: ::core::option::Option< + AutocleanonceAutocleanSucceededforwards, + >, + #[prost(message, optional, tag = "2")] + pub failedforwards: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub succeededpays: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub failedpays: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub paidinvoices: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub expiredinvoices: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanonceAutocleanSucceededforwards { + #[prost(uint64, tag = "1")] + pub cleaned: u64, + #[prost(uint64, tag = "2")] + pub uncleaned: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanonceAutocleanFailedforwards { + #[prost(uint64, tag = "1")] + pub cleaned: u64, + #[prost(uint64, tag = "2")] + pub uncleaned: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanonceAutocleanSucceededpays { + #[prost(uint64, tag = "1")] + pub cleaned: u64, + #[prost(uint64, tag = "2")] + pub uncleaned: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanonceAutocleanFailedpays { + #[prost(uint64, tag = "1")] + pub cleaned: u64, + #[prost(uint64, tag = "2")] + pub uncleaned: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanonceAutocleanPaidinvoices { + #[prost(uint64, tag = "1")] + pub cleaned: u64, + #[prost(uint64, tag = "2")] + pub uncleaned: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanonceAutocleanExpiredinvoices { + #[prost(uint64, tag = "1")] + pub cleaned: u64, + #[prost(uint64, tag = "2")] + pub uncleaned: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanstatusRequest { + #[prost(enumeration = "AutocleanSubsystem", optional, tag = "1")] + pub subsystem: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanstatusResponse { + #[prost(message, optional, tag = "1")] + pub autoclean: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanstatusAutoclean { + #[prost(message, optional, tag = "1")] + pub succeededforwards: ::core::option::Option< + AutocleanstatusAutocleanSucceededforwards, + >, + #[prost(message, optional, tag = "2")] + pub failedforwards: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub succeededpays: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub failedpays: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub paidinvoices: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub expiredinvoices: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanstatusAutocleanSucceededforwards { + #[prost(bool, tag = "1")] + pub enabled: bool, + #[prost(uint64, tag = "2")] + pub cleaned: u64, + #[prost(uint64, optional, tag = "3")] + pub age: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanstatusAutocleanFailedforwards { + #[prost(bool, tag = "1")] + pub enabled: bool, + #[prost(uint64, tag = "2")] + pub cleaned: u64, + #[prost(uint64, optional, tag = "3")] + pub age: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanstatusAutocleanSucceededpays { + #[prost(bool, tag = "1")] + pub enabled: bool, + #[prost(uint64, tag = "2")] + pub cleaned: u64, + #[prost(uint64, optional, tag = "3")] + pub age: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanstatusAutocleanFailedpays { + #[prost(bool, tag = "1")] + pub enabled: bool, + #[prost(uint64, tag = "2")] + pub cleaned: u64, + #[prost(uint64, optional, tag = "3")] + pub age: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanstatusAutocleanPaidinvoices { + #[prost(bool, tag = "1")] + pub enabled: bool, + #[prost(uint64, tag = "2")] + pub cleaned: u64, + #[prost(uint64, optional, tag = "3")] + pub age: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AutocleanstatusAutocleanExpiredinvoices { + #[prost(bool, tag = "1")] + pub enabled: bool, + #[prost(uint64, tag = "2")] + pub cleaned: u64, + #[prost(uint64, optional, tag = "3")] + pub age: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckmessageRequest { + #[prost(string, tag = "1")] + pub message: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub zbase: ::prost::alloc::string::String, + #[prost(bytes = "vec", optional, tag = "3")] + pub pubkey: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckmessageResponse { + #[prost(bool, tag = "1")] + pub verified: bool, + #[prost(bytes = "vec", tag = "2")] + pub pubkey: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CloseRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(uint32, optional, tag = "2")] + pub unilateraltimeout: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub destination: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "4")] + pub fee_negotiation_step: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "5")] + pub wrong_funding: ::core::option::Option, + #[prost(bool, optional, tag = "6")] + pub force_lease_closed: ::core::option::Option, + #[prost(message, repeated, tag = "7")] + pub feerange: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CloseResponse { + #[prost(enumeration = "close_response::CloseType", tag = "1")] + pub item_type: i32, + #[prost(bytes = "vec", optional, tag = "2")] + pub tx: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "3")] + pub txid: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// Nested message and enum types in `CloseResponse`. +pub mod close_response { + /// Close.type + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum CloseType { + Mutual = 0, + Unilateral = 1, + Unopened = 2, + } + impl CloseType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + CloseType::Mutual => "MUTUAL", + CloseType::Unilateral => "UNILATERAL", + CloseType::Unopened => "UNOPENED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MUTUAL" => Some(Self::Mutual), + "UNILATERAL" => Some(Self::Unilateral), + "UNOPENED" => Some(Self::Unopened), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConnectRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub host: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint32, optional, tag = "3")] + pub port: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConnectResponse { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub features: ::prost::alloc::vec::Vec, + #[prost(enumeration = "connect_response::ConnectDirection", tag = "3")] + pub direction: i32, + #[prost(message, optional, tag = "4")] + pub address: ::core::option::Option, +} +/// Nested message and enum types in `ConnectResponse`. +pub mod connect_response { + /// Connect.direction + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ConnectDirection { + In = 0, + Out = 1, + } + impl ConnectDirection { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ConnectDirection::In => "IN", + ConnectDirection::Out => "OUT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IN" => Some(Self::In), + "OUT" => Some(Self::Out), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConnectAddress { + #[prost(enumeration = "connect_address::ConnectAddressType", tag = "1")] + pub item_type: i32, + #[prost(string, optional, tag = "2")] + pub socket: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub address: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint32, optional, tag = "4")] + pub port: ::core::option::Option, +} +/// Nested message and enum types in `ConnectAddress`. +pub mod connect_address { + /// Connect.address.type + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ConnectAddressType { + LocalSocket = 0, + Ipv4 = 1, + Ipv6 = 2, + Torv2 = 3, + Torv3 = 4, + } + impl ConnectAddressType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ConnectAddressType::LocalSocket => "LOCAL_SOCKET", + ConnectAddressType::Ipv4 => "IPV4", + ConnectAddressType::Ipv6 => "IPV6", + ConnectAddressType::Torv2 => "TORV2", + ConnectAddressType::Torv3 => "TORV3", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "LOCAL_SOCKET" => Some(Self::LocalSocket), + "IPV4" => Some(Self::Ipv4), + "IPV6" => Some(Self::Ipv6), + "TORV2" => Some(Self::Torv2), + "TORV3" => Some(Self::Torv3), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateinvoiceRequest { + #[prost(string, tag = "1")] + pub invstring: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub label: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "3")] + pub preimage: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateinvoiceResponse { + #[prost(string, tag = "1")] + pub label: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub bolt12: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", tag = "4")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "5")] + pub amount_msat: ::core::option::Option, + #[prost(enumeration = "createinvoice_response::CreateinvoiceStatus", tag = "6")] + pub status: i32, + #[prost(string, tag = "7")] + pub description: ::prost::alloc::string::String, + #[prost(uint64, tag = "8")] + pub expires_at: u64, + #[prost(uint64, optional, tag = "9")] + pub pay_index: ::core::option::Option, + #[prost(message, optional, tag = "10")] + pub amount_received_msat: ::core::option::Option, + #[prost(uint64, optional, tag = "11")] + pub paid_at: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "12")] + pub payment_preimage: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "13")] + pub local_offer_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "15")] + pub invreq_payer_note: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "16")] + pub created_index: ::core::option::Option, + #[prost(message, optional, tag = "17")] + pub paid_outpoint: ::core::option::Option, +} +/// Nested message and enum types in `CreateinvoiceResponse`. +pub mod createinvoice_response { + /// CreateInvoice.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum CreateinvoiceStatus { + Paid = 0, + Expired = 1, + Unpaid = 2, + } + impl CreateinvoiceStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + CreateinvoiceStatus::Paid => "PAID", + CreateinvoiceStatus::Expired => "EXPIRED", + CreateinvoiceStatus::Unpaid => "UNPAID", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PAID" => Some(Self::Paid), + "EXPIRED" => Some(Self::Expired), + "UNPAID" => Some(Self::Unpaid), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateinvoicePaidOutpoint { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub outnum: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DatastoreRequest { + #[prost(bytes = "vec", optional, tag = "2")] + pub hex: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(enumeration = "datastore_request::DatastoreMode", optional, tag = "3")] + pub mode: ::core::option::Option, + #[prost(uint64, optional, tag = "4")] + pub generation: ::core::option::Option, + #[prost(string, repeated, tag = "5")] + pub key: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, optional, tag = "6")] + pub string: ::core::option::Option<::prost::alloc::string::String>, +} +/// Nested message and enum types in `DatastoreRequest`. +pub mod datastore_request { + /// Datastore.mode + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum DatastoreMode { + MustCreate = 0, + MustReplace = 1, + CreateOrReplace = 2, + MustAppend = 3, + CreateOrAppend = 4, + } + impl DatastoreMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + DatastoreMode::MustCreate => "MUST_CREATE", + DatastoreMode::MustReplace => "MUST_REPLACE", + DatastoreMode::CreateOrReplace => "CREATE_OR_REPLACE", + DatastoreMode::MustAppend => "MUST_APPEND", + DatastoreMode::CreateOrAppend => "CREATE_OR_APPEND", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MUST_CREATE" => Some(Self::MustCreate), + "MUST_REPLACE" => Some(Self::MustReplace), + "CREATE_OR_REPLACE" => Some(Self::CreateOrReplace), + "MUST_APPEND" => Some(Self::MustAppend), + "CREATE_OR_APPEND" => Some(Self::CreateOrAppend), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DatastoreResponse { + #[prost(uint64, optional, tag = "2")] + pub generation: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "3")] + pub hex: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "4")] + pub string: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "5")] + pub key: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DatastoreusageRequest { + #[prost(string, repeated, tag = "1")] + pub key: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DatastoreusageResponse { + #[prost(message, optional, tag = "1")] + pub datastoreusage: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DatastoreusageDatastoreusage { + #[prost(string, tag = "1")] + pub key: ::prost::alloc::string::String, + #[prost(uint64, tag = "2")] + pub total_bytes: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateonionRequest { + #[prost(message, repeated, tag = "1")] + pub hops: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub assocdata: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", optional, tag = "3")] + pub session_key: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint32, optional, tag = "4")] + pub onion_size: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateonionResponse { + #[prost(bytes = "vec", tag = "1")] + pub onion: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", repeated, tag = "2")] + pub shared_secrets: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateonionHops { + #[prost(bytes = "vec", tag = "1")] + pub pubkey: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub payload: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeldatastoreRequest { + #[prost(uint64, optional, tag = "2")] + pub generation: ::core::option::Option, + #[prost(string, repeated, tag = "3")] + pub key: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeldatastoreResponse { + #[prost(uint64, optional, tag = "2")] + pub generation: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "3")] + pub hex: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "4")] + pub string: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "5")] + pub key: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DelinvoiceRequest { + #[prost(string, tag = "1")] + pub label: ::prost::alloc::string::String, + #[prost(enumeration = "delinvoice_request::DelinvoiceStatus", tag = "2")] + pub status: i32, + #[prost(bool, optional, tag = "3")] + pub desconly: ::core::option::Option, +} +/// Nested message and enum types in `DelinvoiceRequest`. +pub mod delinvoice_request { + /// DelInvoice.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum DelinvoiceStatus { + Paid = 0, + Expired = 1, + Unpaid = 2, + } + impl DelinvoiceStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + DelinvoiceStatus::Paid => "PAID", + DelinvoiceStatus::Expired => "EXPIRED", + DelinvoiceStatus::Unpaid => "UNPAID", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PAID" => Some(Self::Paid), + "EXPIRED" => Some(Self::Expired), + "UNPAID" => Some(Self::Unpaid), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DelinvoiceResponse { + #[prost(string, tag = "1")] + pub label: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub bolt12: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "4")] + pub amount_msat: ::core::option::Option, + #[prost(string, optional, tag = "5")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", tag = "6")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(enumeration = "delinvoice_response::DelinvoiceStatus", tag = "7")] + pub status: i32, + #[prost(uint64, tag = "8")] + pub expires_at: u64, + #[prost(bytes = "vec", optional, tag = "9")] + pub local_offer_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "11")] + pub invreq_payer_note: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "12")] + pub created_index: ::core::option::Option, + #[prost(uint64, optional, tag = "13")] + pub updated_index: ::core::option::Option, + #[prost(uint64, optional, tag = "14")] + pub pay_index: ::core::option::Option, + #[prost(message, optional, tag = "15")] + pub amount_received_msat: ::core::option::Option, + #[prost(uint64, optional, tag = "16")] + pub paid_at: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "17")] + pub payment_preimage: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// Nested message and enum types in `DelinvoiceResponse`. +pub mod delinvoice_response { + /// DelInvoice.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum DelinvoiceStatus { + Paid = 0, + Expired = 1, + Unpaid = 2, + } + impl DelinvoiceStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + DelinvoiceStatus::Paid => "PAID", + DelinvoiceStatus::Expired => "EXPIRED", + DelinvoiceStatus::Unpaid => "UNPAID", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PAID" => Some(Self::Paid), + "EXPIRED" => Some(Self::Expired), + "UNPAID" => Some(Self::Unpaid), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DevforgetchannelRequest { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "2")] + pub short_channel_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "3")] + pub channel_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bool, optional, tag = "4")] + pub force: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DevforgetchannelResponse { + #[prost(bool, tag = "1")] + pub forced: bool, + #[prost(bool, tag = "2")] + pub funding_unspent: bool, + #[prost(bytes = "vec", tag = "3")] + pub funding_txid: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct EmergencyrecoverRequest {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmergencyrecoverResponse { + #[prost(bytes = "vec", repeated, tag = "1")] + pub stubs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RecoverRequest { + #[prost(string, tag = "1")] + pub hsmsecret: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RecoverResponse { + #[prost(enumeration = "recover_response::RecoverResult", optional, tag = "1")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `RecoverResponse`. +pub mod recover_response { + /// Recover.result + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum RecoverResult { + RecoveryRestartInProgress = 0, + } + impl RecoverResult { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + RecoverResult::RecoveryRestartInProgress => { + "RECOVERY_RESTART_IN_PROGRESS" + } + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "RECOVERY_RESTART_IN_PROGRESS" => Some(Self::RecoveryRestartInProgress), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RecoverchannelRequest { + #[prost(bytes = "vec", repeated, tag = "1")] + pub scb: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RecoverchannelResponse { + #[prost(string, repeated, tag = "1")] + pub stubs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InvoiceRequest { + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub label: ::prost::alloc::string::String, + #[prost(string, repeated, tag = "4")] + pub fallbacks: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "5")] + pub preimage: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint32, optional, tag = "6")] + pub cltv: ::core::option::Option, + #[prost(uint64, optional, tag = "7")] + pub expiry: ::core::option::Option, + #[prost(string, repeated, tag = "8")] + pub exposeprivatechannels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "9")] + pub deschashonly: ::core::option::Option, + #[prost(message, optional, tag = "10")] + pub amount_msat: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InvoiceResponse { + #[prost(string, tag = "1")] + pub bolt11: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "2")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "3")] + pub payment_secret: ::prost::alloc::vec::Vec, + #[prost(uint64, tag = "4")] + pub expires_at: u64, + #[prost(string, optional, tag = "5")] + pub warning_capacity: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "6")] + pub warning_offline: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "7")] + pub warning_deadends: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "8")] + pub warning_private_unused: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "9")] + pub warning_mpp: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "10")] + pub created_index: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InvoicerequestRequest { + #[prost(message, optional, tag = "1")] + pub amount: ::core::option::Option, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(string, optional, tag = "3")] + pub issuer: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "4")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "5")] + pub absolute_expiry: ::core::option::Option, + #[prost(bool, optional, tag = "6")] + pub single_use: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InvoicerequestResponse { + #[prost(bytes = "vec", tag = "1")] + pub invreq_id: ::prost::alloc::vec::Vec, + #[prost(bool, tag = "2")] + pub active: bool, + #[prost(bool, tag = "3")] + pub single_use: bool, + #[prost(string, tag = "4")] + pub bolt12: ::prost::alloc::string::String, + #[prost(bool, tag = "5")] + pub used: bool, + #[prost(string, optional, tag = "6")] + pub label: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DisableinvoicerequestRequest { + #[prost(string, tag = "1")] + pub invreq_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DisableinvoicerequestResponse { + #[prost(bytes = "vec", tag = "1")] + pub invreq_id: ::prost::alloc::vec::Vec, + #[prost(bool, tag = "2")] + pub active: bool, + #[prost(bool, tag = "3")] + pub single_use: bool, + #[prost(string, tag = "4")] + pub bolt12: ::prost::alloc::string::String, + #[prost(bool, tag = "5")] + pub used: bool, + #[prost(string, optional, tag = "6")] + pub label: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListinvoicerequestsRequest { + #[prost(string, optional, tag = "1")] + pub invreq_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "2")] + pub active_only: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListinvoicerequestsResponse { + #[prost(message, repeated, tag = "1")] + pub invoicerequests: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListinvoicerequestsInvoicerequests { + #[prost(bytes = "vec", tag = "1")] + pub invreq_id: ::prost::alloc::vec::Vec, + #[prost(bool, tag = "2")] + pub active: bool, + #[prost(bool, tag = "3")] + pub single_use: bool, + #[prost(string, tag = "4")] + pub bolt12: ::prost::alloc::string::String, + #[prost(bool, tag = "5")] + pub used: bool, + #[prost(string, optional, tag = "6")] + pub label: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListdatastoreRequest { + #[prost(string, repeated, tag = "2")] + pub key: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListdatastoreResponse { + #[prost(message, repeated, tag = "1")] + pub datastore: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListdatastoreDatastore { + #[prost(string, repeated, tag = "1")] + pub key: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "2")] + pub generation: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "3")] + pub hex: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "4")] + pub string: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListinvoicesRequest { + #[prost(string, optional, tag = "1")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "2")] + pub invstring: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "3")] + pub payment_hash: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "4")] + pub offer_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost( + enumeration = "listinvoices_request::ListinvoicesIndex", + optional, + tag = "5" + )] + pub index: ::core::option::Option, + #[prost(uint64, optional, tag = "6")] + pub start: ::core::option::Option, + #[prost(uint32, optional, tag = "7")] + pub limit: ::core::option::Option, +} +/// Nested message and enum types in `ListinvoicesRequest`. +pub mod listinvoices_request { + /// ListInvoices.index + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListinvoicesIndex { + Created = 0, + Updated = 1, + } + impl ListinvoicesIndex { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListinvoicesIndex::Created => "CREATED", + ListinvoicesIndex::Updated => "UPDATED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "CREATED" => Some(Self::Created), + "UPDATED" => Some(Self::Updated), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListinvoicesResponse { + #[prost(message, repeated, tag = "1")] + pub invoices: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListinvoicesInvoices { + #[prost(string, tag = "1")] + pub label: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", tag = "3")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost( + enumeration = "listinvoices_invoices::ListinvoicesInvoicesStatus", + tag = "4" + )] + pub status: i32, + #[prost(uint64, tag = "5")] + pub expires_at: u64, + #[prost(message, optional, tag = "6")] + pub amount_msat: ::core::option::Option, + #[prost(string, optional, tag = "7")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "8")] + pub bolt12: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "9")] + pub local_offer_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, optional, tag = "11")] + pub pay_index: ::core::option::Option, + #[prost(message, optional, tag = "12")] + pub amount_received_msat: ::core::option::Option, + #[prost(uint64, optional, tag = "13")] + pub paid_at: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "14")] + pub payment_preimage: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "15")] + pub invreq_payer_note: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "16")] + pub created_index: ::core::option::Option, + #[prost(uint64, optional, tag = "17")] + pub updated_index: ::core::option::Option, + #[prost(message, optional, tag = "18")] + pub paid_outpoint: ::core::option::Option, +} +/// Nested message and enum types in `ListinvoicesInvoices`. +pub mod listinvoices_invoices { + /// ListInvoices.invoices\[\].status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListinvoicesInvoicesStatus { + Unpaid = 0, + Paid = 1, + Expired = 2, + } + impl ListinvoicesInvoicesStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListinvoicesInvoicesStatus::Unpaid => "UNPAID", + ListinvoicesInvoicesStatus::Paid => "PAID", + ListinvoicesInvoicesStatus::Expired => "EXPIRED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "UNPAID" => Some(Self::Unpaid), + "PAID" => Some(Self::Paid), + "EXPIRED" => Some(Self::Expired), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListinvoicesInvoicesPaidOutpoint { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub outnum: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendonionRequest { + #[prost(bytes = "vec", tag = "1")] + pub onion: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub first_hop: ::core::option::Option, + #[prost(bytes = "vec", tag = "3")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "4")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", repeated, tag = "5")] + pub shared_secrets: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, + #[prost(uint32, optional, tag = "6")] + pub partid: ::core::option::Option, + #[prost(string, optional, tag = "7")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "9")] + pub destination: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, optional, tag = "11")] + pub groupid: ::core::option::Option, + #[prost(message, optional, tag = "12")] + pub amount_msat: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "13")] + pub localinvreqid: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "14")] + pub description: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendonionResponse { + #[prost(uint64, tag = "1")] + pub id: u64, + #[prost(bytes = "vec", tag = "2")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(enumeration = "sendonion_response::SendonionStatus", tag = "3")] + pub status: i32, + #[prost(message, optional, tag = "4")] + pub amount_msat: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "5")] + pub destination: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, tag = "6")] + pub created_at: u64, + #[prost(message, optional, tag = "7")] + pub amount_sent_msat: ::core::option::Option, + #[prost(string, optional, tag = "8")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "9")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "10")] + pub bolt12: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "11")] + pub payment_preimage: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "12")] + pub message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "13")] + pub partid: ::core::option::Option, + #[prost(uint64, optional, tag = "14")] + pub created_index: ::core::option::Option, + #[prost(uint64, optional, tag = "15")] + pub updated_index: ::core::option::Option, +} +/// Nested message and enum types in `SendonionResponse`. +pub mod sendonion_response { + /// SendOnion.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum SendonionStatus { + Pending = 0, + Complete = 1, + } + impl SendonionStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SendonionStatus::Pending => "PENDING", + SendonionStatus::Complete => "COMPLETE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PENDING" => Some(Self::Pending), + "COMPLETE" => Some(Self::Complete), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendonionFirstHop { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub amount_msat: ::core::option::Option, + #[prost(uint32, tag = "3")] + pub delay: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListsendpaysRequest { + #[prost(string, optional, tag = "1")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "2")] + pub payment_hash: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost( + enumeration = "listsendpays_request::ListsendpaysStatus", + optional, + tag = "3" + )] + pub status: ::core::option::Option, + #[prost( + enumeration = "listsendpays_request::ListsendpaysIndex", + optional, + tag = "4" + )] + pub index: ::core::option::Option, + #[prost(uint64, optional, tag = "5")] + pub start: ::core::option::Option, + #[prost(uint32, optional, tag = "6")] + pub limit: ::core::option::Option, +} +/// Nested message and enum types in `ListsendpaysRequest`. +pub mod listsendpays_request { + /// ListSendPays.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListsendpaysStatus { + Pending = 0, + Complete = 1, + Failed = 2, + } + impl ListsendpaysStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListsendpaysStatus::Pending => "PENDING", + ListsendpaysStatus::Complete => "COMPLETE", + ListsendpaysStatus::Failed => "FAILED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PENDING" => Some(Self::Pending), + "COMPLETE" => Some(Self::Complete), + "FAILED" => Some(Self::Failed), + _ => None, + } + } + } + /// ListSendPays.index + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListsendpaysIndex { + Created = 0, + Updated = 1, + } + impl ListsendpaysIndex { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListsendpaysIndex::Created => "CREATED", + ListsendpaysIndex::Updated => "UPDATED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "CREATED" => Some(Self::Created), + "UPDATED" => Some(Self::Updated), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListsendpaysResponse { + #[prost(message, repeated, tag = "1")] + pub payments: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListsendpaysPayments { + #[prost(uint64, tag = "1")] + pub id: u64, + #[prost(uint64, tag = "2")] + pub groupid: u64, + #[prost(bytes = "vec", tag = "3")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost( + enumeration = "listsendpays_payments::ListsendpaysPaymentsStatus", + tag = "4" + )] + pub status: i32, + #[prost(message, optional, tag = "5")] + pub amount_msat: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "6")] + pub destination: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, tag = "7")] + pub created_at: u64, + #[prost(message, optional, tag = "8")] + pub amount_sent_msat: ::core::option::Option, + #[prost(string, optional, tag = "9")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "10")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "11")] + pub bolt12: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "12")] + pub payment_preimage: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "13")] + pub erroronion: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "14")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "15")] + pub partid: ::core::option::Option, + #[prost(uint64, optional, tag = "16")] + pub created_index: ::core::option::Option, + #[prost(uint64, optional, tag = "17")] + pub updated_index: ::core::option::Option, + #[prost(uint64, optional, tag = "18")] + pub completed_at: ::core::option::Option, +} +/// Nested message and enum types in `ListsendpaysPayments`. +pub mod listsendpays_payments { + /// ListSendPays.payments\[\].status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListsendpaysPaymentsStatus { + Pending = 0, + Failed = 1, + Complete = 2, + } + impl ListsendpaysPaymentsStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListsendpaysPaymentsStatus::Pending => "PENDING", + ListsendpaysPaymentsStatus::Failed => "FAILED", + ListsendpaysPaymentsStatus::Complete => "COMPLETE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PENDING" => Some(Self::Pending), + "FAILED" => Some(Self::Failed), + "COMPLETE" => Some(Self::Complete), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListtransactionsRequest {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListtransactionsResponse { + #[prost(message, repeated, tag = "1")] + pub transactions: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListtransactionsTransactions { + #[prost(bytes = "vec", tag = "1")] + pub hash: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub rawtx: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "3")] + pub blockheight: u32, + #[prost(uint32, tag = "4")] + pub txindex: u32, + #[prost(uint32, tag = "7")] + pub locktime: u32, + #[prost(uint32, tag = "8")] + pub version: u32, + #[prost(message, repeated, tag = "9")] + pub inputs: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "10")] + pub outputs: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListtransactionsTransactionsInputs { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub index: u32, + #[prost(uint32, tag = "3")] + pub sequence: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListtransactionsTransactionsOutputs { + #[prost(uint32, tag = "1")] + pub index: u32, + #[prost(bytes = "vec", tag = "3")] + pub script_pub_key: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "6")] + pub amount_msat: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MakesecretRequest { + #[prost(bytes = "vec", optional, tag = "1")] + pub hex: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "2")] + pub string: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MakesecretResponse { + #[prost(bytes = "vec", tag = "1")] + pub secret: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PayRequest { + #[prost(string, tag = "1")] + pub bolt11: ::prost::alloc::string::String, + #[prost(string, optional, tag = "3")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(double, optional, tag = "4")] + pub maxfeepercent: ::core::option::Option, + #[prost(uint32, optional, tag = "5")] + pub retry_for: ::core::option::Option, + #[prost(uint32, optional, tag = "6")] + pub maxdelay: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub exemptfee: ::core::option::Option, + #[prost(double, optional, tag = "8")] + pub riskfactor: ::core::option::Option, + #[prost(string, repeated, tag = "10")] + pub exclude: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag = "11")] + pub maxfee: ::core::option::Option, + #[prost(string, optional, tag = "12")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "13")] + pub amount_msat: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "14")] + pub localinvreqid: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(message, optional, tag = "15")] + pub partial_msat: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PayResponse { + #[prost(bytes = "vec", tag = "1")] + pub payment_preimage: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", optional, tag = "2")] + pub destination: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", tag = "3")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(double, tag = "4")] + pub created_at: f64, + #[prost(uint32, tag = "5")] + pub parts: u32, + #[prost(message, optional, tag = "6")] + pub amount_msat: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub amount_sent_msat: ::core::option::Option, + #[prost(string, optional, tag = "8")] + pub warning_partial_completion: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(enumeration = "pay_response::PayStatus", tag = "9")] + pub status: i32, +} +/// Nested message and enum types in `PayResponse`. +pub mod pay_response { + /// Pay.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum PayStatus { + Complete = 0, + Pending = 1, + Failed = 2, + } + impl PayStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + PayStatus::Complete => "COMPLETE", + PayStatus::Pending => "PENDING", + PayStatus::Failed => "FAILED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "COMPLETE" => Some(Self::Complete), + "PENDING" => Some(Self::Pending), + "FAILED" => Some(Self::Failed), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListnodesRequest { + #[prost(bytes = "vec", optional, tag = "1")] + pub id: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListnodesResponse { + #[prost(message, repeated, tag = "1")] + pub nodes: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListnodesNodes { + #[prost(bytes = "vec", tag = "1")] + pub nodeid: ::prost::alloc::vec::Vec, + #[prost(uint32, optional, tag = "2")] + pub last_timestamp: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub alias: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "4")] + pub color: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "5")] + pub features: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(message, repeated, tag = "6")] + pub addresses: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "7")] + pub option_will_fund: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListnodesNodesOptionWillFund { + #[prost(message, optional, tag = "1")] + pub lease_fee_base_msat: ::core::option::Option, + #[prost(uint32, tag = "2")] + pub lease_fee_basis: u32, + #[prost(uint32, tag = "3")] + pub funding_weight: u32, + #[prost(message, optional, tag = "4")] + pub channel_fee_max_base_msat: ::core::option::Option, + #[prost(uint32, tag = "5")] + pub channel_fee_max_proportional_thousandths: u32, + #[prost(bytes = "vec", tag = "6")] + pub compact_lease: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListnodesNodesAddresses { + #[prost( + enumeration = "listnodes_nodes_addresses::ListnodesNodesAddressesType", + tag = "1" + )] + pub item_type: i32, + #[prost(uint32, tag = "2")] + pub port: u32, + #[prost(string, optional, tag = "3")] + pub address: ::core::option::Option<::prost::alloc::string::String>, +} +/// Nested message and enum types in `ListnodesNodesAddresses`. +pub mod listnodes_nodes_addresses { + /// ListNodes.nodes\[\].addresses\[\].type + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListnodesNodesAddressesType { + Dns = 0, + Ipv4 = 1, + Ipv6 = 2, + Torv2 = 3, + Torv3 = 4, + } + impl ListnodesNodesAddressesType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListnodesNodesAddressesType::Dns => "DNS", + ListnodesNodesAddressesType::Ipv4 => "IPV4", + ListnodesNodesAddressesType::Ipv6 => "IPV6", + ListnodesNodesAddressesType::Torv2 => "TORV2", + ListnodesNodesAddressesType::Torv3 => "TORV3", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "DNS" => Some(Self::Dns), + "IPV4" => Some(Self::Ipv4), + "IPV6" => Some(Self::Ipv6), + "TORV2" => Some(Self::Torv2), + "TORV3" => Some(Self::Torv3), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct WaitanyinvoiceRequest { + #[prost(uint64, optional, tag = "1")] + pub lastpay_index: ::core::option::Option, + #[prost(uint64, optional, tag = "2")] + pub timeout: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WaitanyinvoiceResponse { + #[prost(string, tag = "1")] + pub label: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "3")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(enumeration = "waitanyinvoice_response::WaitanyinvoiceStatus", tag = "4")] + pub status: i32, + #[prost(uint64, tag = "5")] + pub expires_at: u64, + #[prost(message, optional, tag = "6")] + pub amount_msat: ::core::option::Option, + #[prost(string, optional, tag = "7")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "8")] + pub bolt12: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "9")] + pub pay_index: ::core::option::Option, + #[prost(message, optional, tag = "10")] + pub amount_received_msat: ::core::option::Option, + #[prost(uint64, optional, tag = "11")] + pub paid_at: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "12")] + pub payment_preimage: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, optional, tag = "13")] + pub created_index: ::core::option::Option, + #[prost(uint64, optional, tag = "14")] + pub updated_index: ::core::option::Option, + #[prost(message, optional, tag = "15")] + pub paid_outpoint: ::core::option::Option, +} +/// Nested message and enum types in `WaitanyinvoiceResponse`. +pub mod waitanyinvoice_response { + /// WaitAnyInvoice.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum WaitanyinvoiceStatus { + Paid = 0, + Expired = 1, + } + impl WaitanyinvoiceStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + WaitanyinvoiceStatus::Paid => "PAID", + WaitanyinvoiceStatus::Expired => "EXPIRED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PAID" => Some(Self::Paid), + "EXPIRED" => Some(Self::Expired), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WaitanyinvoicePaidOutpoint { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub outnum: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WaitinvoiceRequest { + #[prost(string, tag = "1")] + pub label: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WaitinvoiceResponse { + #[prost(string, tag = "1")] + pub label: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "3")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(enumeration = "waitinvoice_response::WaitinvoiceStatus", tag = "4")] + pub status: i32, + #[prost(uint64, tag = "5")] + pub expires_at: u64, + #[prost(message, optional, tag = "6")] + pub amount_msat: ::core::option::Option, + #[prost(string, optional, tag = "7")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "8")] + pub bolt12: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "9")] + pub pay_index: ::core::option::Option, + #[prost(message, optional, tag = "10")] + pub amount_received_msat: ::core::option::Option, + #[prost(uint64, optional, tag = "11")] + pub paid_at: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "12")] + pub payment_preimage: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, optional, tag = "13")] + pub created_index: ::core::option::Option, + #[prost(uint64, optional, tag = "14")] + pub updated_index: ::core::option::Option, + #[prost(message, optional, tag = "15")] + pub paid_outpoint: ::core::option::Option, +} +/// Nested message and enum types in `WaitinvoiceResponse`. +pub mod waitinvoice_response { + /// WaitInvoice.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum WaitinvoiceStatus { + Paid = 0, + Expired = 1, + } + impl WaitinvoiceStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + WaitinvoiceStatus::Paid => "PAID", + WaitinvoiceStatus::Expired => "EXPIRED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PAID" => Some(Self::Paid), + "EXPIRED" => Some(Self::Expired), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WaitinvoicePaidOutpoint { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub outnum: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WaitsendpayRequest { + #[prost(bytes = "vec", tag = "1")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(uint64, optional, tag = "2")] + pub partid: ::core::option::Option, + #[prost(uint32, optional, tag = "3")] + pub timeout: ::core::option::Option, + #[prost(uint64, optional, tag = "4")] + pub groupid: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WaitsendpayResponse { + #[prost(uint64, tag = "1")] + pub id: u64, + #[prost(uint64, optional, tag = "2")] + pub groupid: ::core::option::Option, + #[prost(bytes = "vec", tag = "3")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(enumeration = "waitsendpay_response::WaitsendpayStatus", tag = "4")] + pub status: i32, + #[prost(message, optional, tag = "5")] + pub amount_msat: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "6")] + pub destination: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, tag = "7")] + pub created_at: u64, + #[prost(message, optional, tag = "8")] + pub amount_sent_msat: ::core::option::Option, + #[prost(string, optional, tag = "9")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "10")] + pub partid: ::core::option::Option, + #[prost(string, optional, tag = "11")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "12")] + pub bolt12: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "13")] + pub payment_preimage: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(double, optional, tag = "14")] + pub completed_at: ::core::option::Option, + #[prost(uint64, optional, tag = "15")] + pub created_index: ::core::option::Option, + #[prost(uint64, optional, tag = "16")] + pub updated_index: ::core::option::Option, +} +/// Nested message and enum types in `WaitsendpayResponse`. +pub mod waitsendpay_response { + /// WaitSendPay.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum WaitsendpayStatus { + Complete = 0, + } + impl WaitsendpayStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + WaitsendpayStatus::Complete => "COMPLETE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "COMPLETE" => Some(Self::Complete), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct NewaddrRequest { + #[prost(enumeration = "newaddr_request::NewaddrAddresstype", optional, tag = "1")] + pub addresstype: ::core::option::Option, +} +/// Nested message and enum types in `NewaddrRequest`. +pub mod newaddr_request { + /// NewAddr.addresstype + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum NewaddrAddresstype { + Bech32 = 0, + All = 2, + P2tr = 3, + } + impl NewaddrAddresstype { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + NewaddrAddresstype::Bech32 => "BECH32", + NewaddrAddresstype::All => "ALL", + NewaddrAddresstype::P2tr => "P2TR", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "BECH32" => Some(Self::Bech32), + "ALL" => Some(Self::All), + "P2TR" => Some(Self::P2tr), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NewaddrResponse { + #[prost(string, optional, tag = "1")] + pub bech32: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub p2tr: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WithdrawRequest { + #[prost(string, tag = "1")] + pub destination: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub satoshi: ::core::option::Option, + #[prost(uint32, optional, tag = "3")] + pub minconf: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub utxos: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "5")] + pub feerate: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WithdrawResponse { + #[prost(bytes = "vec", tag = "1")] + pub tx: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(string, tag = "3")] + pub psbt: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct KeysendRequest { + #[prost(bytes = "vec", tag = "1")] + pub destination: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "3")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(double, optional, tag = "4")] + pub maxfeepercent: ::core::option::Option, + #[prost(uint32, optional, tag = "5")] + pub retry_for: ::core::option::Option, + #[prost(uint32, optional, tag = "6")] + pub maxdelay: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub exemptfee: ::core::option::Option, + #[prost(message, optional, tag = "8")] + pub routehints: ::core::option::Option, + #[prost(message, optional, tag = "9")] + pub extratlvs: ::core::option::Option, + #[prost(message, optional, tag = "10")] + pub amount_msat: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct KeysendResponse { + #[prost(bytes = "vec", tag = "1")] + pub payment_preimage: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", optional, tag = "2")] + pub destination: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", tag = "3")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(double, tag = "4")] + pub created_at: f64, + #[prost(uint32, tag = "5")] + pub parts: u32, + #[prost(message, optional, tag = "6")] + pub amount_msat: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub amount_sent_msat: ::core::option::Option, + #[prost(string, optional, tag = "8")] + pub warning_partial_completion: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(enumeration = "keysend_response::KeysendStatus", tag = "9")] + pub status: i32, +} +/// Nested message and enum types in `KeysendResponse`. +pub mod keysend_response { + /// KeySend.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum KeysendStatus { + Complete = 0, + } + impl KeysendStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + KeysendStatus::Complete => "COMPLETE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "COMPLETE" => Some(Self::Complete), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct FundpsbtRequest { + #[prost(message, optional, tag = "1")] + pub satoshi: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub feerate: ::core::option::Option, + #[prost(uint32, tag = "3")] + pub startweight: u32, + #[prost(uint32, optional, tag = "4")] + pub minconf: ::core::option::Option, + #[prost(uint32, optional, tag = "5")] + pub reserve: ::core::option::Option, + #[prost(uint32, optional, tag = "6")] + pub locktime: ::core::option::Option, + #[prost(uint32, optional, tag = "7")] + pub min_witness_weight: ::core::option::Option, + #[prost(bool, optional, tag = "8")] + pub excess_as_change: ::core::option::Option, + #[prost(bool, optional, tag = "9")] + pub nonwrapped: ::core::option::Option, + #[prost(bool, optional, tag = "10")] + pub opening_anchor_channel: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FundpsbtResponse { + #[prost(string, tag = "1")] + pub psbt: ::prost::alloc::string::String, + #[prost(uint32, tag = "2")] + pub feerate_per_kw: u32, + #[prost(uint32, tag = "3")] + pub estimated_final_weight: u32, + #[prost(message, optional, tag = "4")] + pub excess_msat: ::core::option::Option, + #[prost(uint32, optional, tag = "5")] + pub change_outnum: ::core::option::Option, + #[prost(message, repeated, tag = "6")] + pub reservations: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FundpsbtReservations { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub vout: u32, + #[prost(bool, tag = "3")] + pub was_reserved: bool, + #[prost(bool, tag = "4")] + pub reserved: bool, + #[prost(uint32, tag = "5")] + pub reserved_to_block: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendpsbtRequest { + #[prost(string, tag = "1")] + pub psbt: ::prost::alloc::string::String, + #[prost(uint32, optional, tag = "2")] + pub reserve: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendpsbtResponse { + #[prost(bytes = "vec", tag = "1")] + pub tx: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub txid: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignpsbtRequest { + #[prost(string, tag = "1")] + pub psbt: ::prost::alloc::string::String, + #[prost(uint32, repeated, tag = "2")] + pub signonly: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignpsbtResponse { + #[prost(string, tag = "1")] + pub signed_psbt: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UtxopsbtRequest { + #[prost(message, optional, tag = "1")] + pub satoshi: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub feerate: ::core::option::Option, + #[prost(uint32, tag = "3")] + pub startweight: u32, + #[prost(message, repeated, tag = "4")] + pub utxos: ::prost::alloc::vec::Vec, + #[prost(uint32, optional, tag = "5")] + pub reserve: ::core::option::Option, + #[prost(uint32, optional, tag = "6")] + pub locktime: ::core::option::Option, + #[prost(uint32, optional, tag = "7")] + pub min_witness_weight: ::core::option::Option, + #[prost(bool, optional, tag = "8")] + pub reservedok: ::core::option::Option, + #[prost(bool, optional, tag = "9")] + pub excess_as_change: ::core::option::Option, + #[prost(bool, optional, tag = "10")] + pub opening_anchor_channel: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UtxopsbtResponse { + #[prost(string, tag = "1")] + pub psbt: ::prost::alloc::string::String, + #[prost(uint32, tag = "2")] + pub feerate_per_kw: u32, + #[prost(uint32, tag = "3")] + pub estimated_final_weight: u32, + #[prost(message, optional, tag = "4")] + pub excess_msat: ::core::option::Option, + #[prost(uint32, optional, tag = "5")] + pub change_outnum: ::core::option::Option, + #[prost(message, repeated, tag = "6")] + pub reservations: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UtxopsbtReservations { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub vout: u32, + #[prost(bool, tag = "3")] + pub was_reserved: bool, + #[prost(bool, tag = "4")] + pub reserved: bool, + #[prost(uint32, tag = "5")] + pub reserved_to_block: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxdiscardRequest { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxdiscardResponse { + #[prost(bytes = "vec", tag = "1")] + pub unsigned_tx: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub txid: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxprepareRequest { + #[prost(message, optional, tag = "2")] + pub feerate: ::core::option::Option, + #[prost(uint32, optional, tag = "3")] + pub minconf: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub utxos: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub outputs: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxprepareResponse { + #[prost(string, tag = "1")] + pub psbt: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "2")] + pub unsigned_tx: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "3")] + pub txid: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxsendRequest { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxsendResponse { + #[prost(string, tag = "1")] + pub psbt: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "2")] + pub tx: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "3")] + pub txid: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListpeerchannelsRequest { + #[prost(bytes = "vec", optional, tag = "1")] + pub id: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListpeerchannelsResponse { + #[prost(message, repeated, tag = "1")] + pub channels: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListpeerchannelsChannels { + #[prost(bytes = "vec", tag = "1")] + pub peer_id: ::prost::alloc::vec::Vec, + #[prost(bool, tag = "2")] + pub peer_connected: bool, + #[prost( + enumeration = "listpeerchannels_channels::ListpeerchannelsChannelsState", + tag = "3" + )] + pub state: i32, + #[prost(bytes = "vec", optional, tag = "4")] + pub scratch_txid: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(message, optional, tag = "6")] + pub feerate: ::core::option::Option, + #[prost(string, optional, tag = "7")] + pub owner: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "8")] + pub short_channel_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "9")] + pub channel_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "10")] + pub funding_txid: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint32, optional, tag = "11")] + pub funding_outnum: ::core::option::Option, + #[prost(string, optional, tag = "12")] + pub initial_feerate: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "13")] + pub last_feerate: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "14")] + pub next_feerate: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint32, optional, tag = "15")] + pub next_fee_step: ::core::option::Option, + #[prost(message, repeated, tag = "16")] + pub inflight: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", optional, tag = "17")] + pub close_to: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bool, optional, tag = "18")] + pub private: ::core::option::Option, + #[prost(enumeration = "ChannelSide", tag = "19")] + pub opener: i32, + #[prost(enumeration = "ChannelSide", optional, tag = "20")] + pub closer: ::core::option::Option, + #[prost(message, optional, tag = "22")] + pub funding: ::core::option::Option, + #[prost(message, optional, tag = "23")] + pub to_us_msat: ::core::option::Option, + #[prost(message, optional, tag = "24")] + pub min_to_us_msat: ::core::option::Option, + #[prost(message, optional, tag = "25")] + pub max_to_us_msat: ::core::option::Option, + #[prost(message, optional, tag = "26")] + pub total_msat: ::core::option::Option, + #[prost(message, optional, tag = "27")] + pub fee_base_msat: ::core::option::Option, + #[prost(uint32, optional, tag = "28")] + pub fee_proportional_millionths: ::core::option::Option, + #[prost(message, optional, tag = "29")] + pub dust_limit_msat: ::core::option::Option, + #[prost(message, optional, tag = "30")] + pub max_total_htlc_in_msat: ::core::option::Option, + #[prost(message, optional, tag = "31")] + pub their_reserve_msat: ::core::option::Option, + #[prost(message, optional, tag = "32")] + pub our_reserve_msat: ::core::option::Option, + #[prost(message, optional, tag = "33")] + pub spendable_msat: ::core::option::Option, + #[prost(message, optional, tag = "34")] + pub receivable_msat: ::core::option::Option, + #[prost(message, optional, tag = "35")] + pub minimum_htlc_in_msat: ::core::option::Option, + #[prost(message, optional, tag = "36")] + pub minimum_htlc_out_msat: ::core::option::Option, + #[prost(message, optional, tag = "37")] + pub maximum_htlc_out_msat: ::core::option::Option, + #[prost(uint32, optional, tag = "38")] + pub their_to_self_delay: ::core::option::Option, + #[prost(uint32, optional, tag = "39")] + pub our_to_self_delay: ::core::option::Option, + #[prost(uint32, optional, tag = "40")] + pub max_accepted_htlcs: ::core::option::Option, + #[prost(message, optional, tag = "41")] + pub alias: ::core::option::Option, + #[prost(string, repeated, tag = "43")] + pub status: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "44")] + pub in_payments_offered: ::core::option::Option, + #[prost(message, optional, tag = "45")] + pub in_offered_msat: ::core::option::Option, + #[prost(uint64, optional, tag = "46")] + pub in_payments_fulfilled: ::core::option::Option, + #[prost(message, optional, tag = "47")] + pub in_fulfilled_msat: ::core::option::Option, + #[prost(uint64, optional, tag = "48")] + pub out_payments_offered: ::core::option::Option, + #[prost(message, optional, tag = "49")] + pub out_offered_msat: ::core::option::Option, + #[prost(uint64, optional, tag = "50")] + pub out_payments_fulfilled: ::core::option::Option, + #[prost(message, optional, tag = "51")] + pub out_fulfilled_msat: ::core::option::Option, + #[prost(message, repeated, tag = "52")] + pub htlcs: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "53")] + pub close_to_addr: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "54")] + pub ignore_fee_limits: ::core::option::Option, + #[prost(message, optional, tag = "55")] + pub updates: ::core::option::Option, + #[prost(uint64, optional, tag = "56")] + pub last_stable_connection: ::core::option::Option, + #[prost(bool, optional, tag = "57")] + pub lost_state: ::core::option::Option, + #[prost(bool, optional, tag = "58")] + pub reestablished: ::core::option::Option, + #[prost(message, optional, tag = "59")] + pub last_tx_fee_msat: ::core::option::Option, + #[prost(uint32, optional, tag = "60")] + pub direction: ::core::option::Option, +} +/// Nested message and enum types in `ListpeerchannelsChannels`. +pub mod listpeerchannels_channels { + /// ListPeerChannels.channels\[\].state + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListpeerchannelsChannelsState { + Openingd = 0, + ChanneldAwaitingLockin = 1, + ChanneldNormal = 2, + ChanneldShuttingDown = 3, + ClosingdSigexchange = 4, + ClosingdComplete = 5, + AwaitingUnilateral = 6, + FundingSpendSeen = 7, + Onchain = 8, + DualopendOpenInit = 9, + DualopendAwaitingLockin = 10, + ChanneldAwaitingSplice = 11, + DualopendOpenCommitted = 12, + DualopendOpenCommitReady = 13, + } + impl ListpeerchannelsChannelsState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListpeerchannelsChannelsState::Openingd => "OPENINGD", + ListpeerchannelsChannelsState::ChanneldAwaitingLockin => { + "CHANNELD_AWAITING_LOCKIN" + } + ListpeerchannelsChannelsState::ChanneldNormal => "CHANNELD_NORMAL", + ListpeerchannelsChannelsState::ChanneldShuttingDown => { + "CHANNELD_SHUTTING_DOWN" + } + ListpeerchannelsChannelsState::ClosingdSigexchange => { + "CLOSINGD_SIGEXCHANGE" + } + ListpeerchannelsChannelsState::ClosingdComplete => "CLOSINGD_COMPLETE", + ListpeerchannelsChannelsState::AwaitingUnilateral => { + "AWAITING_UNILATERAL" + } + ListpeerchannelsChannelsState::FundingSpendSeen => "FUNDING_SPEND_SEEN", + ListpeerchannelsChannelsState::Onchain => "ONCHAIN", + ListpeerchannelsChannelsState::DualopendOpenInit => "DUALOPEND_OPEN_INIT", + ListpeerchannelsChannelsState::DualopendAwaitingLockin => { + "DUALOPEND_AWAITING_LOCKIN" + } + ListpeerchannelsChannelsState::ChanneldAwaitingSplice => { + "CHANNELD_AWAITING_SPLICE" + } + ListpeerchannelsChannelsState::DualopendOpenCommitted => { + "DUALOPEND_OPEN_COMMITTED" + } + ListpeerchannelsChannelsState::DualopendOpenCommitReady => { + "DUALOPEND_OPEN_COMMIT_READY" + } + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OPENINGD" => Some(Self::Openingd), + "CHANNELD_AWAITING_LOCKIN" => Some(Self::ChanneldAwaitingLockin), + "CHANNELD_NORMAL" => Some(Self::ChanneldNormal), + "CHANNELD_SHUTTING_DOWN" => Some(Self::ChanneldShuttingDown), + "CLOSINGD_SIGEXCHANGE" => Some(Self::ClosingdSigexchange), + "CLOSINGD_COMPLETE" => Some(Self::ClosingdComplete), + "AWAITING_UNILATERAL" => Some(Self::AwaitingUnilateral), + "FUNDING_SPEND_SEEN" => Some(Self::FundingSpendSeen), + "ONCHAIN" => Some(Self::Onchain), + "DUALOPEND_OPEN_INIT" => Some(Self::DualopendOpenInit), + "DUALOPEND_AWAITING_LOCKIN" => Some(Self::DualopendAwaitingLockin), + "CHANNELD_AWAITING_SPLICE" => Some(Self::ChanneldAwaitingSplice), + "DUALOPEND_OPEN_COMMITTED" => Some(Self::DualopendOpenCommitted), + "DUALOPEND_OPEN_COMMIT_READY" => Some(Self::DualopendOpenCommitReady), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListpeerchannelsChannelsUpdates { + #[prost(message, optional, tag = "1")] + pub local: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub remote: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListpeerchannelsChannelsUpdatesLocal { + #[prost(message, optional, tag = "1")] + pub htlc_minimum_msat: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub htlc_maximum_msat: ::core::option::Option, + #[prost(uint32, tag = "3")] + pub cltv_expiry_delta: u32, + #[prost(message, optional, tag = "4")] + pub fee_base_msat: ::core::option::Option, + #[prost(uint32, tag = "5")] + pub fee_proportional_millionths: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListpeerchannelsChannelsUpdatesRemote { + #[prost(message, optional, tag = "1")] + pub htlc_minimum_msat: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub htlc_maximum_msat: ::core::option::Option, + #[prost(uint32, tag = "3")] + pub cltv_expiry_delta: u32, + #[prost(message, optional, tag = "4")] + pub fee_base_msat: ::core::option::Option, + #[prost(uint32, tag = "5")] + pub fee_proportional_millionths: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListpeerchannelsChannelsFeerate { + #[prost(uint32, tag = "1")] + pub perkw: u32, + #[prost(uint32, tag = "2")] + pub perkb: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListpeerchannelsChannelsInflight { + #[prost(bytes = "vec", tag = "1")] + pub funding_txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub funding_outnum: u32, + #[prost(string, tag = "3")] + pub feerate: ::prost::alloc::string::String, + #[prost(message, optional, tag = "4")] + pub total_funding_msat: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub our_funding_msat: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "6")] + pub scratch_txid: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(sint64, optional, tag = "7")] + pub splice_amount: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListpeerchannelsChannelsFunding { + #[prost(message, optional, tag = "1")] + pub pushed_msat: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub local_funds_msat: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub remote_funds_msat: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub fee_paid_msat: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub fee_rcvd_msat: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListpeerchannelsChannelsAlias { + #[prost(string, optional, tag = "1")] + pub local: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "2")] + pub remote: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListpeerchannelsChannelsHtlcs { + #[prost( + enumeration = "listpeerchannels_channels_htlcs::ListpeerchannelsChannelsHtlcsDirection", + tag = "1" + )] + pub direction: i32, + #[prost(uint64, tag = "2")] + pub id: u64, + #[prost(message, optional, tag = "3")] + pub amount_msat: ::core::option::Option, + #[prost(uint32, tag = "4")] + pub expiry: u32, + #[prost(bytes = "vec", tag = "5")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(bool, optional, tag = "6")] + pub local_trimmed: ::core::option::Option, + #[prost(string, optional, tag = "7")] + pub status: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration = "HtlcState", tag = "8")] + pub state: i32, +} +/// Nested message and enum types in `ListpeerchannelsChannelsHtlcs`. +pub mod listpeerchannels_channels_htlcs { + /// ListPeerChannels.channels\[\].htlcs\[\].direction + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListpeerchannelsChannelsHtlcsDirection { + In = 0, + Out = 1, + } + impl ListpeerchannelsChannelsHtlcsDirection { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListpeerchannelsChannelsHtlcsDirection::In => "IN", + ListpeerchannelsChannelsHtlcsDirection::Out => "OUT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IN" => Some(Self::In), + "OUT" => Some(Self::Out), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListclosedchannelsRequest { + #[prost(bytes = "vec", optional, tag = "1")] + pub id: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListclosedchannelsResponse { + #[prost(message, repeated, tag = "1")] + pub closedchannels: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListclosedchannelsClosedchannels { + #[prost(bytes = "vec", optional, tag = "1")] + pub peer_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", tag = "2")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "3")] + pub short_channel_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "4")] + pub alias: ::core::option::Option, + #[prost(enumeration = "ChannelSide", tag = "5")] + pub opener: i32, + #[prost(enumeration = "ChannelSide", optional, tag = "6")] + pub closer: ::core::option::Option, + #[prost(bool, tag = "7")] + pub private: bool, + #[prost(uint64, tag = "9")] + pub total_local_commitments: u64, + #[prost(uint64, tag = "10")] + pub total_remote_commitments: u64, + #[prost(uint64, tag = "11")] + pub total_htlcs_sent: u64, + #[prost(bytes = "vec", tag = "12")] + pub funding_txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "13")] + pub funding_outnum: u32, + #[prost(bool, tag = "14")] + pub leased: bool, + #[prost(message, optional, tag = "15")] + pub funding_fee_paid_msat: ::core::option::Option, + #[prost(message, optional, tag = "16")] + pub funding_fee_rcvd_msat: ::core::option::Option, + #[prost(message, optional, tag = "17")] + pub funding_pushed_msat: ::core::option::Option, + #[prost(message, optional, tag = "18")] + pub total_msat: ::core::option::Option, + #[prost(message, optional, tag = "19")] + pub final_to_us_msat: ::core::option::Option, + #[prost(message, optional, tag = "20")] + pub min_to_us_msat: ::core::option::Option, + #[prost(message, optional, tag = "21")] + pub max_to_us_msat: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "22")] + pub last_commitment_txid: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(message, optional, tag = "23")] + pub last_commitment_fee_msat: ::core::option::Option, + #[prost( + enumeration = "listclosedchannels_closedchannels::ListclosedchannelsClosedchannelsCloseCause", + tag = "24" + )] + pub close_cause: i32, + #[prost(uint64, optional, tag = "25")] + pub last_stable_connection: ::core::option::Option, +} +/// Nested message and enum types in `ListclosedchannelsClosedchannels`. +pub mod listclosedchannels_closedchannels { + /// ListClosedChannels.closedchannels\[\].close_cause + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListclosedchannelsClosedchannelsCloseCause { + Unknown = 0, + Local = 1, + User = 2, + Remote = 3, + Protocol = 4, + Onchain = 5, + } + impl ListclosedchannelsClosedchannelsCloseCause { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListclosedchannelsClosedchannelsCloseCause::Unknown => "UNKNOWN", + ListclosedchannelsClosedchannelsCloseCause::Local => "LOCAL", + ListclosedchannelsClosedchannelsCloseCause::User => "USER", + ListclosedchannelsClosedchannelsCloseCause::Remote => "REMOTE", + ListclosedchannelsClosedchannelsCloseCause::Protocol => "PROTOCOL", + ListclosedchannelsClosedchannelsCloseCause::Onchain => "ONCHAIN", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "UNKNOWN" => Some(Self::Unknown), + "LOCAL" => Some(Self::Local), + "USER" => Some(Self::User), + "REMOTE" => Some(Self::Remote), + "PROTOCOL" => Some(Self::Protocol), + "ONCHAIN" => Some(Self::Onchain), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListclosedchannelsClosedchannelsAlias { + #[prost(string, optional, tag = "1")] + pub local: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "2")] + pub remote: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodepayRequest { + #[prost(string, tag = "1")] + pub bolt11: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub description: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodepayResponse { + #[prost(string, tag = "1")] + pub currency: ::prost::alloc::string::String, + #[prost(uint64, tag = "2")] + pub created_at: u64, + #[prost(uint64, tag = "3")] + pub expiry: u64, + #[prost(bytes = "vec", tag = "4")] + pub payee: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "5")] + pub amount_msat: ::core::option::Option, + #[prost(bytes = "vec", tag = "6")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(string, tag = "7")] + pub signature: ::prost::alloc::string::String, + #[prost(string, optional, tag = "8")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "9")] + pub description_hash: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint32, tag = "10")] + pub min_final_cltv_expiry: u32, + #[prost(bytes = "vec", optional, tag = "11")] + pub payment_secret: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "12")] + pub features: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "13")] + pub payment_metadata: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(message, repeated, tag = "14")] + pub fallbacks: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "16")] + pub extra: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "17")] + pub routes: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodepayFallbacks { + #[prost(enumeration = "decodepay_fallbacks::DecodepayFallbacksType", tag = "1")] + pub item_type: i32, + #[prost(string, optional, tag = "2")] + pub addr: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", tag = "3")] + pub hex: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `DecodepayFallbacks`. +pub mod decodepay_fallbacks { + /// DecodePay.fallbacks\[\].type + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum DecodepayFallbacksType { + P2pkh = 0, + P2sh = 1, + P2wpkh = 2, + P2wsh = 3, + P2tr = 4, + } + impl DecodepayFallbacksType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + DecodepayFallbacksType::P2pkh => "P2PKH", + DecodepayFallbacksType::P2sh => "P2SH", + DecodepayFallbacksType::P2wpkh => "P2WPKH", + DecodepayFallbacksType::P2wsh => "P2WSH", + DecodepayFallbacksType::P2tr => "P2TR", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "P2PKH" => Some(Self::P2pkh), + "P2SH" => Some(Self::P2sh), + "P2WPKH" => Some(Self::P2wpkh), + "P2WSH" => Some(Self::P2wsh), + "P2TR" => Some(Self::P2tr), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodepayExtra { + #[prost(string, tag = "1")] + pub tag: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub data: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodeRequest { + #[prost(string, tag = "1")] + pub string: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodeResponse { + #[prost(enumeration = "decode_response::DecodeType", tag = "1")] + pub item_type: i32, + #[prost(bool, tag = "2")] + pub valid: bool, + #[prost(bytes = "vec", optional, tag = "3")] + pub offer_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", repeated, tag = "4")] + pub offer_chains: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "5")] + pub offer_metadata: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "6")] + pub offer_currency: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "7")] + pub warning_unknown_offer_currency: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(uint32, optional, tag = "8")] + pub currency_minor_unit: ::core::option::Option, + #[prost(uint64, optional, tag = "9")] + pub offer_amount: ::core::option::Option, + #[prost(message, optional, tag = "10")] + pub offer_amount_msat: ::core::option::Option, + #[prost(string, optional, tag = "11")] + pub offer_description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "12")] + pub offer_issuer: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "13")] + pub offer_features: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, optional, tag = "14")] + pub offer_absolute_expiry: ::core::option::Option, + #[prost(uint64, optional, tag = "15")] + pub offer_quantity_max: ::core::option::Option, + #[prost(message, repeated, tag = "16")] + pub offer_paths: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", optional, tag = "17")] + pub offer_node_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "20")] + pub warning_missing_offer_node_id: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "21")] + pub warning_invalid_offer_description: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "22")] + pub warning_missing_offer_description: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "23")] + pub warning_invalid_offer_currency: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "24")] + pub warning_invalid_offer_issuer: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(bytes = "vec", optional, tag = "25")] + pub invreq_metadata: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "26")] + pub invreq_payer_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "27")] + pub invreq_chain: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(message, optional, tag = "28")] + pub invreq_amount_msat: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "29")] + pub invreq_features: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, optional, tag = "30")] + pub invreq_quantity: ::core::option::Option, + #[prost(string, optional, tag = "31")] + pub invreq_payer_note: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint32, optional, tag = "32")] + pub invreq_recurrence_counter: ::core::option::Option, + #[prost(uint32, optional, tag = "33")] + pub invreq_recurrence_start: ::core::option::Option, + #[prost(string, optional, tag = "35")] + pub warning_missing_invreq_metadata: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "36")] + pub warning_missing_invreq_payer_id: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "37")] + pub warning_invalid_invreq_payer_note: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "38")] + pub warning_missing_invoice_request_signature: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "39")] + pub warning_invalid_invoice_request_signature: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(uint64, optional, tag = "41")] + pub invoice_created_at: ::core::option::Option, + #[prost(uint32, optional, tag = "42")] + pub invoice_relative_expiry: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "43")] + pub invoice_payment_hash: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(message, optional, tag = "44")] + pub invoice_amount_msat: ::core::option::Option, + #[prost(message, repeated, tag = "45")] + pub invoice_fallbacks: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", optional, tag = "46")] + pub invoice_features: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "47")] + pub invoice_node_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, optional, tag = "48")] + pub invoice_recurrence_basetime: ::core::option::Option, + #[prost(string, optional, tag = "50")] + pub warning_missing_invoice_paths: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "51")] + pub warning_missing_invoice_blindedpay: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "52")] + pub warning_missing_invoice_created_at: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "53")] + pub warning_missing_invoice_payment_hash: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "54")] + pub warning_missing_invoice_amount: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "55")] + pub warning_missing_invoice_recurrence_basetime: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "56")] + pub warning_missing_invoice_node_id: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "57")] + pub warning_missing_invoice_signature: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(string, optional, tag = "58")] + pub warning_invalid_invoice_signature: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(message, repeated, tag = "59")] + pub fallbacks: ::prost::alloc::vec::Vec, + #[prost(uint64, optional, tag = "60")] + pub created_at: ::core::option::Option, + #[prost(uint64, optional, tag = "61")] + pub expiry: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "62")] + pub payee: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "63")] + pub payment_hash: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "64")] + pub description_hash: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint32, optional, tag = "65")] + pub min_final_cltv_expiry: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "66")] + pub payment_secret: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "67")] + pub payment_metadata: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(message, repeated, tag = "69")] + pub extra: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "70")] + pub unique_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "71")] + pub version: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "72")] + pub string: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "73")] + pub restrictions: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "74")] + pub warning_rune_invalid_utf8: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(bytes = "vec", optional, tag = "75")] + pub hex: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "76")] + pub decrypted: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "77")] + pub signature: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "78")] + pub currency: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "79")] + pub amount_msat: ::core::option::Option, + #[prost(string, optional, tag = "80")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "81")] + pub features: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(message, optional, tag = "82")] + pub routes: ::core::option::Option, +} +/// Nested message and enum types in `DecodeResponse`. +pub mod decode_response { + /// Decode.type + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum DecodeType { + Bolt12Offer = 0, + Bolt12Invoice = 1, + Bolt12InvoiceRequest = 2, + Bolt11Invoice = 3, + Rune = 4, + EmergencyRecover = 5, + } + impl DecodeType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + DecodeType::Bolt12Offer => "BOLT12_OFFER", + DecodeType::Bolt12Invoice => "BOLT12_INVOICE", + DecodeType::Bolt12InvoiceRequest => "BOLT12_INVOICE_REQUEST", + DecodeType::Bolt11Invoice => "BOLT11_INVOICE", + DecodeType::Rune => "RUNE", + DecodeType::EmergencyRecover => "EMERGENCY_RECOVER", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "BOLT12_OFFER" => Some(Self::Bolt12Offer), + "BOLT12_INVOICE" => Some(Self::Bolt12Invoice), + "BOLT12_INVOICE_REQUEST" => Some(Self::Bolt12InvoiceRequest), + "BOLT11_INVOICE" => Some(Self::Bolt11Invoice), + "RUNE" => Some(Self::Rune), + "EMERGENCY_RECOVER" => Some(Self::EmergencyRecover), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodeOfferPaths { + #[prost(bytes = "vec", optional, tag = "1")] + pub first_node_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", tag = "2")] + pub blinding: ::prost::alloc::vec::Vec, + #[prost(uint32, optional, tag = "4")] + pub first_scid_dir: ::core::option::Option, + #[prost(string, optional, tag = "5")] + pub first_scid: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct DecodeOfferRecurrencePaywindow { + #[prost(uint32, tag = "1")] + pub seconds_before: u32, + #[prost(uint32, tag = "2")] + pub seconds_after: u32, + #[prost(bool, optional, tag = "3")] + pub proportional_amount: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodeInvoicePathsPath { + #[prost(bytes = "vec", tag = "1")] + pub blinded_node_id: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub encrypted_recipient_data: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodeInvoiceFallbacks { + #[prost(uint32, tag = "1")] + pub version: u32, + #[prost(bytes = "vec", tag = "2")] + pub hex: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "3")] + pub address: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodeFallbacks { + #[prost(string, optional, tag = "1")] + pub warning_invoice_fallbacks_version_invalid: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(enumeration = "decode_fallbacks::DecodeFallbacksType", tag = "2")] + pub item_type: i32, + #[prost(string, optional, tag = "3")] + pub addr: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", tag = "4")] + pub hex: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `DecodeFallbacks`. +pub mod decode_fallbacks { + /// Decode.fallbacks\[\].type + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum DecodeFallbacksType { + P2pkh = 0, + P2sh = 1, + P2wpkh = 2, + P2wsh = 3, + P2tr = 4, + } + impl DecodeFallbacksType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + DecodeFallbacksType::P2pkh => "P2PKH", + DecodeFallbacksType::P2sh => "P2SH", + DecodeFallbacksType::P2wpkh => "P2WPKH", + DecodeFallbacksType::P2wsh => "P2WSH", + DecodeFallbacksType::P2tr => "P2TR", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "P2PKH" => Some(Self::P2pkh), + "P2SH" => Some(Self::P2sh), + "P2WPKH" => Some(Self::P2wpkh), + "P2WSH" => Some(Self::P2wsh), + "P2TR" => Some(Self::P2tr), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodeExtra { + #[prost(string, tag = "1")] + pub tag: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub data: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DecodeRestrictions { + #[prost(string, repeated, tag = "1")] + pub alternatives: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag = "2")] + pub summary: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DelpayRequest { + #[prost(bytes = "vec", tag = "1")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(enumeration = "delpay_request::DelpayStatus", tag = "2")] + pub status: i32, + #[prost(uint64, optional, tag = "3")] + pub partid: ::core::option::Option, + #[prost(uint64, optional, tag = "4")] + pub groupid: ::core::option::Option, +} +/// Nested message and enum types in `DelpayRequest`. +pub mod delpay_request { + /// DelPay.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum DelpayStatus { + Complete = 0, + Failed = 1, + } + impl DelpayStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + DelpayStatus::Complete => "COMPLETE", + DelpayStatus::Failed => "FAILED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "COMPLETE" => Some(Self::Complete), + "FAILED" => Some(Self::Failed), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DelpayResponse { + #[prost(message, repeated, tag = "1")] + pub payments: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DelpayPayments { + #[prost(uint64, optional, tag = "1")] + pub created_index: ::core::option::Option, + #[prost(uint64, tag = "2")] + pub id: u64, + #[prost(bytes = "vec", tag = "3")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(enumeration = "delpay_payments::DelpayPaymentsStatus", tag = "4")] + pub status: i32, + #[prost(message, optional, tag = "5")] + pub amount_sent_msat: ::core::option::Option, + #[prost(uint64, optional, tag = "6")] + pub partid: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "7")] + pub destination: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(message, optional, tag = "8")] + pub amount_msat: ::core::option::Option, + #[prost(uint64, tag = "9")] + pub created_at: u64, + #[prost(uint64, optional, tag = "10")] + pub updated_index: ::core::option::Option, + #[prost(uint64, optional, tag = "11")] + pub completed_at: ::core::option::Option, + #[prost(uint64, optional, tag = "12")] + pub groupid: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "13")] + pub payment_preimage: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "14")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "15")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "16")] + pub bolt12: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "17")] + pub erroronion: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// Nested message and enum types in `DelpayPayments`. +pub mod delpay_payments { + /// DelPay.payments\[\].status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum DelpayPaymentsStatus { + Pending = 0, + Failed = 1, + Complete = 2, + } + impl DelpayPaymentsStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + DelpayPaymentsStatus::Pending => "PENDING", + DelpayPaymentsStatus::Failed => "FAILED", + DelpayPaymentsStatus::Complete => "COMPLETE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PENDING" => Some(Self::Pending), + "FAILED" => Some(Self::Failed), + "COMPLETE" => Some(Self::Complete), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DelforwardRequest { + #[prost(string, tag = "1")] + pub in_channel: ::prost::alloc::string::String, + #[prost(uint64, tag = "2")] + pub in_htlc_id: u64, + #[prost(enumeration = "delforward_request::DelforwardStatus", tag = "3")] + pub status: i32, +} +/// Nested message and enum types in `DelforwardRequest`. +pub mod delforward_request { + /// DelForward.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum DelforwardStatus { + Settled = 0, + LocalFailed = 1, + Failed = 2, + } + impl DelforwardStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + DelforwardStatus::Settled => "SETTLED", + DelforwardStatus::LocalFailed => "LOCAL_FAILED", + DelforwardStatus::Failed => "FAILED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SETTLED" => Some(Self::Settled), + "LOCAL_FAILED" => Some(Self::LocalFailed), + "FAILED" => Some(Self::Failed), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct DelforwardResponse {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DisableofferRequest { + #[prost(bytes = "vec", tag = "1")] + pub offer_id: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DisableofferResponse { + #[prost(bytes = "vec", tag = "1")] + pub offer_id: ::prost::alloc::vec::Vec, + #[prost(bool, tag = "2")] + pub active: bool, + #[prost(bool, tag = "3")] + pub single_use: bool, + #[prost(string, tag = "4")] + pub bolt12: ::prost::alloc::string::String, + #[prost(bool, tag = "5")] + pub used: bool, + #[prost(string, optional, tag = "6")] + pub label: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DisconnectRequest { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(bool, optional, tag = "2")] + pub force: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct DisconnectResponse {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct FeeratesRequest { + #[prost(enumeration = "feerates_request::FeeratesStyle", tag = "1")] + pub style: i32, +} +/// Nested message and enum types in `FeeratesRequest`. +pub mod feerates_request { + /// Feerates.style + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum FeeratesStyle { + Perkb = 0, + Perkw = 1, + } + impl FeeratesStyle { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + FeeratesStyle::Perkb => "PERKB", + FeeratesStyle::Perkw => "PERKW", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PERKB" => Some(Self::Perkb), + "PERKW" => Some(Self::Perkw), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FeeratesResponse { + #[prost(string, optional, tag = "1")] + pub warning_missing_feerates: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "2")] + pub perkb: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub perkw: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub onchain_fee_estimates: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FeeratesPerkb { + #[prost(uint32, tag = "1")] + pub min_acceptable: u32, + #[prost(uint32, tag = "2")] + pub max_acceptable: u32, + #[prost(uint32, optional, tag = "3")] + pub opening: ::core::option::Option, + #[prost(uint32, optional, tag = "4")] + pub mutual_close: ::core::option::Option, + #[prost(uint32, optional, tag = "5")] + pub unilateral_close: ::core::option::Option, + #[prost(uint32, optional, tag = "6")] + pub delayed_to_us: ::core::option::Option, + #[prost(uint32, optional, tag = "7")] + pub htlc_resolution: ::core::option::Option, + #[prost(uint32, optional, tag = "8")] + pub penalty: ::core::option::Option, + #[prost(message, repeated, tag = "9")] + pub estimates: ::prost::alloc::vec::Vec, + #[prost(uint32, optional, tag = "10")] + pub floor: ::core::option::Option, + #[prost(uint32, optional, tag = "11")] + pub unilateral_anchor_close: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct FeeratesPerkbEstimates { + #[prost(uint32, tag = "1")] + pub blockcount: u32, + #[prost(uint32, tag = "2")] + pub feerate: u32, + #[prost(uint32, tag = "3")] + pub smoothed_feerate: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FeeratesPerkw { + #[prost(uint32, tag = "1")] + pub min_acceptable: u32, + #[prost(uint32, tag = "2")] + pub max_acceptable: u32, + #[prost(uint32, optional, tag = "3")] + pub opening: ::core::option::Option, + #[prost(uint32, optional, tag = "4")] + pub mutual_close: ::core::option::Option, + #[prost(uint32, optional, tag = "5")] + pub unilateral_close: ::core::option::Option, + #[prost(uint32, optional, tag = "6")] + pub delayed_to_us: ::core::option::Option, + #[prost(uint32, optional, tag = "7")] + pub htlc_resolution: ::core::option::Option, + #[prost(uint32, optional, tag = "8")] + pub penalty: ::core::option::Option, + #[prost(message, repeated, tag = "9")] + pub estimates: ::prost::alloc::vec::Vec, + #[prost(uint32, optional, tag = "10")] + pub floor: ::core::option::Option, + #[prost(uint32, optional, tag = "11")] + pub unilateral_anchor_close: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct FeeratesPerkwEstimates { + #[prost(uint32, tag = "1")] + pub blockcount: u32, + #[prost(uint32, tag = "2")] + pub feerate: u32, + #[prost(uint32, tag = "3")] + pub smoothed_feerate: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct FeeratesOnchainFeeEstimates { + #[prost(uint64, tag = "1")] + pub opening_channel_satoshis: u64, + #[prost(uint64, tag = "2")] + pub mutual_close_satoshis: u64, + #[prost(uint64, tag = "3")] + pub unilateral_close_satoshis: u64, + #[prost(uint64, tag = "4")] + pub htlc_timeout_satoshis: u64, + #[prost(uint64, tag = "5")] + pub htlc_success_satoshis: u64, + #[prost(uint64, optional, tag = "6")] + pub unilateral_close_nonanchor_satoshis: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FetchinvoiceRequest { + #[prost(string, tag = "1")] + pub offer: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub amount_msat: ::core::option::Option, + #[prost(uint64, optional, tag = "3")] + pub quantity: ::core::option::Option, + #[prost(uint64, optional, tag = "4")] + pub recurrence_counter: ::core::option::Option, + #[prost(double, optional, tag = "5")] + pub recurrence_start: ::core::option::Option, + #[prost(string, optional, tag = "6")] + pub recurrence_label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(double, optional, tag = "7")] + pub timeout: ::core::option::Option, + #[prost(string, optional, tag = "8")] + pub payer_note: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FetchinvoiceResponse { + #[prost(string, tag = "1")] + pub invoice: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub changes: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub next_period: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FetchinvoiceChanges { + #[prost(string, optional, tag = "1")] + pub description_appended: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "2")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub vendor_removed: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "4")] + pub vendor: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "5")] + pub amount_msat: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct FetchinvoiceNextPeriod { + #[prost(uint64, tag = "1")] + pub counter: u64, + #[prost(uint64, tag = "2")] + pub starttime: u64, + #[prost(uint64, tag = "3")] + pub endtime: u64, + #[prost(uint64, tag = "4")] + pub paywindow_start: u64, + #[prost(uint64, tag = "5")] + pub paywindow_end: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FundchannelCancelRequest { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FundchannelCancelResponse { + #[prost(string, tag = "1")] + pub cancelled: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FundchannelCompleteRequest { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub psbt: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FundchannelCompleteResponse { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(bool, tag = "2")] + pub commitments_secured: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FundchannelRequest { + #[prost(message, optional, tag = "1")] + pub amount: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub feerate: ::core::option::Option, + #[prost(bool, optional, tag = "3")] + pub announce: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub push_msat: ::core::option::Option, + #[prost(string, optional, tag = "6")] + pub close_to: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "7")] + pub request_amt: ::core::option::Option, + #[prost(string, optional, tag = "8")] + pub compact_lease: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", tag = "9")] + pub id: ::prost::alloc::vec::Vec, + #[prost(uint32, optional, tag = "10")] + pub minconf: ::core::option::Option, + #[prost(message, repeated, tag = "11")] + pub utxos: ::prost::alloc::vec::Vec, + #[prost(uint32, optional, tag = "12")] + pub mindepth: ::core::option::Option, + #[prost(message, optional, tag = "13")] + pub reserve: ::core::option::Option, + #[prost(uint32, repeated, tag = "14")] + pub channel_type: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FundchannelResponse { + #[prost(bytes = "vec", tag = "1")] + pub tx: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "3")] + pub outnum: u32, + #[prost(bytes = "vec", tag = "4")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", optional, tag = "5")] + pub close_to: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint32, optional, tag = "6")] + pub mindepth: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub channel_type: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FundchannelChannelType { + #[prost(uint32, repeated, tag = "1")] + pub bits: ::prost::alloc::vec::Vec, + #[prost(enumeration = "ChannelTypeName", repeated, tag = "2")] + pub names: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FundchannelStartRequest { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub amount: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub feerate: ::core::option::Option, + #[prost(bool, optional, tag = "4")] + pub announce: ::core::option::Option, + #[prost(string, optional, tag = "5")] + pub close_to: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "6")] + pub push_msat: ::core::option::Option, + #[prost(uint32, optional, tag = "7")] + pub mindepth: ::core::option::Option, + #[prost(message, optional, tag = "8")] + pub reserve: ::core::option::Option, + #[prost(uint32, repeated, tag = "9")] + pub channel_type: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FundchannelStartResponse { + #[prost(string, tag = "1")] + pub funding_address: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "2")] + pub scriptpubkey: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "3")] + pub channel_type: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "4")] + pub close_to: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, tag = "5")] + pub warning_usage: ::prost::alloc::string::String, + #[prost(uint32, optional, tag = "6")] + pub mindepth: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FundchannelStartChannelType { + #[prost(uint32, repeated, tag = "1")] + pub bits: ::prost::alloc::vec::Vec, + #[prost(enumeration = "ChannelTypeName", repeated, tag = "2")] + pub names: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetlogRequest { + #[prost(enumeration = "getlog_request::GetlogLevel", optional, tag = "1")] + pub level: ::core::option::Option, +} +/// Nested message and enum types in `GetlogRequest`. +pub mod getlog_request { + /// GetLog.level + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum GetlogLevel { + Broken = 0, + Unusual = 1, + Info = 2, + Debug = 3, + Io = 4, + Trace = 5, + } + impl GetlogLevel { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + GetlogLevel::Broken => "BROKEN", + GetlogLevel::Unusual => "UNUSUAL", + GetlogLevel::Info => "INFO", + GetlogLevel::Debug => "DEBUG", + GetlogLevel::Io => "IO", + GetlogLevel::Trace => "TRACE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "BROKEN" => Some(Self::Broken), + "UNUSUAL" => Some(Self::Unusual), + "INFO" => Some(Self::Info), + "DEBUG" => Some(Self::Debug), + "IO" => Some(Self::Io), + "TRACE" => Some(Self::Trace), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetlogResponse { + #[prost(string, tag = "1")] + pub created_at: ::prost::alloc::string::String, + #[prost(uint32, tag = "2")] + pub bytes_used: u32, + #[prost(uint32, tag = "3")] + pub bytes_max: u32, + #[prost(message, repeated, tag = "4")] + pub log: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetlogLog { + #[prost(enumeration = "getlog_log::GetlogLogType", tag = "1")] + pub item_type: i32, + #[prost(uint32, optional, tag = "2")] + pub num_skipped: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub time: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "4")] + pub source: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "5")] + pub log: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "6")] + pub node_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "7")] + pub data: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// Nested message and enum types in `GetlogLog`. +pub mod getlog_log { + /// GetLog.log\[\].type + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum GetlogLogType { + Skipped = 0, + Broken = 1, + Unusual = 2, + Info = 3, + Debug = 4, + IoIn = 5, + IoOut = 6, + Trace = 7, + } + impl GetlogLogType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + GetlogLogType::Skipped => "SKIPPED", + GetlogLogType::Broken => "BROKEN", + GetlogLogType::Unusual => "UNUSUAL", + GetlogLogType::Info => "INFO", + GetlogLogType::Debug => "DEBUG", + GetlogLogType::IoIn => "IO_IN", + GetlogLogType::IoOut => "IO_OUT", + GetlogLogType::Trace => "TRACE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SKIPPED" => Some(Self::Skipped), + "BROKEN" => Some(Self::Broken), + "UNUSUAL" => Some(Self::Unusual), + "INFO" => Some(Self::Info), + "DEBUG" => Some(Self::Debug), + "IO_IN" => Some(Self::IoIn), + "IO_OUT" => Some(Self::IoOut), + "TRACE" => Some(Self::Trace), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FunderupdateRequest { + #[prost( + enumeration = "funderupdate_request::FunderupdatePolicy", + optional, + tag = "1" + )] + pub policy: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub policy_mod: ::core::option::Option, + #[prost(bool, optional, tag = "3")] + pub leases_only: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub min_their_funding_msat: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub max_their_funding_msat: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub per_channel_min_msat: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub per_channel_max_msat: ::core::option::Option, + #[prost(message, optional, tag = "8")] + pub reserve_tank_msat: ::core::option::Option, + #[prost(uint32, optional, tag = "9")] + pub fuzz_percent: ::core::option::Option, + #[prost(uint32, optional, tag = "10")] + pub fund_probability: ::core::option::Option, + #[prost(message, optional, tag = "11")] + pub lease_fee_base_msat: ::core::option::Option, + #[prost(uint32, optional, tag = "12")] + pub lease_fee_basis: ::core::option::Option, + #[prost(uint32, optional, tag = "13")] + pub funding_weight: ::core::option::Option, + #[prost(message, optional, tag = "14")] + pub channel_fee_max_base_msat: ::core::option::Option, + #[prost(uint32, optional, tag = "15")] + pub channel_fee_max_proportional_thousandths: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "16")] + pub compact_lease: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// Nested message and enum types in `FunderupdateRequest`. +pub mod funderupdate_request { + /// FunderUpdate.policy + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum FunderupdatePolicy { + Match = 0, + Available = 1, + Fixed = 2, + } + impl FunderupdatePolicy { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + FunderupdatePolicy::Match => "MATCH", + FunderupdatePolicy::Available => "AVAILABLE", + FunderupdatePolicy::Fixed => "FIXED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MATCH" => Some(Self::Match), + "AVAILABLE" => Some(Self::Available), + "FIXED" => Some(Self::Fixed), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FunderupdateResponse { + #[prost(string, tag = "1")] + pub summary: ::prost::alloc::string::String, + #[prost(enumeration = "funderupdate_response::FunderupdatePolicy", tag = "2")] + pub policy: i32, + #[prost(uint32, tag = "3")] + pub policy_mod: u32, + #[prost(bool, tag = "4")] + pub leases_only: bool, + #[prost(message, optional, tag = "5")] + pub min_their_funding_msat: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub max_their_funding_msat: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub per_channel_min_msat: ::core::option::Option, + #[prost(message, optional, tag = "8")] + pub per_channel_max_msat: ::core::option::Option, + #[prost(message, optional, tag = "9")] + pub reserve_tank_msat: ::core::option::Option, + #[prost(uint32, tag = "10")] + pub fuzz_percent: u32, + #[prost(uint32, tag = "11")] + pub fund_probability: u32, + #[prost(message, optional, tag = "12")] + pub lease_fee_base_msat: ::core::option::Option, + #[prost(uint32, optional, tag = "13")] + pub lease_fee_basis: ::core::option::Option, + #[prost(uint32, optional, tag = "14")] + pub funding_weight: ::core::option::Option, + #[prost(message, optional, tag = "15")] + pub channel_fee_max_base_msat: ::core::option::Option, + #[prost(uint32, optional, tag = "16")] + pub channel_fee_max_proportional_thousandths: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "17")] + pub compact_lease: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// Nested message and enum types in `FunderupdateResponse`. +pub mod funderupdate_response { + /// FunderUpdate.policy + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum FunderupdatePolicy { + Match = 0, + Available = 1, + Fixed = 2, + } + impl FunderupdatePolicy { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + FunderupdatePolicy::Match => "MATCH", + FunderupdatePolicy::Available => "AVAILABLE", + FunderupdatePolicy::Fixed => "FIXED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MATCH" => Some(Self::Match), + "AVAILABLE" => Some(Self::Available), + "FIXED" => Some(Self::Fixed), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetrouteRequest { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(uint64, tag = "3")] + pub riskfactor: u64, + #[prost(uint32, optional, tag = "4")] + pub cltv: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "5")] + pub fromid: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint32, optional, tag = "6")] + pub fuzzpercent: ::core::option::Option, + #[prost(string, repeated, tag = "7")] + pub exclude: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(uint32, optional, tag = "8")] + pub maxhops: ::core::option::Option, + #[prost(message, optional, tag = "9")] + pub amount_msat: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetrouteResponse { + #[prost(message, repeated, tag = "1")] + pub route: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetrouteRoute { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub channel: ::prost::alloc::string::String, + #[prost(uint32, tag = "3")] + pub direction: u32, + #[prost(message, optional, tag = "4")] + pub amount_msat: ::core::option::Option, + #[prost(uint32, tag = "5")] + pub delay: u32, + #[prost(enumeration = "getroute_route::GetrouteRouteStyle", tag = "6")] + pub style: i32, +} +/// Nested message and enum types in `GetrouteRoute`. +pub mod getroute_route { + /// GetRoute.route\[\].style + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum GetrouteRouteStyle { + Tlv = 0, + } + impl GetrouteRouteStyle { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + GetrouteRouteStyle::Tlv => "TLV", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TLV" => Some(Self::Tlv), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListforwardsRequest { + #[prost( + enumeration = "listforwards_request::ListforwardsStatus", + optional, + tag = "1" + )] + pub status: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub in_channel: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub out_channel: ::core::option::Option<::prost::alloc::string::String>, + #[prost( + enumeration = "listforwards_request::ListforwardsIndex", + optional, + tag = "4" + )] + pub index: ::core::option::Option, + #[prost(uint64, optional, tag = "5")] + pub start: ::core::option::Option, + #[prost(uint32, optional, tag = "6")] + pub limit: ::core::option::Option, +} +/// Nested message and enum types in `ListforwardsRequest`. +pub mod listforwards_request { + /// ListForwards.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListforwardsStatus { + Offered = 0, + Settled = 1, + LocalFailed = 2, + Failed = 3, + } + impl ListforwardsStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListforwardsStatus::Offered => "OFFERED", + ListforwardsStatus::Settled => "SETTLED", + ListforwardsStatus::LocalFailed => "LOCAL_FAILED", + ListforwardsStatus::Failed => "FAILED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OFFERED" => Some(Self::Offered), + "SETTLED" => Some(Self::Settled), + "LOCAL_FAILED" => Some(Self::LocalFailed), + "FAILED" => Some(Self::Failed), + _ => None, + } + } + } + /// ListForwards.index + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListforwardsIndex { + Created = 0, + Updated = 1, + } + impl ListforwardsIndex { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListforwardsIndex::Created => "CREATED", + ListforwardsIndex::Updated => "UPDATED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "CREATED" => Some(Self::Created), + "UPDATED" => Some(Self::Updated), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListforwardsResponse { + #[prost(message, repeated, tag = "1")] + pub forwards: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListforwardsForwards { + #[prost(string, tag = "1")] + pub in_channel: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub in_msat: ::core::option::Option, + #[prost( + enumeration = "listforwards_forwards::ListforwardsForwardsStatus", + tag = "3" + )] + pub status: i32, + #[prost(double, tag = "4")] + pub received_time: f64, + #[prost(string, optional, tag = "5")] + pub out_channel: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "7")] + pub fee_msat: ::core::option::Option, + #[prost(message, optional, tag = "8")] + pub out_msat: ::core::option::Option, + #[prost( + enumeration = "listforwards_forwards::ListforwardsForwardsStyle", + optional, + tag = "9" + )] + pub style: ::core::option::Option, + #[prost(uint64, optional, tag = "10")] + pub in_htlc_id: ::core::option::Option, + #[prost(uint64, optional, tag = "11")] + pub out_htlc_id: ::core::option::Option, + #[prost(uint64, optional, tag = "12")] + pub created_index: ::core::option::Option, + #[prost(uint64, optional, tag = "13")] + pub updated_index: ::core::option::Option, + #[prost(double, optional, tag = "14")] + pub resolved_time: ::core::option::Option, + #[prost(uint32, optional, tag = "15")] + pub failcode: ::core::option::Option, + #[prost(string, optional, tag = "16")] + pub failreason: ::core::option::Option<::prost::alloc::string::String>, +} +/// Nested message and enum types in `ListforwardsForwards`. +pub mod listforwards_forwards { + /// ListForwards.forwards\[\].status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListforwardsForwardsStatus { + Offered = 0, + Settled = 1, + LocalFailed = 2, + Failed = 3, + } + impl ListforwardsForwardsStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListforwardsForwardsStatus::Offered => "OFFERED", + ListforwardsForwardsStatus::Settled => "SETTLED", + ListforwardsForwardsStatus::LocalFailed => "LOCAL_FAILED", + ListforwardsForwardsStatus::Failed => "FAILED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OFFERED" => Some(Self::Offered), + "SETTLED" => Some(Self::Settled), + "LOCAL_FAILED" => Some(Self::LocalFailed), + "FAILED" => Some(Self::Failed), + _ => None, + } + } + } + /// ListForwards.forwards\[\].style + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListforwardsForwardsStyle { + Legacy = 0, + Tlv = 1, + } + impl ListforwardsForwardsStyle { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListforwardsForwardsStyle::Legacy => "LEGACY", + ListforwardsForwardsStyle::Tlv => "TLV", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "LEGACY" => Some(Self::Legacy), + "TLV" => Some(Self::Tlv), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListoffersRequest { + #[prost(bytes = "vec", optional, tag = "1")] + pub offer_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bool, optional, tag = "2")] + pub active_only: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListoffersResponse { + #[prost(message, repeated, tag = "1")] + pub offers: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListoffersOffers { + #[prost(bytes = "vec", tag = "1")] + pub offer_id: ::prost::alloc::vec::Vec, + #[prost(bool, tag = "2")] + pub active: bool, + #[prost(bool, tag = "3")] + pub single_use: bool, + #[prost(string, tag = "4")] + pub bolt12: ::prost::alloc::string::String, + #[prost(bool, tag = "5")] + pub used: bool, + #[prost(string, optional, tag = "6")] + pub label: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListpaysRequest { + #[prost(string, optional, tag = "1")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "2")] + pub payment_hash: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(enumeration = "listpays_request::ListpaysStatus", optional, tag = "3")] + pub status: ::core::option::Option, +} +/// Nested message and enum types in `ListpaysRequest`. +pub mod listpays_request { + /// ListPays.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListpaysStatus { + Pending = 0, + Complete = 1, + Failed = 2, + } + impl ListpaysStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListpaysStatus::Pending => "PENDING", + ListpaysStatus::Complete => "COMPLETE", + ListpaysStatus::Failed => "FAILED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PENDING" => Some(Self::Pending), + "COMPLETE" => Some(Self::Complete), + "FAILED" => Some(Self::Failed), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListpaysResponse { + #[prost(message, repeated, tag = "1")] + pub pays: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListpaysPays { + #[prost(bytes = "vec", tag = "1")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(enumeration = "listpays_pays::ListpaysPaysStatus", tag = "2")] + pub status: i32, + #[prost(bytes = "vec", optional, tag = "3")] + pub destination: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, tag = "4")] + pub created_at: u64, + #[prost(string, optional, tag = "5")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "6")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "7")] + pub bolt12: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "8")] + pub amount_msat: ::core::option::Option, + #[prost(message, optional, tag = "9")] + pub amount_sent_msat: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "10")] + pub erroronion: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "11")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "12")] + pub completed_at: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "13")] + pub preimage: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint64, optional, tag = "14")] + pub number_of_parts: ::core::option::Option, +} +/// Nested message and enum types in `ListpaysPays`. +pub mod listpays_pays { + /// ListPays.pays\[\].status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListpaysPaysStatus { + Pending = 0, + Failed = 1, + Complete = 2, + } + impl ListpaysPaysStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListpaysPaysStatus::Pending => "PENDING", + ListpaysPaysStatus::Failed => "FAILED", + ListpaysPaysStatus::Complete => "COMPLETE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PENDING" => Some(Self::Pending), + "FAILED" => Some(Self::Failed), + "COMPLETE" => Some(Self::Complete), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListhtlcsRequest { + #[prost(string, optional, tag = "1")] + pub id: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListhtlcsResponse { + #[prost(message, repeated, tag = "1")] + pub htlcs: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListhtlcsHtlcs { + #[prost(string, tag = "1")] + pub short_channel_id: ::prost::alloc::string::String, + #[prost(uint64, tag = "2")] + pub id: u64, + #[prost(uint32, tag = "3")] + pub expiry: u32, + #[prost(message, optional, tag = "4")] + pub amount_msat: ::core::option::Option, + #[prost(enumeration = "listhtlcs_htlcs::ListhtlcsHtlcsDirection", tag = "5")] + pub direction: i32, + #[prost(bytes = "vec", tag = "6")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(enumeration = "HtlcState", tag = "7")] + pub state: i32, +} +/// Nested message and enum types in `ListhtlcsHtlcs`. +pub mod listhtlcs_htlcs { + /// ListHtlcs.htlcs\[\].direction + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListhtlcsHtlcsDirection { + Out = 0, + In = 1, + } + impl ListhtlcsHtlcsDirection { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListhtlcsHtlcsDirection::Out => "OUT", + ListhtlcsHtlcsDirection::In => "IN", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OUT" => Some(Self::Out), + "IN" => Some(Self::In), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MultifundchannelRequest { + #[prost(message, repeated, tag = "1")] + pub destinations: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub feerate: ::core::option::Option, + #[prost(sint64, optional, tag = "3")] + pub minconf: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub utxos: ::prost::alloc::vec::Vec, + #[prost(sint64, optional, tag = "5")] + pub minchannels: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub commitment_feerate: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MultifundchannelResponse { + #[prost(bytes = "vec", tag = "1")] + pub tx: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "3")] + pub channel_ids: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub failed: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MultifundchannelDestinations { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub amount: ::core::option::Option, + #[prost(bool, optional, tag = "3")] + pub announce: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub push_msat: ::core::option::Option, + #[prost(string, optional, tag = "5")] + pub close_to: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "6")] + pub request_amt: ::core::option::Option, + #[prost(string, optional, tag = "7")] + pub compact_lease: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint32, optional, tag = "8")] + pub mindepth: ::core::option::Option, + #[prost(message, optional, tag = "9")] + pub reserve: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MultifundchannelChannelIds { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub outnum: u32, + #[prost(bytes = "vec", tag = "3")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "4")] + pub channel_type: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "5")] + pub close_to: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MultifundchannelChannelIdsChannelType { + #[prost(uint32, repeated, tag = "1")] + pub bits: ::prost::alloc::vec::Vec, + #[prost(enumeration = "ChannelTypeName", repeated, tag = "2")] + pub names: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MultifundchannelFailed { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost( + enumeration = "multifundchannel_failed::MultifundchannelFailedMethod", + tag = "2" + )] + pub method: i32, + #[prost(message, optional, tag = "3")] + pub error: ::core::option::Option, +} +/// Nested message and enum types in `MultifundchannelFailed`. +pub mod multifundchannel_failed { + /// MultiFundChannel.failed\[\].method + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum MultifundchannelFailedMethod { + Connect = 0, + OpenchannelInit = 1, + FundchannelStart = 2, + FundchannelComplete = 3, + } + impl MultifundchannelFailedMethod { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + MultifundchannelFailedMethod::Connect => "CONNECT", + MultifundchannelFailedMethod::OpenchannelInit => "OPENCHANNEL_INIT", + MultifundchannelFailedMethod::FundchannelStart => "FUNDCHANNEL_START", + MultifundchannelFailedMethod::FundchannelComplete => { + "FUNDCHANNEL_COMPLETE" + } + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "CONNECT" => Some(Self::Connect), + "OPENCHANNEL_INIT" => Some(Self::OpenchannelInit), + "FUNDCHANNEL_START" => Some(Self::FundchannelStart), + "FUNDCHANNEL_COMPLETE" => Some(Self::FundchannelComplete), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MultifundchannelFailedError { + #[prost(sint64, tag = "1")] + pub code: i64, + #[prost(string, tag = "2")] + pub message: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MultiwithdrawRequest { + #[prost(message, repeated, tag = "1")] + pub outputs: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub feerate: ::core::option::Option, + #[prost(uint32, optional, tag = "3")] + pub minconf: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub utxos: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MultiwithdrawResponse { + #[prost(bytes = "vec", tag = "1")] + pub tx: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub txid: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OfferRequest { + #[prost(string, tag = "1")] + pub amount: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub issuer: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "4")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "5")] + pub quantity_max: ::core::option::Option, + #[prost(uint64, optional, tag = "6")] + pub absolute_expiry: ::core::option::Option, + #[prost(string, optional, tag = "7")] + pub recurrence: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "8")] + pub recurrence_base: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "9")] + pub recurrence_paywindow: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint32, optional, tag = "10")] + pub recurrence_limit: ::core::option::Option, + #[prost(bool, optional, tag = "11")] + pub single_use: ::core::option::Option, + #[prost(bool, optional, tag = "12")] + pub recurrence_start_any_period: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OfferResponse { + #[prost(bytes = "vec", tag = "1")] + pub offer_id: ::prost::alloc::vec::Vec, + #[prost(bool, tag = "2")] + pub active: bool, + #[prost(bool, tag = "3")] + pub single_use: bool, + #[prost(string, tag = "4")] + pub bolt12: ::prost::alloc::string::String, + #[prost(bool, tag = "5")] + pub used: bool, + #[prost(bool, tag = "6")] + pub created: bool, + #[prost(string, optional, tag = "7")] + pub label: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OpenchannelAbortRequest { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OpenchannelAbortResponse { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(bool, tag = "2")] + pub channel_canceled: bool, + #[prost(string, tag = "3")] + pub reason: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OpenchannelBumpRequest { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub initialpsbt: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub funding_feerate: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub amount: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OpenchannelBumpResponse { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub channel_type: ::core::option::Option, + #[prost(string, tag = "3")] + pub psbt: ::prost::alloc::string::String, + #[prost(bool, tag = "4")] + pub commitments_secured: bool, + #[prost(uint64, tag = "5")] + pub funding_serial: u64, + #[prost(bool, optional, tag = "6")] + pub requires_confirmed_inputs: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OpenchannelBumpChannelType { + #[prost(uint32, repeated, tag = "1")] + pub bits: ::prost::alloc::vec::Vec, + #[prost(enumeration = "ChannelTypeName", repeated, tag = "2")] + pub names: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OpenchannelInitRequest { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub initialpsbt: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub commitment_feerate: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub funding_feerate: ::core::option::Option, + #[prost(bool, optional, tag = "5")] + pub announce: ::core::option::Option, + #[prost(string, optional, tag = "6")] + pub close_to: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "7")] + pub request_amt: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "8")] + pub compact_lease: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(uint32, repeated, tag = "9")] + pub channel_type: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "10")] + pub amount: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OpenchannelInitResponse { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub psbt: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub channel_type: ::core::option::Option, + #[prost(bool, tag = "4")] + pub commitments_secured: bool, + #[prost(uint64, tag = "5")] + pub funding_serial: u64, + #[prost(bool, optional, tag = "6")] + pub requires_confirmed_inputs: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OpenchannelInitChannelType { + #[prost(uint32, repeated, tag = "1")] + pub bits: ::prost::alloc::vec::Vec, + #[prost(enumeration = "ChannelTypeName", repeated, tag = "2")] + pub names: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OpenchannelSignedRequest { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub signed_psbt: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OpenchannelSignedResponse { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub tx: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "3")] + pub txid: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OpenchannelUpdateRequest { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub psbt: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OpenchannelUpdateResponse { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub channel_type: ::core::option::Option, + #[prost(string, tag = "3")] + pub psbt: ::prost::alloc::string::String, + #[prost(bool, tag = "4")] + pub commitments_secured: bool, + #[prost(uint32, tag = "5")] + pub funding_outnum: u32, + #[prost(bytes = "vec", optional, tag = "6")] + pub close_to: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bool, optional, tag = "7")] + pub requires_confirmed_inputs: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OpenchannelUpdateChannelType { + #[prost(uint32, repeated, tag = "1")] + pub bits: ::prost::alloc::vec::Vec, + #[prost(enumeration = "ChannelTypeName", repeated, tag = "2")] + pub names: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PingRequest { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(uint32, optional, tag = "2")] + pub len: ::core::option::Option, + #[prost(uint32, optional, tag = "3")] + pub pongbytes: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct PingResponse { + #[prost(uint32, tag = "1")] + pub totlen: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PluginRequest { + #[prost(enumeration = "PluginSubcommand", tag = "1")] + pub subcommand: i32, + #[prost(string, optional, tag = "2")] + pub plugin: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub directory: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub options: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PluginResponse { + #[prost(enumeration = "PluginSubcommand", tag = "1")] + pub command: i32, + #[prost(message, repeated, tag = "2")] + pub plugins: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "3")] + pub result: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PluginPlugins { + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + #[prost(bool, tag = "2")] + pub active: bool, + #[prost(bool, tag = "3")] + pub dynamic: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RenepaystatusRequest { + #[prost(string, optional, tag = "1")] + pub invstring: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RenepaystatusResponse { + #[prost(message, repeated, tag = "1")] + pub paystatus: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RenepaystatusPaystatus { + #[prost(string, tag = "1")] + pub bolt11: ::prost::alloc::string::String, + #[prost(bytes = "vec", optional, tag = "2")] + pub payment_preimage: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", tag = "3")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(double, tag = "4")] + pub created_at: f64, + #[prost(uint32, tag = "5")] + pub groupid: u32, + #[prost(uint32, optional, tag = "6")] + pub parts: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub amount_msat: ::core::option::Option, + #[prost(message, optional, tag = "8")] + pub amount_sent_msat: ::core::option::Option, + #[prost( + enumeration = "renepaystatus_paystatus::RenepaystatusPaystatusStatus", + tag = "9" + )] + pub status: i32, + #[prost(bytes = "vec", optional, tag = "10")] + pub destination: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, repeated, tag = "11")] + pub notes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Nested message and enum types in `RenepaystatusPaystatus`. +pub mod renepaystatus_paystatus { + /// RenePayStatus.paystatus\[\].status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum RenepaystatusPaystatusStatus { + Complete = 0, + Pending = 1, + Failed = 2, + } + impl RenepaystatusPaystatusStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + RenepaystatusPaystatusStatus::Complete => "COMPLETE", + RenepaystatusPaystatusStatus::Pending => "PENDING", + RenepaystatusPaystatusStatus::Failed => "FAILED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "COMPLETE" => Some(Self::Complete), + "PENDING" => Some(Self::Pending), + "FAILED" => Some(Self::Failed), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RenepayRequest { + #[prost(string, tag = "1")] + pub invstring: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub amount_msat: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub maxfee: ::core::option::Option, + #[prost(uint32, optional, tag = "4")] + pub maxdelay: ::core::option::Option, + #[prost(uint32, optional, tag = "5")] + pub retry_for: ::core::option::Option, + #[prost(string, optional, tag = "6")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "7")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "8")] + pub dev_use_shadow: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RenepayResponse { + #[prost(bytes = "vec", tag = "1")] + pub payment_preimage: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(double, tag = "3")] + pub created_at: f64, + #[prost(uint32, tag = "4")] + pub parts: u32, + #[prost(message, optional, tag = "5")] + pub amount_msat: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub amount_sent_msat: ::core::option::Option, + #[prost(enumeration = "renepay_response::RenepayStatus", tag = "7")] + pub status: i32, + #[prost(bytes = "vec", optional, tag = "8")] + pub destination: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// Nested message and enum types in `RenepayResponse`. +pub mod renepay_response { + /// RenePay.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum RenepayStatus { + Complete = 0, + Pending = 1, + Failed = 2, + } + impl RenepayStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + RenepayStatus::Complete => "COMPLETE", + RenepayStatus::Pending => "PENDING", + RenepayStatus::Failed => "FAILED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "COMPLETE" => Some(Self::Complete), + "PENDING" => Some(Self::Pending), + "FAILED" => Some(Self::Failed), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReserveinputsRequest { + #[prost(string, tag = "1")] + pub psbt: ::prost::alloc::string::String, + #[prost(bool, optional, tag = "2")] + pub exclusive: ::core::option::Option, + #[prost(uint32, optional, tag = "3")] + pub reserve: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReserveinputsResponse { + #[prost(message, repeated, tag = "1")] + pub reservations: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReserveinputsReservations { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub vout: u32, + #[prost(bool, tag = "3")] + pub was_reserved: bool, + #[prost(bool, tag = "4")] + pub reserved: bool, + #[prost(uint32, tag = "5")] + pub reserved_to_block: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendcustommsgRequest { + #[prost(bytes = "vec", tag = "1")] + pub node_id: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub msg: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendcustommsgResponse { + #[prost(string, tag = "1")] + pub status: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendinvoiceRequest { + #[prost(string, tag = "1")] + pub invreq: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub label: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub amount_msat: ::core::option::Option, + #[prost(uint32, optional, tag = "4")] + pub timeout: ::core::option::Option, + #[prost(uint64, optional, tag = "5")] + pub quantity: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendinvoiceResponse { + #[prost(string, tag = "1")] + pub label: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "3")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(enumeration = "sendinvoice_response::SendinvoiceStatus", tag = "4")] + pub status: i32, + #[prost(uint64, tag = "5")] + pub expires_at: u64, + #[prost(message, optional, tag = "6")] + pub amount_msat: ::core::option::Option, + #[prost(string, optional, tag = "7")] + pub bolt12: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "8")] + pub created_index: ::core::option::Option, + #[prost(uint64, optional, tag = "9")] + pub updated_index: ::core::option::Option, + #[prost(uint64, optional, tag = "10")] + pub pay_index: ::core::option::Option, + #[prost(message, optional, tag = "11")] + pub amount_received_msat: ::core::option::Option, + #[prost(uint64, optional, tag = "12")] + pub paid_at: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "13")] + pub payment_preimage: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// Nested message and enum types in `SendinvoiceResponse`. +pub mod sendinvoice_response { + /// SendInvoice.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum SendinvoiceStatus { + Unpaid = 0, + Paid = 1, + Expired = 2, + } + impl SendinvoiceStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SendinvoiceStatus::Unpaid => "UNPAID", + SendinvoiceStatus::Paid => "PAID", + SendinvoiceStatus::Expired => "EXPIRED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "UNPAID" => Some(Self::Unpaid), + "PAID" => Some(Self::Paid), + "EXPIRED" => Some(Self::Expired), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetchannelRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub feebase: ::core::option::Option, + #[prost(uint32, optional, tag = "3")] + pub feeppm: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub htlcmin: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub htlcmax: ::core::option::Option, + #[prost(uint32, optional, tag = "6")] + pub enforcedelay: ::core::option::Option, + #[prost(bool, optional, tag = "7")] + pub ignorefeelimits: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetchannelResponse { + #[prost(message, repeated, tag = "1")] + pub channels: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetchannelChannels { + #[prost(bytes = "vec", tag = "1")] + pub peer_id: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "3")] + pub short_channel_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "4")] + pub fee_base_msat: ::core::option::Option, + #[prost(uint32, tag = "5")] + pub fee_proportional_millionths: u32, + #[prost(message, optional, tag = "6")] + pub minimum_htlc_out_msat: ::core::option::Option, + #[prost(string, optional, tag = "7")] + pub warning_htlcmin_too_low: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "8")] + pub maximum_htlc_out_msat: ::core::option::Option, + #[prost(string, optional, tag = "9")] + pub warning_htlcmax_too_high: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "10")] + pub ignore_fee_limits: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetconfigRequest { + #[prost(string, tag = "1")] + pub config: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub val: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetconfigResponse { + #[prost(message, optional, tag = "1")] + pub config: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetconfigConfig { + #[prost(string, tag = "1")] + pub config: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, + #[prost(string, optional, tag = "3")] + pub plugin: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, tag = "4")] + pub dynamic: bool, + #[prost(bool, optional, tag = "5")] + pub set: ::core::option::Option, + #[prost(string, optional, tag = "6")] + pub value_str: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "7")] + pub value_msat: ::core::option::Option, + #[prost(sint64, optional, tag = "8")] + pub value_int: ::core::option::Option, + #[prost(bool, optional, tag = "9")] + pub value_bool: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetpsbtversionRequest { + #[prost(string, tag = "1")] + pub psbt: ::prost::alloc::string::String, + #[prost(uint32, tag = "2")] + pub version: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetpsbtversionResponse { + #[prost(string, tag = "1")] + pub psbt: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SigninvoiceRequest { + #[prost(string, tag = "1")] + pub invstring: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SigninvoiceResponse { + #[prost(string, tag = "1")] + pub bolt11: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignmessageRequest { + #[prost(string, tag = "1")] + pub message: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignmessageResponse { + #[prost(bytes = "vec", tag = "1")] + pub signature: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub recid: ::prost::alloc::vec::Vec, + #[prost(string, tag = "3")] + pub zbase: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SpliceInitRequest { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(sint64, tag = "2")] + pub relative_amount: i64, + #[prost(string, optional, tag = "3")] + pub initialpsbt: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint32, optional, tag = "4")] + pub feerate_per_kw: ::core::option::Option, + #[prost(bool, optional, tag = "5")] + pub force_feerate: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SpliceInitResponse { + #[prost(string, tag = "1")] + pub psbt: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SpliceSignedRequest { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub psbt: ::prost::alloc::string::String, + #[prost(bool, optional, tag = "3")] + pub sign_first: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SpliceSignedResponse { + #[prost(bytes = "vec", tag = "1")] + pub tx: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, optional, tag = "3")] + pub outnum: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SpliceUpdateRequest { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub psbt: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SpliceUpdateResponse { + #[prost(string, tag = "1")] + pub psbt: ::prost::alloc::string::String, + #[prost(bool, tag = "2")] + pub commitments_secured: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnreserveinputsRequest { + #[prost(string, tag = "1")] + pub psbt: ::prost::alloc::string::String, + #[prost(uint32, optional, tag = "2")] + pub reserve: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnreserveinputsResponse { + #[prost(message, repeated, tag = "1")] + pub reservations: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnreserveinputsReservations { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub vout: u32, + #[prost(bool, tag = "3")] + pub was_reserved: bool, + #[prost(bool, tag = "4")] + pub reserved: bool, + #[prost(uint32, optional, tag = "5")] + pub reserved_to_block: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UpgradewalletRequest { + #[prost(message, optional, tag = "1")] + pub feerate: ::core::option::Option, + #[prost(bool, optional, tag = "2")] + pub reservedok: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpgradewalletResponse { + #[prost(uint64, optional, tag = "1")] + pub upgraded_outs: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub psbt: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "3")] + pub tx: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "4")] + pub txid: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct WaitblockheightRequest { + #[prost(uint32, tag = "1")] + pub blockheight: u32, + #[prost(uint32, optional, tag = "2")] + pub timeout: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct WaitblockheightResponse { + #[prost(uint32, tag = "1")] + pub blockheight: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct WaitRequest { + #[prost(enumeration = "wait_request::WaitSubsystem", tag = "1")] + pub subsystem: i32, + #[prost(enumeration = "wait_request::WaitIndexname", tag = "2")] + pub indexname: i32, + #[prost(uint64, tag = "3")] + pub nextvalue: u64, +} +/// Nested message and enum types in `WaitRequest`. +pub mod wait_request { + /// Wait.subsystem + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum WaitSubsystem { + Invoices = 0, + Forwards = 1, + Sendpays = 2, + } + impl WaitSubsystem { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + WaitSubsystem::Invoices => "INVOICES", + WaitSubsystem::Forwards => "FORWARDS", + WaitSubsystem::Sendpays => "SENDPAYS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "INVOICES" => Some(Self::Invoices), + "FORWARDS" => Some(Self::Forwards), + "SENDPAYS" => Some(Self::Sendpays), + _ => None, + } + } + } + /// Wait.indexname + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum WaitIndexname { + Created = 0, + Updated = 1, + Deleted = 2, + } + impl WaitIndexname { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + WaitIndexname::Created => "CREATED", + WaitIndexname::Updated => "UPDATED", + WaitIndexname::Deleted => "DELETED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "CREATED" => Some(Self::Created), + "UPDATED" => Some(Self::Updated), + "DELETED" => Some(Self::Deleted), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WaitResponse { + #[prost(enumeration = "wait_response::WaitSubsystem", tag = "1")] + pub subsystem: i32, + #[prost(uint64, optional, tag = "2")] + pub created: ::core::option::Option, + #[prost(uint64, optional, tag = "3")] + pub updated: ::core::option::Option, + #[prost(uint64, optional, tag = "4")] + pub deleted: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub details: ::core::option::Option, +} +/// Nested message and enum types in `WaitResponse`. +pub mod wait_response { + /// Wait.subsystem + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum WaitSubsystem { + Invoices = 0, + Forwards = 1, + Sendpays = 2, + } + impl WaitSubsystem { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + WaitSubsystem::Invoices => "INVOICES", + WaitSubsystem::Forwards => "FORWARDS", + WaitSubsystem::Sendpays => "SENDPAYS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "INVOICES" => Some(Self::Invoices), + "FORWARDS" => Some(Self::Forwards), + "SENDPAYS" => Some(Self::Sendpays), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WaitDetails { + #[prost(enumeration = "wait_details::WaitDetailsStatus", optional, tag = "1")] + pub status: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub label: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "4")] + pub bolt11: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "5")] + pub bolt12: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "6")] + pub partid: ::core::option::Option, + #[prost(uint64, optional, tag = "7")] + pub groupid: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "8")] + pub payment_hash: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "9")] + pub in_channel: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag = "10")] + pub in_htlc_id: ::core::option::Option, + #[prost(message, optional, tag = "11")] + pub in_msat: ::core::option::Option, + #[prost(string, optional, tag = "12")] + pub out_channel: ::core::option::Option<::prost::alloc::string::String>, +} +/// Nested message and enum types in `WaitDetails`. +pub mod wait_details { + /// Wait.details.status + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum WaitDetailsStatus { + Unpaid = 0, + Paid = 1, + Expired = 2, + Pending = 3, + Failed = 4, + Complete = 5, + Offered = 6, + Settled = 7, + LocalFailed = 8, + } + impl WaitDetailsStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + WaitDetailsStatus::Unpaid => "UNPAID", + WaitDetailsStatus::Paid => "PAID", + WaitDetailsStatus::Expired => "EXPIRED", + WaitDetailsStatus::Pending => "PENDING", + WaitDetailsStatus::Failed => "FAILED", + WaitDetailsStatus::Complete => "COMPLETE", + WaitDetailsStatus::Offered => "OFFERED", + WaitDetailsStatus::Settled => "SETTLED", + WaitDetailsStatus::LocalFailed => "LOCAL_FAILED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "UNPAID" => Some(Self::Unpaid), + "PAID" => Some(Self::Paid), + "EXPIRED" => Some(Self::Expired), + "PENDING" => Some(Self::Pending), + "FAILED" => Some(Self::Failed), + "COMPLETE" => Some(Self::Complete), + "OFFERED" => Some(Self::Offered), + "SETTLED" => Some(Self::Settled), + "LOCAL_FAILED" => Some(Self::LocalFailed), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsRequest { + #[prost(string, optional, tag = "1")] + pub config: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsResponse { + #[prost(message, optional, tag = "1")] + pub configs: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub plugins: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub important_plugins: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "5")] + pub conf: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "6")] + pub lightning_dir: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "7")] + pub network: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "8")] + pub allow_deprecated_apis: ::core::option::Option, + #[prost(string, optional, tag = "9")] + pub rpc_file: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "10")] + pub disable_plugin: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, optional, tag = "11")] + pub bookkeeper_dir: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "12")] + pub bookkeeper_db: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "13")] + pub always_use_proxy: ::core::option::Option, + #[prost(bool, optional, tag = "14")] + pub daemon: ::core::option::Option, + #[prost(string, optional, tag = "15")] + pub wallet: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "16")] + pub large_channels: ::core::option::Option, + #[prost(bool, optional, tag = "17")] + pub experimental_dual_fund: ::core::option::Option, + #[prost(bool, optional, tag = "18")] + pub experimental_splicing: ::core::option::Option, + #[prost(bool, optional, tag = "19")] + pub experimental_onion_messages: ::core::option::Option, + #[prost(bool, optional, tag = "20")] + pub experimental_offers: ::core::option::Option, + #[prost(bool, optional, tag = "21")] + pub experimental_shutdown_wrong_funding: ::core::option::Option, + #[prost(bool, optional, tag = "22")] + pub experimental_peer_storage: ::core::option::Option, + #[prost(bool, optional, tag = "23")] + pub experimental_quiesce: ::core::option::Option, + #[prost(bool, optional, tag = "24")] + pub experimental_upgrade_protocol: ::core::option::Option, + #[prost(bool, optional, tag = "25")] + pub invoices_onchain_fallback: ::core::option::Option, + #[prost(bool, optional, tag = "26")] + pub database_upgrade: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "27")] + pub rgb: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "28")] + pub alias: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "29")] + pub pid_file: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "30")] + pub ignore_fee_limits: ::core::option::Option, + #[prost(uint32, optional, tag = "31")] + pub watchtime_blocks: ::core::option::Option, + #[prost(uint32, optional, tag = "32")] + pub max_locktime_blocks: ::core::option::Option, + #[prost(uint32, optional, tag = "33")] + pub funding_confirms: ::core::option::Option, + #[prost(uint32, optional, tag = "34")] + pub cltv_delta: ::core::option::Option, + #[prost(uint32, optional, tag = "35")] + pub cltv_final: ::core::option::Option, + #[prost(uint32, optional, tag = "36")] + pub commit_time: ::core::option::Option, + #[prost(uint32, optional, tag = "37")] + pub fee_base: ::core::option::Option, + #[prost(sint64, optional, tag = "38")] + pub rescan: ::core::option::Option, + #[prost(uint32, optional, tag = "39")] + pub fee_per_satoshi: ::core::option::Option, + #[prost(uint32, optional, tag = "40")] + pub max_concurrent_htlcs: ::core::option::Option, + #[prost(message, optional, tag = "41")] + pub htlc_minimum_msat: ::core::option::Option, + #[prost(message, optional, tag = "42")] + pub htlc_maximum_msat: ::core::option::Option, + #[prost(message, optional, tag = "43")] + pub max_dust_htlc_exposure_msat: ::core::option::Option, + #[prost(uint64, optional, tag = "44")] + pub min_capacity_sat: ::core::option::Option, + #[prost(string, optional, tag = "45")] + pub addr: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "46")] + pub announce_addr: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "47")] + pub bind_addr: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "48")] + pub offline: ::core::option::Option, + #[prost(bool, optional, tag = "49")] + pub autolisten: ::core::option::Option, + #[prost(string, optional, tag = "50")] + pub proxy: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "51")] + pub disable_dns: ::core::option::Option, + #[prost(string, optional, tag = "52")] + pub announce_addr_discovered: ::core::option::Option<::prost::alloc::string::String>, + #[prost(sint64, optional, tag = "53")] + pub announce_addr_discovered_port: ::core::option::Option, + #[prost(bool, optional, tag = "54")] + pub encrypted_hsm: ::core::option::Option, + #[prost(string, optional, tag = "55")] + pub rpc_file_mode: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "56")] + pub log_level: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "57")] + pub log_prefix: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "58")] + pub log_file: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "59")] + pub log_timestamps: ::core::option::Option, + #[prost(string, optional, tag = "60")] + pub force_feerates: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "61")] + pub subdaemon: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "62")] + pub fetchinvoice_noconnect: ::core::option::Option, + #[prost(string, optional, tag = "63")] + pub accept_htlc_tlv_types: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "64")] + pub tor_service_password: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "65")] + pub dev_allowdustreserve: ::core::option::Option, + #[prost(bool, optional, tag = "66")] + pub announce_addr_dns: ::core::option::Option, + #[prost(bool, optional, tag = "67")] + pub require_confirmed_inputs: ::core::option::Option, + #[prost(bool, optional, tag = "68")] + pub developer: ::core::option::Option, + #[prost(uint64, optional, tag = "69")] + pub commit_fee: ::core::option::Option, + #[prost(message, optional, tag = "70")] + pub min_emergency_msat: ::core::option::Option, + #[prost(uint32, optional, tag = "71")] + pub commit_feerate_offset: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigs { + #[prost(message, optional, tag = "1")] + pub conf: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub developer: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub clear_plugins: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub disable_mpp: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub mainnet: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub regtest: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub signet: ::core::option::Option, + #[prost(message, optional, tag = "8")] + pub testnet: ::core::option::Option, + #[prost(message, optional, tag = "9")] + pub important_plugin: ::core::option::Option, + #[prost(message, optional, tag = "10")] + pub plugin: ::core::option::Option, + #[prost(message, optional, tag = "11")] + pub plugin_dir: ::core::option::Option, + #[prost(message, optional, tag = "12")] + pub lightning_dir: ::core::option::Option, + #[prost(message, optional, tag = "13")] + pub network: ::core::option::Option, + #[prost(message, optional, tag = "14")] + pub allow_deprecated_apis: ::core::option::Option< + ListconfigsConfigsAllowdeprecatedapis, + >, + #[prost(message, optional, tag = "15")] + pub rpc_file: ::core::option::Option, + #[prost(message, optional, tag = "16")] + pub disable_plugin: ::core::option::Option, + #[prost(message, optional, tag = "17")] + pub always_use_proxy: ::core::option::Option, + #[prost(message, optional, tag = "18")] + pub daemon: ::core::option::Option, + #[prost(message, optional, tag = "19")] + pub wallet: ::core::option::Option, + #[prost(message, optional, tag = "20")] + pub large_channels: ::core::option::Option, + #[prost(message, optional, tag = "21")] + pub experimental_dual_fund: ::core::option::Option< + ListconfigsConfigsExperimentaldualfund, + >, + #[prost(message, optional, tag = "22")] + pub experimental_splicing: ::core::option::Option< + ListconfigsConfigsExperimentalsplicing, + >, + #[prost(message, optional, tag = "23")] + pub experimental_onion_messages: ::core::option::Option< + ListconfigsConfigsExperimentalonionmessages, + >, + #[prost(message, optional, tag = "24")] + pub experimental_offers: ::core::option::Option< + ListconfigsConfigsExperimentaloffers, + >, + #[prost(message, optional, tag = "25")] + pub experimental_shutdown_wrong_funding: ::core::option::Option< + ListconfigsConfigsExperimentalshutdownwrongfunding, + >, + #[prost(message, optional, tag = "26")] + pub experimental_peer_storage: ::core::option::Option< + ListconfigsConfigsExperimentalpeerstorage, + >, + #[prost(message, optional, tag = "27")] + pub experimental_anchors: ::core::option::Option< + ListconfigsConfigsExperimentalanchors, + >, + #[prost(message, optional, tag = "28")] + pub database_upgrade: ::core::option::Option, + #[prost(message, optional, tag = "29")] + pub rgb: ::core::option::Option, + #[prost(message, optional, tag = "30")] + pub alias: ::core::option::Option, + #[prost(message, optional, tag = "31")] + pub pid_file: ::core::option::Option, + #[prost(message, optional, tag = "32")] + pub ignore_fee_limits: ::core::option::Option, + #[prost(message, optional, tag = "33")] + pub watchtime_blocks: ::core::option::Option, + #[prost(message, optional, tag = "34")] + pub max_locktime_blocks: ::core::option::Option, + #[prost(message, optional, tag = "35")] + pub funding_confirms: ::core::option::Option, + #[prost(message, optional, tag = "36")] + pub cltv_delta: ::core::option::Option, + #[prost(message, optional, tag = "37")] + pub cltv_final: ::core::option::Option, + #[prost(message, optional, tag = "38")] + pub commit_time: ::core::option::Option, + #[prost(message, optional, tag = "39")] + pub fee_base: ::core::option::Option, + #[prost(message, optional, tag = "40")] + pub rescan: ::core::option::Option, + #[prost(message, optional, tag = "41")] + pub fee_per_satoshi: ::core::option::Option, + #[prost(message, optional, tag = "42")] + pub max_concurrent_htlcs: ::core::option::Option< + ListconfigsConfigsMaxconcurrenthtlcs, + >, + #[prost(message, optional, tag = "43")] + pub htlc_minimum_msat: ::core::option::Option, + #[prost(message, optional, tag = "44")] + pub htlc_maximum_msat: ::core::option::Option, + #[prost(message, optional, tag = "45")] + pub max_dust_htlc_exposure_msat: ::core::option::Option< + ListconfigsConfigsMaxdusthtlcexposuremsat, + >, + #[prost(message, optional, tag = "46")] + pub min_capacity_sat: ::core::option::Option, + #[prost(message, optional, tag = "47")] + pub addr: ::core::option::Option, + #[prost(message, optional, tag = "48")] + pub announce_addr: ::core::option::Option, + #[prost(message, optional, tag = "49")] + pub bind_addr: ::core::option::Option, + #[prost(message, optional, tag = "50")] + pub offline: ::core::option::Option, + #[prost(message, optional, tag = "51")] + pub autolisten: ::core::option::Option, + #[prost(message, optional, tag = "52")] + pub proxy: ::core::option::Option, + #[prost(message, optional, tag = "53")] + pub disable_dns: ::core::option::Option, + #[prost(message, optional, tag = "54")] + pub announce_addr_discovered: ::core::option::Option< + ListconfigsConfigsAnnounceaddrdiscovered, + >, + #[prost(message, optional, tag = "55")] + pub announce_addr_discovered_port: ::core::option::Option< + ListconfigsConfigsAnnounceaddrdiscoveredport, + >, + #[prost(message, optional, tag = "56")] + pub encrypted_hsm: ::core::option::Option, + #[prost(message, optional, tag = "57")] + pub rpc_file_mode: ::core::option::Option, + #[prost(message, optional, tag = "58")] + pub log_level: ::core::option::Option, + #[prost(message, optional, tag = "59")] + pub log_prefix: ::core::option::Option, + #[prost(message, optional, tag = "60")] + pub log_file: ::core::option::Option, + #[prost(message, optional, tag = "61")] + pub log_timestamps: ::core::option::Option, + #[prost(message, optional, tag = "62")] + pub force_feerates: ::core::option::Option, + #[prost(message, optional, tag = "63")] + pub subdaemon: ::core::option::Option, + #[prost(message, optional, tag = "64")] + pub fetchinvoice_noconnect: ::core::option::Option< + ListconfigsConfigsFetchinvoicenoconnect, + >, + #[prost(message, optional, tag = "65")] + pub accept_htlc_tlv_types: ::core::option::Option< + ListconfigsConfigsAccepthtlctlvtypes, + >, + #[prost(message, optional, tag = "66")] + pub tor_service_password: ::core::option::Option< + ListconfigsConfigsTorservicepassword, + >, + #[prost(message, optional, tag = "67")] + pub announce_addr_dns: ::core::option::Option, + #[prost(message, optional, tag = "68")] + pub require_confirmed_inputs: ::core::option::Option< + ListconfigsConfigsRequireconfirmedinputs, + >, + #[prost(message, optional, tag = "69")] + pub commit_fee: ::core::option::Option, + #[prost(message, optional, tag = "70")] + pub commit_feerate_offset: ::core::option::Option< + ListconfigsConfigsCommitfeerateoffset, + >, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsConf { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost( + enumeration = "listconfigs_configs_conf::ListconfigsConfigsConfSource", + tag = "2" + )] + pub source: i32, +} +/// Nested message and enum types in `ListconfigsConfigsConf`. +pub mod listconfigs_configs_conf { + /// ListConfigs.configs.conf.source + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListconfigsConfigsConfSource { + Cmdline = 0, + } + impl ListconfigsConfigsConfSource { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListconfigsConfigsConfSource::Cmdline => "CMDLINE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "CMDLINE" => Some(Self::Cmdline), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsDeveloper { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsClearplugins { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsDisablempp { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, + #[prost(string, optional, tag = "3")] + pub plugin: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsMainnet { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsRegtest { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsSignet { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsTestnet { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsImportantplugin { + #[prost(string, repeated, tag = "1")] + pub values_str: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub sources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsPlugin { + #[prost(string, repeated, tag = "1")] + pub values_str: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub sources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsPlugindir { + #[prost(string, repeated, tag = "1")] + pub values_str: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub sources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsLightningdir { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsNetwork { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsAllowdeprecatedapis { + #[prost(bool, tag = "1")] + pub value_bool: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsRpcfile { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsDisableplugin { + #[prost(string, repeated, tag = "1")] + pub values_str: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub sources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsAlwaysuseproxy { + #[prost(bool, tag = "1")] + pub value_bool: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsDaemon { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsWallet { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsLargechannels { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsExperimentaldualfund { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsExperimentalsplicing { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsExperimentalonionmessages { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsExperimentaloffers { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsExperimentalshutdownwrongfunding { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsExperimentalpeerstorage { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsExperimentalanchors { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsDatabaseupgrade { + #[prost(bool, tag = "1")] + pub value_bool: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsRgb { + #[prost(bytes = "vec", tag = "1")] + pub value_str: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsAlias { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsPidfile { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsIgnorefeelimits { + #[prost(bool, tag = "1")] + pub value_bool: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsWatchtimeblocks { + #[prost(uint32, tag = "1")] + pub value_int: u32, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsMaxlocktimeblocks { + #[prost(uint32, tag = "1")] + pub value_int: u32, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsFundingconfirms { + #[prost(uint32, tag = "1")] + pub value_int: u32, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsCltvdelta { + #[prost(uint32, tag = "1")] + pub value_int: u32, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsCltvfinal { + #[prost(uint32, tag = "1")] + pub value_int: u32, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsCommittime { + #[prost(uint32, tag = "1")] + pub value_int: u32, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsFeebase { + #[prost(uint32, tag = "1")] + pub value_int: u32, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsRescan { + #[prost(sint64, tag = "1")] + pub value_int: i64, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsFeepersatoshi { + #[prost(uint32, tag = "1")] + pub value_int: u32, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsMaxconcurrenthtlcs { + #[prost(uint32, tag = "1")] + pub value_int: u32, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsHtlcminimummsat { + #[prost(message, optional, tag = "1")] + pub value_msat: ::core::option::Option, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsHtlcmaximummsat { + #[prost(message, optional, tag = "1")] + pub value_msat: ::core::option::Option, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsMaxdusthtlcexposuremsat { + #[prost(message, optional, tag = "1")] + pub value_msat: ::core::option::Option, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsMincapacitysat { + #[prost(uint64, tag = "1")] + pub value_int: u64, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, + #[prost(bool, optional, tag = "3")] + pub dynamic: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsAddr { + #[prost(string, repeated, tag = "1")] + pub values_str: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub sources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsAnnounceaddr { + #[prost(string, repeated, tag = "1")] + pub values_str: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub sources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsBindaddr { + #[prost(string, repeated, tag = "1")] + pub values_str: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub sources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsOffline { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsAutolisten { + #[prost(bool, tag = "1")] + pub value_bool: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsProxy { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsDisabledns { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsAnnounceaddrdiscovered { + #[prost( + enumeration = "listconfigs_configs_announceaddrdiscovered::ListconfigsConfigsAnnounceaddrdiscoveredValueStr", + tag = "1" + )] + pub value_str: i32, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +/// Nested message and enum types in `ListconfigsConfigsAnnounceaddrdiscovered`. +pub mod listconfigs_configs_announceaddrdiscovered { + /// ListConfigs.configs.announce-addr-discovered.value_str + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum ListconfigsConfigsAnnounceaddrdiscoveredValueStr { + True = 0, + False = 1, + Auto = 2, + } + impl ListconfigsConfigsAnnounceaddrdiscoveredValueStr { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListconfigsConfigsAnnounceaddrdiscoveredValueStr::True => "TRUE", + ListconfigsConfigsAnnounceaddrdiscoveredValueStr::False => "FALSE", + ListconfigsConfigsAnnounceaddrdiscoveredValueStr::Auto => "AUTO", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TRUE" => Some(Self::True), + "FALSE" => Some(Self::False), + "AUTO" => Some(Self::Auto), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsAnnounceaddrdiscoveredport { + #[prost(uint32, tag = "1")] + pub value_int: u32, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsEncryptedhsm { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsRpcfilemode { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsLoglevel { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsLogprefix { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsLogfile { + #[prost(string, repeated, tag = "1")] + pub values_str: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub sources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsLogtimestamps { + #[prost(bool, tag = "1")] + pub value_bool: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsForcefeerates { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsSubdaemon { + #[prost(string, repeated, tag = "1")] + pub values_str: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub sources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsFetchinvoicenoconnect { + #[prost(bool, tag = "1")] + pub set: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, + #[prost(string, optional, tag = "3")] + pub plugin: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsAccepthtlctlvtypes { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsTorservicepassword { + #[prost(string, tag = "1")] + pub value_str: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsAnnounceaddrdns { + #[prost(bool, tag = "1")] + pub value_bool: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsRequireconfirmedinputs { + #[prost(bool, tag = "1")] + pub value_bool: bool, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsCommitfee { + #[prost(uint64, tag = "1")] + pub value_int: u64, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsConfigsCommitfeerateoffset { + #[prost(uint32, tag = "1")] + pub value_int: u32, + #[prost(string, tag = "2")] + pub source: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsPlugins { + #[prost(string, tag = "1")] + pub path: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub name: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListconfigsPluginsOptions {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListconfigsImportantplugins { + #[prost(string, tag = "1")] + pub path: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub name: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListconfigsImportantpluginsOptions {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StopRequest {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StopResponse { + #[prost(enumeration = "stop_response::StopResult", optional, tag = "1")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `StopResponse`. +pub mod stop_response { + /// Stop.result + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum StopResult { + ShutdownComplete = 0, + } + impl StopResult { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + StopResult::ShutdownComplete => "SHUTDOWN_COMPLETE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SHUTDOWN_COMPLETE" => Some(Self::ShutdownComplete), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HelpRequest { + #[prost(string, optional, tag = "1")] + pub command: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HelpResponse { + #[prost(message, repeated, tag = "1")] + pub help: ::prost::alloc::vec::Vec, + #[prost(enumeration = "help_response::HelpFormathint", optional, tag = "2")] + pub format_hint: ::core::option::Option, +} +/// Nested message and enum types in `HelpResponse`. +pub mod help_response { + /// Help.format-hint + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum HelpFormathint { + Simple = 0, + } + impl HelpFormathint { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + HelpFormathint::Simple => "SIMPLE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SIMPLE" => Some(Self::Simple), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HelpHelp { + #[prost(string, tag = "1")] + pub command: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub category: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub verbose: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PreapprovekeysendRequest { + #[prost(bytes = "vec", tag = "1")] + pub destination: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub payment_hash: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "3")] + pub amount_msat: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct PreapprovekeysendResponse {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PreapproveinvoiceRequest { + #[prost(string, tag = "1")] + pub bolt11: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct PreapproveinvoiceResponse {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StaticbackupRequest {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StaticbackupResponse { + #[prost(bytes = "vec", repeated, tag = "1")] + pub scb: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct BkprchannelsapyRequest { + #[prost(uint64, optional, tag = "1")] + pub start_time: ::core::option::Option, + #[prost(uint64, optional, tag = "2")] + pub end_time: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprchannelsapyResponse { + #[prost(message, repeated, tag = "1")] + pub channels_apy: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprchannelsapyChannelsApy { + #[prost(string, tag = "1")] + pub account: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub routed_out_msat: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub routed_in_msat: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub lease_fee_paid_msat: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub lease_fee_earned_msat: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub pushed_out_msat: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub pushed_in_msat: ::core::option::Option, + #[prost(message, optional, tag = "8")] + pub our_start_balance_msat: ::core::option::Option, + #[prost(message, optional, tag = "9")] + pub channel_start_balance_msat: ::core::option::Option, + #[prost(message, optional, tag = "10")] + pub fees_out_msat: ::core::option::Option, + #[prost(message, optional, tag = "11")] + pub fees_in_msat: ::core::option::Option, + #[prost(string, tag = "12")] + pub utilization_out: ::prost::alloc::string::String, + #[prost(string, optional, tag = "13")] + pub utilization_out_initial: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, tag = "14")] + pub utilization_in: ::prost::alloc::string::String, + #[prost(string, optional, tag = "15")] + pub utilization_in_initial: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, tag = "16")] + pub apy_out: ::prost::alloc::string::String, + #[prost(string, optional, tag = "17")] + pub apy_out_initial: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, tag = "18")] + pub apy_in: ::prost::alloc::string::String, + #[prost(string, optional, tag = "19")] + pub apy_in_initial: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, tag = "20")] + pub apy_total: ::prost::alloc::string::String, + #[prost(string, optional, tag = "21")] + pub apy_total_initial: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "22")] + pub apy_lease: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprdumpincomecsvRequest { + #[prost(string, tag = "1")] + pub csv_format: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub csv_file: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag = "3")] + pub consolidate_fees: ::core::option::Option, + #[prost(uint64, optional, tag = "4")] + pub start_time: ::core::option::Option, + #[prost(uint64, optional, tag = "5")] + pub end_time: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprdumpincomecsvResponse { + #[prost(string, tag = "1")] + pub csv_file: ::prost::alloc::string::String, + #[prost( + enumeration = "bkprdumpincomecsv_response::BkprdumpincomecsvCsvFormat", + tag = "2" + )] + pub csv_format: i32, +} +/// Nested message and enum types in `BkprdumpincomecsvResponse`. +pub mod bkprdumpincomecsv_response { + /// Bkpr-DumpIncomeCsv.csv_format + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum BkprdumpincomecsvCsvFormat { + Cointracker = 0, + Koinly = 1, + Harmony = 2, + Quickbooks = 3, + } + impl BkprdumpincomecsvCsvFormat { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + BkprdumpincomecsvCsvFormat::Cointracker => "COINTRACKER", + BkprdumpincomecsvCsvFormat::Koinly => "KOINLY", + BkprdumpincomecsvCsvFormat::Harmony => "HARMONY", + BkprdumpincomecsvCsvFormat::Quickbooks => "QUICKBOOKS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "COINTRACKER" => Some(Self::Cointracker), + "KOINLY" => Some(Self::Koinly), + "HARMONY" => Some(Self::Harmony), + "QUICKBOOKS" => Some(Self::Quickbooks), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprinspectRequest { + #[prost(string, tag = "1")] + pub account: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprinspectResponse { + #[prost(message, repeated, tag = "1")] + pub txs: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprinspectTxs { + #[prost(bytes = "vec", tag = "1")] + pub txid: ::prost::alloc::vec::Vec, + #[prost(uint32, optional, tag = "2")] + pub blockheight: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub fees_paid_msat: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub outputs: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprinspectTxsOutputs { + #[prost(string, tag = "1")] + pub account: ::prost::alloc::string::String, + #[prost(uint32, tag = "2")] + pub outnum: u32, + #[prost(message, optional, tag = "3")] + pub output_value_msat: ::core::option::Option, + #[prost(string, tag = "4")] + pub currency: ::prost::alloc::string::String, + #[prost(message, optional, tag = "5")] + pub credit_msat: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub debit_msat: ::core::option::Option, + #[prost(string, optional, tag = "7")] + pub originating_account: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "8")] + pub output_tag: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "9")] + pub spend_tag: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "10")] + pub spending_txid: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "11")] + pub payment_id: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprlistaccounteventsRequest { + #[prost(string, optional, tag = "1")] + pub account: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprlistaccounteventsResponse { + #[prost(message, repeated, tag = "1")] + pub events: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprlistaccounteventsEvents { + #[prost(string, tag = "1")] + pub account: ::prost::alloc::string::String, + #[prost( + enumeration = "bkprlistaccountevents_events::BkprlistaccounteventsEventsType", + tag = "2" + )] + pub item_type: i32, + #[prost(string, tag = "3")] + pub tag: ::prost::alloc::string::String, + #[prost(message, optional, tag = "4")] + pub credit_msat: ::core::option::Option, + #[prost(message, optional, tag = "5")] + pub debit_msat: ::core::option::Option, + #[prost(string, tag = "6")] + pub currency: ::prost::alloc::string::String, + #[prost(uint32, tag = "7")] + pub timestamp: u32, + #[prost(string, optional, tag = "8")] + pub outpoint: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint32, optional, tag = "9")] + pub blockheight: ::core::option::Option, + #[prost(string, optional, tag = "10")] + pub origin: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "11")] + pub payment_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "12")] + pub txid: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "13")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "14")] + pub fees_msat: ::core::option::Option, + #[prost(bool, optional, tag = "15")] + pub is_rebalance: ::core::option::Option, + #[prost(uint32, optional, tag = "16")] + pub part_id: ::core::option::Option, +} +/// Nested message and enum types in `BkprlistaccounteventsEvents`. +pub mod bkprlistaccountevents_events { + /// Bkpr-ListAccountEvents.events\[\].type + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum BkprlistaccounteventsEventsType { + OnchainFee = 0, + Chain = 1, + Channel = 2, + } + impl BkprlistaccounteventsEventsType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + BkprlistaccounteventsEventsType::OnchainFee => "ONCHAIN_FEE", + BkprlistaccounteventsEventsType::Chain => "CHAIN", + BkprlistaccounteventsEventsType::Channel => "CHANNEL", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ONCHAIN_FEE" => Some(Self::OnchainFee), + "CHAIN" => Some(Self::Chain), + "CHANNEL" => Some(Self::Channel), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct BkprlistbalancesRequest {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprlistbalancesResponse { + #[prost(message, repeated, tag = "1")] + pub accounts: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprlistbalancesAccounts { + #[prost(string, tag = "1")] + pub account: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub balances: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", optional, tag = "3")] + pub peer_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bool, optional, tag = "4")] + pub we_opened: ::core::option::Option, + #[prost(bool, optional, tag = "5")] + pub account_closed: ::core::option::Option, + #[prost(bool, optional, tag = "6")] + pub account_resolved: ::core::option::Option, + #[prost(uint32, optional, tag = "7")] + pub resolved_at_block: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprlistbalancesAccountsBalances { + #[prost(message, optional, tag = "1")] + pub balance_msat: ::core::option::Option, + #[prost(string, tag = "2")] + pub coin_type: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct BkprlistincomeRequest { + #[prost(bool, optional, tag = "1")] + pub consolidate_fees: ::core::option::Option, + #[prost(uint32, optional, tag = "2")] + pub start_time: ::core::option::Option, + #[prost(uint32, optional, tag = "3")] + pub end_time: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprlistincomeResponse { + #[prost(message, repeated, tag = "1")] + pub income_events: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BkprlistincomeIncomeEvents { + #[prost(string, tag = "1")] + pub account: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub tag: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub credit_msat: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub debit_msat: ::core::option::Option, + #[prost(string, tag = "5")] + pub currency: ::prost::alloc::string::String, + #[prost(uint32, tag = "6")] + pub timestamp: u32, + #[prost(string, optional, tag = "7")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "8")] + pub outpoint: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "9")] + pub txid: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bytes = "vec", optional, tag = "10")] + pub payment_id: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct BlacklistruneRequest { + #[prost(uint64, optional, tag = "1")] + pub start: ::core::option::Option, + #[prost(uint64, optional, tag = "2")] + pub end: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BlacklistruneResponse { + #[prost(message, repeated, tag = "1")] + pub blacklist: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct BlacklistruneBlacklist { + #[prost(uint64, tag = "1")] + pub start: u64, + #[prost(uint64, tag = "2")] + pub end: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckruneRequest { + #[prost(string, tag = "1")] + pub rune: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub nodeid: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub method: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "4")] + pub params: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct CheckruneResponse { + #[prost(bool, tag = "1")] + pub valid: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateruneRequest { + #[prost(string, optional, tag = "1")] + pub rune: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub restrictions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateruneResponse { + #[prost(string, tag = "1")] + pub rune: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub unique_id: ::prost::alloc::string::String, + #[prost(string, optional, tag = "3")] + pub warning_unrestricted_rune: ::core::option::Option< + ::prost::alloc::string::String, + >, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ShowrunesRequest { + #[prost(string, optional, tag = "1")] + pub rune: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ShowrunesResponse { + #[prost(message, repeated, tag = "1")] + pub runes: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ShowrunesRunes { + #[prost(string, tag = "1")] + pub rune: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub unique_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "3")] + pub restrictions: ::prost::alloc::vec::Vec, + #[prost(string, tag = "4")] + pub restrictions_as_english: ::prost::alloc::string::String, + #[prost(bool, optional, tag = "5")] + pub stored: ::core::option::Option, + #[prost(bool, optional, tag = "6")] + pub blacklisted: ::core::option::Option, + #[prost(double, optional, tag = "7")] + pub last_used: ::core::option::Option, + #[prost(bool, optional, tag = "8")] + pub our_rune: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ShowrunesRunesRestrictions { + #[prost(message, repeated, tag = "1")] + pub alternatives: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub english: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ShowrunesRunesRestrictionsAlternatives { + #[prost(string, tag = "1")] + pub fieldname: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub value: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub condition: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub english: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StreamBlockAddedRequest {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BlockAddedNotification { + #[prost(bytes = "vec", tag = "1")] + pub hash: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub height: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StreamChannelOpenFailedRequest {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ChannelOpenFailedNotification { + #[prost(bytes = "vec", tag = "1")] + pub channel_id: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StreamChannelOpenedRequest {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ChannelOpenedNotification { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub funding_msat: ::core::option::Option, + #[prost(bytes = "vec", tag = "3")] + pub funding_txid: ::prost::alloc::vec::Vec, + #[prost(bool, tag = "4")] + pub channel_ready: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StreamConnectRequest {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PeerConnectNotification { + #[prost(bytes = "vec", tag = "1")] + pub id: ::prost::alloc::vec::Vec, + #[prost(enumeration = "peer_connect_notification::PeerConnectDirection", tag = "2")] + pub direction: i32, + #[prost(message, optional, tag = "3")] + pub address: ::core::option::Option, +} +/// Nested message and enum types in `PeerConnectNotification`. +pub mod peer_connect_notification { + /// connect.direction + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum PeerConnectDirection { + In = 0, + Out = 1, + } + impl PeerConnectDirection { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + PeerConnectDirection::In => "IN", + PeerConnectDirection::Out => "OUT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IN" => Some(Self::In), + "OUT" => Some(Self::Out), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PeerConnectAddress { + #[prost(enumeration = "peer_connect_address::PeerConnectAddressType", tag = "1")] + pub item_type: i32, + #[prost(string, optional, tag = "2")] + pub socket: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "3")] + pub address: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint32, optional, tag = "4")] + pub port: ::core::option::Option, +} +/// Nested message and enum types in `PeerConnectAddress`. +pub mod peer_connect_address { + /// connect.address.type + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum PeerConnectAddressType { + LocalSocket = 0, + Ipv4 = 1, + Ipv6 = 2, + Torv2 = 3, + Torv3 = 4, + } + impl PeerConnectAddressType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + PeerConnectAddressType::LocalSocket => "LOCAL_SOCKET", + PeerConnectAddressType::Ipv4 => "IPV4", + PeerConnectAddressType::Ipv6 => "IPV6", + PeerConnectAddressType::Torv2 => "TORV2", + PeerConnectAddressType::Torv3 => "TORV3", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "LOCAL_SOCKET" => Some(Self::LocalSocket), + "IPV4" => Some(Self::Ipv4), + "IPV6" => Some(Self::Ipv6), + "TORV2" => Some(Self::Torv2), + "TORV3" => Some(Self::Torv3), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StreamCustomMsgRequest {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CustomMsgNotification { + #[prost(bytes = "vec", tag = "1")] + pub peer_id: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub payload: ::prost::alloc::vec::Vec, +} +/// Generated client implementations. +pub mod node_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct NodeClient { + inner: tonic::client::Grpc, + } + impl NodeClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl NodeClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> NodeClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + NodeClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn getinfo( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Getinfo"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Getinfo")); + self.inner.unary(req, path, codec).await + } + pub async fn list_peers( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ListPeers"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListPeers")); + self.inner.unary(req, path, codec).await + } + pub async fn list_funds( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ListFunds"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListFunds")); + self.inner.unary(req, path, codec).await + } + pub async fn send_pay( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/SendPay"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "SendPay")); + self.inner.unary(req, path, codec).await + } + pub async fn list_channels( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ListChannels"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListChannels")); + self.inner.unary(req, path, codec).await + } + pub async fn add_gossip( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/AddGossip"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "AddGossip")); + self.inner.unary(req, path, codec).await + } + pub async fn add_psbt_output( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/AddPsbtOutput"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "AddPsbtOutput")); + self.inner.unary(req, path, codec).await + } + pub async fn auto_clean_once( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/AutoCleanOnce"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "AutoCleanOnce")); + self.inner.unary(req, path, codec).await + } + pub async fn auto_clean_status( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/AutoCleanStatus"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "AutoCleanStatus")); + self.inner.unary(req, path, codec).await + } + pub async fn check_message( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/CheckMessage"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "CheckMessage")); + self.inner.unary(req, path, codec).await + } + pub async fn close( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Close"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Close")); + self.inner.unary(req, path, codec).await + } + pub async fn connect_peer( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ConnectPeer"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ConnectPeer")); + self.inner.unary(req, path, codec).await + } + pub async fn create_invoice( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/CreateInvoice"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "CreateInvoice")); + self.inner.unary(req, path, codec).await + } + pub async fn datastore( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Datastore"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Datastore")); + self.inner.unary(req, path, codec).await + } + pub async fn datastore_usage( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/DatastoreUsage"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "DatastoreUsage")); + self.inner.unary(req, path, codec).await + } + pub async fn create_onion( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/CreateOnion"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "CreateOnion")); + self.inner.unary(req, path, codec).await + } + pub async fn del_datastore( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/DelDatastore"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "DelDatastore")); + self.inner.unary(req, path, codec).await + } + pub async fn del_invoice( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/DelInvoice"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "DelInvoice")); + self.inner.unary(req, path, codec).await + } + pub async fn dev_forget_channel( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/DevForgetChannel", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "DevForgetChannel")); + self.inner.unary(req, path, codec).await + } + pub async fn emergency_recover( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/EmergencyRecover", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "EmergencyRecover")); + self.inner.unary(req, path, codec).await + } + pub async fn recover( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Recover"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Recover")); + self.inner.unary(req, path, codec).await + } + pub async fn recover_channel( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/RecoverChannel"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "RecoverChannel")); + self.inner.unary(req, path, codec).await + } + pub async fn invoice( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Invoice"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Invoice")); + self.inner.unary(req, path, codec).await + } + pub async fn create_invoice_request( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/CreateInvoiceRequest", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "CreateInvoiceRequest")); + self.inner.unary(req, path, codec).await + } + pub async fn disable_invoice_request( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/DisableInvoiceRequest", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "DisableInvoiceRequest")); + self.inner.unary(req, path, codec).await + } + pub async fn list_invoice_requests( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/ListInvoiceRequests", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "ListInvoiceRequests")); + self.inner.unary(req, path, codec).await + } + pub async fn list_datastore( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ListDatastore"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListDatastore")); + self.inner.unary(req, path, codec).await + } + pub async fn list_invoices( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ListInvoices"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListInvoices")); + self.inner.unary(req, path, codec).await + } + pub async fn send_onion( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/SendOnion"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "SendOnion")); + self.inner.unary(req, path, codec).await + } + pub async fn list_send_pays( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ListSendPays"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListSendPays")); + self.inner.unary(req, path, codec).await + } + pub async fn list_transactions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/ListTransactions", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListTransactions")); + self.inner.unary(req, path, codec).await + } + pub async fn make_secret( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/MakeSecret"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "MakeSecret")); + self.inner.unary(req, path, codec).await + } + pub async fn pay( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Pay"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Pay")); + self.inner.unary(req, path, codec).await + } + pub async fn list_nodes( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ListNodes"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListNodes")); + self.inner.unary(req, path, codec).await + } + pub async fn wait_any_invoice( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/WaitAnyInvoice"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "WaitAnyInvoice")); + self.inner.unary(req, path, codec).await + } + pub async fn wait_invoice( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/WaitInvoice"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "WaitInvoice")); + self.inner.unary(req, path, codec).await + } + pub async fn wait_send_pay( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/WaitSendPay"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "WaitSendPay")); + self.inner.unary(req, path, codec).await + } + pub async fn new_addr( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/NewAddr"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "NewAddr")); + self.inner.unary(req, path, codec).await + } + pub async fn withdraw( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Withdraw"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Withdraw")); + self.inner.unary(req, path, codec).await + } + pub async fn key_send( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/KeySend"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "KeySend")); + self.inner.unary(req, path, codec).await + } + pub async fn fund_psbt( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/FundPsbt"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "FundPsbt")); + self.inner.unary(req, path, codec).await + } + pub async fn send_psbt( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/SendPsbt"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "SendPsbt")); + self.inner.unary(req, path, codec).await + } + pub async fn sign_psbt( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/SignPsbt"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "SignPsbt")); + self.inner.unary(req, path, codec).await + } + pub async fn utxo_psbt( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/UtxoPsbt"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "UtxoPsbt")); + self.inner.unary(req, path, codec).await + } + pub async fn tx_discard( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/TxDiscard"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "TxDiscard")); + self.inner.unary(req, path, codec).await + } + pub async fn tx_prepare( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/TxPrepare"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "TxPrepare")); + self.inner.unary(req, path, codec).await + } + pub async fn tx_send( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/TxSend"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "TxSend")); + self.inner.unary(req, path, codec).await + } + pub async fn list_peer_channels( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/ListPeerChannels", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListPeerChannels")); + self.inner.unary(req, path, codec).await + } + pub async fn list_closed_channels( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/ListClosedChannels", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "ListClosedChannels")); + self.inner.unary(req, path, codec).await + } + pub async fn decode_pay( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/DecodePay"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "DecodePay")); + self.inner.unary(req, path, codec).await + } + pub async fn decode( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Decode"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Decode")); + self.inner.unary(req, path, codec).await + } + pub async fn del_pay( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/DelPay"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "DelPay")); + self.inner.unary(req, path, codec).await + } + pub async fn del_forward( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/DelForward"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "DelForward")); + self.inner.unary(req, path, codec).await + } + pub async fn disable_offer( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/DisableOffer"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "DisableOffer")); + self.inner.unary(req, path, codec).await + } + pub async fn disconnect( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Disconnect"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Disconnect")); + self.inner.unary(req, path, codec).await + } + pub async fn feerates( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Feerates"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Feerates")); + self.inner.unary(req, path, codec).await + } + pub async fn fetch_invoice( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/FetchInvoice"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "FetchInvoice")); + self.inner.unary(req, path, codec).await + } + pub async fn fund_channel_cancel( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/FundChannel_Cancel", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "FundChannel_Cancel")); + self.inner.unary(req, path, codec).await + } + pub async fn fund_channel_complete( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/FundChannel_Complete", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "FundChannel_Complete")); + self.inner.unary(req, path, codec).await + } + pub async fn fund_channel( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/FundChannel"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "FundChannel")); + self.inner.unary(req, path, codec).await + } + pub async fn fund_channel_start( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/FundChannel_Start", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "FundChannel_Start")); + self.inner.unary(req, path, codec).await + } + pub async fn get_log( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/GetLog"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "GetLog")); + self.inner.unary(req, path, codec).await + } + pub async fn funder_update( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/FunderUpdate"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "FunderUpdate")); + self.inner.unary(req, path, codec).await + } + pub async fn get_route( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/GetRoute"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "GetRoute")); + self.inner.unary(req, path, codec).await + } + pub async fn list_forwards( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ListForwards"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListForwards")); + self.inner.unary(req, path, codec).await + } + pub async fn list_offers( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ListOffers"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListOffers")); + self.inner.unary(req, path, codec).await + } + pub async fn list_pays( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ListPays"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListPays")); + self.inner.unary(req, path, codec).await + } + pub async fn list_htlcs( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ListHtlcs"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListHtlcs")); + self.inner.unary(req, path, codec).await + } + pub async fn multi_fund_channel( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/MultiFundChannel", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "MultiFundChannel")); + self.inner.unary(req, path, codec).await + } + pub async fn multi_withdraw( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/MultiWithdraw"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "MultiWithdraw")); + self.inner.unary(req, path, codec).await + } + pub async fn offer( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Offer"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Offer")); + self.inner.unary(req, path, codec).await + } + pub async fn open_channel_abort( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/OpenChannel_Abort", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "OpenChannel_Abort")); + self.inner.unary(req, path, codec).await + } + pub async fn open_channel_bump( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/OpenChannel_Bump", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "OpenChannel_Bump")); + self.inner.unary(req, path, codec).await + } + pub async fn open_channel_init( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/OpenChannel_Init", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "OpenChannel_Init")); + self.inner.unary(req, path, codec).await + } + pub async fn open_channel_signed( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/OpenChannel_Signed", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "OpenChannel_Signed")); + self.inner.unary(req, path, codec).await + } + pub async fn open_channel_update( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/OpenChannel_Update", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "OpenChannel_Update")); + self.inner.unary(req, path, codec).await + } + pub async fn ping( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Ping"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Ping")); + self.inner.unary(req, path, codec).await + } + pub async fn plugin( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Plugin"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Plugin")); + self.inner.unary(req, path, codec).await + } + pub async fn rene_pay_status( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/RenePayStatus"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "RenePayStatus")); + self.inner.unary(req, path, codec).await + } + pub async fn rene_pay( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/RenePay"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "RenePay")); + self.inner.unary(req, path, codec).await + } + pub async fn reserve_inputs( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ReserveInputs"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ReserveInputs")); + self.inner.unary(req, path, codec).await + } + pub async fn send_custom_msg( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/SendCustomMsg"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "SendCustomMsg")); + self.inner.unary(req, path, codec).await + } + pub async fn send_invoice( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/SendInvoice"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "SendInvoice")); + self.inner.unary(req, path, codec).await + } + pub async fn set_channel( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/SetChannel"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "SetChannel")); + self.inner.unary(req, path, codec).await + } + pub async fn set_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/SetConfig"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "SetConfig")); + self.inner.unary(req, path, codec).await + } + pub async fn set_psbt_version( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/SetPsbtVersion"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "SetPsbtVersion")); + self.inner.unary(req, path, codec).await + } + pub async fn sign_invoice( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/SignInvoice"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "SignInvoice")); + self.inner.unary(req, path, codec).await + } + pub async fn sign_message( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/SignMessage"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "SignMessage")); + self.inner.unary(req, path, codec).await + } + pub async fn splice_init( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Splice_Init"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Splice_Init")); + self.inner.unary(req, path, codec).await + } + pub async fn splice_signed( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Splice_Signed"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Splice_Signed")); + self.inner.unary(req, path, codec).await + } + pub async fn splice_update( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Splice_Update"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Splice_Update")); + self.inner.unary(req, path, codec).await + } + pub async fn unreserve_inputs( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/UnreserveInputs"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "UnreserveInputs")); + self.inner.unary(req, path, codec).await + } + pub async fn upgrade_wallet( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/UpgradeWallet"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "UpgradeWallet")); + self.inner.unary(req, path, codec).await + } + pub async fn wait_block_height( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/WaitBlockHeight"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "WaitBlockHeight")); + self.inner.unary(req, path, codec).await + } + pub async fn wait( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Wait"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Wait")); + self.inner.unary(req, path, codec).await + } + pub async fn list_configs( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ListConfigs"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ListConfigs")); + self.inner.unary(req, path, codec).await + } + pub async fn stop( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Stop"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Stop")); + self.inner.unary(req, path, codec).await + } + pub async fn help( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/Help"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "Help")); + self.inner.unary(req, path, codec).await + } + pub async fn pre_approve_keysend( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/PreApproveKeysend", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "PreApproveKeysend")); + self.inner.unary(req, path, codec).await + } + pub async fn pre_approve_invoice( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/PreApproveInvoice", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "PreApproveInvoice")); + self.inner.unary(req, path, codec).await + } + pub async fn static_backup( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/StaticBackup"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "StaticBackup")); + self.inner.unary(req, path, codec).await + } + pub async fn bkpr_channels_apy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/BkprChannelsApy"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "BkprChannelsApy")); + self.inner.unary(req, path, codec).await + } + pub async fn bkpr_dump_income_csv( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/BkprDumpIncomeCsv", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "BkprDumpIncomeCsv")); + self.inner.unary(req, path, codec).await + } + pub async fn bkpr_inspect( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/BkprInspect"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "BkprInspect")); + self.inner.unary(req, path, codec).await + } + pub async fn bkpr_list_account_events( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/BkprListAccountEvents", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "BkprListAccountEvents")); + self.inner.unary(req, path, codec).await + } + pub async fn bkpr_list_balances( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/BkprListBalances", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "BkprListBalances")); + self.inner.unary(req, path, codec).await + } + pub async fn bkpr_list_income( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/BkprListIncome"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "BkprListIncome")); + self.inner.unary(req, path, codec).await + } + pub async fn blacklist_rune( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/BlacklistRune"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "BlacklistRune")); + self.inner.unary(req, path, codec).await + } + pub async fn check_rune( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/CheckRune"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "CheckRune")); + self.inner.unary(req, path, codec).await + } + pub async fn create_rune( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/CreateRune"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "CreateRune")); + self.inner.unary(req, path, codec).await + } + pub async fn show_runes( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/cln.Node/ShowRunes"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "ShowRunes")); + self.inner.unary(req, path, codec).await + } + pub async fn subscribe_block_added( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/SubscribeBlockAdded", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "SubscribeBlockAdded")); + self.inner.server_streaming(req, path, codec).await + } + pub async fn subscribe_channel_open_failed( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response< + tonic::codec::Streaming, + >, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/SubscribeChannelOpenFailed", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "SubscribeChannelOpenFailed")); + self.inner.server_streaming(req, path, codec).await + } + pub async fn subscribe_channel_opened( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/SubscribeChannelOpened", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "SubscribeChannelOpened")); + self.inner.server_streaming(req, path, codec).await + } + pub async fn subscribe_connect( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/SubscribeConnect", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cln.Node", "SubscribeConnect")); + self.inner.server_streaming(req, path, codec).await + } + pub async fn subscribe_custom_msg( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cln.Node/SubscribeCustomMsg", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cln.Node", "SubscribeCustomMsg")); + self.inner.server_streaming(req, path, codec).await + } + } +} diff --git a/cln-rs/src/lib.rs b/cln-rs/src/lib.rs new file mode 100644 index 0000000..e4cc949 --- /dev/null +++ b/cln-rs/src/lib.rs @@ -0,0 +1,74 @@ +pub mod cln; + +// use cln::node_client; +// use cln::{listinvoices_invoices::ListinvoicesInvoicesStatus, node_client::NodeClient}; +// use cln::{GetinfoRequest, InvoiceRequest, PayRequest}; + +// use tonic::transport::{Certificate, Channel, ClientTlsConfig, Endpoint, Identity}; + +// use std::fs; +// use std::error::Error; + +// pub struct CLNClient { +// url: String, +// client: NodeClient, +// } + +// impl CLNClient { + +// pub async fn connect(url: String, cert_path: String, key_path: String, cacert_path: String) -> Result> { + +// let cert_text: Vec = fs::read(cert_path.clone())?; +// let key_text: Vec = fs::read(key_path.clone())?; +// let cacert_text: Vec = fs::read(cacert_path.clone())?; + +// let ca_certificate = Certificate::from_pem(&cacert_text); +// let client_identity = Identity::from_pem(&cert_text, &key_text); + + +// let tls = ClientTlsConfig::new() +// .ca_certificate(ca_certificate) +// .domain_name("example.com"); + +// let channel = Channel::from_static("https://[::1]:50051") +// .tls_config(tls)? +// .connect() +// .await?; + +// let client = NodeClient::new(channel); + +// // let tls_config = ClientTlsConfig::new() +// // .domain_name("localhost") +// // .ca_certificate(ca_certificate) +// // .identity(client_identity); + +// // let channel = Channel::from_shared(url)? +// // .tls_config(tls_config)? +// // .connect() +// // .await?; + +// // let client = NodeClient::new(channel); + +// Ok(CLNClient { +// url, +// client +// }) +// } +// } + + +// // pub fn add(left: usize, right: usize) -> usize { +// // left + right +// // } + +// // #[cfg(test)] +// // mod tests { +// // use super::*; + +// // #[test] +// // fn it_works() { +// // let result = add(2, 2); +// // assert_eq!(result, 4); +// // } +// // } + From 3a6f562f7f23232bbdd872857e144fd52944bab4 Mon Sep 17 00:00:00 2001 From: Eric P Date: Tue, 16 Jul 2024 01:45:05 -0500 Subject: [PATCH 3/3] Add partial CLN support with potential for others in the future --- Cargo.toml | 1 + cln-rs/src/lib.rs | 75 +-------- config_spec.toml | 43 +++-- helipad.conf | 4 +- src/handler.rs | 48 +++--- src/lightning.rs | 297 +++++++++++++--------------------- src/lnclient.rs | 84 ++++++++++ src/lnclient/clnclient.rs | 282 ++++++++++++++++++++++++++++++++ src/lnclient/lndclient.rs | 212 ++++++++++++++++++++++++ src/main.rs | 328 ++++++++++++++++++++++++-------------- 10 files changed, 959 insertions(+), 415 deletions(-) create mode 100644 src/lnclient.rs create mode 100644 src/lnclient/clnclient.rs create mode 100644 src/lnclient/lndclient.rs diff --git a/Cargo.toml b/Cargo.toml index f910cdc..fdadce1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,6 +34,7 @@ axum-extra = { version = "0.9.3", features = ["cookie"] } axum_typed_multipart = "0.11.0" tempfile = "3.10.1" tower-http = { version = "0.5.2", features = ["fs", "cors"] } +async-trait = "0.1.81" [build-dependencies] configure_me_codegen = "0.4.1" diff --git a/cln-rs/src/lib.rs b/cln-rs/src/lib.rs index e4cc949..75c2fd1 100644 --- a/cln-rs/src/lib.rs +++ b/cln-rs/src/lib.rs @@ -1,74 +1 @@ -pub mod cln; - -// use cln::node_client; -// use cln::{listinvoices_invoices::ListinvoicesInvoicesStatus, node_client::NodeClient}; -// use cln::{GetinfoRequest, InvoiceRequest, PayRequest}; - -// use tonic::transport::{Certificate, Channel, ClientTlsConfig, Endpoint, Identity}; - -// use std::fs; -// use std::error::Error; - -// pub struct CLNClient { -// url: String, -// client: NodeClient, -// } - -// impl CLNClient { - -// pub async fn connect(url: String, cert_path: String, key_path: String, cacert_path: String) -> Result> { - -// let cert_text: Vec = fs::read(cert_path.clone())?; -// let key_text: Vec = fs::read(key_path.clone())?; -// let cacert_text: Vec = fs::read(cacert_path.clone())?; - -// let ca_certificate = Certificate::from_pem(&cacert_text); -// let client_identity = Identity::from_pem(&cert_text, &key_text); - - -// let tls = ClientTlsConfig::new() -// .ca_certificate(ca_certificate) -// .domain_name("example.com"); - -// let channel = Channel::from_static("https://[::1]:50051") -// .tls_config(tls)? -// .connect() -// .await?; - -// let client = NodeClient::new(channel); - -// // let tls_config = ClientTlsConfig::new() -// // .domain_name("localhost") -// // .ca_certificate(ca_certificate) -// // .identity(client_identity); - -// // let channel = Channel::from_shared(url)? -// // .tls_config(tls_config)? -// // .connect() -// // .await?; - -// // let client = NodeClient::new(channel); - -// Ok(CLNClient { -// url, -// client -// }) -// } -// } - - -// // pub fn add(left: usize, right: usize) -> usize { -// // left + right -// // } - -// // #[cfg(test)] -// // mod tests { -// // use super::*; - -// // #[test] -// // fn it_works() { -// // let result = add(2, 2); -// // assert_eq!(result, 4); -// // } -// // } - +pub mod cln; \ No newline at end of file diff --git a/config_spec.toml b/config_spec.toml index a04b2c9..3866f47 100644 --- a/config_spec.toml +++ b/config_spec.toml @@ -8,27 +8,52 @@ name = "sound_dir" type = "String" doc = "The location to store boost sounds." +[[param]] +name = "listen_port" +type = "u16" +doc = "The port to listen on." + +[[param]] +name = "password" +type = "String" +doc = "The password to use to access Helipad." + +[[param]] +name = "node_type" +type = "String" +doc = "The type of node to access (LND or CLN)." + +[[param]] +name = "lnd_url" +type = "String" +doc = "The url and port of the LND grpc api." + [[param]] name = "macaroon" type = "String" -doc = "The location of the macaroon file." +doc = "The location of the LND macaroon file." [[param]] name = "cert" type = "String" -doc = "The location of the tls certificate file." +doc = "The location of the LND tls certificate file." [[param]] -name = "listen_port" -type = "u16" -doc = "The port to listen on." +name = "cln_url" +type = "String" +doc = "The url and port of the CLN GRPC API (e.g. localhost:3001)." [[param]] -name = "password" +name = "cln_cert_path" type = "String" -doc = "The password to use to access Helipad." +doc = "The location of the CLN client certificate." [[param]] -name = "lnd_url" +name = "cln_key_path" +type = "String" +doc = "The location of the CLN client key." + +[[param]] +name = "cln_cacert_path" type = "String" -doc = "The url and port of the LND grpc api." \ No newline at end of file +doc = "The location of the CLN CA certificate." \ No newline at end of file diff --git a/helipad.conf b/helipad.conf index 87cf5ce..d43e47f 100644 --- a/helipad.conf +++ b/helipad.conf @@ -21,4 +21,6 @@ macaroon="/lnd/data/chain/bitcoin/mainnet/admin.macaroon" cert="/lnd/tls.cert" ##: Overridden by env:LND_URL -lnd_url="https://127.0.0.1:10009" \ No newline at end of file +lnd_url="https://127.0.0.1:10009" + +cln_url="https://cln:2105" \ No newline at end of file diff --git a/src/handler.rs b/src/handler.rs index 1428388..406b198 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -25,6 +25,8 @@ use std::string::String; use url::Url; use tempfile::NamedTempFile; +use crate::lnclient; + //Structs and Enums ------------------------------------------------------------------------------------------ #[derive(Debug, Serialize, Deserialize)] struct JwtClaims { @@ -406,7 +408,7 @@ pub struct ReplyForm { #[derive(Debug, Serialize, Deserialize)] pub struct ReplyResponse { success: bool, - data: BoostRecord, + payment: lnclient::Payment, } pub async fn api_v1_reply( @@ -461,10 +463,12 @@ pub async fn api_v1_reply( }); let helipad_config = state.helipad_config.clone(); - let lightning = match lightning::connect_to_lnd(helipad_config.node_address, helipad_config.cert_path, helipad_config.macaroon_path).await { - Some(lndconn) => lndconn, - None => { - return (StatusCode::INTERNAL_SERVER_ERROR, "** Error connecting to LND.").into_response(); + + let lightning = match lnclient::connect(&helipad_config).await { + Ok(conn) => conn, + Err(e) => { + eprintln!("** Error connecting to node: {}", e); + return (StatusCode::INTERNAL_SERVER_ERROR, "** Error connecting to node.").into_response(); } }; @@ -478,33 +482,27 @@ pub async fn api_v1_reply( let mut cache = podcastindex::GuidCache::new(1); - let mut boost = match lightning::parse_boost_from_payment(payment, &mut cache).await { - Some(boost) => boost, - None => { - eprintln!("** Error parsing sent boost"); - return (StatusCode::INTERNAL_SERVER_ERROR, "** Error parsing sent boost").into_response(); + if let Some(mut boost) = lightning::parse_boost_from_payment(&payment, &mut cache).await { + if let Some(pay_info) = boost.payment_info { + boost.payment_info = Some(dbif::PaymentRecord { + reply_to_idx: Some(index), + ..pay_info + }); } - }; - - if let Some(pay_info) = boost.payment_info { - boost.payment_info = Some(dbif::PaymentRecord { - reply_to_idx: Some(index), - ..pay_info - }); - } - //Give some output - println!("Sent Boost: {:#?}", boost); + //Give some output + println!("Sent Boost: {:#?}", boost); - //Store in the database - match dbif::add_payment_to_db(&state.helipad_config.database_file_path, &boost) { - Ok(_) => println!("New sent boost added."), - Err(e) => eprintln!("Error adding sent boost: {:#?}", e) + //Store in the database + match dbif::add_payment_to_db(&state.helipad_config.database_file_path, &boost) { + Ok(_) => println!("New sent boost added."), + Err(e) => eprintln!("Error adding sent boost: {:#?}", e) + } } Json(ReplyResponse { success: true, - data: boost, + payment: payment, }).into_response() } diff --git a/src/lightning.rs b/src/lightning.rs index e05d090..57a1456 100644 --- a/src/lightning.rs +++ b/src/lightning.rs @@ -1,12 +1,8 @@ use crate::podcastindex; -use data_encoding::HEXLOWER; -use lnd::lnrpc::lnrpc::{SendRequest, Payment, Invoice}; +use crate::lnclient::{LNClient, Invoice, Payment, Boost}; use serde_json::Value; -use sha2::{Sha256, Digest}; use std::collections::HashMap; -use std::fs; use std::error::Error; -use rand::RngCore; use serde::{Deserialize, Deserializer}; // TLV keys (see https://github.com/satoshisstream/satoshis.stream/blob/main/TLV_registry.md) @@ -125,43 +121,6 @@ impl std::fmt::Display for BoostError { impl std::error::Error for BoostError {} -pub async fn connect_to_lnd(node_address: String, cert_path: String, macaroon_path: String) -> Option { - let cert: Vec; - match fs::read(cert_path.clone()) { - Ok(cert_content) => { - // println!(" - Success."); - cert = cert_content; - } - Err(_) => { - eprintln!("Cannot find a valid tls.cert file"); - return None; - } - } - - let macaroon: Vec; - match fs::read(macaroon_path.clone()) { - Ok(macaroon_content) => { - // println!(" - Success."); - macaroon = macaroon_content; - } - Err(_) => { - eprintln!("Cannot find a valid admin.macaroon file"); - return None; - } - } - - //Make the connection to LND - let lightning = lnd::Lnd::connect_with_macaroon(node_address.clone(), &cert, &macaroon).await; - - if lightning.is_err() { - println!("Could not connect to: [{}] using tls: [{}] and macaroon: [{}]", node_address, cert_path, macaroon_path); - eprintln!("{:#?}", lightning.err()); - return None; - } - - return lightning.ok(); -} - pub async fn resolve_keysend_address(address: &str) -> Result> { if !address.contains('@') { return Err(Box::new(KeysendAddressError("Invalid keysend address".to_string()))); @@ -192,7 +151,7 @@ pub async fn resolve_keysend_address(address: &str) -> Result, custom_value: Option, sats: u64, tlv: Value) -> Result> { +pub async fn send_boost(mut lightning: Box, destination: String, custom_key: Option, custom_value: Option, sats: u64, tlv: Value) -> Result> { // thanks to BrianOfLondon and Mostro for keysend details: // https://peakd.com/@brianoflondon/lightning-keysend-is-strange-and-how-to-send-keysend-payment-in-lightning-with-the-lnd-rest-api-via-python // https://github.com/MostroP2P/mostro/blob/52a4f86c3942c26bd42dc55f1e53db5da9f7542b/src/lightning/mod.rs#L18 @@ -216,76 +175,46 @@ pub async fn send_boost(mut lightning: lnd::Lnd, destination: String, custom_key } } else { - recipient_pubkey = destination; + recipient_pubkey = destination.clone(); if custom_key.is_some() && custom_value.is_some() { recipient_custom_data.insert(custom_key.unwrap(), custom_value.unwrap()); } } - // convert pub key hash to raw bytes - let raw_pubkey = HEXLOWER.decode(recipient_pubkey.as_bytes()).unwrap(); - - // generate 32 random bytes for pre_image - let mut pre_image = [0u8; 32]; - rand::thread_rng().fill_bytes(&mut pre_image); - - // and convert to sha256 hash - let mut hasher = Sha256::new(); - hasher.update(pre_image); - let payment_hash = hasher.finalize(); - // TLV custom records // https://github.com/satoshisstream/satoshis.stream/blob/main/TLV_registry.md let mut dest_custom_records = HashMap::new(); let tlv_json = serde_json::to_string_pretty(&tlv).unwrap(); - dest_custom_records.insert(TLV_KEYSEND, pre_image.to_vec()); + // dest_custom_records.insert(TLV_KEYSEND, pre_image.to_vec()); dest_custom_records.insert(TLV_PODCASTING20, tlv_json.as_bytes().to_vec()); for (key, value) in recipient_custom_data { dest_custom_records.insert(key, value.as_bytes().to_vec()); } - // assemble the lnd payment - let req = SendRequest { - dest: raw_pubkey.clone(), - amt: sats as i64, - payment_hash: payment_hash.to_vec(), - dest_custom_records: dest_custom_records, - ..Default::default() - }; - - // send payment and get payment hash - let response = lnd::Lnd::send_payment_sync(&mut lightning, req).await?; - let sent_payment_hash = HEXLOWER.encode(&response.payment_hash); - - if response.payment_error != "" { - return Err(Box::new(BoostError(response.payment_error.into()))); - } - - // get detailed payment info from list_payments - let payment_list = lnd::Lnd::list_payments(&mut lightning, false, 0, 500, true).await?; - - for payment in payment_list.payments { - if sent_payment_hash == payment.payment_hash { - return Ok(payment); - } - } - - Err(Box::new(BoostError("Failed to find payment sent".into()))) + return lightning.keysend(recipient_pubkey, sats, dest_custom_records).await; } - - -pub async fn parse_podcast_tlv(boost: &mut dbif::BoostRecord, val: &Vec, remote_cache: &mut podcastindex::GuidCache) { +pub fn parse_podcast_tlv(val: &Vec) -> Boost { let tlv = std::str::from_utf8(&val).unwrap(); - println!("TLV: {:#?}", tlv); - boost.tlv = tlv.to_string(); + let mut boost = Boost { + action: 0, + podcast: "".to_string(), + episode: "".to_string(), + message: "".to_string(), + sender: "".to_string(), + app: "".to_string(), + tlv: tlv.to_string(), + value_msat: 0, + value_msat_total: 0, + remote_feed_guid: "".to_string(), + remote_item_guid: "".to_string(), + }; - let json_result = serde_json::from_str::(tlv); - match json_result { + match serde_json::from_str::(tlv) { Ok(rawboost) => { //If there was a sat value in the tlv, override the invoice if rawboost.value_msat.is_some() { @@ -333,121 +262,119 @@ pub async fn parse_podcast_tlv(boost: &mut dbif::BoostRecord, val: &Vec, rem } //Fetch podcast/episode name if remote feed/item guid present - if rawboost.remote_feed_guid.is_some() && rawboost.remote_item_guid.is_some() { - let remote_feed_guid = rawboost.remote_feed_guid.unwrap(); - let remote_item_guid = rawboost.remote_item_guid.unwrap(); - - let episode_guid = remote_cache.get(remote_feed_guid, remote_item_guid).await; + if rawboost.remote_feed_guid.is_some() { + boost.remote_feed_guid = rawboost.remote_feed_guid.unwrap(); + } - if let Ok(guid) = episode_guid { - boost.remote_podcast = guid.podcast; - boost.remote_episode = guid.episode; - } + if rawboost.remote_item_guid.is_some() { + boost.remote_item_guid = rawboost.remote_item_guid.unwrap(); } - } + }, Err(e) => { eprintln!("{}", e); } - } + }; + + return boost; } -pub async fn parse_boost_from_invoice(invoice: Invoice, remote_cache: &mut podcastindex::GuidCache) -> Option { +pub async fn parse_boost_from_invoice(invoice: &Invoice, remote_cache: &mut podcastindex::GuidCache) -> Option { + if invoice.boostagram.is_none() { + return None; + } - for htlc in invoice.htlcs { + let boost = invoice.boostagram.clone().unwrap(); + + let mut db_boost = dbif::BoostRecord { + index: invoice.index, + time: invoice.time, + value_msat: boost.value_msat, + value_msat_total: boost.value_msat_total, + action: boost.action, + sender: boost.sender, + app: boost.app, + message: boost.message, + podcast: boost.podcast, + episode: boost.episode, + tlv: boost.tlv, + remote_podcast: None, + remote_episode: None, + reply_sent: false, + payment_info: None, + }; - if !htlc.custom_records.contains_key(&TLV_PODCASTING20) { - continue; // ignore invoices without a podcasting 2.0 tlv + //Fetch podcast/episode name if remote feed/item guid present + if boost.remote_feed_guid != "" && boost.remote_item_guid != "" { + match remote_cache.get(boost.remote_feed_guid, boost.remote_item_guid).await { + Ok(guid) => { + db_boost.remote_podcast = guid.podcast; + db_boost.remote_episode = guid.episode; + } + Err(_) => {} } - - //Initialize a boost record - let mut boost = dbif::BoostRecord { - index: invoice.add_index, - time: invoice.settle_date, - value_msat: invoice.amt_paid_sat * 1000, - value_msat_total: invoice.amt_paid_sat * 1000, - action: 0, - sender: "".to_string(), - app: "".to_string(), - message: "".to_string(), - podcast: "".to_string(), - episode: "".to_string(), - tlv: "".to_string(), - remote_podcast: None, - remote_episode: None, - reply_sent: false, - payment_info: None, - }; - - parse_podcast_tlv(&mut boost, &htlc.custom_records[&TLV_PODCASTING20], remote_cache).await; - - return Some(boost); } - return None; + Some(db_boost) } -pub async fn parse_boost_from_payment(payment: Payment, remote_cache: &mut podcastindex::GuidCache) -> Option { - for htlc in payment.htlcs { +pub async fn parse_boost_from_payment(payment: &Payment, remote_cache: &mut podcastindex::GuidCache) -> Option { + let payment = payment.clone(); - if htlc.route.is_none() { - continue; // no route found - } + if payment.boostagram.is_none() { + return None; + } + + let boost = payment.boostagram.unwrap(); + + let mut db_payment_info = dbif::PaymentRecord { + payment_hash: payment.payment_hash, + pubkey: payment.destination, + custom_key: 0, + custom_value: "".into(), + fee_msat: payment.fee * 1000, + reply_to_idx: None, + }; - let route = htlc.route.unwrap(); - let hopidx = route.hops.len() - 1; - let hop = route.hops[hopidx].clone(); + //Get custom key/value for keysend wallet + for (idx, val) in payment.custom_records { + if idx == TLV_WALLET_KEY || idx == TLV_WALLET_ID || idx == TLV_HIVE_ACCOUNT { + let custom_value = std::str::from_utf8(&val).unwrap().to_string(); - if !hop.custom_records.contains_key(&TLV_PODCASTING20) { - continue; // not a boost payment + db_payment_info.custom_key = idx; + db_payment_info.custom_value = custom_value; } + } - //Initialize a boost record - let mut boost = dbif::BoostRecord { - index: payment.payment_index, - time: payment.creation_time_ns / 1000000000, - value_msat: payment.value_msat, - value_msat_total: payment.value_msat, - action: 0, - sender: "".to_string(), - app: "".to_string(), - message: "".to_string(), - podcast: "".to_string(), - episode: "".to_string(), - tlv: "".to_string(), - remote_podcast: None, - remote_episode: None, - reply_sent: false, - payment_info: Some(dbif::PaymentRecord { - payment_hash: payment.payment_hash.clone(), - pubkey: hop.pub_key.clone(), - custom_key: 0, - custom_value: "".into(), - fee_msat: payment.fee_msat, - reply_to_idx: None, - }), - }; - - for (idx, val) in hop.custom_records { - if idx == TLV_PODCASTING20 { - parse_podcast_tlv(&mut boost, &val, remote_cache).await; - } - else if idx == TLV_WALLET_KEY || idx == TLV_WALLET_ID || idx == TLV_HIVE_ACCOUNT { - let custom_value = std::str::from_utf8(&val).unwrap().to_string(); - - boost.payment_info = Some(dbif::PaymentRecord { - payment_hash: payment.payment_hash.clone(), - pubkey: hop.pub_key.clone(), - custom_key: idx, - custom_value: custom_value, - fee_msat: payment.fee_msat, - reply_to_idx: None, - }); + //Initialize a boost record + let mut db_boost = dbif::BoostRecord { + index: payment.index, + time: payment.time, + value_msat: boost.value_msat, + value_msat_total: boost.value_msat_total, + action: boost.action, + sender: boost.sender, + app: boost.app, + message: boost.message, + podcast: boost.podcast, + episode: boost.episode, + tlv: boost.tlv, + remote_podcast: None, + remote_episode: None, + reply_sent: false, + payment_info: Some(db_payment_info), + }; + + //Fetch podcast/episode name if remote feed/item guid present + if boost.remote_feed_guid != "" && boost.remote_item_guid != "" { + match remote_cache.get(boost.remote_feed_guid, boost.remote_item_guid).await { + Ok(guid) => { + db_boost.remote_podcast = guid.podcast; + db_boost.remote_episode = guid.episode; } + Err(_) => {} } - - return Some(boost); } - return None; -} \ No newline at end of file + Some(db_boost) +} diff --git a/src/lnclient.rs b/src/lnclient.rs new file mode 100644 index 0000000..1275570 --- /dev/null +++ b/src/lnclient.rs @@ -0,0 +1,84 @@ +use async_trait::async_trait; + +use std::collections::HashMap; +use std::error::Error; + +use crate::HelipadConfig; + +use crate::lnclient::clnclient::CLNClient; +use crate::lnclient::lndclient::LNDClient; + +pub mod lndclient; +pub mod clnclient; + +#[derive(Clone, Debug)] +pub struct NodeInfo { + pub pubkey: String, + pub alias: String, + pub nodetype: String, + pub version: String, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct Boost { + pub action: u8, + pub podcast: String, + pub episode: String, + pub message: String, + pub app: String, + pub remote_feed_guid: String, + pub remote_item_guid: String, + pub sender: String, + pub tlv: String, + pub value_msat: i64, + pub value_msat_total: i64, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct Invoice { + pub index: u64, + pub time: i64, + pub amount: i64, + + pub payment_hash: String, + pub preimage: String, + + pub boostagram: Option, + pub custom_records: HashMap>, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct Payment { + pub index: u64, + pub time: i64, + pub amount: i64, + + pub payment_hash: String, + pub payment_preimage: String, + + pub boostagram: Option, + pub custom_records: HashMap>, + + pub destination: String, + pub fee: i64, +} + +#[async_trait] +pub trait LNClient: Send { + async fn get_info(&mut self) -> Result>; + async fn channel_balance(&mut self) -> Result>; + async fn list_invoices(&mut self, start: u64, limit: u64) -> Result, Box>; + async fn list_payments(&mut self, start: u64, limit: u64) -> Result, Box>; + async fn keysend(&mut self, destination: String, sats: u64, custom_records: HashMap>) -> Result>; +} + +pub async fn connect(config: &HelipadConfig) -> Result, Box> { + let helipad_config = config.clone(); + + if helipad_config.cln_url != "" { + Ok(Box::new(CLNClient::connect(helipad_config.cln_url, helipad_config.cln_cert_path, helipad_config.cln_key_path, helipad_config.cln_cacert_path).await?)) + } + else { + Ok(Box::new(LNDClient::connect(helipad_config.lnd_url, helipad_config.lnd_cert_path, helipad_config.lnd_macaroon_path).await?)) + } +} diff --git a/src/lnclient/clnclient.rs b/src/lnclient/clnclient.rs new file mode 100644 index 0000000..5d491aa --- /dev/null +++ b/src/lnclient/clnclient.rs @@ -0,0 +1,282 @@ +use async_trait::async_trait; + +use crate::lightning::parse_podcast_tlv; +use crate::lnclient::{LNClient, NodeInfo, Invoice, Payment}; + +use data_encoding::HEXLOWER; + +use tonic::transport::{Certificate, Channel, ClientTlsConfig, Identity}; + +use std::collections::HashMap; +use std::error::Error; +use std::fs; +use std::convert::TryInto; + +use cln_rs::cln::node_client::NodeClient; +use cln_rs::cln; + +pub struct CLNClient { + client: NodeClient, +} + +impl CLNClient { + + pub async fn connect(url: String, cert_path: String, key_path: String, cacert_path: String) -> Result> { + + let cert_text: Vec = fs::read(cert_path.clone())?; + let key_text: Vec = fs::read(key_path.clone())?; + let cacert_text: Vec = fs::read(cacert_path.clone())?; + + let ca_certificate = Certificate::from_pem(&cacert_text); + let client_identity = Identity::from_pem(&cert_text, &key_text); + + let tls_config = ClientTlsConfig::new() + .domain_name("localhost") + .ca_certificate(ca_certificate) + .identity(client_identity); + + let urlcopy = url.to_owned(); + + let channel = Channel::from_shared(urlcopy)? + .tls_config(tls_config)? + .connect() + .await?; + + let client = NodeClient::new(channel); + + Ok(CLNClient { + client + }) + } + + pub fn parse_payment(&mut self, cln_payment: cln::ListsendpaysPayments) -> Payment { + let destination = cln_payment.destination.unwrap_or_default(); + let destination = HEXLOWER.encode(&destination); + + let payment_hash = HEXLOWER.encode(&cln_payment.payment_hash); + + let payment_preimage = cln_payment.payment_preimage.unwrap_or_default(); + let payment_preimage = HEXLOWER.encode(&payment_preimage); + + let mut pay = Payment { + index: cln_payment.created_index.unwrap_or_default(), + time: cln_payment.created_at.try_into().unwrap(), // convert u64 to i64 + amount: 0, + destination: destination, + payment_hash: payment_hash, + payment_preimage: payment_preimage, + fee: 0, + custom_records: HashMap::new(), + boostagram: None, + }; + + if let Some(amount_sent) = cln_payment.amount_sent_msat { + let sats_sent: i64 = (amount_sent.msat / 1000).try_into().unwrap(); // convert u64 into i64 + pay.amount = sats_sent; + } + + if let Some(amount_recv) = cln_payment.amount_msat { + let sats_recv: i64 = (amount_recv.msat / 1000).try_into().unwrap(); // convert u64 into i64 + pay.fee = pay.amount - sats_recv; + } + + return pay; + } + +} + +#[async_trait] +impl LNClient for CLNClient { + + async fn get_info(&mut self) -> Result> { + let request = cln::GetinfoRequest {}; + let response = self.client.getinfo(request).await?.into_inner(); + + let info = NodeInfo { + pubkey: HEXLOWER.encode(&response.id), + alias: response.alias.unwrap_or_default(), + version: response.version, + nodetype: "CLN".to_string(), + }; + + Ok(info) + } + + + async fn channel_balance(&mut self) -> Result> { + let response = self.client.bkpr_list_balances(cln::BkprlistbalancesRequest {}) + .await? + .into_inner(); + + let mut local_balance: i64 = 0; + + for account in response.accounts { + if account.account == "wallet" { + continue; // skip onchain balance + } + + if account.account_resolved.unwrap_or_default() { + continue; // closed and resolved channel + } + + for balance in account.balances { + if let Some(balance) = balance.balance_msat { + let sats: i64 = (balance.msat / 1000).try_into().unwrap(); // convert u64 into i64 + local_balance += sats + } + } + } + + Ok(local_balance) + } + + async fn list_invoices(&mut self, start: u64, limit: u64) -> Result, Box> { + let limit: u32 = limit.try_into().unwrap(); // convert u64 into required u32 + + let request = cln::ListinvoicesRequest { + index: Some(cln::listinvoices_request::ListinvoicesIndex::Created.into()), + start: Some(start + 1), + limit: Some(limit), + ..Default::default() + }; + + let response = self.client.list_invoices(request) + .await? + .into_inner(); + + let mut invoices: Vec = Vec::new(); + + for cln_invoice in response.invoices { + let payment_hash = HEXLOWER.encode(&cln_invoice.payment_hash); + + let payment_preimage = match cln_invoice.payment_preimage { + Some(preimage) => HEXLOWER.encode(&preimage), + None => "".to_string(), + }; + + let paid_at: i64 = cln_invoice.paid_at.unwrap_or_default().try_into().unwrap(); // convert u64 into i64 + + let mut invoice = Invoice { + index: cln_invoice.created_index.unwrap_or_default(), + time: paid_at, + payment_hash: payment_hash, + preimage: payment_preimage, + amount: 0, + custom_records: HashMap::new(), + boostagram: None, + }; + + if let Some(amt) = cln_invoice.amount_received_msat { + let sats = amt.msat / 1000; + invoice.amount = sats.try_into().unwrap(); // convert u64 into i64 + } + else if let Some(amt) = cln_invoice.amount_msat { + let sats = amt.msat / 1000; + invoice.amount = sats.try_into().unwrap(); // convert u64 into i64 + } + + // CLN stuffs TLVs into the description field + if let Some(desc) = cln_invoice.description { + if desc.starts_with("keysend: {") { + // grab everything after 'keysend: ' + let mut chars = desc[9..].chars(); + let mut val = String::new(); + + // remove escaping around the tlv json + while let Some(c) = chars.next() { + val.push(match c { + '\\' => chars.next().unwrap_or_default(), + c => c, + }); + } + + // attempt to parse as podcast tlv + invoice.boostagram = Some(parse_podcast_tlv(&val.into())); + } + } + + invoices.push(invoice); + } + + Ok(invoices) + } + + + async fn list_payments(&mut self, start: u64, limit: u64) -> Result, Box> { + let limit: u32 = limit.try_into().unwrap(); // convert u64 into u32 + + let request = cln::ListsendpaysRequest { + index: Some(cln::listsendpays_request::ListsendpaysIndex::Created.into()), + start: Some(start + 1), + limit: Some(limit), + status: Some(cln::listsendpays_request::ListsendpaysStatus::Complete.into()), + ..Default::default() + }; + + let response = self.client.list_send_pays(request) + .await? + .into_inner(); + + let mut payments: Vec = Vec::new(); + + for cln_payment in response.payments { + payments.push(self.parse_payment(cln_payment)); + } + + Ok(payments) + } + + async fn keysend(&mut self, destination: String, sats: u64, custom_records: HashMap>) -> Result> { + // let mut extratlvs: HashMap = HashMap::new(); + + let mut extratlvs: Vec = Vec::new(); + + for (idx, val) in custom_records { + extratlvs.push(cln::TlvEntry { + r#type: idx, + value: val, + }); + } + + let destination = HEXLOWER.decode(destination.as_bytes())?; + + // send keysend payment + let request = cln::KeysendRequest { + destination: destination, + amount_msat: Some(cln::Amount { + msat: sats * 1000 + }), + extratlvs: Some(cln::TlvStream { + entries: extratlvs, + }), + ..Default::default() + }; + + let response = match self.client.key_send(request).await { + Ok(resp) => resp, + Err(e) => { + eprintln!("Error sending keysend: {:#?}", e); + return Err(format!("{}", e.message()).into()); + } + }; + + let response = response.into_inner(); + + // look up full payment info in listsendpays + let request = cln::ListsendpaysRequest { + payment_hash: Some(response.payment_hash), + ..Default::default() + }; + + let response = self.client.list_send_pays(request) + .await? + .into_inner(); + + for cln_payment in response.payments { + return Ok(self.parse_payment(cln_payment)); + } + + Err("Unable to find keysend payment".into()) + } + +} \ No newline at end of file diff --git a/src/lnclient/lndclient.rs b/src/lnclient/lndclient.rs new file mode 100644 index 0000000..cbb9b53 --- /dev/null +++ b/src/lnclient/lndclient.rs @@ -0,0 +1,212 @@ +use async_trait::async_trait; +use crate::lightning; + +use crate::lnclient::{LNClient, NodeInfo, Invoice, Payment}; +use crate::lightning::parse_podcast_tlv; + +use data_encoding::HEXLOWER; + +use lnd::lnrpc::lnrpc::{SendRequest, Payment as LndPayment}; + +use rand::RngCore; + +use sha2::{Sha256, Digest}; + +use std::collections::HashMap; +use std::error::Error; +use std::fs; +use std::vec::Vec; + + +pub struct LNDClient { + client: lnd::Lnd, + // remote_cache: GuidCache, +} + +impl LNDClient { + + pub async fn connect(node_address: String, cert_path: String, macaroon_path: String) -> Result> { + + let cert: Vec = fs::read(cert_path.clone())?; + let macaroon: Vec = fs::read(macaroon_path.clone())?; + + //Make the connection to LND + let client = lnd::Lnd::connect_with_macaroon(node_address.clone(), &cert, &macaroon).await?; + + // let remote_cache = podcastindex::GuidCache::new(1000); + + Ok(LNDClient { + client, + // remote_cache + }) + } + + fn parse_payment(&mut self, item: &LndPayment) -> Payment { + let mut pay = Payment { + index: item.payment_index, + time: item.creation_time_ns / 1000000000, + amount: item.value_sat, + + destination: String::new(), // hop pubkey + payment_hash: item.payment_hash.clone(), + payment_preimage: item.payment_preimage.clone(), + + fee: item.fee_sat, + + custom_records: HashMap::new(), + boostagram: None, + }; + + for htlc in &item.htlcs { + if htlc.route.is_none() { + continue; // no route found + } + + let route = htlc.route.clone().unwrap(); + let last_idx = route.hops.len() - 1; + let hop = route.hops[last_idx].clone(); + + pay.destination = hop.pub_key.clone(); + + for (key, value) in &hop.custom_records { + pay.custom_records.insert(*key, value.clone()); + } + } + + if let Some(val) = pay.custom_records.get(&lightning::TLV_PODCASTING20) { + pay.boostagram = Some(parse_podcast_tlv(&val)); + } + + return pay; + } +} + +#[async_trait] +impl LNClient for LNDClient { + + async fn get_info(&mut self) -> Result> { + let info = lnd::Lnd::get_info(&mut self.client).await?; + + Ok(NodeInfo { + pubkey: info.identity_pubkey, + alias: info.alias, + version: info.version, + nodetype: "LND".to_string(), + }) + } + + async fn channel_balance(&mut self) -> Result> { + let balance = lnd::Lnd::channel_balance(&mut self.client).await?; + let mut current_balance: i64 = 0; + + if let Some(bal) = balance.local_balance { + current_balance = bal.sat as i64; + } + + Ok(current_balance) + } + + async fn list_invoices(&mut self, start: u64, limit: u64) -> Result, Box> { + let result = match lnd::Lnd::list_invoices(&mut self.client, false, start, limit, false).await { + Ok(inv) => inv, + Err(_) => { + return Err("unable to fetch invoices".into()); + } + }; + + let mut invoices: Vec = Vec::new(); + + for item in result.invoices { + let payment_hash = HEXLOWER.encode(&item.r_hash); + let preimage = HEXLOWER.encode(&item.r_preimage); + + let mut inv = Invoice { + index: item.add_index, + time: item.settle_date, + amount: item.amt_paid_sat, + payment_hash: payment_hash, + preimage: preimage, + custom_records: HashMap::new(), + boostagram: None, + }; + + for htlc in item.htlcs { + for (key, value) in &htlc.custom_records { + inv.custom_records.insert(*key, value.clone()); + } + } + + if let Some(val) = inv.custom_records.get(&lightning::TLV_PODCASTING20) { + inv.boostagram = Some(parse_podcast_tlv(&val)); + } + + invoices.push(inv); + } + + + Ok(invoices) + } + + async fn list_payments(&mut self, start: u64, limit: u64) -> Result, Box> { + let result = match lnd::Lnd::list_payments(&mut self.client, false, start, limit, false).await { + Ok(inv) => inv, + Err(_) => { + return Err("unable to fetch payments".into()); + } + }; + + let mut payments: Vec = Vec::new(); + + for item in result.payments { + payments.push(self.parse_payment(&item)); + } + + Ok(payments) + } + + async fn keysend(&mut self, destination: String, sats: u64, custom_records: HashMap>) -> Result> { // -> Result> { + // convert pub key hash to raw bytes + let raw_pubkey = HEXLOWER.decode(destination.as_bytes()).unwrap(); + + // generate 32 random bytes for pre_image + let mut pre_image = [0u8; 32]; + rand::thread_rng().fill_bytes(&mut pre_image); + + // and convert to sha256 hash + let mut hasher = Sha256::new(); + hasher.update(pre_image); + let payment_hash = hasher.finalize(); + + // add pre_image to custom_record for keysend + let mut custom_records = custom_records.clone(); + custom_records.insert(lightning::TLV_KEYSEND, pre_image.to_vec()); + + // assemble the lnd payment + let req = SendRequest { + dest: raw_pubkey.clone(), + amt: sats as i64, + payment_hash: payment_hash.to_vec(), + dest_custom_records: custom_records, + ..Default::default() + }; + + // send payment and get payment hash + let response = lnd::Lnd::send_payment_sync(&mut self.client, req).await?; + let sent_payment_hash = HEXLOWER.encode(&response.payment_hash); + + if response.payment_error != "" { + return Err(response.payment_error.into()); + } + + // get detailed payment info from list_payments + let payment_list = lnd::Lnd::list_payments(&mut self.client, false, 0, 500, true).await?; + + for payment in payment_list.payments { + if sent_payment_hash == payment.payment_hash { + return Ok(self.parse_payment(&payment)); + } + } + + Err("Failed to find payment sent".into()) + } +} diff --git a/src/main.rs b/src/main.rs index ddb8cdb..2a2432b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,6 +30,7 @@ extern crate configure_me; mod handler; mod lightning; mod podcastindex; +mod lnclient; const HELIPAD_CONFIG_FILE: &str = "./helipad.conf"; const HELIPAD_DATABASE_DIR: &str = "database.db"; @@ -40,6 +41,11 @@ const LND_STANDARD_GRPC_URL: &str = "https://127.0.0.1:10009"; const LND_STANDARD_MACAROON_LOCATION: &str = "/lnd/data/chain/bitcoin/mainnet/admin.macaroon"; const LND_STANDARD_TLSCERT_LOCATION: &str = "/lnd/tls.cert"; +const CLN_URL: &str = "https://127.0.0.1:2105"; +const CLN_CERT_PATH: &str = "/cln/regtest/client.pem"; +const CLN_KEY_PATH: &str = "/cln/regtest/client-key.pem"; +const CLN_CACERT_PATH: &str = "/cln/regtest/ca.pem"; + const REMOTE_GUID_CACHE_SIZE: usize = 20; const WEBROOT_PATH_IMAGE: &str = "webroot/image"; @@ -59,11 +65,16 @@ pub struct HelipadConfig { pub database_file_path: String, pub sound_path: String, pub listen_port: String, - pub macaroon_path: String, - pub cert_path: String, - pub node_address: String, pub password: String, pub secret: String, + pub node_type: String, + pub lnd_url: String, + pub lnd_macaroon_path: String, + pub lnd_cert_path: String, + pub cln_url: String, + pub cln_cert_path: String, + pub cln_key_path: String, + pub cln_cacert_path: String, } //Configure_me @@ -83,11 +94,16 @@ async fn main() { database_file_path: "".to_string(), sound_path: "".to_string(), listen_port: "".to_string(), - macaroon_path: "".to_string(), - cert_path: "".to_string(), - node_address: "".to_string(), password: "".to_string(), secret: "".to_string(), + node_type: "".to_string(), + lnd_url: "".to_string(), + lnd_macaroon_path: "".to_string(), + lnd_cert_path: "".to_string(), + cln_url: "".to_string(), + cln_cert_path: "".to_string(), + cln_key_path: "".to_string(), + cln_cacert_path: "".to_string(), }; //Bring in the configuration info @@ -194,54 +210,130 @@ async fn main() { .collect(); } - //Get the macaroon and cert files. Look in the local directory first as an override. - //If the files are not found in the currect working directory, look for them at their - //normal LND directory locations - println!("\nDiscovering macaroon file path..."); - let env_macaroon_path = std::env::var("LND_ADMINMACAROON"); - //First try from the environment - if env_macaroon_path.is_ok() { - helipad_config.macaroon_path = env_macaroon_path.unwrap(); - println!(" - Trying environment var(LND_ADMINMACAROON): [{}]", helipad_config.macaroon_path); - } else if server_config.macaroon.is_some() { - helipad_config.macaroon_path = server_config.macaroon.unwrap(); - println!(" - Trying config file({}): [{}]", HELIPAD_CONFIG_FILE, helipad_config.macaroon_path); - } else if Path::new("admin.macaroon").is_file() { - helipad_config.macaroon_path = "admin.macaroon".to_string(); - println!(" - Trying current directory: [{}]", helipad_config.macaroon_path); - } else { - helipad_config.macaroon_path = String::from(LND_STANDARD_MACAROON_LOCATION); - println!(" - Trying LND default: [{}]", helipad_config.macaroon_path); + //Get the url connection string of the CLN node if provided + println!("\nDiscovering node type..."); + + let env_node_type = std::env::var("NODE_TYPE"); + + if env_node_type.is_ok() { + helipad_config.node_type = env_node_type.unwrap(); + println!(" - Trying environment var(NODE_TYPE): [{}]", helipad_config.node_type); + } else if server_config.node_type.is_some() { + helipad_config.node_type = server_config.node_type.unwrap(); + println!(" - Trying config file({}): [{}]", HELIPAD_CONFIG_FILE, helipad_config.node_type); } - println!("\nDiscovering certificate file path..."); - let env_cert_path = std::env::var("LND_TLSCERT"); - if env_cert_path.is_ok() { - helipad_config.cert_path = env_cert_path.unwrap(); - println!(" - Trying environment var(LND_TLSCERT): [{}]", helipad_config.cert_path); - } else if server_config.cert.is_some() { - helipad_config.cert_path = server_config.cert.unwrap(); - println!(" - Trying config file({}): [{}]", HELIPAD_CONFIG_FILE, helipad_config.cert_path); - } else if Path::new("tls.cert").is_file() { - helipad_config.cert_path = "tls.cert".to_string(); - println!(" - Trying current directory: [{}]", helipad_config.cert_path); - } else { - helipad_config.cert_path = String::from(LND_STANDARD_TLSCERT_LOCATION); - println!(" - Trying LND default: [{}]", helipad_config.cert_path); + if helipad_config.node_type.to_uppercase() == "CLN" { + println!("\nDiscovering CLN GRPC address..."); + let env_cln_url = std::env::var("CLN_URL"); + + if env_cln_url.is_ok() { + helipad_config.cln_url = "https://".to_owned() + env_cln_url.unwrap().as_str(); + println!(" - Trying environment var(CLN_URL): [{}]", helipad_config.cln_url); + } else if server_config.cln_url.is_some() { + helipad_config.cln_url = server_config.cln_url.unwrap(); + println!(" - Trying config file({}): [{}]", HELIPAD_CONFIG_FILE, helipad_config.cln_url); + } else { + helipad_config.cln_cert_path = String::from(CLN_URL); + println!(" - Trying default: [{}]", helipad_config.cln_url); + } + + //Get the rune string of the CLN node + println!("\nDiscovering CLN GRPC certificate path..."); + let env_cln_cert_path = std::env::var("CLN_CERT_PATH"); + + if env_cln_cert_path.is_ok() { + helipad_config.cln_cert_path = env_cln_cert_path.unwrap(); + println!(" - Trying environment var(CLN_CERT_PATH): [{}]", helipad_config.cln_cert_path); + } else if server_config.cln_cert_path.is_some() { + helipad_config.cln_cert_path = server_config.cln_cert_path.unwrap(); + println!(" - Trying config file({}): [{}]", HELIPAD_CONFIG_FILE, helipad_config.cln_cert_path); + } else { + helipad_config.cln_cert_path = String::from(CLN_CERT_PATH); + println!(" - Trying default: [{}]", helipad_config.cln_cert_path); + } + + println!("\nDiscovering CLN GRPC CA key path..."); + let env_cln_key_path = std::env::var("CLN_KEY_PATH"); + + if env_cln_key_path.is_ok() { + helipad_config.cln_key_path = env_cln_key_path.unwrap(); + println!(" - Trying environment var(CLN_KEY_PATH): [{}]", helipad_config.cln_key_path); + } else if server_config.cln_key_path.is_some() { + helipad_config.cln_key_path = server_config.cln_key_path.unwrap(); + println!(" - Trying config file({}): [{}]", HELIPAD_CONFIG_FILE, helipad_config.cln_key_path); + } else { + helipad_config.cln_key_path = String::from(CLN_KEY_PATH); + println!(" - Trying default: [{}]", helipad_config.cln_key_path); + } + + println!("\nDiscovering CLN GRPC root certificate path..."); + let env_cln_cacert_path = std::env::var("CLN_CACERT_PATH"); + + if env_cln_cacert_path.is_ok() { + helipad_config.cln_cacert_path = env_cln_cacert_path.unwrap(); + println!(" - Trying environment var(CLN_CACERT_PATH): [{}]", helipad_config.cln_cacert_path); + } else if server_config.cln_cacert_path.is_some() { + helipad_config.cln_cacert_path = server_config.cln_cacert_path.unwrap(); + println!(" - Trying config file({}): [{}]", HELIPAD_CONFIG_FILE, helipad_config.cln_cacert_path); + } else { + helipad_config.cln_cacert_path = String::from(CLN_CACERT_PATH); + println!(" - Trying default: [{}]", helipad_config.cln_cacert_path); + } } + else { + //Get the url connection string of the lnd node + println!("\nDiscovering LND node address..."); + let env_lnd_url = std::env::var("LND_URL"); + + if env_lnd_url.is_ok() { + helipad_config.lnd_url = "https://".to_owned() + env_lnd_url.unwrap().as_str(); + println!(" - Trying environment var(LND_URL): [{}]", helipad_config.lnd_url); + } else if server_config.lnd_url.is_some() { + helipad_config.lnd_url = server_config.lnd_url.unwrap(); + println!(" - Trying config file({}): [{}]", HELIPAD_CONFIG_FILE, helipad_config.lnd_url); + } else { + helipad_config.lnd_url = String::from(LND_STANDARD_GRPC_URL); + println!(" - Trying localhost default: [{}].", helipad_config.lnd_url); + } - //Get the url connection string of the lnd node - println!("\nDiscovering LND node address..."); - let env_lnd_url = std::env::var("LND_URL"); - if env_lnd_url.is_ok() { - helipad_config.node_address = "https://".to_owned() + env_lnd_url.unwrap().as_str(); - println!(" - Trying environment var(LND_URL): [{}]", helipad_config.node_address); - } else if server_config.lnd_url.is_some() { - helipad_config.node_address = server_config.lnd_url.unwrap(); - println!(" - Trying config file({}): [{}]", HELIPAD_CONFIG_FILE, helipad_config.node_address); - } else { - helipad_config.node_address = String::from(LND_STANDARD_GRPC_URL); - println!(" - Trying localhost default: [{}].", helipad_config.node_address); + //Get the macaroon and cert files. Look in the local directory first as an override. + //If the files are not found in the currect working directory, look for them at their + //normal LND directory locations + println!("\nDiscovering macaroon file path..."); + let env_macaroon_path = std::env::var("LND_ADMINMACAROON"); + + //First try from the environment + if env_macaroon_path.is_ok() { + helipad_config.lnd_macaroon_path = env_macaroon_path.unwrap(); + println!(" - Trying environment var(LND_ADMINMACAROON): [{}]", helipad_config.lnd_macaroon_path); + } else if server_config.macaroon.is_some() { + helipad_config.lnd_macaroon_path = server_config.macaroon.unwrap(); + println!(" - Trying config file({}): [{}]", HELIPAD_CONFIG_FILE, helipad_config.lnd_macaroon_path); + } else if Path::new("admin.macaroon").is_file() { + helipad_config.lnd_macaroon_path = "admin.macaroon".to_string(); + println!(" - Trying current directory: [{}]", helipad_config.lnd_macaroon_path); + } else { + helipad_config.lnd_macaroon_path = String::from(LND_STANDARD_MACAROON_LOCATION); + println!(" - Trying LND default: [{}]", helipad_config.lnd_macaroon_path); + } + + println!("\nDiscovering certificate file path..."); + let env_cert_path = std::env::var("LND_TLSCERT"); + + if env_cert_path.is_ok() { + helipad_config.lnd_cert_path = env_cert_path.unwrap(); + println!(" - Trying environment var(LND_TLSCERT): [{}]", helipad_config.lnd_cert_path); + } else if server_config.cert.is_some() { + helipad_config.lnd_cert_path = server_config.cert.unwrap(); + println!(" - Trying config file({}): [{}]", HELIPAD_CONFIG_FILE, helipad_config.lnd_cert_path); + } else if Path::new("tls.cert").is_file() { + helipad_config.lnd_cert_path = "tls.cert".to_string(); + println!(" - Trying current directory: [{}]", helipad_config.lnd_cert_path); + } else { + helipad_config.lnd_cert_path = String::from(LND_STANDARD_TLSCERT_LOCATION); + println!(" - Trying LND default: [{}]", helipad_config.lnd_cert_path); + } } //Start the LND polling thread. This thread will poll LND every few seconds to @@ -353,26 +445,26 @@ async fn lnd_poller(helipad_config: HelipadConfig) { let db_filepath = helipad_config.database_file_path.clone(); //Make the connection to LND - println!("\nConnecting to LND node address..."); - let mut lightning; - match lightning::connect_to_lnd(helipad_config.node_address, helipad_config.cert_path, helipad_config.macaroon_path).await { - Some(lndconn) => { - println!(" - Success."); - lightning = lndconn; - } - None => { - std::process::exit(1); + println!("\nConnecting to node address..."); + + let mut lightning = match lnclient::connect(&helipad_config).await { + Ok(conn) => conn, + Err(e) => { + eprintln!("Unable to connect to node: {}", e); + return; } - } + }; + + println!(" - Success."); //Get lnd node info - match lnd::Lnd::get_info(&mut lightning).await { + match lightning.get_info().await { Ok(node_info) => { - println!("LND node info: {:#?}", node_info); + println!("Node info: {:#?}", node_info); let record = dbif::NodeInfoRecord { lnd_alias: node_info.alias, - node_pubkey: node_info.identity_pubkey, + node_pubkey: node_info.pubkey, node_version: node_info.version, }; @@ -381,7 +473,7 @@ async fn lnd_poller(helipad_config: HelipadConfig) { } } Err(e) => { - eprintln!("Error getting LND node info: {:#?}", e); + eprintln!("Error getting node info: {:#?}", e); } } @@ -396,82 +488,76 @@ async fn lnd_poller(helipad_config: HelipadConfig) { let mut updated = false; //Get lnd node channel balance - match lnd::Lnd::channel_balance(&mut lightning).await { - Ok(balance) => { - let mut current_balance: i64 = 0; - if let Some(bal) = balance.local_balance { - println!("LND node local balance: {:#?}", bal.sat); - current_balance = bal.sat as i64; - } - + match lightning.channel_balance().await { + Ok(current_balance) => { if dbif::add_wallet_balance_to_db(&db_filepath, current_balance).is_err() { println!("Error adding wallet balance to the database."); } - } + }, Err(e) => { - eprintln!("Error getting LND wallet balance: {:#?}", e); + eprintln!("Error getting wallet balance: {:#?}", e); } - } + }; //Get a list of invoices - match lnd::Lnd::list_invoices(&mut lightning, false, current_index.clone(), 500, false).await { - Ok(response) => { - for invoice in response.invoices { - let parsed = lightning::parse_boost_from_invoice(invoice.clone(), &mut remote_cache).await; - - if let Some(boost) = parsed { - //Give some output - println!("Boost: {:#?}", &boost); - - //Store in the database - match dbif::add_invoice_to_db(&db_filepath, &boost) { - Ok(_) => println!("New invoice added."), - Err(e) => eprintln!("Error adding invoice: {:#?}", e) - } - - //Send out webhooks (if any) - send_webhooks(&db_filepath, &boost).await; - } - - current_index = invoice.add_index; - updated = true; - } - } + let invoices = match lightning.list_invoices(current_index.clone(), 500).await { + Ok(invoices) => invoices, Err(e) => { - eprintln!("lnd::Lnd::list_invoices failed: {}", e); + eprintln!("lightning::list_invoices failed: {}", e); + vec![] + } + }; + + for invoice in invoices { + if let Some(db_boost) = lightning::parse_boost_from_invoice(&invoice, &mut remote_cache).await { + //Give some output + println!("Boost: {:#?}", &db_boost); + + //Store in the database + match dbif::add_invoice_to_db(&db_filepath, &db_boost) { + Ok(_) => println!("New invoice added."), + Err(e) => eprintln!("Error adding invoice: {:#?}", e) + } + + //Send out webhooks (if any) + send_webhooks(&db_filepath, &db_boost).await; } + + current_index = invoice.index; + updated = true; } //Make sure we are tracking our position properly println!("Current index: {}", current_index); - match lnd::Lnd::list_payments(&mut lightning, false, current_payment, 500, false).await { - Ok(response) => { - for payment in response.payments { - let parsed = lightning::parse_boost_from_payment(payment.clone(), &mut remote_cache).await; - - if let Some(boost) = parsed { - //Give some output - println!("Sent Boost: {:#?}", boost); + let payments = match lightning.list_payments(current_payment, 500).await { + Ok(payments) => payments, + Err(e) => { + eprintln!("lightning::list_payments failed: {}", e); + vec![] + } + }; - //Store in the database - match dbif::add_payment_to_db(&db_filepath, &boost) { - Ok(_) => println!("New payment added."), - Err(e) => eprintln!("Error adding payment: {:#?}", e) - } + for payment in payments { + let parsed = lightning::parse_boost_from_payment(&payment, &mut remote_cache).await; - //Send out webhooks (if any) - send_webhooks(&db_filepath, &boost).await; - } + if let Some(boost) = parsed { + //Give some output + println!("Sent Boost: {:#?}", boost); - current_payment = payment.payment_index; - updated = true; + //Store in the database + match dbif::add_payment_to_db(&db_filepath, &boost) { + Ok(_) => println!("New payment added."), + Err(e) => eprintln!("Error adding payment: {:#?}", e) } + + //Send out webhooks (if any) + send_webhooks(&db_filepath, &boost).await; } - Err(e) => { - eprintln!("lnd::Lnd::list_payments failed: {}", e); - } - }; + + current_payment = payment.index; + updated = true; + } //Make sure we are tracking our position properly println!("Current payment: {}", current_payment);