ENS Identity Verification for AI Agents
Type-safe Rust SDK for ENSIP-25 — verify the bidirectional link between ENS names and AI agent identities registered in on-chain registries such as ERC-8004.
ENSIP-25 defines a parameterized ENS text record that links an ENS name to an agent registry entry:
agent-registration[<registry>][<agentId>]
This SDK provides type-safe Rust bindings for the protocol, built on alloy:
- ERC-7930 encoding/decoding — compact binary interoperable addresses
- Text record key construction — deterministic ENSIP-25 key formatting
- On-chain verification — ENS text record lookup via alloy provider
- ERC-8004 integration — one-call verification using the
erc8004crate
use ensip25::record_key::evm_record_key;
let registry: alloy_primitives::Address =
"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432".parse()?;
let key = evm_record_key(1, registry, 42)?;
assert_eq!(
key,
"agent-registration[0x000100000101148004a169fb4a3325136eb29fa0ceb6d2e539a432][42]"
);use alloy::providers::ProviderBuilder;
use ensip25::verify::verify;
let provider = ProviderBuilder::new()
.connect_http("https://eth.llamarpc.com".parse()?);
let registry = "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432".parse()?;
let status = verify(&provider, "vitalik.eth", 1, registry, 42).await?;
println!("verified: {}", status.is_verified());use alloy::providers::ProviderBuilder;
use ensip25::verify::verify_agent;
let provider = ProviderBuilder::new()
.connect_http("https://eth.llamarpc.com".parse()?);
let status = verify_agent(
&provider,
erc8004::Network::EthereumMainnet,
42,
"vitalik.eth",
).await?;| Module | Description |
|---|---|
erc7930 |
ERC-7930 Interoperable Address encode/decode/Display — pure computation, no I/O |
record_key |
ENSIP-25 text record key construction — string formatting only |
verify |
On-chain ENS text record resolution and verification (requires provider feature) |
error |
Unified error type covering ERC-7930 parsing, ENS resolution, and verification |
| Feature | Default | Description |
|---|---|---|
provider |
off | Enables verify module with on-chain ENS lookup via alloy |
erc8004 |
off | Adds verify_agent convenience + re-exports erc8004 crate (implies provider) |
serde |
off | Derives Serialize / Deserialize on core types |
- Zero-dependency core —
erc7930andrecord_keymodules depend only onalloy-primitives+thiserror - Provider-generic — works with any alloy transport (HTTP, WebSocket, IPC)
- Strict linting —
pedantic+nursery+correctness(deny) - Spec-compliant — test vectors derived from ENSIP-25 and ERC-7930 specification examples
| Standard | Relationship |
|---|---|
| ERC-7930 | Interoperable Address — compact binary encoding for cross-chain addresses |
| ERC-8004 | Trustless Agents — on-chain agent registry, composable with ENSIP-25 verification |
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project shall be dual-licensed as above, without any additional terms or conditions.