Skip to content

Commit

Permalink
basic renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
insipx committed Apr 1, 2024
1 parent b50476c commit 96a6347
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use xmtp_proto::xmtp::mls::message_contents::MlsCredential as CredentialProto;
#[derive(Debug, Clone)]
pub enum AssociationType {
ExternallyOwned,
#[allow(dead_code)]
SmartContract,
Legacy,
}
Expand Down Expand Up @@ -38,10 +39,6 @@ impl VerifiedCredential {
pub fn account_address(&self) -> &String {
&self.account_address
}

pub fn account_type(&self) -> &AssociationType {
&self.account_type
}
}

pub struct VerificationRequest {
Expand Down
8 changes: 4 additions & 4 deletions xmtp_id/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mod credential;
mod verified_key_package;
pub mod credential_verifier;
pub mod verified_key_package;

use std::sync::RwLock;

Expand All @@ -15,7 +15,7 @@ use xmtp_mls::{
utils::time::now_ns,
};

use crate::credential::{CredentialVerifier, VerificationError, VerificationRequest};
use crate::credential_verifier::{CredentialVerifier, VerificationError, VerificationRequest};

#[derive(Debug, Error)]
pub enum IdentityError {
Expand Down Expand Up @@ -78,7 +78,7 @@ impl Identity {
.ok_or(IdentityError::UninitializedIdentity)
}

/// Get an account address verified
/// Get an account address verified by the
pub async fn get_validated_account_address(
credential: &[u8],
installation_public_key: &[u8],
Expand Down
2 changes: 1 addition & 1 deletion xmtp_mls/src/verified_key_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl VerifiedKeyPackage {
}
}

// Validates starting with a KeyPackage (which is already validated by OpenMLS)
/// Validates starting with a KeyPackage (which is already validated by OpenMLS)
pub fn from_key_package(kp: KeyPackage) -> Result<Self, KeyPackageVerificationError> {
let leaf_node = kp.leaf_node();
let basic_credential = BasicCredential::try_from(leaf_node.credential())?;
Expand Down

0 comments on commit 96a6347

Please sign in to comment.