|
@@ -4,7 +4,7 @@ use std::sync::Arc;
|
|
|
use async_trait::async_trait;
|
|
|
use cashu::dhke::hash_to_curve;
|
|
|
use cashu::nuts::nut02::mint::KeySet;
|
|
|
-use cashu::nuts::{BlindedSignature, CurrencyUnit, Id, MintInfo, Proof, Proofs, PublicKey};
|
|
|
+use cashu::nuts::{BlindSignature, CurrencyUnit, Id, MintInfo, Proof, Proofs, PublicKey};
|
|
|
use cashu::secret::Secret;
|
|
|
use cashu::types::{MeltQuote, MintQuote};
|
|
|
use tokio::sync::Mutex;
|
|
@@ -20,7 +20,7 @@ pub struct MemoryLocalStore {
|
|
|
melt_quotes: Arc<Mutex<HashMap<String, MeltQuote>>>,
|
|
|
pending_proofs: Arc<Mutex<HashMap<Vec<u8>, Proof>>>,
|
|
|
spent_proofs: Arc<Mutex<HashMap<Vec<u8>, Proof>>>,
|
|
|
- blinded_signatures: Arc<Mutex<HashMap<Box<[u8]>, BlindedSignature>>>,
|
|
|
+ blinded_signatures: Arc<Mutex<HashMap<Box<[u8]>, BlindSignature>>>,
|
|
|
}
|
|
|
|
|
|
impl MemoryLocalStore {
|
|
@@ -33,7 +33,7 @@ impl MemoryLocalStore {
|
|
|
melt_quotes: Vec<MeltQuote>,
|
|
|
pending_proofs: Proofs,
|
|
|
spent_proofs: Proofs,
|
|
|
- blinded_signatures: HashMap<Box<[u8]>, BlindedSignature>,
|
|
|
+ blinded_signatures: HashMap<Box<[u8]>, BlindSignature>,
|
|
|
) -> Result<Self, Error> {
|
|
|
Ok(Self {
|
|
|
mint_info: Arc::new(Mutex::new(mint_info)),
|
|
@@ -226,7 +226,7 @@ impl LocalStore for MemoryLocalStore {
|
|
|
async fn add_blinded_signature(
|
|
|
&self,
|
|
|
blinded_message: PublicKey,
|
|
|
- blinded_signature: BlindedSignature,
|
|
|
+ blinded_signature: BlindSignature,
|
|
|
) -> Result<(), Error> {
|
|
|
self.blinded_signatures
|
|
|
.lock()
|
|
@@ -238,7 +238,7 @@ impl LocalStore for MemoryLocalStore {
|
|
|
async fn get_blinded_signature(
|
|
|
&self,
|
|
|
blinded_message: &PublicKey,
|
|
|
- ) -> Result<Option<BlindedSignature>, Error> {
|
|
|
+ ) -> Result<Option<BlindSignature>, Error> {
|
|
|
Ok(self
|
|
|
.blinded_signatures
|
|
|
.lock()
|
|
@@ -250,7 +250,7 @@ impl LocalStore for MemoryLocalStore {
|
|
|
async fn get_blinded_signatures(
|
|
|
&self,
|
|
|
blinded_messages: Vec<PublicKey>,
|
|
|
- ) -> Result<Vec<Option<BlindedSignature>>, Error> {
|
|
|
+ ) -> Result<Vec<Option<BlindSignature>>, Error> {
|
|
|
let mut signatures = Vec::with_capacity(blinded_messages.len());
|
|
|
|
|
|
let blinded_signatures = self.blinded_signatures.lock().await;
|