Expand description
W3C Decentralized Identifier (DID) Implementation
Implements W3C DID Core 1.0 specification with support for:
- did:lux - Lux blockchain-anchored DIDs
- did:key - Self-certifying DIDs from cryptographic keys
- did:web - DNS-based DIDs
§Example
ⓘ
use zap::identity::{Did, DidMethod, NodeIdentity};
// Parse existing DID
let did = Did::parse("did:lux:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK")?;
// Create from ML-DSA public key
let did = Did::from_mldsa_key(&public_key_bytes)?;
// Generate DID Document
let doc = did.document()?;
// Create node identity
let identity = NodeIdentity::generate()?;Structs§
- Did
- W3C Decentralized Identifier (DID)
- DidDocument
- W3C DID Document
- InMemory
Stake Registry - In-memory stake registry for testing
- Node
Identity - Node identity combining DID with cryptographic keypair
- Service
- Service endpoint in DID Document
- Verification
Method - Verification method (public key) in DID Document
Enums§
- DidMethod
- DID method identifier
- Service
Endpoint - Service endpoint
- Service
Type - Service type
- Verification
Method Type - Verification method type
Traits§
- Stake
Registry - Trait for stake registry implementations