cln_rpc/
model.rs

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