@openagentid/oas-vanilla/document
API contract shipped by @openagentid/oas-vanilla 1.0.2. Exact exports, signatures, dependencies and availability.
All packages · Runnable examples · Start an agent
| Contract | Value |
|---|---|
| Package | @openagentid/oas-vanilla@1.0.2 |
| Entry point | @openagentid/oas-vanilla/document |
| Availability | Published package |
| Reference source | Published JavaScript and JSDoc (inferred types) |
| Package engines | node >=20.0.0 |
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.
| Condition | Published file |
|---|---|
| default | ./src/document/document.js |
Exports
canonicalDocumentDigestdefaultContextDID_CONTEXTED25519_CONTEXTOAS_CONTEXTOAS_VERSIONOasDocument
canonicalDocumentDigest
Computes a Rust-compatible digest of an OAS document's JSON wire form.
declare function canonicalDocumentDigest(document: OasDocument | object): string;Source: @openagentid/oas-vanilla@1.0.2, src/document/document.js:339.
defaultContext
Returns the default JSON-LD context array for OAS documents.
declare function defaultContext(): string[];Source: @openagentid/oas-vanilla@1.0.2, src/document/document.js:42.
DID_CONTEXT
The W3C DID context URI.
declare const DID_CONTEXT: "https://www.w3.org/ns/did/v1";Source: @openagentid/oas-vanilla@1.0.2, src/document/document.js:30.
ED25519_CONTEXT
The Ed25519 2020 suite context URI.
declare const ED25519_CONTEXT: "https://w3id.org/security/suites/ed25519-2020/v1";Source: @openagentid/oas-vanilla@1.0.2, src/document/document.js:33.
OAS_CONTEXT
The OAS JSON-LD context URI.
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.
declare const OAS_VERSION: "1.0.0";Source: @openagentid/oas-vanilla@1.0.2, src/document/document.js:36.
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.
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.
Package requirements
This version declares no dependencies or peer dependencies.
Archive verification
Pinned integrity:
sha512-66sPTWDxCcQ55S9YvPbk4BxF8c92CNqAHOUv7jp1uC+3ygYzZKf5dbvK2/rQwvhP+3oi7T3n1Zn1K1PK99zvMQ==