mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-06 14:35:31 +01:00
refactor: nut04 and nut05 (#749)
This commit is contained in:
@@ -10,8 +10,8 @@ use super::Error;
|
||||
use crate::common::{PaymentProcessorKey, QuoteTTL};
|
||||
use crate::mint::{self, MintKeySetInfo, MintQuote as MintMintQuote};
|
||||
use crate::nuts::{
|
||||
BlindSignature, CurrencyUnit, Id, MeltBolt11Request, MeltQuoteState, MintQuoteState, Proof,
|
||||
Proofs, PublicKey, State,
|
||||
BlindSignature, CurrencyUnit, Id, MeltQuoteState, MeltRequest, MintQuoteState, Proof, Proofs,
|
||||
PublicKey, State,
|
||||
};
|
||||
|
||||
#[cfg(feature = "auth")]
|
||||
@@ -96,14 +96,14 @@ pub trait QuotesDatabase {
|
||||
/// Add melt request
|
||||
async fn add_melt_request(
|
||||
&self,
|
||||
melt_request: MeltBolt11Request<Uuid>,
|
||||
melt_request: MeltRequest<Uuid>,
|
||||
ln_key: PaymentProcessorKey,
|
||||
) -> Result<(), Self::Err>;
|
||||
/// Get melt request
|
||||
async fn get_melt_request(
|
||||
&self,
|
||||
quote_id: &Uuid,
|
||||
) -> Result<Option<(MeltBolt11Request<Uuid>, PaymentProcessorKey)>, Self::Err>;
|
||||
) -> Result<Option<(MeltRequest<Uuid>, PaymentProcessorKey)>, Self::Err>;
|
||||
}
|
||||
|
||||
/// Mint Proof Database trait
|
||||
|
||||
@@ -309,12 +309,15 @@ pub enum Error {
|
||||
/// NUT20 Error
|
||||
#[error(transparent)]
|
||||
NUT20(#[from] crate::nuts::nut20::Error),
|
||||
/// NUTXX Error
|
||||
/// NUT21 Error
|
||||
#[error(transparent)]
|
||||
NUT21(#[from] crate::nuts::nut21::Error),
|
||||
/// NUTXX1 Error
|
||||
/// NUT22 Error
|
||||
#[error(transparent)]
|
||||
NUT22(#[from] crate::nuts::nut22::Error),
|
||||
/// NUT23 Error
|
||||
#[error(transparent)]
|
||||
NUT23(#[from] crate::nuts::nut23::Error),
|
||||
/// Database Error
|
||||
#[error(transparent)]
|
||||
Database(crate::database::Error),
|
||||
|
||||
@@ -52,6 +52,9 @@ pub enum Error {
|
||||
/// NUT05 Error
|
||||
#[error(transparent)]
|
||||
NUT05(#[from] crate::nuts::nut05::Error),
|
||||
/// NUT23 Error
|
||||
#[error(transparent)]
|
||||
NUT23(#[from] crate::nuts::nut23::Error),
|
||||
/// Custom
|
||||
#[error("`{0}`")]
|
||||
Custom(String),
|
||||
|
||||
Reference in New Issue
Block a user