@openagentid/anchor-eas
v0.1.1
Published
Ethereum Attestation Service (EAS) adapter for the OAS lineage anchor seam: resolution via EAS GraphQL, publishing via the maintained EAS SDK.
Readme
@openagentid/anchor-eas
Ethereum Attestation Service (EAS) adapter for the OAS lineage anchor seam — resolution via EAS GraphQL, publishing via the maintained EAS SDK.
- Resolution (verifier path): reads lineage authority from attestations over native fetch. Root anchors are attestations under the OAS lineage schema; the latest attestation for a subject wins; a
revokedlatest attestation means the subject is revoked. - Publishing (issuer path): writes anchors as attestations through the maintained EAS SDK with a viem-compatible signer.
The recipient of every attestation is didRecipient(did) — BLAKE3(did)[0..20], deterministic and normative, so "all attestations about this DID" is an exact-match query.
Install
npm install @openagentid/anchor-easResolve lineage anchors
import { EasAnchorResolver } from '@openagentid/anchor-eas';
const resolver = new EasAnchorResolver({
schemaUid: '0x…', // OAS lineage schema UID on this chain
graphqlUrl: 'https://base.easscan.org/graphql',
rpcUrl: 'https://mainnet.base.org',
confirmationDepth: 64, // default
});
const root = await resolver.getRoot('did:oas:l1fe:hmr:alice', 'hmr');
const revocation = await resolver.checkRevocation('did:oas:l1fe:hmr:alice');Publish lineage anchors
import { EasAnchorPublisher } from '@openagentid/anchor-eas';
const publisher = new EasAnchorPublisher({
schemaUid: '0x…',
easContractAddress: '0x…',
signer, // any viem-compatible signer the EAS SDK accepts
});
const uid = await publisher.publishAnchor({
did: 'did:oas:l1fe:hmr:alice',
kind: 'hmr',
status: 'active',
metadataCommitment: '0x…',
anchoredAtBlock: 12345678n,
});
await publisher.revoke(uid);Links
License
Copyright © 2026 L1fe Labs, Inc.
Licensed under either of Apache License 2.0 or MIT license, at your option.
