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

@openagentid/oas-vanilla

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

All packages · Runnable examples · Start an agent

ContractValue
Package@openagentid/oas-vanilla@1.0.2
Entry point@openagentid/oas-vanilla
AvailabilityPublished package
Reference sourcePublished JavaScript and JSDoc (inferred types)
Package enginesnode >=20.0.0

Entry points

Before integrating

Publishes JavaScript with JSDoc, not TypeScript declarations. Inferred signatures are labeled separately.

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.

This package ships JavaScript with JSDoc, not .d.ts files. The signatures below are inferred from that published source. An inferred any reflects missing type information in the package.

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
default./src/index.js

Exports

Affiliation

An affiliation with another entity.

Signature
declare class Affiliation {
  constructor(fields: any);
  static fromJSON(obj: any): Affiliation;
  did: string;
  relationship: string;
  label: string;
  toJSON(): { did: string; relationship: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:522.

AgentLineageProof

Agent lineage proof with migration-compatible optional security bindings.

Legacy instances remain parseable, but every verification method rejects them with LegacyInsecureProof.

Signature
declare class AgentLineageProof {
  constructor(fields: Record<string, any>);
  static generate(parentKeypair: any, parentDid: any, childDid: any, derivationPath: any): Promise<AgentLineageProof>;
  static generateBound(parentKeypair: OasKeyPair, binding: { parentDid: string; childDid: string; derivationPath: string; verificationMethod: string; childVerificationMethod: string; childPublicKeyMultibase: string; parentDocumentDigest: string; parentDocumentSequence: number; generation: number; }): Promise<AgentLineageProof>;
  static fromJSON(input: any): AgentLineageProof;
  type: any;
  parentDid: any;
  childDid: any;
  derivationPath: any;
  algorithm: any;
  publicKeyMultibase: any;
  verificationMethod: any;
  proofPurpose: any;
  canonicalization: any;
  childVerificationMethod: any;
  childPublicKeyMultibase: any;
  parentDocumentDigest: any;
  parentDocumentSequence: any;
  generation: any;
  signature: any;
  verify(): Promise<void>;
  verifyWithKey(trustedPublicKey: Uint8Array | string): Promise<void>;
  toJSON(): Record<string, string | number>;
}

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/proof.js:49.

ApiSchema

An API schema reference.

Signature
declare class ApiSchema {
  constructor(fields: any);
  static fromJSON(obj: any): ApiSchema;
  schemaType: string;
  url: string;
  version: string;
  toJSON(): { schemaType: string; url: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:370.

AttestationError

Error class for OAS attestation operations.

Signature
declare class AttestationError {
  constructor(code: string, message: string);
  code: string;
  name: string;
}

Source: @openagentid/oas-vanilla@1.0.2, src/attestation/errors.js:19.

extends: Error

AttestationErrorCode

Error codes for OAS attestation operations.

Signature
declare const AttestationErrorCode: Readonly<{ INVALID_CREDENTIAL: "INVALID_CREDENTIAL"; SIGNING_FAILED: "SIGNING_FAILED"; VERIFICATION_FAILED: "VERIFICATION_FAILED"; MISSING_FIELD: "MISSING_FIELD"; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/attestation/errors.js:8.

readonly:

enum:

AttestationType

Standard attestation types per OAS Specification §10.

Signature
declare const AttestationType: Readonly<{ LIVENESS: "LivenessAttestation"; CAPABILITY: "CapabilityAttestation"; CONFORMANCE: "ConformanceAttestation"; TRUST: "TrustAttestation"; MEMBERSHIP: "MembershipAttestation"; CLASSIFICATION: "ClassificationAttestation"; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/attestation/types.js:9.

readonly:

enum:

base58btcDecode

Decodes a base58btc string to a Uint8Array.

Signature
declare function base58btcDecode(str: string): Uint8Array;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/encoding.js:80.

throws: {CryptoError} If the string contains invalid base58 characters.

base58btcEncode

Encodes a Uint8Array as base58btc.

Signature
declare function base58btcEncode(bytes: Uint8Array): string;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/encoding.js:24.

base64urlDecode

Decodes a base64url string (RFC 4648 §5) into raw bytes.

Accepts input with or without padding.

Signature
declare function base64urlDecode(encoded: string): Uint8Array;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/encoding.js:226.

throws: {CryptoError} If the input is not valid base64url.

base64urlEncode

Encodes bytes as base64url without padding (RFC 4648 §5).

This is the canonical encoding for Ed25519 signatures in OAS.

Signature
declare function base64urlEncode(bytes: Uint8Array): string;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/encoding.js:184.

blake3Hash

Computes the BLAKE3 hash of the given data.

Returns the 32-byte hash as a Uint8Array.

Signature
declare function blake3Hash(data: Uint8Array): Uint8Array;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/hashing.js:170.

blake3HashHex

Computes the BLAKE3 hash and returns it as a hex string.

Signature
declare function blake3HashHex(data: Uint8Array): string;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/hashing.js:302.

BookingEndpoint

A booking endpoint for scheduling interactions.

Signature
declare class BookingEndpoint {
  constructor(fields: any);
  static fromJSON(obj: any): BookingEndpoint;
  id: string;
  url: string;
  label: string;
  bookingType: string;
  visibility: string;
  toJSON(): { id: string; url: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:130.

CachingResolver

A caching resolver that wraps another resolver.

Caches resolved documents in memory to avoid redundant lookups. Entries expire after a configurable TTL.

Signature
declare class CachingResolver {
  constructor(inner: { resolve: (did: string) => Promise<import("../document/document.js").OasDocument>; }, ttlMs?: number);
  _inner: { resolve: (did: string) => Promise<import("../document/document.js").OasDocument>; };
  _ttlMs: number;
  _cache: Map<string, { doc: import("../document/document.js").OasDocument; expiry: number; }>;
  resolve(did: string): Promise<import("../document/document.js").OasDocument>;
  clear(): void;
  size: number;
}

Source: @openagentid/oas-vanilla@1.0.2, src/resolve/cache.js:14.

CalendarSection

Calendar & scheduling section.

Signature
declare class CalendarSection {
  constructor(fields?: {});
  static fromJSON(obj: any): CalendarSection;
  bookingEndpoints: BookingEndpoint[];
  availabilityFeed: string;
  schedulingProtocol: string;
  officeHours: ScheduleWindow[];
  timezone: string;
  toJSON(): { bookingEndpoints: { id: string; url: string; }[]; availabilityFeed: string; schedulingProtocol: string; officeHours: { day: string; start: string; end: string; }[]; timezone: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:159.

canonicalDocumentDigest

Computes a Rust-compatible digest of an OAS document's JSON wire form.

Signature
declare function canonicalDocumentDigest(document: OasDocument | object): string;

Source: @openagentid/oas-vanilla@1.0.2, src/document/document.js:339.

canonicalize

Canonicalizes a JavaScript value using JCS (RFC 8785).

Produces a deterministic byte representation where object keys are sorted lexicographically and no insignificant whitespace is present. Numbers are serialized according to ECMAScript's Number.toString() which matches RFC 8785 requirements.

Signature
declare function canonicalize(value: any): Uint8Array;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/jcs.js:25.

throws: {CryptoError} If the value cannot be canonicalized.

canonicalProofPayload

Constructs exact RFC 8785 UTF-8 bytes for a strict proof.

Signature
declare function canonicalProofPayload(proof: AgentLineageProof | Record<string, any>): Uint8Array;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/proof.js:412.

Certification

A compliance certification.

Signature
declare class Certification {
  constructor(fields: any);
  static fromJSON(obj: any): Certification;
  standard: string;
  issuer: string;
  validUntil: string;
  toJSON(): { standard: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:461.

ComplianceSection

Compliance & jurisdiction section.

Signature
declare class ComplianceSection {
  constructor(fields?: {});
  static fromJSON(obj: any): ComplianceSection;
  jurisdictions: string[];
  certifications: Certification[];
  termsOfServiceUrl: string;
  privacyPolicyUrl: string;
  dataHandlingPolicyUrl: string;
  dataResidency: string;
  toJSON(): { jurisdictions: string[]; certifications: { standard: string; }[]; termsOfServiceUrl: string; privacyPolicyUrl: string; dataHandlingPolicyUrl: string; dataResidency: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:485.

componentCount

Returns the number of DID components this kind consumes.

Most kinds are a single component (e.g., agent), but agent:instance is a compound kind that consumes two components (agent + instance).

Signature
declare function componentCount(kind: string): number;

Source: @openagentid/oas-vanilla@1.0.2, src/did/kind.js:103.

ConformanceLevel

OAS conformance levels.

L0 = Basic (identity + document structure) L1 = Accountable (L0 + lineage + proofs) L2 = Full (L1 + WASM + on-chain deployment)

Signature
declare const ConformanceLevel: Readonly<{ L0: "L0"; L1: "L1"; L2: "L2"; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/document/conformance.js:13.

readonly:

enum:

ContactEntry

A single contact directory entry.

Signature
declare class ContactEntry {
  constructor(fields: any);
  static fromJSON(obj: any): ContactEntry;
  id: string;
  entryType: string;
  value: string;
  label: string;
  platform: string;
  handle: string;
  visibility: string;
  verified: boolean;
  toJSON(): { id: string; entryType: string; value: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:47.

ContactSection

Contact directory section.

Signature
declare class ContactSection {
  constructor(fields?: {});
  static fromJSON(obj: any): ContactSection;
  entries: ContactEntry[];
  toJSON(): { entries?: undefined; } | { entries: { id: string; entryType: string; value: string; }[]; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:84.

CostEntry

A cost/fee entry.

Signature
declare class CostEntry {
  constructor(fields: any);
  static fromJSON(obj: any): CostEntry;
  description: string;
  amount: string;
  currency: string;
  unit: string;
  toJSON(): { description: string; amount: string; currency: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:284.

CreatedIdentity

The result of creating a new root identity.

Contains the signed identity document and the keypair used to sign it. The caller is responsible for securely storing the keypair.

Signature
declare class CreatedIdentity {
  constructor(document: OasDocument, keypair: OasKeyPair);
  document: OasDocument;
  keypair: OasKeyPair;
  toString(): string;
  toJSON(): object;
}

Source: @openagentid/oas-vanilla@1.0.2, src/sdk/identity.js:15.

createGovernancePolicy

Creates a GovernancePolicy with the given or default constraints.

Signature
declare function createGovernancePolicy(fields?: { transitionRequires?: string; signingKeyRotationRequires?: string; maxTransitionsPerDay?: number; timelockHours?: number; }): GovernancePolicy;

Source: @openagentid/oas-vanilla@1.0.2, src/document/governance.js:31.

createGovernanceSection

Creates a GovernanceSection for an ENR identity document.

Signature
declare function createGovernanceSection(fields: { currentMhr: string; epoch: number; transitions?: GovernanceTransition[]; policy: GovernancePolicy; }): GovernanceSection;

Source: @openagentid/oas-vanilla@1.0.2, src/document/governance.js:117.

createGovernanceTransition

Creates a GovernanceTransition record.

Signature
declare function createGovernanceTransition(fields: { from?: string | null; to: string; epoch: number; proof: GovernanceTransitionProof; }): GovernanceTransition;

Source: @openagentid/oas-vanilla@1.0.2, src/document/governance.js:82.

createGovernanceTransitionProof

Creates a GovernanceTransitionProof.

Signature
declare function createGovernanceTransitionProof(fields: { type: string; mhrThresholdSignature: string; timestamp: string; }): GovernanceTransitionProof;

Source: @openagentid/oas-vanilla@1.0.2, src/document/governance.js:57.

createHmr

Creates a new Human Root (HMR) identity.

Generates a fresh Ed25519 keypair, constructs an OAS Identity Document for a did:oas:<namespace>:hmr:<identifier> DID, and signs it.

Signature
declare function createHmr(namespace: string, identifier: string, created: string): Promise<CreatedIdentity>;

Source: @openagentid/oas-vanilla@1.0.2, src/sdk/identity.js:63.

throws: {OasError} If DID construction or document building fails.

createMhr

Creates a new Multi-Human Root (MHR) identity.

Similar to createHmr but for machine-originated root entities.

Signature
declare function createMhr(namespace: string, identifier: string, created: string): Promise<CreatedIdentity>;

Source: @openagentid/oas-vanilla@1.0.2, src/sdk/identity.js:99.

throws: {OasError}

createRootWithKeypair

Creates a new root identity with a pre-existing keypair.

Signature
declare function createRootWithKeypair(namespace: string, kind: string, identifier: string, keypair: OasKeyPair, created: string): Promise<import("../document/document.js").OasDocument>;

Source: @openagentid/oas-vanilla@1.0.2, src/sdk/identity.js:135.

throws: {OasError}

createVerifyLineageRequest

Builds a frozen authorization request. Structural-only or migration results cannot be converted into this request shape.

Signature
declare function createVerifyLineageRequest(document: import("../document/document.js").OasDocument, provider: any, options: VerifyConfig): Readonly<VerifyLineageRequest>;

Source: @openagentid/oas-vanilla@1.0.2, src/lineage/verify.js:43.

CryptoError

Error class for OAS cryptographic operations.

Every variant includes enough context to diagnose the issue without requiring access to private key material.

Signature
declare class CryptoError {
  constructor(code: string, message: string);
  code: string;
  name: string;
}

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/errors.js:39.

extends: Error

CryptoErrorCode

Error codes for OAS cryptographic operations.

Signature
declare const CryptoErrorCode: Readonly<{ INVALID_SIGNATURE: "INVALID_SIGNATURE"; INVALID_KEY_LENGTH: "INVALID_KEY_LENGTH"; DERIVATION_FAILED: "DERIVATION_FAILED"; MULTIBASE_DECODE_FAILED: "MULTIBASE_DECODE_FAILED"; BASE64_DECODE_FAILED: "BASE64_DECODE_FAILED"; CANONICALIZATION_FAILED: "CANONICALIZATION_FAILED"; INVALID_PROOF_PAYLOAD: "INVALID_PROOF_PAYLOAD"; LEGACY_INSECURE_PROOF: "LegacyInsecureProof"; VERIFIER_TRUST_REQUIRED: "VerifierTrustRequired"; UNSUPPORTED_PROOF_TYPE: "UnsupportedProofType"; UNSUPPORTED_PROOF_ALGORITHM: "UnsupportedProofAlgorithm"; UNSUPPORTED_CANONICALIZATION: "UnsupportedCanonicalization"; UNSUPPORTED_PROOF_PURPOSE: "UnsupportedProofPurpose"; EMBEDDED_KEY_MISMATCH: "EmbeddedKeyMismatch"; KEY_CONSTRUCTION_FAILED: "KEY_CONSTRUCTION_FAILED"; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/errors.js:9.

readonly:

enum:

DEFAULT_MAX_TRANSITIONS_PER_DAY

Default maximum transitions per 24-hour period.

Signature
declare const DEFAULT_MAX_TRANSITIONS_PER_DAY: 1;

Source: @openagentid/oas-vanilla@1.0.2, src/document/governance.js:12.

DEFAULT_TIMELOCK_HOURS

Default timelock delay in hours.

Signature
declare const DEFAULT_TIMELOCK_HOURS: 24;

Source: @openagentid/oas-vanilla@1.0.2, src/document/governance.js:15.

defaultContext

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

Signature
declare function defaultContext(): string[];

Source: @openagentid/oas-vanilla@1.0.2, src/document/document.js:42.

deriveChild

Derives a child entity from a parent, producing a complete signed document.

This is the highest-level derivation API. It:

  1. Derives a child keypair via HKDF-SHA256
  2. Generates an AgentLineageProof2025
  3. Builds and signs a complete OAS Identity Document
Signature
declare function deriveChild(parentKeypair: import("../crypto/keypair.js").OasKeyPair, parentDoc: import("../document/document.js").OasDocument, childKind: string, childIdentifier: string, derivationPath: string, created: string, options?: { conformanceLevel?: string; name?: string; description?: string; lifecycleStatus?: string; }): Promise<{ document: import("../document/document.js").OasDocument; keypair: import("../crypto/keypair.js").OasKeyPair; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/sdk/lineage.js:37.

throws: {OasError}

deriveChildEntity

Derives a new child entity from a parent, producing a keypair and lineage.

Performs the complete child entity derivation workflow per OAS Spec §9:

  1. Derives a child Ed25519 keypair using HKDF-SHA256 (§9.3).
  2. Generates an AgentLineageProof2025 (§9.4).
  3. Constructs a complete LineageSection with the correct humanRootDid, creatorDid, generation, and humanRootChain.
Signature
declare function deriveChildEntity(parentKeypair: import("../crypto/keypair.js").OasKeyPair, parentDoc: import("../document/document.js").OasDocument, childDid: string, derivationPath: string): Promise<DerivedChild>;

Source: @openagentid/oas-vanilla@1.0.2, src/lineage/derive.js:54.

throws: {LineageError} If the parent is a non-root entity without lineage, or if key derivation or proof generation fails.

deriveChildKeypair

Derives a child Ed25519 keypair from a parent keypair using HKDF-SHA256.

Implements the key derivation algorithm from OAS Specification §9.3.

Signature
declare function deriveChildKeypair(parent: OasKeyPair, derivationPath: string): Promise<OasKeyPair>;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/derivation.js:100.

throws: {CryptoError} If HKDF expansion fails.

DerivedChild

The result of deriving a child entity.

Contains the child's Ed25519 keypair and a complete LineageSection ready to be included in the child's identity document.

Signature
declare class DerivedChild {
  constructor(keypair: OasKeyPair, lineage: LineageSection);
  keypair: OasKeyPair;
  lineage: LineageSection;
}

Source: @openagentid/oas-vanilla@1.0.2, src/lineage/derive.js:16.

deriveKeyMaterial

Derives raw 32-byte key material using HKDF-SHA256 via Web Crypto API.

This is the lower-level function that performs the actual HKDF computation. Use {@link deriveChildKeypair} for the full keypair derivation workflow.

OAS Spec §9.3 -- Key Derivation

Signature
declare function deriveKeyMaterial(ikm: Uint8Array, salt: Uint8Array, info: string): Promise<Uint8Array>;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/derivation.js:50.

throws: {CryptoError} If HKDF fails.

DID_CONTEXT

The W3C DID context URI.

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

Source: @openagentid/oas-vanilla@1.0.2, src/document/document.js:30.

DidError

Error class for DID parsing and validation failures.

Every instance includes a code property from {@link DidErrorCode} and an actionable error message describing what went wrong.

Signature
declare class DidError {
  constructor(code: string, message: string);
  code: string;
  name: string;
}

Source: @openagentid/oas-vanilla@1.0.2, src/did/errors.js:34.

extends: Error

DidErrorCode

Error codes for DID parsing and validation failures.

Signature
declare const DidErrorCode: Readonly<{ EMPTY: "EMPTY"; INVALID_PREFIX: "INVALID_PREFIX"; TOO_FEW_COMPONENTS: "TOO_FEW_COMPONENTS"; INVALID_NAMESPACE: "INVALID_NAMESPACE"; UNKNOWN_ENTITY_KIND: "UNKNOWN_ENTITY_KIND"; INVALID_IDENTIFIER: "INVALID_IDENTIFIER"; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/did/errors.js:10.

readonly:

enum:

DOCUMENT_PROOF_TYPE

The fixed proof type for OAS document proofs.

Signature
declare const DOCUMENT_PROOF_TYPE: "Ed25519Signature2020";

Source: @openagentid/oas-vanilla@1.0.2, src/document/proof-format.js:13.

DocumentBuilder

Builder for constructing OasDocument instances.

Provides an ergonomic API for building OAS Identity Documents with proper defaults and validation.

Signature
declare class DocumentBuilder {
  constructor(id: string, kind: string);
  _id: string;
  _kind: string;
  _controller: string;
  _verificationMethods: VerificationMethod[];
  _authentication: string[];
  _assertionMethod: string[];
  _capabilityInvocation: string[];
  _capabilityDelegation: string[];
  _services: ServiceEndpoint[];
  _name: string;
  _description: string;
  _lineage: LineageSection;
  _conformanceLevel: string;
  _lifecycleStatus: string;
  _sequence: number;
  _profile: ProfileSection;
  _contact: ContactSection;
  _calendar: CalendarSection;
  _operational: OperationalSection;
  _pricing: PricingSection;
  _interoperability: InteroperabilitySection;
  _reputation: ReputationSection;
  _compliance: ComplianceSection;
  _relationships: RelationshipsSection;
  controller(controller: string): DocumentBuilder;
  addVerificationMethod(keypair: OasKeyPair): DocumentBuilder;
  conformanceLevel(level: string): DocumentBuilder;
  name(name: string): DocumentBuilder;
  description(description: string): DocumentBuilder;
  lineage(lineage: import("./lineage-section.js").LineageSection): DocumentBuilder;
  lifecycleStatus(status: string): DocumentBuilder;
  sequence(seq: number): DocumentBuilder;
  addService(service: import("./service.js").ServiceEndpoint): DocumentBuilder;
  profile(profile: import("./extensions.js").ProfileSection): DocumentBuilder;
  contact(contact: import("./extensions.js").ContactSection): DocumentBuilder;
  calendar(calendar: import("./extensions.js").CalendarSection): DocumentBuilder;
  operational(operational: import("./extensions.js").OperationalSection): DocumentBuilder;
  pricing(pricing: import("./extensions.js").PricingSection): DocumentBuilder;
  interoperability(interop: import("./extensions.js").InteroperabilitySection): DocumentBuilder;
  reputation(reputation: import("./extensions.js").ReputationSection): DocumentBuilder;
  compliance(compliance: import("./extensions.js").ComplianceSection): DocumentBuilder;
  relationships(relationships: import("./extensions.js").RelationshipsSection): DocumentBuilder;
  buildAndSign(signingKeypair: OasKeyPair, created: string): Promise<OasDocument>;
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/builder.js:26.

DocumentError

Error class for OAS document operations.

Signature
declare class DocumentError {
  constructor(code: string, message: string);
  code: string;
  name: string;
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/errors.js:25.

extends: Error

DocumentErrorCode

Error codes for OAS document operations.

Signature
declare const DocumentErrorCode: Readonly<{ PROOF_GENERATION_FAILED: "PROOF_GENERATION_FAILED"; PROOF_VERIFICATION_FAILED: "PROOF_VERIFICATION_FAILED"; MISSING_VERIFICATION_METHOD: "MISSING_VERIFICATION_METHOD"; INVALID_DOCUMENT: "INVALID_DOCUMENT"; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/document/errors.js:9.

readonly:

enum:

DocumentProof

An Ed25519Signature2020 document proof.

OAS Spec §5.5

Signature
declare class DocumentProof {
  constructor(fields: { type: string; created: string; verificationMethod: string; proofPurpose: string; proofValue: string; });
  static generate(documentObj: object, keypair: OasKeyPair, verificationMethodId: string, created: string): Promise<DocumentProof>;
  static fromJSON(obj: object): DocumentProof;
  type: string;
  created: string;
  verificationMethod: string;
  proofPurpose: string;
  proofValue: string;
  verify(documentObj: object, publicKeyBytes: Uint8Array): Promise<void>;
  toJSON(): object;
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/proof-format.js:24.

ED25519_CONTEXT

The Ed25519 2020 suite context URI.

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

Source: @openagentid/oas-vanilla@1.0.2, src/document/document.js:33.

ENR_GOVERNANCE_PROOF_TYPE

The canonical proof type string for ENR governance transitions.

Signature
declare const ENR_GOVERNANCE_PROOF_TYPE: "EnrGovernanceTransitionProof2025";

Source: @openagentid/oas-vanilla@1.0.2, src/document/governance.js:9.

EntityKind

The 12 entity kinds defined in OAS Specification §4.

Each kind represents a category of autonomous entity with distinct identity requirements and lineage constraints.

Signature
declare const EntityKind: Readonly<{ HMR: "hmr"; MHR: "mhr"; ENR: "enr"; AO: "ao"; AGENT: "agent"; AGENT_INSTANCE: "agent:instance"; TOOL: "tool"; SKILL: "skill"; WORKFLOW: "workflow"; MODEL: "model"; DATASET: "dataset"; SERVICE: "service"; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/did/kind.js:19.

readonly:

enum: *

FallbackResolver

A fallback resolver that tries multiple resolvers in sequence.

Attempts each resolver in order until one succeeds. If all fail, throws the last error encountered.

Signature
declare class FallbackResolver {
  constructor(resolvers: { resolve: (did: string) => Promise<import("../document/document.js").OasDocument>; }[]);
  _resolvers: { resolve: (did: string) => Promise<import("../document/document.js").OasDocument>; }[];
  resolve(did: string): Promise<import("../document/document.js").OasDocument>;
}

Source: @openagentid/oas-vanilla@1.0.2, src/resolve/fallback.js:16.

governanceSectionFromJSON

Parses a GovernanceSection from a plain object.

Signature
declare function governanceSectionFromJSON(obj: object): GovernanceSection;

Source: @openagentid/oas-vanilla@1.0.2, src/document/governance.js:166.

hexDecode

Decodes a hex string to a Uint8Array.

Signature
declare function hexDecode(hex: string): Uint8Array;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/encoding.js:292.

hexEncode

Encodes a Uint8Array as a hex string.

Signature
declare function hexEncode(bytes: Uint8Array): string;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/encoding.js:278.

InMemoryProvider

An in-memory document provider for testing and development.

Stores documents in a Map keyed by DID string. Useful for unit tests that need to verify lineage chains without network access.

Signature
declare class InMemoryProvider {
  constructor();
  _documents: Map<string, OasDocument>;
  register(doc: import("../document/document.js").OasDocument): void;
  resolve(did: string): import("../document/document.js").OasDocument;
  size: number;
  isEmpty: boolean;
}

Source: @openagentid/oas-vanilla@1.0.2, src/lineage/provider.js:23.

InMemoryResolver

An in-memory resolver for testing and development.

Stores documents in a Map keyed by DID string.

Signature
declare class InMemoryResolver {
  constructor();
  _documents: Map<string, OasDocument>;
  register(doc: import("../document/document.js").OasDocument): void;
  resolve(did: string): Promise<import("../document/document.js").OasDocument>;
  size: number;
}

Source: @openagentid/oas-vanilla@1.0.2, src/resolve/memory.js:16.

InteroperabilitySection

Interoperability section.

Signature
declare class InteroperabilitySection {
  constructor(fields?: {});
  static fromJSON(obj: any): InteroperabilitySection;
  protocols: ProtocolSupport[];
  apiSchemas: ApiSchema[];
  authMethods: string[];
  toJSON(): { protocols: { protocol: string; }[]; apiSchemas: { schemaType: string; url: string; }[]; authMethods: string[]; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:393.

isPublicVisibility

Returns true if the visibility level is public (stored on DHT).

Signature
declare function isPublicVisibility(visibility: string): boolean;

Source: @openagentid/oas-vanilla@1.0.2, src/document/visibility.js:29.

isRedactedOnDht

Returns true if the field should be redacted on the DHT.

Signature
declare function isRedactedOnDht(visibility: string): boolean;

Source: @openagentid/oas-vanilla@1.0.2, src/document/visibility.js:38.

isRoot

Returns true if the given kind is a root entity (HMR, MHR, or ENR).

Root entities have no parent and no lineage section.

Signature
declare function isRoot(kind: string): boolean;

Source: @openagentid/oas-vanilla@1.0.2, src/did/kind.js:62.

LifecycleStatus

OAS identity lifecycle statuses.

Signature
declare const LifecycleStatus: Readonly<{ NASCENT: "nascent"; ACTIVE: "active"; DORMANT: "dormant"; SUSPENDED: "suspended"; TERMINATED: "terminated"; ARCHIVED: "archived"; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/document/lifecycle.js:9.

readonly:

enum:

LineageError

Error class for OAS lineage operations.

Signature
declare class LineageError {
  constructor(code: string, message: string);
  code: string;
  name: string;
}

Source: @openagentid/oas-vanilla@1.0.2, src/lineage/errors.js:47.

extends: Error

LineageErrorCode

Error codes for OAS lineage operations.

Signature
declare const LineageErrorCode: Readonly<{ MISSING_LINEAGE: "MISSING_LINEAGE"; EMPTY_CHAIN: "EMPTY_CHAIN"; CHAIN_NOT_TERMINATING_AT_ROOT: "CHAIN_NOT_TERMINATING_AT_ROOT"; GENERATION_MISMATCH: "GENERATION_MISMATCH"; CHAIN_TOO_DEEP: "CHAIN_TOO_DEEP"; MISSING_DERIVATION_PROOF: "MISSING_DERIVATION_PROOF"; UNKNOWN_PROOF_TYPE: "UNKNOWN_PROOF_TYPE"; PROOF_PARENT_MISMATCH: "PROOF_PARENT_MISMATCH"; PROOF_CHILD_MISMATCH: "PROOF_CHILD_MISMATCH"; PROOF_SIGNATURE_INVALID: "PROOF_SIGNATURE_INVALID"; PARENT_REVOKED: "PARENT_REVOKED"; PARENT_KEY_NOT_FOUND: "PARENT_KEY_NOT_FOUND"; PARENT_SIGNATURE_INVALID: "PARENT_SIGNATURE_INVALID"; RESOLUTION_FAILED: "RESOLUTION_FAILED"; TOTAL_TIMEOUT: "TOTAL_TIMEOUT"; CRYPTO_ERROR: "CRYPTO_ERROR"; LEGACY_INSECURE_PROOF: "LegacyInsecureProof"; UNTRUSTED_ROOT: "UntrustedRoot"; PARENT_KEY_MISMATCH: "ParentKeyMismatch"; CHILD_KEY_MISMATCH: "ChildKeyMismatch"; PARENT_DOCUMENT_MISMATCH: "ParentDocumentMismatch"; INVALID_KEY_PURPOSE: "InvalidKeyPurpose"; CHAIN_CYCLE: "ChainCycle"; DOCUMENT_REVOKED: "DocumentRevoked"; DOCUMENT_INACTIVE: "DocumentInactive"; CHAIN_CONTINUITY: "ChainContinuity"; UNSUPPORTED_PROOF_ALGORITHM: "UnsupportedProofAlgorithm"; UNSUPPORTED_CANONICALIZATION: "UnsupportedCanonicalization"; UNSUPPORTED_PROOF_PURPOSE: "UnsupportedProofPurpose"; VERIFIER_TRUST_REQUIRED: "VerifierTrustRequired"; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/lineage/errors.js:9.

readonly:

enum:

LineageSection

The lineage section of an OAS Identity Document.

Contains the cryptographic chain linking an entity to its human root. Required for L1+ conformance on non-root entities.

OAS Spec §8

Signature
declare class LineageSection {
  constructor(fields: { humanRootDid: string; creatorDid: string; generation: number; derivationProof?: AgentLineageProof | null; humanRootChain: string[]; });
  static fromJSON(obj: object): LineageSection;
  humanRootDid: string;
  creatorDid: string;
  generation: number;
  derivationProof: AgentLineageProof;
  humanRootChain: string[];
  toJSON(): object;
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/lineage-section.js:23.

multibaseDecode

Decodes a multibase base58btc string (with z prefix) into raw bytes.

Signature
declare function multibaseDecode(encoded: string): Uint8Array;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/encoding.js:154.

throws: {CryptoError} If the string does not start with z or decoding fails.

multibaseEncode

Encodes bytes as multibase base58btc with the z prefix.

This is the canonical encoding for Ed25519 public keys in OAS Identity Documents and AgentLineageProof2025 structures (OAS Spec §11.1).

Signature
declare function multibaseEncode(bytes: Uint8Array): string;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/encoding.js:139.

OAS_CONTEXT

The OAS JSON-LD context URI.

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

Source: @openagentid/oas-vanilla@1.0.2, src/document/document.js:27.

OAS_VERSION

The current OAS specification version.

Signature
declare const OAS_VERSION: "1.0.0";

Source: @openagentid/oas-vanilla@1.0.2, src/document/document.js:36.

OasCredential

An OAS Verifiable Credential.

Implements W3C Verifiable Credentials adapted for OAS entities, with Ed25519Signature2020 proofs.

Signature
declare class OasCredential {
  constructor(fields: { context: string[]; id: string; type: string[]; issuer: string; issuanceDate: string; expirationDate?: string | null; credentialSubject: { id: string; claims: object; }; proof?: object | null; });
  static build(): CredentialBuilder;
  static fromJSON(obj: object): OasCredential;
  context: string[];
  id: string;
  type: string[];
  issuer: string;
  issuanceDate: string;
  expirationDate: string;
  credentialSubject: { id: string; claims: object; };
  proof: any;
  toJSON(): object;
}

Source: @openagentid/oas-vanilla@1.0.2, src/attestation/credential.js:28.

OasDid

A parsed and validated did:oas decentralized identifier.

An OasDid guarantees that the contained identifier conforms to the syntax rules in OAS Specification §3.1. It is the primary type for working with OAS identifiers throughout the SDK.

Format: did:oas:&lt;namespace&gt;:&lt;kind&gt;:&lt;identifier&gt; For compound kind agent:instance: did:oas:&lt;namespace&gt;:agent:instance:&lt;identifier&gt;

Signature
declare class OasDid {
  constructor(namespace: string, kind: string, identifier: string);
  static parse(input: string): OasDid;
  namespace: string;
  kind: string;
  identifier: string;
  isRoot: boolean;
  toString(): string;
  toJSON(): string;
}

Source: @openagentid/oas-vanilla@1.0.2, src/did/did.js:24.

OasDocument

An OAS Identity Document as defined in OAS Specification §5.

This is the canonical representation of an autonomous entity's identity, extending the W3C DID Document with OAS-specific properties.

Signature
declare class OasDocument {
  constructor(fields: { context: string[]; id: string; controller: string; verificationMethod: VerificationMethod[]; authentication: string[]; assertionMethod?: string[]; capabilityInvocation?: string[]; capabilityDelegation?: string[]; service?: ServiceEndpoint[]; oasVersion: string; kind: string; name?: string | null; description?: string | null; lineage?: LineageSection | null; conformanceLevel: string; lifecycleStatus?: string | null; sequence: number; metadata: {    created: string;    updated?: string | null;    version?: string | null;}; proof?: DocumentProof | null; revoked?: boolean | null; revokedAt?: string | null; });
  static fromJSON(obj: object): OasDocument;
  context: string[];
  id: string;
  controller: string;
  verificationMethod: VerificationMethod[];
  authentication: string[];
  assertionMethod: string[];
  capabilityInvocation: string[];
  capabilityDelegation: string[];
  service: ServiceEndpoint[];
  oasVersion: string;
  kind: string;
  name: string;
  description: string;
  lineage: LineageSection;
  conformanceLevel: string;
  lifecycleStatus: string;
  sequence: number;
  metadata: { created: string; updated: string | null; version: string | null; };
  proof: DocumentProof;
  revoked: boolean;
  revokedAt: string;
  governance: GovernanceSection;
  profile: ProfileSection;
  contact: ContactSection;
  calendar: CalendarSection;
  operational: OperationalSection;
  pricing: PricingSection;
  interoperability: InteroperabilitySection;
  reputation: ReputationSection;
  compliance: ComplianceSection;
  relationships: RelationshipsSection;
  isRoot(): boolean;
  isRevoked(): boolean;
  canonicalDigest(): string;
  primaryPublicKeyMultibase(): string | null;
  findVerificationMethod(idOrFragment: string): VerificationMethod | null;
  toJSON(): object;
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/document.js:66.

OasError

Top-level error class for the OAS SDK.

Signature
declare class OasError {
  constructor(code: string, message: string, cause: Error);
  code: string;
  name: string;
}

Source: @openagentid/oas-vanilla@1.0.2, src/sdk/errors.js:21.

extends: Error

OasErrorCode

Error codes for the OAS SDK.

Signature
declare const OasErrorCode: Readonly<{ DOCUMENT_ERROR: "DOCUMENT_ERROR"; CRYPTO_ERROR: "CRYPTO_ERROR"; LINEAGE_ERROR: "LINEAGE_ERROR"; RESOLVE_ERROR: "RESOLVE_ERROR"; ATTESTATION_ERROR: "ATTESTATION_ERROR"; DID_ERROR: "DID_ERROR"; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/sdk/errors.js:8.

readonly:

enum:

OasKeyPair

An Ed25519 keypair for an OAS entity.

Holds both the signing (private) and verifying (public) keys. Custom toString/toJSON redact private key material.

OAS Spec §11.2 -- All entity keys MUST be Ed25519

Signature
declare class OasKeyPair {
  constructor(signingKey: Uint8Array<ArrayBufferLike>, verifyingKey: Uint8Array<ArrayBufferLike>);
  static generate(): Promise<OasKeyPair>;
  static fromSigningKeyBytes(bytes: Uint8Array): Promise<OasKeyPair>;
  static verifyWithKey(publicKeyBytes: Uint8Array, message: Uint8Array, signatureBytes: Uint8Array): Promise<void>;
  _signingKey: Uint8Array<ArrayBufferLike>;
  _verifyingKey: Uint8Array<ArrayBufferLike>;
  sign(message: Uint8Array): Promise<Uint8Array>;
  signingKeyBytes(): Uint8Array;
  verifyingKeyBytes(): Uint8Array;
  publicKeyMultibase(): string;
  destroy(): void;
  toString(): string;
  toJSON(): object;
}

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/keypair.js:361.

OASServiceType

Standard OAS service type constants.

Signature
declare const OASServiceType: Readonly<{ ENTITY: "OASEntity"; COMMUNICATION: "OASCommunication"; LINEAGE_QUERY: "OASLineageQuery"; ATTESTATION: "OASAttestationService"; REVOCATION_STATUS: "OASRevocationStatus"; CAPABILITY_INVOCATION: "OASCapabilityInvocation"; GOVERNANCE: "OASGovernance"; PRIVATE_ENDPOINT: "OASPrivateEndpointService"; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/document/service.js:4.

OperationalSection

Operational specification section.

Signature
declare class OperationalSection {
  constructor(fields?: {});
  static fromJSON(obj: any): OperationalSection;
  availability: string;
  sla: SlaCommitment[];
  rateLimits: RateLimit[];
  supportedInputFormats: string[];
  supportedOutputFormats: string[];
  maxPayloadBytes: number;
  maxContextTokens: number;
  maintenanceWindows: string[];
  toJSON(): { availability: string; sla: { metric: string; target: string; }[]; rateLimits: { endpoint: string; requests: number; window: string; }[]; supportedInputFormats: string[]; supportedOutputFormats: string[]; maxPayloadBytes: number; maxContextTokens: number; maintenanceWindows: string[]; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:239.

parseKind

Parses an entity kind string, throwing on unrecognized values.

Accepts the canonical kind names as defined in OAS Spec §4.

Signature
declare function parseKind(str: string): string;

Source: @openagentid/oas-vanilla@1.0.2, src/did/kind.js:80.

throws: {DidError} If the string is not a recognized entity kind.

parseLineageProofForMigration

Returns migration diagnostics without establishing authority.

Signature
declare function parseLineageProofForMigration(input: any): Readonly<{ proof: AgentLineageProof; profile: "strict"; authorizes: false; }> | Readonly<{ proof: AgentLineageProof; profile: "legacy"; authorizes: false; diagnosticCode: "LegacyInsecureProof"; }> | Readonly<{ diagnosticCode?: string; proof: AgentLineageProof; profile: "unsupported"; authorizes: false; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/proof.js:267.

PricingSection

Pricing & economics section.

Signature
declare class PricingSection {
  constructor(fields?: {});
  static fromJSON(obj: any): PricingSection;
  model: string;
  costs: CostEntry[];
  currenciesAccepted: string[];
  billingEndpoint: string;
  freeTierLimits: string;
  billingVisibility: string;
  toJSON(): { model: string; costs: { description: string; amount: string; currency: string; }[]; currenciesAccepted: string[]; billingEndpoint: string; freeTierLimits: string; billingVisibility: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:309.

ProfileSection

Profile / presentation data for an OAS entity.

Signature
declare class ProfileSection {
  constructor(fields?: {});
  static fromJSON(obj: any): ProfileSection;
  avatarUrl: string;
  bannerUrl: string;
  tagline: string;
  categories: string[];
  languages: string[];
  timezone: string;
  accentColor: string;
  toJSON(): { avatarUrl: string; bannerUrl: string; tagline: string; categories: string[]; languages: string[]; timezone: string; accentColor: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:9.

PROOF_ALGORITHM

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

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/proof.js:12.

PROOF_CANONICALIZATION

Signature
declare const PROOF_CANONICALIZATION: "JCS-RFC8785";

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/proof.js:13.

PROOF_PURPOSE

Signature
declare const PROOF_PURPOSE: "capabilityDelegation";

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/proof.js:14.

PROOF_TYPE

Signature
declare const PROOF_TYPE: "AgentLineageProof2025";

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/proof.js:11.

ProtocolSupport

A supported protocol declaration.

Signature
declare class ProtocolSupport {
  constructor(fields: any);
  static fromJSON(obj: any): ProtocolSupport;
  protocol: string;
  version: string;
  endpoint: string;
  toJSON(): { protocol: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:346.

RateLimit

A rate limit specification.

Signature
declare class RateLimit {
  constructor(fields: any);
  static fromJSON(obj: any): RateLimit;
  endpoint: string;
  requests: number;
  window: string;
  toJSON(): { endpoint: string; requests: number; window: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:218.

RelationshipsSection

Relationships & affiliations section.

Signature
declare class RelationshipsSection {
  constructor(fields?: {});
  static fromJSON(obj: any): RelationshipsSection;
  parentOrganization: string;
  affiliations: Affiliation[];
  blockedDids: string[];
  toJSON(): { parentOrganization: string; affiliations: { did: string; relationship: string; }[]; blockedDids: string[]; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:545.

ReputationSection

Reputation summary section.

Signature
declare class ReputationSection {
  constructor(fields?: {});
  static fromJSON(obj: any): ReputationSection;
  totalInteractions: number;
  endorsementCount: number;
  trustScore: string;
  uptime30d: string;
  uptime90d: string;
  firstActive: string;
  endorserDids: string[];
  toJSON(): { totalInteractions: number; endorsementCount: number; trustScore: string; uptime30d: string; uptime90d: string; firstActive: string; endorserDids: string[]; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:423.

RESERVED_NAMESPACES

Reserved namespaces per OAS Spec §3.2.

Signature
declare const RESERVED_NAMESPACES: readonly string[];

Source: @openagentid/oas-vanilla@1.0.2, src/did/namespace.js:9.

ResolveError

Error class for OAS resolution operations.

Signature
declare class ResolveError {
  constructor(code: string, message: string);
  code: string;
  name: string;
}

Source: @openagentid/oas-vanilla@1.0.2, src/resolve/errors.js:18.

extends: Error

ResolveErrorCode

Error codes for OAS resolution operations.

Signature
declare const ResolveErrorCode: Readonly<{ NOT_FOUND: "NOT_FOUND"; RESOLUTION_FAILED: "RESOLUTION_FAILED"; CACHE_ERROR: "CACHE_ERROR"; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/resolve/errors.js:8.

readonly:

enum:

ScheduleWindow

A time window in an agent's schedule.

Signature
declare class ScheduleWindow {
  constructor(fields: any);
  static fromJSON(obj: any): ScheduleWindow;
  day: string;
  start: string;
  end: string;
  timezone: string;
  toJSON(): { day: string; start: string; end: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:105.

ServiceEndpoint

A service endpoint in an OAS Identity Document.

OAS Spec §5.2

Signature
declare class ServiceEndpoint {
  constructor(fields: { id: string; type: string; serviceEndpoint: string; label?: string | null; description?: string | null; properties?: {    [x: string]: string;} | null; });
  static fromJSON(obj: object): ServiceEndpoint;
  id: string;
  type: string;
  serviceEndpoint: string;
  label: string;
  description: string;
  properties: { [x: string]: string; };
  toJSON(): object;
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/service.js:28.

signCredential

Signs a credential with the given keypair.

Signature
declare function signCredential(credential: OasCredential, keypair: OasKeyPair, verificationMethodId: string): Promise<OasCredential>;

Source: @openagentid/oas-vanilla@1.0.2, src/attestation/credential.js:232.

throws: {AttestationError} If signing fails.

SlaCommitment

An SLA commitment metric.

Signature
declare class SlaCommitment {
  constructor(fields: any);
  static fromJSON(obj: any): SlaCommitment;
  metric: string;
  target: string;
  period: string;
  toJSON(): { metric: string; target: string; };
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/extensions.js:195.

TrustAnchor

Verifier-controlled authentication policy for an accepted root DID.

Signature
declare class TrustAnchor {
  constructor(rootDid: string, verificationMethod: string, publicKeyMultibase: string);
  rootDid: string;
  verificationMethod: string;
  publicKeyMultibase: string;
  documentDigest: string;
  withDocumentDigest(digest: string): TrustAnchor;
}

Source: @openagentid/oas-vanilla@1.0.2, src/lineage/config.js:5.

validateIdentifier

Validates an OAS identifier string.

Per OAS Specification §3.1, an identifier:

  • MUST be 1-128 characters long
  • MUST contain only characters from the set [a-zA-Z0-9._-]
Signature
declare function validateIdentifier(identifier: string): void;

Source: @openagentid/oas-vanilla@1.0.2, src/did/validation.js:27.

throws: {DidError} With code INVALID_IDENTIFIER if validation fails.

validateLineageProofSecurityProfile

Validates strict suite values and mandatory signed bindings.

Signature
declare function validateLineageProofSecurityProfile(proof: AgentLineageProof | Record<string, any>): void;

Source: @openagentid/oas-vanilla@1.0.2, src/crypto/proof.js:304.

validateNamespace

Validates an OAS namespace string.

Per OAS Specification §3.1, a namespace:

  • MUST be 1-63 characters long
  • MUST contain only lowercase alphanumeric characters and hyphens
  • MUST NOT begin or end with a hyphen
Signature
declare function validateNamespace(namespace: string): void;

Source: @openagentid/oas-vanilla@1.0.2, src/did/namespace.js:28.

throws: {DidError} With code INVALID_NAMESPACE if validation fails.

VerificationMethod

An Ed25519 verification method as defined in OAS Identity Documents.

OAS Spec §5.1

Signature
declare class VerificationMethod {
  constructor(fields: { id: string; type: string; controller: string; publicKeyMultibase: string; });
  static create(did: string, keyNum: number, publicKeyMultibase: string): VerificationMethod;
  static fromJSON(obj: object): VerificationMethod;
  id: string;
  type: string;
  controller: string;
  publicKeyMultibase: string;
  keyId(): string;
  toJSON(): object;
}

Source: @openagentid/oas-vanilla@1.0.2, src/document/verification-method.js:15.

verifyChain

Signature
declare function verifyChain(request: any): Promise<VerifyResult>;

Source: @openagentid/oas-vanilla@1.0.2, src/sdk/lineage.js:101.

VerifyConfig

Configuration for the lineage verification algorithm.

All values have sensible defaults from the OAS Specification §8.3.

Signature
declare class VerifyConfig {
  constructor();
  maxGeneration: number;
  perHopTimeoutMs: number;
  totalTimeoutMs: number;
  verifyDocumentSignatures: boolean;
  trustAnchors: Readonly<TrustAnchor>[];
  withMaxGeneration(depth: number): VerifyConfig;
  withPerHopTimeout(ms: number): VerifyConfig;
  withTotalTimeout(ms: number): VerifyConfig;
  withVerifySignatures(verify: boolean): VerifyConfig;
  withTrustAnchor(anchor: TrustAnchor | { rootDid: string; verificationMethod: string; publicKeyMultibase: string; documentDigest?: string; }): VerifyConfig;
  withTrustAnchors(anchors: Array<TrustAnchor | object>): VerifyConfig;
}

Source: @openagentid/oas-vanilla@1.0.2, src/lineage/config.js:39.

verifyCredential

Verifies a signed credential.

Signature
declare function verifyCredential(credential: OasCredential, publicKeyBytes: Uint8Array): Promise<void>;

Source: @openagentid/oas-vanilla@1.0.2, src/attestation/credential.js:284.

throws: {AttestationError} If verification fails.

verifyLineage

Verifies lineage against authenticated parent documents and local root trust policy. Embedded proof keys never establish authority.

Signature
declare function verifyLineage(request: VerifyLineageRequest): Promise<VerifyResult>;

Source: @openagentid/oas-vanilla@1.0.2, src/lineage/verify.js:59.

VerifyResult

Result of a successful strict lineage verification.

Signature
declare class VerifyResult {
  constructor(chainLength: any, humanRootDid: any, warnings?: any[]);
  chainLength: any;
  humanRootDid: any;
  warnings: readonly any[];
  isClean(): boolean;
}

Source: @openagentid/oas-vanilla@1.0.2, src/lineage/verify.js:14.

Visibility

Visibility levels for access-controlled fields in OAS Identity Documents.

DID documents are stored on the public Weave DHT. Fields with a visibility other than PUBLIC are redacted in the DHT-stored copy; actual values are served via an authenticated OASPrivateEndpointService.

Signature
declare const Visibility: Readonly<{ PUBLIC: "public"; AUTHENTICATED: "authenticated"; ORGANIZATION: "organization"; PRIVATE: "private"; }>;

Source: @openagentid/oas-vanilla@1.0.2, src/document/visibility.js:13.

readonly:

enum:

Package requirements

This version declares no dependencies or peer dependencies.

Archive verification

Pinned integrity:

SHA-512 integrity
sha512-66sPTWDxCcQ55S9YvPbk4BxF8c92CNqAHOUv7jp1uC+3ygYzZKf5dbvK2/rQwvhP+3oi7T3n1Zn1K1PK99zvMQ==

Machine-readable API manifest · Coverage

On this page

Entry pointsImport conditionsExportsAffiliationAgentLineageProofApiSchemaAttestationErrorAttestationErrorCodeAttestationTypebase58btcDecodebase58btcEncodebase64urlDecodebase64urlEncodeblake3Hashblake3HashHexBookingEndpointCachingResolverCalendarSectioncanonicalDocumentDigestcanonicalizecanonicalProofPayloadCertificationComplianceSectioncomponentCountConformanceLevelContactEntryContactSectionCostEntryCreatedIdentitycreateGovernancePolicycreateGovernanceSectioncreateGovernanceTransitioncreateGovernanceTransitionProofcreateHmrcreateMhrcreateRootWithKeypaircreateVerifyLineageRequestCryptoErrorCryptoErrorCodeDEFAULT_MAX_TRANSITIONS_PER_DAYDEFAULT_TIMELOCK_HOURSdefaultContextderiveChildderiveChildEntityderiveChildKeypairDerivedChildderiveKeyMaterialDID_CONTEXTDidErrorDidErrorCodeDOCUMENT_PROOF_TYPEDocumentBuilderDocumentErrorDocumentErrorCodeDocumentProofED25519_CONTEXTENR_GOVERNANCE_PROOF_TYPEEntityKindFallbackResolvergovernanceSectionFromJSONhexDecodehexEncodeInMemoryProviderInMemoryResolverInteroperabilitySectionisPublicVisibilityisRedactedOnDhtisRootLifecycleStatusLineageErrorLineageErrorCodeLineageSectionmultibaseDecodemultibaseEncodeOAS_CONTEXTOAS_VERSIONOasCredentialOasDidOasDocumentOasErrorOasErrorCodeOasKeyPairOASServiceTypeOperationalSectionparseKindparseLineageProofForMigrationPricingSectionProfileSectionPROOF_ALGORITHMPROOF_CANONICALIZATIONPROOF_PURPOSEPROOF_TYPEProtocolSupportRateLimitRelationshipsSectionReputationSectionRESERVED_NAMESPACESResolveErrorResolveErrorCodeScheduleWindowServiceEndpointsignCredentialSlaCommitmentTrustAnchorvalidateIdentifiervalidateLineageProofSecurityProfilevalidateNamespaceVerificationMethodverifyChainVerifyConfigverifyCredentialverifyLineageVerifyResultVisibilityPackage requirementsArchive verification