OpenAgentID documentation
Source referencesRust module referenceoas-document

oas-document · crate

Declared module signatures, types, configuration, and source documentation.

Source: oas/oas/oas-document/src/lib.rs. SHA-256: ae6cedb59a5abc8a4b74aaa59115ee9c7fab1f715ea69bf7870a264daf7434d3.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

builder

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

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());
pub mod builder;

Source line: 37.

calendar

pub mod calendar;

Source line: 38.

compliance

pub mod compliance;

Source line: 39.

conformance

pub mod conformance;

Source line: 40.

contact

pub mod contact;

Source line: 41.

document

pub mod document;

Source line: 42.

error

pub mod error;

Source line: 43.

governance

pub mod governance;

Source line: 44.

interop

pub mod interop;

Source line: 45.

lifecycle

pub mod lifecycle;

Source line: 46.

lineage_section

pub mod lineage_section;

Source line: 47.

operational

pub mod operational;

Source line: 48.

pricing

pub mod pricing;

Source line: 49.

profile

pub mod profile;

Source line: 50.

proof_format

pub mod proof_format;

Source line: 51.

relationships

pub mod relationships;

Source line: 52.

reputation

pub mod reputation;

Source line: 53.

service

pub mod service;

Source line: 54.

verification_method

pub mod verification_method;

Source line: 55.

visibility

pub mod visibility;

Source line: 56.

pub use document::OasDocument;

pub use document::OasDocument;

Source line: 58.

pub use error::DocumentError;

pub use error::DocumentError;

Source line: 59.

pub use governance::{

GovernancePolicy, GovernanceSection, GovernanceTransition, GovernanceTransitionProof, };

pub use governance::{
    GovernancePolicy, GovernanceSection, GovernanceTransition, GovernanceTransitionProof,
};

Source line: 60.

On this page