Trait AgentKey

Source
pub trait AgentKey:
    Send
    + Sync
    + Debug {
    // Required methods
    fn key_id(&self) -> &str;
    fn public_key_jwk(&self) -> Result<Value>;
    fn did(&self) -> &str;
    fn key_type(&self) -> &str;
}
Expand description

Defines core capabilities of a cryptographic key used by an agent.

This trait is the foundation for all agent key operations, providing basic properties that all keys should have regardless of their specific cryptographic capabilities.

Required Methods§

Source

fn key_id(&self) -> &str

Returns the unique identifier for this key

Source

fn public_key_jwk(&self) -> Result<Value>

Exports the public key material as a JWK

Source

fn did(&self) -> &str

Returns the DID associated with this key

Source

fn key_type(&self) -> &str

Returns the key type (e.g., Ed25519, P-256, secp256k1)

Implementors§