OpenAgentID documentation
Source referencesRust module referenceoas-anchor-eas

oas-anchor-eas · crate

Declared module signatures, types, configuration, and source documentation.

Source: oas/oas/oas-anchor-eas/src/lib.rs. SHA-256: e7376745ce2cffd53d2c9f3cf749659adda88ebdb14f08c69180db258380d5f7.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

abi

oas-anchor-eas — Ethereum Attestation Service (EAS) adapter for the OAS [oas_resolve::LineageAnchor] trait.

What this adapter is (and is not)

This crate is the resolver: the verifier-side path that reads lineage authority from EAS. Root anchors are attestations under a dedicated OAS lineage schema; revocation and status changes are newer attestations superseding older ones for the same subject.

Publishing (writing anchors) is the issuer-side path and lives in the TypeScript adapter (@openagentid/anchor-eas), which uses the maintained EAS SDK for transaction signing and submission. Writing transactions correctly — RLP encoding, EIP-1559 fees, replacement semantics — is a problem best left to the maintained SDK; this crate deliberately does not hand-roll it.

The anchoring model

  • Schema: [abi::SCHEMA_STRING] registered on EAS; its UID is configuration, not code, because a schema UID is per-chain.
  • Recipient: attestations are addressed to a deterministic address derived from the subject DID (did_recipient): BLAKE3 of the DID's UTF-8 bytes, first 20 bytes. That makes "all attestations about this DID" an exact-match GraphQL query without a server-side index.
  • Supersession: the latest attestation for a subject wins. A status: "revoked" attestation, or a revoked latest attestation, means the subject is revoked.
  • Finality: current_finalized_block is eth_blockNumber minus the configured confirmation depth, so "finalized" is a policy knob, not a hardcoded number.
  • Org roots: not modeled in v1. get_org_root returns None, so rule 7 (org Merkle inclusion) is skipped against this backend — the honest answer rather than a wrong one.
pub mod abi;

Source line: 36.

eas

pub mod eas;

Source line: 37.

error

pub mod error;

Source line: 38.

pub use eas::{did_recipient, EasAnchor, EasConfig};

pub use eas::{did_recipient, EasAnchor, EasConfig};

Source line: 40.

pub use error::EasError;

pub use error::EasError;

Source line: 41.

On this page