Trait MintDatabase

Source
pub trait MintDatabase {
    type Err: Into<Error> + From<Error>;

Show 36 methods // Required methods fn set_active_keyset<'life0, 'async_trait>( &'life0 self, unit: CurrencyUnit, id: Id, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_active_keyset_id<'life0, 'life1, 'async_trait>( &'life0 self, unit: &'life1 CurrencyUnit, ) -> Pin<Box<dyn Future<Output = Result<Option<Id>, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_active_keysets<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HashMap<CurrencyUnit, Id>, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn add_mint_quote<'life0, 'async_trait>( &'life0 self, quote: MintMintQuote, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_mint_quote<'life0, 'life1, 'async_trait>( &'life0 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 update_mint_quote_state<'life0, 'life1, 'async_trait>( &'life0 self, quote_id: &'life1 Uuid, state: MintQuoteState, ) -> Pin<Box<dyn Future<Output = Result<MintQuoteState, 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 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 self, request_lookup_id: &'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_quotes<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<MintMintQuote>, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_mint_quotes_with_state<'life0, 'async_trait>( &'life0 self, state: MintQuoteState, ) -> Pin<Box<dyn Future<Output = Result<Vec<MintMintQuote>, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn remove_mint_quote<'life0, 'life1, 'async_trait>( &'life0 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 add_melt_quote<'life0, 'async_trait>( &'life0 self, quote: MeltQuote, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_melt_quote<'life0, 'life1, 'async_trait>( &'life0 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 update_melt_quote_state<'life0, 'life1, 'async_trait>( &'life0 self, quote_id: &'life1 Uuid, state: MeltQuoteState, ) -> Pin<Box<dyn Future<Output = Result<MeltQuoteState, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_melt_quotes<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<MeltQuote>, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn remove_melt_quote<'life0, 'life1, 'async_trait>( &'life0 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 add_melt_request<'life0, 'async_trait>( &'life0 self, melt_request: MeltBolt11Request<Uuid>, ln_key: PaymentProcessorKey, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_melt_request<'life0, 'life1, 'async_trait>( &'life0 self, quote_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<(MeltBolt11Request<Uuid>, PaymentProcessorKey)>, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn add_keyset_info<'life0, 'async_trait>( &'life0 self, keyset: MintKeySetInfo, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_keyset_info<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 Id, ) -> Pin<Box<dyn Future<Output = Result<Option<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_keyset_infos<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn add_proofs<'life0, 'async_trait>( &'life0 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 remove_proofs<'life0, 'life1, 'async_trait>( &'life0 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; fn get_proofs_by_ys<'life0, 'life1, 'async_trait>( &'life0 self, ys: &'life1 [PublicKey], ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Proof>>, 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 self, quote_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_proofs_states<'life0, 'life1, 'async_trait>( &'life0 self, ys: &'life1 [PublicKey], ) -> 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 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 get_proofs_by_keyset_id<'life0, 'life1, 'async_trait>( &'life0 self, keyset_id: &'life1 Id, ) -> Pin<Box<dyn Future<Output = Result<(Proofs, Vec<Option<State>>), Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn add_blind_signatures<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, blinded_messages: &'life1 [PublicKey], blind_signatures: &'life2 [BlindSignature], 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, 'life2: 'async_trait; fn get_blind_signatures<'life0, 'life1, 'async_trait>( &'life0 self, blinded_messages: &'life1 [PublicKey], ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<BlindSignature>>, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_blind_signatures_for_keyset<'life0, 'life1, 'async_trait>( &'life0 self, keyset_id: &'life1 Id, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlindSignature>, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_blind_signatures_for_quote<'life0, 'life1, 'async_trait>( &'life0 self, quote_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlindSignature>, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn set_mint_info<'life0, 'async_trait>( &'life0 self, mint_info: MintInfo, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_mint_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<MintInfo, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn set_quote_ttl<'life0, 'async_trait>( &'life0 self, quote_ttl: QuoteTTL, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_quote_ttl<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<QuoteTTL, Self::Err>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

Mint Database trait

Required Associated Typesยง

Source

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

Mint Database Error

Required Methodsยง

Source

fn set_active_keyset<'life0, 'async_trait>( &'life0 self, unit: CurrencyUnit, id: Id, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add Active Keyset

Source

fn get_active_keyset_id<'life0, 'life1, 'async_trait>( &'life0 self, unit: &'life1 CurrencyUnit, ) -> Pin<Box<dyn Future<Output = Result<Option<Id>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get Active Keyset

Source

fn get_active_keysets<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HashMap<CurrencyUnit, Id>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get all Active Keyset

Source

fn add_mint_quote<'life0, 'async_trait>( &'life0 self, quote: MintMintQuote, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_mint_quote<'life0, 'life1, 'async_trait>( &'life0 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,

Source

fn update_mint_quote_state<'life0, 'life1, 'async_trait>( &'life0 self, quote_id: &'life1 Uuid, state: MintQuoteState, ) -> Pin<Box<dyn Future<Output = Result<MintQuoteState, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update state of MintMintQuote

Source

fn get_mint_quote_by_request<'life0, 'life1, 'async_trait>( &'life0 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

Source

fn get_mint_quote_by_request_lookup_id<'life0, 'life1, 'async_trait>( &'life0 self, request_lookup_id: &'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

Source

fn get_mint_quotes<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<MintMintQuote>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get Mint Quotes

Source

fn get_mint_quotes_with_state<'life0, 'async_trait>( &'life0 self, state: MintQuoteState, ) -> Pin<Box<dyn Future<Output = Result<Vec<MintMintQuote>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get Mint Quotes with state

Source

fn remove_mint_quote<'life0, 'life1, 'async_trait>( &'life0 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,

Source

fn add_melt_quote<'life0, 'async_trait>( &'life0 self, quote: MeltQuote, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_melt_quote<'life0, 'life1, 'async_trait>( &'life0 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,

Source

fn update_melt_quote_state<'life0, 'life1, 'async_trait>( &'life0 self, quote_id: &'life1 Uuid, state: MeltQuoteState, ) -> Pin<Box<dyn Future<Output = Result<MeltQuoteState, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update mint::MeltQuote state

Source

fn get_melt_quotes<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<MeltQuote>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get all mint::MeltQuotes

Source

fn remove_melt_quote<'life0, 'life1, 'async_trait>( &'life0 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,

Source

fn add_melt_request<'life0, 'async_trait>( &'life0 self, melt_request: MeltBolt11Request<Uuid>, ln_key: PaymentProcessorKey, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add melt request

Source

fn get_melt_request<'life0, 'life1, 'async_trait>( &'life0 self, quote_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<(MeltBolt11Request<Uuid>, PaymentProcessorKey)>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get melt request

Source

fn add_keyset_info<'life0, 'async_trait>( &'life0 self, keyset: MintKeySetInfo, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_keyset_info<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 Id, ) -> Pin<Box<dyn Future<Output = Result<Option<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_keyset_infos<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn add_proofs<'life0, 'async_trait>( &'life0 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

Source

fn remove_proofs<'life0, 'life1, 'async_trait>( &'life0 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,

Remove Proofs

Source

fn get_proofs_by_ys<'life0, 'life1, 'async_trait>( &'life0 self, ys: &'life1 [PublicKey], ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Proof>>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get Proofs by ys

Source

fn get_proof_ys_by_quote_id<'life0, 'life1, 'async_trait>( &'life0 self, quote_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 ys by quote id

Source

fn get_proofs_states<'life0, 'life1, 'async_trait>( &'life0 self, ys: &'life1 [PublicKey], ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<State>>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get Proofs state

Source

fn update_proofs_states<'life0, 'life1, 'async_trait>( &'life0 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,

Get Proofs state

Source

fn get_proofs_by_keyset_id<'life0, 'life1, 'async_trait>( &'life0 self, keyset_id: &'life1 Id, ) -> Pin<Box<dyn Future<Output = Result<(Proofs, Vec<Option<State>>), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get Proofs by state

Source

fn add_blind_signatures<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, blinded_messages: &'life1 [PublicKey], blind_signatures: &'life2 [BlindSignature], 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, 'life2: 'async_trait,

Source

fn get_blind_signatures<'life0, 'life1, 'async_trait>( &'life0 self, blinded_messages: &'life1 [PublicKey], ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<BlindSignature>>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_blind_signatures_for_keyset<'life0, 'life1, 'async_trait>( &'life0 self, keyset_id: &'life1 Id, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlindSignature>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get BlindSignatures for keyset_id

Source

fn get_blind_signatures_for_quote<'life0, 'life1, 'async_trait>( &'life0 self, quote_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlindSignature>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get BlindSignatures for quote

Source

fn set_mint_info<'life0, 'async_trait>( &'life0 self, mint_info: MintInfo, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_mint_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<MintInfo, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn set_quote_ttl<'life0, 'async_trait>( &'life0 self, quote_ttl: QuoteTTL, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_quote_ttl<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<QuoteTTL, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementorsยง