Weave documentation
Rust referenceweave-identity

weave-identity · ed25519_adapter

Source declarations, signatures and documentation for ed25519_adapter.

Source: sigil/weave/adapters/weave-identity/src/ed25519_adapter.rs. SHA-256: bb87bace824c8ec09d4dcfb5bc02e04c6980cd2cf9c7df69e29b8c0a616f951d.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

ed25519_adapter::Ed25519Adapter

Production-ready Ed25519 identity adapter

This adapter provides complete identity operations for agents, autonomous organizations, and humans using Ed25519 cryptography.

pub struct Ed25519Adapter {

}

Source line: 20.

ed25519_adapter::Ed25519Adapter::new

Create a new Ed25519 adapter

pub fn new() -> Self;

Source line: 33.

ed25519_adapter::Ed25519Adapter::with_resolver

Create a new adapter with a provided resolver

pub fn with_resolver(resolver: Arc<dyn IdentityResolver>) -> Self;

Source line: 43.

ed25519_adapter::Ed25519Adapter::set_resolver

Set or replace the resolver

pub fn set_resolver(&mut self, resolver: Arc<dyn IdentityResolver>);

Source line: 53.

ed25519_adapter::Ed25519Adapter::clear_cache

Clear the identity cache

pub async fn clear_cache(&self);

Source line: 58.

ed25519_adapter::Ed25519Adapter::cache_stats

Get cache statistics

pub async fn cache_stats(&self) -> (usize, usize);

Source line: 63.

ed25519_adapter::Ed25519Adapter::register_ao_controls_agent

Register explicit control of an agent by an ao

pub async fn register_ao_controls_agent(&self, agent: &Identity, ao: &Identity) -> Result<()>;

Source line: 69.

ed25519_adapter::Ed25519Adapter::add_delegation_certificate

Add a delegation certificate permitting issuer to control subject

pub async fn add_delegation_certificate(&self, cert: DelegationCertificate) -> Result<()>;

Source line: 82.

ed25519_adapter::DelegationCertificate

A verifiable delegation certificate allowing an issuer to control a subject

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DelegationCertificate {
pub subject_did: String,
pub issuer_did: String,
pub issued_at: DateTime<Utc>,
pub expires_at: Option<DateTime<Utc>>,
pub purpose: Option<String>,
pub metadata: Option<serde_json::Value>,
pub signature: Signature
}

Source line: 200.

ed25519_adapter::DelegationCertificate::new_signed

Create and sign a certificate with the issuer's keypair

pub fn new_signed(
        subject: &Identity,
        issuer: &Identity,
        issuer_keypair: &KeyPair,
        ttl_seconds: Option<i64>,
        purpose: Option<String>,
        metadata: Option<serde_json::Value>,
    ) -> Result<Self>;

Source line: 212.

ed25519_adapter::DelegationCertificate::is_time_valid

Check time validity at a given instant

pub fn is_time_valid(&self, at: DateTime<Utc>) -> bool;

Source line: 240.

ed25519_adapter::DelegationCertificate::canonical_bytes

Canonical serialized bytes excluding the signature field

pub fn canonical_bytes(&self) -> Result<Vec<u8>>;

Source line: 253.

On this page