pub struct RawBolt11Invoice {
pub hrp: RawHrp,
pub data: RawDataPart,
}
Expand description
Represents an syntactically correct Bolt11Invoice
for a payment on the lightning network,
but without the signature information.
Decoding and encoding should not lead to information loss but may lead to different hashes.
For methods without docs see the corresponding methods in Bolt11Invoice
.
Fields§
§hrp: RawHrp
human readable part
data: RawDataPart
data part
Implementations§
§impl RawBolt11Invoice
impl RawBolt11Invoice
pub fn signable_hash(&self) -> [u8; 32]
pub fn signable_hash(&self) -> [u8; 32]
Calculate the hash of the encoded RawBolt11Invoice
which should be signed.
pub fn sign<F, E>(self, sign_method: F) -> Result<SignedRawBolt11Invoice, E>
pub fn sign<F, E>(self, sign_method: F) -> Result<SignedRawBolt11Invoice, E>
Signs the invoice using the supplied sign_method
. This function MAY fail with an error of
type E
. Since the signature of a SignedRawBolt11Invoice
is not required to be valid there
are no constraints regarding the validity of the produced signature.
This is not exported to bindings users as we don’t currently support passing function pointers into methods explicitly.
pub fn known_tagged_fields(
&self,
) -> FilterMap<Iter<'_, RawTaggedField>, fn(_: &RawTaggedField) -> Option<&TaggedField>> ⓘ
pub fn known_tagged_fields( &self, ) -> FilterMap<Iter<'_, RawTaggedField>, fn(_: &RawTaggedField) -> Option<&TaggedField>> ⓘ
Returns an iterator over all tagged fields with known semantics.
This is not exported to bindings users as there is not yet a manual mapping for a FilterMap
pub fn payment_hash(&self) -> Option<&Sha256>
pub fn description(&self) -> Option<&Description>
pub fn payee_pub_key(&self) -> Option<&PayeePubKey>
pub fn description_hash(&self) -> Option<&Sha256>
pub fn expiry_time(&self) -> Option<&ExpiryTime>
pub fn min_final_cltv_expiry_delta(&self) -> Option<&MinFinalCltvExpiryDelta>
pub fn payment_secret(&self) -> Option<&PaymentSecret>
pub fn payment_metadata(&self) -> Option<&Vec<u8>>
pub fn features(&self) -> Option<&Features<Bolt11InvoiceContext>>
pub fn fallbacks(&self) -> Vec<&Fallback>
pub fn fallbacks(&self) -> Vec<&Fallback>
This is not exported to bindings users as we don’t support Vec<&NonOpaqueType>
pub fn private_routes(&self) -> Vec<&PrivateRoute>
pub fn amount_pico_btc(&self) -> Option<u64>
pub fn currency(&self) -> Currency
Trait Implementations§
§impl Clone for RawBolt11Invoice
impl Clone for RawBolt11Invoice
§fn clone(&self) -> RawBolt11Invoice
fn clone(&self) -> RawBolt11Invoice
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for RawBolt11Invoice
impl Debug for RawBolt11Invoice
§impl Hash for RawBolt11Invoice
impl Hash for RawBolt11Invoice
§impl Ord for RawBolt11Invoice
impl Ord for RawBolt11Invoice
§fn cmp(&self, other: &RawBolt11Invoice) -> Ordering
fn cmp(&self, other: &RawBolt11Invoice) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for RawBolt11Invoice
impl PartialEq for RawBolt11Invoice
§impl PartialOrd for RawBolt11Invoice
impl PartialOrd for RawBolt11Invoice
impl Eq for RawBolt11Invoice
impl StructuralPartialEq for RawBolt11Invoice
Auto Trait Implementations§
impl Freeze for RawBolt11Invoice
impl RefUnwindSafe for RawBolt11Invoice
impl Send for RawBolt11Invoice
impl Sync for RawBolt11Invoice
impl Unpin for RawBolt11Invoice
impl UnwindSafe for RawBolt11Invoice
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any
.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request