Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Updates #1105

Merged
merged 8 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bindings_ffi/src/mls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2552,6 +2552,9 @@ mod tests {
let bo_group = bo.group(alix_group.id()).unwrap();

bo_group.send("bo1".as_bytes().to_vec()).await.unwrap();
// Temporary workaround for OpenMLS issue - make sure Alix's epoch is up-to-date
// https://github.com/xmtp/libxmtp/issues/1116
alix_group.sync().await.unwrap();
alix_group.send("alix1".as_bytes().to_vec()).await.unwrap();

// Move the group forward by 3 epochs (as Alix's max_past_epochs is
Expand Down Expand Up @@ -2755,6 +2758,9 @@ mod tests {
log::info!("Caro sending fifth message");
// Caro sends a message in the group
caro_group.update_installations().await.unwrap();
// Temporary workaround for OpenMLS issue - make sure Caro's epoch is up-to-date
// https://github.com/xmtp/libxmtp/issues/1116
caro_group.sync().await.unwrap();
caro_group
.send("Fifth message".as_bytes().to_vec())
.await
Expand Down
4 changes: 2 additions & 2 deletions xmtp_id/src/associations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ pub use self::serialization::{map_vec, try_map_vec, DeserializationError};
pub use self::signature::*;
pub use self::state::{AssociationState, AssociationStateDiff};

// Apply a single IdentityUpdate to an existing AssociationState
/// Apply a single [`IdentityUpdate`] to an existing [`AssociationState`] and return a new [`AssociationState`]
pub fn apply_update(
initial_state: AssociationState,
update: IdentityUpdate,
) -> Result<AssociationState, AssociationError> {
update.update_state(Some(initial_state), update.client_timestamp_ns)
}

// Get the current state from an array of `IdentityUpdate`s. Entire operation fails if any operation fails
/// Get the current state from an array of `IdentityUpdate`s. Entire operation fails if any operation fails
pub fn get_state<Updates: AsRef<[IdentityUpdate]>>(
updates: Updates,
) -> Result<AssociationState, AssociationError> {
Expand Down
7 changes: 7 additions & 0 deletions xmtp_id/src/associations/verified_signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ impl VerifiedSignature {
))
}

/**
* Verifies an ECDSA signature against the provided signature text and ensures that the recovered
* address matches the expected address.
*/
pub fn from_recoverable_ecdsa_with_expected_address<Text: AsRef<str>>(
signature_text: Text,
signature_bytes: &[u8],
Expand Down Expand Up @@ -95,6 +99,8 @@ impl VerifiedSignature {
))
}

/// Verifies a legacy delegated signature and recovers the wallet address responsible
/// associated with the signer.
pub fn from_legacy_delegated<Text: AsRef<str>>(
signature_text: Text,
signature_bytes: &[u8],
Expand All @@ -120,6 +126,7 @@ impl VerifiedSignature {
))
}

/// Verifies a smart contract wallet signature using the provided signature verifier.
pub async fn from_smart_contract_wallet<Text: AsRef<str>>(
signature_text: Text,
signature_verifier: &dyn SmartContractSignatureVerifier,
Expand Down
176 changes: 0 additions & 176 deletions xmtp_mls/IDENTITY.md

This file was deleted.

Loading