Purpose

Identity abstraction with DID-like documents, adapters, keypairs, public keys, signatures, delegation, and resolvers. This page follows the real source shape for Weave Identity and explains the workflow a developer is likely to use first.

Trust contract

Document which keys authorize the operation, what is signed, what is encrypted, what is deliberately public, and which policy hook can deny the call. Security examples should use deterministic test vectors where possible.

Primary types to know

  • DelegationCertificate — adapters/weave-identity/src/ed25519_adapter.rs
  • Ed25519Adapter — adapters/weave-identity/src/ed25519_adapter.rs
  • Identity — adapters/weave-identity/src/identity.rs
  • IdentityDocument — adapters/weave-identity/src/resolver.rs
  • KeyPair — adapters/weave-identity/src/keypair.rs
  • PublicKey — adapters/weave-identity/src/keypair.rs
  • Signature — adapters/weave-identity/src/signature.rs
  • VerificationMethod — adapters/weave-identity/src/resolver.rs
  • IdentityError — adapters/weave-identity/src/error.rs
  • IdentityType — adapters/weave-identity/src/identity.rs
  • IdentityResolver — adapters/weave-identity/src/resolver.rs
  • WeaveIdentityAdapter — adapters/weave-identity/src/adapter.rs

Example shape

use weave_identity::*;

// Minimal example skeleton. Replace placeholders with the concrete constructor
// listed on the API Surface page for this library.
async fn example() -> Result<(), Box<dyn std::error::Error>> {
    // 1. Build config or open storage.
    // 2. Execute one operation from this page.
    // 3. Assert the observable result before wiring peers or persistence.
    Ok(())
}

Release-quality documentation checklist

  • Every public type on the API Surface page has at least one sentence of behavior documentation.
  • Every fallible operation lists errors and recovery guidance.
  • Every networked example names the peer/session/topic lifecycle.
  • Every storage example names durability, repair, and deletion semantics.