pub trait QuotesTransaction<'a> {
type Err: Into<Error> + From<Error>;
// Required methods
fn get_mint_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<MintMintQuote>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add_mint_quote<'life0, 'async_trait>(
&'life0 mut self,
quote: MintMintQuote,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn increment_mint_quote_amount_paid<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
amount_paid: Amount,
payment_id: String,
) -> Pin<Box<dyn Future<Output = Result<Amount, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn increment_mint_quote_amount_issued<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
amount_issued: Amount,
) -> Pin<Box<dyn Future<Output = Result<Amount, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn remove_mint_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_melt_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<MeltQuote>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add_melt_quote<'life0, 'async_trait>(
&'life0 mut self,
quote: MeltQuote,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_melt_quote_request_lookup_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
new_request_lookup_id: &'life2 PaymentIdentifier,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_melt_quote_state<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
new_state: MeltQuoteState,
payment_proof: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(MeltQuoteState, MeltQuote), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn remove_melt_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_mint_quote_by_request<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MintMintQuote>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_mint_quote_by_request_lookup_id<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request_lookup_id: &'life1 PaymentIdentifier,
) -> Pin<Box<dyn Future<Output = Result<Option<MintMintQuote>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Mint Quote Database writer trait
Required Associated Types§
Required Methods§
Sourcefn get_mint_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<MintMintQuote>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_mint_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<MintMintQuote>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get MintMintQuote
and lock it for update in this transaction
Sourcefn add_mint_quote<'life0, 'async_trait>(
&'life0 mut self,
quote: MintMintQuote,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_mint_quote<'life0, 'async_trait>(
&'life0 mut self,
quote: MintMintQuote,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Add MintMintQuote
Sourcefn increment_mint_quote_amount_paid<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
amount_paid: Amount,
payment_id: String,
) -> Pin<Box<dyn Future<Output = Result<Amount, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn increment_mint_quote_amount_paid<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
amount_paid: Amount,
payment_id: String,
) -> Pin<Box<dyn Future<Output = Result<Amount, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Increment amount paid MintMintQuote
Sourcefn increment_mint_quote_amount_issued<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
amount_issued: Amount,
) -> Pin<Box<dyn Future<Output = Result<Amount, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn increment_mint_quote_amount_issued<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
amount_issued: Amount,
) -> Pin<Box<dyn Future<Output = Result<Amount, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Increment amount paid MintMintQuote
Sourcefn remove_mint_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_mint_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove MintMintQuote
Sourcefn get_melt_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<MeltQuote>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_melt_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<MeltQuote>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get mint::MeltQuote
and lock it for update in this transaction
Sourcefn add_melt_quote<'life0, 'async_trait>(
&'life0 mut self,
quote: MeltQuote,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_melt_quote<'life0, 'async_trait>(
&'life0 mut self,
quote: MeltQuote,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Add mint::MeltQuote
Sourcefn update_melt_quote_request_lookup_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
new_request_lookup_id: &'life2 PaymentIdentifier,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_melt_quote_request_lookup_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
new_request_lookup_id: &'life2 PaymentIdentifier,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Updates the request lookup id for a melt quote
Sourcefn update_melt_quote_state<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
new_state: MeltQuoteState,
payment_proof: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(MeltQuoteState, MeltQuote), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_melt_quote_state<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
new_state: MeltQuoteState,
payment_proof: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(MeltQuoteState, MeltQuote), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update mint::MeltQuote
state
It is expected for this function to fail if the state is already set to the new state
Sourcefn remove_melt_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_melt_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove mint::MeltQuote
Sourcefn get_mint_quote_by_request<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MintMintQuote>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_mint_quote_by_request<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MintMintQuote>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get all MintMintQuote
s and lock it for update in this transaction
Sourcefn get_mint_quote_by_request_lookup_id<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request_lookup_id: &'life1 PaymentIdentifier,
) -> Pin<Box<dyn Future<Output = Result<Option<MintMintQuote>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_mint_quote_by_request_lookup_id<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request_lookup_id: &'life1 PaymentIdentifier,
) -> Pin<Box<dyn Future<Output = Result<Option<MintMintQuote>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get all MintMintQuote
s