@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
| Contract | Value |
|---|---|
| Package | @openagentid/anchor-eas@0.1.1 |
| Entry point | @openagentid/anchor-eas |
| Availability | Published package |
| Reference source | Published 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.
| Condition | Published file |
|---|---|
| types | ./dist/index.d.ts |
| import | ./dist/index.js |
Exports
AnchorData— typeAnchorRecord— typedidRecipientEasAnchorPublisherEasAnchorResolverEasPublisherConfig— typeEasResolverConfig— typeencodeAnchorDataRevocationStatus— typeSCHEMA_STRING
AnchorData
The attestation's decoded data fields.
Type-only declaration; it is not a runtime value.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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
| Package | Published 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:
sha512-+K5GDijPBfFDX6nbA4Oh88/CiiAva2YbT4jD9ERI3Bi/JLKMQAtGNaqBKgM6mSFnddSalsiErs/KN5VS4Ml6yw==