-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f530565
commit d44914f
Showing
11 changed files
with
365 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use core::fmt::Debug; | ||
use lightning_invoice::Invoice; | ||
|
||
/// This trait specifies the functionality that needs to be implemented to | ||
/// accept and validate a payment from a user. | ||
pub trait ValidatePayment { | ||
// Generates an invoice for the user to pay. | ||
fn get_invoice(&self) -> Invoice; | ||
// Validates that the payment was paid. | ||
fn validate(&self, invoice: Invoice) -> bool; | ||
} | ||
|
||
impl Debug for dyn ValidatePayment + std::marker::Send + 'static { | ||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { | ||
write!(f, "hello") | ||
} | ||
} |
Oops, something went wrong.