Expand description
§oas-document
OAS Identity Document types and validation for the Open Agent Specification.
This crate provides the OasDocument type for representing, constructing,
and validating OAS Identity Documents as defined in OAS Specification §5.
§Key Types
OasDocument— The core identity documentDocumentBuilder— Ergonomic document constructionDocumentProof— Ed25519Signature2020 proofsLineageSection— Lineage chain dataConformanceLevel— L0/L1/L2 conformanceLifecycleStatus— Entity lifecycle states
§Example
use oas_document::builder::DocumentBuilder;
use oas_document::conformance::ConformanceLevel;
use oas_crypto::keypair::OasKeyPair;
let keypair = OasKeyPair::generate();
let doc = DocumentBuilder::new("did:oas:test:hmr:alice", "hmr")
.controller("did:oas:test:hmr:alice")
.conformance_level(ConformanceLevel::L1)
.add_verification_method(&keypair)
.name("Alice")
.build_and_sign(&keypair, "2026-01-15T00:00:00Z")
.unwrap();
assert_eq!(doc.kind, "hmr");
assert!(doc.proof.is_some());Re-exports§
pub use document::OasDocument;pub use error::DocumentError;pub use governance::GovernancePolicy;pub use governance::GovernanceSection;pub use governance::GovernanceTransition;pub use governance::GovernanceTransitionProof;
Modules§
- builder
- Builder pattern for constructing OAS Identity Documents.
- calendar
- Calendar and scheduling section for OAS Identity Documents.
- compliance
- Compliance and jurisdiction section for OAS Identity Documents.
- conformance
- Conformance level checking for OAS Identity Documents.
- contact
- Contact directory for OAS Identity Documents.
- document
- The core
OasDocumenttype representing an OAS Identity Document. - error
- Error types for OAS document operations.
- governance
- Governance types for Entity Name Record (ENR) entities.
- interop
- Interoperability section for OAS Identity Documents.
- lifecycle
- Lifecycle status management for OAS entities.
- lineage_
section - Lineage section types for OAS Identity Documents.
- operational
- Operational specification section for OAS Identity Documents.
- pricing
- Pricing and economics section for OAS Identity Documents.
- profile
- Profile section for OAS Identity Documents.
- proof_
format - Document proof generation and verification.
- relationships
- Relationships and affiliations section for OAS Identity Documents.
- reputation
- Reputation summary section for OAS Identity Documents.
- service
- Service endpoint types for OAS Identity Documents.
- verification_
method - Verification method types for OAS Identity Documents.
- visibility
- Visibility levels for access-controlled fields in OAS Identity Documents.