OpenAgentIDDocumentation
API referencenpm packages@openagentid/oas-document
OpenAgentIDAPI reference

@openagentid/oas-document

API contract shipped by @openagentid/oas-document 1.0.2. Exact exports, signatures, dependencies and availability.

All packages · Runnable examples · Start an agent

ContractValue
Package@openagentid/oas-document@1.0.2
Entry point@openagentid/oas-document
AvailabilityPublished package
Reference sourcePublished TypeScript declarations
Package enginesnode >=20

This reference is generated from the integrity-verified npm archive for this exact version. Signatures describe the public contract; they are not standalone programs. Complete examples are checked separately.

Import conditions

Use the public entry point above. The package resolves it to these shipped files; do not import its internal files directly.

ConditionPublished file
types./dist/index.d.ts
import./dist/index.js

Exports

Affiliation

Type-only declaration; it is not a runtime value.

Signature
export interface Affiliation {
    readonly did: string;
    readonly relationship: string;
    readonly label?: string;
}

Source: @openagentid/oas-document@1.0.2, dist/relationships.d.ts:1.

ApiSchema

Type-only declaration; it is not a runtime value.

Signature
export interface ApiSchema {
    readonly schemaType: string;
    readonly url: string;
    readonly version?: string;
}

Source: @openagentid/oas-document@1.0.2, dist/interop.d.ts:6.

AUTH_METHODS

Signature
declare const AUTH_METHODS: {
    readonly DID_AUTH: "did-auth";
    readonly API_KEY: "api-key";
    readonly OAUTH2: "oauth2";
    readonly MTLS: "mtls";
    readonly BEARER_TOKEN: "bearer-token";
};

Source: @openagentid/oas-document@1.0.2, dist/interop.d.ts:25.

BOOKING_TYPES

Signature
declare const BOOKING_TYPES: {
    readonly CONSULTATION: "consultation";
    readonly SUPPORT: "support";
    readonly MEETING: "meeting";
    readonly TASK: "task";
    readonly CUSTOM: "custom";
};

Source: @openagentid/oas-document@1.0.2, dist/calendar.d.ts:22.

BookingEndpoint

Type-only declaration; it is not a runtime value.

Signature
export interface BookingEndpoint {
    readonly id: string;
    readonly url: string;
    readonly label?: string;
    readonly bookingType?: string;
    readonly visibility?: Visibility;
}

Source: @openagentid/oas-document@1.0.2, dist/calendar.d.ts:8.

CalendarSection

Type-only declaration; it is not a runtime value.

Signature
export interface CalendarSection {
    readonly bookingEndpoints?: ReadonlyArray<BookingEndpoint>;
    readonly availabilityFeed?: string;
    readonly schedulingProtocol?: string;
    readonly officeHours?: ReadonlyArray<ScheduleWindow>;
    readonly timezone?: string;
}

Source: @openagentid/oas-document@1.0.2, dist/calendar.d.ts:15.

Certification

Type-only declaration; it is not a runtime value.

Signature
export interface Certification {
    readonly standard: string;
    readonly issuer?: string;
    readonly validUntil?: string;
    readonly url?: string;
}

Source: @openagentid/oas-document@1.0.2, dist/compliance.d.ts:1.

compareConformanceLevel

Compares two conformance levels.

Signature
export declare function compareConformanceLevel(a: ConformanceLevel, b: ConformanceLevel): number;

Source: @openagentid/oas-document@1.0.2, dist/conformance.d.ts:35.

ComplianceSection

Type-only declaration; it is not a runtime value.

Signature
export interface ComplianceSection {
    readonly jurisdictions?: ReadonlyArray<string>;
    readonly certifications?: ReadonlyArray<Certification>;
    readonly termsOfServiceUrl?: string;
    readonly privacyPolicyUrl?: string;
    readonly dataHandlingPolicyUrl?: string;
    readonly dataResidency?: string;
}

Source: @openagentid/oas-document@1.0.2, dist/compliance.d.ts:7.

ConformanceLevel

OAS conformance levels.

Each level represents a tier of compliance with the OAS specification. Higher levels subsume lower levels: L2 includes all L1 requirements, which includes all L0 requirements.

  • L0: Basic identity (DID, verification method, proof)
  • L1: L0 + lineage, conformance declaration, lifecycle
  • L2: L2 + full attestation chain, WASM compilation
Signature
declare const ConformanceLevel: {
    readonly L0: "L0";
    readonly L1: "L1";
    readonly L2: "L2";
};

Source: @openagentid/oas-document@1.0.2, dist/conformance.d.ts:12.

Signature
export type ConformanceLevel = (typeof ConformanceLevel)[keyof typeof ConformanceLevel];

Source: @openagentid/oas-document@1.0.2, dist/conformance.d.ts:20.

ContactEntry

Type-only declaration; it is not a runtime value.

Signature
export interface ContactEntry {
    readonly id: string;
    readonly entryType: string;
    readonly value: string;
    readonly label?: string;
    readonly platform?: string;
    readonly handle?: string;
    readonly visibility?: Visibility;
    readonly verified?: boolean;
}

Source: @openagentid/oas-document@1.0.2, dist/contact.d.ts:2.

ContactSection

Type-only declaration; it is not a runtime value.

Signature
export interface ContactSection {
    readonly entries: ReadonlyArray<ContactEntry>;
}

Source: @openagentid/oas-document@1.0.2, dist/contact.d.ts:12.

CostEntry

Type-only declaration; it is not a runtime value.

Signature
export interface CostEntry {
    readonly unit: string;
    readonly amount: string;
    readonly currency: string;
}

Source: @openagentid/oas-document@1.0.2, dist/pricing.d.ts:2.

createVerificationMethod

Creates a new verification method for a DID.

Signature
export declare function createVerificationMethod(did: string, keyNum: number, keypair: OasKeyPair): VerificationMethod;

Source: @openagentid/oas-document@1.0.2, dist/verification-method.d.ts:37.

defaultContext

Returns the default JSON-LD context array for OAS documents.

Signature
export declare function defaultContext(): ReadonlyArray<string>;

Source: @openagentid/oas-document@1.0.2, dist/document.d.ts:119.

defaultGovernancePolicy

Creates a default governance policy with standard constraints.

Signature
export declare function defaultGovernancePolicy(): GovernancePolicy;

Source: @openagentid/oas-document@1.0.2, dist/governance.d.ts:42.

DID_CONTEXT

W3C DID Document context.

Signature
declare const DID_CONTEXT: "https://www.w3.org/ns/did/v1";

Source: @openagentid/oas-document@1.0.2, dist/document.d.ts:21.

DocumentBuilder

Fluent builder for constructing OAS Identity Documents.

The builder enforces required fields and produces a signed, frozen {@link OasDocument} via the {@link DocumentBuilder.buildAndSign} method.

Signature
export declare class DocumentBuilder {
    constructor(id: string, kind: EntityKind);
    controller(controller: string | ReadonlyArray<string>): this;
    addVerificationMethod(keypair: OasKeyPair): this;
    conformanceLevel(level: ConformanceLevel): this;
    lifecycleStatus(status: LifecycleStatus): this;
    sequence(seq: number): this;
    name(name: string): this;
    description(description: string): this;
    lineage(lineage: LineageSection): this;
    addService(service: ServiceEndpoint): this;
    metadata(metadata: Record<string, unknown>): this;
    buildAndSign(keypair: OasKeyPair, created: string): Promise<OasDocument>;
}

Source: @openagentid/oas-document@1.0.2, dist/builder.d.ts:28.

DocumentError

Structured error for OAS document operations.

Signature
export declare class DocumentError extends Error {
    readonly code: DocumentErrorCode;
    readonly details: Readonly<Record<string, unknown>>;
    constructor(code: DocumentErrorCode, message: string, details?: Record<string, unknown>);
}

Source: @openagentid/oas-document@1.0.2, dist/error.d.ts:40.

DocumentErrorCode

Error codes for OAS document operations.

Signature
declare const DocumentErrorCode: {
    readonly MissingField: "MISSING_FIELD";
    readonly InvalidField: "INVALID_FIELD";
    readonly ProofVerificationFailed: "PROOF_VERIFICATION_FAILED";
    readonly ProofGenerationFailed: "PROOF_GENERATION_FAILED";
    readonly ConformanceNotMet: "CONFORMANCE_NOT_MET";
    readonly Json: "JSON_ERROR";
    readonly Did: "DID_ERROR";
    readonly Crypto: "CRYPTO_ERROR";
    readonly InvalidLifecycleTransition: "INVALID_LIFECYCLE_TRANSITION";
    readonly InvalidSequence: "INVALID_SEQUENCE";
};

Source: @openagentid/oas-document@1.0.2, dist/error.d.ts:4.

Signature
export type DocumentErrorCode = (typeof DocumentErrorCode)[keyof typeof DocumentErrorCode];

Source: @openagentid/oas-document@1.0.2, dist/error.d.ts:26.

DocumentProof

A document proof (Ed25519Signature2020) attached to an OAS Identity Document.

The proof authenticates the document content by signing the JCS-canonicalized document (excluding the proof itself) with the entity's Ed25519 key.

Type-only declaration; it is not a runtime value.

Signature
export interface DocumentProof {
    readonly type: 'Ed25519Signature2020';
    readonly created: string;
    readonly verificationMethod: string;
    readonly proofPurpose: 'assertionMethod';
    readonly proofValue: string;
}

Source: @openagentid/oas-document@1.0.2, dist/proof-format.d.ts:8.

documentWithoutProof

Creates a plain JSON object from an OasDocument, suitable for JCS canonicalization or serialization.

Strips the proof field to produce the unsigned document payload.

Signature
export declare function documentWithoutProof(doc: OasDocument): Record<string, unknown>;

Source: @openagentid/oas-document@1.0.2, dist/document.d.ts:157.

ED25519_CONTEXT

Ed25519 Verification Key 2020 context.

Signature
declare const ED25519_CONTEXT: "https://w3id.org/security/suites/ed25519-2020/v1";

Source: @openagentid/oas-document@1.0.2, dist/document.d.ts:25.

ENR_GOVERNANCE_PROOF_TYPE

The canonical proof type string for ENR governance transitions.

Signature
declare const ENR_GOVERNANCE_PROOF_TYPE: "EnrGovernanceTransitionProof2025";

Source: @openagentid/oas-document@1.0.2, dist/governance.d.ts:13.

ENTRY_TYPES

Signature
declare const ENTRY_TYPES: {
    readonly PHONE: "phone";
    readonly EMAIL: "email";
    readonly SOCIAL: "social";
    readonly WEBSITE: "website";
    readonly MESSAGING: "messaging";
};

Source: @openagentid/oas-document@1.0.2, dist/contact.d.ts:15.

extractKeyId

Extracts the key ID fragment from a verification method ID.

Signature
export declare function extractKeyId(vmId: string): string | undefined;

Source: @openagentid/oas-document@1.0.2, dist/verification-method.d.ts:44.

findVerificationMethod

Finds a verification method by ID.

Signature
export declare function findVerificationMethod(doc: OasDocument, vmId: string): VerificationMethod | undefined;

Source: @openagentid/oas-document@1.0.2, dist/document.d.ts:147.

generateDocumentProof

Generates a document proof by signing the JCS-canonicalized document.

Signature
export declare function generateDocumentProof(documentWithoutProof: Record<string, unknown>, keypair: OasKeyPair, verificationMethodId: string, created: string): Promise<DocumentProof>;

Source: @openagentid/oas-document@1.0.2, dist/proof-format.d.ts:30.

throws: {

link: DocumentError} on signing or canonicalization failure.

GovernancePolicy

Policy constraints governing how ENR transitions may occur.

Type-only declaration; it is not a runtime value.

Signature
export interface GovernancePolicy {
    readonly transitionRequires: string;
    readonly signingKeyRotationRequires: string;
    readonly maxTransitionsPerDay: number;
    readonly timelockHours: number;
}

Source: @openagentid/oas-document@1.0.2, dist/governance.d.ts:26.

GovernanceSection

Governance section attached to ENR identity documents.

Tracks the governing MHR, monotonic epoch counter, transition history, and governance policy constraints.

Invariants:

  • epoch MUST strictly increase (no gaps, no rewinds).
  • currentMhr MUST reference a valid, non-revoked MHR DID.
  • Each transition's from MUST match the previous transition's to.

Type-only declaration; it is not a runtime value.

Signature
export interface GovernanceSection {
    readonly currentMhr: string;
    readonly epoch: number;
    readonly transitions: ReadonlyArray<GovernanceTransition>;
    readonly policy: GovernancePolicy;
}

Source: @openagentid/oas-document@1.0.2, dist/governance.d.ts:96.

GovernanceTransition

A single governance transition record.

Records the handoff from one MHR to another, including the cryptographic proof (FROST threshold signature from the outgoing MHR).

Type-only declaration; it is not a runtime value.

Signature
export interface GovernanceTransition {
    readonly from?: string | undefined;
    readonly to: string;
    readonly epoch: number;
    readonly proof: GovernanceTransitionProof;
}

Source: @openagentid/oas-document@1.0.2, dist/governance.d.ts:63.

GovernanceTransitionProof

Proof that a governance transition was authorized.

Contains a FROST threshold signature from the outgoing MHR members, proving that a quorum approved the handoff.

Type-only declaration; it is not a runtime value.

Signature
export interface GovernanceTransitionProof {
    readonly type: string;
    readonly mhrThresholdSignature: string;
    readonly timestamp: string;
}

Source: @openagentid/oas-document@1.0.2, dist/governance.d.ts:49.

InteroperabilitySection

Type-only declaration; it is not a runtime value.

Signature
export interface InteroperabilitySection {
    readonly protocols?: ReadonlyArray<ProtocolSupport>;
    readonly apiSchemas?: ReadonlyArray<ApiSchema>;
    readonly authMethods?: ReadonlyArray<string>;
}

Source: @openagentid/oas-document@1.0.2, dist/interop.d.ts:11.

isRevoked

Returns true if the document has been revoked.

Signature
export declare function isRevoked(doc: OasDocument): boolean;

Source: @openagentid/oas-document@1.0.2, dist/document.d.ts:132.

isRootDocument

Returns true if the document represents a root entity (HMR, MHR, or ENR).

Signature
export declare function isRootDocument(doc: OasDocument): boolean;

Source: @openagentid/oas-document@1.0.2, dist/document.d.ts:126.

LifecycleStatus

OAS entity lifecycle statuses.

Entities progress through these statuses during their lifetime. The lifecycle is largely linear, but suspension and reactivation create branches.

Signature
declare const LifecycleStatus: {
    readonly Nascent: "nascent";
    readonly Active: "active";
    readonly Dormant: "dormant";
    readonly Suspended: "suspended";
    readonly Terminated: "terminated";
    readonly Archived: "archived";
};

Source: @openagentid/oas-document@1.0.2, dist/lifecycle.d.ts:8.

Signature
export type LifecycleStatus = (typeof LifecycleStatus)[keyof typeof LifecycleStatus];

Source: @openagentid/oas-document@1.0.2, dist/lifecycle.d.ts:22.

LineageSection

The lineage section of an OAS Identity Document.

Describes the entity's position in the derivation chain, linking it back to its human root. Root entities (HMR, MHR) do not have a lineage section.

Type-only declaration; it is not a runtime value.

Signature
export interface LineageSection {
    readonly humanRootDid: string;
    readonly creatorDid: string;
    readonly generation: number;
    readonly derivationProof?: AgentLineageProofData | undefined;
    readonly humanRootChain: ReadonlyArray<string>;
}

Source: @openagentid/oas-document@1.0.2, dist/lineage-section.d.ts:24.

meetsConformanceLevel

Returns true if level a meets or exceeds the required level b.

Signature
export declare function meetsConformanceLevel(actual: ConformanceLevel, required: ConformanceLevel): boolean;

Source: @openagentid/oas-document@1.0.2, dist/conformance.d.ts:43.

OAS_CONTEXT

OAS-specific context.

Signature
declare const OAS_CONTEXT: "https://openagent.id/ns/oas/v1";

Source: @openagentid/oas-document@1.0.2, dist/document.d.ts:29.

OAS_VERSION

Current OAS specification version.

Signature
declare const OAS_VERSION: "1.0.0";

Source: @openagentid/oas-document@1.0.2, dist/document.d.ts:33.

OasDocument

An OAS Identity Document.

This is the core identity artifact in the OAS ecosystem. It extends the W3C DID Document format with OAS-specific properties for lineage, conformance, lifecycle, and entity classification.

Documents are immutable once created. Use {@link DocumentBuilder } to construct new documents.

Type-only declaration; it is not a runtime value.

Signature
export interface OasDocument {
    readonly '@context': ReadonlyArray<string>;
    readonly id: string;
    readonly controller: string | ReadonlyArray<string>;
    readonly verificationMethod: ReadonlyArray<VerificationMethod>;
    readonly authentication: ReadonlyArray<string>;
    readonly assertionMethod: ReadonlyArray<string>;
    readonly capabilityInvocation: ReadonlyArray<string>;
    readonly capabilityDelegation: ReadonlyArray<string>;
    readonly service: ReadonlyArray<ServiceEndpoint>;
    readonly oasVersion: typeof OAS_VERSION;
    readonly kind: EntityKind;
    readonly name?: string | undefined;
    readonly description?: string | undefined;
    readonly lineage?: LineageSection | undefined;
    readonly conformanceLevel: ConformanceLevel;
    readonly lifecycleStatus?: LifecycleStatus | undefined;
    readonly sequence: number;
    readonly metadata: Readonly<Record<string, unknown>>;
    readonly proof?: DocumentProof | undefined;
    readonly revoked?: boolean | undefined;
    readonly revokedAt?: string | undefined;
    readonly profile?: ProfileSection | undefined;
    readonly contact?: ContactSection | undefined;
    readonly calendar?: CalendarSection | undefined;
    readonly operational?: OperationalSection | undefined;
    readonly pricing?: PricingSection | undefined;
    readonly interoperability?: InteroperabilitySection | undefined;
    readonly reputation?: ReputationSection | undefined;
    readonly compliance?: ComplianceSection | undefined;
    readonly relationships?: RelationshipsSection | undefined;
    readonly governance?: GovernanceSection | undefined;
}

Source: @openagentid/oas-document@1.0.2, dist/document.d.ts:52.

OperationalSection

Type-only declaration; it is not a runtime value.

Signature
export interface OperationalSection {
    readonly availability?: string;
    readonly sla?: ReadonlyArray<SlaCommitment>;
    readonly rateLimits?: ReadonlyArray<RateLimit>;
    readonly supportedInputFormats?: ReadonlyArray<string>;
    readonly supportedOutputFormats?: ReadonlyArray<string>;
    readonly maxPayloadBytes?: number;
    readonly maxContextTokens?: number;
    readonly maintenanceWindows?: ReadonlyArray<ScheduleWindow>;
}

Source: @openagentid/oas-document@1.0.2, dist/operational.d.ts:11.

PLATFORMS

Signature
declare const PLATFORMS: {
    readonly X: "x";
    readonly LINKEDIN: "linkedin";
    readonly GITHUB: "github";
    readonly DISCORD: "discord";
    readonly TELEGRAM: "telegram";
    readonly SLACK: "slack";
    readonly WHATSAPP: "whatsapp";
    readonly SIGNAL: "signal";
    readonly MASTODON: "mastodon";
    readonly BLUESKY: "bluesky";
    readonly YOUTUBE: "youtube";
    readonly INSTAGRAM: "instagram";
    readonly TIKTOK: "tiktok";
    readonly REDDIT: "reddit";
};

Source: @openagentid/oas-document@1.0.2, dist/contact.d.ts:22.

PRICING_MODELS

Signature
declare const PRICING_MODELS: {
    readonly FREE: "free";
    readonly PER_REQUEST: "per_request";
    readonly PER_TOKEN: "per_token";
    readonly SUBSCRIPTION: "subscription";
    readonly NEGOTIATED: "negotiated";
    readonly CUSTOM: "custom";
};

Source: @openagentid/oas-document@1.0.2, dist/pricing.d.ts:15.

PricingSection

Type-only declaration; it is not a runtime value.

Signature
export interface PricingSection {
    readonly model: string;
    readonly costs?: ReadonlyArray<CostEntry>;
    readonly currenciesAccepted?: ReadonlyArray<string>;
    readonly billingEndpoint?: string;
    readonly freeTierLimits?: string;
    readonly billingVisibility?: Visibility;
}

Source: @openagentid/oas-document@1.0.2, dist/pricing.d.ts:7.

primaryPublicKeyMultibase

Returns the primary public key multibase from the first verification method.

Signature
export declare function primaryPublicKeyMultibase(doc: OasDocument): string | undefined;

Source: @openagentid/oas-document@1.0.2, dist/document.d.ts:139.

ProfileSection

Type-only declaration; it is not a runtime value.

Signature
export interface ProfileSection {
    readonly avatarUrl?: string;
    readonly bannerUrl?: string;
    readonly tagline?: string;
    readonly categories?: ReadonlyArray<string>;
    readonly languages?: ReadonlyArray<string>;
    readonly timezone?: string;
    readonly accentColor?: string;
}

Source: @openagentid/oas-document@1.0.2, dist/profile.d.ts:1.

PROTOCOLS

Signature
declare const PROTOCOLS: {
    readonly MCP: "mcp";
    readonly A2A: "a2a";
    readonly REST: "rest";
    readonly GRAPHQL: "graphql";
    readonly GRPC: "grpc";
    readonly WEBSOCKET: "websocket";
    readonly OAS_MAP: "oas-map";
};

Source: @openagentid/oas-document@1.0.2, dist/interop.d.ts:16.

ProtocolSupport

Type-only declaration; it is not a runtime value.

Signature
export interface ProtocolSupport {
    readonly protocol: string;
    readonly version?: string;
    readonly endpoint?: string;
}

Source: @openagentid/oas-document@1.0.2, dist/interop.d.ts:1.

RateLimit

Type-only declaration; it is not a runtime value.

Signature
export interface RateLimit {
    readonly resource: string;
    readonly limit: number;
    readonly window: string;
}

Source: @openagentid/oas-document@1.0.2, dist/operational.d.ts:6.

RELATIONSHIP_TYPES

Signature
declare const RELATIONSHIP_TYPES: {
    readonly MEMBER: "member";
    readonly PARTNER: "partner";
    readonly SUBSIDIARY: "subsidiary";
    readonly AFFILIATE: "affiliate";
    readonly DELEGATE: "delegate";
    readonly ADVISOR: "advisor";
};

Source: @openagentid/oas-document@1.0.2, dist/relationships.d.ts:11.

RelationshipsSection

Type-only declaration; it is not a runtime value.

Signature
export interface RelationshipsSection {
    readonly parentOrganization?: string;
    readonly affiliations?: ReadonlyArray<Affiliation>;
    readonly blockedDids?: ReadonlyArray<string>;
}

Source: @openagentid/oas-document@1.0.2, dist/relationships.d.ts:6.

ReputationSection

Type-only declaration; it is not a runtime value.

Signature
export interface ReputationSection {
    readonly totalInteractions?: number;
    readonly endorsementCount?: number;
    readonly trustScore?: string;
    readonly uptime30d?: string;
    readonly uptime90d?: string;
    readonly firstActive?: string;
    readonly endorserDids?: ReadonlyArray<string>;
}

Source: @openagentid/oas-document@1.0.2, dist/reputation.d.ts:1.

ScheduleWindow

Type-only declaration; it is not a runtime value.

Signature
export interface ScheduleWindow {
    readonly day: string;
    readonly start: string;
    readonly end: string;
    readonly timezone: string;
}

Source: @openagentid/oas-document@1.0.2, dist/calendar.d.ts:2.

SCHEDULING_PROTOCOLS

Signature
declare const SCHEDULING_PROTOCOLS: {
    readonly ICAL_INVITE: "ical-invite";
    readonly API: "api";
    readonly AGENT_NEGOTIATION: "agent-negotiation";
    readonly MANUAL: "manual";
};

Source: @openagentid/oas-document@1.0.2, dist/calendar.d.ts:29.

SERVICE_TYPES

Signature
declare const SERVICE_TYPES: {
    readonly OAS_ENTITY: "OASEntity";
    readonly OAS_COMMUNICATION: "OASCommunication";
    readonly OAS_LINEAGE_QUERY: "OASLineageQuery";
    readonly OAS_ATTESTATION: "OASAttestationService";
    readonly OAS_REVOCATION_STATUS: "OASRevocationStatus";
    readonly OAS_CAPABILITY_INVOCATION: "OASCapabilityInvocation";
    readonly OAS_GOVERNANCE: "OASGovernance";
    readonly OAS_PRIVATE_ENDPOINT: "OASPrivateEndpointService";
};

Source: @openagentid/oas-document@1.0.2, dist/service.d.ts:32.

ServiceEndpoint

A service endpoint declaration in an OAS Identity Document.

Services describe how to interact with the entity — API endpoints, communication channels, discovery mechanisms, etc.

Type-only declaration; it is not a runtime value.

Signature
export interface ServiceEndpoint {
    readonly id: string;
    readonly type: string;
    readonly serviceEndpoint: string;
    readonly label?: string;
    readonly description?: string;
    readonly properties?: Readonly<Record<string, string>>;
}

Source: @openagentid/oas-document@1.0.2, dist/service.d.ts:18.

SlaCommitment

Type-only declaration; it is not a runtime value.

Signature
export interface SlaCommitment {
    readonly metric: string;
    readonly target: string;
}

Source: @openagentid/oas-document@1.0.2, dist/operational.d.ts:2.

VerificationMethod

An Ed25519 verification method in an OAS Identity Document.

Verification methods bind public keys to the DID subject, enabling signature verification on documents, proofs, and attestations.

Type-only declaration; it is not a runtime value.

Signature
export interface VerificationMethod {
    readonly id: string;
    readonly type: 'Ed25519VerificationKey2020';
    readonly controller: string;
    readonly publicKeyMultibase: string;
}

Source: @openagentid/oas-document@1.0.2, dist/verification-method.d.ts:19.

verifyDocumentProof

Verifies a document proof against the document content and a public key.

Signature
export declare function verifyDocumentProof(documentWithoutProof: Record<string, unknown>, proof: DocumentProof, publicKeyBytes: Uint8Array): Promise<boolean>;

Source: @openagentid/oas-document@1.0.2, dist/proof-format.d.ts:40.

throws: {

link: DocumentError} on decoding or verification errors.

Visibility

Type-only declaration; it is not a runtime value.

Signature
export type Visibility = 'public' | 'authenticated' | 'organization' | 'private';

Source: @openagentid/oas-document@1.0.2, dist/visibility.d.ts:1.

Supporting declarations

These package-owned declarations are referenced by the exports above. Their presence here does not make them importable from this entry point. Import only the names in Exports.

AgentLineageProofData

A verifiable proof linking a child entity to its parent in the OAS lineage chain.

AgentLineageProof2025 establishes cryptographic accountability by proving that a parent entity authorized the creation of a child entity at a specific derivation path.

The proof contains:

  • The parent and child DIDs
  • The derivation path used for HKDF key derivation
  • The parent's public key (multibase-encoded)
  • An Ed25519 signature over the canonical proof payload

See OAS Specification §9.4, §9.5 for the complete proof format.

Type-only declaration; it is not a runtime value.

Signature
export interface AgentLineageProofData {
    readonly proofType: typeof PROOF_TYPE;
    readonly parentDid: string;
    readonly childDid: string;
    readonly derivationPath: string;
    readonly algorithm: typeof PROOF_ALGORITHM;
    readonly publicKeyMultibase: string;
    readonly signature: string;
}

Source: @openagentid/oas-crypto@1.0.2, dist/proof.d.ts:40.

EntityKind

The set of recognized OAS entity kinds.

Each entity kind represents a category of autonomous entity in the OAS identity system. Root kinds ({@link EntityKind.Hmr}, {@link EntityKind.Mhr}, {@link EntityKind.Enr}) are the trust anchors from which all other entities derive their lineage.

Signature
declare const EntityKind: {
    readonly Hmr: "hmr";
    readonly Mhr: "mhr";
    readonly Enr: "enr";
    readonly Ao: "ao";
    readonly Agent: "agent";
    readonly AgentInstance: "agent:instance";
    readonly Tool: "tool";
    readonly Skill: "skill";
    readonly Workflow: "workflow";
    readonly Model: "model";
    readonly Dataset: "dataset";
    readonly Service: "service";
};

Source: @openagentid/oas-did@1.0.2, dist/kind.d.ts:18.

Signature
export type EntityKind = (typeof EntityKind)[keyof typeof EntityKind];

Source: @openagentid/oas-did@1.0.2, dist/kind.d.ts:44.

OasKeyPair

An Ed25519 keypair for an OAS entity.

Holds both the signing (private) and verifying (public) keys. The signing key is stored as a Uint8Array and should be zeroed when no longer needed.

Security

  • Private key bytes are never exposed via toString() or toJSON()
  • All signature operations use constant-time comparison internally via @noble/ed25519
  • Callers should zero the signing key bytes when the keypair is no longer needed: keypair.signingKeyBytes.fill(0)
Signature
export declare class OasKeyPair {
    static generate(): Promise<OasKeyPair>;
    static fromSigningKeyBytes(bytes: Uint8Array): Promise<OasKeyPair>;
    static verifyingKeyFromBytes(bytes: Uint8Array): Uint8Array;
    sign(message: Uint8Array): Promise<Uint8Array>;
    static verifyWithKey(publicKeyBytes: Uint8Array, message: Uint8Array, signatureBytes: Uint8Array): Promise<boolean>;
    get signingKeyBytes(): Uint8Array;
    get verifyingKeyBytes(): Uint8Array;
    publicKeyMultibase(): string;
    toString(): string;
    toJSON(): {
        verifyingKey: string;
    };
}

Source: @openagentid/oas-crypto@1.0.2, dist/keypair.d.ts:25.

PROOF_ALGORITHM

The algorithm used for key derivation in lineage proofs.

Signature
declare const PROOF_ALGORITHM: "HKDF-SHA256-Ed25519";

Source: @openagentid/oas-crypto@1.0.2, dist/proof.d.ts:9.

PROOF_TYPE

The proof type identifier for OAS lineage proofs.

Signature
declare const PROOF_TYPE: "AgentLineageProof2025";

Source: @openagentid/oas-crypto@1.0.2, dist/proof.d.ts:5.

Package requirements

Dependencies

PackagePublished range
@openagentid/oas-did1.0.2
@openagentid/oas-crypto1.0.2

Archive verification

Pinned integrity:

SHA-512 integrity
sha512-FCFQNuVXmYDVoDoR5+9S31CO6H4xdOUq4z7FlheHRxRRwNHTrZtCRRUwP4ycnblWXu7eT6cXdWOXeo1lx0Vm8A==

Machine-readable API manifest · Coverage

On this page