OpenAgentIDDocumentation
API referencenpm packages@openagentid/http
OpenAgentIDAPI reference

@openagentid/http/discovery

API contract shipped by @openagentid/http 0.1.1. Exact exports, signatures, dependencies and availability.

All packages · Runnable examples · Start an agent

ContractValue
Package@openagentid/http@0.1.1
Entry point@openagentid/http/discovery
AvailabilityKnown integration limitations
Reference sourcePublished TypeScript declarations
Package enginesnode >=20

Before integrating

Declares an optional peer on @openagentid/auth-protocol ^0.1.0; the registry returns 404 for that peer package.

Published adapter has not qualified for the current production path. Use current SDK identity verification and explicit receiver policy.

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/discovery.d.ts
import./dist/discovery.js
require./dist/discovery.cjs

Exports

AUTH_ENDPOINT_PATH

Default auth endpoint path.

Signature
declare const AUTH_ENDPOINT_PATH = "/.well-known/openagent/auth";

Source: @openagentid/http@0.1.1, dist/discovery.d.ts:40.

ConformanceLevel

Conformance level enum values.

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

Signature
type ConformanceLevel = 'L0' | 'L1' | 'L2';

Source: @openagentid/http@0.1.1, dist/discovery.d.ts:12.

DiscoveryDocument

Discovery document returned by the server.

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

Signature
interface DiscoveryDocument {
    auth_endpoint: string;
    supported_versions: number[];
    server_did: string;
    required_conformance_level: ConformanceLevel;
}

Source: @openagentid/http@0.1.1, dist/discovery.d.ts:14.

discoveryDocumentSchema

Zod schema for DiscoveryDocument.

Signature
declare const discoveryDocumentSchema: z.ZodObject<{
    auth_endpoint: z.ZodString;
    supported_versions: z.ZodArray<z.ZodNumber, "many">;
    server_did: z.ZodString;
    required_conformance_level: z.ZodEnum<[
        "L0",
        "L1",
        "L2"
    ]>;
}, "strip", z.ZodTypeAny, {
    auth_endpoint: string;
    supported_versions: number[];
    server_did: string;
    required_conformance_level: "L0" | "L1" | "L2";
}, {
    auth_endpoint: string;
    supported_versions: number[];
    server_did: string;
    required_conformance_level: "L0" | "L1" | "L2";
}>;

Source: @openagentid/http@0.1.1, dist/discovery.d.ts:21.

fetchDiscovery

Fetch the discovery document from a server.

Signature
declare function fetchDiscovery(baseUrl: string, timeoutMs?: number): Promise<DiscoveryDocument>;

Source: @openagentid/http@0.1.1, dist/discovery.d.ts:49.

PROVE_ENDPOINT_PATH

Default prove endpoint path.

Signature
declare const PROVE_ENDPOINT_PATH = "/.well-known/openagent/auth/prove";

Source: @openagentid/http@0.1.1, dist/discovery.d.ts:42.

resolveAuthEndpoint

Resolve the full auth endpoint URL from a base URL and discovery document.

Signature
declare function resolveAuthEndpoint(baseUrl: string, doc: DiscoveryDocument): string;

Source: @openagentid/http@0.1.1, dist/discovery.d.ts:51.

resolveProveEndpoint

Resolve the prove endpoint URL (auth endpoint + /prove).

Signature
declare function resolveProveEndpoint(baseUrl: string, doc: DiscoveryDocument): string;

Source: @openagentid/http@0.1.1, dist/discovery.d.ts:53.

WELL_KNOWN_PATH

Default well-known path.

Signature
declare const WELL_KNOWN_PATH = "/.well-known/openagent";

Source: @openagentid/http@0.1.1, dist/discovery.d.ts:38.

Package requirements

Dependencies

PackagePublished range
zod^3.23.8

Peer dependencies

PackagePublished rangeOptional
@openagentid/auth-protocol^0.1.0Yes

Archive verification

Pinned integrity:

SHA-512 integrity
sha512-Ecd1WkgKIlAusRSIeeyRuTXIMUka8QwTiWh8JRoxwA5i2MrT4xuza1kNXe4w+O0PTWMousqpc/Val2cNXKoNQQ==

Machine-readable API manifest · Coverage

On this page