OpenAgentIDDocumentation
API referencenpm packages@openagentid/anchor-eas
OpenAgentIDAPI reference

@openagentid/anchor-eas

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

All packages · Runnable examples · Start an agent

ContractValue
Package@openagentid/anchor-eas@0.1.1
Entry point@openagentid/anchor-eas
AvailabilityPublished package
Reference sourcePublished TypeScript declarations

Before integrating

Optional EAS anchoring adapter. Read calls require configured chain services; publishing requires an authorized signer and is a real on-chain transaction.

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/index.d.ts
import./dist/index.js

Exports

AnchorData

The attestation's decoded data fields.

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

Signature
interface AnchorData {
    did: string;
    kind: string;
    status: string;
    metadataCommitment: string;
    anchoredAtBlock: bigint;
}

Source: @openagentid/anchor-eas@0.1.1, dist/index.d.ts:27.

AnchorRecord

The anchor record an anchor backend reports for a root.

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

Signature
interface AnchorRecord {
    did: string;
    status: string;
    anchoredAtBlock: number;
    metadataCommitment: string;
}

Source: @openagentid/anchor-eas@0.1.1, dist/index.d.ts:35.

didRecipient

Derive the deterministic recipient address for a subject DID.

Signature
declare function didRecipient(did: string): string;

Source: @openagentid/anchor-eas@0.1.1, dist/index.d.ts:47.

EasAnchorPublisher

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

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

Source: @openagentid/anchor-eas@0.1.1, dist/index.d.ts:88.

EasAnchorResolver

The EAS resolver: reads lineage authority from attestations.

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

Source: @openagentid/anchor-eas@0.1.1, dist/index.d.ts:64.

EasPublisherConfig

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

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

Signature
interface EasPublisherConfig {
    schemaUid: string;
    easContractAddress: string;
    signer: unknown;
}

Source: @openagentid/anchor-eas@0.1.1, dist/index.d.ts:79.

EasResolverConfig

Configuration for the resolver.

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

Signature
interface EasResolverConfig {
    schemaUid: string;
    graphqlUrl: string;
    rpcUrl: string;
    confirmationDepth?: number;
    fetch?: typeof fetch;
}

Source: @openagentid/anchor-eas@0.1.1, dist/index.d.ts:51.

encodeAnchorData

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

Signature
declare function encodeAnchorData(data: AnchorData): Uint8Array;

Source: @openagentid/anchor-eas@0.1.1, dist/index.d.ts:49.

RevocationStatus

The revocation status of a subject.

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

Signature
interface RevocationStatus {
    revoked: boolean;
    reasonCommitment?: string;
}

Source: @openagentid/anchor-eas@0.1.1, dist/index.d.ts:42.

SCHEMA_STRING

The OAS lineage-root attestation schema registered on EAS.

Signature
declare const SCHEMA_STRING = "string did,string kind,string status,string metadataCommitment,uint64 anchoredAtBlock";

Source: @openagentid/anchor-eas@0.1.1, dist/index.d.ts:25.

Package requirements

Dependencies

PackagePublished range
@ethereum-attestation-service/eas-sdk^2.4.0
@noble/hashes^1.4.0
viem^2.21.0
zod^3.23.8

Archive verification

Pinned integrity:

SHA-512 integrity
sha512-+K5GDijPBfFDX6nbA4Oh88/CiiAva2YbT4jD9ERI3Bi/JLKMQAtGNaqBKgM6mSFnddSalsiErs/KN5VS4Ml6yw==

Machine-readable API manifest · Coverage

On this page