diff --git a/src/activitypub/actors/attachments.rs b/src/activitypub/actors/attachments.rs index 2994bbb..5913f2c 100644 --- a/src/activitypub/actors/attachments.rs +++ b/src/activitypub/actors/attachments.rs @@ -11,7 +11,10 @@ use crate::identity::{ claims::create_identity_claim, did::Did, minisign::verify_minisign_identity_proof, - signatures::{PROOF_TYPE_ID_EIP191, PROOF_TYPE_ID_MINISIGN}, +}; +use crate::json_signatures::proofs::{ + PROOF_TYPE_ID_EIP191, + PROOF_TYPE_ID_MINISIGN, }; use crate::models::profiles::types::{ ExtraField, diff --git a/src/activitypub/authentication.rs b/src/activitypub/authentication.rs index a033d99..1e3ebe1 100644 --- a/src/activitypub/authentication.rs +++ b/src/activitypub/authentication.rs @@ -10,14 +10,17 @@ use crate::http_signatures::verify::{ verify_http_signature, HttpSignatureVerificationError as HttpSignatureError, }; -use crate::identity::{did::Did, signatures::ProofType}; -use crate::json_signatures::verify::{ - get_json_signature, - verify_ed25519_json_signature, - verify_eip191_json_signature, - verify_rsa_json_signature, - JsonSignatureVerificationError as JsonSignatureError, - JsonSigner, +use crate::identity::did::Did; +use crate::json_signatures::{ + proofs::ProofType, + verify::{ + get_json_signature, + verify_ed25519_json_signature, + verify_eip191_json_signature, + verify_rsa_json_signature, + JsonSignatureVerificationError as JsonSignatureError, + JsonSigner, + }, }; use crate::models::{ profiles::queries::get_profile_by_remote_actor_id, diff --git a/src/identity/mod.rs b/src/identity/mod.rs index ffa4fcf..92b71c9 100644 --- a/src/identity/mod.rs +++ b/src/identity/mod.rs @@ -3,4 +3,3 @@ pub mod did; pub mod did_key; pub mod did_pkh; pub mod minisign; -pub mod signatures; diff --git a/src/json_signatures/create.rs b/src/json_signatures/create.rs index 15d3d30..49a29bd 100644 --- a/src/json_signatures/create.rs +++ b/src/json_signatures/create.rs @@ -15,11 +15,11 @@ use mitra_utils::{ use crate::identity::{ did_key::DidKey, did_pkh::DidPkh, - signatures::{ - PROOF_TYPE_JCS_ED25519, - PROOF_TYPE_JCS_EIP191, - PROOF_TYPE_JCS_RSA, - }, +}; +use super::proofs::{ + PROOF_TYPE_JCS_ED25519, + PROOF_TYPE_JCS_EIP191, + PROOF_TYPE_JCS_RSA, }; pub(super) const PROOF_KEY: &str = "proof"; diff --git a/src/json_signatures/mod.rs b/src/json_signatures/mod.rs index c414f99..86a6664 100644 --- a/src/json_signatures/mod.rs +++ b/src/json_signatures/mod.rs @@ -1,2 +1,3 @@ pub mod create; +pub mod proofs; pub mod verify; diff --git a/src/identity/signatures.rs b/src/json_signatures/proofs.rs similarity index 100% rename from src/identity/signatures.rs rename to src/json_signatures/proofs.rs diff --git a/src/json_signatures/verify.rs b/src/json_signatures/verify.rs index 0570235..bada46b 100644 --- a/src/json_signatures/verify.rs +++ b/src/json_signatures/verify.rs @@ -19,13 +19,13 @@ use crate::identity::{ did_key::DidKey, did_pkh::DidPkh, minisign::verify_ed25519_signature, - signatures::ProofType, }; use super::create::{ IntegrityProof, PROOF_KEY, PROOF_PURPOSE, }; +use super::proofs::ProofType; #[derive(Debug, PartialEq)] pub enum JsonSigner {