pub trait ProofsTransaction {
type Err: Into<Error> + From<Error>;
// Required methods
fn add_proofs<'life0, 'life1, 'async_trait>(
&'life0 mut self,
proof: Proofs,
quote_id: Option<QuoteId>,
operation: &'life1 Operation,
) -> Pin<Box<dyn Future<Output = Result<Acquired<ProofsWithState>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_proofs_state<'life0, 'life1, 'async_trait>(
&'life0 mut self,
proofs: &'life1 mut Acquired<ProofsWithState>,
new_state: State,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_proofs<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ys: &'life1 [PublicKey],
) -> Pin<Box<dyn Future<Output = Result<Acquired<ProofsWithState>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn remove_proofs<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ys: &'life1 [PublicKey],
quote_id: Option<QuoteId>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_proof_ys_by_quote_id<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
) -> Pin<Box<dyn Future<Output = Result<Vec<PublicKey>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_proof_ys_by_operation_id<'life0, 'life1, 'async_trait>(
&'life0 mut self,
operation_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<PublicKey>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Mint Proof Transaction trait
Required Associated Types§
Required Methods§
Sourcefn add_proofs<'life0, 'life1, 'async_trait>(
&'life0 mut self,
proof: Proofs,
quote_id: Option<QuoteId>,
operation: &'life1 Operation,
) -> Pin<Box<dyn Future<Output = Result<Acquired<ProofsWithState>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_proofs<'life0, 'life1, 'async_trait>(
&'life0 mut self,
proof: Proofs,
quote_id: Option<QuoteId>,
operation: &'life1 Operation,
) -> Pin<Box<dyn Future<Output = Result<Acquired<ProofsWithState>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add Proofs
Adds proofs to the database. The database should error if the proof already exits, with a
AttemptUpdateSpentProof if the proof is already spent or a Duplicate error otherwise.
Sourcefn update_proofs_state<'life0, 'life1, 'async_trait>(
&'life0 mut self,
proofs: &'life1 mut Acquired<ProofsWithState>,
new_state: State,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_proofs_state<'life0, 'life1, 'async_trait>(
&'life0 mut self,
proofs: &'life1 mut Acquired<ProofsWithState>,
new_state: State,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates the proofs to the given state in the database.
Also updates the state field on the ProofsWithState wrapper to reflect
the new state after the database update succeeds.
Sourcefn get_proofs<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ys: &'life1 [PublicKey],
) -> Pin<Box<dyn Future<Output = Result<Acquired<ProofsWithState>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_proofs<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ys: &'life1 [PublicKey],
) -> Pin<Box<dyn Future<Output = Result<Acquired<ProofsWithState>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
get proofs states
Sourcefn remove_proofs<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ys: &'life1 [PublicKey],
quote_id: Option<QuoteId>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_proofs<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ys: &'life1 [PublicKey],
quote_id: Option<QuoteId>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove Proofs
Sourcefn get_proof_ys_by_quote_id<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
) -> Pin<Box<dyn Future<Output = Result<Vec<PublicKey>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_proof_ys_by_quote_id<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
) -> Pin<Box<dyn Future<Output = Result<Vec<PublicKey>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get ys by quote id
Sourcefn get_proof_ys_by_operation_id<'life0, 'life1, 'async_trait>(
&'life0 mut self,
operation_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<PublicKey>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_proof_ys_by_operation_id<'life0, 'life1, 'async_trait>(
&'life0 mut self,
operation_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<PublicKey>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get proof ys by operation id