@@ -407,7 +407,8 @@ impl Bolt11Payment {
407
407
/// The inbound payment will be automatically claimed upon arrival.
408
408
#[ cfg( not( feature = "uniffi" ) ) ]
409
409
pub fn receive (
410
- & self , amount_msat : u64 , description : & lightning_invoice:: Bolt11InvoiceDescription , expiry_secs : u32 ,
410
+ & self , amount_msat : u64 , description : & lightning_invoice:: Bolt11InvoiceDescription ,
411
+ expiry_secs : u32 ,
411
412
) -> Result < Bolt11Invoice , Error > {
412
413
self . receive_inner ( Some ( amount_msat) , description, expiry_secs, None )
413
414
}
@@ -416,7 +417,8 @@ impl Bolt11Payment {
416
417
pub fn receive (
417
418
& self , amount_msat : u64 , description : & Bolt11InvoiceDescription , expiry_secs : u32 ,
418
419
) -> Result < Bolt11Invoice , Error > {
419
- let invoice_description = lightning_invoice:: Bolt11InvoiceDescription :: try_from ( description) ?;
420
+ let invoice_description =
421
+ lightning_invoice:: Bolt11InvoiceDescription :: try_from ( description) ?;
420
422
self . receive_inner ( Some ( amount_msat) , & invoice_description, expiry_secs, None )
421
423
}
422
424
@@ -436,8 +438,8 @@ impl Bolt11Payment {
436
438
/// [`fail_for_hash`]: Self::fail_for_hash
437
439
#[ cfg( not( feature = "uniffi" ) ) ]
438
440
pub fn receive_for_hash (
439
- & self , amount_msat : u64 , description : & lightning_invoice:: Bolt11InvoiceDescription , expiry_secs : u32 ,
440
- payment_hash : PaymentHash ,
441
+ & self , amount_msat : u64 , description : & lightning_invoice:: Bolt11InvoiceDescription ,
442
+ expiry_secs : u32 , payment_hash : PaymentHash ,
441
443
) -> Result < Bolt11Invoice , Error > {
442
444
self . receive_inner ( Some ( amount_msat) , description, expiry_secs, Some ( payment_hash) )
443
445
}
@@ -447,7 +449,8 @@ impl Bolt11Payment {
447
449
& self , amount_msat : u64 , description : & Bolt11InvoiceDescription , expiry_secs : u32 ,
448
450
payment_hash : PaymentHash ,
449
451
) -> Result < Bolt11Invoice , Error > {
450
- let invoice_description = lightning_invoice:: Bolt11InvoiceDescription :: try_from ( description) ?;
452
+ let invoice_description =
453
+ lightning_invoice:: Bolt11InvoiceDescription :: try_from ( description) ?;
451
454
self . receive_inner ( Some ( amount_msat) , & invoice_description, expiry_secs, Some ( payment_hash) )
452
455
}
453
456
@@ -466,7 +469,8 @@ impl Bolt11Payment {
466
469
pub fn receive_variable_amount (
467
470
& self , description : & Bolt11InvoiceDescription , expiry_secs : u32 ,
468
471
) -> Result < Bolt11Invoice , Error > {
469
- let invoice_description = lightning_invoice:: Bolt11InvoiceDescription :: try_from ( description) ?;
472
+ let invoice_description =
473
+ lightning_invoice:: Bolt11InvoiceDescription :: try_from ( description) ?;
470
474
self . receive_inner ( None , & invoice_description, expiry_secs, None )
471
475
}
472
476
@@ -486,23 +490,25 @@ impl Bolt11Payment {
486
490
/// [`fail_for_hash`]: Self::fail_for_hash
487
491
#[ cfg( not( feature = "uniffi" ) ) ]
488
492
pub fn receive_variable_amount_for_hash (
489
- & self , description : & lightning_invoice:: Bolt11InvoiceDescription , expiry_secs : u32 , payment_hash : PaymentHash ,
493
+ & self , description : & lightning_invoice:: Bolt11InvoiceDescription , expiry_secs : u32 ,
494
+ payment_hash : PaymentHash ,
490
495
) -> Result < Bolt11Invoice , Error > {
491
496
self . receive_inner ( None , description, expiry_secs, Some ( payment_hash) )
492
497
}
493
498
494
499
#[ cfg( feature = "uniffi" ) ]
495
500
pub fn receive_variable_amount_for_hash (
496
- & self , description : & Bolt11InvoiceDescription , expiry_secs : u32 ,
497
- payment_hash : PaymentHash ,
501
+ & self , description : & Bolt11InvoiceDescription , expiry_secs : u32 , payment_hash : PaymentHash ,
498
502
) -> Result < Bolt11Invoice , Error > {
499
- let invoice_description = lightning_invoice:: Bolt11InvoiceDescription :: try_from ( description) ?;
503
+ let invoice_description =
504
+ lightning_invoice:: Bolt11InvoiceDescription :: try_from ( description) ?;
500
505
self . receive_inner ( None , & invoice_description, expiry_secs, Some ( payment_hash) )
501
506
}
502
507
503
508
pub ( crate ) fn receive_inner (
504
- & self , amount_msat : Option < u64 > , invoice_description : & lightning_invoice:: Bolt11InvoiceDescription ,
505
- expiry_secs : u32 , manual_claim_payment_hash : Option < PaymentHash > ,
509
+ & self , amount_msat : Option < u64 > ,
510
+ invoice_description : & lightning_invoice:: Bolt11InvoiceDescription , expiry_secs : u32 ,
511
+ manual_claim_payment_hash : Option < PaymentHash > ,
506
512
) -> Result < Bolt11Invoice , Error > {
507
513
let invoice = {
508
514
let invoice_params = Bolt11InvoiceParameters {
@@ -569,8 +575,8 @@ impl Bolt11Payment {
569
575
/// [LSPS2]: https://github.com/BitcoinAndLightningLayerSpecs/lsp/blob/main/LSPS2/README.md
570
576
#[ cfg( not( feature = "uniffi" ) ) ]
571
577
pub fn receive_via_jit_channel (
572
- & self , amount_msat : u64 , description : & lightning_invoice:: Bolt11InvoiceDescription , expiry_secs : u32 ,
573
- max_total_lsp_fee_limit_msat : Option < u64 > ,
578
+ & self , amount_msat : u64 , description : & lightning_invoice:: Bolt11InvoiceDescription ,
579
+ expiry_secs : u32 , max_total_lsp_fee_limit_msat : Option < u64 > ,
574
580
) -> Result < Bolt11Invoice , Error > {
575
581
self . receive_via_jit_channel_inner (
576
582
Some ( amount_msat) ,
@@ -586,7 +592,8 @@ impl Bolt11Payment {
586
592
& self , amount_msat : u64 , description : & Bolt11InvoiceDescription , expiry_secs : u32 ,
587
593
max_total_lsp_fee_limit_msat : Option < u64 > ,
588
594
) -> Result < Bolt11Invoice , Error > {
589
- let invoice_description = lightning_invoice:: Bolt11InvoiceDescription :: try_from ( description) ?;
595
+ let invoice_description =
596
+ lightning_invoice:: Bolt11InvoiceDescription :: try_from ( description) ?;
590
597
self . receive_via_jit_channel_inner (
591
598
Some ( amount_msat) ,
592
599
& invoice_description,
@@ -626,7 +633,8 @@ impl Bolt11Payment {
626
633
& self , description : & Bolt11InvoiceDescription , expiry_secs : u32 ,
627
634
max_proportional_lsp_fee_limit_ppm_msat : Option < u64 > ,
628
635
) -> Result < Bolt11Invoice , Error > {
629
- let invoice_description = lightning_invoice:: Bolt11InvoiceDescription :: try_from ( description) ?;
636
+ let invoice_description =
637
+ lightning_invoice:: Bolt11InvoiceDescription :: try_from ( description) ?;
630
638
self . receive_via_jit_channel_inner (
631
639
None ,
632
640
& invoice_description,
@@ -637,8 +645,8 @@ impl Bolt11Payment {
637
645
}
638
646
639
647
fn receive_via_jit_channel_inner (
640
- & self , amount_msat : Option < u64 > , description : & lightning_invoice:: Bolt11InvoiceDescription , expiry_secs : u32 ,
641
- max_total_lsp_fee_limit_msat : Option < u64 > ,
648
+ & self , amount_msat : Option < u64 > , description : & lightning_invoice:: Bolt11InvoiceDescription ,
649
+ expiry_secs : u32 , max_total_lsp_fee_limit_msat : Option < u64 > ,
642
650
max_proportional_lsp_fee_limit_ppm_msat : Option < u64 > ,
643
651
) -> Result < Bolt11Invoice , Error > {
644
652
let liquidity_source =
0 commit comments