pub struct LnUrlPayRequestData {
pub callback: String,
pub min_sendable: u64,
pub max_sendable: u64,
pub metadata_str: String,
pub comment_allowed: u16,
pub domain: String,
pub allows_nostr: bool,
pub nostr_pubkey: Option<String>,
pub ln_address: Option<String>,
}
Expand description
Wrapped in a [LnUrlPay], this is the result of parse when given a LNURL-pay endpoint.
It represents the endpoint’s parameters for the LNURL workflow.
Fields§
§callback: String
§min_sendable: u64
The minimum amount, in millisats, that this LNURL-pay endpoint accepts
max_sendable: u64
The maximum amount, in millisats, that this LNURL-pay endpoint accepts
metadata_str: String
As per LUD-06, metadata
is a raw string (e.g. a json representation of the inner map).
Use metadata_vec()
to get the parsed items.
comment_allowed: u16
The comment length accepted by this endpoint
domain: String
Indicates the domain of the LNURL-pay service, to be shown to the user when asking for payment input, as per LUD-06 spec.
Note: this is not the domain of the callback, but the domain of the LNURL-pay endpoint.
allows_nostr: bool
Value indicating whether the recipient supports Nostr Zaps through NIP-57.
See https://github.com/nostr-protocol/nips/blob/master/57.md
nostr_pubkey: Option<String>
Optional recipient’s lnurl provider’s Nostr pubkey for NIP-57. If it exists it should be a valid BIP 340 public key in hex.
See https://github.com/nostr-protocol/nips/blob/master/57.md See https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki
ln_address: Option<String>
If sending to a LN Address, this will be filled.
Implementations§
§impl LnUrlPayRequestData
impl LnUrlPayRequestData
pub fn min_sendable_sats(&self) -> u64
pub fn min_sendable_sats(&self) -> u64
The minimum amount, in sats, accepted by this LNURL-pay endpoint
pub fn max_sendable_sats(&self) -> u64
pub fn max_sendable_sats(&self) -> u64
The maximum amount, in sats, accepted by this LNURL-pay endpoint
pub fn metadata_vec(&self) -> Result<Vec<MetadataItem>, Error>
pub fn metadata_vec(&self) -> Result<Vec<MetadataItem>, Error>
Parsed metadata items. Use metadata_str
to get the raw metadata string, as received from
the LNURL endpoint.
Trait Implementations§
§impl Clone for LnUrlPayRequestData
impl Clone for LnUrlPayRequestData
§fn clone(&self) -> LnUrlPayRequestData
fn clone(&self) -> LnUrlPayRequestData
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for LnUrlPayRequestData
impl Debug for LnUrlPayRequestData
§impl<'de> Deserialize<'de> for LnUrlPayRequestData
impl<'de> Deserialize<'de> for LnUrlPayRequestData
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LnUrlPayRequestData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LnUrlPayRequestData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Serialize for LnUrlPayRequestData
impl Serialize for LnUrlPayRequestData
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for LnUrlPayRequestData
impl RefUnwindSafe for LnUrlPayRequestData
impl Send for LnUrlPayRequestData
impl Sync for LnUrlPayRequestData
impl Unpin for LnUrlPayRequestData
impl UnwindSafe for LnUrlPayRequestData
Blanket Implementations§
§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<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