pub struct MintRequest<Q> {
pub quote: Q,
pub outputs: Vec<BlindedMessage>,
pub signature: Option<String>,
}
Expand description
Mint request [NUT-04]
Fields§
§quote: Q
Quote id
outputs: Vec<BlindedMessage>
Outputs
signature: Option<String>
Signature
Implementations§
Source§impl<Q> MintRequest<Q>
impl<Q> MintRequest<Q>
Source§impl<Q> MintRequest<Q>where
Q: ToString,
impl<Q> MintRequest<Q>where
Q: ToString,
Sourcepub fn msg_to_sign(&self) -> Vec<u8> ⓘ
pub fn msg_to_sign(&self) -> Vec<u8> ⓘ
Constructs the message to be signed according to NUT-20 specification.
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
Sourcepub fn verify_signature(&self, pubkey: PublicKey) -> Result<(), Error>
pub fn verify_signature(&self, pubkey: PublicKey) -> Result<(), Error>
Verify signature on MintRequest
Trait Implementations§
Source§impl<Q> Clone for MintRequest<Q>where
Q: Clone,
impl<Q> Clone for MintRequest<Q>where
Q: Clone,
Source§fn clone(&self) -> MintRequest<Q>
fn clone(&self) -> MintRequest<Q>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Q> Debug for MintRequest<Q>where
Q: Debug,
impl<Q> Debug for MintRequest<Q>where
Q: Debug,
Source§impl<'de, Q> Deserialize<'de> for MintRequest<Q>where
Q: Serialize + DeserializeOwned,
impl<'de, Q> Deserialize<'de> for MintRequest<Q>where
Q: Serialize + DeserializeOwned,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MintRequest<Q>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MintRequest<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 MintRequest<Q>where
Q: PartialEq,
impl<Q> PartialEq for MintRequest<Q>where
Q: PartialEq,
Source§impl<Q> Serialize for MintRequest<Q>where
Q: Serialize + DeserializeOwned,
impl<Q> Serialize for MintRequest<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
Source§impl TryFrom<MintRequest<String>> for MintRequest<Uuid>
impl TryFrom<MintRequest<String>> for MintRequest<Uuid>
Source§fn try_from(
value: MintRequest<String>,
) -> Result<MintRequest<Uuid>, <MintRequest<Uuid> as TryFrom<MintRequest<String>>>::Error>
fn try_from( value: MintRequest<String>, ) -> Result<MintRequest<Uuid>, <MintRequest<Uuid> as TryFrom<MintRequest<String>>>::Error>
Performs the conversion.
impl<Q> Eq for MintRequest<Q>where
Q: Eq,
impl<Q> StructuralPartialEq for MintRequest<Q>
Auto Trait Implementations§
impl<Q> Freeze for MintRequest<Q>where
Q: Freeze,
impl<Q> RefUnwindSafe for MintRequest<Q>where
Q: RefUnwindSafe,
impl<Q> Send for MintRequest<Q>where
Q: Send,
impl<Q> Sync for MintRequest<Q>where
Q: Sync,
impl<Q> Unpin for MintRequest<Q>where
Q: Unpin,
impl<Q> UnwindSafe for MintRequest<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