pub struct PayResponse {
pub callback: String,
pub max_sendable: u64,
pub min_sendable: u64,
pub tag: Tag,
pub metadata: String,
pub comment_allowed: Option<u32>,
pub allows_nostr: Option<bool>,
pub nostr_pubkey: Option<XOnlyPublicKey>,
}Fields§
§callback: Stringa second-level url which give you an invoice with a GET request and an amount
max_sendable: u64max sendable amount for a given user on a given service
min_sendable: u64min sendable amount for a given user on a given service,
can not be less than 1 or more than max_sendable
tag: Tagtag of the request
metadata: StringMetadata json which must be presented as raw string here, this is required to pass signature verification at a later step
comment_allowed: Option<u32>Optional, if true, the service allows comments the number is the max length of the comment
allows_nostr: Option<bool>Optional, if true, the service allows nostr zaps
nostr_pubkey: Option<XOnlyPublicKey>Optional, if true, the nostr pubkey that will be used to sign zap events
Implementations§
Source§impl PayResponse
impl PayResponse
pub fn metadata_json(&self) -> Value
pub fn metadata_hash(&self) -> [u8; 32]
Trait Implementations§
Source§impl Clone for PayResponse
impl Clone for PayResponse
Source§fn clone(&self) -> PayResponse
fn clone(&self) -> PayResponse
Returns a duplicate 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 PayResponse
impl Debug for PayResponse
Source§impl<'de> Deserialize<'de> for PayResponse
impl<'de> Deserialize<'de> for PayResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for PayResponse
impl Hash for PayResponse
Source§impl PartialEq for PayResponse
impl PartialEq for PayResponse
Source§impl Serialize for PayResponse
impl Serialize for PayResponse
impl Eq for PayResponse
impl StructuralPartialEq for PayResponse
Auto Trait Implementations§
impl Freeze for PayResponse
impl RefUnwindSafe for PayResponse
impl Send for PayResponse
impl Sync for PayResponse
impl Unpin for PayResponse
impl UnwindSafe for PayResponse
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.