OpenAgentID documentation
Source referencesRust module referenceoas-anchor-eas

oas-anchor-eas · eas

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

Source: oas/oas/oas-anchor-eas/src/eas.rs. SHA-256: 78657c38a52d183f2665b0c1ec30057c5f505bbd627f57fdbc62775a669efd50.

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.

eas::MAINNET_GRAPHQL

Default GraphQL endpoints by network name.

pub const MAINNET_GRAPHQL: &str;

Source line: 10.

eas::SEPOLIA_GRAPHQL

Sepolia GraphQL endpoint.

pub const SEPOLIA_GRAPHQL: &str;

Source line: 12.

eas::did_recipient

Derive the deterministic recipient address for a subject DID: the first 20 bytes of the BLAKE3 digest of the DID's UTF-8 bytes.

Attestations about a DID are addressed to this recipient, which makes "every attestation about this subject" an exact-match GraphQL query without a server-side index. This mapping is normative: publishers and resolvers MUST use the same derivation.

pub fn did_recipient(did: &str) -> String;

Source line: 21.

eas::EasConfig

Configuration for an [EasAnchor].

#[derive(Debug, Clone)]
pub struct EasConfig {
/// The OAS lineage schema UID on this chain. Per-chain; never hardcoded

/// as a global constant because schema registration is per deployment.

pub schema_uid: String,
/// EAS GraphQL endpoint.

pub graphql_url: String,
/// Chain JSON-RPC endpoint (for `eth_blockNumber`).

pub rpc_url: String,
/// Confirmations subtracted from the head to define "finalized".

pub confirmation_depth: u64
}

Source line: 29.

eas::EasConfig::mainnet

A mainnet-shaped config (schema UID still required).

pub fn mainnet(schema_uid: impl Into<String>, rpc_url: impl Into<String>) -> Self;

Source line: 43.

eas::EasConfig::sepolia

A Sepolia-shaped config.

pub fn sepolia(schema_uid: impl Into<String>, rpc_url: impl Into<String>) -> Self;

Source line: 53.

eas::EasAnchor

The EAS adapter: implements [LineageAnchor] over EAS GraphQL plus JSON-RPC finality.

pub struct EasAnchor {

}

Source line: 65.

eas::EasAnchor::new

Build the adapter.

Errors

Returns an error if the HTTP client cannot be constructed, or if the schema UID is blank.

pub fn new(config: EasConfig) -> Result<Self, EasError>;

Source line: 77.

eas::EasAnchor::config

The configuration this anchor was built with.

pub fn config(&self) -> &EasConfig;

Source line: 91.

On this page