mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-23 14:50:45 +01:00
Expose a BOLT 11 Invoice's signable_hash
Otherwise, an Invoice must first be converted to a SignedRawInvoice to obtain the hash.
This commit is contained in:
parent
854d650b5b
commit
821c79da98
1 changed files with 5 additions and 0 deletions
|
@ -1026,6 +1026,11 @@ impl From<PositiveTimestamp> for SystemTime {
|
|||
}
|
||||
|
||||
impl Invoice {
|
||||
/// The hash of the [`RawInvoice`] that was signed.
|
||||
pub fn signable_hash(&self) -> [u8; 32] {
|
||||
self.signed_invoice.hash
|
||||
}
|
||||
|
||||
/// Transform the `Invoice` into it's unchecked version
|
||||
pub fn into_signed_raw(self) -> SignedRawInvoice {
|
||||
self.signed_invoice
|
||||
|
|
Loading…
Add table
Reference in a new issue