DEVELOPERS · SDK & MCP

Build with
.asi

SDK

@asi-names/sdk@0.1.1

Every lookup is a direct onchain call to the UniversalResolver. Unset records return null; RPC failures throw, so throttling never reads as “no record”. Other suffixes like vitalik.eth are refused, never rewritten.

npm i @asi-names/sdk viem
import { createAsiClient, registerName } from "@asi-names/sdk";
const asi = createAsiClient({ rpcUrl: process.env.MAINNET_RPC });

await asi.getAddress("myagent.asi", { chainId: 8453 });  // any EVM chain
await asi.getText("myagent.asi", "url");
await asi.getContenthash("myagent.asi");                 // ipfs://bafy…
await asi.getName("0x…", { chainId: 42161 });            // verified primary name

// commit → ~60s → register, receipts checked
await registerName(asi, walletClient, { name: "myagent", years: 1, token: "USDC",
  records: { address: "0x…", texts: { url: "https://…" } } });

MCP server for AI agents

@asi-names/mcp@0.1.0

Hosted at https://mcp.asinames.xyz/mcp (Streamable HTTP, no auth) or local over stdio. It holds no keys: every write comes back as steps, each with a complete transaction (nonce, gas, fees, chainId 1) for the agent’s wallet to sign. With PayBox: pass it to request_wallet_sign unchanged, then broadcast with send_transaction.

mcp.jsonhosted · or local over stdio
// hosted
{ "mcpServers": { "asi-names": { "url": "https://mcp.asinames.xyz/mcp" } } }

// local
{ "mcpServers": { "asi-names": { "command": "npx", "args": ["-y", "@asi-names/mcp"],
  "env": { "RPC_URL": "https://eth-mainnet.g.alchemy.com/v2/<key>" } } } }
check_nameAvailable, reserved or taken; price in ETH, USDC and USDT.
READ
prepare_registrationStep 1: balance + ERC-1155 checks, commit tx and secret.
WRITE
prepare_register_completeStep 2, ~60s later: verifies commit age; approve (stablecoins) + register.
WRITE
prepare_renewRenew any name through the NameWrapper (keeps expiry in sync).
WRITE
prepare_set_recordsAddresses, texts, IPFS site. Controller only.
WRITE
prepare_set_primary_namePrimary on every EVM chain; adds the address step if needed.
WRITE
resolveAddresses per chain, untrusted text records, owner, expiry.
READ
reverse_lookupVerified primary name of an address on a chain.
READ
list_namesNames a wallet holds, owners checked onchain.
READ
send_transactionBroadcasts a signed step to .asi contracts only.
RELAY

Resolving without the SDK

ENSIP-11 · ENSIP-19

Call the UniversalResolver on Ethereum mainnet with the DNS-encoded name and the resolver calldata. For an EVM chain, ask for coin type 0x80000000 | chainId (ENSIP-11); the PublicResolver falls back to the default EVM record (ENSIP-19). Primary names: reverse(addressBytes, coinType), which verifies the forward record.

UniversalResolver0x862F5eca96515B9F53768800f03509987bf0caCA
resolve(dnsEncode("myagent.asi"), addr(namehash("myagent.asi"), 0x80002105))  // Base
reverse(0xYourAddress, 0x8000a4b1)                                              // Arbitrum

Contracts · Ethereum mainnet

ENS v1.7.0 fork · MIT