cln_rpc/
model.rs

1
2// This file was automatically generated using the following command:
3//
4// ```bash
5// contrib/msggen/msggen/__main__.py -s generate
6// ```
7//
8// Do not edit this file, it'll be overwritten. Rather edit the schema that
9// this file was generated from
10
11//! A collection of models to describe [requests] and [responses].
12//!
13use serde::{Deserialize, Serialize};
14
15#[derive(Clone, Debug, Serialize, Deserialize)]
16#[serde(tag = "method", content = "params")]
17#[serde(rename_all = "lowercase")]
18pub enum Request {
19	Getinfo(requests::GetinfoRequest),
20	ListPeers(requests::ListpeersRequest),
21	ListFunds(requests::ListfundsRequest),
22	SendPay(requests::SendpayRequest),
23	ListChannels(requests::ListchannelsRequest),
24	AddGossip(requests::AddgossipRequest),
25	AddPsbtOutput(requests::AddpsbtoutputRequest),
26	#[serde(rename = "autoclean-once")]
27	AutoCleanOnce(requests::AutocleanonceRequest),
28	#[serde(rename = "autoclean-status")]
29	AutoCleanStatus(requests::AutocleanstatusRequest),
30	CheckMessage(requests::CheckmessageRequest),
31	Close(requests::CloseRequest),
32	Connect(requests::ConnectRequest),
33	CreateInvoice(requests::CreateinvoiceRequest),
34	Datastore(requests::DatastoreRequest),
35	DatastoreUsage(requests::DatastoreusageRequest),
36	CreateOnion(requests::CreateonionRequest),
37	DelDatastore(requests::DeldatastoreRequest),
38	DelInvoice(requests::DelinvoiceRequest),
39	#[serde(rename = "dev-forget-channel")]
40	DevForgetChannel(requests::DevforgetchannelRequest),
41	EmergencyRecover(requests::EmergencyrecoverRequest),
42	GetEmergencyRecoverData(requests::GetemergencyrecoverdataRequest),
43	ExposeSecret(requests::ExposesecretRequest),
44	Recover(requests::RecoverRequest),
45	RecoverChannel(requests::RecoverchannelRequest),
46	Invoice(requests::InvoiceRequest),
47	InvoiceRequest(requests::InvoicerequestRequest),
48	DisableInvoiceRequest(requests::DisableinvoicerequestRequest),
49	ListInvoiceRequests(requests::ListinvoicerequestsRequest),
50	ListDatastore(requests::ListdatastoreRequest),
51	ListInvoices(requests::ListinvoicesRequest),
52	SendOnion(requests::SendonionRequest),
53	ListSendPays(requests::ListsendpaysRequest),
54	ListTransactions(requests::ListtransactionsRequest),
55	MakeSecret(requests::MakesecretRequest),
56	Pay(requests::PayRequest),
57	ListNodes(requests::ListnodesRequest),
58	WaitAnyInvoice(requests::WaitanyinvoiceRequest),
59	WaitInvoice(requests::WaitinvoiceRequest),
60	WaitSendPay(requests::WaitsendpayRequest),
61	NewAddr(requests::NewaddrRequest),
62	Withdraw(requests::WithdrawRequest),
63	KeySend(requests::KeysendRequest),
64	FundPsbt(requests::FundpsbtRequest),
65	SendPsbt(requests::SendpsbtRequest),
66	SignPsbt(requests::SignpsbtRequest),
67	UtxoPsbt(requests::UtxopsbtRequest),
68	TxDiscard(requests::TxdiscardRequest),
69	TxPrepare(requests::TxprepareRequest),
70	TxSend(requests::TxsendRequest),
71	ListPeerChannels(requests::ListpeerchannelsRequest),
72	ListClosedChannels(requests::ListclosedchannelsRequest),
73	DecodePay(requests::DecodepayRequest),
74	Decode(requests::DecodeRequest),
75	DelPay(requests::DelpayRequest),
76	DelForward(requests::DelforwardRequest),
77	DisableOffer(requests::DisableofferRequest),
78	EnableOffer(requests::EnableofferRequest),
79	Disconnect(requests::DisconnectRequest),
80	Feerates(requests::FeeratesRequest),
81	FetchInvoice(requests::FetchinvoiceRequest),
82	#[serde(rename = "fundchannel_cancel")]
83	FundChannelCancel(requests::FundchannelCancelRequest),
84	#[serde(rename = "fundchannel_complete")]
85	FundChannelComplete(requests::FundchannelCompleteRequest),
86	FundChannel(requests::FundchannelRequest),
87	#[serde(rename = "fundchannel_start")]
88	FundChannelStart(requests::FundchannelStartRequest),
89	GetLog(requests::GetlogRequest),
90	FunderUpdate(requests::FunderupdateRequest),
91	GetRoute(requests::GetrouteRequest),
92	ListAddresses(requests::ListaddressesRequest),
93	ListForwards(requests::ListforwardsRequest),
94	ListOffers(requests::ListoffersRequest),
95	ListPays(requests::ListpaysRequest),
96	ListHtlcs(requests::ListhtlcsRequest),
97	MultiFundChannel(requests::MultifundchannelRequest),
98	MultiWithdraw(requests::MultiwithdrawRequest),
99	Offer(requests::OfferRequest),
100	#[serde(rename = "openchannel_abort")]
101	OpenChannelAbort(requests::OpenchannelAbortRequest),
102	#[serde(rename = "openchannel_bump")]
103	OpenChannelBump(requests::OpenchannelBumpRequest),
104	#[serde(rename = "openchannel_init")]
105	OpenChannelInit(requests::OpenchannelInitRequest),
106	#[serde(rename = "openchannel_signed")]
107	OpenChannelSigned(requests::OpenchannelSignedRequest),
108	#[serde(rename = "openchannel_update")]
109	OpenChannelUpdate(requests::OpenchannelUpdateRequest),
110	Ping(requests::PingRequest),
111	Plugin(requests::PluginRequest),
112	RenePayStatus(requests::RenepaystatusRequest),
113	RenePay(requests::RenepayRequest),
114	ReserveInputs(requests::ReserveinputsRequest),
115	SendCustomMsg(requests::SendcustommsgRequest),
116	SendInvoice(requests::SendinvoiceRequest),
117	SetChannel(requests::SetchannelRequest),
118	SetConfig(requests::SetconfigRequest),
119	SetPsbtVersion(requests::SetpsbtversionRequest),
120	SignInvoice(requests::SigninvoiceRequest),
121	SignMessage(requests::SignmessageRequest),
122	#[serde(rename = "splice_init")]
123	SpliceInit(requests::SpliceInitRequest),
124	#[serde(rename = "splice_signed")]
125	SpliceSigned(requests::SpliceSignedRequest),
126	#[serde(rename = "splice_update")]
127	SpliceUpdate(requests::SpliceUpdateRequest),
128	#[serde(rename = "dev-splice")]
129	DevSplice(requests::DevspliceRequest),
130	UnreserveInputs(requests::UnreserveinputsRequest),
131	UpgradeWallet(requests::UpgradewalletRequest),
132	WaitBlockHeight(requests::WaitblockheightRequest),
133	Wait(requests::WaitRequest),
134	ListConfigs(requests::ListconfigsRequest),
135	Stop(requests::StopRequest),
136	Help(requests::HelpRequest),
137	PreApproveKeysend(requests::PreapprovekeysendRequest),
138	PreApproveInvoice(requests::PreapproveinvoiceRequest),
139	StaticBackup(requests::StaticbackupRequest),
140	#[serde(rename = "bkpr-channelsapy")]
141	BkprChannelsApy(requests::BkprchannelsapyRequest),
142	#[serde(rename = "bkpr-dumpincomecsv")]
143	BkprDumpIncomeCsv(requests::BkprdumpincomecsvRequest),
144	#[serde(rename = "bkpr-inspect")]
145	BkprInspect(requests::BkprinspectRequest),
146	#[serde(rename = "bkpr-listaccountevents")]
147	BkprListAccountEvents(requests::BkprlistaccounteventsRequest),
148	#[serde(rename = "bkpr-listbalances")]
149	BkprListBalances(requests::BkprlistbalancesRequest),
150	#[serde(rename = "bkpr-listincome")]
151	BkprListIncome(requests::BkprlistincomeRequest),
152	#[serde(rename = "bkpr-editdescriptionbypaymentid")]
153	BkprEditDescriptionByPaymentId(requests::BkpreditdescriptionbypaymentidRequest),
154	#[serde(rename = "bkpr-editdescriptionbyoutpoint")]
155	BkprEditDescriptionByOutpoint(requests::BkpreditdescriptionbyoutpointRequest),
156	BlacklistRune(requests::BlacklistruneRequest),
157	CheckRune(requests::CheckruneRequest),
158	CreateRune(requests::CreateruneRequest),
159	ShowRunes(requests::ShowrunesRequest),
160	#[serde(rename = "askrene-unreserve")]
161	AskReneUnreserve(requests::AskreneunreserveRequest),
162	#[serde(rename = "askrene-listlayers")]
163	AskReneListLayers(requests::AskrenelistlayersRequest),
164	#[serde(rename = "askrene-create-layer")]
165	AskReneCreateLayer(requests::AskrenecreatelayerRequest),
166	#[serde(rename = "askrene-remove-layer")]
167	AskReneRemoveLayer(requests::AskreneremovelayerRequest),
168	#[serde(rename = "askrene-reserve")]
169	AskReneReserve(requests::AskrenereserveRequest),
170	#[serde(rename = "askrene-age")]
171	AskReneAge(requests::AskreneageRequest),
172	GetRoutes(requests::GetroutesRequest),
173	#[serde(rename = "askrene-disable-node")]
174	AskReneDisableNode(requests::AskrenedisablenodeRequest),
175	#[serde(rename = "askrene-inform-channel")]
176	AskReneInformChannel(requests::AskreneinformchannelRequest),
177	#[serde(rename = "askrene-create-channel")]
178	AskReneCreateChannel(requests::AskrenecreatechannelRequest),
179	#[serde(rename = "askrene-update-channel")]
180	AskReneUpdateChannel(requests::AskreneupdatechannelRequest),
181	#[serde(rename = "askrene-bias-channel")]
182	AskReneBiasChannel(requests::AskrenebiaschannelRequest),
183	#[serde(rename = "askrene-listreservations")]
184	AskReneListReservations(requests::AskrenelistreservationsRequest),
185	InjectPaymentOnion(requests::InjectpaymentonionRequest),
186	InjectOnionMessage(requests::InjectonionmessageRequest),
187	Xpay(requests::XpayRequest),
188}
189
190#[derive(Clone, Debug, Serialize, Deserialize)]
191#[serde(tag = "method", content = "result")]
192#[serde(rename_all = "lowercase")]
193pub enum Response {
194	Getinfo(responses::GetinfoResponse),
195	ListPeers(responses::ListpeersResponse),
196	ListFunds(responses::ListfundsResponse),
197	SendPay(responses::SendpayResponse),
198	ListChannels(responses::ListchannelsResponse),
199	AddGossip(responses::AddgossipResponse),
200	AddPsbtOutput(responses::AddpsbtoutputResponse),
201	#[serde(rename = "autoclean-once")]
202	AutoCleanOnce(responses::AutocleanonceResponse),
203	#[serde(rename = "autoclean-status")]
204	AutoCleanStatus(responses::AutocleanstatusResponse),
205	CheckMessage(responses::CheckmessageResponse),
206	Close(responses::CloseResponse),
207	Connect(responses::ConnectResponse),
208	CreateInvoice(responses::CreateinvoiceResponse),
209	Datastore(responses::DatastoreResponse),
210	DatastoreUsage(responses::DatastoreusageResponse),
211	CreateOnion(responses::CreateonionResponse),
212	DelDatastore(responses::DeldatastoreResponse),
213	DelInvoice(responses::DelinvoiceResponse),
214	#[serde(rename = "dev-forget-channel")]
215	DevForgetChannel(responses::DevforgetchannelResponse),
216	EmergencyRecover(responses::EmergencyrecoverResponse),
217	GetEmergencyRecoverData(responses::GetemergencyrecoverdataResponse),
218	ExposeSecret(responses::ExposesecretResponse),
219	Recover(responses::RecoverResponse),
220	RecoverChannel(responses::RecoverchannelResponse),
221	Invoice(responses::InvoiceResponse),
222	InvoiceRequest(responses::InvoicerequestResponse),
223	DisableInvoiceRequest(responses::DisableinvoicerequestResponse),
224	ListInvoiceRequests(responses::ListinvoicerequestsResponse),
225	ListDatastore(responses::ListdatastoreResponse),
226	ListInvoices(responses::ListinvoicesResponse),
227	SendOnion(responses::SendonionResponse),
228	ListSendPays(responses::ListsendpaysResponse),
229	ListTransactions(responses::ListtransactionsResponse),
230	MakeSecret(responses::MakesecretResponse),
231	Pay(responses::PayResponse),
232	ListNodes(responses::ListnodesResponse),
233	WaitAnyInvoice(responses::WaitanyinvoiceResponse),
234	WaitInvoice(responses::WaitinvoiceResponse),
235	WaitSendPay(responses::WaitsendpayResponse),
236	NewAddr(responses::NewaddrResponse),
237	Withdraw(responses::WithdrawResponse),
238	KeySend(responses::KeysendResponse),
239	FundPsbt(responses::FundpsbtResponse),
240	SendPsbt(responses::SendpsbtResponse),
241	SignPsbt(responses::SignpsbtResponse),
242	UtxoPsbt(responses::UtxopsbtResponse),
243	TxDiscard(responses::TxdiscardResponse),
244	TxPrepare(responses::TxprepareResponse),
245	TxSend(responses::TxsendResponse),
246	ListPeerChannels(responses::ListpeerchannelsResponse),
247	ListClosedChannels(responses::ListclosedchannelsResponse),
248	DecodePay(responses::DecodepayResponse),
249	Decode(responses::DecodeResponse),
250	DelPay(responses::DelpayResponse),
251	DelForward(responses::DelforwardResponse),
252	DisableOffer(responses::DisableofferResponse),
253	EnableOffer(responses::EnableofferResponse),
254	Disconnect(responses::DisconnectResponse),
255	Feerates(responses::FeeratesResponse),
256	FetchInvoice(responses::FetchinvoiceResponse),
257	#[serde(rename = "fundchannel_cancel")]
258	FundChannelCancel(responses::FundchannelCancelResponse),
259	#[serde(rename = "fundchannel_complete")]
260	FundChannelComplete(responses::FundchannelCompleteResponse),
261	FundChannel(responses::FundchannelResponse),
262	#[serde(rename = "fundchannel_start")]
263	FundChannelStart(responses::FundchannelStartResponse),
264	GetLog(responses::GetlogResponse),
265	FunderUpdate(responses::FunderupdateResponse),
266	GetRoute(responses::GetrouteResponse),
267	ListAddresses(responses::ListaddressesResponse),
268	ListForwards(responses::ListforwardsResponse),
269	ListOffers(responses::ListoffersResponse),
270	ListPays(responses::ListpaysResponse),
271	ListHtlcs(responses::ListhtlcsResponse),
272	MultiFundChannel(responses::MultifundchannelResponse),
273	MultiWithdraw(responses::MultiwithdrawResponse),
274	Offer(responses::OfferResponse),
275	#[serde(rename = "openchannel_abort")]
276	OpenChannelAbort(responses::OpenchannelAbortResponse),
277	#[serde(rename = "openchannel_bump")]
278	OpenChannelBump(responses::OpenchannelBumpResponse),
279	#[serde(rename = "openchannel_init")]
280	OpenChannelInit(responses::OpenchannelInitResponse),
281	#[serde(rename = "openchannel_signed")]
282	OpenChannelSigned(responses::OpenchannelSignedResponse),
283	#[serde(rename = "openchannel_update")]
284	OpenChannelUpdate(responses::OpenchannelUpdateResponse),
285	Ping(responses::PingResponse),
286	Plugin(responses::PluginResponse),
287	RenePayStatus(responses::RenepaystatusResponse),
288	RenePay(responses::RenepayResponse),
289	ReserveInputs(responses::ReserveinputsResponse),
290	SendCustomMsg(responses::SendcustommsgResponse),
291	SendInvoice(responses::SendinvoiceResponse),
292	SetChannel(responses::SetchannelResponse),
293	SetConfig(responses::SetconfigResponse),
294	SetPsbtVersion(responses::SetpsbtversionResponse),
295	SignInvoice(responses::SigninvoiceResponse),
296	SignMessage(responses::SignmessageResponse),
297	#[serde(rename = "splice_init")]
298	SpliceInit(responses::SpliceInitResponse),
299	#[serde(rename = "splice_signed")]
300	SpliceSigned(responses::SpliceSignedResponse),
301	#[serde(rename = "splice_update")]
302	SpliceUpdate(responses::SpliceUpdateResponse),
303	#[serde(rename = "dev-splice")]
304	DevSplice(responses::DevspliceResponse),
305	UnreserveInputs(responses::UnreserveinputsResponse),
306	UpgradeWallet(responses::UpgradewalletResponse),
307	WaitBlockHeight(responses::WaitblockheightResponse),
308	Wait(responses::WaitResponse),
309	ListConfigs(responses::ListconfigsResponse),
310	Stop(responses::StopResponse),
311	Help(responses::HelpResponse),
312	PreApproveKeysend(responses::PreapprovekeysendResponse),
313	PreApproveInvoice(responses::PreapproveinvoiceResponse),
314	StaticBackup(responses::StaticbackupResponse),
315	#[serde(rename = "bkpr-channelsapy")]
316	BkprChannelsApy(responses::BkprchannelsapyResponse),
317	#[serde(rename = "bkpr-dumpincomecsv")]
318	BkprDumpIncomeCsv(responses::BkprdumpincomecsvResponse),
319	#[serde(rename = "bkpr-inspect")]
320	BkprInspect(responses::BkprinspectResponse),
321	#[serde(rename = "bkpr-listaccountevents")]
322	BkprListAccountEvents(responses::BkprlistaccounteventsResponse),
323	#[serde(rename = "bkpr-listbalances")]
324	BkprListBalances(responses::BkprlistbalancesResponse),
325	#[serde(rename = "bkpr-listincome")]
326	BkprListIncome(responses::BkprlistincomeResponse),
327	#[serde(rename = "bkpr-editdescriptionbypaymentid")]
328	BkprEditDescriptionByPaymentId(responses::BkpreditdescriptionbypaymentidResponse),
329	#[serde(rename = "bkpr-editdescriptionbyoutpoint")]
330	BkprEditDescriptionByOutpoint(responses::BkpreditdescriptionbyoutpointResponse),
331	BlacklistRune(responses::BlacklistruneResponse),
332	CheckRune(responses::CheckruneResponse),
333	CreateRune(responses::CreateruneResponse),
334	ShowRunes(responses::ShowrunesResponse),
335	#[serde(rename = "askrene-unreserve")]
336	AskReneUnreserve(responses::AskreneunreserveResponse),
337	#[serde(rename = "askrene-listlayers")]
338	AskReneListLayers(responses::AskrenelistlayersResponse),
339	#[serde(rename = "askrene-create-layer")]
340	AskReneCreateLayer(responses::AskrenecreatelayerResponse),
341	#[serde(rename = "askrene-remove-layer")]
342	AskReneRemoveLayer(responses::AskreneremovelayerResponse),
343	#[serde(rename = "askrene-reserve")]
344	AskReneReserve(responses::AskrenereserveResponse),
345	#[serde(rename = "askrene-age")]
346	AskReneAge(responses::AskreneageResponse),
347	GetRoutes(responses::GetroutesResponse),
348	#[serde(rename = "askrene-disable-node")]
349	AskReneDisableNode(responses::AskrenedisablenodeResponse),
350	#[serde(rename = "askrene-inform-channel")]
351	AskReneInformChannel(responses::AskreneinformchannelResponse),
352	#[serde(rename = "askrene-create-channel")]
353	AskReneCreateChannel(responses::AskrenecreatechannelResponse),
354	#[serde(rename = "askrene-update-channel")]
355	AskReneUpdateChannel(responses::AskreneupdatechannelResponse),
356	#[serde(rename = "askrene-bias-channel")]
357	AskReneBiasChannel(responses::AskrenebiaschannelResponse),
358	#[serde(rename = "askrene-listreservations")]
359	AskReneListReservations(responses::AskrenelistreservationsResponse),
360	InjectPaymentOnion(responses::InjectpaymentonionResponse),
361	InjectOnionMessage(responses::InjectonionmessageResponse),
362	Xpay(responses::XpayResponse),
363}
364
365
366pub trait IntoRequest: Into<Request> {
367    type Response: TryFrom<Response, Error = TryFromResponseError>;
368}
369
370pub trait TypedRequest {
371    type Response;
372
373    fn method(&self) -> &str;
374}
375
376#[derive(Debug)]
377pub struct TryFromResponseError;
378
379pub mod requests {
380    #[allow(unused_imports)]
381    use crate::primitives::*;
382    #[allow(unused_imports)]
383    use serde::{{Deserialize, Serialize}};
384    use core::fmt::Debug;
385    use super::{IntoRequest, Request, TypedRequest};
386	#[derive(Clone, Debug, Deserialize, Serialize)]
387	pub struct GetinfoRequest {
388	}
389
390	impl From<GetinfoRequest> for Request {
391	    fn from(r: GetinfoRequest) -> Self {
392	        Request::Getinfo(r)
393	    }
394	}
395
396	impl IntoRequest for GetinfoRequest {
397	    type Response = super::responses::GetinfoResponse;
398	}
399
400	impl TypedRequest for GetinfoRequest {
401	    type Response = super::responses::GetinfoResponse;
402
403	    fn method(&self) -> &str {
404	        "getinfo"
405	    }
406	}
407	/// ['Supplying level will show log entries related to that peer at the given log level.']
408	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
409	#[allow(non_camel_case_types)]
410	pub enum ListpeersLevel {
411	    #[serde(rename = "io")]
412	    IO = 0,
413	    #[serde(rename = "debug")]
414	    DEBUG = 1,
415	    #[serde(rename = "info")]
416	    INFO = 2,
417	    #[serde(rename = "unusual")]
418	    UNUSUAL = 3,
419	    #[serde(rename = "trace")]
420	    TRACE = 4,
421	}
422
423	impl TryFrom<i32> for ListpeersLevel {
424	    type Error = anyhow::Error;
425	    fn try_from(c: i32) -> Result<ListpeersLevel, anyhow::Error> {
426	        match c {
427	    0 => Ok(ListpeersLevel::IO),
428	    1 => Ok(ListpeersLevel::DEBUG),
429	    2 => Ok(ListpeersLevel::INFO),
430	    3 => Ok(ListpeersLevel::UNUSUAL),
431	    4 => Ok(ListpeersLevel::TRACE),
432	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListpeersLevel", o)),
433	        }
434	    }
435	}
436
437	impl ToString for ListpeersLevel {
438	    fn to_string(&self) -> String {
439	        match self {
440	            ListpeersLevel::IO => "IO",
441	            ListpeersLevel::TRACE => "TRACE",
442	            ListpeersLevel::DEBUG => "DEBUG",
443	            ListpeersLevel::INFO => "INFO",
444	            ListpeersLevel::UNUSUAL => "UNUSUAL",
445	        }.to_string()
446	    }
447	}
448
449	#[derive(Clone, Debug, Deserialize, Serialize)]
450	pub struct ListpeersRequest {
451	    #[serde(skip_serializing_if = "Option::is_none")]
452	    pub id: Option<PublicKey>,
453	    #[serde(skip_serializing_if = "Option::is_none")]
454	    pub level: Option<ListpeersLevel>,
455	}
456
457	impl From<ListpeersRequest> for Request {
458	    fn from(r: ListpeersRequest) -> Self {
459	        Request::ListPeers(r)
460	    }
461	}
462
463	impl IntoRequest for ListpeersRequest {
464	    type Response = super::responses::ListpeersResponse;
465	}
466
467	impl TypedRequest for ListpeersRequest {
468	    type Response = super::responses::ListpeersResponse;
469
470	    fn method(&self) -> &str {
471	        "listpeers"
472	    }
473	}
474	#[derive(Clone, Debug, Deserialize, Serialize)]
475	pub struct ListfundsRequest {
476	    #[serde(skip_serializing_if = "Option::is_none")]
477	    pub spent: Option<bool>,
478	}
479
480	impl From<ListfundsRequest> for Request {
481	    fn from(r: ListfundsRequest) -> Self {
482	        Request::ListFunds(r)
483	    }
484	}
485
486	impl IntoRequest for ListfundsRequest {
487	    type Response = super::responses::ListfundsResponse;
488	}
489
490	impl TypedRequest for ListfundsRequest {
491	    type Response = super::responses::ListfundsResponse;
492
493	    fn method(&self) -> &str {
494	        "listfunds"
495	    }
496	}
497	#[derive(Clone, Debug, Deserialize, Serialize)]
498	pub struct SendpayRoute {
499	    pub amount_msat: Amount,
500	    pub channel: ShortChannelId,
501	    pub delay: u32,
502	    pub id: PublicKey,
503	}
504
505	#[derive(Clone, Debug, Deserialize, Serialize)]
506	pub struct SendpayRequest {
507	    #[serde(skip_serializing_if = "Option::is_none")]
508	    pub amount_msat: Option<Amount>,
509	    #[serde(skip_serializing_if = "Option::is_none")]
510	    pub bolt11: Option<String>,
511	    #[serde(skip_serializing_if = "Option::is_none")]
512	    pub description: Option<String>,
513	    #[serde(skip_serializing_if = "Option::is_none")]
514	    pub groupid: Option<u64>,
515	    #[serde(skip_serializing_if = "Option::is_none")]
516	    pub label: Option<String>,
517	    #[serde(skip_serializing_if = "Option::is_none")]
518	    pub localinvreqid: Option<String>,
519	    #[serde(skip_serializing_if = "Option::is_none")]
520	    pub partid: Option<u64>,
521	    #[serde(skip_serializing_if = "Option::is_none")]
522	    pub payment_metadata: Option<String>,
523	    #[serde(skip_serializing_if = "Option::is_none")]
524	    pub payment_secret: Option<Secret>,
525	    pub payment_hash: Sha256,
526	    pub route: Vec<SendpayRoute>,
527	}
528
529	impl From<SendpayRequest> for Request {
530	    fn from(r: SendpayRequest) -> Self {
531	        Request::SendPay(r)
532	    }
533	}
534
535	impl IntoRequest for SendpayRequest {
536	    type Response = super::responses::SendpayResponse;
537	}
538
539	impl TypedRequest for SendpayRequest {
540	    type Response = super::responses::SendpayResponse;
541
542	    fn method(&self) -> &str {
543	        "sendpay"
544	    }
545	}
546	#[derive(Clone, Debug, Deserialize, Serialize)]
547	pub struct ListchannelsRequest {
548	    #[serde(skip_serializing_if = "Option::is_none")]
549	    pub destination: Option<PublicKey>,
550	    #[serde(skip_serializing_if = "Option::is_none")]
551	    pub short_channel_id: Option<ShortChannelId>,
552	    #[serde(skip_serializing_if = "Option::is_none")]
553	    pub source: Option<PublicKey>,
554	}
555
556	impl From<ListchannelsRequest> for Request {
557	    fn from(r: ListchannelsRequest) -> Self {
558	        Request::ListChannels(r)
559	    }
560	}
561
562	impl IntoRequest for ListchannelsRequest {
563	    type Response = super::responses::ListchannelsResponse;
564	}
565
566	impl TypedRequest for ListchannelsRequest {
567	    type Response = super::responses::ListchannelsResponse;
568
569	    fn method(&self) -> &str {
570	        "listchannels"
571	    }
572	}
573	#[derive(Clone, Debug, Deserialize, Serialize)]
574	pub struct AddgossipRequest {
575	    pub message: String,
576	}
577
578	impl From<AddgossipRequest> for Request {
579	    fn from(r: AddgossipRequest) -> Self {
580	        Request::AddGossip(r)
581	    }
582	}
583
584	impl IntoRequest for AddgossipRequest {
585	    type Response = super::responses::AddgossipResponse;
586	}
587
588	impl TypedRequest for AddgossipRequest {
589	    type Response = super::responses::AddgossipResponse;
590
591	    fn method(&self) -> &str {
592	        "addgossip"
593	    }
594	}
595	#[derive(Clone, Debug, Deserialize, Serialize)]
596	pub struct AddpsbtoutputRequest {
597	    #[serde(skip_serializing_if = "Option::is_none")]
598	    pub destination: Option<String>,
599	    #[serde(skip_serializing_if = "Option::is_none")]
600	    pub initialpsbt: Option<String>,
601	    #[serde(skip_serializing_if = "Option::is_none")]
602	    pub locktime: Option<u32>,
603	    pub satoshi: Amount,
604	}
605
606	impl From<AddpsbtoutputRequest> for Request {
607	    fn from(r: AddpsbtoutputRequest) -> Self {
608	        Request::AddPsbtOutput(r)
609	    }
610	}
611
612	impl IntoRequest for AddpsbtoutputRequest {
613	    type Response = super::responses::AddpsbtoutputResponse;
614	}
615
616	impl TypedRequest for AddpsbtoutputRequest {
617	    type Response = super::responses::AddpsbtoutputResponse;
618
619	    fn method(&self) -> &str {
620	        "addpsbtoutput"
621	    }
622	}
623	#[derive(Clone, Debug, Deserialize, Serialize)]
624	pub struct AutocleanonceRequest {
625	    // Path `AutoClean-Once.subsystem`
626	    pub subsystem: AutocleanSubsystem,
627	    pub age: u64,
628	}
629
630	impl From<AutocleanonceRequest> for Request {
631	    fn from(r: AutocleanonceRequest) -> Self {
632	        Request::AutoCleanOnce(r)
633	    }
634	}
635
636	impl IntoRequest for AutocleanonceRequest {
637	    type Response = super::responses::AutocleanonceResponse;
638	}
639
640	impl TypedRequest for AutocleanonceRequest {
641	    type Response = super::responses::AutocleanonceResponse;
642
643	    fn method(&self) -> &str {
644	        "autoclean-once"
645	    }
646	}
647	#[derive(Clone, Debug, Deserialize, Serialize)]
648	pub struct AutocleanstatusRequest {
649	    #[serde(skip_serializing_if = "Option::is_none")]
650	    pub subsystem: Option<AutocleanSubsystem>,
651	}
652
653	impl From<AutocleanstatusRequest> for Request {
654	    fn from(r: AutocleanstatusRequest) -> Self {
655	        Request::AutoCleanStatus(r)
656	    }
657	}
658
659	impl IntoRequest for AutocleanstatusRequest {
660	    type Response = super::responses::AutocleanstatusResponse;
661	}
662
663	impl TypedRequest for AutocleanstatusRequest {
664	    type Response = super::responses::AutocleanstatusResponse;
665
666	    fn method(&self) -> &str {
667	        "autoclean-status"
668	    }
669	}
670	#[derive(Clone, Debug, Deserialize, Serialize)]
671	pub struct CheckmessageRequest {
672	    #[serde(skip_serializing_if = "Option::is_none")]
673	    pub pubkey: Option<PublicKey>,
674	    pub message: String,
675	    pub zbase: String,
676	}
677
678	impl From<CheckmessageRequest> for Request {
679	    fn from(r: CheckmessageRequest) -> Self {
680	        Request::CheckMessage(r)
681	    }
682	}
683
684	impl IntoRequest for CheckmessageRequest {
685	    type Response = super::responses::CheckmessageResponse;
686	}
687
688	impl TypedRequest for CheckmessageRequest {
689	    type Response = super::responses::CheckmessageResponse;
690
691	    fn method(&self) -> &str {
692	        "checkmessage"
693	    }
694	}
695	#[derive(Clone, Debug, Deserialize, Serialize)]
696	pub struct CloseRequest {
697	    #[serde(skip_serializing_if = "Option::is_none")]
698	    pub destination: Option<String>,
699	    #[serde(skip_serializing_if = "Option::is_none")]
700	    pub fee_negotiation_step: Option<String>,
701	    #[serde(skip_serializing_if = "Option::is_none")]
702	    pub force_lease_closed: Option<bool>,
703	    #[serde(skip_serializing_if = "Option::is_none")]
704	    pub unilateraltimeout: Option<u32>,
705	    #[serde(skip_serializing_if = "Option::is_none")]
706	    pub wrong_funding: Option<Outpoint>,
707	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
708	    pub feerange: Option<Vec<Feerate>>,
709	    pub id: String,
710	}
711
712	impl From<CloseRequest> for Request {
713	    fn from(r: CloseRequest) -> Self {
714	        Request::Close(r)
715	    }
716	}
717
718	impl IntoRequest for CloseRequest {
719	    type Response = super::responses::CloseResponse;
720	}
721
722	impl TypedRequest for CloseRequest {
723	    type Response = super::responses::CloseResponse;
724
725	    fn method(&self) -> &str {
726	        "close"
727	    }
728	}
729	#[derive(Clone, Debug, Deserialize, Serialize)]
730	pub struct ConnectRequest {
731	    #[serde(skip_serializing_if = "Option::is_none")]
732	    pub host: Option<String>,
733	    #[serde(skip_serializing_if = "Option::is_none")]
734	    pub port: Option<u16>,
735	    pub id: String,
736	}
737
738	impl From<ConnectRequest> for Request {
739	    fn from(r: ConnectRequest) -> Self {
740	        Request::Connect(r)
741	    }
742	}
743
744	impl IntoRequest for ConnectRequest {
745	    type Response = super::responses::ConnectResponse;
746	}
747
748	impl TypedRequest for ConnectRequest {
749	    type Response = super::responses::ConnectResponse;
750
751	    fn method(&self) -> &str {
752	        "connect"
753	    }
754	}
755	#[derive(Clone, Debug, Deserialize, Serialize)]
756	pub struct CreateinvoiceRequest {
757	    pub invstring: String,
758	    pub label: String,
759	    pub preimage: String,
760	}
761
762	impl From<CreateinvoiceRequest> for Request {
763	    fn from(r: CreateinvoiceRequest) -> Self {
764	        Request::CreateInvoice(r)
765	    }
766	}
767
768	impl IntoRequest for CreateinvoiceRequest {
769	    type Response = super::responses::CreateinvoiceResponse;
770	}
771
772	impl TypedRequest for CreateinvoiceRequest {
773	    type Response = super::responses::CreateinvoiceResponse;
774
775	    fn method(&self) -> &str {
776	        "createinvoice"
777	    }
778	}
779	/// ['Write mode to determine how the record is updated:', '    * `must-create`: fails if it already exists.', "    * `must-replace`: fails if it doesn't already exist.", '    * `create-or-replace`: never fails.', "    * `must-append`: must already exist, append this to what's already there.", '    * `create-or-append`: append if anything is there, otherwise create.']
780	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
781	#[allow(non_camel_case_types)]
782	pub enum DatastoreMode {
783	    #[serde(rename = "must-create")]
784	    MUST_CREATE = 0,
785	    #[serde(rename = "must-replace")]
786	    MUST_REPLACE = 1,
787	    #[serde(rename = "create-or-replace")]
788	    CREATE_OR_REPLACE = 2,
789	    #[serde(rename = "must-append")]
790	    MUST_APPEND = 3,
791	    #[serde(rename = "create-or-append")]
792	    CREATE_OR_APPEND = 4,
793	}
794
795	impl TryFrom<i32> for DatastoreMode {
796	    type Error = anyhow::Error;
797	    fn try_from(c: i32) -> Result<DatastoreMode, anyhow::Error> {
798	        match c {
799	    0 => Ok(DatastoreMode::MUST_CREATE),
800	    1 => Ok(DatastoreMode::MUST_REPLACE),
801	    2 => Ok(DatastoreMode::CREATE_OR_REPLACE),
802	    3 => Ok(DatastoreMode::MUST_APPEND),
803	    4 => Ok(DatastoreMode::CREATE_OR_APPEND),
804	            o => Err(anyhow::anyhow!("Unknown variant {} for enum DatastoreMode", o)),
805	        }
806	    }
807	}
808
809	impl ToString for DatastoreMode {
810	    fn to_string(&self) -> String {
811	        match self {
812	            DatastoreMode::MUST_CREATE => "MUST_CREATE",
813	            DatastoreMode::MUST_REPLACE => "MUST_REPLACE",
814	            DatastoreMode::CREATE_OR_REPLACE => "CREATE_OR_REPLACE",
815	            DatastoreMode::MUST_APPEND => "MUST_APPEND",
816	            DatastoreMode::CREATE_OR_APPEND => "CREATE_OR_APPEND",
817	        }.to_string()
818	    }
819	}
820
821	#[derive(Clone, Debug, Deserialize, Serialize)]
822	pub struct DatastoreRequest {
823	    #[serde(skip_serializing_if = "Option::is_none")]
824	    pub generation: Option<u64>,
825	    #[serde(skip_serializing_if = "Option::is_none")]
826	    pub hex: Option<String>,
827	    #[serde(skip_serializing_if = "Option::is_none")]
828	    pub mode: Option<DatastoreMode>,
829	    #[serde(skip_serializing_if = "Option::is_none")]
830	    pub string: Option<String>,
831	    pub key: Vec<String>,
832	}
833
834	impl From<DatastoreRequest> for Request {
835	    fn from(r: DatastoreRequest) -> Self {
836	        Request::Datastore(r)
837	    }
838	}
839
840	impl IntoRequest for DatastoreRequest {
841	    type Response = super::responses::DatastoreResponse;
842	}
843
844	impl TypedRequest for DatastoreRequest {
845	    type Response = super::responses::DatastoreResponse;
846
847	    fn method(&self) -> &str {
848	        "datastore"
849	    }
850	}
851	#[derive(Clone, Debug, Deserialize, Serialize)]
852	pub struct DatastoreusageRequest {
853	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
854	    pub key: Option<Vec<String>>,
855	}
856
857	impl From<DatastoreusageRequest> for Request {
858	    fn from(r: DatastoreusageRequest) -> Self {
859	        Request::DatastoreUsage(r)
860	    }
861	}
862
863	impl IntoRequest for DatastoreusageRequest {
864	    type Response = super::responses::DatastoreusageResponse;
865	}
866
867	impl TypedRequest for DatastoreusageRequest {
868	    type Response = super::responses::DatastoreusageResponse;
869
870	    fn method(&self) -> &str {
871	        "datastoreusage"
872	    }
873	}
874	#[derive(Clone, Debug, Deserialize, Serialize)]
875	pub struct CreateonionHops {
876	    pub payload: String,
877	    pub pubkey: PublicKey,
878	}
879
880	#[derive(Clone, Debug, Deserialize, Serialize)]
881	pub struct CreateonionRequest {
882	    #[serde(skip_serializing_if = "Option::is_none")]
883	    pub onion_size: Option<u16>,
884	    #[serde(skip_serializing_if = "Option::is_none")]
885	    pub session_key: Option<Secret>,
886	    pub assocdata: String,
887	    pub hops: Vec<CreateonionHops>,
888	}
889
890	impl From<CreateonionRequest> for Request {
891	    fn from(r: CreateonionRequest) -> Self {
892	        Request::CreateOnion(r)
893	    }
894	}
895
896	impl IntoRequest for CreateonionRequest {
897	    type Response = super::responses::CreateonionResponse;
898	}
899
900	impl TypedRequest for CreateonionRequest {
901	    type Response = super::responses::CreateonionResponse;
902
903	    fn method(&self) -> &str {
904	        "createonion"
905	    }
906	}
907	#[derive(Clone, Debug, Deserialize, Serialize)]
908	pub struct DeldatastoreRequest {
909	    #[serde(skip_serializing_if = "Option::is_none")]
910	    pub generation: Option<u64>,
911	    pub key: Vec<String>,
912	}
913
914	impl From<DeldatastoreRequest> for Request {
915	    fn from(r: DeldatastoreRequest) -> Self {
916	        Request::DelDatastore(r)
917	    }
918	}
919
920	impl IntoRequest for DeldatastoreRequest {
921	    type Response = super::responses::DeldatastoreResponse;
922	}
923
924	impl TypedRequest for DeldatastoreRequest {
925	    type Response = super::responses::DeldatastoreResponse;
926
927	    fn method(&self) -> &str {
928	        "deldatastore"
929	    }
930	}
931	/// ['Label of the invoice to be deleted. The caller should be particularly aware of the error case caused by the *status* changing just before this command is invoked!']
932	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
933	#[allow(non_camel_case_types)]
934	pub enum DelinvoiceStatus {
935	    #[serde(rename = "paid")]
936	    PAID = 0,
937	    #[serde(rename = "expired")]
938	    EXPIRED = 1,
939	    #[serde(rename = "unpaid")]
940	    UNPAID = 2,
941	}
942
943	impl TryFrom<i32> for DelinvoiceStatus {
944	    type Error = anyhow::Error;
945	    fn try_from(c: i32) -> Result<DelinvoiceStatus, anyhow::Error> {
946	        match c {
947	    0 => Ok(DelinvoiceStatus::PAID),
948	    1 => Ok(DelinvoiceStatus::EXPIRED),
949	    2 => Ok(DelinvoiceStatus::UNPAID),
950	            o => Err(anyhow::anyhow!("Unknown variant {} for enum DelinvoiceStatus", o)),
951	        }
952	    }
953	}
954
955	impl ToString for DelinvoiceStatus {
956	    fn to_string(&self) -> String {
957	        match self {
958	            DelinvoiceStatus::PAID => "PAID",
959	            DelinvoiceStatus::EXPIRED => "EXPIRED",
960	            DelinvoiceStatus::UNPAID => "UNPAID",
961	        }.to_string()
962	    }
963	}
964
965	#[derive(Clone, Debug, Deserialize, Serialize)]
966	pub struct DelinvoiceRequest {
967	    #[serde(skip_serializing_if = "Option::is_none")]
968	    pub desconly: Option<bool>,
969	    // Path `DelInvoice.status`
970	    pub status: DelinvoiceStatus,
971	    pub label: String,
972	}
973
974	impl From<DelinvoiceRequest> for Request {
975	    fn from(r: DelinvoiceRequest) -> Self {
976	        Request::DelInvoice(r)
977	    }
978	}
979
980	impl IntoRequest for DelinvoiceRequest {
981	    type Response = super::responses::DelinvoiceResponse;
982	}
983
984	impl TypedRequest for DelinvoiceRequest {
985	    type Response = super::responses::DelinvoiceResponse;
986
987	    fn method(&self) -> &str {
988	        "delinvoice"
989	    }
990	}
991	#[derive(Clone, Debug, Deserialize, Serialize)]
992	pub struct DevforgetchannelRequest {
993	    #[serde(skip_serializing_if = "Option::is_none")]
994	    pub channel_id: Option<Sha256>,
995	    #[serde(skip_serializing_if = "Option::is_none")]
996	    pub force: Option<bool>,
997	    #[serde(skip_serializing_if = "Option::is_none")]
998	    pub short_channel_id: Option<ShortChannelId>,
999	    pub id: PublicKey,
1000	}
1001
1002	impl From<DevforgetchannelRequest> for Request {
1003	    fn from(r: DevforgetchannelRequest) -> Self {
1004	        Request::DevForgetChannel(r)
1005	    }
1006	}
1007
1008	impl IntoRequest for DevforgetchannelRequest {
1009	    type Response = super::responses::DevforgetchannelResponse;
1010	}
1011
1012	impl TypedRequest for DevforgetchannelRequest {
1013	    type Response = super::responses::DevforgetchannelResponse;
1014
1015	    fn method(&self) -> &str {
1016	        "dev-forget-channel"
1017	    }
1018	}
1019	#[derive(Clone, Debug, Deserialize, Serialize)]
1020	pub struct EmergencyrecoverRequest {
1021	}
1022
1023	impl From<EmergencyrecoverRequest> for Request {
1024	    fn from(r: EmergencyrecoverRequest) -> Self {
1025	        Request::EmergencyRecover(r)
1026	    }
1027	}
1028
1029	impl IntoRequest for EmergencyrecoverRequest {
1030	    type Response = super::responses::EmergencyrecoverResponse;
1031	}
1032
1033	impl TypedRequest for EmergencyrecoverRequest {
1034	    type Response = super::responses::EmergencyrecoverResponse;
1035
1036	    fn method(&self) -> &str {
1037	        "emergencyrecover"
1038	    }
1039	}
1040	#[derive(Clone, Debug, Deserialize, Serialize)]
1041	pub struct GetemergencyrecoverdataRequest {
1042	}
1043
1044	impl From<GetemergencyrecoverdataRequest> for Request {
1045	    fn from(r: GetemergencyrecoverdataRequest) -> Self {
1046	        Request::GetEmergencyRecoverData(r)
1047	    }
1048	}
1049
1050	impl IntoRequest for GetemergencyrecoverdataRequest {
1051	    type Response = super::responses::GetemergencyrecoverdataResponse;
1052	}
1053
1054	impl TypedRequest for GetemergencyrecoverdataRequest {
1055	    type Response = super::responses::GetemergencyrecoverdataResponse;
1056
1057	    fn method(&self) -> &str {
1058	        "getemergencyrecoverdata"
1059	    }
1060	}
1061	#[derive(Clone, Debug, Deserialize, Serialize)]
1062	pub struct ExposesecretRequest {
1063	    #[serde(skip_serializing_if = "Option::is_none")]
1064	    pub identifier: Option<String>,
1065	    pub passphrase: String,
1066	}
1067
1068	impl From<ExposesecretRequest> for Request {
1069	    fn from(r: ExposesecretRequest) -> Self {
1070	        Request::ExposeSecret(r)
1071	    }
1072	}
1073
1074	impl IntoRequest for ExposesecretRequest {
1075	    type Response = super::responses::ExposesecretResponse;
1076	}
1077
1078	impl TypedRequest for ExposesecretRequest {
1079	    type Response = super::responses::ExposesecretResponse;
1080
1081	    fn method(&self) -> &str {
1082	        "exposesecret"
1083	    }
1084	}
1085	#[derive(Clone, Debug, Deserialize, Serialize)]
1086	pub struct RecoverRequest {
1087	    pub hsmsecret: String,
1088	}
1089
1090	impl From<RecoverRequest> for Request {
1091	    fn from(r: RecoverRequest) -> Self {
1092	        Request::Recover(r)
1093	    }
1094	}
1095
1096	impl IntoRequest for RecoverRequest {
1097	    type Response = super::responses::RecoverResponse;
1098	}
1099
1100	impl TypedRequest for RecoverRequest {
1101	    type Response = super::responses::RecoverResponse;
1102
1103	    fn method(&self) -> &str {
1104	        "recover"
1105	    }
1106	}
1107	#[derive(Clone, Debug, Deserialize, Serialize)]
1108	pub struct RecoverchannelRequest {
1109	    pub scb: Vec<String>,
1110	}
1111
1112	impl From<RecoverchannelRequest> for Request {
1113	    fn from(r: RecoverchannelRequest) -> Self {
1114	        Request::RecoverChannel(r)
1115	    }
1116	}
1117
1118	impl IntoRequest for RecoverchannelRequest {
1119	    type Response = super::responses::RecoverchannelResponse;
1120	}
1121
1122	impl TypedRequest for RecoverchannelRequest {
1123	    type Response = super::responses::RecoverchannelResponse;
1124
1125	    fn method(&self) -> &str {
1126	        "recoverchannel"
1127	    }
1128	}
1129	#[derive(Clone, Debug, Deserialize, Serialize)]
1130	pub struct InvoiceRequest {
1131	    #[serde(skip_serializing_if = "Option::is_none")]
1132	    pub cltv: Option<u32>,
1133	    #[serde(skip_serializing_if = "Option::is_none")]
1134	    pub deschashonly: Option<bool>,
1135	    #[serde(skip_serializing_if = "Option::is_none")]
1136	    pub expiry: Option<u64>,
1137	    #[serde(skip_serializing_if = "Option::is_none")]
1138	    pub preimage: Option<String>,
1139	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
1140	    pub exposeprivatechannels: Option<Vec<ShortChannelId>>,
1141	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
1142	    pub fallbacks: Option<Vec<String>>,
1143	    pub amount_msat: AmountOrAny,
1144	    pub description: String,
1145	    pub label: String,
1146	}
1147
1148	impl From<InvoiceRequest> for Request {
1149	    fn from(r: InvoiceRequest) -> Self {
1150	        Request::Invoice(r)
1151	    }
1152	}
1153
1154	impl IntoRequest for InvoiceRequest {
1155	    type Response = super::responses::InvoiceResponse;
1156	}
1157
1158	impl TypedRequest for InvoiceRequest {
1159	    type Response = super::responses::InvoiceResponse;
1160
1161	    fn method(&self) -> &str {
1162	        "invoice"
1163	    }
1164	}
1165	#[derive(Clone, Debug, Deserialize, Serialize)]
1166	pub struct InvoicerequestRequest {
1167	    #[serde(skip_serializing_if = "Option::is_none")]
1168	    pub absolute_expiry: Option<u64>,
1169	    #[serde(skip_serializing_if = "Option::is_none")]
1170	    pub issuer: Option<String>,
1171	    #[serde(skip_serializing_if = "Option::is_none")]
1172	    pub label: Option<String>,
1173	    #[serde(skip_serializing_if = "Option::is_none")]
1174	    pub single_use: Option<bool>,
1175	    pub amount: Amount,
1176	    pub description: String,
1177	}
1178
1179	impl From<InvoicerequestRequest> for Request {
1180	    fn from(r: InvoicerequestRequest) -> Self {
1181	        Request::InvoiceRequest(r)
1182	    }
1183	}
1184
1185	impl IntoRequest for InvoicerequestRequest {
1186	    type Response = super::responses::InvoicerequestResponse;
1187	}
1188
1189	impl TypedRequest for InvoicerequestRequest {
1190	    type Response = super::responses::InvoicerequestResponse;
1191
1192	    fn method(&self) -> &str {
1193	        "invoicerequest"
1194	    }
1195	}
1196	#[derive(Clone, Debug, Deserialize, Serialize)]
1197	pub struct DisableinvoicerequestRequest {
1198	    pub invreq_id: String,
1199	}
1200
1201	impl From<DisableinvoicerequestRequest> for Request {
1202	    fn from(r: DisableinvoicerequestRequest) -> Self {
1203	        Request::DisableInvoiceRequest(r)
1204	    }
1205	}
1206
1207	impl IntoRequest for DisableinvoicerequestRequest {
1208	    type Response = super::responses::DisableinvoicerequestResponse;
1209	}
1210
1211	impl TypedRequest for DisableinvoicerequestRequest {
1212	    type Response = super::responses::DisableinvoicerequestResponse;
1213
1214	    fn method(&self) -> &str {
1215	        "disableinvoicerequest"
1216	    }
1217	}
1218	#[derive(Clone, Debug, Deserialize, Serialize)]
1219	pub struct ListinvoicerequestsRequest {
1220	    #[serde(skip_serializing_if = "Option::is_none")]
1221	    pub active_only: Option<bool>,
1222	    #[serde(skip_serializing_if = "Option::is_none")]
1223	    pub invreq_id: Option<String>,
1224	}
1225
1226	impl From<ListinvoicerequestsRequest> for Request {
1227	    fn from(r: ListinvoicerequestsRequest) -> Self {
1228	        Request::ListInvoiceRequests(r)
1229	    }
1230	}
1231
1232	impl IntoRequest for ListinvoicerequestsRequest {
1233	    type Response = super::responses::ListinvoicerequestsResponse;
1234	}
1235
1236	impl TypedRequest for ListinvoicerequestsRequest {
1237	    type Response = super::responses::ListinvoicerequestsResponse;
1238
1239	    fn method(&self) -> &str {
1240	        "listinvoicerequests"
1241	    }
1242	}
1243	#[derive(Clone, Debug, Deserialize, Serialize)]
1244	pub struct ListdatastoreRequest {
1245	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
1246	    pub key: Option<Vec<String>>,
1247	}
1248
1249	impl From<ListdatastoreRequest> for Request {
1250	    fn from(r: ListdatastoreRequest) -> Self {
1251	        Request::ListDatastore(r)
1252	    }
1253	}
1254
1255	impl IntoRequest for ListdatastoreRequest {
1256	    type Response = super::responses::ListdatastoreResponse;
1257	}
1258
1259	impl TypedRequest for ListdatastoreRequest {
1260	    type Response = super::responses::ListdatastoreResponse;
1261
1262	    fn method(&self) -> &str {
1263	        "listdatastore"
1264	    }
1265	}
1266	/// ['If neither *in_channel* nor *out_channel* is specified, it controls ordering.']
1267	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
1268	#[allow(non_camel_case_types)]
1269	pub enum ListinvoicesIndex {
1270	    #[serde(rename = "created")]
1271	    CREATED = 0,
1272	    #[serde(rename = "updated")]
1273	    UPDATED = 1,
1274	}
1275
1276	impl TryFrom<i32> for ListinvoicesIndex {
1277	    type Error = anyhow::Error;
1278	    fn try_from(c: i32) -> Result<ListinvoicesIndex, anyhow::Error> {
1279	        match c {
1280	    0 => Ok(ListinvoicesIndex::CREATED),
1281	    1 => Ok(ListinvoicesIndex::UPDATED),
1282	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListinvoicesIndex", o)),
1283	        }
1284	    }
1285	}
1286
1287	impl ToString for ListinvoicesIndex {
1288	    fn to_string(&self) -> String {
1289	        match self {
1290	            ListinvoicesIndex::CREATED => "CREATED",
1291	            ListinvoicesIndex::UPDATED => "UPDATED",
1292	        }.to_string()
1293	    }
1294	}
1295
1296	#[derive(Clone, Debug, Deserialize, Serialize)]
1297	pub struct ListinvoicesRequest {
1298	    #[serde(skip_serializing_if = "Option::is_none")]
1299	    pub index: Option<ListinvoicesIndex>,
1300	    #[serde(skip_serializing_if = "Option::is_none")]
1301	    pub invstring: Option<String>,
1302	    #[serde(skip_serializing_if = "Option::is_none")]
1303	    pub label: Option<String>,
1304	    #[serde(skip_serializing_if = "Option::is_none")]
1305	    pub limit: Option<u32>,
1306	    #[serde(skip_serializing_if = "Option::is_none")]
1307	    pub offer_id: Option<String>,
1308	    #[serde(skip_serializing_if = "Option::is_none")]
1309	    pub payment_hash: Option<String>,
1310	    #[serde(skip_serializing_if = "Option::is_none")]
1311	    pub start: Option<u64>,
1312	}
1313
1314	impl From<ListinvoicesRequest> for Request {
1315	    fn from(r: ListinvoicesRequest) -> Self {
1316	        Request::ListInvoices(r)
1317	    }
1318	}
1319
1320	impl IntoRequest for ListinvoicesRequest {
1321	    type Response = super::responses::ListinvoicesResponse;
1322	}
1323
1324	impl TypedRequest for ListinvoicesRequest {
1325	    type Response = super::responses::ListinvoicesResponse;
1326
1327	    fn method(&self) -> &str {
1328	        "listinvoices"
1329	    }
1330	}
1331	#[derive(Clone, Debug, Deserialize, Serialize)]
1332	pub struct SendonionFirstHop {
1333	    pub amount_msat: Amount,
1334	    pub delay: u16,
1335	    pub id: PublicKey,
1336	}
1337
1338	#[derive(Clone, Debug, Deserialize, Serialize)]
1339	pub struct SendonionRequest {
1340	    #[serde(skip_serializing_if = "Option::is_none")]
1341	    pub amount_msat: Option<Amount>,
1342	    #[serde(skip_serializing_if = "Option::is_none")]
1343	    pub bolt11: Option<String>,
1344	    #[serde(skip_serializing_if = "Option::is_none")]
1345	    pub description: Option<String>,
1346	    #[serde(skip_serializing_if = "Option::is_none")]
1347	    pub destination: Option<PublicKey>,
1348	    #[serde(skip_serializing_if = "Option::is_none")]
1349	    pub groupid: Option<u64>,
1350	    #[serde(skip_serializing_if = "Option::is_none")]
1351	    pub label: Option<String>,
1352	    #[serde(skip_serializing_if = "Option::is_none")]
1353	    pub localinvreqid: Option<Sha256>,
1354	    #[serde(skip_serializing_if = "Option::is_none")]
1355	    pub partid: Option<u16>,
1356	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
1357	    pub shared_secrets: Option<Vec<Secret>>,
1358	    pub first_hop: SendonionFirstHop,
1359	    pub onion: String,
1360	    pub payment_hash: Sha256,
1361	}
1362
1363	impl From<SendonionRequest> for Request {
1364	    fn from(r: SendonionRequest) -> Self {
1365	        Request::SendOnion(r)
1366	    }
1367	}
1368
1369	impl IntoRequest for SendonionRequest {
1370	    type Response = super::responses::SendonionResponse;
1371	}
1372
1373	impl TypedRequest for SendonionRequest {
1374	    type Response = super::responses::SendonionResponse;
1375
1376	    fn method(&self) -> &str {
1377	        "sendonion"
1378	    }
1379	}
1380	/// ['If neither bolt11 or payment_hash is specified, `index` controls ordering, by `created` (default) or `updated`.']
1381	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
1382	#[allow(non_camel_case_types)]
1383	pub enum ListsendpaysIndex {
1384	    #[serde(rename = "created")]
1385	    CREATED = 0,
1386	    #[serde(rename = "updated")]
1387	    UPDATED = 1,
1388	}
1389
1390	impl TryFrom<i32> for ListsendpaysIndex {
1391	    type Error = anyhow::Error;
1392	    fn try_from(c: i32) -> Result<ListsendpaysIndex, anyhow::Error> {
1393	        match c {
1394	    0 => Ok(ListsendpaysIndex::CREATED),
1395	    1 => Ok(ListsendpaysIndex::UPDATED),
1396	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListsendpaysIndex", o)),
1397	        }
1398	    }
1399	}
1400
1401	impl ToString for ListsendpaysIndex {
1402	    fn to_string(&self) -> String {
1403	        match self {
1404	            ListsendpaysIndex::CREATED => "CREATED",
1405	            ListsendpaysIndex::UPDATED => "UPDATED",
1406	        }.to_string()
1407	    }
1408	}
1409
1410	/// ['Whether the invoice has been paid, pending, or failed.']
1411	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
1412	#[allow(non_camel_case_types)]
1413	pub enum ListsendpaysStatus {
1414	    #[serde(rename = "pending")]
1415	    PENDING = 0,
1416	    #[serde(rename = "complete")]
1417	    COMPLETE = 1,
1418	    #[serde(rename = "failed")]
1419	    FAILED = 2,
1420	}
1421
1422	impl TryFrom<i32> for ListsendpaysStatus {
1423	    type Error = anyhow::Error;
1424	    fn try_from(c: i32) -> Result<ListsendpaysStatus, anyhow::Error> {
1425	        match c {
1426	    0 => Ok(ListsendpaysStatus::PENDING),
1427	    1 => Ok(ListsendpaysStatus::COMPLETE),
1428	    2 => Ok(ListsendpaysStatus::FAILED),
1429	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListsendpaysStatus", o)),
1430	        }
1431	    }
1432	}
1433
1434	impl ToString for ListsendpaysStatus {
1435	    fn to_string(&self) -> String {
1436	        match self {
1437	            ListsendpaysStatus::PENDING => "PENDING",
1438	            ListsendpaysStatus::COMPLETE => "COMPLETE",
1439	            ListsendpaysStatus::FAILED => "FAILED",
1440	        }.to_string()
1441	    }
1442	}
1443
1444	#[derive(Clone, Debug, Deserialize, Serialize)]
1445	pub struct ListsendpaysRequest {
1446	    #[serde(skip_serializing_if = "Option::is_none")]
1447	    pub bolt11: Option<String>,
1448	    #[serde(skip_serializing_if = "Option::is_none")]
1449	    pub index: Option<ListsendpaysIndex>,
1450	    #[serde(skip_serializing_if = "Option::is_none")]
1451	    pub limit: Option<u32>,
1452	    #[serde(skip_serializing_if = "Option::is_none")]
1453	    pub payment_hash: Option<Sha256>,
1454	    #[serde(skip_serializing_if = "Option::is_none")]
1455	    pub start: Option<u64>,
1456	    #[serde(skip_serializing_if = "Option::is_none")]
1457	    pub status: Option<ListsendpaysStatus>,
1458	}
1459
1460	impl From<ListsendpaysRequest> for Request {
1461	    fn from(r: ListsendpaysRequest) -> Self {
1462	        Request::ListSendPays(r)
1463	    }
1464	}
1465
1466	impl IntoRequest for ListsendpaysRequest {
1467	    type Response = super::responses::ListsendpaysResponse;
1468	}
1469
1470	impl TypedRequest for ListsendpaysRequest {
1471	    type Response = super::responses::ListsendpaysResponse;
1472
1473	    fn method(&self) -> &str {
1474	        "listsendpays"
1475	    }
1476	}
1477	#[derive(Clone, Debug, Deserialize, Serialize)]
1478	pub struct ListtransactionsRequest {
1479	}
1480
1481	impl From<ListtransactionsRequest> for Request {
1482	    fn from(r: ListtransactionsRequest) -> Self {
1483	        Request::ListTransactions(r)
1484	    }
1485	}
1486
1487	impl IntoRequest for ListtransactionsRequest {
1488	    type Response = super::responses::ListtransactionsResponse;
1489	}
1490
1491	impl TypedRequest for ListtransactionsRequest {
1492	    type Response = super::responses::ListtransactionsResponse;
1493
1494	    fn method(&self) -> &str {
1495	        "listtransactions"
1496	    }
1497	}
1498	#[derive(Clone, Debug, Deserialize, Serialize)]
1499	pub struct MakesecretRequest {
1500	    #[serde(skip_serializing_if = "Option::is_none")]
1501	    pub hex: Option<String>,
1502	    #[serde(skip_serializing_if = "Option::is_none")]
1503	    pub string: Option<String>,
1504	}
1505
1506	impl From<MakesecretRequest> for Request {
1507	    fn from(r: MakesecretRequest) -> Self {
1508	        Request::MakeSecret(r)
1509	    }
1510	}
1511
1512	impl IntoRequest for MakesecretRequest {
1513	    type Response = super::responses::MakesecretResponse;
1514	}
1515
1516	impl TypedRequest for MakesecretRequest {
1517	    type Response = super::responses::MakesecretResponse;
1518
1519	    fn method(&self) -> &str {
1520	        "makesecret"
1521	    }
1522	}
1523	#[derive(Clone, Debug, Deserialize, Serialize)]
1524	pub struct PayRequest {
1525	    #[serde(skip_serializing_if = "Option::is_none")]
1526	    pub amount_msat: Option<Amount>,
1527	    #[serde(skip_serializing_if = "Option::is_none")]
1528	    pub description: Option<String>,
1529	    #[serde(skip_serializing_if = "Option::is_none")]
1530	    pub exemptfee: Option<Amount>,
1531	    #[serde(skip_serializing_if = "Option::is_none")]
1532	    pub label: Option<String>,
1533	    #[serde(skip_serializing_if = "Option::is_none")]
1534	    pub localinvreqid: Option<String>,
1535	    #[serde(skip_serializing_if = "Option::is_none")]
1536	    pub maxdelay: Option<u16>,
1537	    #[serde(skip_serializing_if = "Option::is_none")]
1538	    pub maxfee: Option<Amount>,
1539	    #[serde(skip_serializing_if = "Option::is_none")]
1540	    pub maxfeepercent: Option<f64>,
1541	    #[serde(skip_serializing_if = "Option::is_none")]
1542	    pub partial_msat: Option<Amount>,
1543	    #[serde(skip_serializing_if = "Option::is_none")]
1544	    pub retry_for: Option<u16>,
1545	    #[serde(skip_serializing_if = "Option::is_none")]
1546	    pub riskfactor: Option<f64>,
1547	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
1548	    pub exclude: Option<Vec<String>>,
1549	    pub bolt11: String,
1550	}
1551
1552	impl From<PayRequest> for Request {
1553	    fn from(r: PayRequest) -> Self {
1554	        Request::Pay(r)
1555	    }
1556	}
1557
1558	impl IntoRequest for PayRequest {
1559	    type Response = super::responses::PayResponse;
1560	}
1561
1562	impl TypedRequest for PayRequest {
1563	    type Response = super::responses::PayResponse;
1564
1565	    fn method(&self) -> &str {
1566	        "pay"
1567	    }
1568	}
1569	#[derive(Clone, Debug, Deserialize, Serialize)]
1570	pub struct ListnodesRequest {
1571	    #[serde(skip_serializing_if = "Option::is_none")]
1572	    pub id: Option<PublicKey>,
1573	}
1574
1575	impl From<ListnodesRequest> for Request {
1576	    fn from(r: ListnodesRequest) -> Self {
1577	        Request::ListNodes(r)
1578	    }
1579	}
1580
1581	impl IntoRequest for ListnodesRequest {
1582	    type Response = super::responses::ListnodesResponse;
1583	}
1584
1585	impl TypedRequest for ListnodesRequest {
1586	    type Response = super::responses::ListnodesResponse;
1587
1588	    fn method(&self) -> &str {
1589	        "listnodes"
1590	    }
1591	}
1592	#[derive(Clone, Debug, Deserialize, Serialize)]
1593	pub struct WaitanyinvoiceRequest {
1594	    #[serde(skip_serializing_if = "Option::is_none")]
1595	    pub lastpay_index: Option<u64>,
1596	    #[serde(skip_serializing_if = "Option::is_none")]
1597	    pub timeout: Option<u64>,
1598	}
1599
1600	impl From<WaitanyinvoiceRequest> for Request {
1601	    fn from(r: WaitanyinvoiceRequest) -> Self {
1602	        Request::WaitAnyInvoice(r)
1603	    }
1604	}
1605
1606	impl IntoRequest for WaitanyinvoiceRequest {
1607	    type Response = super::responses::WaitanyinvoiceResponse;
1608	}
1609
1610	impl TypedRequest for WaitanyinvoiceRequest {
1611	    type Response = super::responses::WaitanyinvoiceResponse;
1612
1613	    fn method(&self) -> &str {
1614	        "waitanyinvoice"
1615	    }
1616	}
1617	#[derive(Clone, Debug, Deserialize, Serialize)]
1618	pub struct WaitinvoiceRequest {
1619	    pub label: String,
1620	}
1621
1622	impl From<WaitinvoiceRequest> for Request {
1623	    fn from(r: WaitinvoiceRequest) -> Self {
1624	        Request::WaitInvoice(r)
1625	    }
1626	}
1627
1628	impl IntoRequest for WaitinvoiceRequest {
1629	    type Response = super::responses::WaitinvoiceResponse;
1630	}
1631
1632	impl TypedRequest for WaitinvoiceRequest {
1633	    type Response = super::responses::WaitinvoiceResponse;
1634
1635	    fn method(&self) -> &str {
1636	        "waitinvoice"
1637	    }
1638	}
1639	#[derive(Clone, Debug, Deserialize, Serialize)]
1640	pub struct WaitsendpayRequest {
1641	    #[serde(skip_serializing_if = "Option::is_none")]
1642	    pub groupid: Option<u64>,
1643	    #[serde(skip_serializing_if = "Option::is_none")]
1644	    pub partid: Option<u64>,
1645	    #[serde(skip_serializing_if = "Option::is_none")]
1646	    pub timeout: Option<u32>,
1647	    pub payment_hash: Sha256,
1648	}
1649
1650	impl From<WaitsendpayRequest> for Request {
1651	    fn from(r: WaitsendpayRequest) -> Self {
1652	        Request::WaitSendPay(r)
1653	    }
1654	}
1655
1656	impl IntoRequest for WaitsendpayRequest {
1657	    type Response = super::responses::WaitsendpayResponse;
1658	}
1659
1660	impl TypedRequest for WaitsendpayRequest {
1661	    type Response = super::responses::WaitsendpayResponse;
1662
1663	    fn method(&self) -> &str {
1664	        "waitsendpay"
1665	    }
1666	}
1667	/// ['It specifies the type of address wanted; currently *bech32* (e.g. `tb1qu9j4lg5f9rgjyfhvfd905vw46eg39czmktxqgg` on bitcoin testnet or `bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej` on bitcoin mainnet), or *p2tr* taproot addresses. The special value *all* generates all known address types for the same underlying key.']
1668	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
1669	#[allow(non_camel_case_types)]
1670	pub enum NewaddrAddresstype {
1671	    #[serde(rename = "bech32")]
1672	    BECH32 = 0,
1673	    #[serde(rename = "all")]
1674	    ALL = 2,
1675	    #[serde(rename = "p2tr")]
1676	    P2TR = 3,
1677	}
1678
1679	impl TryFrom<i32> for NewaddrAddresstype {
1680	    type Error = anyhow::Error;
1681	    fn try_from(c: i32) -> Result<NewaddrAddresstype, anyhow::Error> {
1682	        match c {
1683	    0 => Ok(NewaddrAddresstype::BECH32),
1684	    2 => Ok(NewaddrAddresstype::ALL),
1685	    3 => Ok(NewaddrAddresstype::P2TR),
1686	            o => Err(anyhow::anyhow!("Unknown variant {} for enum NewaddrAddresstype", o)),
1687	        }
1688	    }
1689	}
1690
1691	impl ToString for NewaddrAddresstype {
1692	    fn to_string(&self) -> String {
1693	        match self {
1694	            NewaddrAddresstype::BECH32 => "BECH32",
1695	            NewaddrAddresstype::P2TR => "P2TR",
1696	            NewaddrAddresstype::ALL => "ALL",
1697	        }.to_string()
1698	    }
1699	}
1700
1701	#[derive(Clone, Debug, Deserialize, Serialize)]
1702	pub struct NewaddrRequest {
1703	    #[serde(skip_serializing_if = "Option::is_none")]
1704	    pub addresstype: Option<NewaddrAddresstype>,
1705	}
1706
1707	impl From<NewaddrRequest> for Request {
1708	    fn from(r: NewaddrRequest) -> Self {
1709	        Request::NewAddr(r)
1710	    }
1711	}
1712
1713	impl IntoRequest for NewaddrRequest {
1714	    type Response = super::responses::NewaddrResponse;
1715	}
1716
1717	impl TypedRequest for NewaddrRequest {
1718	    type Response = super::responses::NewaddrResponse;
1719
1720	    fn method(&self) -> &str {
1721	        "newaddr"
1722	    }
1723	}
1724	#[derive(Clone, Debug, Deserialize, Serialize)]
1725	pub struct WithdrawRequest {
1726	    #[serde(skip_serializing_if = "Option::is_none")]
1727	    pub feerate: Option<Feerate>,
1728	    #[serde(skip_serializing_if = "Option::is_none")]
1729	    pub minconf: Option<u16>,
1730	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
1731	    pub utxos: Option<Vec<Outpoint>>,
1732	    pub destination: String,
1733	    pub satoshi: AmountOrAll,
1734	}
1735
1736	impl From<WithdrawRequest> for Request {
1737	    fn from(r: WithdrawRequest) -> Self {
1738	        Request::Withdraw(r)
1739	    }
1740	}
1741
1742	impl IntoRequest for WithdrawRequest {
1743	    type Response = super::responses::WithdrawResponse;
1744	}
1745
1746	impl TypedRequest for WithdrawRequest {
1747	    type Response = super::responses::WithdrawResponse;
1748
1749	    fn method(&self) -> &str {
1750	        "withdraw"
1751	    }
1752	}
1753	#[derive(Clone, Debug, Deserialize, Serialize)]
1754	pub struct KeysendRequest {
1755	    #[serde(skip_serializing_if = "Option::is_none")]
1756	    pub exemptfee: Option<Amount>,
1757	    #[serde(skip_serializing_if = "Option::is_none")]
1758	    pub extratlvs: Option<TlvStream>,
1759	    #[serde(skip_serializing_if = "Option::is_none")]
1760	    pub label: Option<String>,
1761	    #[serde(skip_serializing_if = "Option::is_none")]
1762	    pub maxdelay: Option<u32>,
1763	    #[serde(skip_serializing_if = "Option::is_none")]
1764	    pub maxfee: Option<Amount>,
1765	    #[serde(skip_serializing_if = "Option::is_none")]
1766	    pub maxfeepercent: Option<f64>,
1767	    #[serde(skip_serializing_if = "Option::is_none")]
1768	    pub retry_for: Option<u32>,
1769	    #[serde(skip_serializing_if = "Option::is_none")]
1770	    pub routehints: Option<RoutehintList>,
1771	    pub amount_msat: Amount,
1772	    pub destination: PublicKey,
1773	}
1774
1775	impl From<KeysendRequest> for Request {
1776	    fn from(r: KeysendRequest) -> Self {
1777	        Request::KeySend(r)
1778	    }
1779	}
1780
1781	impl IntoRequest for KeysendRequest {
1782	    type Response = super::responses::KeysendResponse;
1783	}
1784
1785	impl TypedRequest for KeysendRequest {
1786	    type Response = super::responses::KeysendResponse;
1787
1788	    fn method(&self) -> &str {
1789	        "keysend"
1790	    }
1791	}
1792	#[derive(Clone, Debug, Deserialize, Serialize)]
1793	pub struct FundpsbtRequest {
1794	    #[serde(skip_serializing_if = "Option::is_none")]
1795	    pub excess_as_change: Option<bool>,
1796	    #[serde(skip_serializing_if = "Option::is_none")]
1797	    pub locktime: Option<u32>,
1798	    #[serde(skip_serializing_if = "Option::is_none")]
1799	    pub min_witness_weight: Option<u32>,
1800	    #[serde(skip_serializing_if = "Option::is_none")]
1801	    pub minconf: Option<u32>,
1802	    #[serde(skip_serializing_if = "Option::is_none")]
1803	    pub nonwrapped: Option<bool>,
1804	    #[serde(skip_serializing_if = "Option::is_none")]
1805	    pub opening_anchor_channel: Option<bool>,
1806	    #[serde(skip_serializing_if = "Option::is_none")]
1807	    pub reserve: Option<u32>,
1808	    pub feerate: Feerate,
1809	    pub satoshi: AmountOrAll,
1810	    pub startweight: u32,
1811	}
1812
1813	impl From<FundpsbtRequest> for Request {
1814	    fn from(r: FundpsbtRequest) -> Self {
1815	        Request::FundPsbt(r)
1816	    }
1817	}
1818
1819	impl IntoRequest for FundpsbtRequest {
1820	    type Response = super::responses::FundpsbtResponse;
1821	}
1822
1823	impl TypedRequest for FundpsbtRequest {
1824	    type Response = super::responses::FundpsbtResponse;
1825
1826	    fn method(&self) -> &str {
1827	        "fundpsbt"
1828	    }
1829	}
1830	#[derive(Clone, Debug, Deserialize, Serialize)]
1831	pub struct SendpsbtRequest {
1832	    #[serde(skip_serializing_if = "Option::is_none")]
1833	    pub reserve: Option<u32>,
1834	    pub psbt: String,
1835	}
1836
1837	impl From<SendpsbtRequest> for Request {
1838	    fn from(r: SendpsbtRequest) -> Self {
1839	        Request::SendPsbt(r)
1840	    }
1841	}
1842
1843	impl IntoRequest for SendpsbtRequest {
1844	    type Response = super::responses::SendpsbtResponse;
1845	}
1846
1847	impl TypedRequest for SendpsbtRequest {
1848	    type Response = super::responses::SendpsbtResponse;
1849
1850	    fn method(&self) -> &str {
1851	        "sendpsbt"
1852	    }
1853	}
1854	#[derive(Clone, Debug, Deserialize, Serialize)]
1855	pub struct SignpsbtRequest {
1856	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
1857	    pub signonly: Option<Vec<u32>>,
1858	    pub psbt: String,
1859	}
1860
1861	impl From<SignpsbtRequest> for Request {
1862	    fn from(r: SignpsbtRequest) -> Self {
1863	        Request::SignPsbt(r)
1864	    }
1865	}
1866
1867	impl IntoRequest for SignpsbtRequest {
1868	    type Response = super::responses::SignpsbtResponse;
1869	}
1870
1871	impl TypedRequest for SignpsbtRequest {
1872	    type Response = super::responses::SignpsbtResponse;
1873
1874	    fn method(&self) -> &str {
1875	        "signpsbt"
1876	    }
1877	}
1878	#[derive(Clone, Debug, Deserialize, Serialize)]
1879	pub struct UtxopsbtRequest {
1880	    #[serde(skip_serializing_if = "Option::is_none")]
1881	    pub excess_as_change: Option<bool>,
1882	    #[serde(skip_serializing_if = "Option::is_none")]
1883	    pub locktime: Option<u32>,
1884	    #[serde(skip_serializing_if = "Option::is_none")]
1885	    pub min_witness_weight: Option<u32>,
1886	    #[serde(skip_serializing_if = "Option::is_none")]
1887	    pub opening_anchor_channel: Option<bool>,
1888	    #[serde(skip_serializing_if = "Option::is_none")]
1889	    pub reserve: Option<u32>,
1890	    #[serde(skip_serializing_if = "Option::is_none")]
1891	    pub reservedok: Option<bool>,
1892	    pub feerate: Feerate,
1893	    pub satoshi: AmountOrAll,
1894	    pub startweight: u32,
1895	    pub utxos: Vec<Outpoint>,
1896	}
1897
1898	impl From<UtxopsbtRequest> for Request {
1899	    fn from(r: UtxopsbtRequest) -> Self {
1900	        Request::UtxoPsbt(r)
1901	    }
1902	}
1903
1904	impl IntoRequest for UtxopsbtRequest {
1905	    type Response = super::responses::UtxopsbtResponse;
1906	}
1907
1908	impl TypedRequest for UtxopsbtRequest {
1909	    type Response = super::responses::UtxopsbtResponse;
1910
1911	    fn method(&self) -> &str {
1912	        "utxopsbt"
1913	    }
1914	}
1915	#[derive(Clone, Debug, Deserialize, Serialize)]
1916	pub struct TxdiscardRequest {
1917	    pub txid: String,
1918	}
1919
1920	impl From<TxdiscardRequest> for Request {
1921	    fn from(r: TxdiscardRequest) -> Self {
1922	        Request::TxDiscard(r)
1923	    }
1924	}
1925
1926	impl IntoRequest for TxdiscardRequest {
1927	    type Response = super::responses::TxdiscardResponse;
1928	}
1929
1930	impl TypedRequest for TxdiscardRequest {
1931	    type Response = super::responses::TxdiscardResponse;
1932
1933	    fn method(&self) -> &str {
1934	        "txdiscard"
1935	    }
1936	}
1937	#[derive(Clone, Debug, Deserialize, Serialize)]
1938	pub struct TxprepareRequest {
1939	    #[serde(skip_serializing_if = "Option::is_none")]
1940	    pub feerate: Option<Feerate>,
1941	    #[serde(skip_serializing_if = "Option::is_none")]
1942	    pub minconf: Option<u32>,
1943	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
1944	    pub utxos: Option<Vec<Outpoint>>,
1945	    pub outputs: Vec<OutputDesc>,
1946	}
1947
1948	impl From<TxprepareRequest> for Request {
1949	    fn from(r: TxprepareRequest) -> Self {
1950	        Request::TxPrepare(r)
1951	    }
1952	}
1953
1954	impl IntoRequest for TxprepareRequest {
1955	    type Response = super::responses::TxprepareResponse;
1956	}
1957
1958	impl TypedRequest for TxprepareRequest {
1959	    type Response = super::responses::TxprepareResponse;
1960
1961	    fn method(&self) -> &str {
1962	        "txprepare"
1963	    }
1964	}
1965	#[derive(Clone, Debug, Deserialize, Serialize)]
1966	pub struct TxsendRequest {
1967	    pub txid: String,
1968	}
1969
1970	impl From<TxsendRequest> for Request {
1971	    fn from(r: TxsendRequest) -> Self {
1972	        Request::TxSend(r)
1973	    }
1974	}
1975
1976	impl IntoRequest for TxsendRequest {
1977	    type Response = super::responses::TxsendResponse;
1978	}
1979
1980	impl TypedRequest for TxsendRequest {
1981	    type Response = super::responses::TxsendResponse;
1982
1983	    fn method(&self) -> &str {
1984	        "txsend"
1985	    }
1986	}
1987	#[derive(Clone, Debug, Deserialize, Serialize)]
1988	pub struct ListpeerchannelsRequest {
1989	    #[serde(skip_serializing_if = "Option::is_none")]
1990	    pub id: Option<PublicKey>,
1991	}
1992
1993	impl From<ListpeerchannelsRequest> for Request {
1994	    fn from(r: ListpeerchannelsRequest) -> Self {
1995	        Request::ListPeerChannels(r)
1996	    }
1997	}
1998
1999	impl IntoRequest for ListpeerchannelsRequest {
2000	    type Response = super::responses::ListpeerchannelsResponse;
2001	}
2002
2003	impl TypedRequest for ListpeerchannelsRequest {
2004	    type Response = super::responses::ListpeerchannelsResponse;
2005
2006	    fn method(&self) -> &str {
2007	        "listpeerchannels"
2008	    }
2009	}
2010	#[derive(Clone, Debug, Deserialize, Serialize)]
2011	pub struct ListclosedchannelsRequest {
2012	    #[serde(skip_serializing_if = "Option::is_none")]
2013	    pub id: Option<PublicKey>,
2014	}
2015
2016	impl From<ListclosedchannelsRequest> for Request {
2017	    fn from(r: ListclosedchannelsRequest) -> Self {
2018	        Request::ListClosedChannels(r)
2019	    }
2020	}
2021
2022	impl IntoRequest for ListclosedchannelsRequest {
2023	    type Response = super::responses::ListclosedchannelsResponse;
2024	}
2025
2026	impl TypedRequest for ListclosedchannelsRequest {
2027	    type Response = super::responses::ListclosedchannelsResponse;
2028
2029	    fn method(&self) -> &str {
2030	        "listclosedchannels"
2031	    }
2032	}
2033	#[derive(Clone, Debug, Deserialize, Serialize)]
2034	pub struct DecodepayRequest {
2035	    #[serde(skip_serializing_if = "Option::is_none")]
2036	    pub description: Option<String>,
2037	    pub bolt11: String,
2038	}
2039
2040	impl From<DecodepayRequest> for Request {
2041	    fn from(r: DecodepayRequest) -> Self {
2042	        Request::DecodePay(r)
2043	    }
2044	}
2045
2046	impl IntoRequest for DecodepayRequest {
2047	    type Response = super::responses::DecodepayResponse;
2048	}
2049
2050	impl TypedRequest for DecodepayRequest {
2051	    type Response = super::responses::DecodepayResponse;
2052
2053	    fn method(&self) -> &str {
2054	        "decodepay"
2055	    }
2056	}
2057	#[derive(Clone, Debug, Deserialize, Serialize)]
2058	pub struct DecodeRequest {
2059	    pub string: String,
2060	}
2061
2062	impl From<DecodeRequest> for Request {
2063	    fn from(r: DecodeRequest) -> Self {
2064	        Request::Decode(r)
2065	    }
2066	}
2067
2068	impl IntoRequest for DecodeRequest {
2069	    type Response = super::responses::DecodeResponse;
2070	}
2071
2072	impl TypedRequest for DecodeRequest {
2073	    type Response = super::responses::DecodeResponse;
2074
2075	    fn method(&self) -> &str {
2076	        "decode"
2077	    }
2078	}
2079	/// ['Expected status of the payment. Only deletes if the payment status matches. Deleting a `pending` payment will return an error.']
2080	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
2081	#[allow(non_camel_case_types)]
2082	pub enum DelpayStatus {
2083	    #[serde(rename = "complete")]
2084	    COMPLETE = 0,
2085	    #[serde(rename = "failed")]
2086	    FAILED = 1,
2087	}
2088
2089	impl TryFrom<i32> for DelpayStatus {
2090	    type Error = anyhow::Error;
2091	    fn try_from(c: i32) -> Result<DelpayStatus, anyhow::Error> {
2092	        match c {
2093	    0 => Ok(DelpayStatus::COMPLETE),
2094	    1 => Ok(DelpayStatus::FAILED),
2095	            o => Err(anyhow::anyhow!("Unknown variant {} for enum DelpayStatus", o)),
2096	        }
2097	    }
2098	}
2099
2100	impl ToString for DelpayStatus {
2101	    fn to_string(&self) -> String {
2102	        match self {
2103	            DelpayStatus::COMPLETE => "COMPLETE",
2104	            DelpayStatus::FAILED => "FAILED",
2105	        }.to_string()
2106	    }
2107	}
2108
2109	#[derive(Clone, Debug, Deserialize, Serialize)]
2110	pub struct DelpayRequest {
2111	    #[serde(skip_serializing_if = "Option::is_none")]
2112	    pub groupid: Option<u64>,
2113	    #[serde(skip_serializing_if = "Option::is_none")]
2114	    pub partid: Option<u64>,
2115	    // Path `DelPay.status`
2116	    pub status: DelpayStatus,
2117	    pub payment_hash: Sha256,
2118	}
2119
2120	impl From<DelpayRequest> for Request {
2121	    fn from(r: DelpayRequest) -> Self {
2122	        Request::DelPay(r)
2123	    }
2124	}
2125
2126	impl IntoRequest for DelpayRequest {
2127	    type Response = super::responses::DelpayResponse;
2128	}
2129
2130	impl TypedRequest for DelpayRequest {
2131	    type Response = super::responses::DelpayResponse;
2132
2133	    fn method(&self) -> &str {
2134	        "delpay"
2135	    }
2136	}
2137	/// ['The status of the forward to delete. You cannot delete forwards which have status *offered* (i.e. are currently active).']
2138	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
2139	#[allow(non_camel_case_types)]
2140	pub enum DelforwardStatus {
2141	    #[serde(rename = "settled")]
2142	    SETTLED = 0,
2143	    #[serde(rename = "local_failed")]
2144	    LOCAL_FAILED = 1,
2145	    #[serde(rename = "failed")]
2146	    FAILED = 2,
2147	}
2148
2149	impl TryFrom<i32> for DelforwardStatus {
2150	    type Error = anyhow::Error;
2151	    fn try_from(c: i32) -> Result<DelforwardStatus, anyhow::Error> {
2152	        match c {
2153	    0 => Ok(DelforwardStatus::SETTLED),
2154	    1 => Ok(DelforwardStatus::LOCAL_FAILED),
2155	    2 => Ok(DelforwardStatus::FAILED),
2156	            o => Err(anyhow::anyhow!("Unknown variant {} for enum DelforwardStatus", o)),
2157	        }
2158	    }
2159	}
2160
2161	impl ToString for DelforwardStatus {
2162	    fn to_string(&self) -> String {
2163	        match self {
2164	            DelforwardStatus::SETTLED => "SETTLED",
2165	            DelforwardStatus::LOCAL_FAILED => "LOCAL_FAILED",
2166	            DelforwardStatus::FAILED => "FAILED",
2167	        }.to_string()
2168	    }
2169	}
2170
2171	#[derive(Clone, Debug, Deserialize, Serialize)]
2172	pub struct DelforwardRequest {
2173	    // Path `DelForward.status`
2174	    pub status: DelforwardStatus,
2175	    pub in_channel: ShortChannelId,
2176	    pub in_htlc_id: u64,
2177	}
2178
2179	impl From<DelforwardRequest> for Request {
2180	    fn from(r: DelforwardRequest) -> Self {
2181	        Request::DelForward(r)
2182	    }
2183	}
2184
2185	impl IntoRequest for DelforwardRequest {
2186	    type Response = super::responses::DelforwardResponse;
2187	}
2188
2189	impl TypedRequest for DelforwardRequest {
2190	    type Response = super::responses::DelforwardResponse;
2191
2192	    fn method(&self) -> &str {
2193	        "delforward"
2194	    }
2195	}
2196	#[derive(Clone, Debug, Deserialize, Serialize)]
2197	pub struct DisableofferRequest {
2198	    pub offer_id: Sha256,
2199	}
2200
2201	impl From<DisableofferRequest> for Request {
2202	    fn from(r: DisableofferRequest) -> Self {
2203	        Request::DisableOffer(r)
2204	    }
2205	}
2206
2207	impl IntoRequest for DisableofferRequest {
2208	    type Response = super::responses::DisableofferResponse;
2209	}
2210
2211	impl TypedRequest for DisableofferRequest {
2212	    type Response = super::responses::DisableofferResponse;
2213
2214	    fn method(&self) -> &str {
2215	        "disableoffer"
2216	    }
2217	}
2218	#[derive(Clone, Debug, Deserialize, Serialize)]
2219	pub struct EnableofferRequest {
2220	    pub offer_id: Sha256,
2221	}
2222
2223	impl From<EnableofferRequest> for Request {
2224	    fn from(r: EnableofferRequest) -> Self {
2225	        Request::EnableOffer(r)
2226	    }
2227	}
2228
2229	impl IntoRequest for EnableofferRequest {
2230	    type Response = super::responses::EnableofferResponse;
2231	}
2232
2233	impl TypedRequest for EnableofferRequest {
2234	    type Response = super::responses::EnableofferResponse;
2235
2236	    fn method(&self) -> &str {
2237	        "enableoffer"
2238	    }
2239	}
2240	#[derive(Clone, Debug, Deserialize, Serialize)]
2241	pub struct DisconnectRequest {
2242	    #[serde(skip_serializing_if = "Option::is_none")]
2243	    pub force: Option<bool>,
2244	    pub id: PublicKey,
2245	}
2246
2247	impl From<DisconnectRequest> for Request {
2248	    fn from(r: DisconnectRequest) -> Self {
2249	        Request::Disconnect(r)
2250	    }
2251	}
2252
2253	impl IntoRequest for DisconnectRequest {
2254	    type Response = super::responses::DisconnectResponse;
2255	}
2256
2257	impl TypedRequest for DisconnectRequest {
2258	    type Response = super::responses::DisconnectResponse;
2259
2260	    fn method(&self) -> &str {
2261	        "disconnect"
2262	    }
2263	}
2264	/// ['Fee rate style to use. This can be:', '    *perkw* - provide feerate in units of satoshis per 1000 weight (e.g. the minimum fee is usually `253perkw`).', '    *perkb* - provide feerate in units of satoshis per 1000 virtual bytes (eg. the minimum fee is usually `1000perkb`).']
2265	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
2266	#[allow(non_camel_case_types)]
2267	pub enum FeeratesStyle {
2268	    #[serde(rename = "perkb")]
2269	    PERKB = 0,
2270	    #[serde(rename = "perkw")]
2271	    PERKW = 1,
2272	}
2273
2274	impl TryFrom<i32> for FeeratesStyle {
2275	    type Error = anyhow::Error;
2276	    fn try_from(c: i32) -> Result<FeeratesStyle, anyhow::Error> {
2277	        match c {
2278	    0 => Ok(FeeratesStyle::PERKB),
2279	    1 => Ok(FeeratesStyle::PERKW),
2280	            o => Err(anyhow::anyhow!("Unknown variant {} for enum FeeratesStyle", o)),
2281	        }
2282	    }
2283	}
2284
2285	impl ToString for FeeratesStyle {
2286	    fn to_string(&self) -> String {
2287	        match self {
2288	            FeeratesStyle::PERKB => "PERKB",
2289	            FeeratesStyle::PERKW => "PERKW",
2290	        }.to_string()
2291	    }
2292	}
2293
2294	#[derive(Clone, Debug, Deserialize, Serialize)]
2295	pub struct FeeratesRequest {
2296	    // Path `Feerates.style`
2297	    pub style: FeeratesStyle,
2298	}
2299
2300	impl From<FeeratesRequest> for Request {
2301	    fn from(r: FeeratesRequest) -> Self {
2302	        Request::Feerates(r)
2303	    }
2304	}
2305
2306	impl IntoRequest for FeeratesRequest {
2307	    type Response = super::responses::FeeratesResponse;
2308	}
2309
2310	impl TypedRequest for FeeratesRequest {
2311	    type Response = super::responses::FeeratesResponse;
2312
2313	    fn method(&self) -> &str {
2314	        "feerates"
2315	    }
2316	}
2317	#[derive(Clone, Debug, Deserialize, Serialize)]
2318	pub struct FetchinvoiceRequest {
2319	    #[serde(skip_serializing_if = "Option::is_none")]
2320	    pub amount_msat: Option<Amount>,
2321	    #[serde(skip_serializing_if = "Option::is_none")]
2322	    pub bip353: Option<String>,
2323	    #[serde(skip_serializing_if = "Option::is_none")]
2324	    pub payer_metadata: Option<String>,
2325	    #[serde(skip_serializing_if = "Option::is_none")]
2326	    pub payer_note: Option<String>,
2327	    #[serde(skip_serializing_if = "Option::is_none")]
2328	    pub quantity: Option<u64>,
2329	    #[serde(skip_serializing_if = "Option::is_none")]
2330	    pub recurrence_counter: Option<u64>,
2331	    #[serde(skip_serializing_if = "Option::is_none")]
2332	    pub recurrence_label: Option<String>,
2333	    #[serde(skip_serializing_if = "Option::is_none")]
2334	    pub recurrence_start: Option<f64>,
2335	    #[serde(skip_serializing_if = "Option::is_none")]
2336	    pub timeout: Option<f64>,
2337	    pub offer: String,
2338	}
2339
2340	impl From<FetchinvoiceRequest> for Request {
2341	    fn from(r: FetchinvoiceRequest) -> Self {
2342	        Request::FetchInvoice(r)
2343	    }
2344	}
2345
2346	impl IntoRequest for FetchinvoiceRequest {
2347	    type Response = super::responses::FetchinvoiceResponse;
2348	}
2349
2350	impl TypedRequest for FetchinvoiceRequest {
2351	    type Response = super::responses::FetchinvoiceResponse;
2352
2353	    fn method(&self) -> &str {
2354	        "fetchinvoice"
2355	    }
2356	}
2357	#[derive(Clone, Debug, Deserialize, Serialize)]
2358	pub struct FundchannelCancelRequest {
2359	    pub id: PublicKey,
2360	}
2361
2362	impl From<FundchannelCancelRequest> for Request {
2363	    fn from(r: FundchannelCancelRequest) -> Self {
2364	        Request::FundChannelCancel(r)
2365	    }
2366	}
2367
2368	impl IntoRequest for FundchannelCancelRequest {
2369	    type Response = super::responses::FundchannelCancelResponse;
2370	}
2371
2372	impl TypedRequest for FundchannelCancelRequest {
2373	    type Response = super::responses::FundchannelCancelResponse;
2374
2375	    fn method(&self) -> &str {
2376	        "fundchannel_cancel"
2377	    }
2378	}
2379	#[derive(Clone, Debug, Deserialize, Serialize)]
2380	pub struct FundchannelCompleteRequest {
2381	    pub id: PublicKey,
2382	    pub psbt: String,
2383	}
2384
2385	impl From<FundchannelCompleteRequest> for Request {
2386	    fn from(r: FundchannelCompleteRequest) -> Self {
2387	        Request::FundChannelComplete(r)
2388	    }
2389	}
2390
2391	impl IntoRequest for FundchannelCompleteRequest {
2392	    type Response = super::responses::FundchannelCompleteResponse;
2393	}
2394
2395	impl TypedRequest for FundchannelCompleteRequest {
2396	    type Response = super::responses::FundchannelCompleteResponse;
2397
2398	    fn method(&self) -> &str {
2399	        "fundchannel_complete"
2400	    }
2401	}
2402	#[derive(Clone, Debug, Deserialize, Serialize)]
2403	pub struct FundchannelRequest {
2404	    #[serde(skip_serializing_if = "Option::is_none")]
2405	    pub announce: Option<bool>,
2406	    #[serde(skip_serializing_if = "Option::is_none")]
2407	    pub close_to: Option<String>,
2408	    #[serde(skip_serializing_if = "Option::is_none")]
2409	    pub compact_lease: Option<String>,
2410	    #[serde(skip_serializing_if = "Option::is_none")]
2411	    pub feerate: Option<Feerate>,
2412	    #[serde(skip_serializing_if = "Option::is_none")]
2413	    pub minconf: Option<u32>,
2414	    #[serde(skip_serializing_if = "Option::is_none")]
2415	    pub mindepth: Option<u32>,
2416	    #[serde(skip_serializing_if = "Option::is_none")]
2417	    pub push_msat: Option<Amount>,
2418	    #[serde(skip_serializing_if = "Option::is_none")]
2419	    pub request_amt: Option<Amount>,
2420	    #[serde(skip_serializing_if = "Option::is_none")]
2421	    pub reserve: Option<Amount>,
2422	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
2423	    pub channel_type: Option<Vec<u32>>,
2424	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
2425	    pub utxos: Option<Vec<Outpoint>>,
2426	    pub amount: AmountOrAll,
2427	    pub id: PublicKey,
2428	}
2429
2430	impl From<FundchannelRequest> for Request {
2431	    fn from(r: FundchannelRequest) -> Self {
2432	        Request::FundChannel(r)
2433	    }
2434	}
2435
2436	impl IntoRequest for FundchannelRequest {
2437	    type Response = super::responses::FundchannelResponse;
2438	}
2439
2440	impl TypedRequest for FundchannelRequest {
2441	    type Response = super::responses::FundchannelResponse;
2442
2443	    fn method(&self) -> &str {
2444	        "fundchannel"
2445	    }
2446	}
2447	#[derive(Clone, Debug, Deserialize, Serialize)]
2448	pub struct FundchannelStartRequest {
2449	    #[serde(skip_serializing_if = "Option::is_none")]
2450	    pub announce: Option<bool>,
2451	    #[serde(skip_serializing_if = "Option::is_none")]
2452	    pub close_to: Option<String>,
2453	    #[serde(skip_serializing_if = "Option::is_none")]
2454	    pub feerate: Option<Feerate>,
2455	    #[serde(skip_serializing_if = "Option::is_none")]
2456	    pub mindepth: Option<u32>,
2457	    #[serde(skip_serializing_if = "Option::is_none")]
2458	    pub push_msat: Option<Amount>,
2459	    #[serde(skip_serializing_if = "Option::is_none")]
2460	    pub reserve: Option<Amount>,
2461	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
2462	    pub channel_type: Option<Vec<u32>>,
2463	    pub amount: Amount,
2464	    pub id: PublicKey,
2465	}
2466
2467	impl From<FundchannelStartRequest> for Request {
2468	    fn from(r: FundchannelStartRequest) -> Self {
2469	        Request::FundChannelStart(r)
2470	    }
2471	}
2472
2473	impl IntoRequest for FundchannelStartRequest {
2474	    type Response = super::responses::FundchannelStartResponse;
2475	}
2476
2477	impl TypedRequest for FundchannelStartRequest {
2478	    type Response = super::responses::FundchannelStartResponse;
2479
2480	    fn method(&self) -> &str {
2481	        "fundchannel_start"
2482	    }
2483	}
2484	/// ['A string that represents the log level.']
2485	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
2486	#[allow(non_camel_case_types)]
2487	pub enum GetlogLevel {
2488	    #[serde(rename = "broken")]
2489	    BROKEN = 0,
2490	    #[serde(rename = "unusual")]
2491	    UNUSUAL = 1,
2492	    #[serde(rename = "info")]
2493	    INFO = 2,
2494	    #[serde(rename = "debug")]
2495	    DEBUG = 3,
2496	    #[serde(rename = "io")]
2497	    IO = 4,
2498	    #[serde(rename = "trace")]
2499	    TRACE = 5,
2500	}
2501
2502	impl TryFrom<i32> for GetlogLevel {
2503	    type Error = anyhow::Error;
2504	    fn try_from(c: i32) -> Result<GetlogLevel, anyhow::Error> {
2505	        match c {
2506	    0 => Ok(GetlogLevel::BROKEN),
2507	    1 => Ok(GetlogLevel::UNUSUAL),
2508	    2 => Ok(GetlogLevel::INFO),
2509	    3 => Ok(GetlogLevel::DEBUG),
2510	    4 => Ok(GetlogLevel::IO),
2511	    5 => Ok(GetlogLevel::TRACE),
2512	            o => Err(anyhow::anyhow!("Unknown variant {} for enum GetlogLevel", o)),
2513	        }
2514	    }
2515	}
2516
2517	impl ToString for GetlogLevel {
2518	    fn to_string(&self) -> String {
2519	        match self {
2520	            GetlogLevel::BROKEN => "BROKEN",
2521	            GetlogLevel::UNUSUAL => "UNUSUAL",
2522	            GetlogLevel::INFO => "INFO",
2523	            GetlogLevel::DEBUG => "DEBUG",
2524	            GetlogLevel::TRACE => "TRACE",
2525	            GetlogLevel::IO => "IO",
2526	        }.to_string()
2527	    }
2528	}
2529
2530	#[derive(Clone, Debug, Deserialize, Serialize)]
2531	pub struct GetlogRequest {
2532	    #[serde(skip_serializing_if = "Option::is_none")]
2533	    pub level: Option<GetlogLevel>,
2534	}
2535
2536	impl From<GetlogRequest> for Request {
2537	    fn from(r: GetlogRequest) -> Self {
2538	        Request::GetLog(r)
2539	    }
2540	}
2541
2542	impl IntoRequest for GetlogRequest {
2543	    type Response = super::responses::GetlogResponse;
2544	}
2545
2546	impl TypedRequest for GetlogRequest {
2547	    type Response = super::responses::GetlogResponse;
2548
2549	    fn method(&self) -> &str {
2550	        "getlog"
2551	    }
2552	}
2553	/// ['Funder plugin will use to decide how much capital to commit to a v2 open channel request.', 'There are three policy options, detailed below:', '    * `match` -- Contribute *policy_mod* percent of their requested funds. Valid *policy_mod* values are 0 to 200. If this is a channel lease request, we match based on their requested funds. If it is not a channel lease request (and *lease_only* is false), then we match their funding amount. Note: any lease match less than 100 will likely fail, as clients will not accept a lease less than their request.', '    * `available` -- Contribute *policy_mod* percent of our available node wallet funds. Valid *policy_mod* values are 0 to 100.', '    * `fixed` -- Contributes a fixed  *policy_mod* sats to v2 channel open requests.']
2554	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
2555	#[allow(non_camel_case_types)]
2556	pub enum FunderupdatePolicy {
2557	    #[serde(rename = "match")]
2558	    MATCH = 0,
2559	    #[serde(rename = "available")]
2560	    AVAILABLE = 1,
2561	    #[serde(rename = "fixed")]
2562	    FIXED = 2,
2563	}
2564
2565	impl TryFrom<i32> for FunderupdatePolicy {
2566	    type Error = anyhow::Error;
2567	    fn try_from(c: i32) -> Result<FunderupdatePolicy, anyhow::Error> {
2568	        match c {
2569	    0 => Ok(FunderupdatePolicy::MATCH),
2570	    1 => Ok(FunderupdatePolicy::AVAILABLE),
2571	    2 => Ok(FunderupdatePolicy::FIXED),
2572	            o => Err(anyhow::anyhow!("Unknown variant {} for enum FunderupdatePolicy", o)),
2573	        }
2574	    }
2575	}
2576
2577	impl ToString for FunderupdatePolicy {
2578	    fn to_string(&self) -> String {
2579	        match self {
2580	            FunderupdatePolicy::MATCH => "MATCH",
2581	            FunderupdatePolicy::AVAILABLE => "AVAILABLE",
2582	            FunderupdatePolicy::FIXED => "FIXED",
2583	        }.to_string()
2584	    }
2585	}
2586
2587	#[derive(Clone, Debug, Deserialize, Serialize)]
2588	pub struct FunderupdateRequest {
2589	    #[serde(skip_serializing_if = "Option::is_none")]
2590	    pub channel_fee_max_base_msat: Option<Amount>,
2591	    #[serde(skip_serializing_if = "Option::is_none")]
2592	    pub channel_fee_max_proportional_thousandths: Option<u32>,
2593	    #[serde(skip_serializing_if = "Option::is_none")]
2594	    pub compact_lease: Option<String>,
2595	    #[serde(skip_serializing_if = "Option::is_none")]
2596	    pub fund_probability: Option<u32>,
2597	    #[serde(skip_serializing_if = "Option::is_none")]
2598	    pub funding_weight: Option<u32>,
2599	    #[serde(skip_serializing_if = "Option::is_none")]
2600	    pub fuzz_percent: Option<u32>,
2601	    #[serde(skip_serializing_if = "Option::is_none")]
2602	    pub lease_fee_base_msat: Option<Amount>,
2603	    #[serde(skip_serializing_if = "Option::is_none")]
2604	    pub lease_fee_basis: Option<u32>,
2605	    #[serde(skip_serializing_if = "Option::is_none")]
2606	    pub leases_only: Option<bool>,
2607	    #[serde(skip_serializing_if = "Option::is_none")]
2608	    pub max_their_funding_msat: Option<Amount>,
2609	    #[serde(skip_serializing_if = "Option::is_none")]
2610	    pub min_their_funding_msat: Option<Amount>,
2611	    #[serde(skip_serializing_if = "Option::is_none")]
2612	    pub per_channel_max_msat: Option<Amount>,
2613	    #[serde(skip_serializing_if = "Option::is_none")]
2614	    pub per_channel_min_msat: Option<Amount>,
2615	    #[serde(skip_serializing_if = "Option::is_none")]
2616	    pub policy: Option<FunderupdatePolicy>,
2617	    #[serde(skip_serializing_if = "Option::is_none")]
2618	    pub policy_mod: Option<Amount>,
2619	    #[serde(skip_serializing_if = "Option::is_none")]
2620	    pub reserve_tank_msat: Option<Amount>,
2621	}
2622
2623	impl From<FunderupdateRequest> for Request {
2624	    fn from(r: FunderupdateRequest) -> Self {
2625	        Request::FunderUpdate(r)
2626	    }
2627	}
2628
2629	impl IntoRequest for FunderupdateRequest {
2630	    type Response = super::responses::FunderupdateResponse;
2631	}
2632
2633	impl TypedRequest for FunderupdateRequest {
2634	    type Response = super::responses::FunderupdateResponse;
2635
2636	    fn method(&self) -> &str {
2637	        "funderupdate"
2638	    }
2639	}
2640	#[derive(Clone, Debug, Deserialize, Serialize)]
2641	pub struct GetrouteRequest {
2642	    #[serde(skip_serializing_if = "Option::is_none")]
2643	    pub cltv: Option<u32>,
2644	    #[serde(skip_serializing_if = "Option::is_none")]
2645	    pub fromid: Option<PublicKey>,
2646	    #[serde(skip_serializing_if = "Option::is_none")]
2647	    pub fuzzpercent: Option<u32>,
2648	    #[serde(skip_serializing_if = "Option::is_none")]
2649	    pub maxhops: Option<u32>,
2650	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
2651	    pub exclude: Option<Vec<String>>,
2652	    pub amount_msat: Amount,
2653	    pub id: PublicKey,
2654	    pub riskfactor: u64,
2655	}
2656
2657	impl From<GetrouteRequest> for Request {
2658	    fn from(r: GetrouteRequest) -> Self {
2659	        Request::GetRoute(r)
2660	    }
2661	}
2662
2663	impl IntoRequest for GetrouteRequest {
2664	    type Response = super::responses::GetrouteResponse;
2665	}
2666
2667	impl TypedRequest for GetrouteRequest {
2668	    type Response = super::responses::GetrouteResponse;
2669
2670	    fn method(&self) -> &str {
2671	        "getroute"
2672	    }
2673	}
2674	#[derive(Clone, Debug, Deserialize, Serialize)]
2675	pub struct ListaddressesRequest {
2676	    #[serde(skip_serializing_if = "Option::is_none")]
2677	    pub address: Option<String>,
2678	    #[serde(skip_serializing_if = "Option::is_none")]
2679	    pub limit: Option<u32>,
2680	    #[serde(skip_serializing_if = "Option::is_none")]
2681	    pub start: Option<u64>,
2682	}
2683
2684	impl From<ListaddressesRequest> for Request {
2685	    fn from(r: ListaddressesRequest) -> Self {
2686	        Request::ListAddresses(r)
2687	    }
2688	}
2689
2690	impl IntoRequest for ListaddressesRequest {
2691	    type Response = super::responses::ListaddressesResponse;
2692	}
2693
2694	impl TypedRequest for ListaddressesRequest {
2695	    type Response = super::responses::ListaddressesResponse;
2696
2697	    fn method(&self) -> &str {
2698	        "listaddresses"
2699	    }
2700	}
2701	/// ['If neither *in_channel* nor *out_channel* is specified, it controls ordering.']
2702	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
2703	#[allow(non_camel_case_types)]
2704	pub enum ListforwardsIndex {
2705	    #[serde(rename = "created")]
2706	    CREATED = 0,
2707	    #[serde(rename = "updated")]
2708	    UPDATED = 1,
2709	}
2710
2711	impl TryFrom<i32> for ListforwardsIndex {
2712	    type Error = anyhow::Error;
2713	    fn try_from(c: i32) -> Result<ListforwardsIndex, anyhow::Error> {
2714	        match c {
2715	    0 => Ok(ListforwardsIndex::CREATED),
2716	    1 => Ok(ListforwardsIndex::UPDATED),
2717	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListforwardsIndex", o)),
2718	        }
2719	    }
2720	}
2721
2722	impl ToString for ListforwardsIndex {
2723	    fn to_string(&self) -> String {
2724	        match self {
2725	            ListforwardsIndex::CREATED => "CREATED",
2726	            ListforwardsIndex::UPDATED => "UPDATED",
2727	        }.to_string()
2728	    }
2729	}
2730
2731	/// ['If specified, then only the forwards with the given status are returned.']
2732	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
2733	#[allow(non_camel_case_types)]
2734	pub enum ListforwardsStatus {
2735	    #[serde(rename = "offered")]
2736	    OFFERED = 0,
2737	    #[serde(rename = "settled")]
2738	    SETTLED = 1,
2739	    #[serde(rename = "local_failed")]
2740	    LOCAL_FAILED = 2,
2741	    #[serde(rename = "failed")]
2742	    FAILED = 3,
2743	}
2744
2745	impl TryFrom<i32> for ListforwardsStatus {
2746	    type Error = anyhow::Error;
2747	    fn try_from(c: i32) -> Result<ListforwardsStatus, anyhow::Error> {
2748	        match c {
2749	    0 => Ok(ListforwardsStatus::OFFERED),
2750	    1 => Ok(ListforwardsStatus::SETTLED),
2751	    2 => Ok(ListforwardsStatus::LOCAL_FAILED),
2752	    3 => Ok(ListforwardsStatus::FAILED),
2753	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListforwardsStatus", o)),
2754	        }
2755	    }
2756	}
2757
2758	impl ToString for ListforwardsStatus {
2759	    fn to_string(&self) -> String {
2760	        match self {
2761	            ListforwardsStatus::OFFERED => "OFFERED",
2762	            ListforwardsStatus::SETTLED => "SETTLED",
2763	            ListforwardsStatus::LOCAL_FAILED => "LOCAL_FAILED",
2764	            ListforwardsStatus::FAILED => "FAILED",
2765	        }.to_string()
2766	    }
2767	}
2768
2769	#[derive(Clone, Debug, Deserialize, Serialize)]
2770	pub struct ListforwardsRequest {
2771	    #[serde(skip_serializing_if = "Option::is_none")]
2772	    pub in_channel: Option<ShortChannelId>,
2773	    #[serde(skip_serializing_if = "Option::is_none")]
2774	    pub index: Option<ListforwardsIndex>,
2775	    #[serde(skip_serializing_if = "Option::is_none")]
2776	    pub limit: Option<u32>,
2777	    #[serde(skip_serializing_if = "Option::is_none")]
2778	    pub out_channel: Option<ShortChannelId>,
2779	    #[serde(skip_serializing_if = "Option::is_none")]
2780	    pub start: Option<u64>,
2781	    #[serde(skip_serializing_if = "Option::is_none")]
2782	    pub status: Option<ListforwardsStatus>,
2783	}
2784
2785	impl From<ListforwardsRequest> for Request {
2786	    fn from(r: ListforwardsRequest) -> Self {
2787	        Request::ListForwards(r)
2788	    }
2789	}
2790
2791	impl IntoRequest for ListforwardsRequest {
2792	    type Response = super::responses::ListforwardsResponse;
2793	}
2794
2795	impl TypedRequest for ListforwardsRequest {
2796	    type Response = super::responses::ListforwardsResponse;
2797
2798	    fn method(&self) -> &str {
2799	        "listforwards"
2800	    }
2801	}
2802	#[derive(Clone, Debug, Deserialize, Serialize)]
2803	pub struct ListoffersRequest {
2804	    #[serde(skip_serializing_if = "Option::is_none")]
2805	    pub active_only: Option<bool>,
2806	    #[serde(skip_serializing_if = "Option::is_none")]
2807	    pub offer_id: Option<Sha256>,
2808	}
2809
2810	impl From<ListoffersRequest> for Request {
2811	    fn from(r: ListoffersRequest) -> Self {
2812	        Request::ListOffers(r)
2813	    }
2814	}
2815
2816	impl IntoRequest for ListoffersRequest {
2817	    type Response = super::responses::ListoffersResponse;
2818	}
2819
2820	impl TypedRequest for ListoffersRequest {
2821	    type Response = super::responses::ListoffersResponse;
2822
2823	    fn method(&self) -> &str {
2824	        "listoffers"
2825	    }
2826	}
2827	/// ['If neither *in_channel* nor *out_channel* is specified, it controls ordering, by `created` or `updated`.']
2828	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
2829	#[allow(non_camel_case_types)]
2830	pub enum ListpaysIndex {
2831	    #[serde(rename = "created")]
2832	    CREATED = 0,
2833	    #[serde(rename = "updated")]
2834	    UPDATED = 1,
2835	}
2836
2837	impl TryFrom<i32> for ListpaysIndex {
2838	    type Error = anyhow::Error;
2839	    fn try_from(c: i32) -> Result<ListpaysIndex, anyhow::Error> {
2840	        match c {
2841	    0 => Ok(ListpaysIndex::CREATED),
2842	    1 => Ok(ListpaysIndex::UPDATED),
2843	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListpaysIndex", o)),
2844	        }
2845	    }
2846	}
2847
2848	impl ToString for ListpaysIndex {
2849	    fn to_string(&self) -> String {
2850	        match self {
2851	            ListpaysIndex::CREATED => "CREATED",
2852	            ListpaysIndex::UPDATED => "UPDATED",
2853	        }.to_string()
2854	    }
2855	}
2856
2857	/// ['To filter the payment by status.']
2858	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
2859	#[allow(non_camel_case_types)]
2860	pub enum ListpaysStatus {
2861	    #[serde(rename = "pending")]
2862	    PENDING = 0,
2863	    #[serde(rename = "complete")]
2864	    COMPLETE = 1,
2865	    #[serde(rename = "failed")]
2866	    FAILED = 2,
2867	}
2868
2869	impl TryFrom<i32> for ListpaysStatus {
2870	    type Error = anyhow::Error;
2871	    fn try_from(c: i32) -> Result<ListpaysStatus, anyhow::Error> {
2872	        match c {
2873	    0 => Ok(ListpaysStatus::PENDING),
2874	    1 => Ok(ListpaysStatus::COMPLETE),
2875	    2 => Ok(ListpaysStatus::FAILED),
2876	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListpaysStatus", o)),
2877	        }
2878	    }
2879	}
2880
2881	impl ToString for ListpaysStatus {
2882	    fn to_string(&self) -> String {
2883	        match self {
2884	            ListpaysStatus::PENDING => "PENDING",
2885	            ListpaysStatus::COMPLETE => "COMPLETE",
2886	            ListpaysStatus::FAILED => "FAILED",
2887	        }.to_string()
2888	    }
2889	}
2890
2891	#[derive(Clone, Debug, Deserialize, Serialize)]
2892	pub struct ListpaysRequest {
2893	    #[serde(skip_serializing_if = "Option::is_none")]
2894	    pub bolt11: Option<String>,
2895	    #[serde(skip_serializing_if = "Option::is_none")]
2896	    pub index: Option<ListpaysIndex>,
2897	    #[serde(skip_serializing_if = "Option::is_none")]
2898	    pub limit: Option<u32>,
2899	    #[serde(skip_serializing_if = "Option::is_none")]
2900	    pub payment_hash: Option<Sha256>,
2901	    #[serde(skip_serializing_if = "Option::is_none")]
2902	    pub start: Option<u64>,
2903	    #[serde(skip_serializing_if = "Option::is_none")]
2904	    pub status: Option<ListpaysStatus>,
2905	}
2906
2907	impl From<ListpaysRequest> for Request {
2908	    fn from(r: ListpaysRequest) -> Self {
2909	        Request::ListPays(r)
2910	    }
2911	}
2912
2913	impl IntoRequest for ListpaysRequest {
2914	    type Response = super::responses::ListpaysResponse;
2915	}
2916
2917	impl TypedRequest for ListpaysRequest {
2918	    type Response = super::responses::ListpaysResponse;
2919
2920	    fn method(&self) -> &str {
2921	        "listpays"
2922	    }
2923	}
2924	#[derive(Clone, Debug, Deserialize, Serialize)]
2925	pub struct ListhtlcsRequest {
2926	    #[serde(skip_serializing_if = "Option::is_none")]
2927	    pub id: Option<String>,
2928	}
2929
2930	impl From<ListhtlcsRequest> for Request {
2931	    fn from(r: ListhtlcsRequest) -> Self {
2932	        Request::ListHtlcs(r)
2933	    }
2934	}
2935
2936	impl IntoRequest for ListhtlcsRequest {
2937	    type Response = super::responses::ListhtlcsResponse;
2938	}
2939
2940	impl TypedRequest for ListhtlcsRequest {
2941	    type Response = super::responses::ListhtlcsResponse;
2942
2943	    fn method(&self) -> &str {
2944	        "listhtlcs"
2945	    }
2946	}
2947	#[derive(Clone, Debug, Deserialize, Serialize)]
2948	pub struct MultifundchannelDestinations {
2949	    #[serde(skip_serializing_if = "Option::is_none")]
2950	    pub announce: Option<bool>,
2951	    #[serde(skip_serializing_if = "Option::is_none")]
2952	    pub close_to: Option<String>,
2953	    #[serde(skip_serializing_if = "Option::is_none")]
2954	    pub compact_lease: Option<String>,
2955	    #[serde(skip_serializing_if = "Option::is_none")]
2956	    pub mindepth: Option<u32>,
2957	    #[serde(skip_serializing_if = "Option::is_none")]
2958	    pub push_msat: Option<Amount>,
2959	    #[serde(skip_serializing_if = "Option::is_none")]
2960	    pub request_amt: Option<Amount>,
2961	    #[serde(skip_serializing_if = "Option::is_none")]
2962	    pub reserve: Option<Amount>,
2963	    pub amount: AmountOrAll,
2964	    pub id: String,
2965	}
2966
2967	#[derive(Clone, Debug, Deserialize, Serialize)]
2968	pub struct MultifundchannelRequest {
2969	    #[serde(skip_serializing_if = "Option::is_none")]
2970	    pub commitment_feerate: Option<Feerate>,
2971	    #[serde(skip_serializing_if = "Option::is_none")]
2972	    pub feerate: Option<Feerate>,
2973	    #[serde(skip_serializing_if = "Option::is_none")]
2974	    pub minchannels: Option<i64>,
2975	    #[serde(skip_serializing_if = "Option::is_none")]
2976	    pub minconf: Option<i64>,
2977	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
2978	    pub utxos: Option<Vec<Outpoint>>,
2979	    pub destinations: Vec<MultifundchannelDestinations>,
2980	}
2981
2982	impl From<MultifundchannelRequest> for Request {
2983	    fn from(r: MultifundchannelRequest) -> Self {
2984	        Request::MultiFundChannel(r)
2985	    }
2986	}
2987
2988	impl IntoRequest for MultifundchannelRequest {
2989	    type Response = super::responses::MultifundchannelResponse;
2990	}
2991
2992	impl TypedRequest for MultifundchannelRequest {
2993	    type Response = super::responses::MultifundchannelResponse;
2994
2995	    fn method(&self) -> &str {
2996	        "multifundchannel"
2997	    }
2998	}
2999	#[derive(Clone, Debug, Deserialize, Serialize)]
3000	pub struct MultiwithdrawRequest {
3001	    #[serde(skip_serializing_if = "Option::is_none")]
3002	    pub feerate: Option<Feerate>,
3003	    #[serde(skip_serializing_if = "Option::is_none")]
3004	    pub minconf: Option<u32>,
3005	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
3006	    pub utxos: Option<Vec<Outpoint>>,
3007	    pub outputs: Vec<OutputDesc>,
3008	}
3009
3010	impl From<MultiwithdrawRequest> for Request {
3011	    fn from(r: MultiwithdrawRequest) -> Self {
3012	        Request::MultiWithdraw(r)
3013	    }
3014	}
3015
3016	impl IntoRequest for MultiwithdrawRequest {
3017	    type Response = super::responses::MultiwithdrawResponse;
3018	}
3019
3020	impl TypedRequest for MultiwithdrawRequest {
3021	    type Response = super::responses::MultiwithdrawResponse;
3022
3023	    fn method(&self) -> &str {
3024	        "multiwithdraw"
3025	    }
3026	}
3027	#[derive(Clone, Debug, Deserialize, Serialize)]
3028	pub struct OfferRequest {
3029	    #[serde(skip_serializing_if = "Option::is_none")]
3030	    pub absolute_expiry: Option<u64>,
3031	    #[serde(skip_serializing_if = "Option::is_none")]
3032	    pub description: Option<String>,
3033	    #[serde(skip_serializing_if = "Option::is_none")]
3034	    pub issuer: Option<String>,
3035	    #[serde(skip_serializing_if = "Option::is_none")]
3036	    pub label: Option<String>,
3037	    #[serde(skip_serializing_if = "Option::is_none")]
3038	    pub quantity_max: Option<u64>,
3039	    #[serde(skip_serializing_if = "Option::is_none")]
3040	    pub recurrence: Option<String>,
3041	    #[serde(skip_serializing_if = "Option::is_none")]
3042	    pub recurrence_base: Option<String>,
3043	    #[serde(skip_serializing_if = "Option::is_none")]
3044	    pub recurrence_limit: Option<u32>,
3045	    #[serde(skip_serializing_if = "Option::is_none")]
3046	    pub recurrence_paywindow: Option<String>,
3047	    #[serde(skip_serializing_if = "Option::is_none")]
3048	    pub recurrence_start_any_period: Option<bool>,
3049	    #[serde(skip_serializing_if = "Option::is_none")]
3050	    pub single_use: Option<bool>,
3051	    pub amount: String,
3052	}
3053
3054	impl From<OfferRequest> for Request {
3055	    fn from(r: OfferRequest) -> Self {
3056	        Request::Offer(r)
3057	    }
3058	}
3059
3060	impl IntoRequest for OfferRequest {
3061	    type Response = super::responses::OfferResponse;
3062	}
3063
3064	impl TypedRequest for OfferRequest {
3065	    type Response = super::responses::OfferResponse;
3066
3067	    fn method(&self) -> &str {
3068	        "offer"
3069	    }
3070	}
3071	#[derive(Clone, Debug, Deserialize, Serialize)]
3072	pub struct OpenchannelAbortRequest {
3073	    pub channel_id: Sha256,
3074	}
3075
3076	impl From<OpenchannelAbortRequest> for Request {
3077	    fn from(r: OpenchannelAbortRequest) -> Self {
3078	        Request::OpenChannelAbort(r)
3079	    }
3080	}
3081
3082	impl IntoRequest for OpenchannelAbortRequest {
3083	    type Response = super::responses::OpenchannelAbortResponse;
3084	}
3085
3086	impl TypedRequest for OpenchannelAbortRequest {
3087	    type Response = super::responses::OpenchannelAbortResponse;
3088
3089	    fn method(&self) -> &str {
3090	        "openchannel_abort"
3091	    }
3092	}
3093	#[derive(Clone, Debug, Deserialize, Serialize)]
3094	pub struct OpenchannelBumpRequest {
3095	    #[serde(skip_serializing_if = "Option::is_none")]
3096	    pub funding_feerate: Option<Feerate>,
3097	    pub amount: Amount,
3098	    pub channel_id: Sha256,
3099	    pub initialpsbt: String,
3100	}
3101
3102	impl From<OpenchannelBumpRequest> for Request {
3103	    fn from(r: OpenchannelBumpRequest) -> Self {
3104	        Request::OpenChannelBump(r)
3105	    }
3106	}
3107
3108	impl IntoRequest for OpenchannelBumpRequest {
3109	    type Response = super::responses::OpenchannelBumpResponse;
3110	}
3111
3112	impl TypedRequest for OpenchannelBumpRequest {
3113	    type Response = super::responses::OpenchannelBumpResponse;
3114
3115	    fn method(&self) -> &str {
3116	        "openchannel_bump"
3117	    }
3118	}
3119	#[derive(Clone, Debug, Deserialize, Serialize)]
3120	pub struct OpenchannelInitRequest {
3121	    #[serde(skip_serializing_if = "Option::is_none")]
3122	    pub announce: Option<bool>,
3123	    #[serde(skip_serializing_if = "Option::is_none")]
3124	    pub close_to: Option<String>,
3125	    #[serde(skip_serializing_if = "Option::is_none")]
3126	    pub commitment_feerate: Option<Feerate>,
3127	    #[serde(skip_serializing_if = "Option::is_none")]
3128	    pub compact_lease: Option<String>,
3129	    #[serde(skip_serializing_if = "Option::is_none")]
3130	    pub funding_feerate: Option<Feerate>,
3131	    #[serde(skip_serializing_if = "Option::is_none")]
3132	    pub request_amt: Option<Amount>,
3133	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
3134	    pub channel_type: Option<Vec<u32>>,
3135	    pub amount: Amount,
3136	    pub id: PublicKey,
3137	    pub initialpsbt: String,
3138	}
3139
3140	impl From<OpenchannelInitRequest> for Request {
3141	    fn from(r: OpenchannelInitRequest) -> Self {
3142	        Request::OpenChannelInit(r)
3143	    }
3144	}
3145
3146	impl IntoRequest for OpenchannelInitRequest {
3147	    type Response = super::responses::OpenchannelInitResponse;
3148	}
3149
3150	impl TypedRequest for OpenchannelInitRequest {
3151	    type Response = super::responses::OpenchannelInitResponse;
3152
3153	    fn method(&self) -> &str {
3154	        "openchannel_init"
3155	    }
3156	}
3157	#[derive(Clone, Debug, Deserialize, Serialize)]
3158	pub struct OpenchannelSignedRequest {
3159	    pub channel_id: Sha256,
3160	    pub signed_psbt: String,
3161	}
3162
3163	impl From<OpenchannelSignedRequest> for Request {
3164	    fn from(r: OpenchannelSignedRequest) -> Self {
3165	        Request::OpenChannelSigned(r)
3166	    }
3167	}
3168
3169	impl IntoRequest for OpenchannelSignedRequest {
3170	    type Response = super::responses::OpenchannelSignedResponse;
3171	}
3172
3173	impl TypedRequest for OpenchannelSignedRequest {
3174	    type Response = super::responses::OpenchannelSignedResponse;
3175
3176	    fn method(&self) -> &str {
3177	        "openchannel_signed"
3178	    }
3179	}
3180	#[derive(Clone, Debug, Deserialize, Serialize)]
3181	pub struct OpenchannelUpdateRequest {
3182	    pub channel_id: Sha256,
3183	    pub psbt: String,
3184	}
3185
3186	impl From<OpenchannelUpdateRequest> for Request {
3187	    fn from(r: OpenchannelUpdateRequest) -> Self {
3188	        Request::OpenChannelUpdate(r)
3189	    }
3190	}
3191
3192	impl IntoRequest for OpenchannelUpdateRequest {
3193	    type Response = super::responses::OpenchannelUpdateResponse;
3194	}
3195
3196	impl TypedRequest for OpenchannelUpdateRequest {
3197	    type Response = super::responses::OpenchannelUpdateResponse;
3198
3199	    fn method(&self) -> &str {
3200	        "openchannel_update"
3201	    }
3202	}
3203	#[derive(Clone, Debug, Deserialize, Serialize)]
3204	pub struct PingRequest {
3205	    #[serde(skip_serializing_if = "Option::is_none")]
3206	    pub len: Option<u16>,
3207	    #[serde(skip_serializing_if = "Option::is_none")]
3208	    pub pongbytes: Option<u16>,
3209	    pub id: PublicKey,
3210	}
3211
3212	impl From<PingRequest> for Request {
3213	    fn from(r: PingRequest) -> Self {
3214	        Request::Ping(r)
3215	    }
3216	}
3217
3218	impl IntoRequest for PingRequest {
3219	    type Response = super::responses::PingResponse;
3220	}
3221
3222	impl TypedRequest for PingRequest {
3223	    type Response = super::responses::PingResponse;
3224
3225	    fn method(&self) -> &str {
3226	        "ping"
3227	    }
3228	}
3229	#[derive(Clone, Debug, Deserialize, Serialize)]
3230	pub struct PluginRequest {
3231	    #[serde(skip_serializing_if = "Option::is_none")]
3232	    pub directory: Option<String>,
3233	    #[serde(skip_serializing_if = "Option::is_none")]
3234	    pub plugin: Option<String>,
3235	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
3236	    pub options: Option<Vec<String>>,
3237	    // Path `Plugin.subcommand`
3238	    pub subcommand: PluginSubcommand,
3239	}
3240
3241	impl From<PluginRequest> for Request {
3242	    fn from(r: PluginRequest) -> Self {
3243	        Request::Plugin(r)
3244	    }
3245	}
3246
3247	impl IntoRequest for PluginRequest {
3248	    type Response = super::responses::PluginResponse;
3249	}
3250
3251	impl TypedRequest for PluginRequest {
3252	    type Response = super::responses::PluginResponse;
3253
3254	    fn method(&self) -> &str {
3255	        "plugin"
3256	    }
3257	}
3258	#[derive(Clone, Debug, Deserialize, Serialize)]
3259	pub struct RenepaystatusRequest {
3260	    #[serde(skip_serializing_if = "Option::is_none")]
3261	    pub invstring: Option<String>,
3262	}
3263
3264	impl From<RenepaystatusRequest> for Request {
3265	    fn from(r: RenepaystatusRequest) -> Self {
3266	        Request::RenePayStatus(r)
3267	    }
3268	}
3269
3270	impl IntoRequest for RenepaystatusRequest {
3271	    type Response = super::responses::RenepaystatusResponse;
3272	}
3273
3274	impl TypedRequest for RenepaystatusRequest {
3275	    type Response = super::responses::RenepaystatusResponse;
3276
3277	    fn method(&self) -> &str {
3278	        "renepaystatus"
3279	    }
3280	}
3281	#[derive(Clone, Debug, Deserialize, Serialize)]
3282	pub struct RenepayRequest {
3283	    #[serde(skip_serializing_if = "Option::is_none")]
3284	    pub amount_msat: Option<Amount>,
3285	    #[serde(skip_serializing_if = "Option::is_none")]
3286	    pub description: Option<String>,
3287	    #[serde(skip_serializing_if = "Option::is_none")]
3288	    pub dev_use_shadow: Option<bool>,
3289	    #[serde(skip_serializing_if = "Option::is_none")]
3290	    pub label: Option<String>,
3291	    #[serde(skip_serializing_if = "Option::is_none")]
3292	    pub maxdelay: Option<u32>,
3293	    #[serde(skip_serializing_if = "Option::is_none")]
3294	    pub maxfee: Option<Amount>,
3295	    #[serde(skip_serializing_if = "Option::is_none")]
3296	    pub retry_for: Option<u32>,
3297	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
3298	    pub exclude: Option<Vec<String>>,
3299	    pub invstring: String,
3300	}
3301
3302	impl From<RenepayRequest> for Request {
3303	    fn from(r: RenepayRequest) -> Self {
3304	        Request::RenePay(r)
3305	    }
3306	}
3307
3308	impl IntoRequest for RenepayRequest {
3309	    type Response = super::responses::RenepayResponse;
3310	}
3311
3312	impl TypedRequest for RenepayRequest {
3313	    type Response = super::responses::RenepayResponse;
3314
3315	    fn method(&self) -> &str {
3316	        "renepay"
3317	    }
3318	}
3319	#[derive(Clone, Debug, Deserialize, Serialize)]
3320	pub struct ReserveinputsRequest {
3321	    #[serde(skip_serializing_if = "Option::is_none")]
3322	    pub exclusive: Option<bool>,
3323	    #[serde(skip_serializing_if = "Option::is_none")]
3324	    pub reserve: Option<u32>,
3325	    pub psbt: String,
3326	}
3327
3328	impl From<ReserveinputsRequest> for Request {
3329	    fn from(r: ReserveinputsRequest) -> Self {
3330	        Request::ReserveInputs(r)
3331	    }
3332	}
3333
3334	impl IntoRequest for ReserveinputsRequest {
3335	    type Response = super::responses::ReserveinputsResponse;
3336	}
3337
3338	impl TypedRequest for ReserveinputsRequest {
3339	    type Response = super::responses::ReserveinputsResponse;
3340
3341	    fn method(&self) -> &str {
3342	        "reserveinputs"
3343	    }
3344	}
3345	#[derive(Clone, Debug, Deserialize, Serialize)]
3346	pub struct SendcustommsgRequest {
3347	    pub msg: String,
3348	    pub node_id: PublicKey,
3349	}
3350
3351	impl From<SendcustommsgRequest> for Request {
3352	    fn from(r: SendcustommsgRequest) -> Self {
3353	        Request::SendCustomMsg(r)
3354	    }
3355	}
3356
3357	impl IntoRequest for SendcustommsgRequest {
3358	    type Response = super::responses::SendcustommsgResponse;
3359	}
3360
3361	impl TypedRequest for SendcustommsgRequest {
3362	    type Response = super::responses::SendcustommsgResponse;
3363
3364	    fn method(&self) -> &str {
3365	        "sendcustommsg"
3366	    }
3367	}
3368	#[derive(Clone, Debug, Deserialize, Serialize)]
3369	pub struct SendinvoiceRequest {
3370	    #[serde(skip_serializing_if = "Option::is_none")]
3371	    pub amount_msat: Option<Amount>,
3372	    #[serde(skip_serializing_if = "Option::is_none")]
3373	    pub quantity: Option<u64>,
3374	    #[serde(skip_serializing_if = "Option::is_none")]
3375	    pub timeout: Option<u32>,
3376	    pub invreq: String,
3377	    pub label: String,
3378	}
3379
3380	impl From<SendinvoiceRequest> for Request {
3381	    fn from(r: SendinvoiceRequest) -> Self {
3382	        Request::SendInvoice(r)
3383	    }
3384	}
3385
3386	impl IntoRequest for SendinvoiceRequest {
3387	    type Response = super::responses::SendinvoiceResponse;
3388	}
3389
3390	impl TypedRequest for SendinvoiceRequest {
3391	    type Response = super::responses::SendinvoiceResponse;
3392
3393	    fn method(&self) -> &str {
3394	        "sendinvoice"
3395	    }
3396	}
3397	#[derive(Clone, Debug, Deserialize, Serialize)]
3398	pub struct SetchannelRequest {
3399	    #[serde(skip_serializing_if = "Option::is_none")]
3400	    pub enforcedelay: Option<u32>,
3401	    #[serde(skip_serializing_if = "Option::is_none")]
3402	    pub feebase: Option<Amount>,
3403	    #[serde(skip_serializing_if = "Option::is_none")]
3404	    pub feeppm: Option<u32>,
3405	    #[serde(skip_serializing_if = "Option::is_none")]
3406	    pub htlcmax: Option<Amount>,
3407	    #[serde(skip_serializing_if = "Option::is_none")]
3408	    pub htlcmin: Option<Amount>,
3409	    #[serde(skip_serializing_if = "Option::is_none")]
3410	    pub ignorefeelimits: Option<bool>,
3411	    pub id: String,
3412	}
3413
3414	impl From<SetchannelRequest> for Request {
3415	    fn from(r: SetchannelRequest) -> Self {
3416	        Request::SetChannel(r)
3417	    }
3418	}
3419
3420	impl IntoRequest for SetchannelRequest {
3421	    type Response = super::responses::SetchannelResponse;
3422	}
3423
3424	impl TypedRequest for SetchannelRequest {
3425	    type Response = super::responses::SetchannelResponse;
3426
3427	    fn method(&self) -> &str {
3428	        "setchannel"
3429	    }
3430	}
3431	#[derive(Clone, Debug, Deserialize, Serialize)]
3432	pub struct SetconfigRequest {
3433	    #[serde(skip_serializing_if = "Option::is_none")]
3434	    pub transient: Option<bool>,
3435	    #[serde(skip_serializing_if = "Option::is_none")]
3436	    pub val: Option<String>,
3437	    pub config: String,
3438	}
3439
3440	impl From<SetconfigRequest> for Request {
3441	    fn from(r: SetconfigRequest) -> Self {
3442	        Request::SetConfig(r)
3443	    }
3444	}
3445
3446	impl IntoRequest for SetconfigRequest {
3447	    type Response = super::responses::SetconfigResponse;
3448	}
3449
3450	impl TypedRequest for SetconfigRequest {
3451	    type Response = super::responses::SetconfigResponse;
3452
3453	    fn method(&self) -> &str {
3454	        "setconfig"
3455	    }
3456	}
3457	#[derive(Clone, Debug, Deserialize, Serialize)]
3458	pub struct SetpsbtversionRequest {
3459	    pub psbt: String,
3460	    pub version: u32,
3461	}
3462
3463	impl From<SetpsbtversionRequest> for Request {
3464	    fn from(r: SetpsbtversionRequest) -> Self {
3465	        Request::SetPsbtVersion(r)
3466	    }
3467	}
3468
3469	impl IntoRequest for SetpsbtversionRequest {
3470	    type Response = super::responses::SetpsbtversionResponse;
3471	}
3472
3473	impl TypedRequest for SetpsbtversionRequest {
3474	    type Response = super::responses::SetpsbtversionResponse;
3475
3476	    fn method(&self) -> &str {
3477	        "setpsbtversion"
3478	    }
3479	}
3480	#[derive(Clone, Debug, Deserialize, Serialize)]
3481	pub struct SigninvoiceRequest {
3482	    pub invstring: String,
3483	}
3484
3485	impl From<SigninvoiceRequest> for Request {
3486	    fn from(r: SigninvoiceRequest) -> Self {
3487	        Request::SignInvoice(r)
3488	    }
3489	}
3490
3491	impl IntoRequest for SigninvoiceRequest {
3492	    type Response = super::responses::SigninvoiceResponse;
3493	}
3494
3495	impl TypedRequest for SigninvoiceRequest {
3496	    type Response = super::responses::SigninvoiceResponse;
3497
3498	    fn method(&self) -> &str {
3499	        "signinvoice"
3500	    }
3501	}
3502	#[derive(Clone, Debug, Deserialize, Serialize)]
3503	pub struct SignmessageRequest {
3504	    pub message: String,
3505	}
3506
3507	impl From<SignmessageRequest> for Request {
3508	    fn from(r: SignmessageRequest) -> Self {
3509	        Request::SignMessage(r)
3510	    }
3511	}
3512
3513	impl IntoRequest for SignmessageRequest {
3514	    type Response = super::responses::SignmessageResponse;
3515	}
3516
3517	impl TypedRequest for SignmessageRequest {
3518	    type Response = super::responses::SignmessageResponse;
3519
3520	    fn method(&self) -> &str {
3521	        "signmessage"
3522	    }
3523	}
3524	#[derive(Clone, Debug, Deserialize, Serialize)]
3525	pub struct SpliceInitRequest {
3526	    #[serde(skip_serializing_if = "Option::is_none")]
3527	    pub feerate_per_kw: Option<u32>,
3528	    #[serde(skip_serializing_if = "Option::is_none")]
3529	    pub force_feerate: Option<bool>,
3530	    #[serde(skip_serializing_if = "Option::is_none")]
3531	    pub initialpsbt: Option<String>,
3532	    pub channel_id: Sha256,
3533	    pub relative_amount: i64,
3534	}
3535
3536	impl From<SpliceInitRequest> for Request {
3537	    fn from(r: SpliceInitRequest) -> Self {
3538	        Request::SpliceInit(r)
3539	    }
3540	}
3541
3542	impl IntoRequest for SpliceInitRequest {
3543	    type Response = super::responses::SpliceInitResponse;
3544	}
3545
3546	impl TypedRequest for SpliceInitRequest {
3547	    type Response = super::responses::SpliceInitResponse;
3548
3549	    fn method(&self) -> &str {
3550	        "splice_init"
3551	    }
3552	}
3553	#[derive(Clone, Debug, Deserialize, Serialize)]
3554	pub struct SpliceSignedRequest {
3555	    #[serde(skip_serializing_if = "Option::is_none")]
3556	    pub sign_first: Option<bool>,
3557	    pub channel_id: Sha256,
3558	    pub psbt: String,
3559	}
3560
3561	impl From<SpliceSignedRequest> for Request {
3562	    fn from(r: SpliceSignedRequest) -> Self {
3563	        Request::SpliceSigned(r)
3564	    }
3565	}
3566
3567	impl IntoRequest for SpliceSignedRequest {
3568	    type Response = super::responses::SpliceSignedResponse;
3569	}
3570
3571	impl TypedRequest for SpliceSignedRequest {
3572	    type Response = super::responses::SpliceSignedResponse;
3573
3574	    fn method(&self) -> &str {
3575	        "splice_signed"
3576	    }
3577	}
3578	#[derive(Clone, Debug, Deserialize, Serialize)]
3579	pub struct SpliceUpdateRequest {
3580	    pub channel_id: Sha256,
3581	    pub psbt: String,
3582	}
3583
3584	impl From<SpliceUpdateRequest> for Request {
3585	    fn from(r: SpliceUpdateRequest) -> Self {
3586	        Request::SpliceUpdate(r)
3587	    }
3588	}
3589
3590	impl IntoRequest for SpliceUpdateRequest {
3591	    type Response = super::responses::SpliceUpdateResponse;
3592	}
3593
3594	impl TypedRequest for SpliceUpdateRequest {
3595	    type Response = super::responses::SpliceUpdateResponse;
3596
3597	    fn method(&self) -> &str {
3598	        "splice_update"
3599	    }
3600	}
3601	#[derive(Clone, Debug, Deserialize, Serialize)]
3602	pub struct DevspliceRequest {
3603	    #[serde(rename = "dev-wetrun")]
3604	    #[serde(skip_serializing_if = "Option::is_none")]
3605	    pub dev_wetrun: Option<bool>,
3606	    #[serde(skip_serializing_if = "Option::is_none")]
3607	    pub debug_log: Option<bool>,
3608	    #[serde(skip_serializing_if = "Option::is_none")]
3609	    pub dryrun: Option<bool>,
3610	    #[serde(skip_serializing_if = "Option::is_none")]
3611	    pub force_feerate: Option<bool>,
3612	    pub script_or_json: String,
3613	}
3614
3615	impl From<DevspliceRequest> for Request {
3616	    fn from(r: DevspliceRequest) -> Self {
3617	        Request::DevSplice(r)
3618	    }
3619	}
3620
3621	impl IntoRequest for DevspliceRequest {
3622	    type Response = super::responses::DevspliceResponse;
3623	}
3624
3625	impl TypedRequest for DevspliceRequest {
3626	    type Response = super::responses::DevspliceResponse;
3627
3628	    fn method(&self) -> &str {
3629	        "dev-splice"
3630	    }
3631	}
3632	#[derive(Clone, Debug, Deserialize, Serialize)]
3633	pub struct UnreserveinputsRequest {
3634	    #[serde(skip_serializing_if = "Option::is_none")]
3635	    pub reserve: Option<u32>,
3636	    pub psbt: String,
3637	}
3638
3639	impl From<UnreserveinputsRequest> for Request {
3640	    fn from(r: UnreserveinputsRequest) -> Self {
3641	        Request::UnreserveInputs(r)
3642	    }
3643	}
3644
3645	impl IntoRequest for UnreserveinputsRequest {
3646	    type Response = super::responses::UnreserveinputsResponse;
3647	}
3648
3649	impl TypedRequest for UnreserveinputsRequest {
3650	    type Response = super::responses::UnreserveinputsResponse;
3651
3652	    fn method(&self) -> &str {
3653	        "unreserveinputs"
3654	    }
3655	}
3656	#[derive(Clone, Debug, Deserialize, Serialize)]
3657	pub struct UpgradewalletRequest {
3658	    #[serde(skip_serializing_if = "Option::is_none")]
3659	    pub feerate: Option<Feerate>,
3660	    #[serde(skip_serializing_if = "Option::is_none")]
3661	    pub reservedok: Option<bool>,
3662	}
3663
3664	impl From<UpgradewalletRequest> for Request {
3665	    fn from(r: UpgradewalletRequest) -> Self {
3666	        Request::UpgradeWallet(r)
3667	    }
3668	}
3669
3670	impl IntoRequest for UpgradewalletRequest {
3671	    type Response = super::responses::UpgradewalletResponse;
3672	}
3673
3674	impl TypedRequest for UpgradewalletRequest {
3675	    type Response = super::responses::UpgradewalletResponse;
3676
3677	    fn method(&self) -> &str {
3678	        "upgradewallet"
3679	    }
3680	}
3681	#[derive(Clone, Debug, Deserialize, Serialize)]
3682	pub struct WaitblockheightRequest {
3683	    #[serde(skip_serializing_if = "Option::is_none")]
3684	    pub timeout: Option<u32>,
3685	    pub blockheight: u32,
3686	}
3687
3688	impl From<WaitblockheightRequest> for Request {
3689	    fn from(r: WaitblockheightRequest) -> Self {
3690	        Request::WaitBlockHeight(r)
3691	    }
3692	}
3693
3694	impl IntoRequest for WaitblockheightRequest {
3695	    type Response = super::responses::WaitblockheightResponse;
3696	}
3697
3698	impl TypedRequest for WaitblockheightRequest {
3699	    type Response = super::responses::WaitblockheightResponse;
3700
3701	    fn method(&self) -> &str {
3702	        "waitblockheight"
3703	    }
3704	}
3705	/// ['The name of the index to get the next value for.', '  `created` is incremented by one for every new object.', '  `updated` is incremented by one every time an object is changed.', '  `deleted` is incremented by one every time an object is deleted.']
3706	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
3707	#[allow(non_camel_case_types)]
3708	pub enum WaitIndexname {
3709	    #[serde(rename = "created")]
3710	    CREATED = 0,
3711	    #[serde(rename = "updated")]
3712	    UPDATED = 1,
3713	    #[serde(rename = "deleted")]
3714	    DELETED = 2,
3715	}
3716
3717	impl TryFrom<i32> for WaitIndexname {
3718	    type Error = anyhow::Error;
3719	    fn try_from(c: i32) -> Result<WaitIndexname, anyhow::Error> {
3720	        match c {
3721	    0 => Ok(WaitIndexname::CREATED),
3722	    1 => Ok(WaitIndexname::UPDATED),
3723	    2 => Ok(WaitIndexname::DELETED),
3724	            o => Err(anyhow::anyhow!("Unknown variant {} for enum WaitIndexname", o)),
3725	        }
3726	    }
3727	}
3728
3729	impl ToString for WaitIndexname {
3730	    fn to_string(&self) -> String {
3731	        match self {
3732	            WaitIndexname::CREATED => "CREATED",
3733	            WaitIndexname::UPDATED => "UPDATED",
3734	            WaitIndexname::DELETED => "DELETED",
3735	        }.to_string()
3736	    }
3737	}
3738
3739	/// ['The subsystem to get the next index value from.', '  `invoices`: corresponding to `listinvoices` (added in *v23.08*).', '  `sendpays`: corresponding to `listsendpays` (added in *v23.11*).', '  `forwards`: corresponding to `listforwards` (added in *v23.11*).']
3740	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
3741	#[allow(non_camel_case_types)]
3742	pub enum WaitSubsystem {
3743	    #[serde(rename = "invoices")]
3744	    INVOICES = 0,
3745	    #[serde(rename = "forwards")]
3746	    FORWARDS = 1,
3747	    #[serde(rename = "sendpays")]
3748	    SENDPAYS = 2,
3749	}
3750
3751	impl TryFrom<i32> for WaitSubsystem {
3752	    type Error = anyhow::Error;
3753	    fn try_from(c: i32) -> Result<WaitSubsystem, anyhow::Error> {
3754	        match c {
3755	    0 => Ok(WaitSubsystem::INVOICES),
3756	    1 => Ok(WaitSubsystem::FORWARDS),
3757	    2 => Ok(WaitSubsystem::SENDPAYS),
3758	            o => Err(anyhow::anyhow!("Unknown variant {} for enum WaitSubsystem", o)),
3759	        }
3760	    }
3761	}
3762
3763	impl ToString for WaitSubsystem {
3764	    fn to_string(&self) -> String {
3765	        match self {
3766	            WaitSubsystem::INVOICES => "INVOICES",
3767	            WaitSubsystem::FORWARDS => "FORWARDS",
3768	            WaitSubsystem::SENDPAYS => "SENDPAYS",
3769	        }.to_string()
3770	    }
3771	}
3772
3773	#[derive(Clone, Debug, Deserialize, Serialize)]
3774	pub struct WaitRequest {
3775	    // Path `Wait.indexname`
3776	    pub indexname: WaitIndexname,
3777	    // Path `Wait.subsystem`
3778	    pub subsystem: WaitSubsystem,
3779	    pub nextvalue: u64,
3780	}
3781
3782	impl From<WaitRequest> for Request {
3783	    fn from(r: WaitRequest) -> Self {
3784	        Request::Wait(r)
3785	    }
3786	}
3787
3788	impl IntoRequest for WaitRequest {
3789	    type Response = super::responses::WaitResponse;
3790	}
3791
3792	impl TypedRequest for WaitRequest {
3793	    type Response = super::responses::WaitResponse;
3794
3795	    fn method(&self) -> &str {
3796	        "wait"
3797	    }
3798	}
3799	#[derive(Clone, Debug, Deserialize, Serialize)]
3800	pub struct ListconfigsRequest {
3801	    #[serde(skip_serializing_if = "Option::is_none")]
3802	    pub config: Option<String>,
3803	}
3804
3805	impl From<ListconfigsRequest> for Request {
3806	    fn from(r: ListconfigsRequest) -> Self {
3807	        Request::ListConfigs(r)
3808	    }
3809	}
3810
3811	impl IntoRequest for ListconfigsRequest {
3812	    type Response = super::responses::ListconfigsResponse;
3813	}
3814
3815	impl TypedRequest for ListconfigsRequest {
3816	    type Response = super::responses::ListconfigsResponse;
3817
3818	    fn method(&self) -> &str {
3819	        "listconfigs"
3820	    }
3821	}
3822	#[derive(Clone, Debug, Deserialize, Serialize)]
3823	pub struct StopRequest {
3824	}
3825
3826	impl From<StopRequest> for Request {
3827	    fn from(r: StopRequest) -> Self {
3828	        Request::Stop(r)
3829	    }
3830	}
3831
3832	impl IntoRequest for StopRequest {
3833	    type Response = super::responses::StopResponse;
3834	}
3835
3836	impl TypedRequest for StopRequest {
3837	    type Response = super::responses::StopResponse;
3838
3839	    fn method(&self) -> &str {
3840	        "stop"
3841	    }
3842	}
3843	#[derive(Clone, Debug, Deserialize, Serialize)]
3844	pub struct HelpRequest {
3845	    #[serde(skip_serializing_if = "Option::is_none")]
3846	    pub command: Option<String>,
3847	}
3848
3849	impl From<HelpRequest> for Request {
3850	    fn from(r: HelpRequest) -> Self {
3851	        Request::Help(r)
3852	    }
3853	}
3854
3855	impl IntoRequest for HelpRequest {
3856	    type Response = super::responses::HelpResponse;
3857	}
3858
3859	impl TypedRequest for HelpRequest {
3860	    type Response = super::responses::HelpResponse;
3861
3862	    fn method(&self) -> &str {
3863	        "help"
3864	    }
3865	}
3866	#[derive(Clone, Debug, Deserialize, Serialize)]
3867	pub struct PreapprovekeysendRequest {
3868	    pub amount_msat: Amount,
3869	    pub destination: PublicKey,
3870	    pub payment_hash: String,
3871	}
3872
3873	impl From<PreapprovekeysendRequest> for Request {
3874	    fn from(r: PreapprovekeysendRequest) -> Self {
3875	        Request::PreApproveKeysend(r)
3876	    }
3877	}
3878
3879	impl IntoRequest for PreapprovekeysendRequest {
3880	    type Response = super::responses::PreapprovekeysendResponse;
3881	}
3882
3883	impl TypedRequest for PreapprovekeysendRequest {
3884	    type Response = super::responses::PreapprovekeysendResponse;
3885
3886	    fn method(&self) -> &str {
3887	        "preapprovekeysend"
3888	    }
3889	}
3890	#[derive(Clone, Debug, Deserialize, Serialize)]
3891	pub struct PreapproveinvoiceRequest {
3892	    pub bolt11: String,
3893	}
3894
3895	impl From<PreapproveinvoiceRequest> for Request {
3896	    fn from(r: PreapproveinvoiceRequest) -> Self {
3897	        Request::PreApproveInvoice(r)
3898	    }
3899	}
3900
3901	impl IntoRequest for PreapproveinvoiceRequest {
3902	    type Response = super::responses::PreapproveinvoiceResponse;
3903	}
3904
3905	impl TypedRequest for PreapproveinvoiceRequest {
3906	    type Response = super::responses::PreapproveinvoiceResponse;
3907
3908	    fn method(&self) -> &str {
3909	        "preapproveinvoice"
3910	    }
3911	}
3912	#[derive(Clone, Debug, Deserialize, Serialize)]
3913	pub struct StaticbackupRequest {
3914	}
3915
3916	impl From<StaticbackupRequest> for Request {
3917	    fn from(r: StaticbackupRequest) -> Self {
3918	        Request::StaticBackup(r)
3919	    }
3920	}
3921
3922	impl IntoRequest for StaticbackupRequest {
3923	    type Response = super::responses::StaticbackupResponse;
3924	}
3925
3926	impl TypedRequest for StaticbackupRequest {
3927	    type Response = super::responses::StaticbackupResponse;
3928
3929	    fn method(&self) -> &str {
3930	        "staticbackup"
3931	    }
3932	}
3933	#[derive(Clone, Debug, Deserialize, Serialize)]
3934	pub struct BkprchannelsapyRequest {
3935	    #[serde(skip_serializing_if = "Option::is_none")]
3936	    pub end_time: Option<u64>,
3937	    #[serde(skip_serializing_if = "Option::is_none")]
3938	    pub start_time: Option<u64>,
3939	}
3940
3941	impl From<BkprchannelsapyRequest> for Request {
3942	    fn from(r: BkprchannelsapyRequest) -> Self {
3943	        Request::BkprChannelsApy(r)
3944	    }
3945	}
3946
3947	impl IntoRequest for BkprchannelsapyRequest {
3948	    type Response = super::responses::BkprchannelsapyResponse;
3949	}
3950
3951	impl TypedRequest for BkprchannelsapyRequest {
3952	    type Response = super::responses::BkprchannelsapyResponse;
3953
3954	    fn method(&self) -> &str {
3955	        "bkpr-channelsapy"
3956	    }
3957	}
3958	#[derive(Clone, Debug, Deserialize, Serialize)]
3959	pub struct BkprdumpincomecsvRequest {
3960	    #[serde(skip_serializing_if = "Option::is_none")]
3961	    pub consolidate_fees: Option<bool>,
3962	    #[serde(skip_serializing_if = "Option::is_none")]
3963	    pub csv_file: Option<String>,
3964	    #[serde(skip_serializing_if = "Option::is_none")]
3965	    pub end_time: Option<u64>,
3966	    #[serde(skip_serializing_if = "Option::is_none")]
3967	    pub start_time: Option<u64>,
3968	    pub csv_format: String,
3969	}
3970
3971	impl From<BkprdumpincomecsvRequest> for Request {
3972	    fn from(r: BkprdumpincomecsvRequest) -> Self {
3973	        Request::BkprDumpIncomeCsv(r)
3974	    }
3975	}
3976
3977	impl IntoRequest for BkprdumpincomecsvRequest {
3978	    type Response = super::responses::BkprdumpincomecsvResponse;
3979	}
3980
3981	impl TypedRequest for BkprdumpincomecsvRequest {
3982	    type Response = super::responses::BkprdumpincomecsvResponse;
3983
3984	    fn method(&self) -> &str {
3985	        "bkpr-dumpincomecsv"
3986	    }
3987	}
3988	#[derive(Clone, Debug, Deserialize, Serialize)]
3989	pub struct BkprinspectRequest {
3990	    pub account: String,
3991	}
3992
3993	impl From<BkprinspectRequest> for Request {
3994	    fn from(r: BkprinspectRequest) -> Self {
3995	        Request::BkprInspect(r)
3996	    }
3997	}
3998
3999	impl IntoRequest for BkprinspectRequest {
4000	    type Response = super::responses::BkprinspectResponse;
4001	}
4002
4003	impl TypedRequest for BkprinspectRequest {
4004	    type Response = super::responses::BkprinspectResponse;
4005
4006	    fn method(&self) -> &str {
4007	        "bkpr-inspect"
4008	    }
4009	}
4010	#[derive(Clone, Debug, Deserialize, Serialize)]
4011	pub struct BkprlistaccounteventsRequest {
4012	    #[serde(skip_serializing_if = "Option::is_none")]
4013	    pub account: Option<String>,
4014	    #[serde(skip_serializing_if = "Option::is_none")]
4015	    pub payment_id: Option<String>,
4016	}
4017
4018	impl From<BkprlistaccounteventsRequest> for Request {
4019	    fn from(r: BkprlistaccounteventsRequest) -> Self {
4020	        Request::BkprListAccountEvents(r)
4021	    }
4022	}
4023
4024	impl IntoRequest for BkprlistaccounteventsRequest {
4025	    type Response = super::responses::BkprlistaccounteventsResponse;
4026	}
4027
4028	impl TypedRequest for BkprlistaccounteventsRequest {
4029	    type Response = super::responses::BkprlistaccounteventsResponse;
4030
4031	    fn method(&self) -> &str {
4032	        "bkpr-listaccountevents"
4033	    }
4034	}
4035	#[derive(Clone, Debug, Deserialize, Serialize)]
4036	pub struct BkprlistbalancesRequest {
4037	}
4038
4039	impl From<BkprlistbalancesRequest> for Request {
4040	    fn from(r: BkprlistbalancesRequest) -> Self {
4041	        Request::BkprListBalances(r)
4042	    }
4043	}
4044
4045	impl IntoRequest for BkprlistbalancesRequest {
4046	    type Response = super::responses::BkprlistbalancesResponse;
4047	}
4048
4049	impl TypedRequest for BkprlistbalancesRequest {
4050	    type Response = super::responses::BkprlistbalancesResponse;
4051
4052	    fn method(&self) -> &str {
4053	        "bkpr-listbalances"
4054	    }
4055	}
4056	#[derive(Clone, Debug, Deserialize, Serialize)]
4057	pub struct BkprlistincomeRequest {
4058	    #[serde(skip_serializing_if = "Option::is_none")]
4059	    pub consolidate_fees: Option<bool>,
4060	    #[serde(skip_serializing_if = "Option::is_none")]
4061	    pub end_time: Option<u32>,
4062	    #[serde(skip_serializing_if = "Option::is_none")]
4063	    pub start_time: Option<u32>,
4064	}
4065
4066	impl From<BkprlistincomeRequest> for Request {
4067	    fn from(r: BkprlistincomeRequest) -> Self {
4068	        Request::BkprListIncome(r)
4069	    }
4070	}
4071
4072	impl IntoRequest for BkprlistincomeRequest {
4073	    type Response = super::responses::BkprlistincomeResponse;
4074	}
4075
4076	impl TypedRequest for BkprlistincomeRequest {
4077	    type Response = super::responses::BkprlistincomeResponse;
4078
4079	    fn method(&self) -> &str {
4080	        "bkpr-listincome"
4081	    }
4082	}
4083	#[derive(Clone, Debug, Deserialize, Serialize)]
4084	pub struct BkpreditdescriptionbypaymentidRequest {
4085	    pub description: String,
4086	    pub payment_id: String,
4087	}
4088
4089	impl From<BkpreditdescriptionbypaymentidRequest> for Request {
4090	    fn from(r: BkpreditdescriptionbypaymentidRequest) -> Self {
4091	        Request::BkprEditDescriptionByPaymentId(r)
4092	    }
4093	}
4094
4095	impl IntoRequest for BkpreditdescriptionbypaymentidRequest {
4096	    type Response = super::responses::BkpreditdescriptionbypaymentidResponse;
4097	}
4098
4099	impl TypedRequest for BkpreditdescriptionbypaymentidRequest {
4100	    type Response = super::responses::BkpreditdescriptionbypaymentidResponse;
4101
4102	    fn method(&self) -> &str {
4103	        "bkpr-editdescriptionbypaymentid"
4104	    }
4105	}
4106	#[derive(Clone, Debug, Deserialize, Serialize)]
4107	pub struct BkpreditdescriptionbyoutpointRequest {
4108	    pub description: String,
4109	    pub outpoint: String,
4110	}
4111
4112	impl From<BkpreditdescriptionbyoutpointRequest> for Request {
4113	    fn from(r: BkpreditdescriptionbyoutpointRequest) -> Self {
4114	        Request::BkprEditDescriptionByOutpoint(r)
4115	    }
4116	}
4117
4118	impl IntoRequest for BkpreditdescriptionbyoutpointRequest {
4119	    type Response = super::responses::BkpreditdescriptionbyoutpointResponse;
4120	}
4121
4122	impl TypedRequest for BkpreditdescriptionbyoutpointRequest {
4123	    type Response = super::responses::BkpreditdescriptionbyoutpointResponse;
4124
4125	    fn method(&self) -> &str {
4126	        "bkpr-editdescriptionbyoutpoint"
4127	    }
4128	}
4129	#[derive(Clone, Debug, Deserialize, Serialize)]
4130	pub struct BlacklistruneRequest {
4131	    #[serde(skip_serializing_if = "Option::is_none")]
4132	    pub end: Option<u64>,
4133	    #[serde(skip_serializing_if = "Option::is_none")]
4134	    pub relist: Option<bool>,
4135	    #[serde(skip_serializing_if = "Option::is_none")]
4136	    pub start: Option<u64>,
4137	}
4138
4139	impl From<BlacklistruneRequest> for Request {
4140	    fn from(r: BlacklistruneRequest) -> Self {
4141	        Request::BlacklistRune(r)
4142	    }
4143	}
4144
4145	impl IntoRequest for BlacklistruneRequest {
4146	    type Response = super::responses::BlacklistruneResponse;
4147	}
4148
4149	impl TypedRequest for BlacklistruneRequest {
4150	    type Response = super::responses::BlacklistruneResponse;
4151
4152	    fn method(&self) -> &str {
4153	        "blacklistrune"
4154	    }
4155	}
4156	#[derive(Clone, Debug, Deserialize, Serialize)]
4157	pub struct CheckruneRequest {
4158	    #[serde(skip_serializing_if = "Option::is_none")]
4159	    pub method: Option<String>,
4160	    #[serde(skip_serializing_if = "Option::is_none")]
4161	    pub nodeid: Option<String>,
4162	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
4163	    pub params: Option<Vec<String>>,
4164	    pub rune: String,
4165	}
4166
4167	impl From<CheckruneRequest> for Request {
4168	    fn from(r: CheckruneRequest) -> Self {
4169	        Request::CheckRune(r)
4170	    }
4171	}
4172
4173	impl IntoRequest for CheckruneRequest {
4174	    type Response = super::responses::CheckruneResponse;
4175	}
4176
4177	impl TypedRequest for CheckruneRequest {
4178	    type Response = super::responses::CheckruneResponse;
4179
4180	    fn method(&self) -> &str {
4181	        "checkrune"
4182	    }
4183	}
4184	#[derive(Clone, Debug, Deserialize, Serialize)]
4185	pub struct CreateruneRequest {
4186	    #[serde(skip_serializing_if = "Option::is_none")]
4187	    pub rune: Option<String>,
4188	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
4189	    pub restrictions: Option<Vec<String>>,
4190	}
4191
4192	impl From<CreateruneRequest> for Request {
4193	    fn from(r: CreateruneRequest) -> Self {
4194	        Request::CreateRune(r)
4195	    }
4196	}
4197
4198	impl IntoRequest for CreateruneRequest {
4199	    type Response = super::responses::CreateruneResponse;
4200	}
4201
4202	impl TypedRequest for CreateruneRequest {
4203	    type Response = super::responses::CreateruneResponse;
4204
4205	    fn method(&self) -> &str {
4206	        "createrune"
4207	    }
4208	}
4209	#[derive(Clone, Debug, Deserialize, Serialize)]
4210	pub struct ShowrunesRequest {
4211	    #[serde(skip_serializing_if = "Option::is_none")]
4212	    pub rune: Option<String>,
4213	}
4214
4215	impl From<ShowrunesRequest> for Request {
4216	    fn from(r: ShowrunesRequest) -> Self {
4217	        Request::ShowRunes(r)
4218	    }
4219	}
4220
4221	impl IntoRequest for ShowrunesRequest {
4222	    type Response = super::responses::ShowrunesResponse;
4223	}
4224
4225	impl TypedRequest for ShowrunesRequest {
4226	    type Response = super::responses::ShowrunesResponse;
4227
4228	    fn method(&self) -> &str {
4229	        "showrunes"
4230	    }
4231	}
4232	#[derive(Clone, Debug, Deserialize, Serialize)]
4233	pub struct AskreneunreservePath {
4234	    #[serde(skip_serializing_if = "Option::is_none")]
4235	    pub short_channel_id_dir: Option<ShortChannelIdDir>,
4236	    pub amount_msat: Amount,
4237	}
4238
4239	#[derive(Clone, Debug, Deserialize, Serialize)]
4240	pub struct AskreneunreserveRequest {
4241	    pub path: Vec<AskreneunreservePath>,
4242	}
4243
4244	impl From<AskreneunreserveRequest> for Request {
4245	    fn from(r: AskreneunreserveRequest) -> Self {
4246	        Request::AskReneUnreserve(r)
4247	    }
4248	}
4249
4250	impl IntoRequest for AskreneunreserveRequest {
4251	    type Response = super::responses::AskreneunreserveResponse;
4252	}
4253
4254	impl TypedRequest for AskreneunreserveRequest {
4255	    type Response = super::responses::AskreneunreserveResponse;
4256
4257	    fn method(&self) -> &str {
4258	        "askrene-unreserve"
4259	    }
4260	}
4261	#[derive(Clone, Debug, Deserialize, Serialize)]
4262	pub struct AskrenelistlayersRequest {
4263	    #[serde(skip_serializing_if = "Option::is_none")]
4264	    pub layer: Option<String>,
4265	}
4266
4267	impl From<AskrenelistlayersRequest> for Request {
4268	    fn from(r: AskrenelistlayersRequest) -> Self {
4269	        Request::AskReneListLayers(r)
4270	    }
4271	}
4272
4273	impl IntoRequest for AskrenelistlayersRequest {
4274	    type Response = super::responses::AskrenelistlayersResponse;
4275	}
4276
4277	impl TypedRequest for AskrenelistlayersRequest {
4278	    type Response = super::responses::AskrenelistlayersResponse;
4279
4280	    fn method(&self) -> &str {
4281	        "askrene-listlayers"
4282	    }
4283	}
4284	#[derive(Clone, Debug, Deserialize, Serialize)]
4285	pub struct AskrenecreatelayerRequest {
4286	    #[serde(skip_serializing_if = "Option::is_none")]
4287	    pub persistent: Option<bool>,
4288	    pub layer: String,
4289	}
4290
4291	impl From<AskrenecreatelayerRequest> for Request {
4292	    fn from(r: AskrenecreatelayerRequest) -> Self {
4293	        Request::AskReneCreateLayer(r)
4294	    }
4295	}
4296
4297	impl IntoRequest for AskrenecreatelayerRequest {
4298	    type Response = super::responses::AskrenecreatelayerResponse;
4299	}
4300
4301	impl TypedRequest for AskrenecreatelayerRequest {
4302	    type Response = super::responses::AskrenecreatelayerResponse;
4303
4304	    fn method(&self) -> &str {
4305	        "askrene-create-layer"
4306	    }
4307	}
4308	#[derive(Clone, Debug, Deserialize, Serialize)]
4309	pub struct AskreneremovelayerRequest {
4310	    pub layer: String,
4311	}
4312
4313	impl From<AskreneremovelayerRequest> for Request {
4314	    fn from(r: AskreneremovelayerRequest) -> Self {
4315	        Request::AskReneRemoveLayer(r)
4316	    }
4317	}
4318
4319	impl IntoRequest for AskreneremovelayerRequest {
4320	    type Response = super::responses::AskreneremovelayerResponse;
4321	}
4322
4323	impl TypedRequest for AskreneremovelayerRequest {
4324	    type Response = super::responses::AskreneremovelayerResponse;
4325
4326	    fn method(&self) -> &str {
4327	        "askrene-remove-layer"
4328	    }
4329	}
4330	#[derive(Clone, Debug, Deserialize, Serialize)]
4331	pub struct AskrenereservePath {
4332	    #[serde(skip_serializing_if = "Option::is_none")]
4333	    pub short_channel_id_dir: Option<ShortChannelIdDir>,
4334	    pub amount_msat: Amount,
4335	}
4336
4337	#[derive(Clone, Debug, Deserialize, Serialize)]
4338	pub struct AskrenereserveRequest {
4339	    pub path: Vec<AskrenereservePath>,
4340	}
4341
4342	impl From<AskrenereserveRequest> for Request {
4343	    fn from(r: AskrenereserveRequest) -> Self {
4344	        Request::AskReneReserve(r)
4345	    }
4346	}
4347
4348	impl IntoRequest for AskrenereserveRequest {
4349	    type Response = super::responses::AskrenereserveResponse;
4350	}
4351
4352	impl TypedRequest for AskrenereserveRequest {
4353	    type Response = super::responses::AskrenereserveResponse;
4354
4355	    fn method(&self) -> &str {
4356	        "askrene-reserve"
4357	    }
4358	}
4359	#[derive(Clone, Debug, Deserialize, Serialize)]
4360	pub struct AskreneageRequest {
4361	    pub cutoff: u64,
4362	    pub layer: String,
4363	}
4364
4365	impl From<AskreneageRequest> for Request {
4366	    fn from(r: AskreneageRequest) -> Self {
4367	        Request::AskReneAge(r)
4368	    }
4369	}
4370
4371	impl IntoRequest for AskreneageRequest {
4372	    type Response = super::responses::AskreneageResponse;
4373	}
4374
4375	impl TypedRequest for AskreneageRequest {
4376	    type Response = super::responses::AskreneageResponse;
4377
4378	    fn method(&self) -> &str {
4379	        "askrene-age"
4380	    }
4381	}
4382	#[derive(Clone, Debug, Deserialize, Serialize)]
4383	pub struct GetroutesRequest {
4384	    #[serde(skip_serializing_if = "Option::is_none")]
4385	    pub final_cltv: Option<u32>,
4386	    #[serde(skip_serializing_if = "Option::is_none")]
4387	    pub maxdelay: Option<u32>,
4388	    pub amount_msat: Amount,
4389	    pub destination: PublicKey,
4390	    pub layers: Vec<String>,
4391	    pub maxfee_msat: Amount,
4392	    pub source: PublicKey,
4393	}
4394
4395	impl From<GetroutesRequest> for Request {
4396	    fn from(r: GetroutesRequest) -> Self {
4397	        Request::GetRoutes(r)
4398	    }
4399	}
4400
4401	impl IntoRequest for GetroutesRequest {
4402	    type Response = super::responses::GetroutesResponse;
4403	}
4404
4405	impl TypedRequest for GetroutesRequest {
4406	    type Response = super::responses::GetroutesResponse;
4407
4408	    fn method(&self) -> &str {
4409	        "getroutes"
4410	    }
4411	}
4412	#[derive(Clone, Debug, Deserialize, Serialize)]
4413	pub struct AskrenedisablenodeRequest {
4414	    pub layer: String,
4415	    pub node: PublicKey,
4416	}
4417
4418	impl From<AskrenedisablenodeRequest> for Request {
4419	    fn from(r: AskrenedisablenodeRequest) -> Self {
4420	        Request::AskReneDisableNode(r)
4421	    }
4422	}
4423
4424	impl IntoRequest for AskrenedisablenodeRequest {
4425	    type Response = super::responses::AskrenedisablenodeResponse;
4426	}
4427
4428	impl TypedRequest for AskrenedisablenodeRequest {
4429	    type Response = super::responses::AskrenedisablenodeResponse;
4430
4431	    fn method(&self) -> &str {
4432	        "askrene-disable-node"
4433	    }
4434	}
4435	/// ['Whether this payment passed (implying capacity of at least that amount), failed (implying maximum capacity of one msat less), or succeeded (implying capacity has been reduced in this direction)']
4436	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
4437	#[allow(non_camel_case_types)]
4438	pub enum AskreneinformchannelInform {
4439	    #[serde(rename = "constrained")]
4440	    CONSTRAINED = 0,
4441	    #[serde(rename = "unconstrained")]
4442	    UNCONSTRAINED = 1,
4443	    #[serde(rename = "succeeded")]
4444	    SUCCEEDED = 2,
4445	}
4446
4447	impl TryFrom<i32> for AskreneinformchannelInform {
4448	    type Error = anyhow::Error;
4449	    fn try_from(c: i32) -> Result<AskreneinformchannelInform, anyhow::Error> {
4450	        match c {
4451	    0 => Ok(AskreneinformchannelInform::CONSTRAINED),
4452	    1 => Ok(AskreneinformchannelInform::UNCONSTRAINED),
4453	    2 => Ok(AskreneinformchannelInform::SUCCEEDED),
4454	            o => Err(anyhow::anyhow!("Unknown variant {} for enum AskreneinformchannelInform", o)),
4455	        }
4456	    }
4457	}
4458
4459	impl ToString for AskreneinformchannelInform {
4460	    fn to_string(&self) -> String {
4461	        match self {
4462	            AskreneinformchannelInform::CONSTRAINED => "CONSTRAINED",
4463	            AskreneinformchannelInform::UNCONSTRAINED => "UNCONSTRAINED",
4464	            AskreneinformchannelInform::SUCCEEDED => "SUCCEEDED",
4465	        }.to_string()
4466	    }
4467	}
4468
4469	#[derive(Clone, Debug, Deserialize, Serialize)]
4470	pub struct AskreneinformchannelRequest {
4471	    #[serde(skip_serializing_if = "Option::is_none")]
4472	    pub amount_msat: Option<Amount>,
4473	    #[serde(skip_serializing_if = "Option::is_none")]
4474	    pub inform: Option<AskreneinformchannelInform>,
4475	    #[serde(skip_serializing_if = "Option::is_none")]
4476	    pub short_channel_id_dir: Option<ShortChannelIdDir>,
4477	    pub layer: String,
4478	}
4479
4480	impl From<AskreneinformchannelRequest> for Request {
4481	    fn from(r: AskreneinformchannelRequest) -> Self {
4482	        Request::AskReneInformChannel(r)
4483	    }
4484	}
4485
4486	impl IntoRequest for AskreneinformchannelRequest {
4487	    type Response = super::responses::AskreneinformchannelResponse;
4488	}
4489
4490	impl TypedRequest for AskreneinformchannelRequest {
4491	    type Response = super::responses::AskreneinformchannelResponse;
4492
4493	    fn method(&self) -> &str {
4494	        "askrene-inform-channel"
4495	    }
4496	}
4497	#[derive(Clone, Debug, Deserialize, Serialize)]
4498	pub struct AskrenecreatechannelRequest {
4499	    pub capacity_msat: Amount,
4500	    pub destination: PublicKey,
4501	    pub layer: String,
4502	    pub short_channel_id: ShortChannelId,
4503	    pub source: PublicKey,
4504	}
4505
4506	impl From<AskrenecreatechannelRequest> for Request {
4507	    fn from(r: AskrenecreatechannelRequest) -> Self {
4508	        Request::AskReneCreateChannel(r)
4509	    }
4510	}
4511
4512	impl IntoRequest for AskrenecreatechannelRequest {
4513	    type Response = super::responses::AskrenecreatechannelResponse;
4514	}
4515
4516	impl TypedRequest for AskrenecreatechannelRequest {
4517	    type Response = super::responses::AskrenecreatechannelResponse;
4518
4519	    fn method(&self) -> &str {
4520	        "askrene-create-channel"
4521	    }
4522	}
4523	#[derive(Clone, Debug, Deserialize, Serialize)]
4524	pub struct AskreneupdatechannelRequest {
4525	    #[serde(skip_serializing_if = "Option::is_none")]
4526	    pub cltv_expiry_delta: Option<u16>,
4527	    #[serde(skip_serializing_if = "Option::is_none")]
4528	    pub enabled: Option<bool>,
4529	    #[serde(skip_serializing_if = "Option::is_none")]
4530	    pub fee_base_msat: Option<Amount>,
4531	    #[serde(skip_serializing_if = "Option::is_none")]
4532	    pub fee_proportional_millionths: Option<u32>,
4533	    #[serde(skip_serializing_if = "Option::is_none")]
4534	    pub htlc_maximum_msat: Option<Amount>,
4535	    #[serde(skip_serializing_if = "Option::is_none")]
4536	    pub htlc_minimum_msat: Option<Amount>,
4537	    pub layer: String,
4538	    pub short_channel_id_dir: ShortChannelIdDir,
4539	}
4540
4541	impl From<AskreneupdatechannelRequest> for Request {
4542	    fn from(r: AskreneupdatechannelRequest) -> Self {
4543	        Request::AskReneUpdateChannel(r)
4544	    }
4545	}
4546
4547	impl IntoRequest for AskreneupdatechannelRequest {
4548	    type Response = super::responses::AskreneupdatechannelResponse;
4549	}
4550
4551	impl TypedRequest for AskreneupdatechannelRequest {
4552	    type Response = super::responses::AskreneupdatechannelResponse;
4553
4554	    fn method(&self) -> &str {
4555	        "askrene-update-channel"
4556	    }
4557	}
4558	#[derive(Clone, Debug, Deserialize, Serialize)]
4559	pub struct AskrenebiaschannelRequest {
4560	    #[serde(skip_serializing_if = "Option::is_none")]
4561	    pub description: Option<String>,
4562	    pub bias: i64,
4563	    pub layer: String,
4564	    pub short_channel_id_dir: ShortChannelIdDir,
4565	}
4566
4567	impl From<AskrenebiaschannelRequest> for Request {
4568	    fn from(r: AskrenebiaschannelRequest) -> Self {
4569	        Request::AskReneBiasChannel(r)
4570	    }
4571	}
4572
4573	impl IntoRequest for AskrenebiaschannelRequest {
4574	    type Response = super::responses::AskrenebiaschannelResponse;
4575	}
4576
4577	impl TypedRequest for AskrenebiaschannelRequest {
4578	    type Response = super::responses::AskrenebiaschannelResponse;
4579
4580	    fn method(&self) -> &str {
4581	        "askrene-bias-channel"
4582	    }
4583	}
4584	#[derive(Clone, Debug, Deserialize, Serialize)]
4585	pub struct AskrenelistreservationsRequest {
4586	}
4587
4588	impl From<AskrenelistreservationsRequest> for Request {
4589	    fn from(r: AskrenelistreservationsRequest) -> Self {
4590	        Request::AskReneListReservations(r)
4591	    }
4592	}
4593
4594	impl IntoRequest for AskrenelistreservationsRequest {
4595	    type Response = super::responses::AskrenelistreservationsResponse;
4596	}
4597
4598	impl TypedRequest for AskrenelistreservationsRequest {
4599	    type Response = super::responses::AskrenelistreservationsResponse;
4600
4601	    fn method(&self) -> &str {
4602	        "askrene-listreservations"
4603	    }
4604	}
4605	#[derive(Clone, Debug, Deserialize, Serialize)]
4606	pub struct InjectpaymentonionRequest {
4607	    #[serde(skip_serializing_if = "Option::is_none")]
4608	    pub destination_msat: Option<Amount>,
4609	    #[serde(skip_serializing_if = "Option::is_none")]
4610	    pub invstring: Option<String>,
4611	    #[serde(skip_serializing_if = "Option::is_none")]
4612	    pub label: Option<String>,
4613	    #[serde(skip_serializing_if = "Option::is_none")]
4614	    pub localinvreqid: Option<Sha256>,
4615	    pub amount_msat: Amount,
4616	    pub cltv_expiry: u16,
4617	    pub groupid: u64,
4618	    pub onion: String,
4619	    pub partid: u64,
4620	    pub payment_hash: Sha256,
4621	}
4622
4623	impl From<InjectpaymentonionRequest> for Request {
4624	    fn from(r: InjectpaymentonionRequest) -> Self {
4625	        Request::InjectPaymentOnion(r)
4626	    }
4627	}
4628
4629	impl IntoRequest for InjectpaymentonionRequest {
4630	    type Response = super::responses::InjectpaymentonionResponse;
4631	}
4632
4633	impl TypedRequest for InjectpaymentonionRequest {
4634	    type Response = super::responses::InjectpaymentonionResponse;
4635
4636	    fn method(&self) -> &str {
4637	        "injectpaymentonion"
4638	    }
4639	}
4640	#[derive(Clone, Debug, Deserialize, Serialize)]
4641	pub struct InjectonionmessageRequest {
4642	    pub message: String,
4643	    pub path_key: PublicKey,
4644	}
4645
4646	impl From<InjectonionmessageRequest> for Request {
4647	    fn from(r: InjectonionmessageRequest) -> Self {
4648	        Request::InjectOnionMessage(r)
4649	    }
4650	}
4651
4652	impl IntoRequest for InjectonionmessageRequest {
4653	    type Response = super::responses::InjectonionmessageResponse;
4654	}
4655
4656	impl TypedRequest for InjectonionmessageRequest {
4657	    type Response = super::responses::InjectonionmessageResponse;
4658
4659	    fn method(&self) -> &str {
4660	        "injectonionmessage"
4661	    }
4662	}
4663	#[derive(Clone, Debug, Deserialize, Serialize)]
4664	pub struct XpayRequest {
4665	    #[serde(skip_serializing_if = "Option::is_none")]
4666	    pub amount_msat: Option<Amount>,
4667	    #[serde(skip_serializing_if = "Option::is_none")]
4668	    pub maxdelay: Option<u32>,
4669	    #[serde(skip_serializing_if = "Option::is_none")]
4670	    pub maxfee: Option<Amount>,
4671	    #[serde(skip_serializing_if = "Option::is_none")]
4672	    pub partial_msat: Option<Amount>,
4673	    #[serde(skip_serializing_if = "Option::is_none")]
4674	    pub retry_for: Option<u32>,
4675	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
4676	    pub layers: Option<Vec<String>>,
4677	    pub invstring: String,
4678	}
4679
4680	impl From<XpayRequest> for Request {
4681	    fn from(r: XpayRequest) -> Self {
4682	        Request::Xpay(r)
4683	    }
4684	}
4685
4686	impl IntoRequest for XpayRequest {
4687	    type Response = super::responses::XpayResponse;
4688	}
4689
4690	impl TypedRequest for XpayRequest {
4691	    type Response = super::responses::XpayResponse;
4692
4693	    fn method(&self) -> &str {
4694	        "xpay"
4695	    }
4696	}
4697}
4698
4699
4700pub mod responses {
4701    #[allow(unused_imports)]
4702    use crate::primitives::*;
4703    #[allow(unused_imports)]
4704    use serde::{{Deserialize, Serialize}};
4705    use super::{TryFromResponseError, Response};
4706
4707	#[derive(Clone, Debug, Deserialize, Serialize)]
4708	pub struct GetinfoOurFeatures {
4709	    pub channel: String,
4710	    pub init: String,
4711	    pub invoice: String,
4712	    pub node: String,
4713	}
4714
4715	/// ['Type of connection (until 23.08, `websocket` was also allowed).']
4716	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
4717	#[allow(non_camel_case_types)]
4718	pub enum GetinfoAddressType {
4719	    #[serde(rename = "dns")]
4720	    DNS = 0,
4721	    #[serde(rename = "ipv4")]
4722	    IPV4 = 1,
4723	    #[serde(rename = "ipv6")]
4724	    IPV6 = 2,
4725	    #[serde(rename = "torv2")]
4726	    TORV2 = 3,
4727	    #[serde(rename = "torv3")]
4728	    TORV3 = 4,
4729	}
4730
4731	impl TryFrom<i32> for GetinfoAddressType {
4732	    type Error = anyhow::Error;
4733	    fn try_from(c: i32) -> Result<GetinfoAddressType, anyhow::Error> {
4734	        match c {
4735	    0 => Ok(GetinfoAddressType::DNS),
4736	    1 => Ok(GetinfoAddressType::IPV4),
4737	    2 => Ok(GetinfoAddressType::IPV6),
4738	    3 => Ok(GetinfoAddressType::TORV2),
4739	    4 => Ok(GetinfoAddressType::TORV3),
4740	            o => Err(anyhow::anyhow!("Unknown variant {} for enum GetinfoAddressType", o)),
4741	        }
4742	    }
4743	}
4744
4745	impl ToString for GetinfoAddressType {
4746	    fn to_string(&self) -> String {
4747	        match self {
4748	            GetinfoAddressType::DNS => "DNS",
4749	            GetinfoAddressType::IPV4 => "IPV4",
4750	            GetinfoAddressType::IPV6 => "IPV6",
4751	            GetinfoAddressType::TORV2 => "TORV2",
4752	            GetinfoAddressType::TORV3 => "TORV3",
4753	        }.to_string()
4754	    }
4755	}
4756
4757	#[derive(Clone, Debug, Deserialize, Serialize)]
4758	pub struct GetinfoAddress {
4759	    #[serde(skip_serializing_if = "Option::is_none")]
4760	    pub address: Option<String>,
4761	    // Path `Getinfo.address[].type`
4762	    #[serde(rename = "type")]
4763	    pub item_type: GetinfoAddressType,
4764	    pub port: u16,
4765	}
4766
4767	/// ['Type of connection.']
4768	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
4769	#[allow(non_camel_case_types)]
4770	pub enum GetinfoBindingType {
4771	    #[serde(rename = "local socket")]
4772	    LOCAL_SOCKET = 0,
4773	    #[serde(rename = "ipv4")]
4774	    IPV4 = 1,
4775	    #[serde(rename = "ipv6")]
4776	    IPV6 = 2,
4777	    #[serde(rename = "torv2")]
4778	    TORV2 = 3,
4779	    #[serde(rename = "torv3")]
4780	    TORV3 = 4,
4781	    #[serde(rename = "websocket")]
4782	    WEBSOCKET = 5,
4783	}
4784
4785	impl TryFrom<i32> for GetinfoBindingType {
4786	    type Error = anyhow::Error;
4787	    fn try_from(c: i32) -> Result<GetinfoBindingType, anyhow::Error> {
4788	        match c {
4789	    0 => Ok(GetinfoBindingType::LOCAL_SOCKET),
4790	    1 => Ok(GetinfoBindingType::IPV4),
4791	    2 => Ok(GetinfoBindingType::IPV6),
4792	    3 => Ok(GetinfoBindingType::TORV2),
4793	    4 => Ok(GetinfoBindingType::TORV3),
4794	    5 => Ok(GetinfoBindingType::WEBSOCKET),
4795	            o => Err(anyhow::anyhow!("Unknown variant {} for enum GetinfoBindingType", o)),
4796	        }
4797	    }
4798	}
4799
4800	impl ToString for GetinfoBindingType {
4801	    fn to_string(&self) -> String {
4802	        match self {
4803	            GetinfoBindingType::LOCAL_SOCKET => "LOCAL_SOCKET",
4804	            GetinfoBindingType::WEBSOCKET => "WEBSOCKET",
4805	            GetinfoBindingType::IPV4 => "IPV4",
4806	            GetinfoBindingType::IPV6 => "IPV6",
4807	            GetinfoBindingType::TORV2 => "TORV2",
4808	            GetinfoBindingType::TORV3 => "TORV3",
4809	        }.to_string()
4810	    }
4811	}
4812
4813	#[derive(Clone, Debug, Deserialize, Serialize)]
4814	pub struct GetinfoBinding {
4815	    #[serde(skip_serializing_if = "Option::is_none")]
4816	    pub address: Option<String>,
4817	    #[serde(skip_serializing_if = "Option::is_none")]
4818	    pub port: Option<u16>,
4819	    #[serde(skip_serializing_if = "Option::is_none")]
4820	    pub socket: Option<String>,
4821	    #[serde(skip_serializing_if = "Option::is_none")]
4822	    pub subtype: Option<String>,
4823	    // Path `Getinfo.binding[].type`
4824	    #[serde(rename = "type")]
4825	    pub item_type: GetinfoBindingType,
4826	}
4827
4828	#[derive(Clone, Debug, Deserialize, Serialize)]
4829	pub struct GetinfoResponse {
4830	    #[serde(rename = "lightning-dir")]
4831	    pub lightning_dir: String,
4832	    #[serde(skip_serializing_if = "Option::is_none")]
4833	    pub alias: Option<String>,
4834	    #[serde(skip_serializing_if = "Option::is_none")]
4835	    pub our_features: Option<GetinfoOurFeatures>,
4836	    #[serde(skip_serializing_if = "Option::is_none")]
4837	    pub warning_bitcoind_sync: Option<String>,
4838	    #[serde(skip_serializing_if = "Option::is_none")]
4839	    pub warning_lightningd_sync: Option<String>,
4840	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
4841	    pub address: Option<Vec<GetinfoAddress>>,
4842	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
4843	    pub binding: Option<Vec<GetinfoBinding>>,
4844	    pub blockheight: u32,
4845	    pub color: String,
4846	    pub fees_collected_msat: Amount,
4847	    pub id: PublicKey,
4848	    pub network: String,
4849	    pub num_active_channels: u32,
4850	    pub num_inactive_channels: u32,
4851	    pub num_peers: u32,
4852	    pub num_pending_channels: u32,
4853	    pub version: String,
4854	}
4855
4856	impl TryFrom<Response> for GetinfoResponse {
4857	    type Error = super::TryFromResponseError;
4858
4859	    fn try_from(response: Response) -> Result<Self, Self::Error> {
4860	        match response {
4861	            Response::Getinfo(response) => Ok(response),
4862	            _ => Err(TryFromResponseError)
4863	        }
4864	    }
4865	}
4866
4867	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
4868	#[allow(non_camel_case_types)]
4869	pub enum ListpeersPeersLogType {
4870	    #[serde(rename = "SKIPPED")]
4871	    SKIPPED = 0,
4872	    #[serde(rename = "BROKEN")]
4873	    BROKEN = 1,
4874	    #[serde(rename = "UNUSUAL")]
4875	    UNUSUAL = 2,
4876	    #[serde(rename = "INFO")]
4877	    INFO = 3,
4878	    #[serde(rename = "DEBUG")]
4879	    DEBUG = 4,
4880	    #[serde(rename = "IO_IN")]
4881	    IO_IN = 5,
4882	    #[serde(rename = "IO_OUT")]
4883	    IO_OUT = 6,
4884	    #[serde(rename = "TRACE")]
4885	    TRACE = 7,
4886	}
4887
4888	impl TryFrom<i32> for ListpeersPeersLogType {
4889	    type Error = anyhow::Error;
4890	    fn try_from(c: i32) -> Result<ListpeersPeersLogType, anyhow::Error> {
4891	        match c {
4892	    0 => Ok(ListpeersPeersLogType::SKIPPED),
4893	    1 => Ok(ListpeersPeersLogType::BROKEN),
4894	    2 => Ok(ListpeersPeersLogType::UNUSUAL),
4895	    3 => Ok(ListpeersPeersLogType::INFO),
4896	    4 => Ok(ListpeersPeersLogType::DEBUG),
4897	    5 => Ok(ListpeersPeersLogType::IO_IN),
4898	    6 => Ok(ListpeersPeersLogType::IO_OUT),
4899	    7 => Ok(ListpeersPeersLogType::TRACE),
4900	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListpeersPeersLogType", o)),
4901	        }
4902	    }
4903	}
4904
4905	impl ToString for ListpeersPeersLogType {
4906	    fn to_string(&self) -> String {
4907	        match self {
4908	            ListpeersPeersLogType::SKIPPED => "SKIPPED",
4909	            ListpeersPeersLogType::BROKEN => "BROKEN",
4910	            ListpeersPeersLogType::UNUSUAL => "UNUSUAL",
4911	            ListpeersPeersLogType::INFO => "INFO",
4912	            ListpeersPeersLogType::DEBUG => "DEBUG",
4913	            ListpeersPeersLogType::TRACE => "TRACE",
4914	            ListpeersPeersLogType::IO_IN => "IO_IN",
4915	            ListpeersPeersLogType::IO_OUT => "IO_OUT",
4916	        }.to_string()
4917	    }
4918	}
4919
4920	#[derive(Clone, Debug, Deserialize, Serialize)]
4921	pub struct ListpeersPeersLog {
4922	    #[serde(skip_serializing_if = "Option::is_none")]
4923	    pub data: Option<String>,
4924	    #[serde(skip_serializing_if = "Option::is_none")]
4925	    pub log: Option<String>,
4926	    #[serde(skip_serializing_if = "Option::is_none")]
4927	    pub node_id: Option<PublicKey>,
4928	    #[serde(skip_serializing_if = "Option::is_none")]
4929	    pub num_skipped: Option<u32>,
4930	    #[serde(skip_serializing_if = "Option::is_none")]
4931	    pub source: Option<String>,
4932	    #[serde(skip_serializing_if = "Option::is_none")]
4933	    pub time: Option<String>,
4934	    // Path `ListPeers.peers[].log[].type`
4935	    #[serde(rename = "type")]
4936	    pub item_type: ListpeersPeersLogType,
4937	}
4938
4939	#[derive(Clone, Debug, Deserialize, Serialize)]
4940	pub struct ListpeersPeers {
4941	    #[serde(skip_serializing_if = "Option::is_none")]
4942	    pub features: Option<String>,
4943	    #[serde(skip_serializing_if = "Option::is_none")]
4944	    pub num_channels: Option<u32>,
4945	    #[serde(skip_serializing_if = "Option::is_none")]
4946	    pub remote_addr: Option<String>,
4947	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
4948	    pub log: Option<Vec<ListpeersPeersLog>>,
4949	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
4950	    pub netaddr: Option<Vec<String>>,
4951	    pub connected: bool,
4952	    pub id: PublicKey,
4953	}
4954
4955	#[derive(Clone, Debug, Deserialize, Serialize)]
4956	pub struct ListpeersResponse {
4957	    pub peers: Vec<ListpeersPeers>,
4958	}
4959
4960	impl TryFrom<Response> for ListpeersResponse {
4961	    type Error = super::TryFromResponseError;
4962
4963	    fn try_from(response: Response) -> Result<Self, Self::Error> {
4964	        match response {
4965	            Response::ListPeers(response) => Ok(response),
4966	            _ => Err(TryFromResponseError)
4967	        }
4968	    }
4969	}
4970
4971	#[derive(Clone, Debug, Deserialize, Serialize)]
4972	pub struct ListfundsChannels {
4973	    #[serde(skip_serializing_if = "Option::is_none")]
4974	    pub channel_id: Option<Sha256>,
4975	    #[serde(skip_serializing_if = "Option::is_none")]
4976	    pub short_channel_id: Option<ShortChannelId>,
4977	    // Path `ListFunds.channels[].state`
4978	    pub state: ChannelState,
4979	    pub amount_msat: Amount,
4980	    pub connected: bool,
4981	    pub funding_output: u32,
4982	    pub funding_txid: String,
4983	    pub our_amount_msat: Amount,
4984	    pub peer_id: PublicKey,
4985	}
4986
4987	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
4988	#[allow(non_camel_case_types)]
4989	pub enum ListfundsOutputsStatus {
4990	    #[serde(rename = "unconfirmed")]
4991	    UNCONFIRMED = 0,
4992	    #[serde(rename = "confirmed")]
4993	    CONFIRMED = 1,
4994	    #[serde(rename = "spent")]
4995	    SPENT = 2,
4996	    #[serde(rename = "immature")]
4997	    IMMATURE = 3,
4998	}
4999
5000	impl TryFrom<i32> for ListfundsOutputsStatus {
5001	    type Error = anyhow::Error;
5002	    fn try_from(c: i32) -> Result<ListfundsOutputsStatus, anyhow::Error> {
5003	        match c {
5004	    0 => Ok(ListfundsOutputsStatus::UNCONFIRMED),
5005	    1 => Ok(ListfundsOutputsStatus::CONFIRMED),
5006	    2 => Ok(ListfundsOutputsStatus::SPENT),
5007	    3 => Ok(ListfundsOutputsStatus::IMMATURE),
5008	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListfundsOutputsStatus", o)),
5009	        }
5010	    }
5011	}
5012
5013	impl ToString for ListfundsOutputsStatus {
5014	    fn to_string(&self) -> String {
5015	        match self {
5016	            ListfundsOutputsStatus::UNCONFIRMED => "UNCONFIRMED",
5017	            ListfundsOutputsStatus::CONFIRMED => "CONFIRMED",
5018	            ListfundsOutputsStatus::SPENT => "SPENT",
5019	            ListfundsOutputsStatus::IMMATURE => "IMMATURE",
5020	        }.to_string()
5021	    }
5022	}
5023
5024	#[derive(Clone, Debug, Deserialize, Serialize)]
5025	pub struct ListfundsOutputs {
5026	    #[serde(skip_serializing_if = "Option::is_none")]
5027	    pub address: Option<String>,
5028	    #[serde(skip_serializing_if = "Option::is_none")]
5029	    pub blockheight: Option<u32>,
5030	    #[serde(skip_serializing_if = "Option::is_none")]
5031	    pub redeemscript: Option<String>,
5032	    #[serde(skip_serializing_if = "Option::is_none")]
5033	    pub reserved_to_block: Option<u32>,
5034	    // Path `ListFunds.outputs[].status`
5035	    pub status: ListfundsOutputsStatus,
5036	    pub amount_msat: Amount,
5037	    pub output: u32,
5038	    pub reserved: bool,
5039	    pub scriptpubkey: String,
5040	    pub txid: String,
5041	}
5042
5043	#[derive(Clone, Debug, Deserialize, Serialize)]
5044	pub struct ListfundsResponse {
5045	    pub channels: Vec<ListfundsChannels>,
5046	    pub outputs: Vec<ListfundsOutputs>,
5047	}
5048
5049	impl TryFrom<Response> for ListfundsResponse {
5050	    type Error = super::TryFromResponseError;
5051
5052	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5053	        match response {
5054	            Response::ListFunds(response) => Ok(response),
5055	            _ => Err(TryFromResponseError)
5056	        }
5057	    }
5058	}
5059
5060	/// ['Status of the payment (could be complete if already sent previously).']
5061	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
5062	#[allow(non_camel_case_types)]
5063	pub enum SendpayStatus {
5064	    #[serde(rename = "pending")]
5065	    PENDING = 0,
5066	    #[serde(rename = "complete")]
5067	    COMPLETE = 1,
5068	}
5069
5070	impl TryFrom<i32> for SendpayStatus {
5071	    type Error = anyhow::Error;
5072	    fn try_from(c: i32) -> Result<SendpayStatus, anyhow::Error> {
5073	        match c {
5074	    0 => Ok(SendpayStatus::PENDING),
5075	    1 => Ok(SendpayStatus::COMPLETE),
5076	            o => Err(anyhow::anyhow!("Unknown variant {} for enum SendpayStatus", o)),
5077	        }
5078	    }
5079	}
5080
5081	impl ToString for SendpayStatus {
5082	    fn to_string(&self) -> String {
5083	        match self {
5084	            SendpayStatus::PENDING => "PENDING",
5085	            SendpayStatus::COMPLETE => "COMPLETE",
5086	        }.to_string()
5087	    }
5088	}
5089
5090	#[derive(Clone, Debug, Deserialize, Serialize)]
5091	pub struct SendpayResponse {
5092	    #[serde(skip_serializing_if = "Option::is_none")]
5093	    pub amount_msat: Option<Amount>,
5094	    #[serde(skip_serializing_if = "Option::is_none")]
5095	    pub bolt11: Option<String>,
5096	    #[serde(skip_serializing_if = "Option::is_none")]
5097	    pub bolt12: Option<String>,
5098	    #[serde(skip_serializing_if = "Option::is_none")]
5099	    pub completed_at: Option<u64>,
5100	    #[serde(skip_serializing_if = "Option::is_none")]
5101	    pub created_index: Option<u64>,
5102	    #[serde(skip_serializing_if = "Option::is_none")]
5103	    pub destination: Option<PublicKey>,
5104	    #[serde(skip_serializing_if = "Option::is_none")]
5105	    pub groupid: Option<u64>,
5106	    #[serde(skip_serializing_if = "Option::is_none")]
5107	    pub label: Option<String>,
5108	    #[serde(skip_serializing_if = "Option::is_none")]
5109	    pub message: Option<String>,
5110	    #[serde(skip_serializing_if = "Option::is_none")]
5111	    pub partid: Option<u64>,
5112	    #[serde(skip_serializing_if = "Option::is_none")]
5113	    pub payment_preimage: Option<Secret>,
5114	    #[serde(skip_serializing_if = "Option::is_none")]
5115	    pub updated_index: Option<u64>,
5116	    // Path `SendPay.status`
5117	    pub status: SendpayStatus,
5118	    pub amount_sent_msat: Amount,
5119	    pub created_at: u64,
5120	    pub id: u64,
5121	    pub payment_hash: Sha256,
5122	}
5123
5124	impl TryFrom<Response> for SendpayResponse {
5125	    type Error = super::TryFromResponseError;
5126
5127	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5128	        match response {
5129	            Response::SendPay(response) => Ok(response),
5130	            _ => Err(TryFromResponseError)
5131	        }
5132	    }
5133	}
5134
5135	#[derive(Clone, Debug, Deserialize, Serialize)]
5136	pub struct ListchannelsChannels {
5137	    #[serde(skip_serializing_if = "Option::is_none")]
5138	    pub htlc_maximum_msat: Option<Amount>,
5139	    pub active: bool,
5140	    pub amount_msat: Amount,
5141	    pub base_fee_millisatoshi: u32,
5142	    pub channel_flags: u8,
5143	    pub delay: u32,
5144	    pub destination: PublicKey,
5145	    pub direction: u32,
5146	    pub features: String,
5147	    pub fee_per_millionth: u32,
5148	    pub htlc_minimum_msat: Amount,
5149	    pub last_update: u32,
5150	    pub message_flags: u8,
5151	    pub public: bool,
5152	    pub short_channel_id: ShortChannelId,
5153	    pub source: PublicKey,
5154	}
5155
5156	#[derive(Clone, Debug, Deserialize, Serialize)]
5157	pub struct ListchannelsResponse {
5158	    pub channels: Vec<ListchannelsChannels>,
5159	}
5160
5161	impl TryFrom<Response> for ListchannelsResponse {
5162	    type Error = super::TryFromResponseError;
5163
5164	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5165	        match response {
5166	            Response::ListChannels(response) => Ok(response),
5167	            _ => Err(TryFromResponseError)
5168	        }
5169	    }
5170	}
5171
5172	#[derive(Clone, Debug, Deserialize, Serialize)]
5173	pub struct AddgossipResponse {
5174	}
5175
5176	impl TryFrom<Response> for AddgossipResponse {
5177	    type Error = super::TryFromResponseError;
5178
5179	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5180	        match response {
5181	            Response::AddGossip(response) => Ok(response),
5182	            _ => Err(TryFromResponseError)
5183	        }
5184	    }
5185	}
5186
5187	#[derive(Clone, Debug, Deserialize, Serialize)]
5188	pub struct AddpsbtoutputResponse {
5189	    pub estimated_added_weight: u32,
5190	    pub outnum: u32,
5191	    pub psbt: String,
5192	}
5193
5194	impl TryFrom<Response> for AddpsbtoutputResponse {
5195	    type Error = super::TryFromResponseError;
5196
5197	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5198	        match response {
5199	            Response::AddPsbtOutput(response) => Ok(response),
5200	            _ => Err(TryFromResponseError)
5201	        }
5202	    }
5203	}
5204
5205	#[derive(Clone, Debug, Deserialize, Serialize)]
5206	pub struct AutocleanonceAutocleanExpiredinvoices {
5207	    pub cleaned: u64,
5208	    pub uncleaned: u64,
5209	}
5210
5211	#[derive(Clone, Debug, Deserialize, Serialize)]
5212	pub struct AutocleanonceAutocleanFailedforwards {
5213	    pub cleaned: u64,
5214	    pub uncleaned: u64,
5215	}
5216
5217	#[derive(Clone, Debug, Deserialize, Serialize)]
5218	pub struct AutocleanonceAutocleanFailedpays {
5219	    pub cleaned: u64,
5220	    pub uncleaned: u64,
5221	}
5222
5223	#[derive(Clone, Debug, Deserialize, Serialize)]
5224	pub struct AutocleanonceAutocleanPaidinvoices {
5225	    pub cleaned: u64,
5226	    pub uncleaned: u64,
5227	}
5228
5229	#[derive(Clone, Debug, Deserialize, Serialize)]
5230	pub struct AutocleanonceAutocleanSucceededforwards {
5231	    pub cleaned: u64,
5232	    pub uncleaned: u64,
5233	}
5234
5235	#[derive(Clone, Debug, Deserialize, Serialize)]
5236	pub struct AutocleanonceAutocleanSucceededpays {
5237	    pub cleaned: u64,
5238	    pub uncleaned: u64,
5239	}
5240
5241	#[derive(Clone, Debug, Deserialize, Serialize)]
5242	pub struct AutocleanonceAutoclean {
5243	    #[serde(skip_serializing_if = "Option::is_none")]
5244	    pub expiredinvoices: Option<AutocleanonceAutocleanExpiredinvoices>,
5245	    #[serde(skip_serializing_if = "Option::is_none")]
5246	    pub failedforwards: Option<AutocleanonceAutocleanFailedforwards>,
5247	    #[serde(skip_serializing_if = "Option::is_none")]
5248	    pub failedpays: Option<AutocleanonceAutocleanFailedpays>,
5249	    #[serde(skip_serializing_if = "Option::is_none")]
5250	    pub paidinvoices: Option<AutocleanonceAutocleanPaidinvoices>,
5251	    #[serde(skip_serializing_if = "Option::is_none")]
5252	    pub succeededforwards: Option<AutocleanonceAutocleanSucceededforwards>,
5253	    #[serde(skip_serializing_if = "Option::is_none")]
5254	    pub succeededpays: Option<AutocleanonceAutocleanSucceededpays>,
5255	}
5256
5257	#[derive(Clone, Debug, Deserialize, Serialize)]
5258	pub struct AutocleanonceResponse {
5259	    pub autoclean: AutocleanonceAutoclean,
5260	}
5261
5262	impl TryFrom<Response> for AutocleanonceResponse {
5263	    type Error = super::TryFromResponseError;
5264
5265	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5266	        match response {
5267	            Response::AutoCleanOnce(response) => Ok(response),
5268	            _ => Err(TryFromResponseError)
5269	        }
5270	    }
5271	}
5272
5273	#[derive(Clone, Debug, Deserialize, Serialize)]
5274	pub struct AutocleanstatusAutocleanExpiredinvoices {
5275	    #[serde(skip_serializing_if = "Option::is_none")]
5276	    pub age: Option<u64>,
5277	    pub cleaned: u64,
5278	    pub enabled: bool,
5279	}
5280
5281	#[derive(Clone, Debug, Deserialize, Serialize)]
5282	pub struct AutocleanstatusAutocleanFailedforwards {
5283	    #[serde(skip_serializing_if = "Option::is_none")]
5284	    pub age: Option<u64>,
5285	    pub cleaned: u64,
5286	    pub enabled: bool,
5287	}
5288
5289	#[derive(Clone, Debug, Deserialize, Serialize)]
5290	pub struct AutocleanstatusAutocleanFailedpays {
5291	    #[serde(skip_serializing_if = "Option::is_none")]
5292	    pub age: Option<u64>,
5293	    pub cleaned: u64,
5294	    pub enabled: bool,
5295	}
5296
5297	#[derive(Clone, Debug, Deserialize, Serialize)]
5298	pub struct AutocleanstatusAutocleanPaidinvoices {
5299	    #[serde(skip_serializing_if = "Option::is_none")]
5300	    pub age: Option<u64>,
5301	    pub cleaned: u64,
5302	    pub enabled: bool,
5303	}
5304
5305	#[derive(Clone, Debug, Deserialize, Serialize)]
5306	pub struct AutocleanstatusAutocleanSucceededforwards {
5307	    #[serde(skip_serializing_if = "Option::is_none")]
5308	    pub age: Option<u64>,
5309	    pub cleaned: u64,
5310	    pub enabled: bool,
5311	}
5312
5313	#[derive(Clone, Debug, Deserialize, Serialize)]
5314	pub struct AutocleanstatusAutocleanSucceededpays {
5315	    #[serde(skip_serializing_if = "Option::is_none")]
5316	    pub age: Option<u64>,
5317	    pub cleaned: u64,
5318	    pub enabled: bool,
5319	}
5320
5321	#[derive(Clone, Debug, Deserialize, Serialize)]
5322	pub struct AutocleanstatusAutoclean {
5323	    #[serde(skip_serializing_if = "Option::is_none")]
5324	    pub expiredinvoices: Option<AutocleanstatusAutocleanExpiredinvoices>,
5325	    #[serde(skip_serializing_if = "Option::is_none")]
5326	    pub failedforwards: Option<AutocleanstatusAutocleanFailedforwards>,
5327	    #[serde(skip_serializing_if = "Option::is_none")]
5328	    pub failedpays: Option<AutocleanstatusAutocleanFailedpays>,
5329	    #[serde(skip_serializing_if = "Option::is_none")]
5330	    pub paidinvoices: Option<AutocleanstatusAutocleanPaidinvoices>,
5331	    #[serde(skip_serializing_if = "Option::is_none")]
5332	    pub succeededforwards: Option<AutocleanstatusAutocleanSucceededforwards>,
5333	    #[serde(skip_serializing_if = "Option::is_none")]
5334	    pub succeededpays: Option<AutocleanstatusAutocleanSucceededpays>,
5335	}
5336
5337	#[derive(Clone, Debug, Deserialize, Serialize)]
5338	pub struct AutocleanstatusResponse {
5339	    pub autoclean: AutocleanstatusAutoclean,
5340	}
5341
5342	impl TryFrom<Response> for AutocleanstatusResponse {
5343	    type Error = super::TryFromResponseError;
5344
5345	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5346	        match response {
5347	            Response::AutoCleanStatus(response) => Ok(response),
5348	            _ => Err(TryFromResponseError)
5349	        }
5350	    }
5351	}
5352
5353	#[derive(Clone, Debug, Deserialize, Serialize)]
5354	pub struct CheckmessageResponse {
5355	    pub pubkey: PublicKey,
5356	    pub verified: bool,
5357	}
5358
5359	impl TryFrom<Response> for CheckmessageResponse {
5360	    type Error = super::TryFromResponseError;
5361
5362	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5363	        match response {
5364	            Response::CheckMessage(response) => Ok(response),
5365	            _ => Err(TryFromResponseError)
5366	        }
5367	    }
5368	}
5369
5370	/// ['Whether we successfully negotiated a mutual close, closed without them, or discarded not-yet-opened channel.']
5371	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
5372	#[allow(non_camel_case_types)]
5373	pub enum CloseType {
5374	    #[serde(rename = "mutual")]
5375	    MUTUAL = 0,
5376	    #[serde(rename = "unilateral")]
5377	    UNILATERAL = 1,
5378	    #[serde(rename = "unopened")]
5379	    UNOPENED = 2,
5380	}
5381
5382	impl TryFrom<i32> for CloseType {
5383	    type Error = anyhow::Error;
5384	    fn try_from(c: i32) -> Result<CloseType, anyhow::Error> {
5385	        match c {
5386	    0 => Ok(CloseType::MUTUAL),
5387	    1 => Ok(CloseType::UNILATERAL),
5388	    2 => Ok(CloseType::UNOPENED),
5389	            o => Err(anyhow::anyhow!("Unknown variant {} for enum CloseType", o)),
5390	        }
5391	    }
5392	}
5393
5394	impl ToString for CloseType {
5395	    fn to_string(&self) -> String {
5396	        match self {
5397	            CloseType::MUTUAL => "MUTUAL",
5398	            CloseType::UNILATERAL => "UNILATERAL",
5399	            CloseType::UNOPENED => "UNOPENED",
5400	        }.to_string()
5401	    }
5402	}
5403
5404	#[derive(Clone, Debug, Deserialize, Serialize)]
5405	pub struct CloseResponse {
5406	    #[deprecated]
5407	    #[serde(skip_serializing_if = "Option::is_none")]
5408	    pub tx: Option<String>,
5409	    #[deprecated]
5410	    #[serde(skip_serializing_if = "Option::is_none")]
5411	    pub txid: Option<String>,
5412	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
5413	    pub txids: Option<Vec<String>>,
5414	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
5415	    pub txs: Option<Vec<String>>,
5416	    // Path `Close.type`
5417	    #[serde(rename = "type")]
5418	    pub item_type: CloseType,
5419	}
5420
5421	impl TryFrom<Response> for CloseResponse {
5422	    type Error = super::TryFromResponseError;
5423
5424	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5425	        match response {
5426	            Response::Close(response) => Ok(response),
5427	            _ => Err(TryFromResponseError)
5428	        }
5429	    }
5430	}
5431
5432	/// ['Whether they initiated connection or we did.']
5433	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
5434	#[allow(non_camel_case_types)]
5435	pub enum ConnectDirection {
5436	    #[serde(rename = "in")]
5437	    IN = 0,
5438	    #[serde(rename = "out")]
5439	    OUT = 1,
5440	}
5441
5442	impl TryFrom<i32> for ConnectDirection {
5443	    type Error = anyhow::Error;
5444	    fn try_from(c: i32) -> Result<ConnectDirection, anyhow::Error> {
5445	        match c {
5446	    0 => Ok(ConnectDirection::IN),
5447	    1 => Ok(ConnectDirection::OUT),
5448	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ConnectDirection", o)),
5449	        }
5450	    }
5451	}
5452
5453	impl ToString for ConnectDirection {
5454	    fn to_string(&self) -> String {
5455	        match self {
5456	            ConnectDirection::IN => "IN",
5457	            ConnectDirection::OUT => "OUT",
5458	        }.to_string()
5459	    }
5460	}
5461
5462	/// ['Type of connection (*torv2*/*torv3* only if **direction** is *out*).']
5463	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
5464	#[allow(non_camel_case_types)]
5465	pub enum ConnectAddressType {
5466	    #[serde(rename = "local socket")]
5467	    LOCAL_SOCKET = 0,
5468	    #[serde(rename = "ipv4")]
5469	    IPV4 = 1,
5470	    #[serde(rename = "ipv6")]
5471	    IPV6 = 2,
5472	    #[serde(rename = "torv2")]
5473	    TORV2 = 3,
5474	    #[serde(rename = "torv3")]
5475	    TORV3 = 4,
5476	}
5477
5478	impl TryFrom<i32> for ConnectAddressType {
5479	    type Error = anyhow::Error;
5480	    fn try_from(c: i32) -> Result<ConnectAddressType, anyhow::Error> {
5481	        match c {
5482	    0 => Ok(ConnectAddressType::LOCAL_SOCKET),
5483	    1 => Ok(ConnectAddressType::IPV4),
5484	    2 => Ok(ConnectAddressType::IPV6),
5485	    3 => Ok(ConnectAddressType::TORV2),
5486	    4 => Ok(ConnectAddressType::TORV3),
5487	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ConnectAddressType", o)),
5488	        }
5489	    }
5490	}
5491
5492	impl ToString for ConnectAddressType {
5493	    fn to_string(&self) -> String {
5494	        match self {
5495	            ConnectAddressType::LOCAL_SOCKET => "LOCAL_SOCKET",
5496	            ConnectAddressType::IPV4 => "IPV4",
5497	            ConnectAddressType::IPV6 => "IPV6",
5498	            ConnectAddressType::TORV2 => "TORV2",
5499	            ConnectAddressType::TORV3 => "TORV3",
5500	        }.to_string()
5501	    }
5502	}
5503
5504	#[derive(Clone, Debug, Deserialize, Serialize)]
5505	pub struct ConnectAddress {
5506	    #[serde(skip_serializing_if = "Option::is_none")]
5507	    pub address: Option<String>,
5508	    #[serde(skip_serializing_if = "Option::is_none")]
5509	    pub port: Option<u16>,
5510	    #[serde(skip_serializing_if = "Option::is_none")]
5511	    pub socket: Option<String>,
5512	    // Path `Connect.address.type`
5513	    #[serde(rename = "type")]
5514	    pub item_type: ConnectAddressType,
5515	}
5516
5517	#[derive(Clone, Debug, Deserialize, Serialize)]
5518	pub struct ConnectResponse {
5519	    // Path `Connect.direction`
5520	    pub direction: ConnectDirection,
5521	    pub address: ConnectAddress,
5522	    pub features: String,
5523	    pub id: PublicKey,
5524	}
5525
5526	impl TryFrom<Response> for ConnectResponse {
5527	    type Error = super::TryFromResponseError;
5528
5529	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5530	        match response {
5531	            Response::Connect(response) => Ok(response),
5532	            _ => Err(TryFromResponseError)
5533	        }
5534	    }
5535	}
5536
5537	#[derive(Clone, Debug, Deserialize, Serialize)]
5538	pub struct CreateinvoicePaidOutpoint {
5539	    pub outnum: u32,
5540	    pub txid: String,
5541	}
5542
5543	/// ['Whether it has been paid, or can no longer be paid.']
5544	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
5545	#[allow(non_camel_case_types)]
5546	pub enum CreateinvoiceStatus {
5547	    #[serde(rename = "paid")]
5548	    PAID = 0,
5549	    #[serde(rename = "expired")]
5550	    EXPIRED = 1,
5551	    #[serde(rename = "unpaid")]
5552	    UNPAID = 2,
5553	}
5554
5555	impl TryFrom<i32> for CreateinvoiceStatus {
5556	    type Error = anyhow::Error;
5557	    fn try_from(c: i32) -> Result<CreateinvoiceStatus, anyhow::Error> {
5558	        match c {
5559	    0 => Ok(CreateinvoiceStatus::PAID),
5560	    1 => Ok(CreateinvoiceStatus::EXPIRED),
5561	    2 => Ok(CreateinvoiceStatus::UNPAID),
5562	            o => Err(anyhow::anyhow!("Unknown variant {} for enum CreateinvoiceStatus", o)),
5563	        }
5564	    }
5565	}
5566
5567	impl ToString for CreateinvoiceStatus {
5568	    fn to_string(&self) -> String {
5569	        match self {
5570	            CreateinvoiceStatus::PAID => "PAID",
5571	            CreateinvoiceStatus::EXPIRED => "EXPIRED",
5572	            CreateinvoiceStatus::UNPAID => "UNPAID",
5573	        }.to_string()
5574	    }
5575	}
5576
5577	#[derive(Clone, Debug, Deserialize, Serialize)]
5578	pub struct CreateinvoiceResponse {
5579	    #[serde(skip_serializing_if = "Option::is_none")]
5580	    pub amount_msat: Option<Amount>,
5581	    #[serde(skip_serializing_if = "Option::is_none")]
5582	    pub amount_received_msat: Option<Amount>,
5583	    #[serde(skip_serializing_if = "Option::is_none")]
5584	    pub bolt11: Option<String>,
5585	    #[serde(skip_serializing_if = "Option::is_none")]
5586	    pub bolt12: Option<String>,
5587	    #[serde(skip_serializing_if = "Option::is_none")]
5588	    pub created_index: Option<u64>,
5589	    #[serde(skip_serializing_if = "Option::is_none")]
5590	    pub invreq_payer_note: Option<String>,
5591	    #[serde(skip_serializing_if = "Option::is_none")]
5592	    pub local_offer_id: Option<String>,
5593	    #[serde(skip_serializing_if = "Option::is_none")]
5594	    pub paid_at: Option<u64>,
5595	    #[serde(skip_serializing_if = "Option::is_none")]
5596	    pub paid_outpoint: Option<CreateinvoicePaidOutpoint>,
5597	    #[serde(skip_serializing_if = "Option::is_none")]
5598	    pub pay_index: Option<u64>,
5599	    #[serde(skip_serializing_if = "Option::is_none")]
5600	    pub payment_preimage: Option<Secret>,
5601	    // Path `CreateInvoice.status`
5602	    pub status: CreateinvoiceStatus,
5603	    pub description: String,
5604	    pub expires_at: u64,
5605	    pub label: String,
5606	    pub payment_hash: Sha256,
5607	}
5608
5609	impl TryFrom<Response> for CreateinvoiceResponse {
5610	    type Error = super::TryFromResponseError;
5611
5612	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5613	        match response {
5614	            Response::CreateInvoice(response) => Ok(response),
5615	            _ => Err(TryFromResponseError)
5616	        }
5617	    }
5618	}
5619
5620	#[derive(Clone, Debug, Deserialize, Serialize)]
5621	pub struct DatastoreResponse {
5622	    #[serde(skip_serializing_if = "Option::is_none")]
5623	    pub generation: Option<u64>,
5624	    #[serde(skip_serializing_if = "Option::is_none")]
5625	    pub hex: Option<String>,
5626	    #[serde(skip_serializing_if = "Option::is_none")]
5627	    pub string: Option<String>,
5628	    pub key: Vec<String>,
5629	}
5630
5631	impl TryFrom<Response> for DatastoreResponse {
5632	    type Error = super::TryFromResponseError;
5633
5634	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5635	        match response {
5636	            Response::Datastore(response) => Ok(response),
5637	            _ => Err(TryFromResponseError)
5638	        }
5639	    }
5640	}
5641
5642	#[derive(Clone, Debug, Deserialize, Serialize)]
5643	pub struct DatastoreusageDatastoreusage {
5644	    pub key: String,
5645	    pub total_bytes: u64,
5646	}
5647
5648	#[derive(Clone, Debug, Deserialize, Serialize)]
5649	pub struct DatastoreusageResponse {
5650	    pub datastoreusage: DatastoreusageDatastoreusage,
5651	}
5652
5653	impl TryFrom<Response> for DatastoreusageResponse {
5654	    type Error = super::TryFromResponseError;
5655
5656	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5657	        match response {
5658	            Response::DatastoreUsage(response) => Ok(response),
5659	            _ => Err(TryFromResponseError)
5660	        }
5661	    }
5662	}
5663
5664	#[derive(Clone, Debug, Deserialize, Serialize)]
5665	pub struct CreateonionResponse {
5666	    pub onion: String,
5667	    pub shared_secrets: Vec<Secret>,
5668	}
5669
5670	impl TryFrom<Response> for CreateonionResponse {
5671	    type Error = super::TryFromResponseError;
5672
5673	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5674	        match response {
5675	            Response::CreateOnion(response) => Ok(response),
5676	            _ => Err(TryFromResponseError)
5677	        }
5678	    }
5679	}
5680
5681	#[derive(Clone, Debug, Deserialize, Serialize)]
5682	pub struct DeldatastoreResponse {
5683	    #[serde(skip_serializing_if = "Option::is_none")]
5684	    pub generation: Option<u64>,
5685	    #[serde(skip_serializing_if = "Option::is_none")]
5686	    pub hex: Option<String>,
5687	    #[serde(skip_serializing_if = "Option::is_none")]
5688	    pub string: Option<String>,
5689	    pub key: Vec<String>,
5690	}
5691
5692	impl TryFrom<Response> for DeldatastoreResponse {
5693	    type Error = super::TryFromResponseError;
5694
5695	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5696	        match response {
5697	            Response::DelDatastore(response) => Ok(response),
5698	            _ => Err(TryFromResponseError)
5699	        }
5700	    }
5701	}
5702
5703	/// ['State of invoice.']
5704	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
5705	#[allow(non_camel_case_types)]
5706	pub enum DelinvoiceStatus {
5707	    #[serde(rename = "paid")]
5708	    PAID = 0,
5709	    #[serde(rename = "expired")]
5710	    EXPIRED = 1,
5711	    #[serde(rename = "unpaid")]
5712	    UNPAID = 2,
5713	}
5714
5715	impl TryFrom<i32> for DelinvoiceStatus {
5716	    type Error = anyhow::Error;
5717	    fn try_from(c: i32) -> Result<DelinvoiceStatus, anyhow::Error> {
5718	        match c {
5719	    0 => Ok(DelinvoiceStatus::PAID),
5720	    1 => Ok(DelinvoiceStatus::EXPIRED),
5721	    2 => Ok(DelinvoiceStatus::UNPAID),
5722	            o => Err(anyhow::anyhow!("Unknown variant {} for enum DelinvoiceStatus", o)),
5723	        }
5724	    }
5725	}
5726
5727	impl ToString for DelinvoiceStatus {
5728	    fn to_string(&self) -> String {
5729	        match self {
5730	            DelinvoiceStatus::PAID => "PAID",
5731	            DelinvoiceStatus::EXPIRED => "EXPIRED",
5732	            DelinvoiceStatus::UNPAID => "UNPAID",
5733	        }.to_string()
5734	    }
5735	}
5736
5737	#[derive(Clone, Debug, Deserialize, Serialize)]
5738	pub struct DelinvoiceResponse {
5739	    #[serde(skip_serializing_if = "Option::is_none")]
5740	    pub amount_msat: Option<Amount>,
5741	    #[serde(skip_serializing_if = "Option::is_none")]
5742	    pub amount_received_msat: Option<Amount>,
5743	    #[serde(skip_serializing_if = "Option::is_none")]
5744	    pub bolt11: Option<String>,
5745	    #[serde(skip_serializing_if = "Option::is_none")]
5746	    pub bolt12: Option<String>,
5747	    #[serde(skip_serializing_if = "Option::is_none")]
5748	    pub created_index: Option<u64>,
5749	    #[serde(skip_serializing_if = "Option::is_none")]
5750	    pub description: Option<String>,
5751	    #[serde(skip_serializing_if = "Option::is_none")]
5752	    pub invreq_payer_note: Option<String>,
5753	    #[serde(skip_serializing_if = "Option::is_none")]
5754	    pub local_offer_id: Option<String>,
5755	    #[serde(skip_serializing_if = "Option::is_none")]
5756	    pub paid_at: Option<u64>,
5757	    #[serde(skip_serializing_if = "Option::is_none")]
5758	    pub pay_index: Option<u64>,
5759	    #[serde(skip_serializing_if = "Option::is_none")]
5760	    pub payment_preimage: Option<Secret>,
5761	    #[serde(skip_serializing_if = "Option::is_none")]
5762	    pub updated_index: Option<u64>,
5763	    // Path `DelInvoice.status`
5764	    pub status: DelinvoiceStatus,
5765	    pub expires_at: u64,
5766	    pub label: String,
5767	    pub payment_hash: Sha256,
5768	}
5769
5770	impl TryFrom<Response> for DelinvoiceResponse {
5771	    type Error = super::TryFromResponseError;
5772
5773	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5774	        match response {
5775	            Response::DelInvoice(response) => Ok(response),
5776	            _ => Err(TryFromResponseError)
5777	        }
5778	    }
5779	}
5780
5781	#[derive(Clone, Debug, Deserialize, Serialize)]
5782	pub struct DevforgetchannelResponse {
5783	    pub forced: bool,
5784	    pub funding_txid: String,
5785	    pub funding_unspent: bool,
5786	}
5787
5788	impl TryFrom<Response> for DevforgetchannelResponse {
5789	    type Error = super::TryFromResponseError;
5790
5791	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5792	        match response {
5793	            Response::DevForgetChannel(response) => Ok(response),
5794	            _ => Err(TryFromResponseError)
5795	        }
5796	    }
5797	}
5798
5799	#[derive(Clone, Debug, Deserialize, Serialize)]
5800	pub struct EmergencyrecoverResponse {
5801	    pub stubs: Vec<Sha256>,
5802	}
5803
5804	impl TryFrom<Response> for EmergencyrecoverResponse {
5805	    type Error = super::TryFromResponseError;
5806
5807	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5808	        match response {
5809	            Response::EmergencyRecover(response) => Ok(response),
5810	            _ => Err(TryFromResponseError)
5811	        }
5812	    }
5813	}
5814
5815	#[derive(Clone, Debug, Deserialize, Serialize)]
5816	pub struct GetemergencyrecoverdataResponse {
5817	    pub filedata: String,
5818	}
5819
5820	impl TryFrom<Response> for GetemergencyrecoverdataResponse {
5821	    type Error = super::TryFromResponseError;
5822
5823	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5824	        match response {
5825	            Response::GetEmergencyRecoverData(response) => Ok(response),
5826	            _ => Err(TryFromResponseError)
5827	        }
5828	    }
5829	}
5830
5831	#[derive(Clone, Debug, Deserialize, Serialize)]
5832	pub struct ExposesecretResponse {
5833	    pub codex32: String,
5834	    pub identifier: String,
5835	}
5836
5837	impl TryFrom<Response> for ExposesecretResponse {
5838	    type Error = super::TryFromResponseError;
5839
5840	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5841	        match response {
5842	            Response::ExposeSecret(response) => Ok(response),
5843	            _ => Err(TryFromResponseError)
5844	        }
5845	    }
5846	}
5847
5848	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
5849	#[allow(non_camel_case_types)]
5850	pub enum RecoverResult {
5851	    #[serde(rename = "Recovery restart in progress")]
5852	    RECOVERY_RESTART_IN_PROGRESS = 0,
5853	}
5854
5855	impl TryFrom<i32> for RecoverResult {
5856	    type Error = anyhow::Error;
5857	    fn try_from(c: i32) -> Result<RecoverResult, anyhow::Error> {
5858	        match c {
5859	    0 => Ok(RecoverResult::RECOVERY_RESTART_IN_PROGRESS),
5860	            o => Err(anyhow::anyhow!("Unknown variant {} for enum RecoverResult", o)),
5861	        }
5862	    }
5863	}
5864
5865	impl ToString for RecoverResult {
5866	    fn to_string(&self) -> String {
5867	        match self {
5868	            RecoverResult::RECOVERY_RESTART_IN_PROGRESS => "RECOVERY_RESTART_IN_PROGRESS",
5869	        }.to_string()
5870	    }
5871	}
5872
5873	#[derive(Clone, Debug, Deserialize, Serialize)]
5874	pub struct RecoverResponse {
5875	    #[serde(skip_serializing_if = "Option::is_none")]
5876	    pub result: Option<RecoverResult>,
5877	}
5878
5879	impl TryFrom<Response> for RecoverResponse {
5880	    type Error = super::TryFromResponseError;
5881
5882	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5883	        match response {
5884	            Response::Recover(response) => Ok(response),
5885	            _ => Err(TryFromResponseError)
5886	        }
5887	    }
5888	}
5889
5890	#[derive(Clone, Debug, Deserialize, Serialize)]
5891	pub struct RecoverchannelResponse {
5892	    pub stubs: Vec<String>,
5893	}
5894
5895	impl TryFrom<Response> for RecoverchannelResponse {
5896	    type Error = super::TryFromResponseError;
5897
5898	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5899	        match response {
5900	            Response::RecoverChannel(response) => Ok(response),
5901	            _ => Err(TryFromResponseError)
5902	        }
5903	    }
5904	}
5905
5906	#[derive(Clone, Debug, Deserialize, Serialize)]
5907	pub struct InvoiceResponse {
5908	    #[serde(skip_serializing_if = "Option::is_none")]
5909	    pub created_index: Option<u64>,
5910	    #[serde(skip_serializing_if = "Option::is_none")]
5911	    pub warning_capacity: Option<String>,
5912	    #[serde(skip_serializing_if = "Option::is_none")]
5913	    pub warning_deadends: Option<String>,
5914	    #[serde(skip_serializing_if = "Option::is_none")]
5915	    pub warning_mpp: Option<String>,
5916	    #[serde(skip_serializing_if = "Option::is_none")]
5917	    pub warning_offline: Option<String>,
5918	    #[serde(skip_serializing_if = "Option::is_none")]
5919	    pub warning_private_unused: Option<String>,
5920	    pub bolt11: String,
5921	    pub expires_at: u64,
5922	    pub payment_hash: Sha256,
5923	    pub payment_secret: Secret,
5924	}
5925
5926	impl TryFrom<Response> for InvoiceResponse {
5927	    type Error = super::TryFromResponseError;
5928
5929	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5930	        match response {
5931	            Response::Invoice(response) => Ok(response),
5932	            _ => Err(TryFromResponseError)
5933	        }
5934	    }
5935	}
5936
5937	#[derive(Clone, Debug, Deserialize, Serialize)]
5938	pub struct InvoicerequestResponse {
5939	    #[serde(skip_serializing_if = "Option::is_none")]
5940	    pub label: Option<String>,
5941	    pub active: bool,
5942	    pub bolt12: String,
5943	    pub invreq_id: Sha256,
5944	    pub single_use: bool,
5945	    pub used: bool,
5946	}
5947
5948	impl TryFrom<Response> for InvoicerequestResponse {
5949	    type Error = super::TryFromResponseError;
5950
5951	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5952	        match response {
5953	            Response::InvoiceRequest(response) => Ok(response),
5954	            _ => Err(TryFromResponseError)
5955	        }
5956	    }
5957	}
5958
5959	#[derive(Clone, Debug, Deserialize, Serialize)]
5960	pub struct DisableinvoicerequestResponse {
5961	    #[serde(skip_serializing_if = "Option::is_none")]
5962	    pub label: Option<String>,
5963	    pub active: bool,
5964	    pub bolt12: String,
5965	    pub invreq_id: Sha256,
5966	    pub single_use: bool,
5967	    pub used: bool,
5968	}
5969
5970	impl TryFrom<Response> for DisableinvoicerequestResponse {
5971	    type Error = super::TryFromResponseError;
5972
5973	    fn try_from(response: Response) -> Result<Self, Self::Error> {
5974	        match response {
5975	            Response::DisableInvoiceRequest(response) => Ok(response),
5976	            _ => Err(TryFromResponseError)
5977	        }
5978	    }
5979	}
5980
5981	#[derive(Clone, Debug, Deserialize, Serialize)]
5982	pub struct ListinvoicerequestsInvoicerequests {
5983	    #[serde(skip_serializing_if = "Option::is_none")]
5984	    pub label: Option<String>,
5985	    pub active: bool,
5986	    pub bolt12: String,
5987	    pub invreq_id: Sha256,
5988	    pub single_use: bool,
5989	    pub used: bool,
5990	}
5991
5992	#[derive(Clone, Debug, Deserialize, Serialize)]
5993	pub struct ListinvoicerequestsResponse {
5994	    pub invoicerequests: Vec<ListinvoicerequestsInvoicerequests>,
5995	}
5996
5997	impl TryFrom<Response> for ListinvoicerequestsResponse {
5998	    type Error = super::TryFromResponseError;
5999
6000	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6001	        match response {
6002	            Response::ListInvoiceRequests(response) => Ok(response),
6003	            _ => Err(TryFromResponseError)
6004	        }
6005	    }
6006	}
6007
6008	#[derive(Clone, Debug, Deserialize, Serialize)]
6009	pub struct ListdatastoreDatastore {
6010	    #[serde(skip_serializing_if = "Option::is_none")]
6011	    pub generation: Option<u64>,
6012	    #[serde(skip_serializing_if = "Option::is_none")]
6013	    pub hex: Option<String>,
6014	    #[serde(skip_serializing_if = "Option::is_none")]
6015	    pub string: Option<String>,
6016	    pub key: Vec<String>,
6017	}
6018
6019	#[derive(Clone, Debug, Deserialize, Serialize)]
6020	pub struct ListdatastoreResponse {
6021	    pub datastore: Vec<ListdatastoreDatastore>,
6022	}
6023
6024	impl TryFrom<Response> for ListdatastoreResponse {
6025	    type Error = super::TryFromResponseError;
6026
6027	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6028	        match response {
6029	            Response::ListDatastore(response) => Ok(response),
6030	            _ => Err(TryFromResponseError)
6031	        }
6032	    }
6033	}
6034
6035	#[derive(Clone, Debug, Deserialize, Serialize)]
6036	pub struct ListinvoicesInvoicesPaidOutpoint {
6037	    pub outnum: u32,
6038	    pub txid: String,
6039	}
6040
6041	/// ["Whether it's paid, unpaid or unpayable."]
6042	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
6043	#[allow(non_camel_case_types)]
6044	pub enum ListinvoicesInvoicesStatus {
6045	    #[serde(rename = "unpaid")]
6046	    UNPAID = 0,
6047	    #[serde(rename = "paid")]
6048	    PAID = 1,
6049	    #[serde(rename = "expired")]
6050	    EXPIRED = 2,
6051	}
6052
6053	impl TryFrom<i32> for ListinvoicesInvoicesStatus {
6054	    type Error = anyhow::Error;
6055	    fn try_from(c: i32) -> Result<ListinvoicesInvoicesStatus, anyhow::Error> {
6056	        match c {
6057	    0 => Ok(ListinvoicesInvoicesStatus::UNPAID),
6058	    1 => Ok(ListinvoicesInvoicesStatus::PAID),
6059	    2 => Ok(ListinvoicesInvoicesStatus::EXPIRED),
6060	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListinvoicesInvoicesStatus", o)),
6061	        }
6062	    }
6063	}
6064
6065	impl ToString for ListinvoicesInvoicesStatus {
6066	    fn to_string(&self) -> String {
6067	        match self {
6068	            ListinvoicesInvoicesStatus::UNPAID => "UNPAID",
6069	            ListinvoicesInvoicesStatus::PAID => "PAID",
6070	            ListinvoicesInvoicesStatus::EXPIRED => "EXPIRED",
6071	        }.to_string()
6072	    }
6073	}
6074
6075	#[derive(Clone, Debug, Deserialize, Serialize)]
6076	pub struct ListinvoicesInvoices {
6077	    #[serde(skip_serializing_if = "Option::is_none")]
6078	    pub amount_msat: Option<Amount>,
6079	    #[serde(skip_serializing_if = "Option::is_none")]
6080	    pub amount_received_msat: Option<Amount>,
6081	    #[serde(skip_serializing_if = "Option::is_none")]
6082	    pub bolt11: Option<String>,
6083	    #[serde(skip_serializing_if = "Option::is_none")]
6084	    pub bolt12: Option<String>,
6085	    #[serde(skip_serializing_if = "Option::is_none")]
6086	    pub created_index: Option<u64>,
6087	    #[serde(skip_serializing_if = "Option::is_none")]
6088	    pub description: Option<String>,
6089	    #[serde(skip_serializing_if = "Option::is_none")]
6090	    pub invreq_payer_note: Option<String>,
6091	    #[serde(skip_serializing_if = "Option::is_none")]
6092	    pub local_offer_id: Option<Sha256>,
6093	    #[serde(skip_serializing_if = "Option::is_none")]
6094	    pub paid_at: Option<u64>,
6095	    #[serde(skip_serializing_if = "Option::is_none")]
6096	    pub paid_outpoint: Option<ListinvoicesInvoicesPaidOutpoint>,
6097	    #[serde(skip_serializing_if = "Option::is_none")]
6098	    pub pay_index: Option<u64>,
6099	    #[serde(skip_serializing_if = "Option::is_none")]
6100	    pub payment_preimage: Option<Secret>,
6101	    #[serde(skip_serializing_if = "Option::is_none")]
6102	    pub updated_index: Option<u64>,
6103	    // Path `ListInvoices.invoices[].status`
6104	    pub status: ListinvoicesInvoicesStatus,
6105	    pub expires_at: u64,
6106	    pub label: String,
6107	    pub payment_hash: Sha256,
6108	}
6109
6110	#[derive(Clone, Debug, Deserialize, Serialize)]
6111	pub struct ListinvoicesResponse {
6112	    pub invoices: Vec<ListinvoicesInvoices>,
6113	}
6114
6115	impl TryFrom<Response> for ListinvoicesResponse {
6116	    type Error = super::TryFromResponseError;
6117
6118	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6119	        match response {
6120	            Response::ListInvoices(response) => Ok(response),
6121	            _ => Err(TryFromResponseError)
6122	        }
6123	    }
6124	}
6125
6126	/// ['Status of the payment (could be complete if already sent previously).']
6127	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
6128	#[allow(non_camel_case_types)]
6129	pub enum SendonionStatus {
6130	    #[serde(rename = "pending")]
6131	    PENDING = 0,
6132	    #[serde(rename = "complete")]
6133	    COMPLETE = 1,
6134	}
6135
6136	impl TryFrom<i32> for SendonionStatus {
6137	    type Error = anyhow::Error;
6138	    fn try_from(c: i32) -> Result<SendonionStatus, anyhow::Error> {
6139	        match c {
6140	    0 => Ok(SendonionStatus::PENDING),
6141	    1 => Ok(SendonionStatus::COMPLETE),
6142	            o => Err(anyhow::anyhow!("Unknown variant {} for enum SendonionStatus", o)),
6143	        }
6144	    }
6145	}
6146
6147	impl ToString for SendonionStatus {
6148	    fn to_string(&self) -> String {
6149	        match self {
6150	            SendonionStatus::PENDING => "PENDING",
6151	            SendonionStatus::COMPLETE => "COMPLETE",
6152	        }.to_string()
6153	    }
6154	}
6155
6156	#[derive(Clone, Debug, Deserialize, Serialize)]
6157	pub struct SendonionResponse {
6158	    #[serde(skip_serializing_if = "Option::is_none")]
6159	    pub amount_msat: Option<Amount>,
6160	    #[serde(skip_serializing_if = "Option::is_none")]
6161	    pub bolt11: Option<String>,
6162	    #[serde(skip_serializing_if = "Option::is_none")]
6163	    pub bolt12: Option<String>,
6164	    #[serde(skip_serializing_if = "Option::is_none")]
6165	    pub created_index: Option<u64>,
6166	    #[serde(skip_serializing_if = "Option::is_none")]
6167	    pub destination: Option<PublicKey>,
6168	    #[serde(skip_serializing_if = "Option::is_none")]
6169	    pub label: Option<String>,
6170	    #[serde(skip_serializing_if = "Option::is_none")]
6171	    pub message: Option<String>,
6172	    #[serde(skip_serializing_if = "Option::is_none")]
6173	    pub partid: Option<u64>,
6174	    #[serde(skip_serializing_if = "Option::is_none")]
6175	    pub payment_preimage: Option<Secret>,
6176	    #[serde(skip_serializing_if = "Option::is_none")]
6177	    pub updated_index: Option<u64>,
6178	    // Path `SendOnion.status`
6179	    pub status: SendonionStatus,
6180	    pub amount_sent_msat: Amount,
6181	    pub created_at: u64,
6182	    pub id: u64,
6183	    pub payment_hash: Sha256,
6184	}
6185
6186	impl TryFrom<Response> for SendonionResponse {
6187	    type Error = super::TryFromResponseError;
6188
6189	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6190	        match response {
6191	            Response::SendOnion(response) => Ok(response),
6192	            _ => Err(TryFromResponseError)
6193	        }
6194	    }
6195	}
6196
6197	/// ['Status of the payment.']
6198	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
6199	#[allow(non_camel_case_types)]
6200	pub enum ListsendpaysPaymentsStatus {
6201	    #[serde(rename = "pending")]
6202	    PENDING = 0,
6203	    #[serde(rename = "failed")]
6204	    FAILED = 1,
6205	    #[serde(rename = "complete")]
6206	    COMPLETE = 2,
6207	}
6208
6209	impl TryFrom<i32> for ListsendpaysPaymentsStatus {
6210	    type Error = anyhow::Error;
6211	    fn try_from(c: i32) -> Result<ListsendpaysPaymentsStatus, anyhow::Error> {
6212	        match c {
6213	    0 => Ok(ListsendpaysPaymentsStatus::PENDING),
6214	    1 => Ok(ListsendpaysPaymentsStatus::FAILED),
6215	    2 => Ok(ListsendpaysPaymentsStatus::COMPLETE),
6216	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListsendpaysPaymentsStatus", o)),
6217	        }
6218	    }
6219	}
6220
6221	impl ToString for ListsendpaysPaymentsStatus {
6222	    fn to_string(&self) -> String {
6223	        match self {
6224	            ListsendpaysPaymentsStatus::PENDING => "PENDING",
6225	            ListsendpaysPaymentsStatus::FAILED => "FAILED",
6226	            ListsendpaysPaymentsStatus::COMPLETE => "COMPLETE",
6227	        }.to_string()
6228	    }
6229	}
6230
6231	#[derive(Clone, Debug, Deserialize, Serialize)]
6232	pub struct ListsendpaysPayments {
6233	    #[serde(skip_serializing_if = "Option::is_none")]
6234	    pub amount_msat: Option<Amount>,
6235	    #[serde(skip_serializing_if = "Option::is_none")]
6236	    pub bolt11: Option<String>,
6237	    #[serde(skip_serializing_if = "Option::is_none")]
6238	    pub bolt12: Option<String>,
6239	    #[serde(skip_serializing_if = "Option::is_none")]
6240	    pub completed_at: Option<u64>,
6241	    #[serde(skip_serializing_if = "Option::is_none")]
6242	    pub created_index: Option<u64>,
6243	    #[serde(skip_serializing_if = "Option::is_none")]
6244	    pub description: Option<String>,
6245	    #[serde(skip_serializing_if = "Option::is_none")]
6246	    pub destination: Option<PublicKey>,
6247	    #[serde(skip_serializing_if = "Option::is_none")]
6248	    pub erroronion: Option<String>,
6249	    #[serde(skip_serializing_if = "Option::is_none")]
6250	    pub label: Option<String>,
6251	    #[serde(skip_serializing_if = "Option::is_none")]
6252	    pub partid: Option<u64>,
6253	    #[serde(skip_serializing_if = "Option::is_none")]
6254	    pub payment_preimage: Option<Secret>,
6255	    #[serde(skip_serializing_if = "Option::is_none")]
6256	    pub updated_index: Option<u64>,
6257	    // Path `ListSendPays.payments[].status`
6258	    pub status: ListsendpaysPaymentsStatus,
6259	    pub amount_sent_msat: Amount,
6260	    pub created_at: u64,
6261	    pub groupid: u64,
6262	    pub id: u64,
6263	    pub payment_hash: Sha256,
6264	}
6265
6266	#[derive(Clone, Debug, Deserialize, Serialize)]
6267	pub struct ListsendpaysResponse {
6268	    pub payments: Vec<ListsendpaysPayments>,
6269	}
6270
6271	impl TryFrom<Response> for ListsendpaysResponse {
6272	    type Error = super::TryFromResponseError;
6273
6274	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6275	        match response {
6276	            Response::ListSendPays(response) => Ok(response),
6277	            _ => Err(TryFromResponseError)
6278	        }
6279	    }
6280	}
6281
6282	#[derive(Clone, Debug, Deserialize, Serialize)]
6283	pub struct ListtransactionsTransactionsInputs {
6284	    pub index: u32,
6285	    pub sequence: u32,
6286	    pub txid: String,
6287	}
6288
6289	#[derive(Clone, Debug, Deserialize, Serialize)]
6290	pub struct ListtransactionsTransactionsOutputs {
6291	    #[serde(rename = "scriptPubKey")]
6292	    pub script_pub_key: String,
6293	    pub amount_msat: Amount,
6294	    pub index: u32,
6295	}
6296
6297	#[derive(Clone, Debug, Deserialize, Serialize)]
6298	pub struct ListtransactionsTransactions {
6299	    pub blockheight: u32,
6300	    pub hash: String,
6301	    pub inputs: Vec<ListtransactionsTransactionsInputs>,
6302	    pub locktime: u32,
6303	    pub outputs: Vec<ListtransactionsTransactionsOutputs>,
6304	    pub rawtx: String,
6305	    pub txindex: u32,
6306	    pub version: u32,
6307	}
6308
6309	#[derive(Clone, Debug, Deserialize, Serialize)]
6310	pub struct ListtransactionsResponse {
6311	    pub transactions: Vec<ListtransactionsTransactions>,
6312	}
6313
6314	impl TryFrom<Response> for ListtransactionsResponse {
6315	    type Error = super::TryFromResponseError;
6316
6317	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6318	        match response {
6319	            Response::ListTransactions(response) => Ok(response),
6320	            _ => Err(TryFromResponseError)
6321	        }
6322	    }
6323	}
6324
6325	#[derive(Clone, Debug, Deserialize, Serialize)]
6326	pub struct MakesecretResponse {
6327	    pub secret: Secret,
6328	}
6329
6330	impl TryFrom<Response> for MakesecretResponse {
6331	    type Error = super::TryFromResponseError;
6332
6333	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6334	        match response {
6335	            Response::MakeSecret(response) => Ok(response),
6336	            _ => Err(TryFromResponseError)
6337	        }
6338	    }
6339	}
6340
6341	/// ['Status of payment.']
6342	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
6343	#[allow(non_camel_case_types)]
6344	pub enum PayStatus {
6345	    #[serde(rename = "complete")]
6346	    COMPLETE = 0,
6347	    #[serde(rename = "pending")]
6348	    PENDING = 1,
6349	    #[serde(rename = "failed")]
6350	    FAILED = 2,
6351	}
6352
6353	impl TryFrom<i32> for PayStatus {
6354	    type Error = anyhow::Error;
6355	    fn try_from(c: i32) -> Result<PayStatus, anyhow::Error> {
6356	        match c {
6357	    0 => Ok(PayStatus::COMPLETE),
6358	    1 => Ok(PayStatus::PENDING),
6359	    2 => Ok(PayStatus::FAILED),
6360	            o => Err(anyhow::anyhow!("Unknown variant {} for enum PayStatus", o)),
6361	        }
6362	    }
6363	}
6364
6365	impl ToString for PayStatus {
6366	    fn to_string(&self) -> String {
6367	        match self {
6368	            PayStatus::COMPLETE => "COMPLETE",
6369	            PayStatus::PENDING => "PENDING",
6370	            PayStatus::FAILED => "FAILED",
6371	        }.to_string()
6372	    }
6373	}
6374
6375	#[derive(Clone, Debug, Deserialize, Serialize)]
6376	pub struct PayResponse {
6377	    #[serde(skip_serializing_if = "Option::is_none")]
6378	    pub destination: Option<PublicKey>,
6379	    #[serde(skip_serializing_if = "Option::is_none")]
6380	    pub warning_partial_completion: Option<String>,
6381	    // Path `Pay.status`
6382	    pub status: PayStatus,
6383	    pub amount_msat: Amount,
6384	    pub amount_sent_msat: Amount,
6385	    pub created_at: f64,
6386	    pub parts: u32,
6387	    pub payment_hash: Sha256,
6388	    pub payment_preimage: Secret,
6389	}
6390
6391	impl TryFrom<Response> for PayResponse {
6392	    type Error = super::TryFromResponseError;
6393
6394	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6395	        match response {
6396	            Response::Pay(response) => Ok(response),
6397	            _ => Err(TryFromResponseError)
6398	        }
6399	    }
6400	}
6401
6402	#[derive(Clone, Debug, Deserialize, Serialize)]
6403	pub struct ListnodesNodesOptionWillFund {
6404	    pub channel_fee_max_base_msat: Amount,
6405	    pub channel_fee_max_proportional_thousandths: u32,
6406	    pub compact_lease: String,
6407	    pub funding_weight: u32,
6408	    pub lease_fee_base_msat: Amount,
6409	    pub lease_fee_basis: u32,
6410	}
6411
6412	/// ['Type of connection (until 23.08, `websocket` was also allowed).']
6413	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
6414	#[allow(non_camel_case_types)]
6415	pub enum ListnodesNodesAddressesType {
6416	    #[serde(rename = "dns")]
6417	    DNS = 0,
6418	    #[serde(rename = "ipv4")]
6419	    IPV4 = 1,
6420	    #[serde(rename = "ipv6")]
6421	    IPV6 = 2,
6422	    #[serde(rename = "torv2")]
6423	    TORV2 = 3,
6424	    #[serde(rename = "torv3")]
6425	    TORV3 = 4,
6426	}
6427
6428	impl TryFrom<i32> for ListnodesNodesAddressesType {
6429	    type Error = anyhow::Error;
6430	    fn try_from(c: i32) -> Result<ListnodesNodesAddressesType, anyhow::Error> {
6431	        match c {
6432	    0 => Ok(ListnodesNodesAddressesType::DNS),
6433	    1 => Ok(ListnodesNodesAddressesType::IPV4),
6434	    2 => Ok(ListnodesNodesAddressesType::IPV6),
6435	    3 => Ok(ListnodesNodesAddressesType::TORV2),
6436	    4 => Ok(ListnodesNodesAddressesType::TORV3),
6437	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListnodesNodesAddressesType", o)),
6438	        }
6439	    }
6440	}
6441
6442	impl ToString for ListnodesNodesAddressesType {
6443	    fn to_string(&self) -> String {
6444	        match self {
6445	            ListnodesNodesAddressesType::DNS => "DNS",
6446	            ListnodesNodesAddressesType::IPV4 => "IPV4",
6447	            ListnodesNodesAddressesType::IPV6 => "IPV6",
6448	            ListnodesNodesAddressesType::TORV2 => "TORV2",
6449	            ListnodesNodesAddressesType::TORV3 => "TORV3",
6450	        }.to_string()
6451	    }
6452	}
6453
6454	#[derive(Clone, Debug, Deserialize, Serialize)]
6455	pub struct ListnodesNodesAddresses {
6456	    #[serde(skip_serializing_if = "Option::is_none")]
6457	    pub address: Option<String>,
6458	    // Path `ListNodes.nodes[].addresses[].type`
6459	    #[serde(rename = "type")]
6460	    pub item_type: ListnodesNodesAddressesType,
6461	    pub port: u16,
6462	}
6463
6464	#[derive(Clone, Debug, Deserialize, Serialize)]
6465	pub struct ListnodesNodes {
6466	    #[serde(skip_serializing_if = "Option::is_none")]
6467	    pub alias: Option<String>,
6468	    #[serde(skip_serializing_if = "Option::is_none")]
6469	    pub color: Option<String>,
6470	    #[serde(skip_serializing_if = "Option::is_none")]
6471	    pub features: Option<String>,
6472	    #[serde(skip_serializing_if = "Option::is_none")]
6473	    pub last_timestamp: Option<u32>,
6474	    #[serde(skip_serializing_if = "Option::is_none")]
6475	    pub option_will_fund: Option<ListnodesNodesOptionWillFund>,
6476	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
6477	    pub addresses: Option<Vec<ListnodesNodesAddresses>>,
6478	    pub nodeid: PublicKey,
6479	}
6480
6481	#[derive(Clone, Debug, Deserialize, Serialize)]
6482	pub struct ListnodesResponse {
6483	    pub nodes: Vec<ListnodesNodes>,
6484	}
6485
6486	impl TryFrom<Response> for ListnodesResponse {
6487	    type Error = super::TryFromResponseError;
6488
6489	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6490	        match response {
6491	            Response::ListNodes(response) => Ok(response),
6492	            _ => Err(TryFromResponseError)
6493	        }
6494	    }
6495	}
6496
6497	#[derive(Clone, Debug, Deserialize, Serialize)]
6498	pub struct WaitanyinvoicePaidOutpoint {
6499	    pub outnum: u32,
6500	    pub txid: String,
6501	}
6502
6503	/// ["Whether it's paid or expired."]
6504	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
6505	#[allow(non_camel_case_types)]
6506	pub enum WaitanyinvoiceStatus {
6507	    #[serde(rename = "paid")]
6508	    PAID = 0,
6509	    #[serde(rename = "expired")]
6510	    EXPIRED = 1,
6511	}
6512
6513	impl TryFrom<i32> for WaitanyinvoiceStatus {
6514	    type Error = anyhow::Error;
6515	    fn try_from(c: i32) -> Result<WaitanyinvoiceStatus, anyhow::Error> {
6516	        match c {
6517	    0 => Ok(WaitanyinvoiceStatus::PAID),
6518	    1 => Ok(WaitanyinvoiceStatus::EXPIRED),
6519	            o => Err(anyhow::anyhow!("Unknown variant {} for enum WaitanyinvoiceStatus", o)),
6520	        }
6521	    }
6522	}
6523
6524	impl ToString for WaitanyinvoiceStatus {
6525	    fn to_string(&self) -> String {
6526	        match self {
6527	            WaitanyinvoiceStatus::PAID => "PAID",
6528	            WaitanyinvoiceStatus::EXPIRED => "EXPIRED",
6529	        }.to_string()
6530	    }
6531	}
6532
6533	#[derive(Clone, Debug, Deserialize, Serialize)]
6534	pub struct WaitanyinvoiceResponse {
6535	    #[serde(skip_serializing_if = "Option::is_none")]
6536	    pub amount_msat: Option<Amount>,
6537	    #[serde(skip_serializing_if = "Option::is_none")]
6538	    pub amount_received_msat: Option<Amount>,
6539	    #[serde(skip_serializing_if = "Option::is_none")]
6540	    pub bolt11: Option<String>,
6541	    #[serde(skip_serializing_if = "Option::is_none")]
6542	    pub bolt12: Option<String>,
6543	    #[serde(skip_serializing_if = "Option::is_none")]
6544	    pub created_index: Option<u64>,
6545	    #[serde(skip_serializing_if = "Option::is_none")]
6546	    pub description: Option<String>,
6547	    #[serde(skip_serializing_if = "Option::is_none")]
6548	    pub paid_at: Option<u64>,
6549	    #[serde(skip_serializing_if = "Option::is_none")]
6550	    pub paid_outpoint: Option<WaitanyinvoicePaidOutpoint>,
6551	    #[serde(skip_serializing_if = "Option::is_none")]
6552	    pub pay_index: Option<u64>,
6553	    #[serde(skip_serializing_if = "Option::is_none")]
6554	    pub payment_preimage: Option<Secret>,
6555	    #[serde(skip_serializing_if = "Option::is_none")]
6556	    pub updated_index: Option<u64>,
6557	    // Path `WaitAnyInvoice.status`
6558	    pub status: WaitanyinvoiceStatus,
6559	    pub expires_at: u64,
6560	    pub label: String,
6561	    pub payment_hash: Sha256,
6562	}
6563
6564	impl TryFrom<Response> for WaitanyinvoiceResponse {
6565	    type Error = super::TryFromResponseError;
6566
6567	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6568	        match response {
6569	            Response::WaitAnyInvoice(response) => Ok(response),
6570	            _ => Err(TryFromResponseError)
6571	        }
6572	    }
6573	}
6574
6575	#[derive(Clone, Debug, Deserialize, Serialize)]
6576	pub struct WaitinvoicePaidOutpoint {
6577	    pub outnum: u32,
6578	    pub txid: String,
6579	}
6580
6581	/// ["Whether it's paid or expired."]
6582	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
6583	#[allow(non_camel_case_types)]
6584	pub enum WaitinvoiceStatus {
6585	    #[serde(rename = "paid")]
6586	    PAID = 0,
6587	    #[serde(rename = "expired")]
6588	    EXPIRED = 1,
6589	}
6590
6591	impl TryFrom<i32> for WaitinvoiceStatus {
6592	    type Error = anyhow::Error;
6593	    fn try_from(c: i32) -> Result<WaitinvoiceStatus, anyhow::Error> {
6594	        match c {
6595	    0 => Ok(WaitinvoiceStatus::PAID),
6596	    1 => Ok(WaitinvoiceStatus::EXPIRED),
6597	            o => Err(anyhow::anyhow!("Unknown variant {} for enum WaitinvoiceStatus", o)),
6598	        }
6599	    }
6600	}
6601
6602	impl ToString for WaitinvoiceStatus {
6603	    fn to_string(&self) -> String {
6604	        match self {
6605	            WaitinvoiceStatus::PAID => "PAID",
6606	            WaitinvoiceStatus::EXPIRED => "EXPIRED",
6607	        }.to_string()
6608	    }
6609	}
6610
6611	#[derive(Clone, Debug, Deserialize, Serialize)]
6612	pub struct WaitinvoiceResponse {
6613	    #[serde(skip_serializing_if = "Option::is_none")]
6614	    pub amount_msat: Option<Amount>,
6615	    #[serde(skip_serializing_if = "Option::is_none")]
6616	    pub amount_received_msat: Option<Amount>,
6617	    #[serde(skip_serializing_if = "Option::is_none")]
6618	    pub bolt11: Option<String>,
6619	    #[serde(skip_serializing_if = "Option::is_none")]
6620	    pub bolt12: Option<String>,
6621	    #[serde(skip_serializing_if = "Option::is_none")]
6622	    pub created_index: Option<u64>,
6623	    #[serde(skip_serializing_if = "Option::is_none")]
6624	    pub description: Option<String>,
6625	    #[serde(skip_serializing_if = "Option::is_none")]
6626	    pub paid_at: Option<u64>,
6627	    #[serde(skip_serializing_if = "Option::is_none")]
6628	    pub paid_outpoint: Option<WaitinvoicePaidOutpoint>,
6629	    #[serde(skip_serializing_if = "Option::is_none")]
6630	    pub pay_index: Option<u64>,
6631	    #[serde(skip_serializing_if = "Option::is_none")]
6632	    pub payment_preimage: Option<Secret>,
6633	    #[serde(skip_serializing_if = "Option::is_none")]
6634	    pub updated_index: Option<u64>,
6635	    // Path `WaitInvoice.status`
6636	    pub status: WaitinvoiceStatus,
6637	    pub expires_at: u64,
6638	    pub label: String,
6639	    pub payment_hash: Sha256,
6640	}
6641
6642	impl TryFrom<Response> for WaitinvoiceResponse {
6643	    type Error = super::TryFromResponseError;
6644
6645	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6646	        match response {
6647	            Response::WaitInvoice(response) => Ok(response),
6648	            _ => Err(TryFromResponseError)
6649	        }
6650	    }
6651	}
6652
6653	/// ['Status of the payment.']
6654	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
6655	#[allow(non_camel_case_types)]
6656	pub enum WaitsendpayStatus {
6657	    #[serde(rename = "complete")]
6658	    COMPLETE = 0,
6659	}
6660
6661	impl TryFrom<i32> for WaitsendpayStatus {
6662	    type Error = anyhow::Error;
6663	    fn try_from(c: i32) -> Result<WaitsendpayStatus, anyhow::Error> {
6664	        match c {
6665	    0 => Ok(WaitsendpayStatus::COMPLETE),
6666	            o => Err(anyhow::anyhow!("Unknown variant {} for enum WaitsendpayStatus", o)),
6667	        }
6668	    }
6669	}
6670
6671	impl ToString for WaitsendpayStatus {
6672	    fn to_string(&self) -> String {
6673	        match self {
6674	            WaitsendpayStatus::COMPLETE => "COMPLETE",
6675	        }.to_string()
6676	    }
6677	}
6678
6679	#[derive(Clone, Debug, Deserialize, Serialize)]
6680	pub struct WaitsendpayResponse {
6681	    #[serde(skip_serializing_if = "Option::is_none")]
6682	    pub amount_msat: Option<Amount>,
6683	    #[serde(skip_serializing_if = "Option::is_none")]
6684	    pub bolt11: Option<String>,
6685	    #[serde(skip_serializing_if = "Option::is_none")]
6686	    pub bolt12: Option<String>,
6687	    #[serde(skip_serializing_if = "Option::is_none")]
6688	    pub completed_at: Option<f64>,
6689	    #[serde(skip_serializing_if = "Option::is_none")]
6690	    pub created_index: Option<u64>,
6691	    #[serde(skip_serializing_if = "Option::is_none")]
6692	    pub destination: Option<PublicKey>,
6693	    #[serde(skip_serializing_if = "Option::is_none")]
6694	    pub groupid: Option<u64>,
6695	    #[serde(skip_serializing_if = "Option::is_none")]
6696	    pub label: Option<String>,
6697	    #[serde(skip_serializing_if = "Option::is_none")]
6698	    pub partid: Option<u64>,
6699	    #[serde(skip_serializing_if = "Option::is_none")]
6700	    pub payment_preimage: Option<Secret>,
6701	    #[serde(skip_serializing_if = "Option::is_none")]
6702	    pub updated_index: Option<u64>,
6703	    // Path `WaitSendPay.status`
6704	    pub status: WaitsendpayStatus,
6705	    pub amount_sent_msat: Amount,
6706	    pub created_at: u64,
6707	    pub id: u64,
6708	    pub payment_hash: Sha256,
6709	}
6710
6711	impl TryFrom<Response> for WaitsendpayResponse {
6712	    type Error = super::TryFromResponseError;
6713
6714	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6715	        match response {
6716	            Response::WaitSendPay(response) => Ok(response),
6717	            _ => Err(TryFromResponseError)
6718	        }
6719	    }
6720	}
6721
6722	#[derive(Clone, Debug, Deserialize, Serialize)]
6723	pub struct NewaddrResponse {
6724	    #[serde(skip_serializing_if = "Option::is_none")]
6725	    pub bech32: Option<String>,
6726	    #[serde(skip_serializing_if = "Option::is_none")]
6727	    pub p2tr: Option<String>,
6728	}
6729
6730	impl TryFrom<Response> for NewaddrResponse {
6731	    type Error = super::TryFromResponseError;
6732
6733	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6734	        match response {
6735	            Response::NewAddr(response) => Ok(response),
6736	            _ => Err(TryFromResponseError)
6737	        }
6738	    }
6739	}
6740
6741	#[derive(Clone, Debug, Deserialize, Serialize)]
6742	pub struct WithdrawResponse {
6743	    pub psbt: String,
6744	    pub tx: String,
6745	    pub txid: String,
6746	}
6747
6748	impl TryFrom<Response> for WithdrawResponse {
6749	    type Error = super::TryFromResponseError;
6750
6751	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6752	        match response {
6753	            Response::Withdraw(response) => Ok(response),
6754	            _ => Err(TryFromResponseError)
6755	        }
6756	    }
6757	}
6758
6759	/// ['Status of payment.']
6760	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
6761	#[allow(non_camel_case_types)]
6762	pub enum KeysendStatus {
6763	    #[serde(rename = "complete")]
6764	    COMPLETE = 0,
6765	}
6766
6767	impl TryFrom<i32> for KeysendStatus {
6768	    type Error = anyhow::Error;
6769	    fn try_from(c: i32) -> Result<KeysendStatus, anyhow::Error> {
6770	        match c {
6771	    0 => Ok(KeysendStatus::COMPLETE),
6772	            o => Err(anyhow::anyhow!("Unknown variant {} for enum KeysendStatus", o)),
6773	        }
6774	    }
6775	}
6776
6777	impl ToString for KeysendStatus {
6778	    fn to_string(&self) -> String {
6779	        match self {
6780	            KeysendStatus::COMPLETE => "COMPLETE",
6781	        }.to_string()
6782	    }
6783	}
6784
6785	#[derive(Clone, Debug, Deserialize, Serialize)]
6786	pub struct KeysendResponse {
6787	    #[serde(skip_serializing_if = "Option::is_none")]
6788	    pub destination: Option<PublicKey>,
6789	    #[serde(skip_serializing_if = "Option::is_none")]
6790	    pub warning_partial_completion: Option<String>,
6791	    // Path `KeySend.status`
6792	    pub status: KeysendStatus,
6793	    pub amount_msat: Amount,
6794	    pub amount_sent_msat: Amount,
6795	    pub created_at: f64,
6796	    pub parts: u32,
6797	    pub payment_hash: Sha256,
6798	    pub payment_preimage: Secret,
6799	}
6800
6801	impl TryFrom<Response> for KeysendResponse {
6802	    type Error = super::TryFromResponseError;
6803
6804	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6805	        match response {
6806	            Response::KeySend(response) => Ok(response),
6807	            _ => Err(TryFromResponseError)
6808	        }
6809	    }
6810	}
6811
6812	#[derive(Clone, Debug, Deserialize, Serialize)]
6813	pub struct FundpsbtReservations {
6814	    pub reserved: bool,
6815	    pub reserved_to_block: u32,
6816	    pub txid: String,
6817	    pub vout: u32,
6818	    pub was_reserved: bool,
6819	}
6820
6821	#[derive(Clone, Debug, Deserialize, Serialize)]
6822	pub struct FundpsbtResponse {
6823	    #[serde(skip_serializing_if = "Option::is_none")]
6824	    pub change_outnum: Option<u32>,
6825	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
6826	    pub reservations: Option<Vec<FundpsbtReservations>>,
6827	    pub estimated_final_weight: u32,
6828	    pub excess_msat: Amount,
6829	    pub feerate_per_kw: u32,
6830	    pub psbt: String,
6831	}
6832
6833	impl TryFrom<Response> for FundpsbtResponse {
6834	    type Error = super::TryFromResponseError;
6835
6836	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6837	        match response {
6838	            Response::FundPsbt(response) => Ok(response),
6839	            _ => Err(TryFromResponseError)
6840	        }
6841	    }
6842	}
6843
6844	#[derive(Clone, Debug, Deserialize, Serialize)]
6845	pub struct SendpsbtResponse {
6846	    pub tx: String,
6847	    pub txid: String,
6848	}
6849
6850	impl TryFrom<Response> for SendpsbtResponse {
6851	    type Error = super::TryFromResponseError;
6852
6853	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6854	        match response {
6855	            Response::SendPsbt(response) => Ok(response),
6856	            _ => Err(TryFromResponseError)
6857	        }
6858	    }
6859	}
6860
6861	#[derive(Clone, Debug, Deserialize, Serialize)]
6862	pub struct SignpsbtResponse {
6863	    pub signed_psbt: String,
6864	}
6865
6866	impl TryFrom<Response> for SignpsbtResponse {
6867	    type Error = super::TryFromResponseError;
6868
6869	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6870	        match response {
6871	            Response::SignPsbt(response) => Ok(response),
6872	            _ => Err(TryFromResponseError)
6873	        }
6874	    }
6875	}
6876
6877	#[derive(Clone, Debug, Deserialize, Serialize)]
6878	pub struct UtxopsbtReservations {
6879	    pub reserved: bool,
6880	    pub reserved_to_block: u32,
6881	    pub txid: String,
6882	    pub vout: u32,
6883	    pub was_reserved: bool,
6884	}
6885
6886	#[derive(Clone, Debug, Deserialize, Serialize)]
6887	pub struct UtxopsbtResponse {
6888	    #[serde(skip_serializing_if = "Option::is_none")]
6889	    pub change_outnum: Option<u32>,
6890	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
6891	    pub reservations: Option<Vec<UtxopsbtReservations>>,
6892	    pub estimated_final_weight: u32,
6893	    pub excess_msat: Amount,
6894	    pub feerate_per_kw: u32,
6895	    pub psbt: String,
6896	}
6897
6898	impl TryFrom<Response> for UtxopsbtResponse {
6899	    type Error = super::TryFromResponseError;
6900
6901	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6902	        match response {
6903	            Response::UtxoPsbt(response) => Ok(response),
6904	            _ => Err(TryFromResponseError)
6905	        }
6906	    }
6907	}
6908
6909	#[derive(Clone, Debug, Deserialize, Serialize)]
6910	pub struct TxdiscardResponse {
6911	    pub txid: String,
6912	    pub unsigned_tx: String,
6913	}
6914
6915	impl TryFrom<Response> for TxdiscardResponse {
6916	    type Error = super::TryFromResponseError;
6917
6918	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6919	        match response {
6920	            Response::TxDiscard(response) => Ok(response),
6921	            _ => Err(TryFromResponseError)
6922	        }
6923	    }
6924	}
6925
6926	#[derive(Clone, Debug, Deserialize, Serialize)]
6927	pub struct TxprepareResponse {
6928	    pub psbt: String,
6929	    pub txid: String,
6930	    pub unsigned_tx: String,
6931	}
6932
6933	impl TryFrom<Response> for TxprepareResponse {
6934	    type Error = super::TryFromResponseError;
6935
6936	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6937	        match response {
6938	            Response::TxPrepare(response) => Ok(response),
6939	            _ => Err(TryFromResponseError)
6940	        }
6941	    }
6942	}
6943
6944	#[derive(Clone, Debug, Deserialize, Serialize)]
6945	pub struct TxsendResponse {
6946	    pub psbt: String,
6947	    pub tx: String,
6948	    pub txid: String,
6949	}
6950
6951	impl TryFrom<Response> for TxsendResponse {
6952	    type Error = super::TryFromResponseError;
6953
6954	    fn try_from(response: Response) -> Result<Self, Self::Error> {
6955	        match response {
6956	            Response::TxSend(response) => Ok(response),
6957	            _ => Err(TryFromResponseError)
6958	        }
6959	    }
6960	}
6961
6962	#[derive(Clone, Debug, Deserialize, Serialize)]
6963	pub struct ListpeerchannelsChannelsAlias {
6964	    #[serde(skip_serializing_if = "Option::is_none")]
6965	    pub local: Option<ShortChannelId>,
6966	    #[serde(skip_serializing_if = "Option::is_none")]
6967	    pub remote: Option<ShortChannelId>,
6968	}
6969
6970	#[derive(Clone, Debug, Deserialize, Serialize)]
6971	pub struct ListpeerchannelsChannelsFeerate {
6972	    pub perkb: u32,
6973	    pub perkw: u32,
6974	}
6975
6976	#[derive(Clone, Debug, Deserialize, Serialize)]
6977	pub struct ListpeerchannelsChannelsFunding {
6978	    #[serde(skip_serializing_if = "Option::is_none")]
6979	    pub fee_paid_msat: Option<Amount>,
6980	    #[serde(skip_serializing_if = "Option::is_none")]
6981	    pub fee_rcvd_msat: Option<Amount>,
6982	    #[serde(skip_serializing_if = "Option::is_none")]
6983	    pub pushed_msat: Option<Amount>,
6984	    pub local_funds_msat: Amount,
6985	    pub remote_funds_msat: Amount,
6986	}
6987
6988	#[derive(Clone, Debug, Deserialize, Serialize)]
6989	pub struct ListpeerchannelsChannelsUpdatesRemote {
6990	    pub cltv_expiry_delta: u32,
6991	    pub fee_base_msat: Amount,
6992	    pub fee_proportional_millionths: u32,
6993	    pub htlc_maximum_msat: Amount,
6994	    pub htlc_minimum_msat: Amount,
6995	}
6996
6997	#[derive(Clone, Debug, Deserialize, Serialize)]
6998	pub struct ListpeerchannelsChannelsUpdatesLocal {
6999	    pub cltv_expiry_delta: u32,
7000	    pub fee_base_msat: Amount,
7001	    pub fee_proportional_millionths: u32,
7002	    pub htlc_maximum_msat: Amount,
7003	    pub htlc_minimum_msat: Amount,
7004	}
7005
7006	#[derive(Clone, Debug, Deserialize, Serialize)]
7007	pub struct ListpeerchannelsChannelsUpdates {
7008	    #[serde(skip_serializing_if = "Option::is_none")]
7009	    pub remote: Option<ListpeerchannelsChannelsUpdatesRemote>,
7010	    pub local: ListpeerchannelsChannelsUpdatesLocal,
7011	}
7012
7013	/// ['Whether it came from peer, or is going to peer.']
7014	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
7015	#[allow(non_camel_case_types)]
7016	pub enum ListpeerchannelsChannelsHtlcsDirection {
7017	    #[serde(rename = "in")]
7018	    IN = 0,
7019	    #[serde(rename = "out")]
7020	    OUT = 1,
7021	}
7022
7023	impl TryFrom<i32> for ListpeerchannelsChannelsHtlcsDirection {
7024	    type Error = anyhow::Error;
7025	    fn try_from(c: i32) -> Result<ListpeerchannelsChannelsHtlcsDirection, anyhow::Error> {
7026	        match c {
7027	    0 => Ok(ListpeerchannelsChannelsHtlcsDirection::IN),
7028	    1 => Ok(ListpeerchannelsChannelsHtlcsDirection::OUT),
7029	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListpeerchannelsChannelsHtlcsDirection", o)),
7030	        }
7031	    }
7032	}
7033
7034	impl ToString for ListpeerchannelsChannelsHtlcsDirection {
7035	    fn to_string(&self) -> String {
7036	        match self {
7037	            ListpeerchannelsChannelsHtlcsDirection::IN => "IN",
7038	            ListpeerchannelsChannelsHtlcsDirection::OUT => "OUT",
7039	        }.to_string()
7040	    }
7041	}
7042
7043	#[derive(Clone, Debug, Deserialize, Serialize)]
7044	pub struct ListpeerchannelsChannelsHtlcs {
7045	    #[serde(skip_serializing_if = "Option::is_none")]
7046	    pub local_trimmed: Option<bool>,
7047	    #[serde(skip_serializing_if = "Option::is_none")]
7048	    pub status: Option<String>,
7049	    // Path `ListPeerChannels.channels[].htlcs[].direction`
7050	    pub direction: ListpeerchannelsChannelsHtlcsDirection,
7051	    // Path `ListPeerChannels.channels[].htlcs[].state`
7052	    pub state: HtlcState,
7053	    pub amount_msat: Amount,
7054	    pub expiry: u32,
7055	    pub id: u64,
7056	    pub payment_hash: Sha256,
7057	}
7058
7059	#[derive(Clone, Debug, Deserialize, Serialize)]
7060	pub struct ListpeerchannelsChannelsInflight {
7061	    #[serde(skip_serializing_if = "Option::is_none")]
7062	    pub scratch_txid: Option<String>,
7063	    #[serde(skip_serializing_if = "Option::is_none")]
7064	    pub splice_amount: Option<i64>,
7065	    pub feerate: String,
7066	    pub funding_outnum: u32,
7067	    pub funding_txid: String,
7068	    pub our_funding_msat: Amount,
7069	    pub total_funding_msat: Amount,
7070	}
7071
7072	#[derive(Clone, Debug, Deserialize, Serialize)]
7073	pub struct ListpeerchannelsChannels {
7074	    #[deprecated]
7075	    #[serde(skip_serializing_if = "Option::is_none")]
7076	    pub max_total_htlc_in_msat: Option<Amount>,
7077	    #[serde(skip_serializing_if = "Option::is_none")]
7078	    pub alias: Option<ListpeerchannelsChannelsAlias>,
7079	    #[serde(skip_serializing_if = "Option::is_none")]
7080	    pub channel_id: Option<Sha256>,
7081	    #[serde(skip_serializing_if = "Option::is_none")]
7082	    pub close_to: Option<String>,
7083	    #[serde(skip_serializing_if = "Option::is_none")]
7084	    pub close_to_addr: Option<String>,
7085	    #[serde(skip_serializing_if = "Option::is_none")]
7086	    pub closer: Option<ChannelSide>,
7087	    #[serde(skip_serializing_if = "Option::is_none")]
7088	    pub direction: Option<u32>,
7089	    #[serde(skip_serializing_if = "Option::is_none")]
7090	    pub dust_limit_msat: Option<Amount>,
7091	    #[serde(skip_serializing_if = "Option::is_none")]
7092	    pub fee_base_msat: Option<Amount>,
7093	    #[serde(skip_serializing_if = "Option::is_none")]
7094	    pub fee_proportional_millionths: Option<u32>,
7095	    #[serde(skip_serializing_if = "Option::is_none")]
7096	    pub feerate: Option<ListpeerchannelsChannelsFeerate>,
7097	    #[serde(skip_serializing_if = "Option::is_none")]
7098	    pub funding: Option<ListpeerchannelsChannelsFunding>,
7099	    #[serde(skip_serializing_if = "Option::is_none")]
7100	    pub funding_outnum: Option<u32>,
7101	    #[serde(skip_serializing_if = "Option::is_none")]
7102	    pub funding_txid: Option<String>,
7103	    #[serde(skip_serializing_if = "Option::is_none")]
7104	    pub ignore_fee_limits: Option<bool>,
7105	    #[serde(skip_serializing_if = "Option::is_none")]
7106	    pub in_fulfilled_msat: Option<Amount>,
7107	    #[serde(skip_serializing_if = "Option::is_none")]
7108	    pub in_offered_msat: Option<Amount>,
7109	    #[serde(skip_serializing_if = "Option::is_none")]
7110	    pub in_payments_fulfilled: Option<u64>,
7111	    #[serde(skip_serializing_if = "Option::is_none")]
7112	    pub in_payments_offered: Option<u64>,
7113	    #[serde(skip_serializing_if = "Option::is_none")]
7114	    pub initial_feerate: Option<String>,
7115	    #[serde(skip_serializing_if = "Option::is_none")]
7116	    pub last_feerate: Option<String>,
7117	    #[serde(skip_serializing_if = "Option::is_none")]
7118	    pub last_stable_connection: Option<u64>,
7119	    #[serde(skip_serializing_if = "Option::is_none")]
7120	    pub last_tx_fee_msat: Option<Amount>,
7121	    #[serde(skip_serializing_if = "Option::is_none")]
7122	    pub lost_state: Option<bool>,
7123	    #[serde(skip_serializing_if = "Option::is_none")]
7124	    pub max_accepted_htlcs: Option<u32>,
7125	    #[serde(skip_serializing_if = "Option::is_none")]
7126	    pub max_to_us_msat: Option<Amount>,
7127	    #[serde(skip_serializing_if = "Option::is_none")]
7128	    pub maximum_htlc_out_msat: Option<Amount>,
7129	    #[serde(skip_serializing_if = "Option::is_none")]
7130	    pub min_to_us_msat: Option<Amount>,
7131	    #[serde(skip_serializing_if = "Option::is_none")]
7132	    pub minimum_htlc_in_msat: Option<Amount>,
7133	    #[serde(skip_serializing_if = "Option::is_none")]
7134	    pub minimum_htlc_out_msat: Option<Amount>,
7135	    #[serde(skip_serializing_if = "Option::is_none")]
7136	    pub next_fee_step: Option<u32>,
7137	    #[serde(skip_serializing_if = "Option::is_none")]
7138	    pub next_feerate: Option<String>,
7139	    #[serde(skip_serializing_if = "Option::is_none")]
7140	    pub our_max_htlc_value_in_flight_msat: Option<Amount>,
7141	    #[serde(skip_serializing_if = "Option::is_none")]
7142	    pub our_reserve_msat: Option<Amount>,
7143	    #[serde(skip_serializing_if = "Option::is_none")]
7144	    pub our_to_self_delay: Option<u32>,
7145	    #[serde(skip_serializing_if = "Option::is_none")]
7146	    pub out_fulfilled_msat: Option<Amount>,
7147	    #[serde(skip_serializing_if = "Option::is_none")]
7148	    pub out_offered_msat: Option<Amount>,
7149	    #[serde(skip_serializing_if = "Option::is_none")]
7150	    pub out_payments_fulfilled: Option<u64>,
7151	    #[serde(skip_serializing_if = "Option::is_none")]
7152	    pub out_payments_offered: Option<u64>,
7153	    #[serde(skip_serializing_if = "Option::is_none")]
7154	    pub owner: Option<String>,
7155	    #[serde(skip_serializing_if = "Option::is_none")]
7156	    pub private: Option<bool>,
7157	    #[serde(skip_serializing_if = "Option::is_none")]
7158	    pub receivable_msat: Option<Amount>,
7159	    #[serde(skip_serializing_if = "Option::is_none")]
7160	    pub reestablished: Option<bool>,
7161	    #[serde(skip_serializing_if = "Option::is_none")]
7162	    pub scratch_txid: Option<String>,
7163	    #[serde(skip_serializing_if = "Option::is_none")]
7164	    pub short_channel_id: Option<ShortChannelId>,
7165	    #[serde(skip_serializing_if = "Option::is_none")]
7166	    pub spendable_msat: Option<Amount>,
7167	    #[serde(skip_serializing_if = "Option::is_none")]
7168	    pub their_max_htlc_value_in_flight_msat: Option<Amount>,
7169	    #[serde(skip_serializing_if = "Option::is_none")]
7170	    pub their_reserve_msat: Option<Amount>,
7171	    #[serde(skip_serializing_if = "Option::is_none")]
7172	    pub their_to_self_delay: Option<u32>,
7173	    #[serde(skip_serializing_if = "Option::is_none")]
7174	    pub to_us_msat: Option<Amount>,
7175	    #[serde(skip_serializing_if = "Option::is_none")]
7176	    pub total_msat: Option<Amount>,
7177	    #[serde(skip_serializing_if = "Option::is_none")]
7178	    pub updates: Option<ListpeerchannelsChannelsUpdates>,
7179	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7180	    pub htlcs: Option<Vec<ListpeerchannelsChannelsHtlcs>>,
7181	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7182	    pub inflight: Option<Vec<ListpeerchannelsChannelsInflight>>,
7183	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7184	    pub status: Option<Vec<String>>,
7185	    // Path `ListPeerChannels.channels[].opener`
7186	    pub opener: ChannelSide,
7187	    // Path `ListPeerChannels.channels[].state`
7188	    pub state: ChannelState,
7189	    pub peer_connected: bool,
7190	    pub peer_id: PublicKey,
7191	}
7192
7193	#[derive(Clone, Debug, Deserialize, Serialize)]
7194	pub struct ListpeerchannelsResponse {
7195	    pub channels: Vec<ListpeerchannelsChannels>,
7196	}
7197
7198	impl TryFrom<Response> for ListpeerchannelsResponse {
7199	    type Error = super::TryFromResponseError;
7200
7201	    fn try_from(response: Response) -> Result<Self, Self::Error> {
7202	        match response {
7203	            Response::ListPeerChannels(response) => Ok(response),
7204	            _ => Err(TryFromResponseError)
7205	        }
7206	    }
7207	}
7208
7209	#[derive(Clone, Debug, Deserialize, Serialize)]
7210	pub struct ListclosedchannelsClosedchannelsAlias {
7211	    #[serde(skip_serializing_if = "Option::is_none")]
7212	    pub local: Option<ShortChannelId>,
7213	    #[serde(skip_serializing_if = "Option::is_none")]
7214	    pub remote: Option<ShortChannelId>,
7215	}
7216
7217	/// ['What caused the channel to close.']
7218	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
7219	#[allow(non_camel_case_types)]
7220	pub enum ListclosedchannelsClosedchannelsCloseCause {
7221	    #[serde(rename = "unknown")]
7222	    UNKNOWN = 0,
7223	    #[serde(rename = "local")]
7224	    LOCAL = 1,
7225	    #[serde(rename = "user")]
7226	    USER = 2,
7227	    #[serde(rename = "remote")]
7228	    REMOTE = 3,
7229	    #[serde(rename = "protocol")]
7230	    PROTOCOL = 4,
7231	    #[serde(rename = "onchain")]
7232	    ONCHAIN = 5,
7233	}
7234
7235	impl TryFrom<i32> for ListclosedchannelsClosedchannelsCloseCause {
7236	    type Error = anyhow::Error;
7237	    fn try_from(c: i32) -> Result<ListclosedchannelsClosedchannelsCloseCause, anyhow::Error> {
7238	        match c {
7239	    0 => Ok(ListclosedchannelsClosedchannelsCloseCause::UNKNOWN),
7240	    1 => Ok(ListclosedchannelsClosedchannelsCloseCause::LOCAL),
7241	    2 => Ok(ListclosedchannelsClosedchannelsCloseCause::USER),
7242	    3 => Ok(ListclosedchannelsClosedchannelsCloseCause::REMOTE),
7243	    4 => Ok(ListclosedchannelsClosedchannelsCloseCause::PROTOCOL),
7244	    5 => Ok(ListclosedchannelsClosedchannelsCloseCause::ONCHAIN),
7245	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListclosedchannelsClosedchannelsCloseCause", o)),
7246	        }
7247	    }
7248	}
7249
7250	impl ToString for ListclosedchannelsClosedchannelsCloseCause {
7251	    fn to_string(&self) -> String {
7252	        match self {
7253	            ListclosedchannelsClosedchannelsCloseCause::UNKNOWN => "UNKNOWN",
7254	            ListclosedchannelsClosedchannelsCloseCause::LOCAL => "LOCAL",
7255	            ListclosedchannelsClosedchannelsCloseCause::USER => "USER",
7256	            ListclosedchannelsClosedchannelsCloseCause::REMOTE => "REMOTE",
7257	            ListclosedchannelsClosedchannelsCloseCause::PROTOCOL => "PROTOCOL",
7258	            ListclosedchannelsClosedchannelsCloseCause::ONCHAIN => "ONCHAIN",
7259	        }.to_string()
7260	    }
7261	}
7262
7263	#[derive(Clone, Debug, Deserialize, Serialize)]
7264	pub struct ListclosedchannelsClosedchannels {
7265	    #[serde(skip_serializing_if = "Option::is_none")]
7266	    pub alias: Option<ListclosedchannelsClosedchannelsAlias>,
7267	    #[serde(skip_serializing_if = "Option::is_none")]
7268	    pub closer: Option<ChannelSide>,
7269	    #[serde(skip_serializing_if = "Option::is_none")]
7270	    pub funding_fee_paid_msat: Option<Amount>,
7271	    #[serde(skip_serializing_if = "Option::is_none")]
7272	    pub funding_fee_rcvd_msat: Option<Amount>,
7273	    #[serde(skip_serializing_if = "Option::is_none")]
7274	    pub funding_pushed_msat: Option<Amount>,
7275	    #[serde(skip_serializing_if = "Option::is_none")]
7276	    pub last_commitment_fee_msat: Option<Amount>,
7277	    #[serde(skip_serializing_if = "Option::is_none")]
7278	    pub last_commitment_txid: Option<Sha256>,
7279	    #[serde(skip_serializing_if = "Option::is_none")]
7280	    pub last_stable_connection: Option<u64>,
7281	    #[serde(skip_serializing_if = "Option::is_none")]
7282	    pub peer_id: Option<PublicKey>,
7283	    #[serde(skip_serializing_if = "Option::is_none")]
7284	    pub short_channel_id: Option<ShortChannelId>,
7285	    // Path `ListClosedChannels.closedchannels[].close_cause`
7286	    pub close_cause: ListclosedchannelsClosedchannelsCloseCause,
7287	    // Path `ListClosedChannels.closedchannels[].opener`
7288	    pub opener: ChannelSide,
7289	    pub channel_id: Sha256,
7290	    pub final_to_us_msat: Amount,
7291	    pub funding_outnum: u32,
7292	    pub funding_txid: String,
7293	    pub leased: bool,
7294	    pub max_to_us_msat: Amount,
7295	    pub min_to_us_msat: Amount,
7296	    pub private: bool,
7297	    pub total_htlcs_sent: u64,
7298	    pub total_local_commitments: u64,
7299	    pub total_msat: Amount,
7300	    pub total_remote_commitments: u64,
7301	}
7302
7303	#[derive(Clone, Debug, Deserialize, Serialize)]
7304	pub struct ListclosedchannelsResponse {
7305	    pub closedchannels: Vec<ListclosedchannelsClosedchannels>,
7306	}
7307
7308	impl TryFrom<Response> for ListclosedchannelsResponse {
7309	    type Error = super::TryFromResponseError;
7310
7311	    fn try_from(response: Response) -> Result<Self, Self::Error> {
7312	        match response {
7313	            Response::ListClosedChannels(response) => Ok(response),
7314	            _ => Err(TryFromResponseError)
7315	        }
7316	    }
7317	}
7318
7319	#[derive(Clone, Debug, Deserialize, Serialize)]
7320	pub struct DecodepayExtra {
7321	    pub data: String,
7322	    pub tag: String,
7323	}
7324
7325	/// ['The address type (if known).']
7326	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
7327	#[allow(non_camel_case_types)]
7328	pub enum DecodepayFallbacksType {
7329	    #[serde(rename = "P2PKH")]
7330	    P2PKH = 0,
7331	    #[serde(rename = "P2SH")]
7332	    P2SH = 1,
7333	    #[serde(rename = "P2WPKH")]
7334	    P2WPKH = 2,
7335	    #[serde(rename = "P2WSH")]
7336	    P2WSH = 3,
7337	    #[serde(rename = "P2TR")]
7338	    P2TR = 4,
7339	}
7340
7341	impl TryFrom<i32> for DecodepayFallbacksType {
7342	    type Error = anyhow::Error;
7343	    fn try_from(c: i32) -> Result<DecodepayFallbacksType, anyhow::Error> {
7344	        match c {
7345	    0 => Ok(DecodepayFallbacksType::P2PKH),
7346	    1 => Ok(DecodepayFallbacksType::P2SH),
7347	    2 => Ok(DecodepayFallbacksType::P2WPKH),
7348	    3 => Ok(DecodepayFallbacksType::P2WSH),
7349	    4 => Ok(DecodepayFallbacksType::P2TR),
7350	            o => Err(anyhow::anyhow!("Unknown variant {} for enum DecodepayFallbacksType", o)),
7351	        }
7352	    }
7353	}
7354
7355	impl ToString for DecodepayFallbacksType {
7356	    fn to_string(&self) -> String {
7357	        match self {
7358	            DecodepayFallbacksType::P2PKH => "P2PKH",
7359	            DecodepayFallbacksType::P2SH => "P2SH",
7360	            DecodepayFallbacksType::P2WPKH => "P2WPKH",
7361	            DecodepayFallbacksType::P2WSH => "P2WSH",
7362	            DecodepayFallbacksType::P2TR => "P2TR",
7363	        }.to_string()
7364	    }
7365	}
7366
7367	#[derive(Clone, Debug, Deserialize, Serialize)]
7368	pub struct DecodepayFallbacks {
7369	    #[serde(skip_serializing_if = "Option::is_none")]
7370	    pub addr: Option<String>,
7371	    // Path `DecodePay.fallbacks[].type`
7372	    #[serde(rename = "type")]
7373	    pub item_type: DecodepayFallbacksType,
7374	    pub hex: String,
7375	}
7376
7377	#[derive(Clone, Debug, Deserialize, Serialize)]
7378	pub struct DecodepayResponse {
7379	    #[serde(skip_serializing_if = "Option::is_none")]
7380	    pub amount_msat: Option<Amount>,
7381	    #[serde(skip_serializing_if = "Option::is_none")]
7382	    pub description: Option<String>,
7383	    #[serde(skip_serializing_if = "Option::is_none")]
7384	    pub description_hash: Option<Sha256>,
7385	    #[serde(skip_serializing_if = "Option::is_none")]
7386	    pub features: Option<String>,
7387	    #[serde(skip_serializing_if = "Option::is_none")]
7388	    pub payment_metadata: Option<String>,
7389	    #[serde(skip_serializing_if = "Option::is_none")]
7390	    pub payment_secret: Option<Sha256>,
7391	    #[serde(skip_serializing_if = "Option::is_none")]
7392	    pub routes: Option<DecodeRoutehintList>,
7393	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7394	    pub extra: Option<Vec<DecodepayExtra>>,
7395	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7396	    pub fallbacks: Option<Vec<DecodepayFallbacks>>,
7397	    pub created_at: u64,
7398	    pub currency: String,
7399	    pub expiry: u64,
7400	    pub min_final_cltv_expiry: u32,
7401	    pub payee: PublicKey,
7402	    pub payment_hash: Sha256,
7403	    pub signature: String,
7404	}
7405
7406	impl TryFrom<Response> for DecodepayResponse {
7407	    type Error = super::TryFromResponseError;
7408
7409	    fn try_from(response: Response) -> Result<Self, Self::Error> {
7410	        match response {
7411	            Response::DecodePay(response) => Ok(response),
7412	            _ => Err(TryFromResponseError)
7413	        }
7414	    }
7415	}
7416
7417	#[derive(Clone, Debug, Deserialize, Serialize)]
7418	pub struct DecodeInvreqBip353Name {
7419	    #[serde(skip_serializing_if = "Option::is_none")]
7420	    pub domain: Option<String>,
7421	    #[serde(skip_serializing_if = "Option::is_none")]
7422	    pub name: Option<String>,
7423	}
7424
7425	#[derive(Clone, Debug, Deserialize, Serialize)]
7426	pub struct DecodeExtra {
7427	    pub data: String,
7428	    pub tag: String,
7429	}
7430
7431	/// ['The address type (if known).']
7432	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
7433	#[allow(non_camel_case_types)]
7434	pub enum DecodeFallbacksType {
7435	    #[serde(rename = "P2PKH")]
7436	    P2PKH = 0,
7437	    #[serde(rename = "P2SH")]
7438	    P2SH = 1,
7439	    #[serde(rename = "P2WPKH")]
7440	    P2WPKH = 2,
7441	    #[serde(rename = "P2WSH")]
7442	    P2WSH = 3,
7443	    #[serde(rename = "P2TR")]
7444	    P2TR = 4,
7445	}
7446
7447	impl TryFrom<i32> for DecodeFallbacksType {
7448	    type Error = anyhow::Error;
7449	    fn try_from(c: i32) -> Result<DecodeFallbacksType, anyhow::Error> {
7450	        match c {
7451	    0 => Ok(DecodeFallbacksType::P2PKH),
7452	    1 => Ok(DecodeFallbacksType::P2SH),
7453	    2 => Ok(DecodeFallbacksType::P2WPKH),
7454	    3 => Ok(DecodeFallbacksType::P2WSH),
7455	    4 => Ok(DecodeFallbacksType::P2TR),
7456	            o => Err(anyhow::anyhow!("Unknown variant {} for enum DecodeFallbacksType", o)),
7457	        }
7458	    }
7459	}
7460
7461	impl ToString for DecodeFallbacksType {
7462	    fn to_string(&self) -> String {
7463	        match self {
7464	            DecodeFallbacksType::P2PKH => "P2PKH",
7465	            DecodeFallbacksType::P2SH => "P2SH",
7466	            DecodeFallbacksType::P2WPKH => "P2WPKH",
7467	            DecodeFallbacksType::P2WSH => "P2WSH",
7468	            DecodeFallbacksType::P2TR => "P2TR",
7469	        }.to_string()
7470	    }
7471	}
7472
7473	#[derive(Clone, Debug, Deserialize, Serialize)]
7474	pub struct DecodeFallbacks {
7475	    #[serde(skip_serializing_if = "Option::is_none")]
7476	    pub addr: Option<String>,
7477	    #[serde(skip_serializing_if = "Option::is_none")]
7478	    pub warning_invoice_fallbacks_version_invalid: Option<String>,
7479	    // Path `Decode.fallbacks[].type`
7480	    #[serde(rename = "type")]
7481	    pub item_type: DecodeFallbacksType,
7482	    pub hex: String,
7483	}
7484
7485	#[derive(Clone, Debug, Deserialize, Serialize)]
7486	pub struct DecodeInvoiceFallbacks {
7487	    #[serde(skip_serializing_if = "Option::is_none")]
7488	    pub address: Option<String>,
7489	    pub hex: String,
7490	    pub version: u8,
7491	}
7492
7493	#[derive(Clone, Debug, Deserialize, Serialize)]
7494	pub struct DecodeInvreqPathsPath {
7495	    pub blinded_node_id: PublicKey,
7496	    pub encrypted_recipient_data: String,
7497	}
7498
7499	#[derive(Clone, Debug, Deserialize, Serialize)]
7500	pub struct DecodeInvreqPaths {
7501	    #[deprecated]
7502	    #[serde(skip_serializing_if = "Option::is_none")]
7503	    pub blinding: Option<PublicKey>,
7504	    #[serde(skip_serializing_if = "Option::is_none")]
7505	    pub first_node_id: Option<PublicKey>,
7506	    #[serde(skip_serializing_if = "Option::is_none")]
7507	    pub first_path_key: Option<PublicKey>,
7508	    #[serde(skip_serializing_if = "Option::is_none")]
7509	    pub first_scid: Option<ShortChannelId>,
7510	    #[serde(skip_serializing_if = "Option::is_none")]
7511	    pub first_scid_dir: Option<u32>,
7512	    pub path: Vec<DecodeInvreqPathsPath>,
7513	}
7514
7515	#[derive(Clone, Debug, Deserialize, Serialize)]
7516	pub struct DecodeOfferPaths {
7517	    #[deprecated]
7518	    #[serde(skip_serializing_if = "Option::is_none")]
7519	    pub blinding: Option<PublicKey>,
7520	    #[serde(skip_serializing_if = "Option::is_none")]
7521	    pub first_node_id: Option<PublicKey>,
7522	    #[serde(skip_serializing_if = "Option::is_none")]
7523	    pub first_path_key: Option<PublicKey>,
7524	    #[serde(skip_serializing_if = "Option::is_none")]
7525	    pub first_scid: Option<ShortChannelId>,
7526	    #[serde(skip_serializing_if = "Option::is_none")]
7527	    pub first_scid_dir: Option<u32>,
7528	}
7529
7530	#[derive(Clone, Debug, Deserialize, Serialize)]
7531	pub struct DecodeRestrictions {
7532	    pub alternatives: Vec<String>,
7533	    pub summary: String,
7534	}
7535
7536	/// ['What kind of object it decoded to.']
7537	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
7538	#[allow(non_camel_case_types)]
7539	pub enum DecodeType {
7540	    #[serde(rename = "bolt12 offer")]
7541	    BOLT12_OFFER = 0,
7542	    #[serde(rename = "bolt12 invoice")]
7543	    BOLT12_INVOICE = 1,
7544	    #[serde(rename = "bolt12 invoice_request")]
7545	    BOLT12_INVOICE_REQUEST = 2,
7546	    #[serde(rename = "bolt11 invoice")]
7547	    BOLT11_INVOICE = 3,
7548	    #[serde(rename = "rune")]
7549	    RUNE = 4,
7550	    #[serde(rename = "emergency recover")]
7551	    EMERGENCY_RECOVER = 5,
7552	}
7553
7554	impl TryFrom<i32> for DecodeType {
7555	    type Error = anyhow::Error;
7556	    fn try_from(c: i32) -> Result<DecodeType, anyhow::Error> {
7557	        match c {
7558	    0 => Ok(DecodeType::BOLT12_OFFER),
7559	    1 => Ok(DecodeType::BOLT12_INVOICE),
7560	    2 => Ok(DecodeType::BOLT12_INVOICE_REQUEST),
7561	    3 => Ok(DecodeType::BOLT11_INVOICE),
7562	    4 => Ok(DecodeType::RUNE),
7563	    5 => Ok(DecodeType::EMERGENCY_RECOVER),
7564	            o => Err(anyhow::anyhow!("Unknown variant {} for enum DecodeType", o)),
7565	        }
7566	    }
7567	}
7568
7569	impl ToString for DecodeType {
7570	    fn to_string(&self) -> String {
7571	        match self {
7572	            DecodeType::BOLT12_OFFER => "BOLT12_OFFER",
7573	            DecodeType::BOLT12_INVOICE => "BOLT12_INVOICE",
7574	            DecodeType::BOLT12_INVOICE_REQUEST => "BOLT12_INVOICE_REQUEST",
7575	            DecodeType::BOLT11_INVOICE => "BOLT11_INVOICE",
7576	            DecodeType::RUNE => "RUNE",
7577	            DecodeType::EMERGENCY_RECOVER => "EMERGENCY_RECOVER",
7578	        }.to_string()
7579	    }
7580	}
7581
7582	#[derive(Clone, Debug, Deserialize, Serialize)]
7583	pub struct DecodeResponse {
7584	    #[deprecated]
7585	    #[serde(skip_serializing_if = "Option::is_none")]
7586	    pub offer_node_id: Option<PublicKey>,
7587	    #[deprecated]
7588	    #[serde(skip_serializing_if = "Option::is_none")]
7589	    pub warning_missing_offer_node_id: Option<String>,
7590	    #[serde(skip_serializing_if = "Option::is_none")]
7591	    pub amount_msat: Option<Amount>,
7592	    #[serde(skip_serializing_if = "Option::is_none")]
7593	    pub created_at: Option<u64>,
7594	    #[serde(skip_serializing_if = "Option::is_none")]
7595	    pub currency: Option<String>,
7596	    #[serde(skip_serializing_if = "Option::is_none")]
7597	    pub currency_minor_unit: Option<u32>,
7598	    #[serde(skip_serializing_if = "Option::is_none")]
7599	    pub decrypted: Option<String>,
7600	    #[serde(skip_serializing_if = "Option::is_none")]
7601	    pub description: Option<String>,
7602	    #[serde(skip_serializing_if = "Option::is_none")]
7603	    pub description_hash: Option<Sha256>,
7604	    #[serde(skip_serializing_if = "Option::is_none")]
7605	    pub expiry: Option<u64>,
7606	    #[serde(skip_serializing_if = "Option::is_none")]
7607	    pub features: Option<String>,
7608	    #[serde(skip_serializing_if = "Option::is_none")]
7609	    pub hex: Option<String>,
7610	    #[serde(skip_serializing_if = "Option::is_none")]
7611	    pub invoice_amount_msat: Option<Amount>,
7612	    #[serde(skip_serializing_if = "Option::is_none")]
7613	    pub invoice_created_at: Option<u64>,
7614	    #[serde(skip_serializing_if = "Option::is_none")]
7615	    pub invoice_features: Option<String>,
7616	    #[serde(skip_serializing_if = "Option::is_none")]
7617	    pub invoice_node_id: Option<PublicKey>,
7618	    #[serde(skip_serializing_if = "Option::is_none")]
7619	    pub invoice_payment_hash: Option<String>,
7620	    #[serde(skip_serializing_if = "Option::is_none")]
7621	    pub invoice_recurrence_basetime: Option<u64>,
7622	    #[serde(skip_serializing_if = "Option::is_none")]
7623	    pub invoice_relative_expiry: Option<u32>,
7624	    #[serde(skip_serializing_if = "Option::is_none")]
7625	    pub invreq_amount_msat: Option<Amount>,
7626	    #[serde(skip_serializing_if = "Option::is_none")]
7627	    pub invreq_bip_353_name: Option<DecodeInvreqBip353Name>,
7628	    #[serde(skip_serializing_if = "Option::is_none")]
7629	    pub invreq_chain: Option<String>,
7630	    #[serde(skip_serializing_if = "Option::is_none")]
7631	    pub invreq_features: Option<String>,
7632	    #[serde(skip_serializing_if = "Option::is_none")]
7633	    pub invreq_metadata: Option<String>,
7634	    #[serde(skip_serializing_if = "Option::is_none")]
7635	    pub invreq_payer_id: Option<String>,
7636	    #[serde(skip_serializing_if = "Option::is_none")]
7637	    pub invreq_payer_note: Option<String>,
7638	    #[serde(skip_serializing_if = "Option::is_none")]
7639	    pub invreq_quantity: Option<u64>,
7640	    #[serde(skip_serializing_if = "Option::is_none")]
7641	    pub invreq_recurrence_counter: Option<u32>,
7642	    #[serde(skip_serializing_if = "Option::is_none")]
7643	    pub invreq_recurrence_start: Option<u32>,
7644	    #[serde(skip_serializing_if = "Option::is_none")]
7645	    pub min_final_cltv_expiry: Option<u32>,
7646	    #[serde(skip_serializing_if = "Option::is_none")]
7647	    pub offer_absolute_expiry: Option<u64>,
7648	    #[serde(skip_serializing_if = "Option::is_none")]
7649	    pub offer_amount: Option<u64>,
7650	    #[serde(skip_serializing_if = "Option::is_none")]
7651	    pub offer_amount_msat: Option<Amount>,
7652	    #[serde(skip_serializing_if = "Option::is_none")]
7653	    pub offer_currency: Option<String>,
7654	    #[serde(skip_serializing_if = "Option::is_none")]
7655	    pub offer_description: Option<String>,
7656	    #[serde(skip_serializing_if = "Option::is_none")]
7657	    pub offer_features: Option<String>,
7658	    #[serde(skip_serializing_if = "Option::is_none")]
7659	    pub offer_id: Option<String>,
7660	    #[serde(skip_serializing_if = "Option::is_none")]
7661	    pub offer_issuer: Option<String>,
7662	    #[serde(skip_serializing_if = "Option::is_none")]
7663	    pub offer_issuer_id: Option<PublicKey>,
7664	    #[serde(skip_serializing_if = "Option::is_none")]
7665	    pub offer_metadata: Option<String>,
7666	    #[serde(skip_serializing_if = "Option::is_none")]
7667	    pub offer_quantity_max: Option<u64>,
7668	    #[serde(skip_serializing_if = "Option::is_none")]
7669	    pub payee: Option<PublicKey>,
7670	    #[serde(skip_serializing_if = "Option::is_none")]
7671	    pub payment_hash: Option<Sha256>,
7672	    #[serde(skip_serializing_if = "Option::is_none")]
7673	    pub payment_metadata: Option<String>,
7674	    #[serde(skip_serializing_if = "Option::is_none")]
7675	    pub payment_secret: Option<Secret>,
7676	    #[serde(skip_serializing_if = "Option::is_none")]
7677	    pub routes: Option<DecodeRoutehintList>,
7678	    #[serde(skip_serializing_if = "Option::is_none")]
7679	    pub signature: Option<String>,
7680	    #[serde(skip_serializing_if = "Option::is_none")]
7681	    pub string: Option<String>,
7682	    #[serde(skip_serializing_if = "Option::is_none")]
7683	    pub unique_id: Option<String>,
7684	    #[serde(skip_serializing_if = "Option::is_none")]
7685	    pub version: Option<String>,
7686	    #[serde(skip_serializing_if = "Option::is_none")]
7687	    pub warning_empty_blinded_path: Option<String>,
7688	    #[serde(skip_serializing_if = "Option::is_none")]
7689	    pub warning_invalid_invoice_request_signature: Option<String>,
7690	    #[serde(skip_serializing_if = "Option::is_none")]
7691	    pub warning_invalid_invoice_signature: Option<String>,
7692	    #[serde(skip_serializing_if = "Option::is_none")]
7693	    pub warning_invalid_invreq_payer_note: Option<String>,
7694	    #[serde(skip_serializing_if = "Option::is_none")]
7695	    pub warning_invalid_offer_currency: Option<String>,
7696	    #[serde(skip_serializing_if = "Option::is_none")]
7697	    pub warning_invalid_offer_description: Option<String>,
7698	    #[serde(skip_serializing_if = "Option::is_none")]
7699	    pub warning_invalid_offer_issuer: Option<String>,
7700	    #[serde(skip_serializing_if = "Option::is_none")]
7701	    pub warning_invreq_bip_353_name_domain_invalid: Option<String>,
7702	    #[serde(skip_serializing_if = "Option::is_none")]
7703	    pub warning_invreq_bip_353_name_name_invalid: Option<String>,
7704	    #[serde(skip_serializing_if = "Option::is_none")]
7705	    pub warning_missing_invoice_amount: Option<String>,
7706	    #[serde(skip_serializing_if = "Option::is_none")]
7707	    pub warning_missing_invoice_blindedpay: Option<String>,
7708	    #[serde(skip_serializing_if = "Option::is_none")]
7709	    pub warning_missing_invoice_created_at: Option<String>,
7710	    #[serde(skip_serializing_if = "Option::is_none")]
7711	    pub warning_missing_invoice_node_id: Option<String>,
7712	    #[serde(skip_serializing_if = "Option::is_none")]
7713	    pub warning_missing_invoice_paths: Option<String>,
7714	    #[serde(skip_serializing_if = "Option::is_none")]
7715	    pub warning_missing_invoice_payment_hash: Option<String>,
7716	    #[serde(skip_serializing_if = "Option::is_none")]
7717	    pub warning_missing_invoice_recurrence_basetime: Option<String>,
7718	    #[serde(skip_serializing_if = "Option::is_none")]
7719	    pub warning_missing_invoice_request_signature: Option<String>,
7720	    #[serde(skip_serializing_if = "Option::is_none")]
7721	    pub warning_missing_invoice_signature: Option<String>,
7722	    #[serde(skip_serializing_if = "Option::is_none")]
7723	    pub warning_missing_invreq_metadata: Option<String>,
7724	    #[serde(skip_serializing_if = "Option::is_none")]
7725	    pub warning_missing_invreq_payer_id: Option<String>,
7726	    #[serde(skip_serializing_if = "Option::is_none")]
7727	    pub warning_missing_offer_description: Option<String>,
7728	    #[serde(skip_serializing_if = "Option::is_none")]
7729	    pub warning_missing_offer_issuer_id: Option<String>,
7730	    #[serde(skip_serializing_if = "Option::is_none")]
7731	    pub warning_rune_invalid_utf8: Option<String>,
7732	    #[serde(skip_serializing_if = "Option::is_none")]
7733	    pub warning_unknown_offer_currency: Option<String>,
7734	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7735	    pub extra: Option<Vec<DecodeExtra>>,
7736	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7737	    pub fallbacks: Option<Vec<DecodeFallbacks>>,
7738	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7739	    pub invoice_fallbacks: Option<Vec<DecodeInvoiceFallbacks>>,
7740	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7741	    pub invreq_paths: Option<Vec<DecodeInvreqPaths>>,
7742	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7743	    pub offer_chains: Option<Vec<Sha256>>,
7744	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7745	    pub offer_paths: Option<Vec<DecodeOfferPaths>>,
7746	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7747	    pub restrictions: Option<Vec<DecodeRestrictions>>,
7748	    // Path `Decode.type`
7749	    #[serde(rename = "type")]
7750	    pub item_type: DecodeType,
7751	    pub valid: bool,
7752	}
7753
7754	impl TryFrom<Response> for DecodeResponse {
7755	    type Error = super::TryFromResponseError;
7756
7757	    fn try_from(response: Response) -> Result<Self, Self::Error> {
7758	        match response {
7759	            Response::Decode(response) => Ok(response),
7760	            _ => Err(TryFromResponseError)
7761	        }
7762	    }
7763	}
7764
7765	/// ['Status of the payment.']
7766	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
7767	#[allow(non_camel_case_types)]
7768	pub enum DelpayPaymentsStatus {
7769	    #[serde(rename = "pending")]
7770	    PENDING = 0,
7771	    #[serde(rename = "failed")]
7772	    FAILED = 1,
7773	    #[serde(rename = "complete")]
7774	    COMPLETE = 2,
7775	}
7776
7777	impl TryFrom<i32> for DelpayPaymentsStatus {
7778	    type Error = anyhow::Error;
7779	    fn try_from(c: i32) -> Result<DelpayPaymentsStatus, anyhow::Error> {
7780	        match c {
7781	    0 => Ok(DelpayPaymentsStatus::PENDING),
7782	    1 => Ok(DelpayPaymentsStatus::FAILED),
7783	    2 => Ok(DelpayPaymentsStatus::COMPLETE),
7784	            o => Err(anyhow::anyhow!("Unknown variant {} for enum DelpayPaymentsStatus", o)),
7785	        }
7786	    }
7787	}
7788
7789	impl ToString for DelpayPaymentsStatus {
7790	    fn to_string(&self) -> String {
7791	        match self {
7792	            DelpayPaymentsStatus::PENDING => "PENDING",
7793	            DelpayPaymentsStatus::FAILED => "FAILED",
7794	            DelpayPaymentsStatus::COMPLETE => "COMPLETE",
7795	        }.to_string()
7796	    }
7797	}
7798
7799	#[derive(Clone, Debug, Deserialize, Serialize)]
7800	pub struct DelpayPayments {
7801	    #[serde(skip_serializing_if = "Option::is_none")]
7802	    pub amount_msat: Option<Amount>,
7803	    #[serde(skip_serializing_if = "Option::is_none")]
7804	    pub bolt11: Option<String>,
7805	    #[serde(skip_serializing_if = "Option::is_none")]
7806	    pub bolt12: Option<String>,
7807	    #[serde(skip_serializing_if = "Option::is_none")]
7808	    pub completed_at: Option<u64>,
7809	    #[serde(skip_serializing_if = "Option::is_none")]
7810	    pub created_index: Option<u64>,
7811	    #[serde(skip_serializing_if = "Option::is_none")]
7812	    pub destination: Option<PublicKey>,
7813	    #[serde(skip_serializing_if = "Option::is_none")]
7814	    pub erroronion: Option<String>,
7815	    #[serde(skip_serializing_if = "Option::is_none")]
7816	    pub groupid: Option<u64>,
7817	    #[serde(skip_serializing_if = "Option::is_none")]
7818	    pub label: Option<String>,
7819	    #[serde(skip_serializing_if = "Option::is_none")]
7820	    pub partid: Option<u64>,
7821	    #[serde(skip_serializing_if = "Option::is_none")]
7822	    pub payment_preimage: Option<Secret>,
7823	    #[serde(skip_serializing_if = "Option::is_none")]
7824	    pub updated_index: Option<u64>,
7825	    // Path `DelPay.payments[].status`
7826	    pub status: DelpayPaymentsStatus,
7827	    pub amount_sent_msat: Amount,
7828	    pub created_at: u64,
7829	    pub id: u64,
7830	    pub payment_hash: Sha256,
7831	}
7832
7833	#[derive(Clone, Debug, Deserialize, Serialize)]
7834	pub struct DelpayResponse {
7835	    pub payments: Vec<DelpayPayments>,
7836	}
7837
7838	impl TryFrom<Response> for DelpayResponse {
7839	    type Error = super::TryFromResponseError;
7840
7841	    fn try_from(response: Response) -> Result<Self, Self::Error> {
7842	        match response {
7843	            Response::DelPay(response) => Ok(response),
7844	            _ => Err(TryFromResponseError)
7845	        }
7846	    }
7847	}
7848
7849	#[derive(Clone, Debug, Deserialize, Serialize)]
7850	pub struct DelforwardResponse {
7851	}
7852
7853	impl TryFrom<Response> for DelforwardResponse {
7854	    type Error = super::TryFromResponseError;
7855
7856	    fn try_from(response: Response) -> Result<Self, Self::Error> {
7857	        match response {
7858	            Response::DelForward(response) => Ok(response),
7859	            _ => Err(TryFromResponseError)
7860	        }
7861	    }
7862	}
7863
7864	#[derive(Clone, Debug, Deserialize, Serialize)]
7865	pub struct DisableofferResponse {
7866	    #[serde(skip_serializing_if = "Option::is_none")]
7867	    pub label: Option<String>,
7868	    pub active: bool,
7869	    pub bolt12: String,
7870	    pub offer_id: Sha256,
7871	    pub single_use: bool,
7872	    pub used: bool,
7873	}
7874
7875	impl TryFrom<Response> for DisableofferResponse {
7876	    type Error = super::TryFromResponseError;
7877
7878	    fn try_from(response: Response) -> Result<Self, Self::Error> {
7879	        match response {
7880	            Response::DisableOffer(response) => Ok(response),
7881	            _ => Err(TryFromResponseError)
7882	        }
7883	    }
7884	}
7885
7886	#[derive(Clone, Debug, Deserialize, Serialize)]
7887	pub struct EnableofferResponse {
7888	    #[serde(skip_serializing_if = "Option::is_none")]
7889	    pub label: Option<String>,
7890	    pub active: bool,
7891	    pub bolt12: String,
7892	    pub offer_id: Sha256,
7893	    pub single_use: bool,
7894	    pub used: bool,
7895	}
7896
7897	impl TryFrom<Response> for EnableofferResponse {
7898	    type Error = super::TryFromResponseError;
7899
7900	    fn try_from(response: Response) -> Result<Self, Self::Error> {
7901	        match response {
7902	            Response::EnableOffer(response) => Ok(response),
7903	            _ => Err(TryFromResponseError)
7904	        }
7905	    }
7906	}
7907
7908	#[derive(Clone, Debug, Deserialize, Serialize)]
7909	pub struct DisconnectResponse {
7910	}
7911
7912	impl TryFrom<Response> for DisconnectResponse {
7913	    type Error = super::TryFromResponseError;
7914
7915	    fn try_from(response: Response) -> Result<Self, Self::Error> {
7916	        match response {
7917	            Response::Disconnect(response) => Ok(response),
7918	            _ => Err(TryFromResponseError)
7919	        }
7920	    }
7921	}
7922
7923	#[derive(Clone, Debug, Deserialize, Serialize)]
7924	pub struct FeeratesOnchainFeeEstimates {
7925	    #[serde(skip_serializing_if = "Option::is_none")]
7926	    pub unilateral_close_nonanchor_satoshis: Option<u64>,
7927	    pub htlc_success_satoshis: u64,
7928	    pub htlc_timeout_satoshis: u64,
7929	    pub mutual_close_satoshis: u64,
7930	    pub opening_channel_satoshis: u64,
7931	    pub unilateral_close_satoshis: u64,
7932	}
7933
7934	#[derive(Clone, Debug, Deserialize, Serialize)]
7935	pub struct FeeratesPerkbEstimates {
7936	    pub blockcount: u32,
7937	    pub feerate: u32,
7938	    pub smoothed_feerate: u32,
7939	}
7940
7941	#[derive(Clone, Debug, Deserialize, Serialize)]
7942	pub struct FeeratesPerkb {
7943	    #[deprecated]
7944	    #[serde(skip_serializing_if = "Option::is_none")]
7945	    pub delayed_to_us: Option<u32>,
7946	    #[deprecated]
7947	    #[serde(skip_serializing_if = "Option::is_none")]
7948	    pub htlc_resolution: Option<u32>,
7949	    #[serde(skip_serializing_if = "Option::is_none")]
7950	    pub floor: Option<u32>,
7951	    #[serde(skip_serializing_if = "Option::is_none")]
7952	    pub mutual_close: Option<u32>,
7953	    #[serde(skip_serializing_if = "Option::is_none")]
7954	    pub opening: Option<u32>,
7955	    #[serde(skip_serializing_if = "Option::is_none")]
7956	    pub penalty: Option<u32>,
7957	    #[serde(skip_serializing_if = "Option::is_none")]
7958	    pub unilateral_anchor_close: Option<u32>,
7959	    #[serde(skip_serializing_if = "Option::is_none")]
7960	    pub unilateral_close: Option<u32>,
7961	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7962	    pub estimates: Option<Vec<FeeratesPerkbEstimates>>,
7963	    pub max_acceptable: u32,
7964	    pub min_acceptable: u32,
7965	}
7966
7967	#[derive(Clone, Debug, Deserialize, Serialize)]
7968	pub struct FeeratesPerkwEstimates {
7969	    pub blockcount: u32,
7970	    pub feerate: u32,
7971	    pub smoothed_feerate: u32,
7972	}
7973
7974	#[derive(Clone, Debug, Deserialize, Serialize)]
7975	pub struct FeeratesPerkw {
7976	    #[deprecated]
7977	    #[serde(skip_serializing_if = "Option::is_none")]
7978	    pub delayed_to_us: Option<u32>,
7979	    #[deprecated]
7980	    #[serde(skip_serializing_if = "Option::is_none")]
7981	    pub htlc_resolution: Option<u32>,
7982	    #[serde(skip_serializing_if = "Option::is_none")]
7983	    pub floor: Option<u32>,
7984	    #[serde(skip_serializing_if = "Option::is_none")]
7985	    pub mutual_close: Option<u32>,
7986	    #[serde(skip_serializing_if = "Option::is_none")]
7987	    pub opening: Option<u32>,
7988	    #[serde(skip_serializing_if = "Option::is_none")]
7989	    pub penalty: Option<u32>,
7990	    #[serde(skip_serializing_if = "Option::is_none")]
7991	    pub unilateral_anchor_close: Option<u32>,
7992	    #[serde(skip_serializing_if = "Option::is_none")]
7993	    pub unilateral_close: Option<u32>,
7994	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
7995	    pub estimates: Option<Vec<FeeratesPerkwEstimates>>,
7996	    pub max_acceptable: u32,
7997	    pub min_acceptable: u32,
7998	}
7999
8000	#[derive(Clone, Debug, Deserialize, Serialize)]
8001	pub struct FeeratesResponse {
8002	    #[serde(skip_serializing_if = "Option::is_none")]
8003	    pub onchain_fee_estimates: Option<FeeratesOnchainFeeEstimates>,
8004	    #[serde(skip_serializing_if = "Option::is_none")]
8005	    pub perkb: Option<FeeratesPerkb>,
8006	    #[serde(skip_serializing_if = "Option::is_none")]
8007	    pub perkw: Option<FeeratesPerkw>,
8008	    #[serde(skip_serializing_if = "Option::is_none")]
8009	    pub warning_missing_feerates: Option<String>,
8010	}
8011
8012	impl TryFrom<Response> for FeeratesResponse {
8013	    type Error = super::TryFromResponseError;
8014
8015	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8016	        match response {
8017	            Response::Feerates(response) => Ok(response),
8018	            _ => Err(TryFromResponseError)
8019	        }
8020	    }
8021	}
8022
8023	#[derive(Clone, Debug, Deserialize, Serialize)]
8024	pub struct FetchinvoiceNextPeriod {
8025	    pub counter: u64,
8026	    pub endtime: u64,
8027	    pub paywindow_end: u64,
8028	    pub paywindow_start: u64,
8029	    pub starttime: u64,
8030	}
8031
8032	#[derive(Clone, Debug, Deserialize, Serialize)]
8033	pub struct FetchinvoiceChanges {
8034	    #[serde(skip_serializing_if = "Option::is_none")]
8035	    pub amount_msat: Option<Amount>,
8036	    #[serde(skip_serializing_if = "Option::is_none")]
8037	    pub description: Option<String>,
8038	    #[serde(skip_serializing_if = "Option::is_none")]
8039	    pub description_appended: Option<String>,
8040	    #[serde(skip_serializing_if = "Option::is_none")]
8041	    pub vendor: Option<String>,
8042	    #[serde(skip_serializing_if = "Option::is_none")]
8043	    pub vendor_removed: Option<String>,
8044	}
8045
8046	#[derive(Clone, Debug, Deserialize, Serialize)]
8047	pub struct FetchinvoiceResponse {
8048	    #[serde(skip_serializing_if = "Option::is_none")]
8049	    pub next_period: Option<FetchinvoiceNextPeriod>,
8050	    pub changes: FetchinvoiceChanges,
8051	    pub invoice: String,
8052	}
8053
8054	impl TryFrom<Response> for FetchinvoiceResponse {
8055	    type Error = super::TryFromResponseError;
8056
8057	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8058	        match response {
8059	            Response::FetchInvoice(response) => Ok(response),
8060	            _ => Err(TryFromResponseError)
8061	        }
8062	    }
8063	}
8064
8065	#[derive(Clone, Debug, Deserialize, Serialize)]
8066	pub struct FundchannelCancelResponse {
8067	    pub cancelled: String,
8068	}
8069
8070	impl TryFrom<Response> for FundchannelCancelResponse {
8071	    type Error = super::TryFromResponseError;
8072
8073	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8074	        match response {
8075	            Response::FundChannelCancel(response) => Ok(response),
8076	            _ => Err(TryFromResponseError)
8077	        }
8078	    }
8079	}
8080
8081	#[derive(Clone, Debug, Deserialize, Serialize)]
8082	pub struct FundchannelCompleteResponse {
8083	    pub channel_id: Sha256,
8084	    pub commitments_secured: bool,
8085	}
8086
8087	impl TryFrom<Response> for FundchannelCompleteResponse {
8088	    type Error = super::TryFromResponseError;
8089
8090	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8091	        match response {
8092	            Response::FundChannelComplete(response) => Ok(response),
8093	            _ => Err(TryFromResponseError)
8094	        }
8095	    }
8096	}
8097
8098	#[derive(Clone, Debug, Deserialize, Serialize)]
8099	pub struct FundchannelChannelType {
8100	    pub bits: Vec<u32>,
8101	    pub names: Vec<ChannelTypeName>,
8102	}
8103
8104	#[derive(Clone, Debug, Deserialize, Serialize)]
8105	pub struct FundchannelResponse {
8106	    #[serde(skip_serializing_if = "Option::is_none")]
8107	    pub channel_type: Option<FundchannelChannelType>,
8108	    #[serde(skip_serializing_if = "Option::is_none")]
8109	    pub close_to: Option<String>,
8110	    #[serde(skip_serializing_if = "Option::is_none")]
8111	    pub mindepth: Option<u32>,
8112	    pub channel_id: Sha256,
8113	    pub outnum: u32,
8114	    pub tx: String,
8115	    pub txid: String,
8116	}
8117
8118	impl TryFrom<Response> for FundchannelResponse {
8119	    type Error = super::TryFromResponseError;
8120
8121	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8122	        match response {
8123	            Response::FundChannel(response) => Ok(response),
8124	            _ => Err(TryFromResponseError)
8125	        }
8126	    }
8127	}
8128
8129	#[derive(Clone, Debug, Deserialize, Serialize)]
8130	pub struct FundchannelStartChannelType {
8131	    pub bits: Vec<u32>,
8132	    pub names: Vec<ChannelTypeName>,
8133	}
8134
8135	#[derive(Clone, Debug, Deserialize, Serialize)]
8136	pub struct FundchannelStartResponse {
8137	    #[serde(skip_serializing_if = "Option::is_none")]
8138	    pub channel_type: Option<FundchannelStartChannelType>,
8139	    #[serde(skip_serializing_if = "Option::is_none")]
8140	    pub close_to: Option<String>,
8141	    #[serde(skip_serializing_if = "Option::is_none")]
8142	    pub mindepth: Option<u32>,
8143	    pub funding_address: String,
8144	    pub scriptpubkey: String,
8145	    pub warning_usage: String,
8146	}
8147
8148	impl TryFrom<Response> for FundchannelStartResponse {
8149	    type Error = super::TryFromResponseError;
8150
8151	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8152	        match response {
8153	            Response::FundChannelStart(response) => Ok(response),
8154	            _ => Err(TryFromResponseError)
8155	        }
8156	    }
8157	}
8158
8159	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
8160	#[allow(non_camel_case_types)]
8161	pub enum GetlogLogType {
8162	    #[serde(rename = "SKIPPED")]
8163	    SKIPPED = 0,
8164	    #[serde(rename = "BROKEN")]
8165	    BROKEN = 1,
8166	    #[serde(rename = "UNUSUAL")]
8167	    UNUSUAL = 2,
8168	    #[serde(rename = "INFO")]
8169	    INFO = 3,
8170	    #[serde(rename = "DEBUG")]
8171	    DEBUG = 4,
8172	    #[serde(rename = "IO_IN")]
8173	    IO_IN = 5,
8174	    #[serde(rename = "IO_OUT")]
8175	    IO_OUT = 6,
8176	    #[serde(rename = "TRACE")]
8177	    TRACE = 7,
8178	}
8179
8180	impl TryFrom<i32> for GetlogLogType {
8181	    type Error = anyhow::Error;
8182	    fn try_from(c: i32) -> Result<GetlogLogType, anyhow::Error> {
8183	        match c {
8184	    0 => Ok(GetlogLogType::SKIPPED),
8185	    1 => Ok(GetlogLogType::BROKEN),
8186	    2 => Ok(GetlogLogType::UNUSUAL),
8187	    3 => Ok(GetlogLogType::INFO),
8188	    4 => Ok(GetlogLogType::DEBUG),
8189	    5 => Ok(GetlogLogType::IO_IN),
8190	    6 => Ok(GetlogLogType::IO_OUT),
8191	    7 => Ok(GetlogLogType::TRACE),
8192	            o => Err(anyhow::anyhow!("Unknown variant {} for enum GetlogLogType", o)),
8193	        }
8194	    }
8195	}
8196
8197	impl ToString for GetlogLogType {
8198	    fn to_string(&self) -> String {
8199	        match self {
8200	            GetlogLogType::SKIPPED => "SKIPPED",
8201	            GetlogLogType::BROKEN => "BROKEN",
8202	            GetlogLogType::UNUSUAL => "UNUSUAL",
8203	            GetlogLogType::INFO => "INFO",
8204	            GetlogLogType::DEBUG => "DEBUG",
8205	            GetlogLogType::TRACE => "TRACE",
8206	            GetlogLogType::IO_IN => "IO_IN",
8207	            GetlogLogType::IO_OUT => "IO_OUT",
8208	        }.to_string()
8209	    }
8210	}
8211
8212	#[derive(Clone, Debug, Deserialize, Serialize)]
8213	pub struct GetlogLog {
8214	    #[serde(skip_serializing_if = "Option::is_none")]
8215	    pub data: Option<String>,
8216	    #[serde(skip_serializing_if = "Option::is_none")]
8217	    pub log: Option<String>,
8218	    #[serde(skip_serializing_if = "Option::is_none")]
8219	    pub node_id: Option<PublicKey>,
8220	    #[serde(skip_serializing_if = "Option::is_none")]
8221	    pub num_skipped: Option<u32>,
8222	    #[serde(skip_serializing_if = "Option::is_none")]
8223	    pub source: Option<String>,
8224	    #[serde(skip_serializing_if = "Option::is_none")]
8225	    pub time: Option<String>,
8226	    // Path `GetLog.log[].type`
8227	    #[serde(rename = "type")]
8228	    pub item_type: GetlogLogType,
8229	}
8230
8231	#[derive(Clone, Debug, Deserialize, Serialize)]
8232	pub struct GetlogResponse {
8233	    pub bytes_max: u32,
8234	    pub bytes_used: u32,
8235	    pub created_at: String,
8236	    pub log: Vec<GetlogLog>,
8237	}
8238
8239	impl TryFrom<Response> for GetlogResponse {
8240	    type Error = super::TryFromResponseError;
8241
8242	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8243	        match response {
8244	            Response::GetLog(response) => Ok(response),
8245	            _ => Err(TryFromResponseError)
8246	        }
8247	    }
8248	}
8249
8250	/// ['Policy funder plugin will use to decide how much capital to commit to a v2 open channel request.']
8251	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
8252	#[allow(non_camel_case_types)]
8253	pub enum FunderupdatePolicy {
8254	    #[serde(rename = "match")]
8255	    MATCH = 0,
8256	    #[serde(rename = "available")]
8257	    AVAILABLE = 1,
8258	    #[serde(rename = "fixed")]
8259	    FIXED = 2,
8260	}
8261
8262	impl TryFrom<i32> for FunderupdatePolicy {
8263	    type Error = anyhow::Error;
8264	    fn try_from(c: i32) -> Result<FunderupdatePolicy, anyhow::Error> {
8265	        match c {
8266	    0 => Ok(FunderupdatePolicy::MATCH),
8267	    1 => Ok(FunderupdatePolicy::AVAILABLE),
8268	    2 => Ok(FunderupdatePolicy::FIXED),
8269	            o => Err(anyhow::anyhow!("Unknown variant {} for enum FunderupdatePolicy", o)),
8270	        }
8271	    }
8272	}
8273
8274	impl ToString for FunderupdatePolicy {
8275	    fn to_string(&self) -> String {
8276	        match self {
8277	            FunderupdatePolicy::MATCH => "MATCH",
8278	            FunderupdatePolicy::AVAILABLE => "AVAILABLE",
8279	            FunderupdatePolicy::FIXED => "FIXED",
8280	        }.to_string()
8281	    }
8282	}
8283
8284	#[derive(Clone, Debug, Deserialize, Serialize)]
8285	pub struct FunderupdateResponse {
8286	    #[serde(skip_serializing_if = "Option::is_none")]
8287	    pub channel_fee_max_base_msat: Option<Amount>,
8288	    #[serde(skip_serializing_if = "Option::is_none")]
8289	    pub channel_fee_max_proportional_thousandths: Option<u32>,
8290	    #[serde(skip_serializing_if = "Option::is_none")]
8291	    pub compact_lease: Option<String>,
8292	    #[serde(skip_serializing_if = "Option::is_none")]
8293	    pub funding_weight: Option<u32>,
8294	    #[serde(skip_serializing_if = "Option::is_none")]
8295	    pub lease_fee_base_msat: Option<Amount>,
8296	    #[serde(skip_serializing_if = "Option::is_none")]
8297	    pub lease_fee_basis: Option<u32>,
8298	    // Path `FunderUpdate.policy`
8299	    pub policy: FunderupdatePolicy,
8300	    pub fund_probability: u32,
8301	    pub fuzz_percent: u32,
8302	    pub leases_only: bool,
8303	    pub max_their_funding_msat: Amount,
8304	    pub min_their_funding_msat: Amount,
8305	    pub per_channel_max_msat: Amount,
8306	    pub per_channel_min_msat: Amount,
8307	    pub policy_mod: u32,
8308	    pub reserve_tank_msat: Amount,
8309	    pub summary: String,
8310	}
8311
8312	impl TryFrom<Response> for FunderupdateResponse {
8313	    type Error = super::TryFromResponseError;
8314
8315	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8316	        match response {
8317	            Response::FunderUpdate(response) => Ok(response),
8318	            _ => Err(TryFromResponseError)
8319	        }
8320	    }
8321	}
8322
8323	/// ['The features understood by the destination node.']
8324	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
8325	#[allow(non_camel_case_types)]
8326	pub enum GetrouteRouteStyle {
8327	    #[serde(rename = "tlv")]
8328	    TLV = 0,
8329	}
8330
8331	impl TryFrom<i32> for GetrouteRouteStyle {
8332	    type Error = anyhow::Error;
8333	    fn try_from(c: i32) -> Result<GetrouteRouteStyle, anyhow::Error> {
8334	        match c {
8335	    0 => Ok(GetrouteRouteStyle::TLV),
8336	            o => Err(anyhow::anyhow!("Unknown variant {} for enum GetrouteRouteStyle", o)),
8337	        }
8338	    }
8339	}
8340
8341	impl ToString for GetrouteRouteStyle {
8342	    fn to_string(&self) -> String {
8343	        match self {
8344	            GetrouteRouteStyle::TLV => "TLV",
8345	        }.to_string()
8346	    }
8347	}
8348
8349	#[derive(Clone, Debug, Deserialize, Serialize)]
8350	pub struct GetrouteRoute {
8351	    // Path `GetRoute.route[].style`
8352	    pub style: GetrouteRouteStyle,
8353	    pub amount_msat: Amount,
8354	    pub channel: ShortChannelId,
8355	    pub delay: u32,
8356	    pub direction: u32,
8357	    pub id: PublicKey,
8358	}
8359
8360	#[derive(Clone, Debug, Deserialize, Serialize)]
8361	pub struct GetrouteResponse {
8362	    pub route: Vec<GetrouteRoute>,
8363	}
8364
8365	impl TryFrom<Response> for GetrouteResponse {
8366	    type Error = super::TryFromResponseError;
8367
8368	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8369	        match response {
8370	            Response::GetRoute(response) => Ok(response),
8371	            _ => Err(TryFromResponseError)
8372	        }
8373	    }
8374	}
8375
8376	#[derive(Clone, Debug, Deserialize, Serialize)]
8377	pub struct ListaddressesAddresses {
8378	    #[serde(skip_serializing_if = "Option::is_none")]
8379	    pub bech32: Option<String>,
8380	    #[serde(skip_serializing_if = "Option::is_none")]
8381	    pub p2tr: Option<String>,
8382	    pub keyidx: u64,
8383	}
8384
8385	#[derive(Clone, Debug, Deserialize, Serialize)]
8386	pub struct ListaddressesResponse {
8387	    pub addresses: Vec<ListaddressesAddresses>,
8388	}
8389
8390	impl TryFrom<Response> for ListaddressesResponse {
8391	    type Error = super::TryFromResponseError;
8392
8393	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8394	        match response {
8395	            Response::ListAddresses(response) => Ok(response),
8396	            _ => Err(TryFromResponseError)
8397	        }
8398	    }
8399	}
8400
8401	/// ['Either a legacy onion format or a modern tlv format.']
8402	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
8403	#[allow(non_camel_case_types)]
8404	pub enum ListforwardsForwardsStyle {
8405	    #[serde(rename = "legacy")]
8406	    LEGACY = 0,
8407	    #[serde(rename = "tlv")]
8408	    TLV = 1,
8409	}
8410
8411	impl TryFrom<i32> for ListforwardsForwardsStyle {
8412	    type Error = anyhow::Error;
8413	    fn try_from(c: i32) -> Result<ListforwardsForwardsStyle, anyhow::Error> {
8414	        match c {
8415	    0 => Ok(ListforwardsForwardsStyle::LEGACY),
8416	    1 => Ok(ListforwardsForwardsStyle::TLV),
8417	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListforwardsForwardsStyle", o)),
8418	        }
8419	    }
8420	}
8421
8422	impl ToString for ListforwardsForwardsStyle {
8423	    fn to_string(&self) -> String {
8424	        match self {
8425	            ListforwardsForwardsStyle::LEGACY => "LEGACY",
8426	            ListforwardsForwardsStyle::TLV => "TLV",
8427	        }.to_string()
8428	    }
8429	}
8430
8431	/// ['Still ongoing, completed, failed locally, or failed after forwarding.']
8432	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
8433	#[allow(non_camel_case_types)]
8434	pub enum ListforwardsForwardsStatus {
8435	    #[serde(rename = "offered")]
8436	    OFFERED = 0,
8437	    #[serde(rename = "settled")]
8438	    SETTLED = 1,
8439	    #[serde(rename = "local_failed")]
8440	    LOCAL_FAILED = 2,
8441	    #[serde(rename = "failed")]
8442	    FAILED = 3,
8443	}
8444
8445	impl TryFrom<i32> for ListforwardsForwardsStatus {
8446	    type Error = anyhow::Error;
8447	    fn try_from(c: i32) -> Result<ListforwardsForwardsStatus, anyhow::Error> {
8448	        match c {
8449	    0 => Ok(ListforwardsForwardsStatus::OFFERED),
8450	    1 => Ok(ListforwardsForwardsStatus::SETTLED),
8451	    2 => Ok(ListforwardsForwardsStatus::LOCAL_FAILED),
8452	    3 => Ok(ListforwardsForwardsStatus::FAILED),
8453	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListforwardsForwardsStatus", o)),
8454	        }
8455	    }
8456	}
8457
8458	impl ToString for ListforwardsForwardsStatus {
8459	    fn to_string(&self) -> String {
8460	        match self {
8461	            ListforwardsForwardsStatus::OFFERED => "OFFERED",
8462	            ListforwardsForwardsStatus::SETTLED => "SETTLED",
8463	            ListforwardsForwardsStatus::LOCAL_FAILED => "LOCAL_FAILED",
8464	            ListforwardsForwardsStatus::FAILED => "FAILED",
8465	        }.to_string()
8466	    }
8467	}
8468
8469	#[derive(Clone, Debug, Deserialize, Serialize)]
8470	pub struct ListforwardsForwards {
8471	    #[serde(skip_serializing_if = "Option::is_none")]
8472	    pub created_index: Option<u64>,
8473	    #[serde(skip_serializing_if = "Option::is_none")]
8474	    pub failcode: Option<u32>,
8475	    #[serde(skip_serializing_if = "Option::is_none")]
8476	    pub failreason: Option<String>,
8477	    #[serde(skip_serializing_if = "Option::is_none")]
8478	    pub fee_msat: Option<Amount>,
8479	    #[serde(skip_serializing_if = "Option::is_none")]
8480	    pub in_htlc_id: Option<u64>,
8481	    #[serde(skip_serializing_if = "Option::is_none")]
8482	    pub out_channel: Option<ShortChannelId>,
8483	    #[serde(skip_serializing_if = "Option::is_none")]
8484	    pub out_htlc_id: Option<u64>,
8485	    #[serde(skip_serializing_if = "Option::is_none")]
8486	    pub out_msat: Option<Amount>,
8487	    #[serde(skip_serializing_if = "Option::is_none")]
8488	    pub resolved_time: Option<f64>,
8489	    #[serde(skip_serializing_if = "Option::is_none")]
8490	    pub style: Option<ListforwardsForwardsStyle>,
8491	    #[serde(skip_serializing_if = "Option::is_none")]
8492	    pub updated_index: Option<u64>,
8493	    // Path `ListForwards.forwards[].status`
8494	    pub status: ListforwardsForwardsStatus,
8495	    pub in_channel: ShortChannelId,
8496	    pub in_msat: Amount,
8497	    pub received_time: f64,
8498	}
8499
8500	#[derive(Clone, Debug, Deserialize, Serialize)]
8501	pub struct ListforwardsResponse {
8502	    pub forwards: Vec<ListforwardsForwards>,
8503	}
8504
8505	impl TryFrom<Response> for ListforwardsResponse {
8506	    type Error = super::TryFromResponseError;
8507
8508	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8509	        match response {
8510	            Response::ListForwards(response) => Ok(response),
8511	            _ => Err(TryFromResponseError)
8512	        }
8513	    }
8514	}
8515
8516	#[derive(Clone, Debug, Deserialize, Serialize)]
8517	pub struct ListoffersOffers {
8518	    #[serde(skip_serializing_if = "Option::is_none")]
8519	    pub label: Option<String>,
8520	    pub active: bool,
8521	    pub bolt12: String,
8522	    pub offer_id: Sha256,
8523	    pub single_use: bool,
8524	    pub used: bool,
8525	}
8526
8527	#[derive(Clone, Debug, Deserialize, Serialize)]
8528	pub struct ListoffersResponse {
8529	    pub offers: Vec<ListoffersOffers>,
8530	}
8531
8532	impl TryFrom<Response> for ListoffersResponse {
8533	    type Error = super::TryFromResponseError;
8534
8535	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8536	        match response {
8537	            Response::ListOffers(response) => Ok(response),
8538	            _ => Err(TryFromResponseError)
8539	        }
8540	    }
8541	}
8542
8543	/// ['Status of the payment.']
8544	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
8545	#[allow(non_camel_case_types)]
8546	pub enum ListpaysPaysStatus {
8547	    #[serde(rename = "pending")]
8548	    PENDING = 0,
8549	    #[serde(rename = "failed")]
8550	    FAILED = 1,
8551	    #[serde(rename = "complete")]
8552	    COMPLETE = 2,
8553	}
8554
8555	impl TryFrom<i32> for ListpaysPaysStatus {
8556	    type Error = anyhow::Error;
8557	    fn try_from(c: i32) -> Result<ListpaysPaysStatus, anyhow::Error> {
8558	        match c {
8559	    0 => Ok(ListpaysPaysStatus::PENDING),
8560	    1 => Ok(ListpaysPaysStatus::FAILED),
8561	    2 => Ok(ListpaysPaysStatus::COMPLETE),
8562	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListpaysPaysStatus", o)),
8563	        }
8564	    }
8565	}
8566
8567	impl ToString for ListpaysPaysStatus {
8568	    fn to_string(&self) -> String {
8569	        match self {
8570	            ListpaysPaysStatus::PENDING => "PENDING",
8571	            ListpaysPaysStatus::FAILED => "FAILED",
8572	            ListpaysPaysStatus::COMPLETE => "COMPLETE",
8573	        }.to_string()
8574	    }
8575	}
8576
8577	#[derive(Clone, Debug, Deserialize, Serialize)]
8578	pub struct ListpaysPays {
8579	    #[serde(skip_serializing_if = "Option::is_none")]
8580	    pub amount_msat: Option<Amount>,
8581	    #[serde(skip_serializing_if = "Option::is_none")]
8582	    pub amount_sent_msat: Option<Amount>,
8583	    #[serde(skip_serializing_if = "Option::is_none")]
8584	    pub bolt11: Option<String>,
8585	    #[serde(skip_serializing_if = "Option::is_none")]
8586	    pub bolt12: Option<String>,
8587	    #[serde(skip_serializing_if = "Option::is_none")]
8588	    pub completed_at: Option<u64>,
8589	    #[serde(skip_serializing_if = "Option::is_none")]
8590	    pub created_index: Option<u64>,
8591	    #[serde(skip_serializing_if = "Option::is_none")]
8592	    pub description: Option<String>,
8593	    #[serde(skip_serializing_if = "Option::is_none")]
8594	    pub destination: Option<PublicKey>,
8595	    #[serde(skip_serializing_if = "Option::is_none")]
8596	    pub erroronion: Option<String>,
8597	    #[serde(skip_serializing_if = "Option::is_none")]
8598	    pub label: Option<String>,
8599	    #[serde(skip_serializing_if = "Option::is_none")]
8600	    pub number_of_parts: Option<u64>,
8601	    #[serde(skip_serializing_if = "Option::is_none")]
8602	    pub preimage: Option<Secret>,
8603	    #[serde(skip_serializing_if = "Option::is_none")]
8604	    pub updated_index: Option<u64>,
8605	    // Path `ListPays.pays[].status`
8606	    pub status: ListpaysPaysStatus,
8607	    pub created_at: u64,
8608	    pub payment_hash: Sha256,
8609	}
8610
8611	#[derive(Clone, Debug, Deserialize, Serialize)]
8612	pub struct ListpaysResponse {
8613	    pub pays: Vec<ListpaysPays>,
8614	}
8615
8616	impl TryFrom<Response> for ListpaysResponse {
8617	    type Error = super::TryFromResponseError;
8618
8619	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8620	        match response {
8621	            Response::ListPays(response) => Ok(response),
8622	            _ => Err(TryFromResponseError)
8623	        }
8624	    }
8625	}
8626
8627	/// ['Out if we offered this to the peer, in if they offered it.']
8628	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
8629	#[allow(non_camel_case_types)]
8630	pub enum ListhtlcsHtlcsDirection {
8631	    #[serde(rename = "out")]
8632	    OUT = 0,
8633	    #[serde(rename = "in")]
8634	    IN = 1,
8635	}
8636
8637	impl TryFrom<i32> for ListhtlcsHtlcsDirection {
8638	    type Error = anyhow::Error;
8639	    fn try_from(c: i32) -> Result<ListhtlcsHtlcsDirection, anyhow::Error> {
8640	        match c {
8641	    0 => Ok(ListhtlcsHtlcsDirection::OUT),
8642	    1 => Ok(ListhtlcsHtlcsDirection::IN),
8643	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListhtlcsHtlcsDirection", o)),
8644	        }
8645	    }
8646	}
8647
8648	impl ToString for ListhtlcsHtlcsDirection {
8649	    fn to_string(&self) -> String {
8650	        match self {
8651	            ListhtlcsHtlcsDirection::OUT => "OUT",
8652	            ListhtlcsHtlcsDirection::IN => "IN",
8653	        }.to_string()
8654	    }
8655	}
8656
8657	#[derive(Clone, Debug, Deserialize, Serialize)]
8658	pub struct ListhtlcsHtlcs {
8659	    // Path `ListHtlcs.htlcs[].direction`
8660	    pub direction: ListhtlcsHtlcsDirection,
8661	    // Path `ListHtlcs.htlcs[].state`
8662	    pub state: HtlcState,
8663	    pub amount_msat: Amount,
8664	    pub expiry: u32,
8665	    pub id: u64,
8666	    pub payment_hash: Sha256,
8667	    pub short_channel_id: ShortChannelId,
8668	}
8669
8670	#[derive(Clone, Debug, Deserialize, Serialize)]
8671	pub struct ListhtlcsResponse {
8672	    pub htlcs: Vec<ListhtlcsHtlcs>,
8673	}
8674
8675	impl TryFrom<Response> for ListhtlcsResponse {
8676	    type Error = super::TryFromResponseError;
8677
8678	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8679	        match response {
8680	            Response::ListHtlcs(response) => Ok(response),
8681	            _ => Err(TryFromResponseError)
8682	        }
8683	    }
8684	}
8685
8686	/// ['What stage we failed at.']
8687	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
8688	#[allow(non_camel_case_types)]
8689	pub enum MultifundchannelFailedMethod {
8690	    #[serde(rename = "connect")]
8691	    CONNECT = 0,
8692	    #[serde(rename = "openchannel_init")]
8693	    OPENCHANNEL_INIT = 1,
8694	    #[serde(rename = "fundchannel_start")]
8695	    FUNDCHANNEL_START = 2,
8696	    #[serde(rename = "fundchannel_complete")]
8697	    FUNDCHANNEL_COMPLETE = 3,
8698	}
8699
8700	impl TryFrom<i32> for MultifundchannelFailedMethod {
8701	    type Error = anyhow::Error;
8702	    fn try_from(c: i32) -> Result<MultifundchannelFailedMethod, anyhow::Error> {
8703	        match c {
8704	    0 => Ok(MultifundchannelFailedMethod::CONNECT),
8705	    1 => Ok(MultifundchannelFailedMethod::OPENCHANNEL_INIT),
8706	    2 => Ok(MultifundchannelFailedMethod::FUNDCHANNEL_START),
8707	    3 => Ok(MultifundchannelFailedMethod::FUNDCHANNEL_COMPLETE),
8708	            o => Err(anyhow::anyhow!("Unknown variant {} for enum MultifundchannelFailedMethod", o)),
8709	        }
8710	    }
8711	}
8712
8713	impl ToString for MultifundchannelFailedMethod {
8714	    fn to_string(&self) -> String {
8715	        match self {
8716	            MultifundchannelFailedMethod::CONNECT => "CONNECT",
8717	            MultifundchannelFailedMethod::OPENCHANNEL_INIT => "OPENCHANNEL_INIT",
8718	            MultifundchannelFailedMethod::FUNDCHANNEL_START => "FUNDCHANNEL_START",
8719	            MultifundchannelFailedMethod::FUNDCHANNEL_COMPLETE => "FUNDCHANNEL_COMPLETE",
8720	        }.to_string()
8721	    }
8722	}
8723
8724	#[derive(Clone, Debug, Deserialize, Serialize)]
8725	pub struct MultifundchannelFailedError {
8726	    pub code: i64,
8727	    pub message: String,
8728	}
8729
8730	#[derive(Clone, Debug, Deserialize, Serialize)]
8731	pub struct MultifundchannelFailed {
8732	    // Path `MultiFundChannel.failed[].method`
8733	    pub method: MultifundchannelFailedMethod,
8734	    pub error: MultifundchannelFailedError,
8735	    pub id: PublicKey,
8736	}
8737
8738	#[derive(Clone, Debug, Deserialize, Serialize)]
8739	pub struct MultifundchannelChannelIdsChannelType {
8740	    pub bits: Vec<u32>,
8741	    pub names: Vec<ChannelTypeName>,
8742	}
8743
8744	#[derive(Clone, Debug, Deserialize, Serialize)]
8745	pub struct MultifundchannelChannelIds {
8746	    #[serde(skip_serializing_if = "Option::is_none")]
8747	    pub channel_type: Option<MultifundchannelChannelIdsChannelType>,
8748	    #[serde(skip_serializing_if = "Option::is_none")]
8749	    pub close_to: Option<String>,
8750	    pub channel_id: Sha256,
8751	    pub id: PublicKey,
8752	    pub outnum: u32,
8753	}
8754
8755	#[derive(Clone, Debug, Deserialize, Serialize)]
8756	pub struct MultifundchannelResponse {
8757	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
8758	    pub failed: Option<Vec<MultifundchannelFailed>>,
8759	    pub channel_ids: Vec<MultifundchannelChannelIds>,
8760	    pub tx: String,
8761	    pub txid: String,
8762	}
8763
8764	impl TryFrom<Response> for MultifundchannelResponse {
8765	    type Error = super::TryFromResponseError;
8766
8767	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8768	        match response {
8769	            Response::MultiFundChannel(response) => Ok(response),
8770	            _ => Err(TryFromResponseError)
8771	        }
8772	    }
8773	}
8774
8775	#[derive(Clone, Debug, Deserialize, Serialize)]
8776	pub struct MultiwithdrawResponse {
8777	    pub tx: String,
8778	    pub txid: String,
8779	}
8780
8781	impl TryFrom<Response> for MultiwithdrawResponse {
8782	    type Error = super::TryFromResponseError;
8783
8784	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8785	        match response {
8786	            Response::MultiWithdraw(response) => Ok(response),
8787	            _ => Err(TryFromResponseError)
8788	        }
8789	    }
8790	}
8791
8792	#[derive(Clone, Debug, Deserialize, Serialize)]
8793	pub struct OfferResponse {
8794	    #[serde(skip_serializing_if = "Option::is_none")]
8795	    pub label: Option<String>,
8796	    pub active: bool,
8797	    pub bolt12: String,
8798	    pub created: bool,
8799	    pub offer_id: Sha256,
8800	    pub single_use: bool,
8801	    pub used: bool,
8802	}
8803
8804	impl TryFrom<Response> for OfferResponse {
8805	    type Error = super::TryFromResponseError;
8806
8807	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8808	        match response {
8809	            Response::Offer(response) => Ok(response),
8810	            _ => Err(TryFromResponseError)
8811	        }
8812	    }
8813	}
8814
8815	#[derive(Clone, Debug, Deserialize, Serialize)]
8816	pub struct OpenchannelAbortResponse {
8817	    pub channel_canceled: bool,
8818	    pub channel_id: Sha256,
8819	    pub reason: String,
8820	}
8821
8822	impl TryFrom<Response> for OpenchannelAbortResponse {
8823	    type Error = super::TryFromResponseError;
8824
8825	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8826	        match response {
8827	            Response::OpenChannelAbort(response) => Ok(response),
8828	            _ => Err(TryFromResponseError)
8829	        }
8830	    }
8831	}
8832
8833	#[derive(Clone, Debug, Deserialize, Serialize)]
8834	pub struct OpenchannelBumpChannelType {
8835	    pub bits: Vec<u32>,
8836	    pub names: Vec<ChannelTypeName>,
8837	}
8838
8839	#[derive(Clone, Debug, Deserialize, Serialize)]
8840	pub struct OpenchannelBumpResponse {
8841	    #[serde(skip_serializing_if = "Option::is_none")]
8842	    pub channel_type: Option<OpenchannelBumpChannelType>,
8843	    #[serde(skip_serializing_if = "Option::is_none")]
8844	    pub requires_confirmed_inputs: Option<bool>,
8845	    pub channel_id: Sha256,
8846	    pub commitments_secured: bool,
8847	    pub funding_serial: u64,
8848	    pub psbt: String,
8849	}
8850
8851	impl TryFrom<Response> for OpenchannelBumpResponse {
8852	    type Error = super::TryFromResponseError;
8853
8854	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8855	        match response {
8856	            Response::OpenChannelBump(response) => Ok(response),
8857	            _ => Err(TryFromResponseError)
8858	        }
8859	    }
8860	}
8861
8862	#[derive(Clone, Debug, Deserialize, Serialize)]
8863	pub struct OpenchannelInitChannelType {
8864	    pub bits: Vec<u32>,
8865	    pub names: Vec<ChannelTypeName>,
8866	}
8867
8868	#[derive(Clone, Debug, Deserialize, Serialize)]
8869	pub struct OpenchannelInitResponse {
8870	    #[serde(skip_serializing_if = "Option::is_none")]
8871	    pub channel_type: Option<OpenchannelInitChannelType>,
8872	    #[serde(skip_serializing_if = "Option::is_none")]
8873	    pub requires_confirmed_inputs: Option<bool>,
8874	    pub channel_id: Sha256,
8875	    pub commitments_secured: bool,
8876	    pub funding_serial: u64,
8877	    pub psbt: String,
8878	}
8879
8880	impl TryFrom<Response> for OpenchannelInitResponse {
8881	    type Error = super::TryFromResponseError;
8882
8883	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8884	        match response {
8885	            Response::OpenChannelInit(response) => Ok(response),
8886	            _ => Err(TryFromResponseError)
8887	        }
8888	    }
8889	}
8890
8891	#[derive(Clone, Debug, Deserialize, Serialize)]
8892	pub struct OpenchannelSignedResponse {
8893	    pub channel_id: Sha256,
8894	    pub tx: String,
8895	    pub txid: String,
8896	}
8897
8898	impl TryFrom<Response> for OpenchannelSignedResponse {
8899	    type Error = super::TryFromResponseError;
8900
8901	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8902	        match response {
8903	            Response::OpenChannelSigned(response) => Ok(response),
8904	            _ => Err(TryFromResponseError)
8905	        }
8906	    }
8907	}
8908
8909	#[derive(Clone, Debug, Deserialize, Serialize)]
8910	pub struct OpenchannelUpdateChannelType {
8911	    pub bits: Vec<u32>,
8912	    pub names: Vec<ChannelTypeName>,
8913	}
8914
8915	#[derive(Clone, Debug, Deserialize, Serialize)]
8916	pub struct OpenchannelUpdateResponse {
8917	    #[serde(skip_serializing_if = "Option::is_none")]
8918	    pub channel_type: Option<OpenchannelUpdateChannelType>,
8919	    #[serde(skip_serializing_if = "Option::is_none")]
8920	    pub close_to: Option<String>,
8921	    #[serde(skip_serializing_if = "Option::is_none")]
8922	    pub requires_confirmed_inputs: Option<bool>,
8923	    pub channel_id: Sha256,
8924	    pub commitments_secured: bool,
8925	    pub funding_outnum: u32,
8926	    pub psbt: String,
8927	}
8928
8929	impl TryFrom<Response> for OpenchannelUpdateResponse {
8930	    type Error = super::TryFromResponseError;
8931
8932	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8933	        match response {
8934	            Response::OpenChannelUpdate(response) => Ok(response),
8935	            _ => Err(TryFromResponseError)
8936	        }
8937	    }
8938	}
8939
8940	#[derive(Clone, Debug, Deserialize, Serialize)]
8941	pub struct PingResponse {
8942	    pub totlen: u16,
8943	}
8944
8945	impl TryFrom<Response> for PingResponse {
8946	    type Error = super::TryFromResponseError;
8947
8948	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8949	        match response {
8950	            Response::Ping(response) => Ok(response),
8951	            _ => Err(TryFromResponseError)
8952	        }
8953	    }
8954	}
8955
8956	#[derive(Clone, Debug, Deserialize, Serialize)]
8957	pub struct PluginPlugins {
8958	    pub active: bool,
8959	    pub dynamic: bool,
8960	    pub name: String,
8961	}
8962
8963	#[derive(Clone, Debug, Deserialize, Serialize)]
8964	pub struct PluginResponse {
8965	    #[serde(skip_serializing_if = "Option::is_none")]
8966	    pub result: Option<String>,
8967	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
8968	    pub plugins: Option<Vec<PluginPlugins>>,
8969	    // Path `Plugin.command`
8970	    pub command: PluginSubcommand,
8971	}
8972
8973	impl TryFrom<Response> for PluginResponse {
8974	    type Error = super::TryFromResponseError;
8975
8976	    fn try_from(response: Response) -> Result<Self, Self::Error> {
8977	        match response {
8978	            Response::Plugin(response) => Ok(response),
8979	            _ => Err(TryFromResponseError)
8980	        }
8981	    }
8982	}
8983
8984	/// ['Status of payment.']
8985	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
8986	#[allow(non_camel_case_types)]
8987	pub enum RenepaystatusPaystatusStatus {
8988	    #[serde(rename = "complete")]
8989	    COMPLETE = 0,
8990	    #[serde(rename = "pending")]
8991	    PENDING = 1,
8992	    #[serde(rename = "failed")]
8993	    FAILED = 2,
8994	}
8995
8996	impl TryFrom<i32> for RenepaystatusPaystatusStatus {
8997	    type Error = anyhow::Error;
8998	    fn try_from(c: i32) -> Result<RenepaystatusPaystatusStatus, anyhow::Error> {
8999	        match c {
9000	    0 => Ok(RenepaystatusPaystatusStatus::COMPLETE),
9001	    1 => Ok(RenepaystatusPaystatusStatus::PENDING),
9002	    2 => Ok(RenepaystatusPaystatusStatus::FAILED),
9003	            o => Err(anyhow::anyhow!("Unknown variant {} for enum RenepaystatusPaystatusStatus", o)),
9004	        }
9005	    }
9006	}
9007
9008	impl ToString for RenepaystatusPaystatusStatus {
9009	    fn to_string(&self) -> String {
9010	        match self {
9011	            RenepaystatusPaystatusStatus::COMPLETE => "COMPLETE",
9012	            RenepaystatusPaystatusStatus::PENDING => "PENDING",
9013	            RenepaystatusPaystatusStatus::FAILED => "FAILED",
9014	        }.to_string()
9015	    }
9016	}
9017
9018	#[derive(Clone, Debug, Deserialize, Serialize)]
9019	pub struct RenepaystatusPaystatus {
9020	    #[serde(skip_serializing_if = "Option::is_none")]
9021	    pub amount_sent_msat: Option<Amount>,
9022	    #[serde(skip_serializing_if = "Option::is_none")]
9023	    pub destination: Option<PublicKey>,
9024	    #[serde(skip_serializing_if = "Option::is_none")]
9025	    pub parts: Option<u32>,
9026	    #[serde(skip_serializing_if = "Option::is_none")]
9027	    pub payment_preimage: Option<Secret>,
9028	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
9029	    pub notes: Option<Vec<String>>,
9030	    // Path `RenePayStatus.paystatus[].status`
9031	    pub status: RenepaystatusPaystatusStatus,
9032	    pub amount_msat: Amount,
9033	    pub bolt11: String,
9034	    pub created_at: f64,
9035	    pub groupid: u32,
9036	    pub payment_hash: Sha256,
9037	}
9038
9039	#[derive(Clone, Debug, Deserialize, Serialize)]
9040	pub struct RenepaystatusResponse {
9041	    pub paystatus: Vec<RenepaystatusPaystatus>,
9042	}
9043
9044	impl TryFrom<Response> for RenepaystatusResponse {
9045	    type Error = super::TryFromResponseError;
9046
9047	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9048	        match response {
9049	            Response::RenePayStatus(response) => Ok(response),
9050	            _ => Err(TryFromResponseError)
9051	        }
9052	    }
9053	}
9054
9055	/// ['Status of payment.']
9056	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
9057	#[allow(non_camel_case_types)]
9058	pub enum RenepayStatus {
9059	    #[serde(rename = "complete")]
9060	    COMPLETE = 0,
9061	    #[serde(rename = "pending")]
9062	    PENDING = 1,
9063	    #[serde(rename = "failed")]
9064	    FAILED = 2,
9065	}
9066
9067	impl TryFrom<i32> for RenepayStatus {
9068	    type Error = anyhow::Error;
9069	    fn try_from(c: i32) -> Result<RenepayStatus, anyhow::Error> {
9070	        match c {
9071	    0 => Ok(RenepayStatus::COMPLETE),
9072	    1 => Ok(RenepayStatus::PENDING),
9073	    2 => Ok(RenepayStatus::FAILED),
9074	            o => Err(anyhow::anyhow!("Unknown variant {} for enum RenepayStatus", o)),
9075	        }
9076	    }
9077	}
9078
9079	impl ToString for RenepayStatus {
9080	    fn to_string(&self) -> String {
9081	        match self {
9082	            RenepayStatus::COMPLETE => "COMPLETE",
9083	            RenepayStatus::PENDING => "PENDING",
9084	            RenepayStatus::FAILED => "FAILED",
9085	        }.to_string()
9086	    }
9087	}
9088
9089	#[derive(Clone, Debug, Deserialize, Serialize)]
9090	pub struct RenepayResponse {
9091	    #[serde(skip_serializing_if = "Option::is_none")]
9092	    pub bolt11: Option<String>,
9093	    #[serde(skip_serializing_if = "Option::is_none")]
9094	    pub bolt12: Option<String>,
9095	    #[serde(skip_serializing_if = "Option::is_none")]
9096	    pub destination: Option<PublicKey>,
9097	    #[serde(skip_serializing_if = "Option::is_none")]
9098	    pub groupid: Option<u64>,
9099	    // Path `RenePay.status`
9100	    pub status: RenepayStatus,
9101	    pub amount_msat: Amount,
9102	    pub amount_sent_msat: Amount,
9103	    pub created_at: f64,
9104	    pub parts: u32,
9105	    pub payment_hash: Sha256,
9106	    pub payment_preimage: Secret,
9107	}
9108
9109	impl TryFrom<Response> for RenepayResponse {
9110	    type Error = super::TryFromResponseError;
9111
9112	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9113	        match response {
9114	            Response::RenePay(response) => Ok(response),
9115	            _ => Err(TryFromResponseError)
9116	        }
9117	    }
9118	}
9119
9120	#[derive(Clone, Debug, Deserialize, Serialize)]
9121	pub struct ReserveinputsReservations {
9122	    pub reserved: bool,
9123	    pub reserved_to_block: u32,
9124	    pub txid: String,
9125	    pub vout: u32,
9126	    pub was_reserved: bool,
9127	}
9128
9129	#[derive(Clone, Debug, Deserialize, Serialize)]
9130	pub struct ReserveinputsResponse {
9131	    pub reservations: Vec<ReserveinputsReservations>,
9132	}
9133
9134	impl TryFrom<Response> for ReserveinputsResponse {
9135	    type Error = super::TryFromResponseError;
9136
9137	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9138	        match response {
9139	            Response::ReserveInputs(response) => Ok(response),
9140	            _ => Err(TryFromResponseError)
9141	        }
9142	    }
9143	}
9144
9145	#[derive(Clone, Debug, Deserialize, Serialize)]
9146	pub struct SendcustommsgResponse {
9147	    pub status: String,
9148	}
9149
9150	impl TryFrom<Response> for SendcustommsgResponse {
9151	    type Error = super::TryFromResponseError;
9152
9153	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9154	        match response {
9155	            Response::SendCustomMsg(response) => Ok(response),
9156	            _ => Err(TryFromResponseError)
9157	        }
9158	    }
9159	}
9160
9161	/// ["Whether it's paid, unpaid or unpayable."]
9162	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
9163	#[allow(non_camel_case_types)]
9164	pub enum SendinvoiceStatus {
9165	    #[serde(rename = "unpaid")]
9166	    UNPAID = 0,
9167	    #[serde(rename = "paid")]
9168	    PAID = 1,
9169	    #[serde(rename = "expired")]
9170	    EXPIRED = 2,
9171	}
9172
9173	impl TryFrom<i32> for SendinvoiceStatus {
9174	    type Error = anyhow::Error;
9175	    fn try_from(c: i32) -> Result<SendinvoiceStatus, anyhow::Error> {
9176	        match c {
9177	    0 => Ok(SendinvoiceStatus::UNPAID),
9178	    1 => Ok(SendinvoiceStatus::PAID),
9179	    2 => Ok(SendinvoiceStatus::EXPIRED),
9180	            o => Err(anyhow::anyhow!("Unknown variant {} for enum SendinvoiceStatus", o)),
9181	        }
9182	    }
9183	}
9184
9185	impl ToString for SendinvoiceStatus {
9186	    fn to_string(&self) -> String {
9187	        match self {
9188	            SendinvoiceStatus::UNPAID => "UNPAID",
9189	            SendinvoiceStatus::PAID => "PAID",
9190	            SendinvoiceStatus::EXPIRED => "EXPIRED",
9191	        }.to_string()
9192	    }
9193	}
9194
9195	#[derive(Clone, Debug, Deserialize, Serialize)]
9196	pub struct SendinvoiceResponse {
9197	    #[serde(skip_serializing_if = "Option::is_none")]
9198	    pub amount_msat: Option<Amount>,
9199	    #[serde(skip_serializing_if = "Option::is_none")]
9200	    pub amount_received_msat: Option<Amount>,
9201	    #[serde(skip_serializing_if = "Option::is_none")]
9202	    pub bolt12: Option<String>,
9203	    #[serde(skip_serializing_if = "Option::is_none")]
9204	    pub created_index: Option<u64>,
9205	    #[serde(skip_serializing_if = "Option::is_none")]
9206	    pub paid_at: Option<u64>,
9207	    #[serde(skip_serializing_if = "Option::is_none")]
9208	    pub pay_index: Option<u64>,
9209	    #[serde(skip_serializing_if = "Option::is_none")]
9210	    pub payment_preimage: Option<Secret>,
9211	    #[serde(skip_serializing_if = "Option::is_none")]
9212	    pub updated_index: Option<u64>,
9213	    // Path `SendInvoice.status`
9214	    pub status: SendinvoiceStatus,
9215	    pub description: String,
9216	    pub expires_at: u64,
9217	    pub label: String,
9218	    pub payment_hash: Sha256,
9219	}
9220
9221	impl TryFrom<Response> for SendinvoiceResponse {
9222	    type Error = super::TryFromResponseError;
9223
9224	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9225	        match response {
9226	            Response::SendInvoice(response) => Ok(response),
9227	            _ => Err(TryFromResponseError)
9228	        }
9229	    }
9230	}
9231
9232	#[derive(Clone, Debug, Deserialize, Serialize)]
9233	pub struct SetchannelChannels {
9234	    #[serde(skip_serializing_if = "Option::is_none")]
9235	    pub ignore_fee_limits: Option<bool>,
9236	    #[serde(skip_serializing_if = "Option::is_none")]
9237	    pub short_channel_id: Option<ShortChannelId>,
9238	    #[serde(skip_serializing_if = "Option::is_none")]
9239	    pub warning_htlcmax_too_high: Option<String>,
9240	    #[serde(skip_serializing_if = "Option::is_none")]
9241	    pub warning_htlcmin_too_low: Option<String>,
9242	    pub channel_id: Sha256,
9243	    pub fee_base_msat: Amount,
9244	    pub fee_proportional_millionths: u32,
9245	    pub maximum_htlc_out_msat: Amount,
9246	    pub minimum_htlc_out_msat: Amount,
9247	    pub peer_id: PublicKey,
9248	}
9249
9250	#[derive(Clone, Debug, Deserialize, Serialize)]
9251	pub struct SetchannelResponse {
9252	    pub channels: Vec<SetchannelChannels>,
9253	}
9254
9255	impl TryFrom<Response> for SetchannelResponse {
9256	    type Error = super::TryFromResponseError;
9257
9258	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9259	        match response {
9260	            Response::SetChannel(response) => Ok(response),
9261	            _ => Err(TryFromResponseError)
9262	        }
9263	    }
9264	}
9265
9266	#[derive(Clone, Debug, Deserialize, Serialize)]
9267	pub struct SetconfigConfig {
9268	    #[serde(skip_serializing_if = "Option::is_none")]
9269	    pub plugin: Option<String>,
9270	    #[serde(skip_serializing_if = "Option::is_none")]
9271	    pub set: Option<bool>,
9272	    #[serde(skip_serializing_if = "Option::is_none")]
9273	    pub value_bool: Option<bool>,
9274	    #[serde(skip_serializing_if = "Option::is_none")]
9275	    pub value_int: Option<i64>,
9276	    #[serde(skip_serializing_if = "Option::is_none")]
9277	    pub value_msat: Option<Amount>,
9278	    #[serde(skip_serializing_if = "Option::is_none")]
9279	    pub value_str: Option<String>,
9280	    pub config: String,
9281	    pub dynamic: bool,
9282	    pub source: String,
9283	}
9284
9285	#[derive(Clone, Debug, Deserialize, Serialize)]
9286	pub struct SetconfigResponse {
9287	    pub config: SetconfigConfig,
9288	}
9289
9290	impl TryFrom<Response> for SetconfigResponse {
9291	    type Error = super::TryFromResponseError;
9292
9293	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9294	        match response {
9295	            Response::SetConfig(response) => Ok(response),
9296	            _ => Err(TryFromResponseError)
9297	        }
9298	    }
9299	}
9300
9301	#[derive(Clone, Debug, Deserialize, Serialize)]
9302	pub struct SetpsbtversionResponse {
9303	    pub psbt: String,
9304	}
9305
9306	impl TryFrom<Response> for SetpsbtversionResponse {
9307	    type Error = super::TryFromResponseError;
9308
9309	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9310	        match response {
9311	            Response::SetPsbtVersion(response) => Ok(response),
9312	            _ => Err(TryFromResponseError)
9313	        }
9314	    }
9315	}
9316
9317	#[derive(Clone, Debug, Deserialize, Serialize)]
9318	pub struct SigninvoiceResponse {
9319	    pub bolt11: String,
9320	}
9321
9322	impl TryFrom<Response> for SigninvoiceResponse {
9323	    type Error = super::TryFromResponseError;
9324
9325	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9326	        match response {
9327	            Response::SignInvoice(response) => Ok(response),
9328	            _ => Err(TryFromResponseError)
9329	        }
9330	    }
9331	}
9332
9333	#[derive(Clone, Debug, Deserialize, Serialize)]
9334	pub struct SignmessageResponse {
9335	    pub recid: String,
9336	    pub signature: String,
9337	    pub zbase: String,
9338	}
9339
9340	impl TryFrom<Response> for SignmessageResponse {
9341	    type Error = super::TryFromResponseError;
9342
9343	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9344	        match response {
9345	            Response::SignMessage(response) => Ok(response),
9346	            _ => Err(TryFromResponseError)
9347	        }
9348	    }
9349	}
9350
9351	#[derive(Clone, Debug, Deserialize, Serialize)]
9352	pub struct SpliceInitResponse {
9353	    pub psbt: String,
9354	}
9355
9356	impl TryFrom<Response> for SpliceInitResponse {
9357	    type Error = super::TryFromResponseError;
9358
9359	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9360	        match response {
9361	            Response::SpliceInit(response) => Ok(response),
9362	            _ => Err(TryFromResponseError)
9363	        }
9364	    }
9365	}
9366
9367	#[derive(Clone, Debug, Deserialize, Serialize)]
9368	pub struct SpliceSignedResponse {
9369	    #[serde(skip_serializing_if = "Option::is_none")]
9370	    pub outnum: Option<u32>,
9371	    pub psbt: String,
9372	    pub tx: String,
9373	    pub txid: String,
9374	}
9375
9376	impl TryFrom<Response> for SpliceSignedResponse {
9377	    type Error = super::TryFromResponseError;
9378
9379	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9380	        match response {
9381	            Response::SpliceSigned(response) => Ok(response),
9382	            _ => Err(TryFromResponseError)
9383	        }
9384	    }
9385	}
9386
9387	#[derive(Clone, Debug, Deserialize, Serialize)]
9388	pub struct SpliceUpdateResponse {
9389	    #[serde(skip_serializing_if = "Option::is_none")]
9390	    pub signatures_secured: Option<bool>,
9391	    pub commitments_secured: bool,
9392	    pub psbt: String,
9393	}
9394
9395	impl TryFrom<Response> for SpliceUpdateResponse {
9396	    type Error = super::TryFromResponseError;
9397
9398	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9399	        match response {
9400	            Response::SpliceUpdate(response) => Ok(response),
9401	            _ => Err(TryFromResponseError)
9402	        }
9403	    }
9404	}
9405
9406	#[derive(Clone, Debug, Deserialize, Serialize)]
9407	pub struct DevspliceResponse {
9408	    #[serde(skip_serializing_if = "Option::is_none")]
9409	    pub psbt: Option<String>,
9410	    #[serde(skip_serializing_if = "Option::is_none")]
9411	    pub tx: Option<String>,
9412	    #[serde(skip_serializing_if = "Option::is_none")]
9413	    pub txid: Option<String>,
9414	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
9415	    pub dryrun: Option<Vec<String>>,
9416	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
9417	    pub log: Option<Vec<String>>,
9418	}
9419
9420	impl TryFrom<Response> for DevspliceResponse {
9421	    type Error = super::TryFromResponseError;
9422
9423	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9424	        match response {
9425	            Response::DevSplice(response) => Ok(response),
9426	            _ => Err(TryFromResponseError)
9427	        }
9428	    }
9429	}
9430
9431	#[derive(Clone, Debug, Deserialize, Serialize)]
9432	pub struct UnreserveinputsReservations {
9433	    #[serde(skip_serializing_if = "Option::is_none")]
9434	    pub reserved_to_block: Option<u32>,
9435	    pub reserved: bool,
9436	    pub txid: String,
9437	    pub vout: u32,
9438	    pub was_reserved: bool,
9439	}
9440
9441	#[derive(Clone, Debug, Deserialize, Serialize)]
9442	pub struct UnreserveinputsResponse {
9443	    pub reservations: Vec<UnreserveinputsReservations>,
9444	}
9445
9446	impl TryFrom<Response> for UnreserveinputsResponse {
9447	    type Error = super::TryFromResponseError;
9448
9449	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9450	        match response {
9451	            Response::UnreserveInputs(response) => Ok(response),
9452	            _ => Err(TryFromResponseError)
9453	        }
9454	    }
9455	}
9456
9457	#[derive(Clone, Debug, Deserialize, Serialize)]
9458	pub struct UpgradewalletResponse {
9459	    #[serde(skip_serializing_if = "Option::is_none")]
9460	    pub psbt: Option<String>,
9461	    #[serde(skip_serializing_if = "Option::is_none")]
9462	    pub tx: Option<String>,
9463	    #[serde(skip_serializing_if = "Option::is_none")]
9464	    pub txid: Option<String>,
9465	    #[serde(skip_serializing_if = "Option::is_none")]
9466	    pub upgraded_outs: Option<u64>,
9467	}
9468
9469	impl TryFrom<Response> for UpgradewalletResponse {
9470	    type Error = super::TryFromResponseError;
9471
9472	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9473	        match response {
9474	            Response::UpgradeWallet(response) => Ok(response),
9475	            _ => Err(TryFromResponseError)
9476	        }
9477	    }
9478	}
9479
9480	#[derive(Clone, Debug, Deserialize, Serialize)]
9481	pub struct WaitblockheightResponse {
9482	    pub blockheight: u32,
9483	}
9484
9485	impl TryFrom<Response> for WaitblockheightResponse {
9486	    type Error = super::TryFromResponseError;
9487
9488	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9489	        match response {
9490	            Response::WaitBlockHeight(response) => Ok(response),
9491	            _ => Err(TryFromResponseError)
9492	        }
9493	    }
9494	}
9495
9496	/// ['Status of the payment.', 'Still ongoing, completed, failed locally, or failed after forwarding.', "Whether it's paid, unpaid or unpayable."]
9497	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
9498	#[allow(non_camel_case_types)]
9499	pub enum WaitDetailsStatus {
9500	    #[serde(rename = "unpaid")]
9501	    UNPAID = 0,
9502	    #[serde(rename = "paid")]
9503	    PAID = 1,
9504	    #[serde(rename = "expired")]
9505	    EXPIRED = 2,
9506	    #[serde(rename = "pending")]
9507	    PENDING = 3,
9508	    #[serde(rename = "failed")]
9509	    FAILED = 4,
9510	    #[serde(rename = "complete")]
9511	    COMPLETE = 5,
9512	    #[serde(rename = "offered")]
9513	    OFFERED = 6,
9514	    #[serde(rename = "settled")]
9515	    SETTLED = 7,
9516	    #[serde(rename = "local_failed")]
9517	    LOCAL_FAILED = 8,
9518	}
9519
9520	impl TryFrom<i32> for WaitDetailsStatus {
9521	    type Error = anyhow::Error;
9522	    fn try_from(c: i32) -> Result<WaitDetailsStatus, anyhow::Error> {
9523	        match c {
9524	    0 => Ok(WaitDetailsStatus::UNPAID),
9525	    1 => Ok(WaitDetailsStatus::PAID),
9526	    2 => Ok(WaitDetailsStatus::EXPIRED),
9527	    3 => Ok(WaitDetailsStatus::PENDING),
9528	    4 => Ok(WaitDetailsStatus::FAILED),
9529	    5 => Ok(WaitDetailsStatus::COMPLETE),
9530	    6 => Ok(WaitDetailsStatus::OFFERED),
9531	    7 => Ok(WaitDetailsStatus::SETTLED),
9532	    8 => Ok(WaitDetailsStatus::LOCAL_FAILED),
9533	            o => Err(anyhow::anyhow!("Unknown variant {} for enum WaitDetailsStatus", o)),
9534	        }
9535	    }
9536	}
9537
9538	impl ToString for WaitDetailsStatus {
9539	    fn to_string(&self) -> String {
9540	        match self {
9541	            WaitDetailsStatus::COMPLETE => "COMPLETE",
9542	            WaitDetailsStatus::EXPIRED => "EXPIRED",
9543	            WaitDetailsStatus::FAILED => "FAILED",
9544	            WaitDetailsStatus::LOCAL_FAILED => "LOCAL_FAILED",
9545	            WaitDetailsStatus::OFFERED => "OFFERED",
9546	            WaitDetailsStatus::PAID => "PAID",
9547	            WaitDetailsStatus::PENDING => "PENDING",
9548	            WaitDetailsStatus::SETTLED => "SETTLED",
9549	            WaitDetailsStatus::UNPAID => "UNPAID",
9550	        }.to_string()
9551	    }
9552	}
9553
9554	#[derive(Clone, Debug, Deserialize, Serialize)]
9555	pub struct WaitDetails {
9556	    #[serde(skip_serializing_if = "Option::is_none")]
9557	    pub bolt11: Option<String>,
9558	    #[serde(skip_serializing_if = "Option::is_none")]
9559	    pub bolt12: Option<String>,
9560	    #[serde(skip_serializing_if = "Option::is_none")]
9561	    pub description: Option<String>,
9562	    #[serde(skip_serializing_if = "Option::is_none")]
9563	    pub groupid: Option<u64>,
9564	    #[serde(skip_serializing_if = "Option::is_none")]
9565	    pub in_channel: Option<ShortChannelId>,
9566	    #[serde(skip_serializing_if = "Option::is_none")]
9567	    pub in_htlc_id: Option<u64>,
9568	    #[serde(skip_serializing_if = "Option::is_none")]
9569	    pub in_msat: Option<Amount>,
9570	    #[serde(skip_serializing_if = "Option::is_none")]
9571	    pub label: Option<String>,
9572	    #[serde(skip_serializing_if = "Option::is_none")]
9573	    pub out_channel: Option<ShortChannelId>,
9574	    #[serde(skip_serializing_if = "Option::is_none")]
9575	    pub partid: Option<u64>,
9576	    #[serde(skip_serializing_if = "Option::is_none")]
9577	    pub payment_hash: Option<Sha256>,
9578	    #[serde(skip_serializing_if = "Option::is_none")]
9579	    pub status: Option<WaitDetailsStatus>,
9580	}
9581
9582	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
9583	#[allow(non_camel_case_types)]
9584	pub enum WaitSubsystem {
9585	    #[serde(rename = "invoices")]
9586	    INVOICES = 0,
9587	    #[serde(rename = "forwards")]
9588	    FORWARDS = 1,
9589	    #[serde(rename = "sendpays")]
9590	    SENDPAYS = 2,
9591	}
9592
9593	impl TryFrom<i32> for WaitSubsystem {
9594	    type Error = anyhow::Error;
9595	    fn try_from(c: i32) -> Result<WaitSubsystem, anyhow::Error> {
9596	        match c {
9597	    0 => Ok(WaitSubsystem::INVOICES),
9598	    1 => Ok(WaitSubsystem::FORWARDS),
9599	    2 => Ok(WaitSubsystem::SENDPAYS),
9600	            o => Err(anyhow::anyhow!("Unknown variant {} for enum WaitSubsystem", o)),
9601	        }
9602	    }
9603	}
9604
9605	impl ToString for WaitSubsystem {
9606	    fn to_string(&self) -> String {
9607	        match self {
9608	            WaitSubsystem::INVOICES => "INVOICES",
9609	            WaitSubsystem::FORWARDS => "FORWARDS",
9610	            WaitSubsystem::SENDPAYS => "SENDPAYS",
9611	        }.to_string()
9612	    }
9613	}
9614
9615	#[derive(Clone, Debug, Deserialize, Serialize)]
9616	pub struct WaitResponse {
9617	    #[serde(skip_serializing_if = "Option::is_none")]
9618	    pub created: Option<u64>,
9619	    #[serde(skip_serializing_if = "Option::is_none")]
9620	    pub deleted: Option<u64>,
9621	    #[serde(skip_serializing_if = "Option::is_none")]
9622	    pub details: Option<WaitDetails>,
9623	    #[serde(skip_serializing_if = "Option::is_none")]
9624	    pub updated: Option<u64>,
9625	    // Path `Wait.subsystem`
9626	    pub subsystem: WaitSubsystem,
9627	}
9628
9629	impl TryFrom<Response> for WaitResponse {
9630	    type Error = super::TryFromResponseError;
9631
9632	    fn try_from(response: Response) -> Result<Self, Self::Error> {
9633	        match response {
9634	            Response::Wait(response) => Ok(response),
9635	            _ => Err(TryFromResponseError)
9636	        }
9637	    }
9638	}
9639
9640	#[derive(Clone, Debug, Deserialize, Serialize)]
9641	pub struct ListconfigsImportantpluginsOptions {
9642	}
9643
9644	#[derive(Clone, Debug, Deserialize, Serialize)]
9645	pub struct ListconfigsImportantplugins {
9646	    #[serde(skip_serializing_if = "Option::is_none")]
9647	    pub options: Option<ListconfigsImportantpluginsOptions>,
9648	    pub name: String,
9649	    pub path: String,
9650	}
9651
9652	#[derive(Clone, Debug, Deserialize, Serialize)]
9653	pub struct ListconfigsPluginsOptions {
9654	}
9655
9656	#[derive(Clone, Debug, Deserialize, Serialize)]
9657	pub struct ListconfigsPlugins {
9658	    #[serde(skip_serializing_if = "Option::is_none")]
9659	    pub options: Option<ListconfigsPluginsOptions>,
9660	    pub name: String,
9661	    pub path: String,
9662	}
9663
9664	#[derive(Clone, Debug, Deserialize, Serialize)]
9665	pub struct ListconfigsConfigsExperimentaloffers {
9666	    pub set: bool,
9667	    pub source: String,
9668	}
9669
9670	#[derive(Clone, Debug, Deserialize, Serialize)]
9671	pub struct ListconfigsConfigsExperimentalonionmessages {
9672	    pub set: bool,
9673	    pub source: String,
9674	}
9675
9676	#[derive(Clone, Debug, Deserialize, Serialize)]
9677	pub struct ListconfigsConfigsMaxlocktimeblocks {
9678	    pub source: String,
9679	    pub value_int: u32,
9680	}
9681
9682	#[derive(Clone, Debug, Deserialize, Serialize)]
9683	pub struct ListconfigsConfigsAccepthtlctlvtypes {
9684	    pub source: String,
9685	    pub value_str: String,
9686	}
9687
9688	#[derive(Clone, Debug, Deserialize, Serialize)]
9689	pub struct ListconfigsConfigsAllowdeprecatedapis {
9690	    pub source: String,
9691	    pub value_bool: bool,
9692	}
9693
9694	#[derive(Clone, Debug, Deserialize, Serialize)]
9695	pub struct ListconfigsConfigsAlwaysuseproxy {
9696	    pub source: String,
9697	    pub value_bool: bool,
9698	}
9699
9700	#[derive(Clone, Debug, Deserialize, Serialize)]
9701	pub struct ListconfigsConfigsAnnounceaddr {
9702	    pub sources: Vec<String>,
9703	    pub values_str: Vec<String>,
9704	}
9705
9706	/// ['Field from config or cmdline, or default.']
9707	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
9708	#[allow(non_camel_case_types)]
9709	pub enum ListconfigsConfigsAnnounceaddrdiscoveredValueStr {
9710	    #[serde(rename = "true")]
9711	    TRUE = 0,
9712	    #[serde(rename = "false")]
9713	    FALSE = 1,
9714	    #[serde(rename = "auto")]
9715	    AUTO = 2,
9716	}
9717
9718	impl TryFrom<i32> for ListconfigsConfigsAnnounceaddrdiscoveredValueStr {
9719	    type Error = anyhow::Error;
9720	    fn try_from(c: i32) -> Result<ListconfigsConfigsAnnounceaddrdiscoveredValueStr, anyhow::Error> {
9721	        match c {
9722	    0 => Ok(ListconfigsConfigsAnnounceaddrdiscoveredValueStr::TRUE),
9723	    1 => Ok(ListconfigsConfigsAnnounceaddrdiscoveredValueStr::FALSE),
9724	    2 => Ok(ListconfigsConfigsAnnounceaddrdiscoveredValueStr::AUTO),
9725	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListconfigsConfigsAnnounceaddrdiscoveredValueStr", o)),
9726	        }
9727	    }
9728	}
9729
9730	impl ToString for ListconfigsConfigsAnnounceaddrdiscoveredValueStr {
9731	    fn to_string(&self) -> String {
9732	        match self {
9733	            ListconfigsConfigsAnnounceaddrdiscoveredValueStr::TRUE => "TRUE",
9734	            ListconfigsConfigsAnnounceaddrdiscoveredValueStr::FALSE => "FALSE",
9735	            ListconfigsConfigsAnnounceaddrdiscoveredValueStr::AUTO => "AUTO",
9736	        }.to_string()
9737	    }
9738	}
9739
9740	#[derive(Clone, Debug, Deserialize, Serialize)]
9741	pub struct ListconfigsConfigsAnnounceaddrdiscovered {
9742	    // Path `ListConfigs.configs.announce-addr-discovered.value_str`
9743	    pub value_str: ListconfigsConfigsAnnounceaddrdiscoveredValueStr,
9744	    pub source: String,
9745	}
9746
9747	#[derive(Clone, Debug, Deserialize, Serialize)]
9748	pub struct ListconfigsConfigsAnnounceaddrdiscoveredport {
9749	    pub source: String,
9750	    pub value_int: u32,
9751	}
9752
9753	#[derive(Clone, Debug, Deserialize, Serialize)]
9754	pub struct ListconfigsConfigsAnnounceaddrdns {
9755	    pub source: String,
9756	    pub value_bool: bool,
9757	}
9758
9759	#[derive(Clone, Debug, Deserialize, Serialize)]
9760	pub struct ListconfigsConfigsAutoconnectseekerpeers {
9761	    pub source: String,
9762	    pub value_int: u32,
9763	}
9764
9765	#[derive(Clone, Debug, Deserialize, Serialize)]
9766	pub struct ListconfigsConfigsBindaddr {
9767	    pub sources: Vec<String>,
9768	    pub values_str: Vec<String>,
9769	}
9770
9771	#[derive(Clone, Debug, Deserialize, Serialize)]
9772	pub struct ListconfigsConfigsClearplugins {
9773	    pub set: bool,
9774	    pub source: String,
9775	}
9776
9777	#[derive(Clone, Debug, Deserialize, Serialize)]
9778	pub struct ListconfigsConfigsCltvdelta {
9779	    pub source: String,
9780	    pub value_int: u32,
9781	}
9782
9783	#[derive(Clone, Debug, Deserialize, Serialize)]
9784	pub struct ListconfigsConfigsCltvfinal {
9785	    pub source: String,
9786	    pub value_int: u32,
9787	}
9788
9789	#[derive(Clone, Debug, Deserialize, Serialize)]
9790	pub struct ListconfigsConfigsCommitfee {
9791	    pub source: String,
9792	    pub value_int: u64,
9793	}
9794
9795	#[derive(Clone, Debug, Deserialize, Serialize)]
9796	pub struct ListconfigsConfigsCommitfeerateoffset {
9797	    pub source: String,
9798	    pub value_int: u32,
9799	}
9800
9801	#[derive(Clone, Debug, Deserialize, Serialize)]
9802	pub struct ListconfigsConfigsCommittime {
9803	    pub source: String,
9804	    pub value_int: u32,
9805	}
9806
9807	#[derive(Clone, Debug, Deserialize, Serialize)]
9808	pub struct ListconfigsConfigsDatabaseupgrade {
9809	    pub source: String,
9810	    pub value_bool: bool,
9811	}
9812
9813	#[derive(Clone, Debug, Deserialize, Serialize)]
9814	pub struct ListconfigsConfigsDisabledns {
9815	    pub set: bool,
9816	    pub source: String,
9817	}
9818
9819	#[derive(Clone, Debug, Deserialize, Serialize)]
9820	pub struct ListconfigsConfigsDisablempp {
9821	    #[serde(skip_serializing_if = "Option::is_none")]
9822	    pub plugin: Option<String>,
9823	    pub set: bool,
9824	    pub source: String,
9825	}
9826
9827	#[derive(Clone, Debug, Deserialize, Serialize)]
9828	pub struct ListconfigsConfigsDisableplugin {
9829	    pub sources: Vec<String>,
9830	    pub values_str: Vec<String>,
9831	}
9832
9833	#[derive(Clone, Debug, Deserialize, Serialize)]
9834	pub struct ListconfigsConfigsEncryptedhsm {
9835	    pub set: bool,
9836	    pub source: String,
9837	}
9838
9839	#[derive(Clone, Debug, Deserialize, Serialize)]
9840	pub struct ListconfigsConfigsExperimentalanchors {
9841	    pub set: bool,
9842	    pub source: String,
9843	}
9844
9845	#[derive(Clone, Debug, Deserialize, Serialize)]
9846	pub struct ListconfigsConfigsExperimentaldualfund {
9847	    pub set: bool,
9848	    pub source: String,
9849	}
9850
9851	#[derive(Clone, Debug, Deserialize, Serialize)]
9852	pub struct ListconfigsConfigsExperimentalpeerstorage {
9853	    pub set: bool,
9854	    pub source: String,
9855	}
9856
9857	#[derive(Clone, Debug, Deserialize, Serialize)]
9858	pub struct ListconfigsConfigsExperimentalshutdownwrongfunding {
9859	    pub set: bool,
9860	    pub source: String,
9861	}
9862
9863	#[derive(Clone, Debug, Deserialize, Serialize)]
9864	pub struct ListconfigsConfigsExperimentalsplicing {
9865	    pub set: bool,
9866	    pub source: String,
9867	}
9868
9869	#[derive(Clone, Debug, Deserialize, Serialize)]
9870	pub struct ListconfigsConfigsFeebase {
9871	    pub source: String,
9872	    pub value_int: u32,
9873	}
9874
9875	#[derive(Clone, Debug, Deserialize, Serialize)]
9876	pub struct ListconfigsConfigsFeepersatoshi {
9877	    pub source: String,
9878	    pub value_int: u32,
9879	}
9880
9881	#[derive(Clone, Debug, Deserialize, Serialize)]
9882	pub struct ListconfigsConfigsFetchinvoicenoconnect {
9883	    #[serde(skip_serializing_if = "Option::is_none")]
9884	    pub plugin: Option<String>,
9885	    pub set: bool,
9886	    pub source: String,
9887	}
9888
9889	#[derive(Clone, Debug, Deserialize, Serialize)]
9890	pub struct ListconfigsConfigsForcefeerates {
9891	    pub source: String,
9892	    pub value_str: String,
9893	}
9894
9895	#[derive(Clone, Debug, Deserialize, Serialize)]
9896	pub struct ListconfigsConfigsFundingconfirms {
9897	    pub source: String,
9898	    pub value_int: u32,
9899	}
9900
9901	#[derive(Clone, Debug, Deserialize, Serialize)]
9902	pub struct ListconfigsConfigsHtlcmaximummsat {
9903	    pub source: String,
9904	    pub value_msat: Amount,
9905	}
9906
9907	#[derive(Clone, Debug, Deserialize, Serialize)]
9908	pub struct ListconfigsConfigsHtlcminimummsat {
9909	    pub source: String,
9910	    pub value_msat: Amount,
9911	}
9912
9913	#[derive(Clone, Debug, Deserialize, Serialize)]
9914	pub struct ListconfigsConfigsIgnorefeelimits {
9915	    pub source: String,
9916	    pub value_bool: bool,
9917	}
9918
9919	#[derive(Clone, Debug, Deserialize, Serialize)]
9920	pub struct ListconfigsConfigsImportantplugin {
9921	    pub sources: Vec<String>,
9922	    pub values_str: Vec<String>,
9923	}
9924
9925	#[derive(Clone, Debug, Deserialize, Serialize)]
9926	pub struct ListconfigsConfigsLargechannels {
9927	    pub set: bool,
9928	    pub source: String,
9929	}
9930
9931	#[derive(Clone, Debug, Deserialize, Serialize)]
9932	pub struct ListconfigsConfigsLightningdir {
9933	    pub source: String,
9934	    pub value_str: String,
9935	}
9936
9937	#[derive(Clone, Debug, Deserialize, Serialize)]
9938	pub struct ListconfigsConfigsLogfile {
9939	    pub sources: Vec<String>,
9940	    pub values_str: Vec<String>,
9941	}
9942
9943	#[derive(Clone, Debug, Deserialize, Serialize)]
9944	pub struct ListconfigsConfigsLoglevel {
9945	    pub source: String,
9946	    pub value_str: String,
9947	}
9948
9949	#[derive(Clone, Debug, Deserialize, Serialize)]
9950	pub struct ListconfigsConfigsLogprefix {
9951	    pub source: String,
9952	    pub value_str: String,
9953	}
9954
9955	#[derive(Clone, Debug, Deserialize, Serialize)]
9956	pub struct ListconfigsConfigsLogtimestamps {
9957	    pub source: String,
9958	    pub value_bool: bool,
9959	}
9960
9961	#[derive(Clone, Debug, Deserialize, Serialize)]
9962	pub struct ListconfigsConfigsMaxconcurrenthtlcs {
9963	    pub source: String,
9964	    pub value_int: u32,
9965	}
9966
9967	#[derive(Clone, Debug, Deserialize, Serialize)]
9968	pub struct ListconfigsConfigsMaxdusthtlcexposuremsat {
9969	    pub source: String,
9970	    pub value_msat: Amount,
9971	}
9972
9973	#[derive(Clone, Debug, Deserialize, Serialize)]
9974	pub struct ListconfigsConfigsMincapacitysat {
9975	    #[serde(skip_serializing_if = "Option::is_none")]
9976	    pub dynamic: Option<bool>,
9977	    pub source: String,
9978	    pub value_int: u64,
9979	}
9980
9981	#[derive(Clone, Debug, Deserialize, Serialize)]
9982	pub struct ListconfigsConfigsPidfile {
9983	    pub source: String,
9984	    pub value_str: String,
9985	}
9986
9987	#[derive(Clone, Debug, Deserialize, Serialize)]
9988	pub struct ListconfigsConfigsPlugindir {
9989	    pub sources: Vec<String>,
9990	    pub values_str: Vec<String>,
9991	}
9992
9993	#[derive(Clone, Debug, Deserialize, Serialize)]
9994	pub struct ListconfigsConfigsRequireconfirmedinputs {
9995	    pub source: String,
9996	    pub value_bool: bool,
9997	}
9998
9999	#[derive(Clone, Debug, Deserialize, Serialize)]
10000	pub struct ListconfigsConfigsRpcfile {
10001	    pub source: String,
10002	    pub value_str: String,
10003	}
10004
10005	#[derive(Clone, Debug, Deserialize, Serialize)]
10006	pub struct ListconfigsConfigsRpcfilemode {
10007	    pub source: String,
10008	    pub value_str: String,
10009	}
10010
10011	#[derive(Clone, Debug, Deserialize, Serialize)]
10012	pub struct ListconfigsConfigsTorservicepassword {
10013	    pub source: String,
10014	    pub value_str: String,
10015	}
10016
10017	#[derive(Clone, Debug, Deserialize, Serialize)]
10018	pub struct ListconfigsConfigsWatchtimeblocks {
10019	    pub source: String,
10020	    pub value_int: u32,
10021	}
10022
10023	#[derive(Clone, Debug, Deserialize, Serialize)]
10024	pub struct ListconfigsConfigsAddr {
10025	    pub sources: Vec<String>,
10026	    pub values_str: Vec<String>,
10027	}
10028
10029	#[derive(Clone, Debug, Deserialize, Serialize)]
10030	pub struct ListconfigsConfigsAlias {
10031	    pub source: String,
10032	    pub value_str: String,
10033	}
10034
10035	#[derive(Clone, Debug, Deserialize, Serialize)]
10036	pub struct ListconfigsConfigsAutolisten {
10037	    pub source: String,
10038	    pub value_bool: bool,
10039	}
10040
10041	/// ['Source of configuration setting.']
10042	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
10043	#[allow(non_camel_case_types)]
10044	pub enum ListconfigsConfigsConfSource {
10045	    #[serde(rename = "cmdline")]
10046	    CMDLINE = 0,
10047	}
10048
10049	impl TryFrom<i32> for ListconfigsConfigsConfSource {
10050	    type Error = anyhow::Error;
10051	    fn try_from(c: i32) -> Result<ListconfigsConfigsConfSource, anyhow::Error> {
10052	        match c {
10053	    0 => Ok(ListconfigsConfigsConfSource::CMDLINE),
10054	            o => Err(anyhow::anyhow!("Unknown variant {} for enum ListconfigsConfigsConfSource", o)),
10055	        }
10056	    }
10057	}
10058
10059	impl ToString for ListconfigsConfigsConfSource {
10060	    fn to_string(&self) -> String {
10061	        match self {
10062	            ListconfigsConfigsConfSource::CMDLINE => "CMDLINE",
10063	        }.to_string()
10064	    }
10065	}
10066
10067	#[derive(Clone, Debug, Deserialize, Serialize)]
10068	pub struct ListconfigsConfigsConf {
10069	    // Path `ListConfigs.configs.conf.source`
10070	    pub source: ListconfigsConfigsConfSource,
10071	    pub value_str: String,
10072	}
10073
10074	#[derive(Clone, Debug, Deserialize, Serialize)]
10075	pub struct ListconfigsConfigsDaemon {
10076	    pub set: bool,
10077	    pub source: String,
10078	}
10079
10080	#[derive(Clone, Debug, Deserialize, Serialize)]
10081	pub struct ListconfigsConfigsDeveloper {
10082	    pub set: bool,
10083	    pub source: String,
10084	}
10085
10086	#[derive(Clone, Debug, Deserialize, Serialize)]
10087	pub struct ListconfigsConfigsMainnet {
10088	    pub set: bool,
10089	    pub source: String,
10090	}
10091
10092	#[derive(Clone, Debug, Deserialize, Serialize)]
10093	pub struct ListconfigsConfigsNetwork {
10094	    pub source: String,
10095	    pub value_str: String,
10096	}
10097
10098	#[derive(Clone, Debug, Deserialize, Serialize)]
10099	pub struct ListconfigsConfigsOffline {
10100	    pub set: bool,
10101	    pub source: String,
10102	}
10103
10104	#[derive(Clone, Debug, Deserialize, Serialize)]
10105	pub struct ListconfigsConfigsPlugin {
10106	    pub sources: Vec<String>,
10107	    pub values_str: Vec<String>,
10108	}
10109
10110	#[derive(Clone, Debug, Deserialize, Serialize)]
10111	pub struct ListconfigsConfigsProxy {
10112	    pub source: String,
10113	    pub value_str: String,
10114	}
10115
10116	#[derive(Clone, Debug, Deserialize, Serialize)]
10117	pub struct ListconfigsConfigsRegtest {
10118	    pub set: bool,
10119	    pub source: String,
10120	}
10121
10122	#[derive(Clone, Debug, Deserialize, Serialize)]
10123	pub struct ListconfigsConfigsRescan {
10124	    pub source: String,
10125	    pub value_int: i64,
10126	}
10127
10128	#[derive(Clone, Debug, Deserialize, Serialize)]
10129	pub struct ListconfigsConfigsRgb {
10130	    pub source: String,
10131	    pub value_str: String,
10132	}
10133
10134	#[derive(Clone, Debug, Deserialize, Serialize)]
10135	pub struct ListconfigsConfigsSignet {
10136	    pub set: bool,
10137	    pub source: String,
10138	}
10139
10140	#[derive(Clone, Debug, Deserialize, Serialize)]
10141	pub struct ListconfigsConfigsSubdaemon {
10142	    pub sources: Vec<String>,
10143	    pub values_str: Vec<String>,
10144	}
10145
10146	#[derive(Clone, Debug, Deserialize, Serialize)]
10147	pub struct ListconfigsConfigsTestnet {
10148	    pub set: bool,
10149	    pub source: String,
10150	}
10151
10152	#[derive(Clone, Debug, Deserialize, Serialize)]
10153	pub struct ListconfigsConfigsWallet {
10154	    pub source: String,
10155	    pub value_str: String,
10156	}
10157
10158	#[derive(Clone, Debug, Deserialize, Serialize)]
10159	pub struct ListconfigsConfigs {
10160	    #[deprecated]
10161	    #[serde(rename = "experimental-offers")]
10162	    #[serde(skip_serializing_if = "Option::is_none")]
10163	    pub experimental_offers: Option<ListconfigsConfigsExperimentaloffers>,
10164	    #[deprecated]
10165	    #[serde(rename = "experimental-onion-messages")]
10166	    #[serde(skip_serializing_if = "Option::is_none")]
10167	    pub experimental_onion_messages: Option<ListconfigsConfigsExperimentalonionmessages>,
10168	    #[deprecated]
10169	    #[serde(rename = "max-locktime-blocks")]
10170	    #[serde(skip_serializing_if = "Option::is_none")]
10171	    pub max_locktime_blocks: Option<ListconfigsConfigsMaxlocktimeblocks>,
10172	    #[serde(rename = "accept-htlc-tlv-types")]
10173	    #[serde(skip_serializing_if = "Option::is_none")]
10174	    pub accept_htlc_tlv_types: Option<ListconfigsConfigsAccepthtlctlvtypes>,
10175	    #[serde(rename = "allow-deprecated-apis")]
10176	    #[serde(skip_serializing_if = "Option::is_none")]
10177	    pub allow_deprecated_apis: Option<ListconfigsConfigsAllowdeprecatedapis>,
10178	    #[serde(rename = "always-use-proxy")]
10179	    #[serde(skip_serializing_if = "Option::is_none")]
10180	    pub always_use_proxy: Option<ListconfigsConfigsAlwaysuseproxy>,
10181	    #[serde(rename = "announce-addr")]
10182	    #[serde(skip_serializing_if = "Option::is_none")]
10183	    pub announce_addr: Option<ListconfigsConfigsAnnounceaddr>,
10184	    #[serde(rename = "announce-addr-discovered")]
10185	    #[serde(skip_serializing_if = "Option::is_none")]
10186	    pub announce_addr_discovered: Option<ListconfigsConfigsAnnounceaddrdiscovered>,
10187	    #[serde(rename = "announce-addr-discovered-port")]
10188	    #[serde(skip_serializing_if = "Option::is_none")]
10189	    pub announce_addr_discovered_port: Option<ListconfigsConfigsAnnounceaddrdiscoveredport>,
10190	    #[serde(rename = "announce-addr-dns")]
10191	    #[serde(skip_serializing_if = "Option::is_none")]
10192	    pub announce_addr_dns: Option<ListconfigsConfigsAnnounceaddrdns>,
10193	    #[serde(rename = "autoconnect-seeker-peers")]
10194	    #[serde(skip_serializing_if = "Option::is_none")]
10195	    pub autoconnect_seeker_peers: Option<ListconfigsConfigsAutoconnectseekerpeers>,
10196	    #[serde(rename = "bind-addr")]
10197	    #[serde(skip_serializing_if = "Option::is_none")]
10198	    pub bind_addr: Option<ListconfigsConfigsBindaddr>,
10199	    #[serde(rename = "clear-plugins")]
10200	    #[serde(skip_serializing_if = "Option::is_none")]
10201	    pub clear_plugins: Option<ListconfigsConfigsClearplugins>,
10202	    #[serde(rename = "cltv-delta")]
10203	    #[serde(skip_serializing_if = "Option::is_none")]
10204	    pub cltv_delta: Option<ListconfigsConfigsCltvdelta>,
10205	    #[serde(rename = "cltv-final")]
10206	    #[serde(skip_serializing_if = "Option::is_none")]
10207	    pub cltv_final: Option<ListconfigsConfigsCltvfinal>,
10208	    #[serde(rename = "commit-fee")]
10209	    #[serde(skip_serializing_if = "Option::is_none")]
10210	    pub commit_fee: Option<ListconfigsConfigsCommitfee>,
10211	    #[serde(rename = "commit-feerate-offset")]
10212	    #[serde(skip_serializing_if = "Option::is_none")]
10213	    pub commit_feerate_offset: Option<ListconfigsConfigsCommitfeerateoffset>,
10214	    #[serde(rename = "commit-time")]
10215	    #[serde(skip_serializing_if = "Option::is_none")]
10216	    pub commit_time: Option<ListconfigsConfigsCommittime>,
10217	    #[serde(rename = "database-upgrade")]
10218	    #[serde(skip_serializing_if = "Option::is_none")]
10219	    pub database_upgrade: Option<ListconfigsConfigsDatabaseupgrade>,
10220	    #[serde(rename = "disable-dns")]
10221	    #[serde(skip_serializing_if = "Option::is_none")]
10222	    pub disable_dns: Option<ListconfigsConfigsDisabledns>,
10223	    #[serde(rename = "disable-mpp")]
10224	    #[serde(skip_serializing_if = "Option::is_none")]
10225	    pub disable_mpp: Option<ListconfigsConfigsDisablempp>,
10226	    #[serde(rename = "disable-plugin")]
10227	    #[serde(skip_serializing_if = "Option::is_none")]
10228	    pub disable_plugin: Option<ListconfigsConfigsDisableplugin>,
10229	    #[serde(rename = "encrypted-hsm")]
10230	    #[serde(skip_serializing_if = "Option::is_none")]
10231	    pub encrypted_hsm: Option<ListconfigsConfigsEncryptedhsm>,
10232	    #[serde(rename = "experimental-anchors")]
10233	    #[serde(skip_serializing_if = "Option::is_none")]
10234	    pub experimental_anchors: Option<ListconfigsConfigsExperimentalanchors>,
10235	    #[serde(rename = "experimental-dual-fund")]
10236	    #[serde(skip_serializing_if = "Option::is_none")]
10237	    pub experimental_dual_fund: Option<ListconfigsConfigsExperimentaldualfund>,
10238	    #[serde(rename = "experimental-peer-storage")]
10239	    #[serde(skip_serializing_if = "Option::is_none")]
10240	    pub experimental_peer_storage: Option<ListconfigsConfigsExperimentalpeerstorage>,
10241	    #[serde(rename = "experimental-shutdown-wrong-funding")]
10242	    #[serde(skip_serializing_if = "Option::is_none")]
10243	    pub experimental_shutdown_wrong_funding: Option<ListconfigsConfigsExperimentalshutdownwrongfunding>,
10244	    #[serde(rename = "experimental-splicing")]
10245	    #[serde(skip_serializing_if = "Option::is_none")]
10246	    pub experimental_splicing: Option<ListconfigsConfigsExperimentalsplicing>,
10247	    #[serde(rename = "fee-base")]
10248	    #[serde(skip_serializing_if = "Option::is_none")]
10249	    pub fee_base: Option<ListconfigsConfigsFeebase>,
10250	    #[serde(rename = "fee-per-satoshi")]
10251	    #[serde(skip_serializing_if = "Option::is_none")]
10252	    pub fee_per_satoshi: Option<ListconfigsConfigsFeepersatoshi>,
10253	    #[serde(rename = "fetchinvoice-noconnect")]
10254	    #[serde(skip_serializing_if = "Option::is_none")]
10255	    pub fetchinvoice_noconnect: Option<ListconfigsConfigsFetchinvoicenoconnect>,
10256	    #[serde(rename = "force-feerates")]
10257	    #[serde(skip_serializing_if = "Option::is_none")]
10258	    pub force_feerates: Option<ListconfigsConfigsForcefeerates>,
10259	    #[serde(rename = "funding-confirms")]
10260	    #[serde(skip_serializing_if = "Option::is_none")]
10261	    pub funding_confirms: Option<ListconfigsConfigsFundingconfirms>,
10262	    #[serde(rename = "htlc-maximum-msat")]
10263	    #[serde(skip_serializing_if = "Option::is_none")]
10264	    pub htlc_maximum_msat: Option<ListconfigsConfigsHtlcmaximummsat>,
10265	    #[serde(rename = "htlc-minimum-msat")]
10266	    #[serde(skip_serializing_if = "Option::is_none")]
10267	    pub htlc_minimum_msat: Option<ListconfigsConfigsHtlcminimummsat>,
10268	    #[serde(rename = "ignore-fee-limits")]
10269	    #[serde(skip_serializing_if = "Option::is_none")]
10270	    pub ignore_fee_limits: Option<ListconfigsConfigsIgnorefeelimits>,
10271	    #[serde(rename = "important-plugin")]
10272	    #[serde(skip_serializing_if = "Option::is_none")]
10273	    pub important_plugin: Option<ListconfigsConfigsImportantplugin>,
10274	    #[serde(rename = "large-channels")]
10275	    #[serde(skip_serializing_if = "Option::is_none")]
10276	    pub large_channels: Option<ListconfigsConfigsLargechannels>,
10277	    #[serde(rename = "lightning-dir")]
10278	    #[serde(skip_serializing_if = "Option::is_none")]
10279	    pub lightning_dir: Option<ListconfigsConfigsLightningdir>,
10280	    #[serde(rename = "log-file")]
10281	    #[serde(skip_serializing_if = "Option::is_none")]
10282	    pub log_file: Option<ListconfigsConfigsLogfile>,
10283	    #[serde(rename = "log-level")]
10284	    #[serde(skip_serializing_if = "Option::is_none")]
10285	    pub log_level: Option<ListconfigsConfigsLoglevel>,
10286	    #[serde(rename = "log-prefix")]
10287	    #[serde(skip_serializing_if = "Option::is_none")]
10288	    pub log_prefix: Option<ListconfigsConfigsLogprefix>,
10289	    #[serde(rename = "log-timestamps")]
10290	    #[serde(skip_serializing_if = "Option::is_none")]
10291	    pub log_timestamps: Option<ListconfigsConfigsLogtimestamps>,
10292	    #[serde(rename = "max-concurrent-htlcs")]
10293	    #[serde(skip_serializing_if = "Option::is_none")]
10294	    pub max_concurrent_htlcs: Option<ListconfigsConfigsMaxconcurrenthtlcs>,
10295	    #[serde(rename = "max-dust-htlc-exposure-msat")]
10296	    #[serde(skip_serializing_if = "Option::is_none")]
10297	    pub max_dust_htlc_exposure_msat: Option<ListconfigsConfigsMaxdusthtlcexposuremsat>,
10298	    #[serde(rename = "min-capacity-sat")]
10299	    #[serde(skip_serializing_if = "Option::is_none")]
10300	    pub min_capacity_sat: Option<ListconfigsConfigsMincapacitysat>,
10301	    #[serde(rename = "pid-file")]
10302	    #[serde(skip_serializing_if = "Option::is_none")]
10303	    pub pid_file: Option<ListconfigsConfigsPidfile>,
10304	    #[serde(rename = "plugin-dir")]
10305	    #[serde(skip_serializing_if = "Option::is_none")]
10306	    pub plugin_dir: Option<ListconfigsConfigsPlugindir>,
10307	    #[serde(rename = "require-confirmed-inputs")]
10308	    #[serde(skip_serializing_if = "Option::is_none")]
10309	    pub require_confirmed_inputs: Option<ListconfigsConfigsRequireconfirmedinputs>,
10310	    #[serde(rename = "rpc-file")]
10311	    #[serde(skip_serializing_if = "Option::is_none")]
10312	    pub rpc_file: Option<ListconfigsConfigsRpcfile>,
10313	    #[serde(rename = "rpc-file-mode")]
10314	    #[serde(skip_serializing_if = "Option::is_none")]
10315	    pub rpc_file_mode: Option<ListconfigsConfigsRpcfilemode>,
10316	    #[serde(rename = "tor-service-password")]
10317	    #[serde(skip_serializing_if = "Option::is_none")]
10318	    pub tor_service_password: Option<ListconfigsConfigsTorservicepassword>,
10319	    #[serde(rename = "watchtime-blocks")]
10320	    #[serde(skip_serializing_if = "Option::is_none")]
10321	    pub watchtime_blocks: Option<ListconfigsConfigsWatchtimeblocks>,
10322	    #[serde(skip_serializing_if = "Option::is_none")]
10323	    pub addr: Option<ListconfigsConfigsAddr>,
10324	    #[serde(skip_serializing_if = "Option::is_none")]
10325	    pub alias: Option<ListconfigsConfigsAlias>,
10326	    #[serde(skip_serializing_if = "Option::is_none")]
10327	    pub autolisten: Option<ListconfigsConfigsAutolisten>,
10328	    #[serde(skip_serializing_if = "Option::is_none")]
10329	    pub conf: Option<ListconfigsConfigsConf>,
10330	    #[serde(skip_serializing_if = "Option::is_none")]
10331	    pub daemon: Option<ListconfigsConfigsDaemon>,
10332	    #[serde(skip_serializing_if = "Option::is_none")]
10333	    pub developer: Option<ListconfigsConfigsDeveloper>,
10334	    #[serde(skip_serializing_if = "Option::is_none")]
10335	    pub mainnet: Option<ListconfigsConfigsMainnet>,
10336	    #[serde(skip_serializing_if = "Option::is_none")]
10337	    pub network: Option<ListconfigsConfigsNetwork>,
10338	    #[serde(skip_serializing_if = "Option::is_none")]
10339	    pub offline: Option<ListconfigsConfigsOffline>,
10340	    #[serde(skip_serializing_if = "Option::is_none")]
10341	    pub plugin: Option<ListconfigsConfigsPlugin>,
10342	    #[serde(skip_serializing_if = "Option::is_none")]
10343	    pub proxy: Option<ListconfigsConfigsProxy>,
10344	    #[serde(skip_serializing_if = "Option::is_none")]
10345	    pub regtest: Option<ListconfigsConfigsRegtest>,
10346	    #[serde(skip_serializing_if = "Option::is_none")]
10347	    pub rescan: Option<ListconfigsConfigsRescan>,
10348	    #[serde(skip_serializing_if = "Option::is_none")]
10349	    pub rgb: Option<ListconfigsConfigsRgb>,
10350	    #[serde(skip_serializing_if = "Option::is_none")]
10351	    pub signet: Option<ListconfigsConfigsSignet>,
10352	    #[serde(skip_serializing_if = "Option::is_none")]
10353	    pub subdaemon: Option<ListconfigsConfigsSubdaemon>,
10354	    #[serde(skip_serializing_if = "Option::is_none")]
10355	    pub testnet: Option<ListconfigsConfigsTestnet>,
10356	    #[serde(skip_serializing_if = "Option::is_none")]
10357	    pub wallet: Option<ListconfigsConfigsWallet>,
10358	}
10359
10360	#[derive(Clone, Debug, Deserialize, Serialize)]
10361	pub struct ListconfigsResponse {
10362	    #[deprecated]
10363	    #[serde(rename = "accept-htlc-tlv-types")]
10364	    #[serde(skip_serializing_if = "Option::is_none")]
10365	    pub accept_htlc_tlv_types: Option<String>,
10366	    #[deprecated]
10367	    #[serde(rename = "allow-deprecated-apis")]
10368	    #[serde(skip_serializing_if = "Option::is_none")]
10369	    pub allow_deprecated_apis: Option<bool>,
10370	    #[deprecated]
10371	    #[serde(rename = "always-use-proxy")]
10372	    #[serde(skip_serializing_if = "Option::is_none")]
10373	    pub always_use_proxy: Option<bool>,
10374	    #[deprecated]
10375	    #[serde(rename = "announce-addr")]
10376	    #[serde(skip_serializing_if = "Option::is_none")]
10377	    pub announce_addr: Option<String>,
10378	    #[deprecated]
10379	    #[serde(rename = "announce-addr-discovered")]
10380	    #[serde(skip_serializing_if = "Option::is_none")]
10381	    pub announce_addr_discovered: Option<String>,
10382	    #[deprecated]
10383	    #[serde(rename = "announce-addr-discovered-port")]
10384	    #[serde(skip_serializing_if = "Option::is_none")]
10385	    pub announce_addr_discovered_port: Option<i64>,
10386	    #[deprecated]
10387	    #[serde(rename = "announce-addr-dns")]
10388	    #[serde(skip_serializing_if = "Option::is_none")]
10389	    pub announce_addr_dns: Option<bool>,
10390	    #[deprecated]
10391	    #[serde(rename = "bind-addr")]
10392	    #[serde(skip_serializing_if = "Option::is_none")]
10393	    pub bind_addr: Option<String>,
10394	    #[deprecated]
10395	    #[serde(rename = "bookkeeper-db")]
10396	    #[serde(skip_serializing_if = "Option::is_none")]
10397	    pub bookkeeper_db: Option<String>,
10398	    #[deprecated]
10399	    #[serde(rename = "bookkeeper-dir")]
10400	    #[serde(skip_serializing_if = "Option::is_none")]
10401	    pub bookkeeper_dir: Option<String>,
10402	    #[deprecated]
10403	    #[serde(rename = "cltv-delta")]
10404	    #[serde(skip_serializing_if = "Option::is_none")]
10405	    pub cltv_delta: Option<u32>,
10406	    #[deprecated]
10407	    #[serde(rename = "cltv-final")]
10408	    #[serde(skip_serializing_if = "Option::is_none")]
10409	    pub cltv_final: Option<u32>,
10410	    #[deprecated]
10411	    #[serde(rename = "commit-fee")]
10412	    #[serde(skip_serializing_if = "Option::is_none")]
10413	    pub commit_fee: Option<u64>,
10414	    #[deprecated]
10415	    #[serde(rename = "commit-time")]
10416	    #[serde(skip_serializing_if = "Option::is_none")]
10417	    pub commit_time: Option<u32>,
10418	    #[deprecated]
10419	    #[serde(rename = "database-upgrade")]
10420	    #[serde(skip_serializing_if = "Option::is_none")]
10421	    pub database_upgrade: Option<bool>,
10422	    #[deprecated]
10423	    #[serde(rename = "dev-allowdustreserve")]
10424	    #[serde(skip_serializing_if = "Option::is_none")]
10425	    pub dev_allowdustreserve: Option<bool>,
10426	    #[deprecated]
10427	    #[serde(rename = "disable-dns")]
10428	    #[serde(skip_serializing_if = "Option::is_none")]
10429	    pub disable_dns: Option<bool>,
10430	    #[deprecated]
10431	    #[serde(rename = "encrypted-hsm")]
10432	    #[serde(skip_serializing_if = "Option::is_none")]
10433	    pub encrypted_hsm: Option<bool>,
10434	    #[deprecated]
10435	    #[serde(rename = "experimental-dual-fund")]
10436	    #[serde(skip_serializing_if = "Option::is_none")]
10437	    pub experimental_dual_fund: Option<bool>,
10438	    #[deprecated]
10439	    #[serde(rename = "experimental-offers")]
10440	    #[serde(skip_serializing_if = "Option::is_none")]
10441	    pub experimental_offers: Option<bool>,
10442	    #[deprecated]
10443	    #[serde(rename = "experimental-onion-messages")]
10444	    #[serde(skip_serializing_if = "Option::is_none")]
10445	    pub experimental_onion_messages: Option<bool>,
10446	    #[deprecated]
10447	    #[serde(rename = "experimental-peer-storage")]
10448	    #[serde(skip_serializing_if = "Option::is_none")]
10449	    pub experimental_peer_storage: Option<bool>,
10450	    #[deprecated]
10451	    #[serde(rename = "experimental-quiesce")]
10452	    #[serde(skip_serializing_if = "Option::is_none")]
10453	    pub experimental_quiesce: Option<bool>,
10454	    #[deprecated]
10455	    #[serde(rename = "experimental-shutdown-wrong-funding")]
10456	    #[serde(skip_serializing_if = "Option::is_none")]
10457	    pub experimental_shutdown_wrong_funding: Option<bool>,
10458	    #[deprecated]
10459	    #[serde(rename = "experimental-splicing")]
10460	    #[serde(skip_serializing_if = "Option::is_none")]
10461	    pub experimental_splicing: Option<bool>,
10462	    #[deprecated]
10463	    #[serde(rename = "experimental-upgrade-protocol")]
10464	    #[serde(skip_serializing_if = "Option::is_none")]
10465	    pub experimental_upgrade_protocol: Option<bool>,
10466	    #[deprecated]
10467	    #[serde(rename = "fee-base")]
10468	    #[serde(skip_serializing_if = "Option::is_none")]
10469	    pub fee_base: Option<u32>,
10470	    #[deprecated]
10471	    #[serde(rename = "fee-per-satoshi")]
10472	    #[serde(skip_serializing_if = "Option::is_none")]
10473	    pub fee_per_satoshi: Option<u32>,
10474	    #[deprecated]
10475	    #[serde(rename = "fetchinvoice-noconnect")]
10476	    #[serde(skip_serializing_if = "Option::is_none")]
10477	    pub fetchinvoice_noconnect: Option<bool>,
10478	    #[deprecated]
10479	    #[serde(rename = "force-feerates")]
10480	    #[serde(skip_serializing_if = "Option::is_none")]
10481	    pub force_feerates: Option<String>,
10482	    #[deprecated]
10483	    #[serde(rename = "funding-confirms")]
10484	    #[serde(skip_serializing_if = "Option::is_none")]
10485	    pub funding_confirms: Option<u32>,
10486	    #[deprecated]
10487	    #[serde(rename = "htlc-maximum-msat")]
10488	    #[serde(skip_serializing_if = "Option::is_none")]
10489	    pub htlc_maximum_msat: Option<Amount>,
10490	    #[deprecated]
10491	    #[serde(rename = "htlc-minimum-msat")]
10492	    #[serde(skip_serializing_if = "Option::is_none")]
10493	    pub htlc_minimum_msat: Option<Amount>,
10494	    #[deprecated]
10495	    #[serde(rename = "ignore-fee-limits")]
10496	    #[serde(skip_serializing_if = "Option::is_none")]
10497	    pub ignore_fee_limits: Option<bool>,
10498	    #[deprecated]
10499	    #[serde(rename = "large-channels")]
10500	    #[serde(skip_serializing_if = "Option::is_none")]
10501	    pub large_channels: Option<bool>,
10502	    #[deprecated]
10503	    #[serde(rename = "lightning-dir")]
10504	    #[serde(skip_serializing_if = "Option::is_none")]
10505	    pub lightning_dir: Option<String>,
10506	    #[deprecated]
10507	    #[serde(rename = "log-file")]
10508	    #[serde(skip_serializing_if = "Option::is_none")]
10509	    pub log_file: Option<String>,
10510	    #[deprecated]
10511	    #[serde(rename = "log-level")]
10512	    #[serde(skip_serializing_if = "Option::is_none")]
10513	    pub log_level: Option<String>,
10514	    #[deprecated]
10515	    #[serde(rename = "log-prefix")]
10516	    #[serde(skip_serializing_if = "Option::is_none")]
10517	    pub log_prefix: Option<String>,
10518	    #[deprecated]
10519	    #[serde(rename = "log-timestamps")]
10520	    #[serde(skip_serializing_if = "Option::is_none")]
10521	    pub log_timestamps: Option<bool>,
10522	    #[deprecated]
10523	    #[serde(rename = "max-concurrent-htlcs")]
10524	    #[serde(skip_serializing_if = "Option::is_none")]
10525	    pub max_concurrent_htlcs: Option<u32>,
10526	    #[deprecated]
10527	    #[serde(rename = "max-dust-htlc-exposure-msat")]
10528	    #[serde(skip_serializing_if = "Option::is_none")]
10529	    pub max_dust_htlc_exposure_msat: Option<Amount>,
10530	    #[deprecated]
10531	    #[serde(rename = "max-locktime-blocks")]
10532	    #[serde(skip_serializing_if = "Option::is_none")]
10533	    pub max_locktime_blocks: Option<u32>,
10534	    #[deprecated]
10535	    #[serde(rename = "min-capacity-sat")]
10536	    #[serde(skip_serializing_if = "Option::is_none")]
10537	    pub min_capacity_sat: Option<u64>,
10538	    #[deprecated]
10539	    #[serde(rename = "pid-file")]
10540	    #[serde(skip_serializing_if = "Option::is_none")]
10541	    pub pid_file: Option<String>,
10542	    #[deprecated]
10543	    #[serde(rename = "require-confirmed-inputs")]
10544	    #[serde(skip_serializing_if = "Option::is_none")]
10545	    pub require_confirmed_inputs: Option<bool>,
10546	    #[deprecated]
10547	    #[serde(rename = "rpc-file")]
10548	    #[serde(skip_serializing_if = "Option::is_none")]
10549	    pub rpc_file: Option<String>,
10550	    #[deprecated]
10551	    #[serde(rename = "rpc-file-mode")]
10552	    #[serde(skip_serializing_if = "Option::is_none")]
10553	    pub rpc_file_mode: Option<String>,
10554	    #[deprecated]
10555	    #[serde(rename = "tor-service-password")]
10556	    #[serde(skip_serializing_if = "Option::is_none")]
10557	    pub tor_service_password: Option<String>,
10558	    #[deprecated]
10559	    #[serde(rename = "watchtime-blocks")]
10560	    #[serde(skip_serializing_if = "Option::is_none")]
10561	    pub watchtime_blocks: Option<u32>,
10562	    #[deprecated]
10563	    #[serde(skip_serializing_if = "Option::is_none")]
10564	    pub addr: Option<String>,
10565	    #[deprecated]
10566	    #[serde(skip_serializing_if = "Option::is_none")]
10567	    pub alias: Option<String>,
10568	    #[deprecated]
10569	    #[serde(skip_serializing_if = "Option::is_none")]
10570	    pub autolisten: Option<bool>,
10571	    #[deprecated]
10572	    #[serde(skip_serializing_if = "Option::is_none")]
10573	    pub conf: Option<String>,
10574	    #[deprecated]
10575	    #[serde(skip_serializing_if = "Option::is_none")]
10576	    pub daemon: Option<bool>,
10577	    #[deprecated]
10578	    #[serde(skip_serializing_if = "Option::is_none")]
10579	    pub network: Option<String>,
10580	    #[deprecated]
10581	    #[serde(skip_serializing_if = "Option::is_none")]
10582	    pub offline: Option<bool>,
10583	    #[deprecated]
10584	    #[serde(skip_serializing_if = "Option::is_none")]
10585	    pub proxy: Option<String>,
10586	    #[deprecated]
10587	    #[serde(skip_serializing_if = "Option::is_none")]
10588	    pub rescan: Option<i64>,
10589	    #[deprecated]
10590	    #[serde(skip_serializing_if = "Option::is_none")]
10591	    pub rgb: Option<String>,
10592	    #[deprecated]
10593	    #[serde(skip_serializing_if = "Option::is_none")]
10594	    pub subdaemon: Option<String>,
10595	    #[deprecated]
10596	    #[serde(skip_serializing_if = "Option::is_none")]
10597	    pub wallet: Option<String>,
10598	    #[deprecated]
10599	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
10600	    pub disable_plugin: Option<Vec<String>>,
10601	    #[deprecated]
10602	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
10603	    pub important_plugins: Option<Vec<ListconfigsImportantplugins>>,
10604	    #[deprecated]
10605	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
10606	    pub plugins: Option<Vec<ListconfigsPlugins>>,
10607	    #[serde(rename = "autoconnect-seeker-peers")]
10608	    #[serde(skip_serializing_if = "Option::is_none")]
10609	    pub autoconnect_seeker_peers: Option<u32>,
10610	    #[serde(rename = "commit-feerate-offset")]
10611	    #[serde(skip_serializing_if = "Option::is_none")]
10612	    pub commit_feerate_offset: Option<u32>,
10613	    #[serde(rename = "invoices-onchain-fallback")]
10614	    #[serde(skip_serializing_if = "Option::is_none")]
10615	    pub invoices_onchain_fallback: Option<bool>,
10616	    #[serde(rename = "min-emergency-msat")]
10617	    #[serde(skip_serializing_if = "Option::is_none")]
10618	    pub min_emergency_msat: Option<Amount>,
10619	    #[serde(skip_serializing_if = "Option::is_none")]
10620	    pub configs: Option<ListconfigsConfigs>,
10621	    #[serde(skip_serializing_if = "Option::is_none")]
10622	    pub developer: Option<bool>,
10623	}
10624
10625	impl TryFrom<Response> for ListconfigsResponse {
10626	    type Error = super::TryFromResponseError;
10627
10628	    fn try_from(response: Response) -> Result<Self, Self::Error> {
10629	        match response {
10630	            Response::ListConfigs(response) => Ok(response),
10631	            _ => Err(TryFromResponseError)
10632	        }
10633	    }
10634	}
10635
10636	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
10637	#[allow(non_camel_case_types)]
10638	pub enum StopResult {
10639	    #[serde(rename = "Shutdown complete")]
10640	    SHUTDOWN_COMPLETE = 0,
10641	}
10642
10643	impl TryFrom<i32> for StopResult {
10644	    type Error = anyhow::Error;
10645	    fn try_from(c: i32) -> Result<StopResult, anyhow::Error> {
10646	        match c {
10647	    0 => Ok(StopResult::SHUTDOWN_COMPLETE),
10648	            o => Err(anyhow::anyhow!("Unknown variant {} for enum StopResult", o)),
10649	        }
10650	    }
10651	}
10652
10653	impl ToString for StopResult {
10654	    fn to_string(&self) -> String {
10655	        match self {
10656	            StopResult::SHUTDOWN_COMPLETE => "SHUTDOWN_COMPLETE",
10657	        }.to_string()
10658	    }
10659	}
10660
10661	#[derive(Clone, Debug, Deserialize, Serialize)]
10662	pub struct StopResponse {
10663	    #[serde(skip_serializing_if = "Option::is_none")]
10664	    pub result: Option<StopResult>,
10665	}
10666
10667	impl TryFrom<Response> for StopResponse {
10668	    type Error = super::TryFromResponseError;
10669
10670	    fn try_from(response: Response) -> Result<Self, Self::Error> {
10671	        match response {
10672	            Response::Stop(response) => Ok(response),
10673	            _ => Err(TryFromResponseError)
10674	        }
10675	    }
10676	}
10677
10678	/// ['Prints the help in human-readable flat form.']
10679	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
10680	#[allow(non_camel_case_types)]
10681	pub enum HelpFormathint {
10682	    #[serde(rename = "simple")]
10683	    SIMPLE = 0,
10684	}
10685
10686	impl TryFrom<i32> for HelpFormathint {
10687	    type Error = anyhow::Error;
10688	    fn try_from(c: i32) -> Result<HelpFormathint, anyhow::Error> {
10689	        match c {
10690	    0 => Ok(HelpFormathint::SIMPLE),
10691	            o => Err(anyhow::anyhow!("Unknown variant {} for enum HelpFormathint", o)),
10692	        }
10693	    }
10694	}
10695
10696	impl ToString for HelpFormathint {
10697	    fn to_string(&self) -> String {
10698	        match self {
10699	            HelpFormathint::SIMPLE => "SIMPLE",
10700	        }.to_string()
10701	    }
10702	}
10703
10704	#[derive(Clone, Debug, Deserialize, Serialize)]
10705	pub struct HelpHelp {
10706	    pub command: String,
10707	}
10708
10709	#[derive(Clone, Debug, Deserialize, Serialize)]
10710	pub struct HelpResponse {
10711	    #[serde(skip_serializing_if = "Option::is_none")]
10712	    pub format_hint: Option<HelpFormathint>,
10713	    pub help: Vec<HelpHelp>,
10714	}
10715
10716	impl TryFrom<Response> for HelpResponse {
10717	    type Error = super::TryFromResponseError;
10718
10719	    fn try_from(response: Response) -> Result<Self, Self::Error> {
10720	        match response {
10721	            Response::Help(response) => Ok(response),
10722	            _ => Err(TryFromResponseError)
10723	        }
10724	    }
10725	}
10726
10727	#[derive(Clone, Debug, Deserialize, Serialize)]
10728	pub struct PreapprovekeysendResponse {
10729	}
10730
10731	impl TryFrom<Response> for PreapprovekeysendResponse {
10732	    type Error = super::TryFromResponseError;
10733
10734	    fn try_from(response: Response) -> Result<Self, Self::Error> {
10735	        match response {
10736	            Response::PreApproveKeysend(response) => Ok(response),
10737	            _ => Err(TryFromResponseError)
10738	        }
10739	    }
10740	}
10741
10742	#[derive(Clone, Debug, Deserialize, Serialize)]
10743	pub struct PreapproveinvoiceResponse {
10744	}
10745
10746	impl TryFrom<Response> for PreapproveinvoiceResponse {
10747	    type Error = super::TryFromResponseError;
10748
10749	    fn try_from(response: Response) -> Result<Self, Self::Error> {
10750	        match response {
10751	            Response::PreApproveInvoice(response) => Ok(response),
10752	            _ => Err(TryFromResponseError)
10753	        }
10754	    }
10755	}
10756
10757	#[derive(Clone, Debug, Deserialize, Serialize)]
10758	pub struct StaticbackupResponse {
10759	    pub scb: Vec<String>,
10760	}
10761
10762	impl TryFrom<Response> for StaticbackupResponse {
10763	    type Error = super::TryFromResponseError;
10764
10765	    fn try_from(response: Response) -> Result<Self, Self::Error> {
10766	        match response {
10767	            Response::StaticBackup(response) => Ok(response),
10768	            _ => Err(TryFromResponseError)
10769	        }
10770	    }
10771	}
10772
10773	#[derive(Clone, Debug, Deserialize, Serialize)]
10774	pub struct BkprchannelsapyChannelsApy {
10775	    #[serde(skip_serializing_if = "Option::is_none")]
10776	    pub apy_in_initial: Option<String>,
10777	    #[serde(skip_serializing_if = "Option::is_none")]
10778	    pub apy_lease: Option<String>,
10779	    #[serde(skip_serializing_if = "Option::is_none")]
10780	    pub apy_out_initial: Option<String>,
10781	    #[serde(skip_serializing_if = "Option::is_none")]
10782	    pub apy_total_initial: Option<String>,
10783	    #[serde(skip_serializing_if = "Option::is_none")]
10784	    pub fees_in_msat: Option<Amount>,
10785	    #[serde(skip_serializing_if = "Option::is_none")]
10786	    pub utilization_in_initial: Option<String>,
10787	    #[serde(skip_serializing_if = "Option::is_none")]
10788	    pub utilization_out_initial: Option<String>,
10789	    pub account: String,
10790	    pub apy_in: String,
10791	    pub apy_out: String,
10792	    pub apy_total: String,
10793	    pub channel_start_balance_msat: Amount,
10794	    pub fees_out_msat: Amount,
10795	    pub lease_fee_earned_msat: Amount,
10796	    pub lease_fee_paid_msat: Amount,
10797	    pub our_start_balance_msat: Amount,
10798	    pub pushed_in_msat: Amount,
10799	    pub pushed_out_msat: Amount,
10800	    pub routed_in_msat: Amount,
10801	    pub routed_out_msat: Amount,
10802	    pub utilization_in: String,
10803	    pub utilization_out: String,
10804	}
10805
10806	#[derive(Clone, Debug, Deserialize, Serialize)]
10807	pub struct BkprchannelsapyResponse {
10808	    pub channels_apy: Vec<BkprchannelsapyChannelsApy>,
10809	}
10810
10811	impl TryFrom<Response> for BkprchannelsapyResponse {
10812	    type Error = super::TryFromResponseError;
10813
10814	    fn try_from(response: Response) -> Result<Self, Self::Error> {
10815	        match response {
10816	            Response::BkprChannelsApy(response) => Ok(response),
10817	            _ => Err(TryFromResponseError)
10818	        }
10819	    }
10820	}
10821
10822	/// ['Format to print csv as.']
10823	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
10824	#[allow(non_camel_case_types)]
10825	pub enum BkprdumpincomecsvCsvFormat {
10826	    #[serde(rename = "cointracker")]
10827	    COINTRACKER = 0,
10828	    #[serde(rename = "koinly")]
10829	    KOINLY = 1,
10830	    #[serde(rename = "harmony")]
10831	    HARMONY = 2,
10832	    #[serde(rename = "quickbooks")]
10833	    QUICKBOOKS = 3,
10834	}
10835
10836	impl TryFrom<i32> for BkprdumpincomecsvCsvFormat {
10837	    type Error = anyhow::Error;
10838	    fn try_from(c: i32) -> Result<BkprdumpincomecsvCsvFormat, anyhow::Error> {
10839	        match c {
10840	    0 => Ok(BkprdumpincomecsvCsvFormat::COINTRACKER),
10841	    1 => Ok(BkprdumpincomecsvCsvFormat::KOINLY),
10842	    2 => Ok(BkprdumpincomecsvCsvFormat::HARMONY),
10843	    3 => Ok(BkprdumpincomecsvCsvFormat::QUICKBOOKS),
10844	            o => Err(anyhow::anyhow!("Unknown variant {} for enum BkprdumpincomecsvCsvFormat", o)),
10845	        }
10846	    }
10847	}
10848
10849	impl ToString for BkprdumpincomecsvCsvFormat {
10850	    fn to_string(&self) -> String {
10851	        match self {
10852	            BkprdumpincomecsvCsvFormat::COINTRACKER => "COINTRACKER",
10853	            BkprdumpincomecsvCsvFormat::KOINLY => "KOINLY",
10854	            BkprdumpincomecsvCsvFormat::HARMONY => "HARMONY",
10855	            BkprdumpincomecsvCsvFormat::QUICKBOOKS => "QUICKBOOKS",
10856	        }.to_string()
10857	    }
10858	}
10859
10860	#[derive(Clone, Debug, Deserialize, Serialize)]
10861	pub struct BkprdumpincomecsvResponse {
10862	    // Path `Bkpr-DumpIncomeCsv.csv_format`
10863	    pub csv_format: BkprdumpincomecsvCsvFormat,
10864	    pub csv_file: String,
10865	}
10866
10867	impl TryFrom<Response> for BkprdumpincomecsvResponse {
10868	    type Error = super::TryFromResponseError;
10869
10870	    fn try_from(response: Response) -> Result<Self, Self::Error> {
10871	        match response {
10872	            Response::BkprDumpIncomeCsv(response) => Ok(response),
10873	            _ => Err(TryFromResponseError)
10874	        }
10875	    }
10876	}
10877
10878	#[derive(Clone, Debug, Deserialize, Serialize)]
10879	pub struct BkprinspectTxsOutputs {
10880	    #[serde(skip_serializing_if = "Option::is_none")]
10881	    pub credit_msat: Option<Amount>,
10882	    #[serde(skip_serializing_if = "Option::is_none")]
10883	    pub debit_msat: Option<Amount>,
10884	    #[serde(skip_serializing_if = "Option::is_none")]
10885	    pub originating_account: Option<String>,
10886	    #[serde(skip_serializing_if = "Option::is_none")]
10887	    pub output_tag: Option<String>,
10888	    #[serde(skip_serializing_if = "Option::is_none")]
10889	    pub payment_id: Option<String>,
10890	    #[serde(skip_serializing_if = "Option::is_none")]
10891	    pub spend_tag: Option<String>,
10892	    #[serde(skip_serializing_if = "Option::is_none")]
10893	    pub spending_txid: Option<String>,
10894	    pub account: String,
10895	    pub currency: String,
10896	    pub outnum: u32,
10897	    pub output_value_msat: Amount,
10898	}
10899
10900	#[derive(Clone, Debug, Deserialize, Serialize)]
10901	pub struct BkprinspectTxs {
10902	    #[serde(skip_serializing_if = "Option::is_none")]
10903	    pub blockheight: Option<u32>,
10904	    pub fees_paid_msat: Amount,
10905	    pub outputs: Vec<BkprinspectTxsOutputs>,
10906	    pub txid: String,
10907	}
10908
10909	#[derive(Clone, Debug, Deserialize, Serialize)]
10910	pub struct BkprinspectResponse {
10911	    pub txs: Vec<BkprinspectTxs>,
10912	}
10913
10914	impl TryFrom<Response> for BkprinspectResponse {
10915	    type Error = super::TryFromResponseError;
10916
10917	    fn try_from(response: Response) -> Result<Self, Self::Error> {
10918	        match response {
10919	            Response::BkprInspect(response) => Ok(response),
10920	            _ => Err(TryFromResponseError)
10921	        }
10922	    }
10923	}
10924
10925	/// ['Coin movement type.']
10926	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
10927	#[allow(non_camel_case_types)]
10928	pub enum BkprlistaccounteventsEventsType {
10929	    #[serde(rename = "onchain_fee")]
10930	    ONCHAIN_FEE = 0,
10931	    #[serde(rename = "chain")]
10932	    CHAIN = 1,
10933	    #[serde(rename = "channel")]
10934	    CHANNEL = 2,
10935	}
10936
10937	impl TryFrom<i32> for BkprlistaccounteventsEventsType {
10938	    type Error = anyhow::Error;
10939	    fn try_from(c: i32) -> Result<BkprlistaccounteventsEventsType, anyhow::Error> {
10940	        match c {
10941	    0 => Ok(BkprlistaccounteventsEventsType::ONCHAIN_FEE),
10942	    1 => Ok(BkprlistaccounteventsEventsType::CHAIN),
10943	    2 => Ok(BkprlistaccounteventsEventsType::CHANNEL),
10944	            o => Err(anyhow::anyhow!("Unknown variant {} for enum BkprlistaccounteventsEventsType", o)),
10945	        }
10946	    }
10947	}
10948
10949	impl ToString for BkprlistaccounteventsEventsType {
10950	    fn to_string(&self) -> String {
10951	        match self {
10952	            BkprlistaccounteventsEventsType::ONCHAIN_FEE => "ONCHAIN_FEE",
10953	            BkprlistaccounteventsEventsType::CHAIN => "CHAIN",
10954	            BkprlistaccounteventsEventsType::CHANNEL => "CHANNEL",
10955	        }.to_string()
10956	    }
10957	}
10958
10959	#[derive(Clone, Debug, Deserialize, Serialize)]
10960	pub struct BkprlistaccounteventsEvents {
10961	    #[serde(skip_serializing_if = "Option::is_none")]
10962	    pub blockheight: Option<u32>,
10963	    #[serde(skip_serializing_if = "Option::is_none")]
10964	    pub description: Option<String>,
10965	    #[serde(skip_serializing_if = "Option::is_none")]
10966	    pub fees_msat: Option<Amount>,
10967	    #[serde(skip_serializing_if = "Option::is_none")]
10968	    pub is_rebalance: Option<bool>,
10969	    #[serde(skip_serializing_if = "Option::is_none")]
10970	    pub origin: Option<String>,
10971	    #[serde(skip_serializing_if = "Option::is_none")]
10972	    pub outpoint: Option<String>,
10973	    #[serde(skip_serializing_if = "Option::is_none")]
10974	    pub part_id: Option<u32>,
10975	    #[serde(skip_serializing_if = "Option::is_none")]
10976	    pub payment_id: Option<String>,
10977	    #[serde(skip_serializing_if = "Option::is_none")]
10978	    pub txid: Option<String>,
10979	    // Path `Bkpr-ListAccountEvents.events[].type`
10980	    #[serde(rename = "type")]
10981	    pub item_type: BkprlistaccounteventsEventsType,
10982	    pub account: String,
10983	    pub credit_msat: Amount,
10984	    pub currency: String,
10985	    pub debit_msat: Amount,
10986	    pub tag: String,
10987	    pub timestamp: u32,
10988	}
10989
10990	#[derive(Clone, Debug, Deserialize, Serialize)]
10991	pub struct BkprlistaccounteventsResponse {
10992	    pub events: Vec<BkprlistaccounteventsEvents>,
10993	}
10994
10995	impl TryFrom<Response> for BkprlistaccounteventsResponse {
10996	    type Error = super::TryFromResponseError;
10997
10998	    fn try_from(response: Response) -> Result<Self, Self::Error> {
10999	        match response {
11000	            Response::BkprListAccountEvents(response) => Ok(response),
11001	            _ => Err(TryFromResponseError)
11002	        }
11003	    }
11004	}
11005
11006	#[derive(Clone, Debug, Deserialize, Serialize)]
11007	pub struct BkprlistbalancesAccountsBalances {
11008	    pub balance_msat: Amount,
11009	    pub coin_type: String,
11010	}
11011
11012	#[derive(Clone, Debug, Deserialize, Serialize)]
11013	pub struct BkprlistbalancesAccounts {
11014	    #[serde(skip_serializing_if = "Option::is_none")]
11015	    pub account_closed: Option<bool>,
11016	    #[serde(skip_serializing_if = "Option::is_none")]
11017	    pub account_resolved: Option<bool>,
11018	    #[serde(skip_serializing_if = "Option::is_none")]
11019	    pub peer_id: Option<PublicKey>,
11020	    #[serde(skip_serializing_if = "Option::is_none")]
11021	    pub resolved_at_block: Option<u32>,
11022	    #[serde(skip_serializing_if = "Option::is_none")]
11023	    pub we_opened: Option<bool>,
11024	    pub account: String,
11025	    pub balances: Vec<BkprlistbalancesAccountsBalances>,
11026	}
11027
11028	#[derive(Clone, Debug, Deserialize, Serialize)]
11029	pub struct BkprlistbalancesResponse {
11030	    pub accounts: Vec<BkprlistbalancesAccounts>,
11031	}
11032
11033	impl TryFrom<Response> for BkprlistbalancesResponse {
11034	    type Error = super::TryFromResponseError;
11035
11036	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11037	        match response {
11038	            Response::BkprListBalances(response) => Ok(response),
11039	            _ => Err(TryFromResponseError)
11040	        }
11041	    }
11042	}
11043
11044	#[derive(Clone, Debug, Deserialize, Serialize)]
11045	pub struct BkprlistincomeIncomeEvents {
11046	    #[serde(skip_serializing_if = "Option::is_none")]
11047	    pub description: Option<String>,
11048	    #[serde(skip_serializing_if = "Option::is_none")]
11049	    pub outpoint: Option<String>,
11050	    #[serde(skip_serializing_if = "Option::is_none")]
11051	    pub payment_id: Option<String>,
11052	    #[serde(skip_serializing_if = "Option::is_none")]
11053	    pub txid: Option<String>,
11054	    pub account: String,
11055	    pub credit_msat: Amount,
11056	    pub currency: String,
11057	    pub debit_msat: Amount,
11058	    pub tag: String,
11059	    pub timestamp: u32,
11060	}
11061
11062	#[derive(Clone, Debug, Deserialize, Serialize)]
11063	pub struct BkprlistincomeResponse {
11064	    pub income_events: Vec<BkprlistincomeIncomeEvents>,
11065	}
11066
11067	impl TryFrom<Response> for BkprlistincomeResponse {
11068	    type Error = super::TryFromResponseError;
11069
11070	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11071	        match response {
11072	            Response::BkprListIncome(response) => Ok(response),
11073	            _ => Err(TryFromResponseError)
11074	        }
11075	    }
11076	}
11077
11078	/// ['Coin movement type.']
11079	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
11080	#[allow(non_camel_case_types)]
11081	pub enum BkpreditdescriptionbypaymentidUpdatedType {
11082	    #[serde(rename = "chain")]
11083	    CHAIN = 0,
11084	    #[serde(rename = "channel")]
11085	    CHANNEL = 1,
11086	}
11087
11088	impl TryFrom<i32> for BkpreditdescriptionbypaymentidUpdatedType {
11089	    type Error = anyhow::Error;
11090	    fn try_from(c: i32) -> Result<BkpreditdescriptionbypaymentidUpdatedType, anyhow::Error> {
11091	        match c {
11092	    0 => Ok(BkpreditdescriptionbypaymentidUpdatedType::CHAIN),
11093	    1 => Ok(BkpreditdescriptionbypaymentidUpdatedType::CHANNEL),
11094	            o => Err(anyhow::anyhow!("Unknown variant {} for enum BkpreditdescriptionbypaymentidUpdatedType", o)),
11095	        }
11096	    }
11097	}
11098
11099	impl ToString for BkpreditdescriptionbypaymentidUpdatedType {
11100	    fn to_string(&self) -> String {
11101	        match self {
11102	            BkpreditdescriptionbypaymentidUpdatedType::CHAIN => "CHAIN",
11103	            BkpreditdescriptionbypaymentidUpdatedType::CHANNEL => "CHANNEL",
11104	        }.to_string()
11105	    }
11106	}
11107
11108	#[derive(Clone, Debug, Deserialize, Serialize)]
11109	pub struct BkpreditdescriptionbypaymentidUpdated {
11110	    #[serde(skip_serializing_if = "Option::is_none")]
11111	    pub blockheight: Option<u32>,
11112	    #[serde(skip_serializing_if = "Option::is_none")]
11113	    pub fees_msat: Option<Amount>,
11114	    #[serde(skip_serializing_if = "Option::is_none")]
11115	    pub is_rebalance: Option<bool>,
11116	    #[serde(skip_serializing_if = "Option::is_none")]
11117	    pub origin: Option<String>,
11118	    #[serde(skip_serializing_if = "Option::is_none")]
11119	    pub outpoint: Option<String>,
11120	    #[serde(skip_serializing_if = "Option::is_none")]
11121	    pub part_id: Option<u32>,
11122	    #[serde(skip_serializing_if = "Option::is_none")]
11123	    pub payment_id: Option<String>,
11124	    #[serde(skip_serializing_if = "Option::is_none")]
11125	    pub txid: Option<String>,
11126	    // Path `Bkpr-EditDescriptionByPaymentId.updated[].type`
11127	    #[serde(rename = "type")]
11128	    pub item_type: BkpreditdescriptionbypaymentidUpdatedType,
11129	    pub account: String,
11130	    pub credit_msat: Amount,
11131	    pub currency: String,
11132	    pub debit_msat: Amount,
11133	    pub description: String,
11134	    pub tag: String,
11135	    pub timestamp: u32,
11136	}
11137
11138	#[derive(Clone, Debug, Deserialize, Serialize)]
11139	pub struct BkpreditdescriptionbypaymentidResponse {
11140	    pub updated: Vec<BkpreditdescriptionbypaymentidUpdated>,
11141	}
11142
11143	impl TryFrom<Response> for BkpreditdescriptionbypaymentidResponse {
11144	    type Error = super::TryFromResponseError;
11145
11146	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11147	        match response {
11148	            Response::BkprEditDescriptionByPaymentId(response) => Ok(response),
11149	            _ => Err(TryFromResponseError)
11150	        }
11151	    }
11152	}
11153
11154	/// ['Coin movement type.']
11155	#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
11156	#[allow(non_camel_case_types)]
11157	pub enum BkpreditdescriptionbyoutpointUpdatedType {
11158	    #[serde(rename = "chain")]
11159	    CHAIN = 0,
11160	    #[serde(rename = "channel")]
11161	    CHANNEL = 1,
11162	}
11163
11164	impl TryFrom<i32> for BkpreditdescriptionbyoutpointUpdatedType {
11165	    type Error = anyhow::Error;
11166	    fn try_from(c: i32) -> Result<BkpreditdescriptionbyoutpointUpdatedType, anyhow::Error> {
11167	        match c {
11168	    0 => Ok(BkpreditdescriptionbyoutpointUpdatedType::CHAIN),
11169	    1 => Ok(BkpreditdescriptionbyoutpointUpdatedType::CHANNEL),
11170	            o => Err(anyhow::anyhow!("Unknown variant {} for enum BkpreditdescriptionbyoutpointUpdatedType", o)),
11171	        }
11172	    }
11173	}
11174
11175	impl ToString for BkpreditdescriptionbyoutpointUpdatedType {
11176	    fn to_string(&self) -> String {
11177	        match self {
11178	            BkpreditdescriptionbyoutpointUpdatedType::CHAIN => "CHAIN",
11179	            BkpreditdescriptionbyoutpointUpdatedType::CHANNEL => "CHANNEL",
11180	        }.to_string()
11181	    }
11182	}
11183
11184	#[derive(Clone, Debug, Deserialize, Serialize)]
11185	pub struct BkpreditdescriptionbyoutpointUpdated {
11186	    #[serde(skip_serializing_if = "Option::is_none")]
11187	    pub blockheight: Option<u32>,
11188	    #[serde(skip_serializing_if = "Option::is_none")]
11189	    pub fees_msat: Option<Amount>,
11190	    #[serde(skip_serializing_if = "Option::is_none")]
11191	    pub is_rebalance: Option<bool>,
11192	    #[serde(skip_serializing_if = "Option::is_none")]
11193	    pub origin: Option<String>,
11194	    #[serde(skip_serializing_if = "Option::is_none")]
11195	    pub outpoint: Option<String>,
11196	    #[serde(skip_serializing_if = "Option::is_none")]
11197	    pub part_id: Option<u32>,
11198	    #[serde(skip_serializing_if = "Option::is_none")]
11199	    pub payment_id: Option<String>,
11200	    #[serde(skip_serializing_if = "Option::is_none")]
11201	    pub txid: Option<String>,
11202	    // Path `Bkpr-EditDescriptionByOutpoint.updated[].type`
11203	    #[serde(rename = "type")]
11204	    pub item_type: BkpreditdescriptionbyoutpointUpdatedType,
11205	    pub account: String,
11206	    pub credit_msat: Amount,
11207	    pub currency: String,
11208	    pub debit_msat: Amount,
11209	    pub description: String,
11210	    pub tag: String,
11211	    pub timestamp: u32,
11212	}
11213
11214	#[derive(Clone, Debug, Deserialize, Serialize)]
11215	pub struct BkpreditdescriptionbyoutpointResponse {
11216	    pub updated: Vec<BkpreditdescriptionbyoutpointUpdated>,
11217	}
11218
11219	impl TryFrom<Response> for BkpreditdescriptionbyoutpointResponse {
11220	    type Error = super::TryFromResponseError;
11221
11222	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11223	        match response {
11224	            Response::BkprEditDescriptionByOutpoint(response) => Ok(response),
11225	            _ => Err(TryFromResponseError)
11226	        }
11227	    }
11228	}
11229
11230	#[derive(Clone, Debug, Deserialize, Serialize)]
11231	pub struct BlacklistruneBlacklist {
11232	    pub end: u64,
11233	    pub start: u64,
11234	}
11235
11236	#[derive(Clone, Debug, Deserialize, Serialize)]
11237	pub struct BlacklistruneResponse {
11238	    pub blacklist: Vec<BlacklistruneBlacklist>,
11239	}
11240
11241	impl TryFrom<Response> for BlacklistruneResponse {
11242	    type Error = super::TryFromResponseError;
11243
11244	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11245	        match response {
11246	            Response::BlacklistRune(response) => Ok(response),
11247	            _ => Err(TryFromResponseError)
11248	        }
11249	    }
11250	}
11251
11252	#[derive(Clone, Debug, Deserialize, Serialize)]
11253	pub struct CheckruneResponse {
11254	    pub valid: bool,
11255	}
11256
11257	impl TryFrom<Response> for CheckruneResponse {
11258	    type Error = super::TryFromResponseError;
11259
11260	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11261	        match response {
11262	            Response::CheckRune(response) => Ok(response),
11263	            _ => Err(TryFromResponseError)
11264	        }
11265	    }
11266	}
11267
11268	#[derive(Clone, Debug, Deserialize, Serialize)]
11269	pub struct CreateruneResponse {
11270	    #[serde(skip_serializing_if = "Option::is_none")]
11271	    pub warning_unrestricted_rune: Option<String>,
11272	    pub rune: String,
11273	    pub unique_id: String,
11274	}
11275
11276	impl TryFrom<Response> for CreateruneResponse {
11277	    type Error = super::TryFromResponseError;
11278
11279	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11280	        match response {
11281	            Response::CreateRune(response) => Ok(response),
11282	            _ => Err(TryFromResponseError)
11283	        }
11284	    }
11285	}
11286
11287	#[derive(Clone, Debug, Deserialize, Serialize)]
11288	pub struct ShowrunesRunesRestrictionsAlternatives {
11289	    pub condition: String,
11290	    pub english: String,
11291	    pub fieldname: String,
11292	    pub value: String,
11293	}
11294
11295	#[derive(Clone, Debug, Deserialize, Serialize)]
11296	pub struct ShowrunesRunesRestrictions {
11297	    pub alternatives: Vec<ShowrunesRunesRestrictionsAlternatives>,
11298	    pub english: String,
11299	}
11300
11301	#[derive(Clone, Debug, Deserialize, Serialize)]
11302	pub struct ShowrunesRunes {
11303	    #[serde(skip_serializing_if = "Option::is_none")]
11304	    pub blacklisted: Option<bool>,
11305	    #[serde(skip_serializing_if = "Option::is_none")]
11306	    pub last_used: Option<f64>,
11307	    #[serde(skip_serializing_if = "Option::is_none")]
11308	    pub our_rune: Option<bool>,
11309	    #[serde(skip_serializing_if = "Option::is_none")]
11310	    pub stored: Option<bool>,
11311	    pub restrictions: Vec<ShowrunesRunesRestrictions>,
11312	    pub restrictions_as_english: String,
11313	    pub rune: String,
11314	    pub unique_id: String,
11315	}
11316
11317	#[derive(Clone, Debug, Deserialize, Serialize)]
11318	pub struct ShowrunesResponse {
11319	    pub runes: Vec<ShowrunesRunes>,
11320	}
11321
11322	impl TryFrom<Response> for ShowrunesResponse {
11323	    type Error = super::TryFromResponseError;
11324
11325	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11326	        match response {
11327	            Response::ShowRunes(response) => Ok(response),
11328	            _ => Err(TryFromResponseError)
11329	        }
11330	    }
11331	}
11332
11333	#[derive(Clone, Debug, Deserialize, Serialize)]
11334	pub struct AskreneunreserveResponse {
11335	}
11336
11337	impl TryFrom<Response> for AskreneunreserveResponse {
11338	    type Error = super::TryFromResponseError;
11339
11340	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11341	        match response {
11342	            Response::AskReneUnreserve(response) => Ok(response),
11343	            _ => Err(TryFromResponseError)
11344	        }
11345	    }
11346	}
11347
11348	#[derive(Clone, Debug, Deserialize, Serialize)]
11349	pub struct AskrenelistlayersLayersBiases {
11350	    #[serde(skip_serializing_if = "Option::is_none")]
11351	    pub description: Option<String>,
11352	    pub bias: i64,
11353	    pub short_channel_id_dir: ShortChannelIdDir,
11354	}
11355
11356	#[derive(Clone, Debug, Deserialize, Serialize)]
11357	pub struct AskrenelistlayersLayersChannelUpdates {
11358	    #[serde(skip_serializing_if = "Option::is_none")]
11359	    pub cltv_expiry_delta: Option<u16>,
11360	    #[serde(skip_serializing_if = "Option::is_none")]
11361	    pub enabled: Option<bool>,
11362	    #[serde(skip_serializing_if = "Option::is_none")]
11363	    pub fee_base_msat: Option<Amount>,
11364	    #[serde(skip_serializing_if = "Option::is_none")]
11365	    pub fee_proportional_millionths: Option<u32>,
11366	    #[serde(skip_serializing_if = "Option::is_none")]
11367	    pub htlc_maximum_msat: Option<Amount>,
11368	    #[serde(skip_serializing_if = "Option::is_none")]
11369	    pub htlc_minimum_msat: Option<Amount>,
11370	    pub short_channel_id_dir: ShortChannelIdDir,
11371	}
11372
11373	#[derive(Clone, Debug, Deserialize, Serialize)]
11374	pub struct AskrenelistlayersLayersConstraints {
11375	    #[serde(skip_serializing_if = "Option::is_none")]
11376	    pub maximum_msat: Option<Amount>,
11377	    #[serde(skip_serializing_if = "Option::is_none")]
11378	    pub minimum_msat: Option<Amount>,
11379	    #[serde(skip_serializing_if = "Option::is_none")]
11380	    pub short_channel_id_dir: Option<ShortChannelIdDir>,
11381	    #[serde(skip_serializing_if = "Option::is_none")]
11382	    pub timestamp: Option<u64>,
11383	}
11384
11385	#[derive(Clone, Debug, Deserialize, Serialize)]
11386	pub struct AskrenelistlayersLayersCreatedChannels {
11387	    pub capacity_msat: Amount,
11388	    pub destination: PublicKey,
11389	    pub short_channel_id: ShortChannelId,
11390	    pub source: PublicKey,
11391	}
11392
11393	#[derive(Clone, Debug, Deserialize, Serialize)]
11394	pub struct AskrenelistlayersLayers {
11395	    #[serde(skip_serializing_if = "Option::is_none")]
11396	    pub persistent: Option<bool>,
11397	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
11398	    pub biases: Option<Vec<AskrenelistlayersLayersBiases>>,
11399	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
11400	    pub channel_updates: Option<Vec<AskrenelistlayersLayersChannelUpdates>>,
11401	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
11402	    pub disabled_channels: Option<Vec<ShortChannelIdDir>>,
11403	    pub constraints: Vec<AskrenelistlayersLayersConstraints>,
11404	    pub created_channels: Vec<AskrenelistlayersLayersCreatedChannels>,
11405	    pub disabled_nodes: Vec<PublicKey>,
11406	    pub layer: String,
11407	}
11408
11409	#[derive(Clone, Debug, Deserialize, Serialize)]
11410	pub struct AskrenelistlayersResponse {
11411	    pub layers: Vec<AskrenelistlayersLayers>,
11412	}
11413
11414	impl TryFrom<Response> for AskrenelistlayersResponse {
11415	    type Error = super::TryFromResponseError;
11416
11417	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11418	        match response {
11419	            Response::AskReneListLayers(response) => Ok(response),
11420	            _ => Err(TryFromResponseError)
11421	        }
11422	    }
11423	}
11424
11425	#[derive(Clone, Debug, Deserialize, Serialize)]
11426	pub struct AskrenecreatelayerLayersBiases {
11427	    #[serde(skip_serializing_if = "Option::is_none")]
11428	    pub description: Option<String>,
11429	    pub bias: i64,
11430	    pub short_channel_id_dir: ShortChannelIdDir,
11431	}
11432
11433	#[derive(Clone, Debug, Deserialize, Serialize)]
11434	pub struct AskrenecreatelayerLayersChannelUpdates {
11435	    #[serde(skip_serializing_if = "Option::is_none")]
11436	    pub delay: Option<u16>,
11437	    #[serde(skip_serializing_if = "Option::is_none")]
11438	    pub fee_base_msat: Option<Amount>,
11439	    #[serde(skip_serializing_if = "Option::is_none")]
11440	    pub fee_proportional_millionths: Option<u32>,
11441	    #[serde(skip_serializing_if = "Option::is_none")]
11442	    pub htlc_maximum_msat: Option<Amount>,
11443	    #[serde(skip_serializing_if = "Option::is_none")]
11444	    pub htlc_minimum_msat: Option<Amount>,
11445	}
11446
11447	#[derive(Clone, Debug, Deserialize, Serialize)]
11448	pub struct AskrenecreatelayerLayersConstraints {
11449	    #[serde(skip_serializing_if = "Option::is_none")]
11450	    pub maximum_msat: Option<Amount>,
11451	    #[serde(skip_serializing_if = "Option::is_none")]
11452	    pub minimum_msat: Option<Amount>,
11453	    pub direction: u32,
11454	    pub short_channel_id: ShortChannelId,
11455	}
11456
11457	#[derive(Clone, Debug, Deserialize, Serialize)]
11458	pub struct AskrenecreatelayerLayersCreatedChannels {
11459	    pub capacity_msat: Amount,
11460	    pub destination: PublicKey,
11461	    pub short_channel_id: ShortChannelId,
11462	    pub source: PublicKey,
11463	}
11464
11465	#[derive(Clone, Debug, Deserialize, Serialize)]
11466	pub struct AskrenecreatelayerLayers {
11467	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
11468	    pub biases: Option<Vec<AskrenecreatelayerLayersBiases>>,
11469	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
11470	    pub disabled_channels: Option<Vec<ShortChannelIdDir>>,
11471	    pub channel_updates: Vec<AskrenecreatelayerLayersChannelUpdates>,
11472	    pub constraints: Vec<AskrenecreatelayerLayersConstraints>,
11473	    pub created_channels: Vec<AskrenecreatelayerLayersCreatedChannels>,
11474	    pub disabled_nodes: Vec<PublicKey>,
11475	    pub layer: String,
11476	    pub persistent: bool,
11477	}
11478
11479	#[derive(Clone, Debug, Deserialize, Serialize)]
11480	pub struct AskrenecreatelayerResponse {
11481	    pub layers: Vec<AskrenecreatelayerLayers>,
11482	}
11483
11484	impl TryFrom<Response> for AskrenecreatelayerResponse {
11485	    type Error = super::TryFromResponseError;
11486
11487	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11488	        match response {
11489	            Response::AskReneCreateLayer(response) => Ok(response),
11490	            _ => Err(TryFromResponseError)
11491	        }
11492	    }
11493	}
11494
11495	#[derive(Clone, Debug, Deserialize, Serialize)]
11496	pub struct AskreneremovelayerResponse {
11497	}
11498
11499	impl TryFrom<Response> for AskreneremovelayerResponse {
11500	    type Error = super::TryFromResponseError;
11501
11502	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11503	        match response {
11504	            Response::AskReneRemoveLayer(response) => Ok(response),
11505	            _ => Err(TryFromResponseError)
11506	        }
11507	    }
11508	}
11509
11510	#[derive(Clone, Debug, Deserialize, Serialize)]
11511	pub struct AskrenereserveResponse {
11512	}
11513
11514	impl TryFrom<Response> for AskrenereserveResponse {
11515	    type Error = super::TryFromResponseError;
11516
11517	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11518	        match response {
11519	            Response::AskReneReserve(response) => Ok(response),
11520	            _ => Err(TryFromResponseError)
11521	        }
11522	    }
11523	}
11524
11525	#[derive(Clone, Debug, Deserialize, Serialize)]
11526	pub struct AskreneageResponse {
11527	    pub layer: String,
11528	    pub num_removed: u64,
11529	}
11530
11531	impl TryFrom<Response> for AskreneageResponse {
11532	    type Error = super::TryFromResponseError;
11533
11534	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11535	        match response {
11536	            Response::AskReneAge(response) => Ok(response),
11537	            _ => Err(TryFromResponseError)
11538	        }
11539	    }
11540	}
11541
11542	#[derive(Clone, Debug, Deserialize, Serialize)]
11543	pub struct GetroutesRoutesPath {
11544	    #[serde(skip_serializing_if = "Option::is_none")]
11545	    pub short_channel_id_dir: Option<ShortChannelIdDir>,
11546	    pub amount_msat: Amount,
11547	    pub delay: u32,
11548	    pub next_node_id: PublicKey,
11549	}
11550
11551	#[derive(Clone, Debug, Deserialize, Serialize)]
11552	pub struct GetroutesRoutes {
11553	    #[serde(skip_serializing_if = "Option::is_none")]
11554	    pub final_cltv: Option<u32>,
11555	    pub amount_msat: Amount,
11556	    pub path: Vec<GetroutesRoutesPath>,
11557	    pub probability_ppm: u64,
11558	}
11559
11560	#[derive(Clone, Debug, Deserialize, Serialize)]
11561	pub struct GetroutesResponse {
11562	    pub probability_ppm: u64,
11563	    pub routes: Vec<GetroutesRoutes>,
11564	}
11565
11566	impl TryFrom<Response> for GetroutesResponse {
11567	    type Error = super::TryFromResponseError;
11568
11569	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11570	        match response {
11571	            Response::GetRoutes(response) => Ok(response),
11572	            _ => Err(TryFromResponseError)
11573	        }
11574	    }
11575	}
11576
11577	#[derive(Clone, Debug, Deserialize, Serialize)]
11578	pub struct AskrenedisablenodeResponse {
11579	}
11580
11581	impl TryFrom<Response> for AskrenedisablenodeResponse {
11582	    type Error = super::TryFromResponseError;
11583
11584	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11585	        match response {
11586	            Response::AskReneDisableNode(response) => Ok(response),
11587	            _ => Err(TryFromResponseError)
11588	        }
11589	    }
11590	}
11591
11592	#[derive(Clone, Debug, Deserialize, Serialize)]
11593	pub struct AskreneinformchannelConstraints {
11594	    #[serde(skip_serializing_if = "Option::is_none")]
11595	    pub maximum_msat: Option<Amount>,
11596	    #[serde(skip_serializing_if = "Option::is_none")]
11597	    pub minimum_msat: Option<Amount>,
11598	    pub layer: String,
11599	    pub short_channel_id_dir: ShortChannelIdDir,
11600	    pub timestamp: u64,
11601	}
11602
11603	#[derive(Clone, Debug, Deserialize, Serialize)]
11604	pub struct AskreneinformchannelResponse {
11605	    #[serde(skip_serializing_if = "crate::is_none_or_empty")]
11606	    pub constraints: Option<Vec<AskreneinformchannelConstraints>>,
11607	}
11608
11609	impl TryFrom<Response> for AskreneinformchannelResponse {
11610	    type Error = super::TryFromResponseError;
11611
11612	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11613	        match response {
11614	            Response::AskReneInformChannel(response) => Ok(response),
11615	            _ => Err(TryFromResponseError)
11616	        }
11617	    }
11618	}
11619
11620	#[derive(Clone, Debug, Deserialize, Serialize)]
11621	pub struct AskrenecreatechannelResponse {
11622	}
11623
11624	impl TryFrom<Response> for AskrenecreatechannelResponse {
11625	    type Error = super::TryFromResponseError;
11626
11627	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11628	        match response {
11629	            Response::AskReneCreateChannel(response) => Ok(response),
11630	            _ => Err(TryFromResponseError)
11631	        }
11632	    }
11633	}
11634
11635	#[derive(Clone, Debug, Deserialize, Serialize)]
11636	pub struct AskreneupdatechannelResponse {
11637	}
11638
11639	impl TryFrom<Response> for AskreneupdatechannelResponse {
11640	    type Error = super::TryFromResponseError;
11641
11642	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11643	        match response {
11644	            Response::AskReneUpdateChannel(response) => Ok(response),
11645	            _ => Err(TryFromResponseError)
11646	        }
11647	    }
11648	}
11649
11650	#[derive(Clone, Debug, Deserialize, Serialize)]
11651	pub struct AskrenebiaschannelBiases {
11652	    #[serde(skip_serializing_if = "Option::is_none")]
11653	    pub description: Option<String>,
11654	    pub bias: i64,
11655	    pub layer: String,
11656	    pub short_channel_id_dir: ShortChannelIdDir,
11657	}
11658
11659	#[derive(Clone, Debug, Deserialize, Serialize)]
11660	pub struct AskrenebiaschannelResponse {
11661	    pub biases: Vec<AskrenebiaschannelBiases>,
11662	}
11663
11664	impl TryFrom<Response> for AskrenebiaschannelResponse {
11665	    type Error = super::TryFromResponseError;
11666
11667	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11668	        match response {
11669	            Response::AskReneBiasChannel(response) => Ok(response),
11670	            _ => Err(TryFromResponseError)
11671	        }
11672	    }
11673	}
11674
11675	#[derive(Clone, Debug, Deserialize, Serialize)]
11676	pub struct AskrenelistreservationsReservations {
11677	    pub age_in_seconds: u64,
11678	    pub amount_msat: Amount,
11679	    pub command_id: String,
11680	    pub short_channel_id_dir: ShortChannelIdDir,
11681	}
11682
11683	#[derive(Clone, Debug, Deserialize, Serialize)]
11684	pub struct AskrenelistreservationsResponse {
11685	    pub reservations: Vec<AskrenelistreservationsReservations>,
11686	}
11687
11688	impl TryFrom<Response> for AskrenelistreservationsResponse {
11689	    type Error = super::TryFromResponseError;
11690
11691	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11692	        match response {
11693	            Response::AskReneListReservations(response) => Ok(response),
11694	            _ => Err(TryFromResponseError)
11695	        }
11696	    }
11697	}
11698
11699	#[derive(Clone, Debug, Deserialize, Serialize)]
11700	pub struct InjectpaymentonionResponse {
11701	    pub completed_at: u64,
11702	    pub created_at: u64,
11703	    pub created_index: u64,
11704	    pub payment_preimage: Secret,
11705	}
11706
11707	impl TryFrom<Response> for InjectpaymentonionResponse {
11708	    type Error = super::TryFromResponseError;
11709
11710	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11711	        match response {
11712	            Response::InjectPaymentOnion(response) => Ok(response),
11713	            _ => Err(TryFromResponseError)
11714	        }
11715	    }
11716	}
11717
11718	#[derive(Clone, Debug, Deserialize, Serialize)]
11719	pub struct InjectonionmessageResponse {
11720	}
11721
11722	impl TryFrom<Response> for InjectonionmessageResponse {
11723	    type Error = super::TryFromResponseError;
11724
11725	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11726	        match response {
11727	            Response::InjectOnionMessage(response) => Ok(response),
11728	            _ => Err(TryFromResponseError)
11729	        }
11730	    }
11731	}
11732
11733	#[derive(Clone, Debug, Deserialize, Serialize)]
11734	pub struct XpayResponse {
11735	    pub amount_msat: Amount,
11736	    pub amount_sent_msat: Amount,
11737	    pub failed_parts: u64,
11738	    pub payment_preimage: Secret,
11739	    pub successful_parts: u64,
11740	}
11741
11742	impl TryFrom<Response> for XpayResponse {
11743	    type Error = super::TryFromResponseError;
11744
11745	    fn try_from(response: Response) -> Result<Self, Self::Error> {
11746	        match response {
11747	            Response::Xpay(response) => Ok(response),
11748	            _ => Err(TryFromResponseError)
11749	        }
11750	    }
11751	}
11752
11753}
11754