breez_sdk_core/
bridge_generated.io.rs

1use super::*;
2// Section: wire functions
3
4#[no_mangle]
5pub extern "C" fn wire_connect(port_: i64, req: *mut wire_ConnectRequest) {
6    wire_connect_impl(port_, req)
7}
8
9#[no_mangle]
10pub extern "C" fn wire_is_initialized(port_: i64) {
11    wire_is_initialized_impl(port_)
12}
13
14#[no_mangle]
15pub extern "C" fn wire_sync(port_: i64) {
16    wire_sync_impl(port_)
17}
18
19#[no_mangle]
20pub extern "C" fn wire_node_credentials(port_: i64) {
21    wire_node_credentials_impl(port_)
22}
23
24#[no_mangle]
25pub extern "C" fn wire_node_info(port_: i64) {
26    wire_node_info_impl(port_)
27}
28
29#[no_mangle]
30pub extern "C" fn wire_configure_node(port_: i64, req: *mut wire_ConfigureNodeRequest) {
31    wire_configure_node_impl(port_, req)
32}
33
34#[no_mangle]
35pub extern "C" fn wire_disconnect(port_: i64) {
36    wire_disconnect_impl(port_)
37}
38
39#[no_mangle]
40pub extern "C" fn wire_sign_message(port_: i64, req: *mut wire_SignMessageRequest) {
41    wire_sign_message_impl(port_, req)
42}
43
44#[no_mangle]
45pub extern "C" fn wire_check_message(port_: i64, req: *mut wire_CheckMessageRequest) {
46    wire_check_message_impl(port_, req)
47}
48
49#[no_mangle]
50pub extern "C" fn wire_mnemonic_to_seed(port_: i64, phrase: *mut wire_uint_8_list) {
51    wire_mnemonic_to_seed_impl(port_, phrase)
52}
53
54#[no_mangle]
55pub extern "C" fn wire_default_config(
56    port_: i64,
57    env_type: i32,
58    api_key: *mut wire_uint_8_list,
59    node_config: *mut wire_NodeConfig,
60) {
61    wire_default_config_impl(port_, env_type, api_key, node_config)
62}
63
64#[no_mangle]
65pub extern "C" fn wire_static_backup(port_: i64, req: *mut wire_StaticBackupRequest) {
66    wire_static_backup_impl(port_, req)
67}
68
69#[no_mangle]
70pub extern "C" fn wire_service_health_check(port_: i64, api_key: *mut wire_uint_8_list) {
71    wire_service_health_check_impl(port_, api_key)
72}
73
74#[no_mangle]
75pub extern "C" fn wire_breez_events_stream(port_: i64) {
76    wire_breez_events_stream_impl(port_)
77}
78
79#[no_mangle]
80pub extern "C" fn wire_breez_log_stream(port_: i64) {
81    wire_breez_log_stream_impl(port_)
82}
83
84#[no_mangle]
85pub extern "C" fn wire_list_lsps(port_: i64) {
86    wire_list_lsps_impl(port_)
87}
88
89#[no_mangle]
90pub extern "C" fn wire_connect_lsp(port_: i64, lsp_id: *mut wire_uint_8_list) {
91    wire_connect_lsp_impl(port_, lsp_id)
92}
93
94#[no_mangle]
95pub extern "C" fn wire_lsp_id(port_: i64) {
96    wire_lsp_id_impl(port_)
97}
98
99#[no_mangle]
100pub extern "C" fn wire_fetch_lsp_info(port_: i64, id: *mut wire_uint_8_list) {
101    wire_fetch_lsp_info_impl(port_, id)
102}
103
104#[no_mangle]
105pub extern "C" fn wire_lsp_info(port_: i64) {
106    wire_lsp_info_impl(port_)
107}
108
109#[no_mangle]
110pub extern "C" fn wire_close_lsp_channels(port_: i64) {
111    wire_close_lsp_channels_impl(port_)
112}
113
114#[no_mangle]
115pub extern "C" fn wire_register_webhook(port_: i64, webhook_url: *mut wire_uint_8_list) {
116    wire_register_webhook_impl(port_, webhook_url)
117}
118
119#[no_mangle]
120pub extern "C" fn wire_unregister_webhook(port_: i64, webhook_url: *mut wire_uint_8_list) {
121    wire_unregister_webhook_impl(port_, webhook_url)
122}
123
124#[no_mangle]
125pub extern "C" fn wire_backup(port_: i64) {
126    wire_backup_impl(port_)
127}
128
129#[no_mangle]
130pub extern "C" fn wire_backup_status(port_: i64) {
131    wire_backup_status_impl(port_)
132}
133
134#[no_mangle]
135pub extern "C" fn wire_parse_invoice(port_: i64, invoice: *mut wire_uint_8_list) {
136    wire_parse_invoice_impl(port_, invoice)
137}
138
139#[no_mangle]
140pub extern "C" fn wire_parse_input(port_: i64, input: *mut wire_uint_8_list) {
141    wire_parse_input_impl(port_, input)
142}
143
144#[no_mangle]
145pub extern "C" fn wire_list_payments(port_: i64, req: *mut wire_ListPaymentsRequest) {
146    wire_list_payments_impl(port_, req)
147}
148
149#[no_mangle]
150pub extern "C" fn wire_payment_by_hash(port_: i64, hash: *mut wire_uint_8_list) {
151    wire_payment_by_hash_impl(port_, hash)
152}
153
154#[no_mangle]
155pub extern "C" fn wire_set_payment_metadata(
156    port_: i64,
157    hash: *mut wire_uint_8_list,
158    metadata: *mut wire_uint_8_list,
159) {
160    wire_set_payment_metadata_impl(port_, hash, metadata)
161}
162
163#[no_mangle]
164pub extern "C" fn wire_send_payment(port_: i64, req: *mut wire_SendPaymentRequest) {
165    wire_send_payment_impl(port_, req)
166}
167
168#[no_mangle]
169pub extern "C" fn wire_send_spontaneous_payment(
170    port_: i64,
171    req: *mut wire_SendSpontaneousPaymentRequest,
172) {
173    wire_send_spontaneous_payment_impl(port_, req)
174}
175
176#[no_mangle]
177pub extern "C" fn wire_receive_payment(port_: i64, req: *mut wire_ReceivePaymentRequest) {
178    wire_receive_payment_impl(port_, req)
179}
180
181#[no_mangle]
182pub extern "C" fn wire_lnurl_pay(port_: i64, req: *mut wire_LnUrlPayRequest) {
183    wire_lnurl_pay_impl(port_, req)
184}
185
186#[no_mangle]
187pub extern "C" fn wire_lnurl_withdraw(port_: i64, req: *mut wire_LnUrlWithdrawRequest) {
188    wire_lnurl_withdraw_impl(port_, req)
189}
190
191#[no_mangle]
192pub extern "C" fn wire_lnurl_auth(port_: i64, req_data: *mut wire_LnUrlAuthRequestData) {
193    wire_lnurl_auth_impl(port_, req_data)
194}
195
196#[no_mangle]
197pub extern "C" fn wire_report_issue(port_: i64, req: *mut wire_ReportIssueRequest) {
198    wire_report_issue_impl(port_, req)
199}
200
201#[no_mangle]
202pub extern "C" fn wire_fetch_fiat_rates(port_: i64) {
203    wire_fetch_fiat_rates_impl(port_)
204}
205
206#[no_mangle]
207pub extern "C" fn wire_list_fiat_currencies(port_: i64) {
208    wire_list_fiat_currencies_impl(port_)
209}
210
211#[no_mangle]
212pub extern "C" fn wire_pay_onchain(port_: i64, req: *mut wire_PayOnchainRequest) {
213    wire_pay_onchain_impl(port_, req)
214}
215
216#[no_mangle]
217pub extern "C" fn wire_receive_onchain(port_: i64, req: *mut wire_ReceiveOnchainRequest) {
218    wire_receive_onchain_impl(port_, req)
219}
220
221#[no_mangle]
222pub extern "C" fn wire_buy_bitcoin(port_: i64, req: *mut wire_BuyBitcoinRequest) {
223    wire_buy_bitcoin_impl(port_, req)
224}
225
226#[no_mangle]
227pub extern "C" fn wire_redeem_onchain_funds(port_: i64, req: *mut wire_RedeemOnchainFundsRequest) {
228    wire_redeem_onchain_funds_impl(port_, req)
229}
230
231#[no_mangle]
232pub extern "C" fn wire_prepare_redeem_onchain_funds(
233    port_: i64,
234    req: *mut wire_PrepareRedeemOnchainFundsRequest,
235) {
236    wire_prepare_redeem_onchain_funds_impl(port_, req)
237}
238
239#[no_mangle]
240pub extern "C" fn wire_list_refundables(port_: i64) {
241    wire_list_refundables_impl(port_)
242}
243
244#[no_mangle]
245pub extern "C" fn wire_prepare_refund(port_: i64, req: *mut wire_PrepareRefundRequest) {
246    wire_prepare_refund_impl(port_, req)
247}
248
249#[no_mangle]
250pub extern "C" fn wire_refund(port_: i64, req: *mut wire_RefundRequest) {
251    wire_refund_impl(port_, req)
252}
253
254#[no_mangle]
255pub extern "C" fn wire_rescan_swaps(port_: i64) {
256    wire_rescan_swaps_impl(port_)
257}
258
259#[no_mangle]
260pub extern "C" fn wire_redeem_swap(port_: i64, swap_address: *mut wire_uint_8_list) {
261    wire_redeem_swap_impl(port_, swap_address)
262}
263
264#[no_mangle]
265pub extern "C" fn wire_in_progress_swap(port_: i64) {
266    wire_in_progress_swap_impl(port_)
267}
268
269#[no_mangle]
270pub extern "C" fn wire_list_swaps(port_: i64, req: *mut wire_ListSwapsRequest) {
271    wire_list_swaps_impl(port_, req)
272}
273
274#[no_mangle]
275pub extern "C" fn wire_claim_reverse_swap(port_: i64, lockup_address: *mut wire_uint_8_list) {
276    wire_claim_reverse_swap_impl(port_, lockup_address)
277}
278
279#[no_mangle]
280pub extern "C" fn wire_open_channel_fee(port_: i64, req: *mut wire_OpenChannelFeeRequest) {
281    wire_open_channel_fee_impl(port_, req)
282}
283
284#[no_mangle]
285pub extern "C" fn wire_fetch_reverse_swap_fees(port_: i64, req: *mut wire_ReverseSwapFeesRequest) {
286    wire_fetch_reverse_swap_fees_impl(port_, req)
287}
288
289#[no_mangle]
290pub extern "C" fn wire_onchain_payment_limits(port_: i64) {
291    wire_onchain_payment_limits_impl(port_)
292}
293
294#[no_mangle]
295pub extern "C" fn wire_prepare_onchain_payment(
296    port_: i64,
297    req: *mut wire_PrepareOnchainPaymentRequest,
298) {
299    wire_prepare_onchain_payment_impl(port_, req)
300}
301
302#[no_mangle]
303pub extern "C" fn wire_in_progress_onchain_payments(port_: i64) {
304    wire_in_progress_onchain_payments_impl(port_)
305}
306
307#[no_mangle]
308pub extern "C" fn wire_recommended_fees(port_: i64) {
309    wire_recommended_fees_impl(port_)
310}
311
312#[no_mangle]
313pub extern "C" fn wire_execute_command(port_: i64, command: *mut wire_uint_8_list) {
314    wire_execute_command_impl(port_, command)
315}
316
317#[no_mangle]
318pub extern "C" fn wire_generate_diagnostic_data(port_: i64) {
319    wire_generate_diagnostic_data_impl(port_)
320}
321
322// Section: allocate functions
323
324#[no_mangle]
325pub extern "C" fn new_box_autoadd_bool_0(value: bool) -> *mut bool {
326    support::new_leak_box_ptr(value)
327}
328
329#[no_mangle]
330pub extern "C" fn new_box_autoadd_buy_bitcoin_request_0() -> *mut wire_BuyBitcoinRequest {
331    support::new_leak_box_ptr(wire_BuyBitcoinRequest::new_with_null_ptr())
332}
333
334#[no_mangle]
335pub extern "C" fn new_box_autoadd_check_message_request_0() -> *mut wire_CheckMessageRequest {
336    support::new_leak_box_ptr(wire_CheckMessageRequest::new_with_null_ptr())
337}
338
339#[no_mangle]
340pub extern "C" fn new_box_autoadd_configure_node_request_0() -> *mut wire_ConfigureNodeRequest {
341    support::new_leak_box_ptr(wire_ConfigureNodeRequest::new_with_null_ptr())
342}
343
344#[no_mangle]
345pub extern "C" fn new_box_autoadd_connect_request_0() -> *mut wire_ConnectRequest {
346    support::new_leak_box_ptr(wire_ConnectRequest::new_with_null_ptr())
347}
348
349#[no_mangle]
350pub extern "C" fn new_box_autoadd_greenlight_credentials_0() -> *mut wire_GreenlightCredentials {
351    support::new_leak_box_ptr(wire_GreenlightCredentials::new_with_null_ptr())
352}
353
354#[no_mangle]
355pub extern "C" fn new_box_autoadd_greenlight_node_config_0() -> *mut wire_GreenlightNodeConfig {
356    support::new_leak_box_ptr(wire_GreenlightNodeConfig::new_with_null_ptr())
357}
358
359#[no_mangle]
360pub extern "C" fn new_box_autoadd_i64_0(value: i64) -> *mut i64 {
361    support::new_leak_box_ptr(value)
362}
363
364#[no_mangle]
365pub extern "C" fn new_box_autoadd_list_payments_request_0() -> *mut wire_ListPaymentsRequest {
366    support::new_leak_box_ptr(wire_ListPaymentsRequest::new_with_null_ptr())
367}
368
369#[no_mangle]
370pub extern "C" fn new_box_autoadd_list_swaps_request_0() -> *mut wire_ListSwapsRequest {
371    support::new_leak_box_ptr(wire_ListSwapsRequest::new_with_null_ptr())
372}
373
374#[no_mangle]
375pub extern "C" fn new_box_autoadd_ln_url_auth_request_data_0() -> *mut wire_LnUrlAuthRequestData {
376    support::new_leak_box_ptr(wire_LnUrlAuthRequestData::new_with_null_ptr())
377}
378
379#[no_mangle]
380pub extern "C" fn new_box_autoadd_ln_url_pay_request_0() -> *mut wire_LnUrlPayRequest {
381    support::new_leak_box_ptr(wire_LnUrlPayRequest::new_with_null_ptr())
382}
383
384#[no_mangle]
385pub extern "C" fn new_box_autoadd_ln_url_withdraw_request_0() -> *mut wire_LnUrlWithdrawRequest {
386    support::new_leak_box_ptr(wire_LnUrlWithdrawRequest::new_with_null_ptr())
387}
388
389#[no_mangle]
390pub extern "C" fn new_box_autoadd_node_config_0() -> *mut wire_NodeConfig {
391    support::new_leak_box_ptr(wire_NodeConfig::new_with_null_ptr())
392}
393
394#[no_mangle]
395pub extern "C" fn new_box_autoadd_open_channel_fee_request_0() -> *mut wire_OpenChannelFeeRequest {
396    support::new_leak_box_ptr(wire_OpenChannelFeeRequest::new_with_null_ptr())
397}
398
399#[no_mangle]
400pub extern "C" fn new_box_autoadd_opening_fee_params_0() -> *mut wire_OpeningFeeParams {
401    support::new_leak_box_ptr(wire_OpeningFeeParams::new_with_null_ptr())
402}
403
404#[no_mangle]
405pub extern "C" fn new_box_autoadd_pay_onchain_request_0() -> *mut wire_PayOnchainRequest {
406    support::new_leak_box_ptr(wire_PayOnchainRequest::new_with_null_ptr())
407}
408
409#[no_mangle]
410pub extern "C" fn new_box_autoadd_prepare_onchain_payment_request_0(
411) -> *mut wire_PrepareOnchainPaymentRequest {
412    support::new_leak_box_ptr(wire_PrepareOnchainPaymentRequest::new_with_null_ptr())
413}
414
415#[no_mangle]
416pub extern "C" fn new_box_autoadd_prepare_redeem_onchain_funds_request_0(
417) -> *mut wire_PrepareRedeemOnchainFundsRequest {
418    support::new_leak_box_ptr(wire_PrepareRedeemOnchainFundsRequest::new_with_null_ptr())
419}
420
421#[no_mangle]
422pub extern "C" fn new_box_autoadd_prepare_refund_request_0() -> *mut wire_PrepareRefundRequest {
423    support::new_leak_box_ptr(wire_PrepareRefundRequest::new_with_null_ptr())
424}
425
426#[no_mangle]
427pub extern "C" fn new_box_autoadd_receive_onchain_request_0() -> *mut wire_ReceiveOnchainRequest {
428    support::new_leak_box_ptr(wire_ReceiveOnchainRequest::new_with_null_ptr())
429}
430
431#[no_mangle]
432pub extern "C" fn new_box_autoadd_receive_payment_request_0() -> *mut wire_ReceivePaymentRequest {
433    support::new_leak_box_ptr(wire_ReceivePaymentRequest::new_with_null_ptr())
434}
435
436#[no_mangle]
437pub extern "C" fn new_box_autoadd_redeem_onchain_funds_request_0(
438) -> *mut wire_RedeemOnchainFundsRequest {
439    support::new_leak_box_ptr(wire_RedeemOnchainFundsRequest::new_with_null_ptr())
440}
441
442#[no_mangle]
443pub extern "C" fn new_box_autoadd_refund_request_0() -> *mut wire_RefundRequest {
444    support::new_leak_box_ptr(wire_RefundRequest::new_with_null_ptr())
445}
446
447#[no_mangle]
448pub extern "C" fn new_box_autoadd_report_issue_request_0() -> *mut wire_ReportIssueRequest {
449    support::new_leak_box_ptr(wire_ReportIssueRequest::new_with_null_ptr())
450}
451
452#[no_mangle]
453pub extern "C" fn new_box_autoadd_report_payment_failure_details_0(
454) -> *mut wire_ReportPaymentFailureDetails {
455    support::new_leak_box_ptr(wire_ReportPaymentFailureDetails::new_with_null_ptr())
456}
457
458#[no_mangle]
459pub extern "C" fn new_box_autoadd_reverse_swap_fees_request_0() -> *mut wire_ReverseSwapFeesRequest
460{
461    support::new_leak_box_ptr(wire_ReverseSwapFeesRequest::new_with_null_ptr())
462}
463
464#[no_mangle]
465pub extern "C" fn new_box_autoadd_send_payment_request_0() -> *mut wire_SendPaymentRequest {
466    support::new_leak_box_ptr(wire_SendPaymentRequest::new_with_null_ptr())
467}
468
469#[no_mangle]
470pub extern "C" fn new_box_autoadd_send_spontaneous_payment_request_0(
471) -> *mut wire_SendSpontaneousPaymentRequest {
472    support::new_leak_box_ptr(wire_SendSpontaneousPaymentRequest::new_with_null_ptr())
473}
474
475#[no_mangle]
476pub extern "C" fn new_box_autoadd_sign_message_request_0() -> *mut wire_SignMessageRequest {
477    support::new_leak_box_ptr(wire_SignMessageRequest::new_with_null_ptr())
478}
479
480#[no_mangle]
481pub extern "C" fn new_box_autoadd_static_backup_request_0() -> *mut wire_StaticBackupRequest {
482    support::new_leak_box_ptr(wire_StaticBackupRequest::new_with_null_ptr())
483}
484
485#[no_mangle]
486pub extern "C" fn new_box_autoadd_u32_0(value: u32) -> *mut u32 {
487    support::new_leak_box_ptr(value)
488}
489
490#[no_mangle]
491pub extern "C" fn new_box_autoadd_u64_0(value: u64) -> *mut u64 {
492    support::new_leak_box_ptr(value)
493}
494
495#[no_mangle]
496pub extern "C" fn new_list_metadata_filter_0(len: i32) -> *mut wire_list_metadata_filter {
497    let wrap = wire_list_metadata_filter {
498        ptr: support::new_leak_vec_ptr(<wire_MetadataFilter>::new_with_null_ptr(), len),
499        len,
500    };
501    support::new_leak_box_ptr(wrap)
502}
503
504#[no_mangle]
505pub extern "C" fn new_list_payment_type_filter_0(len: i32) -> *mut wire_list_payment_type_filter {
506    let wrap = wire_list_payment_type_filter {
507        ptr: support::new_leak_vec_ptr(Default::default(), len),
508        len,
509    };
510    support::new_leak_box_ptr(wrap)
511}
512
513#[no_mangle]
514pub extern "C" fn new_list_swap_status_0(len: i32) -> *mut wire_list_swap_status {
515    let wrap = wire_list_swap_status {
516        ptr: support::new_leak_vec_ptr(Default::default(), len),
517        len,
518    };
519    support::new_leak_box_ptr(wrap)
520}
521
522#[no_mangle]
523pub extern "C" fn new_list_tlv_entry_0(len: i32) -> *mut wire_list_tlv_entry {
524    let wrap = wire_list_tlv_entry {
525        ptr: support::new_leak_vec_ptr(<wire_TlvEntry>::new_with_null_ptr(), len),
526        len,
527    };
528    support::new_leak_box_ptr(wrap)
529}
530
531#[no_mangle]
532pub extern "C" fn new_uint_8_list_0(len: i32) -> *mut wire_uint_8_list {
533    let ans = wire_uint_8_list {
534        ptr: support::new_leak_vec_ptr(Default::default(), len),
535        len,
536    };
537    support::new_leak_box_ptr(ans)
538}
539
540// Section: related functions
541
542// Section: impl Wire2Api
543
544impl Wire2Api<String> for *mut wire_uint_8_list {
545    fn wire2api(self) -> String {
546        let vec: Vec<u8> = self.wire2api();
547        String::from_utf8_lossy(&vec).into_owned()
548    }
549}
550
551impl Wire2Api<bool> for *mut bool {
552    fn wire2api(self) -> bool {
553        unsafe { *support::box_from_leak_ptr(self) }
554    }
555}
556impl Wire2Api<BuyBitcoinRequest> for *mut wire_BuyBitcoinRequest {
557    fn wire2api(self) -> BuyBitcoinRequest {
558        let wrap = unsafe { support::box_from_leak_ptr(self) };
559        Wire2Api::<BuyBitcoinRequest>::wire2api(*wrap).into()
560    }
561}
562impl Wire2Api<CheckMessageRequest> for *mut wire_CheckMessageRequest {
563    fn wire2api(self) -> CheckMessageRequest {
564        let wrap = unsafe { support::box_from_leak_ptr(self) };
565        Wire2Api::<CheckMessageRequest>::wire2api(*wrap).into()
566    }
567}
568impl Wire2Api<ConfigureNodeRequest> for *mut wire_ConfigureNodeRequest {
569    fn wire2api(self) -> ConfigureNodeRequest {
570        let wrap = unsafe { support::box_from_leak_ptr(self) };
571        Wire2Api::<ConfigureNodeRequest>::wire2api(*wrap).into()
572    }
573}
574impl Wire2Api<ConnectRequest> for *mut wire_ConnectRequest {
575    fn wire2api(self) -> ConnectRequest {
576        let wrap = unsafe { support::box_from_leak_ptr(self) };
577        Wire2Api::<ConnectRequest>::wire2api(*wrap).into()
578    }
579}
580impl Wire2Api<GreenlightCredentials> for *mut wire_GreenlightCredentials {
581    fn wire2api(self) -> GreenlightCredentials {
582        let wrap = unsafe { support::box_from_leak_ptr(self) };
583        Wire2Api::<GreenlightCredentials>::wire2api(*wrap).into()
584    }
585}
586impl Wire2Api<GreenlightNodeConfig> for *mut wire_GreenlightNodeConfig {
587    fn wire2api(self) -> GreenlightNodeConfig {
588        let wrap = unsafe { support::box_from_leak_ptr(self) };
589        Wire2Api::<GreenlightNodeConfig>::wire2api(*wrap).into()
590    }
591}
592impl Wire2Api<i64> for *mut i64 {
593    fn wire2api(self) -> i64 {
594        unsafe { *support::box_from_leak_ptr(self) }
595    }
596}
597impl Wire2Api<ListPaymentsRequest> for *mut wire_ListPaymentsRequest {
598    fn wire2api(self) -> ListPaymentsRequest {
599        let wrap = unsafe { support::box_from_leak_ptr(self) };
600        Wire2Api::<ListPaymentsRequest>::wire2api(*wrap).into()
601    }
602}
603impl Wire2Api<ListSwapsRequest> for *mut wire_ListSwapsRequest {
604    fn wire2api(self) -> ListSwapsRequest {
605        let wrap = unsafe { support::box_from_leak_ptr(self) };
606        Wire2Api::<ListSwapsRequest>::wire2api(*wrap).into()
607    }
608}
609impl Wire2Api<LnUrlAuthRequestData> for *mut wire_LnUrlAuthRequestData {
610    fn wire2api(self) -> LnUrlAuthRequestData {
611        let wrap = unsafe { support::box_from_leak_ptr(self) };
612        Wire2Api::<LnUrlAuthRequestData>::wire2api(*wrap).into()
613    }
614}
615impl Wire2Api<LnUrlPayRequest> for *mut wire_LnUrlPayRequest {
616    fn wire2api(self) -> LnUrlPayRequest {
617        let wrap = unsafe { support::box_from_leak_ptr(self) };
618        Wire2Api::<LnUrlPayRequest>::wire2api(*wrap).into()
619    }
620}
621impl Wire2Api<LnUrlWithdrawRequest> for *mut wire_LnUrlWithdrawRequest {
622    fn wire2api(self) -> LnUrlWithdrawRequest {
623        let wrap = unsafe { support::box_from_leak_ptr(self) };
624        Wire2Api::<LnUrlWithdrawRequest>::wire2api(*wrap).into()
625    }
626}
627impl Wire2Api<NodeConfig> for *mut wire_NodeConfig {
628    fn wire2api(self) -> NodeConfig {
629        let wrap = unsafe { support::box_from_leak_ptr(self) };
630        Wire2Api::<NodeConfig>::wire2api(*wrap).into()
631    }
632}
633impl Wire2Api<OpenChannelFeeRequest> for *mut wire_OpenChannelFeeRequest {
634    fn wire2api(self) -> OpenChannelFeeRequest {
635        let wrap = unsafe { support::box_from_leak_ptr(self) };
636        Wire2Api::<OpenChannelFeeRequest>::wire2api(*wrap).into()
637    }
638}
639impl Wire2Api<OpeningFeeParams> for *mut wire_OpeningFeeParams {
640    fn wire2api(self) -> OpeningFeeParams {
641        let wrap = unsafe { support::box_from_leak_ptr(self) };
642        Wire2Api::<OpeningFeeParams>::wire2api(*wrap).into()
643    }
644}
645impl Wire2Api<PayOnchainRequest> for *mut wire_PayOnchainRequest {
646    fn wire2api(self) -> PayOnchainRequest {
647        let wrap = unsafe { support::box_from_leak_ptr(self) };
648        Wire2Api::<PayOnchainRequest>::wire2api(*wrap).into()
649    }
650}
651impl Wire2Api<PrepareOnchainPaymentRequest> for *mut wire_PrepareOnchainPaymentRequest {
652    fn wire2api(self) -> PrepareOnchainPaymentRequest {
653        let wrap = unsafe { support::box_from_leak_ptr(self) };
654        Wire2Api::<PrepareOnchainPaymentRequest>::wire2api(*wrap).into()
655    }
656}
657impl Wire2Api<PrepareRedeemOnchainFundsRequest> for *mut wire_PrepareRedeemOnchainFundsRequest {
658    fn wire2api(self) -> PrepareRedeemOnchainFundsRequest {
659        let wrap = unsafe { support::box_from_leak_ptr(self) };
660        Wire2Api::<PrepareRedeemOnchainFundsRequest>::wire2api(*wrap).into()
661    }
662}
663impl Wire2Api<PrepareRefundRequest> for *mut wire_PrepareRefundRequest {
664    fn wire2api(self) -> PrepareRefundRequest {
665        let wrap = unsafe { support::box_from_leak_ptr(self) };
666        Wire2Api::<PrepareRefundRequest>::wire2api(*wrap).into()
667    }
668}
669impl Wire2Api<ReceiveOnchainRequest> for *mut wire_ReceiveOnchainRequest {
670    fn wire2api(self) -> ReceiveOnchainRequest {
671        let wrap = unsafe { support::box_from_leak_ptr(self) };
672        Wire2Api::<ReceiveOnchainRequest>::wire2api(*wrap).into()
673    }
674}
675impl Wire2Api<ReceivePaymentRequest> for *mut wire_ReceivePaymentRequest {
676    fn wire2api(self) -> ReceivePaymentRequest {
677        let wrap = unsafe { support::box_from_leak_ptr(self) };
678        Wire2Api::<ReceivePaymentRequest>::wire2api(*wrap).into()
679    }
680}
681impl Wire2Api<RedeemOnchainFundsRequest> for *mut wire_RedeemOnchainFundsRequest {
682    fn wire2api(self) -> RedeemOnchainFundsRequest {
683        let wrap = unsafe { support::box_from_leak_ptr(self) };
684        Wire2Api::<RedeemOnchainFundsRequest>::wire2api(*wrap).into()
685    }
686}
687impl Wire2Api<RefundRequest> for *mut wire_RefundRequest {
688    fn wire2api(self) -> RefundRequest {
689        let wrap = unsafe { support::box_from_leak_ptr(self) };
690        Wire2Api::<RefundRequest>::wire2api(*wrap).into()
691    }
692}
693impl Wire2Api<ReportIssueRequest> for *mut wire_ReportIssueRequest {
694    fn wire2api(self) -> ReportIssueRequest {
695        let wrap = unsafe { support::box_from_leak_ptr(self) };
696        Wire2Api::<ReportIssueRequest>::wire2api(*wrap).into()
697    }
698}
699impl Wire2Api<ReportPaymentFailureDetails> for *mut wire_ReportPaymentFailureDetails {
700    fn wire2api(self) -> ReportPaymentFailureDetails {
701        let wrap = unsafe { support::box_from_leak_ptr(self) };
702        Wire2Api::<ReportPaymentFailureDetails>::wire2api(*wrap).into()
703    }
704}
705impl Wire2Api<ReverseSwapFeesRequest> for *mut wire_ReverseSwapFeesRequest {
706    fn wire2api(self) -> ReverseSwapFeesRequest {
707        let wrap = unsafe { support::box_from_leak_ptr(self) };
708        Wire2Api::<ReverseSwapFeesRequest>::wire2api(*wrap).into()
709    }
710}
711impl Wire2Api<SendPaymentRequest> for *mut wire_SendPaymentRequest {
712    fn wire2api(self) -> SendPaymentRequest {
713        let wrap = unsafe { support::box_from_leak_ptr(self) };
714        Wire2Api::<SendPaymentRequest>::wire2api(*wrap).into()
715    }
716}
717impl Wire2Api<SendSpontaneousPaymentRequest> for *mut wire_SendSpontaneousPaymentRequest {
718    fn wire2api(self) -> SendSpontaneousPaymentRequest {
719        let wrap = unsafe { support::box_from_leak_ptr(self) };
720        Wire2Api::<SendSpontaneousPaymentRequest>::wire2api(*wrap).into()
721    }
722}
723impl Wire2Api<SignMessageRequest> for *mut wire_SignMessageRequest {
724    fn wire2api(self) -> SignMessageRequest {
725        let wrap = unsafe { support::box_from_leak_ptr(self) };
726        Wire2Api::<SignMessageRequest>::wire2api(*wrap).into()
727    }
728}
729impl Wire2Api<StaticBackupRequest> for *mut wire_StaticBackupRequest {
730    fn wire2api(self) -> StaticBackupRequest {
731        let wrap = unsafe { support::box_from_leak_ptr(self) };
732        Wire2Api::<StaticBackupRequest>::wire2api(*wrap).into()
733    }
734}
735impl Wire2Api<u32> for *mut u32 {
736    fn wire2api(self) -> u32 {
737        unsafe { *support::box_from_leak_ptr(self) }
738    }
739}
740impl Wire2Api<u64> for *mut u64 {
741    fn wire2api(self) -> u64 {
742        unsafe { *support::box_from_leak_ptr(self) }
743    }
744}
745
746impl Wire2Api<BuyBitcoinRequest> for wire_BuyBitcoinRequest {
747    fn wire2api(self) -> BuyBitcoinRequest {
748        BuyBitcoinRequest {
749            provider: self.provider.wire2api(),
750            opening_fee_params: self.opening_fee_params.wire2api(),
751            redirect_url: self.redirect_url.wire2api(),
752        }
753    }
754}
755impl Wire2Api<CheckMessageRequest> for wire_CheckMessageRequest {
756    fn wire2api(self) -> CheckMessageRequest {
757        CheckMessageRequest {
758            message: self.message.wire2api(),
759            pubkey: self.pubkey.wire2api(),
760            signature: self.signature.wire2api(),
761        }
762    }
763}
764impl Wire2Api<Config> for wire_Config {
765    fn wire2api(self) -> Config {
766        Config {
767            breezserver: self.breezserver.wire2api(),
768            chainnotifier_url: self.chainnotifier_url.wire2api(),
769            mempoolspace_url: self.mempoolspace_url.wire2api(),
770            working_dir: self.working_dir.wire2api(),
771            network: self.network.wire2api(),
772            payment_timeout_sec: self.payment_timeout_sec.wire2api(),
773            default_lsp_id: self.default_lsp_id.wire2api(),
774            api_key: self.api_key.wire2api(),
775            maxfee_percent: self.maxfee_percent.wire2api(),
776            exemptfee_msat: self.exemptfee_msat.wire2api(),
777            node_config: self.node_config.wire2api(),
778        }
779    }
780}
781impl Wire2Api<ConfigureNodeRequest> for wire_ConfigureNodeRequest {
782    fn wire2api(self) -> ConfigureNodeRequest {
783        ConfigureNodeRequest {
784            close_to_address: self.close_to_address.wire2api(),
785        }
786    }
787}
788impl Wire2Api<ConnectRequest> for wire_ConnectRequest {
789    fn wire2api(self) -> ConnectRequest {
790        ConnectRequest {
791            config: self.config.wire2api(),
792            seed: self.seed.wire2api(),
793            restore_only: self.restore_only.wire2api(),
794        }
795    }
796}
797
798impl Wire2Api<GreenlightCredentials> for wire_GreenlightCredentials {
799    fn wire2api(self) -> GreenlightCredentials {
800        GreenlightCredentials {
801            developer_key: self.developer_key.wire2api(),
802            developer_cert: self.developer_cert.wire2api(),
803        }
804    }
805}
806impl Wire2Api<GreenlightNodeConfig> for wire_GreenlightNodeConfig {
807    fn wire2api(self) -> GreenlightNodeConfig {
808        GreenlightNodeConfig {
809            partner_credentials: self.partner_credentials.wire2api(),
810            invite_code: self.invite_code.wire2api(),
811        }
812    }
813}
814
815impl Wire2Api<Vec<MetadataFilter>> for *mut wire_list_metadata_filter {
816    fn wire2api(self) -> Vec<MetadataFilter> {
817        let vec = unsafe {
818            let wrap = support::box_from_leak_ptr(self);
819            support::vec_from_leak_ptr(wrap.ptr, wrap.len)
820        };
821        vec.into_iter().map(Wire2Api::wire2api).collect()
822    }
823}
824impl Wire2Api<Vec<PaymentTypeFilter>> for *mut wire_list_payment_type_filter {
825    fn wire2api(self) -> Vec<PaymentTypeFilter> {
826        let vec = unsafe {
827            let wrap = support::box_from_leak_ptr(self);
828            support::vec_from_leak_ptr(wrap.ptr, wrap.len)
829        };
830        vec.into_iter().map(Wire2Api::wire2api).collect()
831    }
832}
833impl Wire2Api<ListPaymentsRequest> for wire_ListPaymentsRequest {
834    fn wire2api(self) -> ListPaymentsRequest {
835        ListPaymentsRequest {
836            filters: self.filters.wire2api(),
837            metadata_filters: self.metadata_filters.wire2api(),
838            from_timestamp: self.from_timestamp.wire2api(),
839            to_timestamp: self.to_timestamp.wire2api(),
840            include_failures: self.include_failures.wire2api(),
841            offset: self.offset.wire2api(),
842            limit: self.limit.wire2api(),
843        }
844    }
845}
846impl Wire2Api<Vec<SwapStatus>> for *mut wire_list_swap_status {
847    fn wire2api(self) -> Vec<SwapStatus> {
848        let vec = unsafe {
849            let wrap = support::box_from_leak_ptr(self);
850            support::vec_from_leak_ptr(wrap.ptr, wrap.len)
851        };
852        vec.into_iter().map(Wire2Api::wire2api).collect()
853    }
854}
855impl Wire2Api<ListSwapsRequest> for wire_ListSwapsRequest {
856    fn wire2api(self) -> ListSwapsRequest {
857        ListSwapsRequest {
858            status: self.status.wire2api(),
859            from_timestamp: self.from_timestamp.wire2api(),
860            to_timestamp: self.to_timestamp.wire2api(),
861            offset: self.offset.wire2api(),
862            limit: self.limit.wire2api(),
863        }
864    }
865}
866impl Wire2Api<Vec<TlvEntry>> for *mut wire_list_tlv_entry {
867    fn wire2api(self) -> Vec<TlvEntry> {
868        let vec = unsafe {
869            let wrap = support::box_from_leak_ptr(self);
870            support::vec_from_leak_ptr(wrap.ptr, wrap.len)
871        };
872        vec.into_iter().map(Wire2Api::wire2api).collect()
873    }
874}
875impl Wire2Api<LnUrlAuthRequestData> for wire_LnUrlAuthRequestData {
876    fn wire2api(self) -> LnUrlAuthRequestData {
877        LnUrlAuthRequestData {
878            k1: self.k1.wire2api(),
879            action: self.action.wire2api(),
880            domain: self.domain.wire2api(),
881            url: self.url.wire2api(),
882        }
883    }
884}
885impl Wire2Api<LnUrlPayRequest> for wire_LnUrlPayRequest {
886    fn wire2api(self) -> LnUrlPayRequest {
887        LnUrlPayRequest {
888            data: self.data.wire2api(),
889            amount_msat: self.amount_msat.wire2api(),
890            use_trampoline: self.use_trampoline.wire2api(),
891            comment: self.comment.wire2api(),
892            payment_label: self.payment_label.wire2api(),
893            validate_success_action_url: self.validate_success_action_url.wire2api(),
894        }
895    }
896}
897impl Wire2Api<LnUrlPayRequestData> for wire_LnUrlPayRequestData {
898    fn wire2api(self) -> LnUrlPayRequestData {
899        LnUrlPayRequestData {
900            callback: self.callback.wire2api(),
901            min_sendable: self.min_sendable.wire2api(),
902            max_sendable: self.max_sendable.wire2api(),
903            metadata_str: self.metadata_str.wire2api(),
904            comment_allowed: self.comment_allowed.wire2api(),
905            domain: self.domain.wire2api(),
906            allows_nostr: self.allows_nostr.wire2api(),
907            nostr_pubkey: self.nostr_pubkey.wire2api(),
908            ln_address: self.ln_address.wire2api(),
909        }
910    }
911}
912impl Wire2Api<LnUrlWithdrawRequest> for wire_LnUrlWithdrawRequest {
913    fn wire2api(self) -> LnUrlWithdrawRequest {
914        LnUrlWithdrawRequest {
915            data: self.data.wire2api(),
916            amount_msat: self.amount_msat.wire2api(),
917            description: self.description.wire2api(),
918        }
919    }
920}
921impl Wire2Api<LnUrlWithdrawRequestData> for wire_LnUrlWithdrawRequestData {
922    fn wire2api(self) -> LnUrlWithdrawRequestData {
923        LnUrlWithdrawRequestData {
924            callback: self.callback.wire2api(),
925            k1: self.k1.wire2api(),
926            default_description: self.default_description.wire2api(),
927            min_withdrawable: self.min_withdrawable.wire2api(),
928            max_withdrawable: self.max_withdrawable.wire2api(),
929        }
930    }
931}
932impl Wire2Api<MetadataFilter> for wire_MetadataFilter {
933    fn wire2api(self) -> MetadataFilter {
934        MetadataFilter {
935            json_path: self.json_path.wire2api(),
936            json_value: self.json_value.wire2api(),
937        }
938    }
939}
940
941impl Wire2Api<NodeConfig> for wire_NodeConfig {
942    fn wire2api(self) -> NodeConfig {
943        match self.tag {
944            0 => unsafe {
945                let ans = support::box_from_leak_ptr(self.kind);
946                let ans = support::box_from_leak_ptr(ans.Greenlight);
947                NodeConfig::Greenlight {
948                    config: ans.config.wire2api(),
949                }
950            },
951            _ => unreachable!(),
952        }
953    }
954}
955impl Wire2Api<OpenChannelFeeRequest> for wire_OpenChannelFeeRequest {
956    fn wire2api(self) -> OpenChannelFeeRequest {
957        OpenChannelFeeRequest {
958            amount_msat: self.amount_msat.wire2api(),
959            expiry: self.expiry.wire2api(),
960        }
961    }
962}
963impl Wire2Api<OpeningFeeParams> for wire_OpeningFeeParams {
964    fn wire2api(self) -> OpeningFeeParams {
965        OpeningFeeParams {
966            min_msat: self.min_msat.wire2api(),
967            proportional: self.proportional.wire2api(),
968            valid_until: self.valid_until.wire2api(),
969            max_idle_time: self.max_idle_time.wire2api(),
970            max_client_to_self_delay: self.max_client_to_self_delay.wire2api(),
971            promise: self.promise.wire2api(),
972        }
973    }
974}
975
976impl Wire2Api<PayOnchainRequest> for wire_PayOnchainRequest {
977    fn wire2api(self) -> PayOnchainRequest {
978        PayOnchainRequest {
979            recipient_address: self.recipient_address.wire2api(),
980            prepare_res: self.prepare_res.wire2api(),
981        }
982    }
983}
984
985impl Wire2Api<PrepareOnchainPaymentRequest> for wire_PrepareOnchainPaymentRequest {
986    fn wire2api(self) -> PrepareOnchainPaymentRequest {
987        PrepareOnchainPaymentRequest {
988            amount_sat: self.amount_sat.wire2api(),
989            amount_type: self.amount_type.wire2api(),
990            claim_tx_feerate: self.claim_tx_feerate.wire2api(),
991        }
992    }
993}
994impl Wire2Api<PrepareOnchainPaymentResponse> for wire_PrepareOnchainPaymentResponse {
995    fn wire2api(self) -> PrepareOnchainPaymentResponse {
996        PrepareOnchainPaymentResponse {
997            fees_hash: self.fees_hash.wire2api(),
998            fees_percentage: self.fees_percentage.wire2api(),
999            fees_lockup: self.fees_lockup.wire2api(),
1000            fees_claim: self.fees_claim.wire2api(),
1001            sender_amount_sat: self.sender_amount_sat.wire2api(),
1002            recipient_amount_sat: self.recipient_amount_sat.wire2api(),
1003            total_fees: self.total_fees.wire2api(),
1004        }
1005    }
1006}
1007impl Wire2Api<PrepareRedeemOnchainFundsRequest> for wire_PrepareRedeemOnchainFundsRequest {
1008    fn wire2api(self) -> PrepareRedeemOnchainFundsRequest {
1009        PrepareRedeemOnchainFundsRequest {
1010            to_address: self.to_address.wire2api(),
1011            sat_per_vbyte: self.sat_per_vbyte.wire2api(),
1012        }
1013    }
1014}
1015impl Wire2Api<PrepareRefundRequest> for wire_PrepareRefundRequest {
1016    fn wire2api(self) -> PrepareRefundRequest {
1017        PrepareRefundRequest {
1018            swap_address: self.swap_address.wire2api(),
1019            to_address: self.to_address.wire2api(),
1020            sat_per_vbyte: self.sat_per_vbyte.wire2api(),
1021        }
1022    }
1023}
1024impl Wire2Api<ReceiveOnchainRequest> for wire_ReceiveOnchainRequest {
1025    fn wire2api(self) -> ReceiveOnchainRequest {
1026        ReceiveOnchainRequest {
1027            opening_fee_params: self.opening_fee_params.wire2api(),
1028        }
1029    }
1030}
1031impl Wire2Api<ReceivePaymentRequest> for wire_ReceivePaymentRequest {
1032    fn wire2api(self) -> ReceivePaymentRequest {
1033        ReceivePaymentRequest {
1034            amount_msat: self.amount_msat.wire2api(),
1035            description: self.description.wire2api(),
1036            preimage: self.preimage.wire2api(),
1037            opening_fee_params: self.opening_fee_params.wire2api(),
1038            use_description_hash: self.use_description_hash.wire2api(),
1039            expiry: self.expiry.wire2api(),
1040            cltv: self.cltv.wire2api(),
1041        }
1042    }
1043}
1044impl Wire2Api<RedeemOnchainFundsRequest> for wire_RedeemOnchainFundsRequest {
1045    fn wire2api(self) -> RedeemOnchainFundsRequest {
1046        RedeemOnchainFundsRequest {
1047            to_address: self.to_address.wire2api(),
1048            sat_per_vbyte: self.sat_per_vbyte.wire2api(),
1049        }
1050    }
1051}
1052impl Wire2Api<RefundRequest> for wire_RefundRequest {
1053    fn wire2api(self) -> RefundRequest {
1054        RefundRequest {
1055            swap_address: self.swap_address.wire2api(),
1056            to_address: self.to_address.wire2api(),
1057            sat_per_vbyte: self.sat_per_vbyte.wire2api(),
1058        }
1059    }
1060}
1061impl Wire2Api<ReportIssueRequest> for wire_ReportIssueRequest {
1062    fn wire2api(self) -> ReportIssueRequest {
1063        match self.tag {
1064            0 => unsafe {
1065                let ans = support::box_from_leak_ptr(self.kind);
1066                let ans = support::box_from_leak_ptr(ans.PaymentFailure);
1067                ReportIssueRequest::PaymentFailure {
1068                    data: ans.data.wire2api(),
1069                }
1070            },
1071            _ => unreachable!(),
1072        }
1073    }
1074}
1075impl Wire2Api<ReportPaymentFailureDetails> for wire_ReportPaymentFailureDetails {
1076    fn wire2api(self) -> ReportPaymentFailureDetails {
1077        ReportPaymentFailureDetails {
1078            payment_hash: self.payment_hash.wire2api(),
1079            comment: self.comment.wire2api(),
1080        }
1081    }
1082}
1083impl Wire2Api<ReverseSwapFeesRequest> for wire_ReverseSwapFeesRequest {
1084    fn wire2api(self) -> ReverseSwapFeesRequest {
1085        ReverseSwapFeesRequest {
1086            send_amount_sat: self.send_amount_sat.wire2api(),
1087            claim_tx_feerate: self.claim_tx_feerate.wire2api(),
1088        }
1089    }
1090}
1091impl Wire2Api<SendPaymentRequest> for wire_SendPaymentRequest {
1092    fn wire2api(self) -> SendPaymentRequest {
1093        SendPaymentRequest {
1094            bolt11: self.bolt11.wire2api(),
1095            use_trampoline: self.use_trampoline.wire2api(),
1096            amount_msat: self.amount_msat.wire2api(),
1097            label: self.label.wire2api(),
1098        }
1099    }
1100}
1101impl Wire2Api<SendSpontaneousPaymentRequest> for wire_SendSpontaneousPaymentRequest {
1102    fn wire2api(self) -> SendSpontaneousPaymentRequest {
1103        SendSpontaneousPaymentRequest {
1104            node_id: self.node_id.wire2api(),
1105            amount_msat: self.amount_msat.wire2api(),
1106            extra_tlvs: self.extra_tlvs.wire2api(),
1107            label: self.label.wire2api(),
1108        }
1109    }
1110}
1111impl Wire2Api<SignMessageRequest> for wire_SignMessageRequest {
1112    fn wire2api(self) -> SignMessageRequest {
1113        SignMessageRequest {
1114            message: self.message.wire2api(),
1115        }
1116    }
1117}
1118impl Wire2Api<StaticBackupRequest> for wire_StaticBackupRequest {
1119    fn wire2api(self) -> StaticBackupRequest {
1120        StaticBackupRequest {
1121            working_dir: self.working_dir.wire2api(),
1122        }
1123    }
1124}
1125
1126impl Wire2Api<TlvEntry> for wire_TlvEntry {
1127    fn wire2api(self) -> TlvEntry {
1128        TlvEntry {
1129            field_number: self.field_number.wire2api(),
1130            value: self.value.wire2api(),
1131        }
1132    }
1133}
1134
1135impl Wire2Api<Vec<u8>> for *mut wire_uint_8_list {
1136    fn wire2api(self) -> Vec<u8> {
1137        unsafe {
1138            let wrap = support::box_from_leak_ptr(self);
1139            support::vec_from_leak_ptr(wrap.ptr, wrap.len)
1140        }
1141    }
1142}
1143// Section: wire structs
1144
1145#[repr(C)]
1146#[derive(Clone)]
1147pub struct wire_BuyBitcoinRequest {
1148    provider: i32,
1149    opening_fee_params: *mut wire_OpeningFeeParams,
1150    redirect_url: *mut wire_uint_8_list,
1151}
1152
1153#[repr(C)]
1154#[derive(Clone)]
1155pub struct wire_CheckMessageRequest {
1156    message: *mut wire_uint_8_list,
1157    pubkey: *mut wire_uint_8_list,
1158    signature: *mut wire_uint_8_list,
1159}
1160
1161#[repr(C)]
1162#[derive(Clone)]
1163pub struct wire_Config {
1164    breezserver: *mut wire_uint_8_list,
1165    chainnotifier_url: *mut wire_uint_8_list,
1166    mempoolspace_url: *mut wire_uint_8_list,
1167    working_dir: *mut wire_uint_8_list,
1168    network: i32,
1169    payment_timeout_sec: u32,
1170    default_lsp_id: *mut wire_uint_8_list,
1171    api_key: *mut wire_uint_8_list,
1172    maxfee_percent: f64,
1173    exemptfee_msat: u64,
1174    node_config: wire_NodeConfig,
1175}
1176
1177#[repr(C)]
1178#[derive(Clone)]
1179pub struct wire_ConfigureNodeRequest {
1180    close_to_address: *mut wire_uint_8_list,
1181}
1182
1183#[repr(C)]
1184#[derive(Clone)]
1185pub struct wire_ConnectRequest {
1186    config: wire_Config,
1187    seed: *mut wire_uint_8_list,
1188    restore_only: *mut bool,
1189}
1190
1191#[repr(C)]
1192#[derive(Clone)]
1193pub struct wire_GreenlightCredentials {
1194    developer_key: *mut wire_uint_8_list,
1195    developer_cert: *mut wire_uint_8_list,
1196}
1197
1198#[repr(C)]
1199#[derive(Clone)]
1200pub struct wire_GreenlightNodeConfig {
1201    partner_credentials: *mut wire_GreenlightCredentials,
1202    invite_code: *mut wire_uint_8_list,
1203}
1204
1205#[repr(C)]
1206#[derive(Clone)]
1207pub struct wire_list_metadata_filter {
1208    ptr: *mut wire_MetadataFilter,
1209    len: i32,
1210}
1211
1212#[repr(C)]
1213#[derive(Clone)]
1214pub struct wire_list_payment_type_filter {
1215    ptr: *mut i32,
1216    len: i32,
1217}
1218
1219#[repr(C)]
1220#[derive(Clone)]
1221pub struct wire_ListPaymentsRequest {
1222    filters: *mut wire_list_payment_type_filter,
1223    metadata_filters: *mut wire_list_metadata_filter,
1224    from_timestamp: *mut i64,
1225    to_timestamp: *mut i64,
1226    include_failures: *mut bool,
1227    offset: *mut u32,
1228    limit: *mut u32,
1229}
1230
1231#[repr(C)]
1232#[derive(Clone)]
1233pub struct wire_list_swap_status {
1234    ptr: *mut i32,
1235    len: i32,
1236}
1237
1238#[repr(C)]
1239#[derive(Clone)]
1240pub struct wire_ListSwapsRequest {
1241    status: *mut wire_list_swap_status,
1242    from_timestamp: *mut i64,
1243    to_timestamp: *mut i64,
1244    offset: *mut u32,
1245    limit: *mut u32,
1246}
1247
1248#[repr(C)]
1249#[derive(Clone)]
1250pub struct wire_list_tlv_entry {
1251    ptr: *mut wire_TlvEntry,
1252    len: i32,
1253}
1254
1255#[repr(C)]
1256#[derive(Clone)]
1257pub struct wire_LnUrlAuthRequestData {
1258    k1: *mut wire_uint_8_list,
1259    action: *mut wire_uint_8_list,
1260    domain: *mut wire_uint_8_list,
1261    url: *mut wire_uint_8_list,
1262}
1263
1264#[repr(C)]
1265#[derive(Clone)]
1266pub struct wire_LnUrlPayRequest {
1267    data: wire_LnUrlPayRequestData,
1268    amount_msat: u64,
1269    use_trampoline: bool,
1270    comment: *mut wire_uint_8_list,
1271    payment_label: *mut wire_uint_8_list,
1272    validate_success_action_url: *mut bool,
1273}
1274
1275#[repr(C)]
1276#[derive(Clone)]
1277pub struct wire_LnUrlPayRequestData {
1278    callback: *mut wire_uint_8_list,
1279    min_sendable: u64,
1280    max_sendable: u64,
1281    metadata_str: *mut wire_uint_8_list,
1282    comment_allowed: u16,
1283    domain: *mut wire_uint_8_list,
1284    allows_nostr: bool,
1285    nostr_pubkey: *mut wire_uint_8_list,
1286    ln_address: *mut wire_uint_8_list,
1287}
1288
1289#[repr(C)]
1290#[derive(Clone)]
1291pub struct wire_LnUrlWithdrawRequest {
1292    data: wire_LnUrlWithdrawRequestData,
1293    amount_msat: u64,
1294    description: *mut wire_uint_8_list,
1295}
1296
1297#[repr(C)]
1298#[derive(Clone)]
1299pub struct wire_LnUrlWithdrawRequestData {
1300    callback: *mut wire_uint_8_list,
1301    k1: *mut wire_uint_8_list,
1302    default_description: *mut wire_uint_8_list,
1303    min_withdrawable: u64,
1304    max_withdrawable: u64,
1305}
1306
1307#[repr(C)]
1308#[derive(Clone)]
1309pub struct wire_MetadataFilter {
1310    json_path: *mut wire_uint_8_list,
1311    json_value: *mut wire_uint_8_list,
1312}
1313
1314#[repr(C)]
1315#[derive(Clone)]
1316pub struct wire_OpenChannelFeeRequest {
1317    amount_msat: *mut u64,
1318    expiry: *mut u32,
1319}
1320
1321#[repr(C)]
1322#[derive(Clone)]
1323pub struct wire_OpeningFeeParams {
1324    min_msat: u64,
1325    proportional: u32,
1326    valid_until: *mut wire_uint_8_list,
1327    max_idle_time: u32,
1328    max_client_to_self_delay: u32,
1329    promise: *mut wire_uint_8_list,
1330}
1331
1332#[repr(C)]
1333#[derive(Clone)]
1334pub struct wire_PayOnchainRequest {
1335    recipient_address: *mut wire_uint_8_list,
1336    prepare_res: wire_PrepareOnchainPaymentResponse,
1337}
1338
1339#[repr(C)]
1340#[derive(Clone)]
1341pub struct wire_PrepareOnchainPaymentRequest {
1342    amount_sat: u64,
1343    amount_type: i32,
1344    claim_tx_feerate: u32,
1345}
1346
1347#[repr(C)]
1348#[derive(Clone)]
1349pub struct wire_PrepareOnchainPaymentResponse {
1350    fees_hash: *mut wire_uint_8_list,
1351    fees_percentage: f64,
1352    fees_lockup: u64,
1353    fees_claim: u64,
1354    sender_amount_sat: u64,
1355    recipient_amount_sat: u64,
1356    total_fees: u64,
1357}
1358
1359#[repr(C)]
1360#[derive(Clone)]
1361pub struct wire_PrepareRedeemOnchainFundsRequest {
1362    to_address: *mut wire_uint_8_list,
1363    sat_per_vbyte: u32,
1364}
1365
1366#[repr(C)]
1367#[derive(Clone)]
1368pub struct wire_PrepareRefundRequest {
1369    swap_address: *mut wire_uint_8_list,
1370    to_address: *mut wire_uint_8_list,
1371    sat_per_vbyte: u32,
1372}
1373
1374#[repr(C)]
1375#[derive(Clone)]
1376pub struct wire_ReceiveOnchainRequest {
1377    opening_fee_params: *mut wire_OpeningFeeParams,
1378}
1379
1380#[repr(C)]
1381#[derive(Clone)]
1382pub struct wire_ReceivePaymentRequest {
1383    amount_msat: u64,
1384    description: *mut wire_uint_8_list,
1385    preimage: *mut wire_uint_8_list,
1386    opening_fee_params: *mut wire_OpeningFeeParams,
1387    use_description_hash: *mut bool,
1388    expiry: *mut u32,
1389    cltv: *mut u32,
1390}
1391
1392#[repr(C)]
1393#[derive(Clone)]
1394pub struct wire_RedeemOnchainFundsRequest {
1395    to_address: *mut wire_uint_8_list,
1396    sat_per_vbyte: u32,
1397}
1398
1399#[repr(C)]
1400#[derive(Clone)]
1401pub struct wire_RefundRequest {
1402    swap_address: *mut wire_uint_8_list,
1403    to_address: *mut wire_uint_8_list,
1404    sat_per_vbyte: u32,
1405}
1406
1407#[repr(C)]
1408#[derive(Clone)]
1409pub struct wire_ReportPaymentFailureDetails {
1410    payment_hash: *mut wire_uint_8_list,
1411    comment: *mut wire_uint_8_list,
1412}
1413
1414#[repr(C)]
1415#[derive(Clone)]
1416pub struct wire_ReverseSwapFeesRequest {
1417    send_amount_sat: *mut u64,
1418    claim_tx_feerate: *mut u32,
1419}
1420
1421#[repr(C)]
1422#[derive(Clone)]
1423pub struct wire_SendPaymentRequest {
1424    bolt11: *mut wire_uint_8_list,
1425    use_trampoline: bool,
1426    amount_msat: *mut u64,
1427    label: *mut wire_uint_8_list,
1428}
1429
1430#[repr(C)]
1431#[derive(Clone)]
1432pub struct wire_SendSpontaneousPaymentRequest {
1433    node_id: *mut wire_uint_8_list,
1434    amount_msat: u64,
1435    extra_tlvs: *mut wire_list_tlv_entry,
1436    label: *mut wire_uint_8_list,
1437}
1438
1439#[repr(C)]
1440#[derive(Clone)]
1441pub struct wire_SignMessageRequest {
1442    message: *mut wire_uint_8_list,
1443}
1444
1445#[repr(C)]
1446#[derive(Clone)]
1447pub struct wire_StaticBackupRequest {
1448    working_dir: *mut wire_uint_8_list,
1449}
1450
1451#[repr(C)]
1452#[derive(Clone)]
1453pub struct wire_TlvEntry {
1454    field_number: u64,
1455    value: *mut wire_uint_8_list,
1456}
1457
1458#[repr(C)]
1459#[derive(Clone)]
1460pub struct wire_uint_8_list {
1461    ptr: *mut u8,
1462    len: i32,
1463}
1464
1465#[repr(C)]
1466#[derive(Clone)]
1467pub struct wire_NodeConfig {
1468    tag: i32,
1469    kind: *mut NodeConfigKind,
1470}
1471
1472#[repr(C)]
1473pub union NodeConfigKind {
1474    Greenlight: *mut wire_NodeConfig_Greenlight,
1475}
1476
1477#[repr(C)]
1478#[derive(Clone)]
1479pub struct wire_NodeConfig_Greenlight {
1480    config: *mut wire_GreenlightNodeConfig,
1481}
1482
1483#[repr(C)]
1484#[derive(Clone)]
1485pub struct wire_ReportIssueRequest {
1486    tag: i32,
1487    kind: *mut ReportIssueRequestKind,
1488}
1489
1490#[repr(C)]
1491pub union ReportIssueRequestKind {
1492    PaymentFailure: *mut wire_ReportIssueRequest_PaymentFailure,
1493}
1494
1495#[repr(C)]
1496#[derive(Clone)]
1497pub struct wire_ReportIssueRequest_PaymentFailure {
1498    data: *mut wire_ReportPaymentFailureDetails,
1499}
1500
1501// Section: impl NewWithNullPtr
1502
1503pub trait NewWithNullPtr {
1504    fn new_with_null_ptr() -> Self;
1505}
1506
1507impl<T> NewWithNullPtr for *mut T {
1508    fn new_with_null_ptr() -> Self {
1509        std::ptr::null_mut()
1510    }
1511}
1512
1513impl NewWithNullPtr for wire_BuyBitcoinRequest {
1514    fn new_with_null_ptr() -> Self {
1515        Self {
1516            provider: Default::default(),
1517            opening_fee_params: core::ptr::null_mut(),
1518            redirect_url: core::ptr::null_mut(),
1519        }
1520    }
1521}
1522
1523impl Default for wire_BuyBitcoinRequest {
1524    fn default() -> Self {
1525        Self::new_with_null_ptr()
1526    }
1527}
1528
1529impl NewWithNullPtr for wire_CheckMessageRequest {
1530    fn new_with_null_ptr() -> Self {
1531        Self {
1532            message: core::ptr::null_mut(),
1533            pubkey: core::ptr::null_mut(),
1534            signature: core::ptr::null_mut(),
1535        }
1536    }
1537}
1538
1539impl Default for wire_CheckMessageRequest {
1540    fn default() -> Self {
1541        Self::new_with_null_ptr()
1542    }
1543}
1544
1545impl NewWithNullPtr for wire_Config {
1546    fn new_with_null_ptr() -> Self {
1547        Self {
1548            breezserver: core::ptr::null_mut(),
1549            chainnotifier_url: core::ptr::null_mut(),
1550            mempoolspace_url: core::ptr::null_mut(),
1551            working_dir: core::ptr::null_mut(),
1552            network: Default::default(),
1553            payment_timeout_sec: Default::default(),
1554            default_lsp_id: core::ptr::null_mut(),
1555            api_key: core::ptr::null_mut(),
1556            maxfee_percent: Default::default(),
1557            exemptfee_msat: Default::default(),
1558            node_config: Default::default(),
1559        }
1560    }
1561}
1562
1563impl Default for wire_Config {
1564    fn default() -> Self {
1565        Self::new_with_null_ptr()
1566    }
1567}
1568
1569impl NewWithNullPtr for wire_ConfigureNodeRequest {
1570    fn new_with_null_ptr() -> Self {
1571        Self {
1572            close_to_address: core::ptr::null_mut(),
1573        }
1574    }
1575}
1576
1577impl Default for wire_ConfigureNodeRequest {
1578    fn default() -> Self {
1579        Self::new_with_null_ptr()
1580    }
1581}
1582
1583impl NewWithNullPtr for wire_ConnectRequest {
1584    fn new_with_null_ptr() -> Self {
1585        Self {
1586            config: Default::default(),
1587            seed: core::ptr::null_mut(),
1588            restore_only: core::ptr::null_mut(),
1589        }
1590    }
1591}
1592
1593impl Default for wire_ConnectRequest {
1594    fn default() -> Self {
1595        Self::new_with_null_ptr()
1596    }
1597}
1598
1599impl NewWithNullPtr for wire_GreenlightCredentials {
1600    fn new_with_null_ptr() -> Self {
1601        Self {
1602            developer_key: core::ptr::null_mut(),
1603            developer_cert: core::ptr::null_mut(),
1604        }
1605    }
1606}
1607
1608impl Default for wire_GreenlightCredentials {
1609    fn default() -> Self {
1610        Self::new_with_null_ptr()
1611    }
1612}
1613
1614impl NewWithNullPtr for wire_GreenlightNodeConfig {
1615    fn new_with_null_ptr() -> Self {
1616        Self {
1617            partner_credentials: core::ptr::null_mut(),
1618            invite_code: core::ptr::null_mut(),
1619        }
1620    }
1621}
1622
1623impl Default for wire_GreenlightNodeConfig {
1624    fn default() -> Self {
1625        Self::new_with_null_ptr()
1626    }
1627}
1628
1629impl NewWithNullPtr for wire_ListPaymentsRequest {
1630    fn new_with_null_ptr() -> Self {
1631        Self {
1632            filters: core::ptr::null_mut(),
1633            metadata_filters: core::ptr::null_mut(),
1634            from_timestamp: core::ptr::null_mut(),
1635            to_timestamp: core::ptr::null_mut(),
1636            include_failures: core::ptr::null_mut(),
1637            offset: core::ptr::null_mut(),
1638            limit: core::ptr::null_mut(),
1639        }
1640    }
1641}
1642
1643impl Default for wire_ListPaymentsRequest {
1644    fn default() -> Self {
1645        Self::new_with_null_ptr()
1646    }
1647}
1648
1649impl NewWithNullPtr for wire_ListSwapsRequest {
1650    fn new_with_null_ptr() -> Self {
1651        Self {
1652            status: core::ptr::null_mut(),
1653            from_timestamp: core::ptr::null_mut(),
1654            to_timestamp: core::ptr::null_mut(),
1655            offset: core::ptr::null_mut(),
1656            limit: core::ptr::null_mut(),
1657        }
1658    }
1659}
1660
1661impl Default for wire_ListSwapsRequest {
1662    fn default() -> Self {
1663        Self::new_with_null_ptr()
1664    }
1665}
1666
1667impl NewWithNullPtr for wire_LnUrlAuthRequestData {
1668    fn new_with_null_ptr() -> Self {
1669        Self {
1670            k1: core::ptr::null_mut(),
1671            action: core::ptr::null_mut(),
1672            domain: core::ptr::null_mut(),
1673            url: core::ptr::null_mut(),
1674        }
1675    }
1676}
1677
1678impl Default for wire_LnUrlAuthRequestData {
1679    fn default() -> Self {
1680        Self::new_with_null_ptr()
1681    }
1682}
1683
1684impl NewWithNullPtr for wire_LnUrlPayRequest {
1685    fn new_with_null_ptr() -> Self {
1686        Self {
1687            data: Default::default(),
1688            amount_msat: Default::default(),
1689            use_trampoline: Default::default(),
1690            comment: core::ptr::null_mut(),
1691            payment_label: core::ptr::null_mut(),
1692            validate_success_action_url: core::ptr::null_mut(),
1693        }
1694    }
1695}
1696
1697impl Default for wire_LnUrlPayRequest {
1698    fn default() -> Self {
1699        Self::new_with_null_ptr()
1700    }
1701}
1702
1703impl NewWithNullPtr for wire_LnUrlPayRequestData {
1704    fn new_with_null_ptr() -> Self {
1705        Self {
1706            callback: core::ptr::null_mut(),
1707            min_sendable: Default::default(),
1708            max_sendable: Default::default(),
1709            metadata_str: core::ptr::null_mut(),
1710            comment_allowed: Default::default(),
1711            domain: core::ptr::null_mut(),
1712            allows_nostr: Default::default(),
1713            nostr_pubkey: core::ptr::null_mut(),
1714            ln_address: core::ptr::null_mut(),
1715        }
1716    }
1717}
1718
1719impl Default for wire_LnUrlPayRequestData {
1720    fn default() -> Self {
1721        Self::new_with_null_ptr()
1722    }
1723}
1724
1725impl NewWithNullPtr for wire_LnUrlWithdrawRequest {
1726    fn new_with_null_ptr() -> Self {
1727        Self {
1728            data: Default::default(),
1729            amount_msat: Default::default(),
1730            description: core::ptr::null_mut(),
1731        }
1732    }
1733}
1734
1735impl Default for wire_LnUrlWithdrawRequest {
1736    fn default() -> Self {
1737        Self::new_with_null_ptr()
1738    }
1739}
1740
1741impl NewWithNullPtr for wire_LnUrlWithdrawRequestData {
1742    fn new_with_null_ptr() -> Self {
1743        Self {
1744            callback: core::ptr::null_mut(),
1745            k1: core::ptr::null_mut(),
1746            default_description: core::ptr::null_mut(),
1747            min_withdrawable: Default::default(),
1748            max_withdrawable: Default::default(),
1749        }
1750    }
1751}
1752
1753impl Default for wire_LnUrlWithdrawRequestData {
1754    fn default() -> Self {
1755        Self::new_with_null_ptr()
1756    }
1757}
1758
1759impl NewWithNullPtr for wire_MetadataFilter {
1760    fn new_with_null_ptr() -> Self {
1761        Self {
1762            json_path: core::ptr::null_mut(),
1763            json_value: core::ptr::null_mut(),
1764        }
1765    }
1766}
1767
1768impl Default for wire_MetadataFilter {
1769    fn default() -> Self {
1770        Self::new_with_null_ptr()
1771    }
1772}
1773
1774impl Default for wire_NodeConfig {
1775    fn default() -> Self {
1776        Self::new_with_null_ptr()
1777    }
1778}
1779
1780impl NewWithNullPtr for wire_NodeConfig {
1781    fn new_with_null_ptr() -> Self {
1782        Self {
1783            tag: -1,
1784            kind: core::ptr::null_mut(),
1785        }
1786    }
1787}
1788
1789#[no_mangle]
1790pub extern "C" fn inflate_NodeConfig_Greenlight() -> *mut NodeConfigKind {
1791    support::new_leak_box_ptr(NodeConfigKind {
1792        Greenlight: support::new_leak_box_ptr(wire_NodeConfig_Greenlight {
1793            config: core::ptr::null_mut(),
1794        }),
1795    })
1796}
1797
1798impl NewWithNullPtr for wire_OpenChannelFeeRequest {
1799    fn new_with_null_ptr() -> Self {
1800        Self {
1801            amount_msat: core::ptr::null_mut(),
1802            expiry: core::ptr::null_mut(),
1803        }
1804    }
1805}
1806
1807impl Default for wire_OpenChannelFeeRequest {
1808    fn default() -> Self {
1809        Self::new_with_null_ptr()
1810    }
1811}
1812
1813impl NewWithNullPtr for wire_OpeningFeeParams {
1814    fn new_with_null_ptr() -> Self {
1815        Self {
1816            min_msat: Default::default(),
1817            proportional: Default::default(),
1818            valid_until: core::ptr::null_mut(),
1819            max_idle_time: Default::default(),
1820            max_client_to_self_delay: Default::default(),
1821            promise: core::ptr::null_mut(),
1822        }
1823    }
1824}
1825
1826impl Default for wire_OpeningFeeParams {
1827    fn default() -> Self {
1828        Self::new_with_null_ptr()
1829    }
1830}
1831
1832impl NewWithNullPtr for wire_PayOnchainRequest {
1833    fn new_with_null_ptr() -> Self {
1834        Self {
1835            recipient_address: core::ptr::null_mut(),
1836            prepare_res: Default::default(),
1837        }
1838    }
1839}
1840
1841impl Default for wire_PayOnchainRequest {
1842    fn default() -> Self {
1843        Self::new_with_null_ptr()
1844    }
1845}
1846
1847impl NewWithNullPtr for wire_PrepareOnchainPaymentRequest {
1848    fn new_with_null_ptr() -> Self {
1849        Self {
1850            amount_sat: Default::default(),
1851            amount_type: Default::default(),
1852            claim_tx_feerate: Default::default(),
1853        }
1854    }
1855}
1856
1857impl Default for wire_PrepareOnchainPaymentRequest {
1858    fn default() -> Self {
1859        Self::new_with_null_ptr()
1860    }
1861}
1862
1863impl NewWithNullPtr for wire_PrepareOnchainPaymentResponse {
1864    fn new_with_null_ptr() -> Self {
1865        Self {
1866            fees_hash: core::ptr::null_mut(),
1867            fees_percentage: Default::default(),
1868            fees_lockup: Default::default(),
1869            fees_claim: Default::default(),
1870            sender_amount_sat: Default::default(),
1871            recipient_amount_sat: Default::default(),
1872            total_fees: Default::default(),
1873        }
1874    }
1875}
1876
1877impl Default for wire_PrepareOnchainPaymentResponse {
1878    fn default() -> Self {
1879        Self::new_with_null_ptr()
1880    }
1881}
1882
1883impl NewWithNullPtr for wire_PrepareRedeemOnchainFundsRequest {
1884    fn new_with_null_ptr() -> Self {
1885        Self {
1886            to_address: core::ptr::null_mut(),
1887            sat_per_vbyte: Default::default(),
1888        }
1889    }
1890}
1891
1892impl Default for wire_PrepareRedeemOnchainFundsRequest {
1893    fn default() -> Self {
1894        Self::new_with_null_ptr()
1895    }
1896}
1897
1898impl NewWithNullPtr for wire_PrepareRefundRequest {
1899    fn new_with_null_ptr() -> Self {
1900        Self {
1901            swap_address: core::ptr::null_mut(),
1902            to_address: core::ptr::null_mut(),
1903            sat_per_vbyte: Default::default(),
1904        }
1905    }
1906}
1907
1908impl Default for wire_PrepareRefundRequest {
1909    fn default() -> Self {
1910        Self::new_with_null_ptr()
1911    }
1912}
1913
1914impl NewWithNullPtr for wire_ReceiveOnchainRequest {
1915    fn new_with_null_ptr() -> Self {
1916        Self {
1917            opening_fee_params: core::ptr::null_mut(),
1918        }
1919    }
1920}
1921
1922impl Default for wire_ReceiveOnchainRequest {
1923    fn default() -> Self {
1924        Self::new_with_null_ptr()
1925    }
1926}
1927
1928impl NewWithNullPtr for wire_ReceivePaymentRequest {
1929    fn new_with_null_ptr() -> Self {
1930        Self {
1931            amount_msat: Default::default(),
1932            description: core::ptr::null_mut(),
1933            preimage: core::ptr::null_mut(),
1934            opening_fee_params: core::ptr::null_mut(),
1935            use_description_hash: core::ptr::null_mut(),
1936            expiry: core::ptr::null_mut(),
1937            cltv: core::ptr::null_mut(),
1938        }
1939    }
1940}
1941
1942impl Default for wire_ReceivePaymentRequest {
1943    fn default() -> Self {
1944        Self::new_with_null_ptr()
1945    }
1946}
1947
1948impl NewWithNullPtr for wire_RedeemOnchainFundsRequest {
1949    fn new_with_null_ptr() -> Self {
1950        Self {
1951            to_address: core::ptr::null_mut(),
1952            sat_per_vbyte: Default::default(),
1953        }
1954    }
1955}
1956
1957impl Default for wire_RedeemOnchainFundsRequest {
1958    fn default() -> Self {
1959        Self::new_with_null_ptr()
1960    }
1961}
1962
1963impl NewWithNullPtr for wire_RefundRequest {
1964    fn new_with_null_ptr() -> Self {
1965        Self {
1966            swap_address: core::ptr::null_mut(),
1967            to_address: core::ptr::null_mut(),
1968            sat_per_vbyte: Default::default(),
1969        }
1970    }
1971}
1972
1973impl Default for wire_RefundRequest {
1974    fn default() -> Self {
1975        Self::new_with_null_ptr()
1976    }
1977}
1978
1979impl Default for wire_ReportIssueRequest {
1980    fn default() -> Self {
1981        Self::new_with_null_ptr()
1982    }
1983}
1984
1985impl NewWithNullPtr for wire_ReportIssueRequest {
1986    fn new_with_null_ptr() -> Self {
1987        Self {
1988            tag: -1,
1989            kind: core::ptr::null_mut(),
1990        }
1991    }
1992}
1993
1994#[no_mangle]
1995pub extern "C" fn inflate_ReportIssueRequest_PaymentFailure() -> *mut ReportIssueRequestKind {
1996    support::new_leak_box_ptr(ReportIssueRequestKind {
1997        PaymentFailure: support::new_leak_box_ptr(wire_ReportIssueRequest_PaymentFailure {
1998            data: core::ptr::null_mut(),
1999        }),
2000    })
2001}
2002
2003impl NewWithNullPtr for wire_ReportPaymentFailureDetails {
2004    fn new_with_null_ptr() -> Self {
2005        Self {
2006            payment_hash: core::ptr::null_mut(),
2007            comment: core::ptr::null_mut(),
2008        }
2009    }
2010}
2011
2012impl Default for wire_ReportPaymentFailureDetails {
2013    fn default() -> Self {
2014        Self::new_with_null_ptr()
2015    }
2016}
2017
2018impl NewWithNullPtr for wire_ReverseSwapFeesRequest {
2019    fn new_with_null_ptr() -> Self {
2020        Self {
2021            send_amount_sat: core::ptr::null_mut(),
2022            claim_tx_feerate: core::ptr::null_mut(),
2023        }
2024    }
2025}
2026
2027impl Default for wire_ReverseSwapFeesRequest {
2028    fn default() -> Self {
2029        Self::new_with_null_ptr()
2030    }
2031}
2032
2033impl NewWithNullPtr for wire_SendPaymentRequest {
2034    fn new_with_null_ptr() -> Self {
2035        Self {
2036            bolt11: core::ptr::null_mut(),
2037            use_trampoline: Default::default(),
2038            amount_msat: core::ptr::null_mut(),
2039            label: core::ptr::null_mut(),
2040        }
2041    }
2042}
2043
2044impl Default for wire_SendPaymentRequest {
2045    fn default() -> Self {
2046        Self::new_with_null_ptr()
2047    }
2048}
2049
2050impl NewWithNullPtr for wire_SendSpontaneousPaymentRequest {
2051    fn new_with_null_ptr() -> Self {
2052        Self {
2053            node_id: core::ptr::null_mut(),
2054            amount_msat: Default::default(),
2055            extra_tlvs: core::ptr::null_mut(),
2056            label: core::ptr::null_mut(),
2057        }
2058    }
2059}
2060
2061impl Default for wire_SendSpontaneousPaymentRequest {
2062    fn default() -> Self {
2063        Self::new_with_null_ptr()
2064    }
2065}
2066
2067impl NewWithNullPtr for wire_SignMessageRequest {
2068    fn new_with_null_ptr() -> Self {
2069        Self {
2070            message: core::ptr::null_mut(),
2071        }
2072    }
2073}
2074
2075impl Default for wire_SignMessageRequest {
2076    fn default() -> Self {
2077        Self::new_with_null_ptr()
2078    }
2079}
2080
2081impl NewWithNullPtr for wire_StaticBackupRequest {
2082    fn new_with_null_ptr() -> Self {
2083        Self {
2084            working_dir: core::ptr::null_mut(),
2085        }
2086    }
2087}
2088
2089impl Default for wire_StaticBackupRequest {
2090    fn default() -> Self {
2091        Self::new_with_null_ptr()
2092    }
2093}
2094
2095impl NewWithNullPtr for wire_TlvEntry {
2096    fn new_with_null_ptr() -> Self {
2097        Self {
2098            field_number: Default::default(),
2099            value: core::ptr::null_mut(),
2100        }
2101    }
2102}
2103
2104impl Default for wire_TlvEntry {
2105    fn default() -> Self {
2106        Self::new_with_null_ptr()
2107    }
2108}
2109
2110// Section: sync execution mode utility
2111
2112#[no_mangle]
2113pub extern "C" fn free_WireSyncReturn(ptr: support::WireSyncReturn) {
2114    unsafe {
2115        let _ = support::box_from_leak_ptr(ptr);
2116    };
2117}