L1fe DID
Usage
Using `l1fe-did` from application code — parse DIDs, build documents, attach verification methods, and resolve derivation chains.
Purpose
DID parser, document builder, verification methods, services, derivation proofs, and hierarchical identity helpers.
This page follows the real source shape for L1fe Did and explains the workflow a developer is likely to use first.
Developer workflow
Start from the smallest constructor or builder, perform one meaningful operation, inspect the returned state, then add the relevant policy, storage, or network integration. The examples below should be expanded whenever the crate API changes.
Primary types to know
DerivationProof2025— l1feid/l1fe-did/src/lib.rsDid— l1feid/l1fe-did/src/lib.rsDidDocument— l1feid/l1fe-did/src/lib.rsService— l1feid/l1fe-did/src/lib.rsVerificationMethod— l1feid/l1fe-did/src/lib.rsDidError— l1feid/l1fe-did/src/lib.rsDidKind— l1feid/l1fe-did/src/lib.rs
Example shape
use l1fe_did::{Did, DidResolver};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let did = Did::parse("did:l1fe:agent:7f3a2b...")?;
let resolver = DidResolver::default();
let doc = resolver.resolve(&did).await?;
println!("resolved {} verification methods", doc.verification_methods().len());
Ok(())
}