Struct nostr_sdk::nips::nip57::ZapRequestData
source · pub struct ZapRequestData {
pub public_key: XOnlyPublicKey,
pub relays: Vec<UncheckedUrl, Global>,
pub amount: Option<u64>,
pub lnurl: Option<String>,
pub event_id: Option<EventId>,
pub event_coordinate: Option<ParameterizedReplaceableEvent>,
}
Expand description
Zap Request Data
Fields§
§public_key: XOnlyPublicKey
Public key of the recipient
relays: Vec<UncheckedUrl, Global>
List of relays the recipient’s wallet should publish its zap receipt to
amount: Option<u64>
Amount in millisats
the sender intends to pay
lnurl: Option<String>
Lnurl pay url of the recipient, encoded using bech32 with the prefix lnurl.
event_id: Option<EventId>
Event ID
event_coordinate: Option<ParameterizedReplaceableEvent>
NIP-33 event coordinate that allows tipping parameterized replaceable events such as NIP-23 long-form notes.
Implementations§
source§impl ZapRequestData
impl ZapRequestData
sourcepub fn new(
public_key: XOnlyPublicKey,
relays: Vec<UncheckedUrl, Global>
) -> ZapRequestData
pub fn new( public_key: XOnlyPublicKey, relays: Vec<UncheckedUrl, Global> ) -> ZapRequestData
New Zap Request Data
sourcepub fn amount(self, amount: u64) -> ZapRequestData
pub fn amount(self, amount: u64) -> ZapRequestData
Amount in millisats
the sender intends to pay
sourcepub fn lnurl<S>(self, lnurl: S) -> ZapRequestDatawhere
S: Into<String>,
pub fn lnurl<S>(self, lnurl: S) -> ZapRequestDatawhere S: Into<String>,
Lnurl pay url of the recipient, encoded using bech32 with the prefix lnurl.
sourcepub fn event_id(self, event_id: EventId) -> ZapRequestData
pub fn event_id(self, event_id: EventId) -> ZapRequestData
Event ID
sourcepub fn event_coordinate(
self,
event_coordinate: ParameterizedReplaceableEvent
) -> ZapRequestData
pub fn event_coordinate( self, event_coordinate: ParameterizedReplaceableEvent ) -> ZapRequestData
NIP-33 event coordinate that allows tipping parameterized replaceable events such as NIP-23 long-form notes.
Trait Implementations§
source§impl Clone for ZapRequestData
impl Clone for ZapRequestData
source§fn clone(&self) -> ZapRequestData
fn clone(&self) -> ZapRequestData
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ZapRequestData
impl Debug for ZapRequestData
source§impl Hash for ZapRequestData
impl Hash for ZapRequestData
source§impl Ord for ZapRequestData
impl Ord for ZapRequestData
source§fn cmp(&self, other: &ZapRequestData) -> Ordering
fn cmp(&self, other: &ZapRequestData) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<ZapRequestData> for ZapRequestData
impl PartialEq<ZapRequestData> for ZapRequestData
source§fn eq(&self, other: &ZapRequestData) -> bool
fn eq(&self, other: &ZapRequestData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ZapRequestData> for ZapRequestData
impl PartialOrd<ZapRequestData> for ZapRequestData
source§fn partial_cmp(&self, other: &ZapRequestData) -> Option<Ordering>
fn partial_cmp(&self, other: &ZapRequestData) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for ZapRequestData
impl StructuralEq for ZapRequestData
impl StructuralPartialEq for ZapRequestData
Auto Trait Implementations§
impl RefUnwindSafe for ZapRequestData
impl Send for ZapRequestData
impl Sync for ZapRequestData
impl Unpin for ZapRequestData
impl UnwindSafe for ZapRequestData
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.