pub trait QuotesTransaction<'a> {
type Err: Into<Error> + From<Error>;
Show 15 methods
// Required methods
fn add_melt_request<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
inputs_amount: Amount,
inputs_fee: Amount,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add_blinded_messages<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
quote_id: Option<&'life1 QuoteId>,
blinded_messages: &'life2 [BlindedMessage],
operation: &'life3 Operation,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn delete_blinded_messages<'life0, 'life1, 'async_trait>(
&'life0 mut self,
blinded_secrets: &'life1 [PublicKey],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_melt_request_and_blinded_messages<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
) -> Pin<Box<dyn Future<Output = Result<Option<MeltRequestInfo>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_melt_request<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
) -> 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<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
) -> 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 QuoteId,
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 QuoteId,
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 get_melt_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
) -> 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 QuoteId,
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 QuoteId,
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 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 add_melt_request<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
inputs_amount: Amount,
inputs_fee: Amount,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_melt_request<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
inputs_amount: Amount,
inputs_fee: Amount,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add melt_request with quote_id, inputs_amount, and inputs_fee
Sourcefn add_blinded_messages<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
quote_id: Option<&'life1 QuoteId>,
blinded_messages: &'life2 [BlindedMessage],
operation: &'life3 Operation,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn add_blinded_messages<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
quote_id: Option<&'life1 QuoteId>,
blinded_messages: &'life2 [BlindedMessage],
operation: &'life3 Operation,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Add blinded_messages for a quote_id
Sourcefn delete_blinded_messages<'life0, 'life1, 'async_trait>(
&'life0 mut self,
blinded_secrets: &'life1 [PublicKey],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_blinded_messages<'life0, 'life1, 'async_trait>(
&'life0 mut self,
blinded_secrets: &'life1 [PublicKey],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete blinded_messages by their blinded secrets
Sourcefn get_melt_request_and_blinded_messages<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
) -> Pin<Box<dyn Future<Output = Result<Option<MeltRequestInfo>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_melt_request_and_blinded_messages<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
) -> Pin<Box<dyn Future<Output = Result<Option<MeltRequestInfo>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get melt_request and associated blinded_messages by quote_id
Sourcefn delete_melt_request<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_melt_request<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete melt_request and associated blinded_messages by quote_id
Sourcefn get_mint_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
) -> 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 QuoteId,
) -> 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 QuoteId,
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 QuoteId,
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 QuoteId,
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 QuoteId,
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 get_melt_quote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
quote_id: &'life1 QuoteId,
) -> 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 QuoteId,
) -> 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 QuoteId,
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 QuoteId,
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 QuoteId,
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 QuoteId,
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 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 MintMintQuotes 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 MintMintQuotes