Weave documentation
Rust referenceweave-identity-ed25519

weave-identity-ed25519 · crate

Source declarations, signatures and documentation for crate.

Source: sigil/weave/adapters/ed25519/src/lib.rs. SHA-256: 22d9bc8b0008d09600ec19bfbea990843d1acd7dddaabe5f24bb447f2de31c7c.

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.

::DidParser

Function type for parsing DIDs from strings

pub type DidParser = Box<dyn Fn(&str) -> std::result::Result<String, String> + Send + Sync>;

Source line: 23.

::DidFormatter

Function type for converting DIDs to strings

pub type DidFormatter = Box<dyn Fn(&str) -> String + Send + Sync>;

Source line: 26.

::PermissionChecker

Function type for permission checking

pub type PermissionChecker = Box<dyn Fn(&str, &str, &str) -> bool + Send + Sync>;

Source line: 29.

::Ed25519IdentityMetadata

Metadata for an Ed25519 identity

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Ed25519IdentityMetadata {
/// The DID or identifier string

pub did: String,
/// Ed25519 public key bytes

pub public_key: Vec<u8>,
/// Optional parent/controller DID

pub controller: Option<String>,
/// Additional metadata

pub metadata: serde_json::Value
}

Source line: 35.

::Ed25519AdapterConfig

Configuration for the Ed25519 adapter

#[derive(Default)]
pub struct Ed25519AdapterConfig {
/// Optional DID parser function

pub did_parser: Option<DidParser>,
/// Optional DID formatter function

pub did_formatter: Option<DidFormatter>
}

Source line: 48.

::Ed25519Adapter

Generic Ed25519-based identity adapter

pub struct Ed25519Adapter {

}

Source line: 56.

::Ed25519Adapter::new

Create a new Ed25519 adapter with default configuration

pub fn new() -> Self;

Source line: 69.

::Ed25519Adapter::with_config

Create a new Ed25519 adapter with custom configuration

pub fn with_config(config: Ed25519AdapterConfig) -> Self;

Source line: 74.

::Ed25519Adapter::store_identity

Store an identity with its Ed25519 public key

pub async fn store_identity(
        &self,
        did: String,
        public_key: Vec<u8>,
        controller: Option<String>,
        metadata: serde_json::Value,
    ) -> Result<Identity>;

Source line: 100.

::Ed25519Adapter::store_keypair

Store a keypair with its associated identity

pub async fn store_keypair(
        &self,
        signing_key: SigningKey,
        identity_id: String,
    ) -> Result<KeyPair>;

Source line: 134.

::Ed25519AdapterBuilder

Builder for creating Ed25519 adapters with custom configurations

pub struct Ed25519AdapterBuilder {

}

Source line: 372.

::Ed25519AdapterBuilder::new

Create a new builder

pub fn new() -> Self;

Source line: 378.

::Ed25519AdapterBuilder::with_did_parser

Set a custom DID parser

pub fn with_did_parser<F>(mut self, parser: F) -> Self
    where
        F: Fn(&str) -> std::result::Result<String, String> + Send + Sync + 'static,;

Source line: 385.

::Ed25519AdapterBuilder::with_did_formatter

Set a custom DID formatter

pub fn with_did_formatter<F>(mut self, formatter: F) -> Self
    where
        F: Fn(&str) -> String + Send + Sync + 'static,;

Source line: 394.

::Ed25519AdapterBuilder::build

Build the adapter

pub fn build(self) -> Ed25519Adapter;

Source line: 403.

On this page