pub struct MintOperationData {
pub is_batch: Option<bool>,
pub amount: Amount,
pub counter_start: Option<u32>,
pub counter_end: Option<u32>,
pub blinded_messages: Option<Vec<BlindedMessage>>,
/* private fields */
}Expand description
Operation-specific data for Mint operations
Fields§
§is_batch: Option<bool>Whether this is a batch operation
True if this was created by batch_mint, false for single mint. Used to determine which endpoint to use for replay.
amount: AmountAmount to mint (total for batch)
counter_start: Option<u32>Derivation counter start
counter_end: Option<u32>Derivation counter end
blinded_messages: Option<Vec<BlindedMessage>>Blinded messages for recovery
Stored so that if a crash occurs after the mint accepts the request, we can use these to query the mint for signatures and reconstruct proofs.
Implementations§
Source§impl MintOperationData
impl MintOperationData
Sourcepub fn new_single(
quote_id: String,
amount: Amount,
counter_start: Option<u32>,
counter_end: Option<u32>,
blinded_messages: Option<Vec<BlindedMessage>>,
) -> Self
pub fn new_single( quote_id: String, amount: Amount, counter_start: Option<u32>, counter_end: Option<u32>, blinded_messages: Option<Vec<BlindedMessage>>, ) -> Self
Create operation data for a single-quote mint operation.
Sourcepub fn new_batch(
quote_ids: Vec<String>,
amount: Amount,
counter_start: Option<u32>,
counter_end: Option<u32>,
blinded_messages: Option<Vec<BlindedMessage>>,
) -> Self
pub fn new_batch( quote_ids: Vec<String>, amount: Amount, counter_start: Option<u32>, counter_end: Option<u32>, blinded_messages: Option<Vec<BlindedMessage>>, ) -> Self
Create operation data for a batch mint operation.
Sourcepub fn primary_quote_id(&self) -> &str
pub fn primary_quote_id(&self) -> &str
Get the representative quote ID for this operation.
Trait Implementations§
Source§impl Clone for MintOperationData
impl Clone for MintOperationData
Source§fn clone(&self) -> MintOperationData
fn clone(&self) -> MintOperationData
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 MintOperationData
impl Debug for MintOperationData
Source§impl<'de> Deserialize<'de> for MintOperationData
impl<'de> Deserialize<'de> for MintOperationData
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 PartialEq for MintOperationData
impl PartialEq for MintOperationData
Source§impl Serialize for MintOperationData
impl Serialize for MintOperationData
impl Eq for MintOperationData
impl StructuralPartialEq for MintOperationData
Auto Trait Implementations§
impl Freeze for MintOperationData
impl RefUnwindSafe for MintOperationData
impl Send for MintOperationData
impl Sync for MintOperationData
impl Unpin for MintOperationData
impl UnsafeUnpin for MintOperationData
impl UnwindSafe for MintOperationData
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