Skip to content

Commit

Permalink
feat(NUT12): rename BlindSignatureDleq
Browse files Browse the repository at this point in the history
  • Loading branch information
thesimplekid committed Mar 27, 2024
1 parent 5461eb0 commit 21926da
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/cashu/src/nuts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ pub use nut10::{Kind, Secret as Nut10Secret, SecretData};
#[cfg(feature = "nut11")]
pub use nut11::{P2PKConditions, SigFlag, Signatures, SigningKey, VerifyingKey};
#[cfg(feature = "nut12")]
pub use nut12::{BlindedSignatureDleq, ProofDleq};
pub use nut12::{BlindSignatureDleq, ProofDleq};

pub type Proofs = Vec<Proof>;
4 changes: 2 additions & 2 deletions crates/cashu/src/nuts/nut00.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::str::FromStr;
use serde::{Deserialize, Serialize};

#[cfg(feature = "nut12")]
use super::{BlindedSignatureDleq, ProofDleq};
use super::{BlindSignatureDleq, ProofDleq};
use super::{Id, Proofs, PublicKey};
use crate::error::Error;
#[cfg(feature = "nut11")]
Expand Down Expand Up @@ -424,7 +424,7 @@ pub struct BlindedSignature {
pub c: PublicKey,
/// DLEQ Proof
#[cfg(feature = "nut12")]
pub dleq: Option<BlindedSignatureDleq>,
pub dleq: Option<BlindSignatureDleq>,
}

/// Proofs [NUT-00]
Expand Down
6 changes: 3 additions & 3 deletions crates/cashu/src/nuts/nut12.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub enum Error {
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct BlindedSignatureDleq {
pub struct BlindSignatureDleq {
pub e: SecretKey,
pub s: SecretKey,
}
Expand Down Expand Up @@ -79,7 +79,7 @@ fn calculate_dleq(
blinded_signature: k256::PublicKey,
blinded_message: &k256::PublicKey,
mint_secretkey: &k256::SecretKey,
) -> Result<BlindedSignatureDleq, Error> {
) -> Result<BlindSignatureDleq, Error> {
// Random nonce
let r: k256::SecretKey = SecretKey::random().into();

Expand All @@ -100,7 +100,7 @@ fn calculate_dleq(

let s: k256::SecretKey = k256::SecretKey::new(s.into());

Ok(BlindedSignatureDleq {
Ok(BlindSignatureDleq {
e: e_sk.into(),
s: s.into(),
})
Expand Down

0 comments on commit 21926da

Please sign in to comment.