Weave Identity
Adapters
Use WeaveIdentityAdapter with explicit keypair and identity values.
Choose the implementation explicitly
WeaveIdentityAdapter defines asynchronous key generation, identity derivation, signing, verification, parsing and control checks. create_agent_identity returns (KeyPair, Identity). Signing uses the keypair; verification uses the identity.
use weave_identity::{Ed25519Adapter, WeaveIdentityAdapter};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let adapter = Ed25519Adapter::new();
let (keypair, identity) = adapter.create_agent_identity(Some("example")).await?;
let message = b"adapter round-trip";
let signature = adapter.sign(&keypair, message).await?;
assert!(adapter.verify(&identity, message, &signature).await?);
println!("{}", identity.id());
Ok(())
}There are two distinct Ed25519Adapter types: the resolver/delegation implementation exported by weave_identity, and the separate weave_identity_ed25519 package with parser/formatter configuration. Select the qualified import matching the behavior you need. The trait does not automatically supply HSM, FROST, chain registration or payload canonicalization.
Source reference
Exact declarations and source provenance · Package features and manifest.