pub trait ProofsTransaction<'a> {
type Err: Into<Error> + From<Error>;
// Required methods
fn add_proofs<'life0, 'async_trait>(
&'life0 mut self,
proof: Proofs,
quote_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_proofs_states<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ys: &'life1 [PublicKey],
proofs_state: State,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<State>>, 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<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<(), 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, 'async_trait>(
&'life0 mut self,
proof: Proofs,
quote_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_proofs<'life0, 'async_trait>(
&'life0 mut self,
proof: Proofs,
quote_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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_states<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ys: &'life1 [PublicKey],
proofs_state: State,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<State>>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_proofs_states<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ys: &'life1 [PublicKey],
proofs_state: State,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<State>>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates the proofs to a given states and return the previous states