Skip to content

qntx/ensip25

ENSIP-25

ENS Identity Verification for AI Agents

CI crates.io docs.rs License Rust

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.

Quick Start | Architecture | API docs

Overview

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 erc8004 crate

Quick Start

Offline key construction (no network)

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]"
);

On-chain verification (provider feature)

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());

ERC-8004 integration (erc8004 feature)

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?;

Architecture

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 Flags

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

Design

  • Zero-dependency coreerc7930 and record_key modules depend only on alloy-primitives + thiserror
  • Provider-generic — works with any alloy transport (HTTP, WebSocket, IPC)
  • Strict lintingpedantic + nursery + correctness (deny)
  • Spec-compliant — test vectors derived from ENSIP-25 and ERC-7930 specification examples

Related Standards

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

License

Licensed under either of:

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.


A QNTX open-source project.

QNTX

Code is law. We write both.

About

Rust SDK for ENSIP-25: Link verification between ENS names and ERC-8004 AI agent registries.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors