pub struct BatchMintRequest<Q> {
pub quotes: Vec<Q>,
pub quote_amounts: Option<Vec<Amount>>,
pub outputs: Vec<BlindedMessage>,
pub signatures: Option<Vec<Option<String>>>,
}Expand description
Batch mint request per NUT-29
Fields§
§quotes: Vec<Q>Array of unique quote IDs
quote_amounts: Option<Vec<Amount>>Optional expected amounts per quote (for bolt12-like methods)
outputs: Vec<BlindedMessage>Shared outputs across all quotes
signatures: Option<Vec<Option<String>>>Signatures per quote (None if all quotes are unlocked)
Implementations§
Source§impl<Q> BatchMintRequest<Q>where
Q: ToString,
impl<Q> BatchMintRequest<Q>where
Q: ToString,
Sourcepub fn msg_to_sign(&self, quote: &Q) -> Vec<u8> ⓘ
pub fn msg_to_sign(&self, quote: &Q) -> Vec<u8> ⓘ
Constructs the message to be signed according to NUT-20 for a quote.
The message is constructed by concatenating (as UTF-8 encoded bytes):
- The quote ID (as UTF-8)
- All blinded secrets (B_0 through B_n) converted to hex strings (as UTF-8)
Format: quote_id || B_0 || B_1 || ... || B_n
where each component is encoded as UTF-8 bytes.
Trait Implementations§
Source§impl<Q> Clone for BatchMintRequest<Q>where
Q: Clone,
impl<Q> Clone for BatchMintRequest<Q>where
Q: Clone,
Source§fn clone(&self) -> BatchMintRequest<Q>
fn clone(&self) -> BatchMintRequest<Q>
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<Q> Debug for BatchMintRequest<Q>where
Q: Debug,
impl<Q> Debug for BatchMintRequest<Q>where
Q: Debug,
Source§impl<'de, Q> Deserialize<'de> for BatchMintRequest<Q>where
Q: Serialize + DeserializeOwned,
impl<'de, Q> Deserialize<'de> for BatchMintRequest<Q>where
Q: Serialize + DeserializeOwned,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BatchMintRequest<Q>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BatchMintRequest<Q>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<Q> PartialEq for BatchMintRequest<Q>where
Q: PartialEq,
impl<Q> PartialEq for BatchMintRequest<Q>where
Q: PartialEq,
Source§impl<Q> Serialize for BatchMintRequest<Q>where
Q: Serialize + DeserializeOwned,
impl<Q> Serialize for BatchMintRequest<Q>where
Q: Serialize + DeserializeOwned,
Source§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,
Serialize this value into the given Serde serializer. Read more
impl<Q> Eq for BatchMintRequest<Q>where
Q: Eq,
impl<Q> StructuralPartialEq for BatchMintRequest<Q>
Auto Trait Implementations§
impl<Q> Freeze for BatchMintRequest<Q>
impl<Q> RefUnwindSafe for BatchMintRequest<Q>where
Q: RefUnwindSafe,
impl<Q> Send for BatchMintRequest<Q>where
Q: Send,
impl<Q> Sync for BatchMintRequest<Q>where
Q: Sync,
impl<Q> Unpin for BatchMintRequest<Q>where
Q: Unpin,
impl<Q> UnsafeUnpin for BatchMintRequest<Q>
impl<Q> UnwindSafe for BatchMintRequest<Q>where
Q: UnwindSafe,
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