Skip to content
Wallet and Entity Collection draft updates
Documentation menu

API reference

Use the package indexes to find documented public APIs. Reference pages describe callable signatures, configuration contracts, and public class members, with short usage examples where helpful. Shared types, errors, and helpers are imported from @oidfed/core. See the v3 API migration.

  • Crypto: portable crypto engines, signing custody and keyring snapshots.
  • Core: shared federation primitives and services.
  • Authority: Trust Anchors, Intermediates, and authoritative storage.
  • Leaf: participant publication and optional hosted services.
  • OIDC/OAuth: protocol roles and federation registration.
  • Wallet: federation trust for wallet participants and artifacts.
  • React Native setup for Core and Wallet.

Reading a result

The API's declared return type matters. Result<T> uses ok and exposes either value or error. Trust-chain validation uses valid and validation errors. Metadata parsers use success. Constructors and assertion-style configuration helpers can throw. Do not treat every API as returning the same error shape.

import type { CryptoEngine } from "@oidfed/crypto";
import { entityId, discoverEntity, type TrustAnchorSet } from "@oidfed/core";

export async function findHarbor(engine: CryptoEngine, anchors: TrustAnchorSet) {
  const result = await discoverEntity(entityId("https://harbor.example"), anchors, { engine });
  if (!result.ok) return result;
  // Keep the authenticated discovery result for a subsequent protocol operation.
  return result;
}

Signature blocks describe contracts and may refer to neighboring named types; they are not standalone programs. Examples use public package imports. A function parameter in an example is a host-supplied dependency, such as pinned anchor keys or a durable store. Network examples use fictional addresses and need your deployment's URLs and transport configuration.

From a call to a workflow

The feature guides explain how to select actors, configure trust, connect calls, and maintain the resulting state. A successful schema parse checks shape; a decoded JWT is still unverified; a valid chain alone does not grant application access. Use the operation that establishes the evidence required by your workflow.

View source on GitHub