pub struct CashuLockProof {
pub token: String,
pub mint_url: String,
pub buyer_pubkey: String,
pub seller_pubkey: String,
pub mostro_pubkey: String,
}Expand description
Cashu 2-of-3 multisig escrow lock submitted by the seller.
Carried inside Payload::CashuLockProof on Action::AddCashuEscrow
(seller → Mostro). It describes a NUT-11 P2PK token locked to a 2-of-3
spending condition over the buyer (P_B), seller (P_S) and Mostro
(P_M) pubkeys. Mostro validates the condition and confirms the proofs
are unspent at the mint (NUT-07 checkstate) without ever taking
custody — it only ever holds one of the three keys.
Fields§
§token: StringSerialized Cashu token (the locked ecash) as submitted by the seller.
mint_url: StringURL of the mint hosting the escrowed proofs. Must match the node’s configured mint.
buyer_pubkey: StringBuyer pubkey embedded in the 2-of-3 condition (P_B), hex.
seller_pubkey: StringSeller pubkey embedded in the 2-of-3 condition (P_S), hex.
mostro_pubkey: StringMostro/arbitrator pubkey embedded in the 2-of-3 condition (P_M),
hex.
Implementations§
Source§impl CashuLockProof
impl CashuLockProof
Sourcepub fn new(
token: String,
mint_url: String,
buyer_pubkey: String,
seller_pubkey: String,
mostro_pubkey: String,
) -> Self
pub fn new( token: String, mint_url: String, buyer_pubkey: String, seller_pubkey: String, mostro_pubkey: String, ) -> Self
Create a new CashuLockProof.
Sourcepub fn from_json(json: &str) -> Result<Self, ServiceError>
pub fn from_json(json: &str) -> Result<Self, ServiceError>
Parse a CashuLockProof from its JSON representation.
Sourcepub fn as_json(&self) -> Result<String, ServiceError>
pub fn as_json(&self) -> Result<String, ServiceError>
Serialize the lock proof to a JSON string.
Trait Implementations§
Source§impl Clone for CashuLockProof
impl Clone for CashuLockProof
Source§fn clone(&self) -> CashuLockProof
fn clone(&self) -> CashuLockProof
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CashuLockProof
impl Debug for CashuLockProof
Source§impl<'de> Deserialize<'de> for CashuLockProof
impl<'de> Deserialize<'de> for CashuLockProof
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>,
Source§impl PartialEq for CashuLockProof
impl PartialEq for CashuLockProof
Source§fn eq(&self, other: &CashuLockProof) -> bool
fn eq(&self, other: &CashuLockProof) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for CashuLockProof
impl Serialize for CashuLockProof
impl Eq for CashuLockProof
impl StructuralPartialEq for CashuLockProof
Auto Trait Implementations§
impl Freeze for CashuLockProof
impl RefUnwindSafe for CashuLockProof
impl Send for CashuLockProof
impl Sync for CashuLockProof
impl Unpin for CashuLockProof
impl UnsafeUnpin for CashuLockProof
impl UnwindSafe for CashuLockProof
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more