QuotesTransaction

Trait QuotesTransaction 

Source
pub trait QuotesTransaction<'a> {
    type Err: Into<Error> + From<Error>;

Show 15 methods // Required methods fn add_melt_request_and_blinded_messages<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, quote_id: &'life1 QuoteId, inputs_amount: Amount, inputs_fee: Amount, blinded_messages: &'life2 [BlindedMessage], ) -> 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 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 remove_mint_quote<'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_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 remove_melt_quote<'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_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§

Source

type Err: Into<Error> + From<Error>

Mint Quotes Database Error

Required Methods§

Source

fn add_melt_request_and_blinded_messages<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, quote_id: &'life1 QuoteId, inputs_amount: Amount, inputs_fee: Amount, blinded_messages: &'life2 [BlindedMessage], ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Add melt_request with quote_id, inputs_amount, and blinded_messages

Source

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

Source

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

Source

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

Source

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,

Source

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

Source

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

Source

fn remove_mint_quote<'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,

Source

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

Source

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,

Source

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

Source

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

Source

fn remove_melt_quote<'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,

Source

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

Source

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

Implementors§