OpenAgentID documentation
Source referencesTypeScript reference

@openagentid/anchor-eas API

Exported TypeScript types, signatures and source documentation.

Package manifest, subpaths, and integration guide.

This reference resolves exported symbols from the package entry point with the TypeScript parser/type checker. It includes declarations and inferred types, not implementation bodies. External dependencies unavailable to the extraction environment can remain unresolved; this is source documentation, not proof that all packages typecheck or are published.

didRecipient

Derive the deterministic recipient address for a subject DID.

export declare const didRecipient: (did: string) => string;

Source: openagent-sdk/adapters/eas/typescript/src/index.ts:57.

encodeAnchorData

ABI-encode the anchor data (same layout as the Rust adapter).

export declare const encodeAnchorData: (data: AnchorData) => Uint8Array;

Source: openagent-sdk/adapters/eas/typescript/src/index.ts:75.

SCHEMA_STRING

The OAS lineage-root attestation schema registered on EAS.

export declare const SCHEMA_STRING: "string did,string kind,string status,string metadataCommitment,uint64 anchoredAtBlock";

Source: openagent-sdk/adapters/eas/typescript/src/index.ts:30.

AnchorData

The attestation's decoded data fields.

/** The attestation's decoded data fields. */
export interface AnchorData {
    did: string;
    kind: string;
    status: string;
    metadataCommitment: string;
    anchoredAtBlock: bigint;
}

Source: openagent-sdk/adapters/eas/typescript/src/index.ts:34.

AnchorRecord

The anchor record an anchor backend reports for a root.

/** The anchor record an anchor backend reports for a root. */
export interface AnchorRecord {
    did: string;
    status: string;
    anchoredAtBlock: number;
    metadataCommitment: string;
}

Source: openagent-sdk/adapters/eas/typescript/src/index.ts:43.

RevocationStatus

The revocation status of a subject.

/** The revocation status of a subject. */
export interface RevocationStatus {
    revoked: boolean;
    reasonCommitment?: string;
}

Source: openagent-sdk/adapters/eas/typescript/src/index.ts:51.

EasResolverConfig

Configuration for the resolver.

/** Configuration for the resolver. */
export interface EasResolverConfig {
    /** The OAS lineage schema UID on this chain. */
    schemaUid: string;
    /** EAS GraphQL endpoint. */
    graphqlUrl: string;
    /** Chain JSON-RPC endpoint (for eth_blockNumber). */
    rpcUrl: string;
    /** Confirmations subtracted from the head to define "finalized". Default: 64. */
    confirmationDepth?: number;
    /** Injected fetch (tests and non-Node runtimes). Default: globalThis.fetch. */
    fetch?: typeof fetch;
}

Source: openagent-sdk/adapters/eas/typescript/src/index.ts:92.

EasAnchorResolver

The EAS resolver: reads lineage authority from attestations.

export declare class EasAnchorResolver {
  constructor(config: EasResolverConfig): EasAnchorResolver;
  checkRevocation(did: string): Promise<RevocationStatus>;
  getRoot(did: string, kind: "hmr" | "mhr" | "enr"): Promise<AnchorRecord | undefined>;
  currentFinalizedBlock(): Promise<number>;
}

Source: openagent-sdk/adapters/eas/typescript/src/index.ts:112.

EasPublisherConfig

Signer shape the publisher needs: a viem-compatible account plus provider.

/** Signer shape the publisher needs: a viem-compatible account plus provider. */
export interface EasPublisherConfig {
    /** The OAS lineage schema UID on this chain. */
    schemaUid: string;
    /** The EAS contract address on this chain. */
    easContractAddress: string;
    /** A viem-compatible signer (any object the EAS SDK accepts). */
    signer: unknown;
}

Source: openagent-sdk/adapters/eas/typescript/src/index.ts:210.

EasAnchorPublisher

The EAS publisher: writes anchors as attestations via the maintained SDK.

export declare class EasAnchorPublisher {
  constructor(config: EasPublisherConfig): EasAnchorPublisher;
  publishAnchor(data: AnchorData): Promise<string>;
  revoke(uid: string): Promise<void>;
}

Source: openagent-sdk/adapters/eas/typescript/src/index.ts:220.

On this page