Developer

Developer Portal

Integrate BAS Domains into AI agents, apps, and workflows. Public REST API — no API keys required for reads.

9 Endpoints
Read + Transactions
No API Key
Fully public reads
Chain ID 8453
Base Chain
10 SDK Examples
OpenAI, Claude, Python...

Overview

The BAS Domains Agent API is a RESTful HTTP API that gives AI agents, external applications, and developer tools direct access to the BAS Domains name system on Base Chain. It provides two categories of endpoints:

Read Endpoints

Query on-chain domain availability, profiles, reverse resolution, and platform status. No authentication, no rate limits beyond standard fair use.

Transaction Endpoints

Generate ABI-encoded, unsigned transaction payloads for minting, setting a primary domain, and updating profiles. The wallet signs and broadcasts — the API never holds keys.

bash
# Quick check
curl https://basdn.fun/agent/status

# Search a domain
curl https://basdn.fun/agent/search/alice

# Build a mint transaction
curl -X POST https://basdn.fun/agent/tx/mint \
  -H "Content-Type: application/json" \
  -d '{"domain":"alice"}'

Authentication

No API key required

All endpoints are publicly accessible. Wallet signatures are the only authorization mechanism — they are required by the smart contracts themselves, not by this API.

Wallet Signing

Transaction endpoints return unsigned payloads. Pass them directly to any EIP-1559–compatible wallet:

typescript
import { BrowserProvider } from 'ethers';

// 1. Get unsigned payload from the API
const { data: tx } = await fetch('https://basdn.fun/agent/tx/mint', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ domain: 'alice' }),
}).then(r => r.json());

// 2. Send to wallet — no private key handling in your code
const provider = new BrowserProvider(window.ethereum);
const signer = await provider.getSigner();

const txResponse = await signer.sendTransaction({
  to: tx.to,
  data: tx.data,
  value: BigInt(tx.value),
  chainId: tx.chainId, // 8453
});

await txResponse.wait();
console.log('Minted!', txResponse.hash);

Available Endpoints

GET
/agent/statusStatus

Platform status, chain info, and contract addresses

GET
/agent/search/{domain}Read

Search domain availability, owner, tokenId, and profile summary

GET
/agent/profile/{domain}Read

Full on-chain profile — bio, social links, custom links

GET
/agent/reverse/{wallet}Read

Reverse-resolve wallet address to primary .bas domain

GET
/agent/primary/{wallet}Read

Primary domain for a wallet from the on-chain resolver

POST
/agent/tx/mintTransaction

Generate unsigned mint transaction payload

POST
/agent/tx/set-primaryTransaction

Generate unsigned set-primary-domain transaction payload

POST
/agent/tx/update-profileTransaction

Generate unsigned update-profile transaction payload(s)

POST
/agent/workflow/register-domainWorkflow

Complete multi-step execution plan: mint + set primary + profile

Response Envelope

All responses use a consistent JSON envelope:

json
// Success
{
  "success": true,
  "data": { ... },
  "meta": {
    "chain": "Base",
    "chainId": 8453,
    "timestamp": "2024-01-01T00:00:00.000Z"
  }
}

// Error
{
  "success": false,
  "code": 400,
  "message": "Domain is required",
  "details": "Field: domain"
}

Transaction Flow

The API generates payloads — it never executes transactions on your behalf.

1
Search the domain

GET /agent/search/{domain} — confirm it's available

curl https://basdn.fun/agent/search/alice
2
Build the transaction

POST /agent/tx/mint — receive an unsigned payload

curl -X POST https://basdn.fun/agent/tx/mint -d '{"domain":"alice"}'
3
Sign with wallet

Pass { to, data, value, chainId } to the user's wallet

await signer.sendTransaction({ to, data, value: BigInt(value), chainId })
4
Read the tokenId

Parse the DomainMinted event from the receipt

const tokenId = receipt.logs[0].args.tokenId.toString()
5
Set primary (optional)

POST /agent/tx/set-primary with the tokenId

curl -X POST https://basdn.fun/agent/tx/set-primary -d '{"tokenId":"1","wallet":"0x..."}'

Transaction Payload Example

Every transaction endpoint returns a payload in this shape:

json
{
  "success": true,
  "data": {
    "to": "0x37F7ba486afE8Be3C3C70A4FC3eCacC6DD51c6C8",
    "data": "0x3f8e4e90000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000056d6f6e7279000000000000000000000000000000000000000000000000000000",
    "value": "0",
    "chainId": 8453,
    "contractName": "DomainNFT",
    "method": "mintDomain",
    "description": "Mint the domain "alice.bas" as an NFT on Base Chain."
  },
  "meta": {
    "chain": "Base",
    "chainId": 8453,
    "timestamp": "2024-07-21T12:00:00.000Z"
  }
}

AI Workflow Examples

End-to-end AI agent workflows showing the exact API calls made at each step.

Example: "I want bas.bas"

An AI agent receives the instruction and executes the following sequence:

1. Search
Check availability
2. Available ✓
Domain is free — proceed to mint
3. Generate Mint TX
POST /agent/tx/mint
4. Generate Primary TX
POST /agent/tx/set-primary
5. Generate Profile TX
POST /agent/tx/update-profile
6. Done
Present all payloads to user for signing

Actual API Calls

bash
# Step 1: Search
curl https://basdn.fun/agent/search/bas
# → { "data": { "available": true, "owner": null } }

# Step 2: Generate Mint TX
curl -X POST https://basdn.fun/agent/tx/mint \
  -H "Content-Type: application/json" \
  -d '{"domain":"bas"}'
# → { "data": { "to": "0xF960...", "data": "0x...", "value": "0", "chainId": 8453 } }
# User signs and broadcasts → gets tokenId from DomainMinted event

# Step 3: Generate Set Primary TX
curl -X POST https://basdn.fun/agent/tx/set-primary \
  -H "Content-Type: application/json" \
  -d '{"tokenId":"42","wallet":"0xAbCd1234567890AbCd1234567890AbCd12345678"}'
# → { "data": { "to": "0x7fA1...", "data": "0x...", "value": "0", "chainId": 8453 } }

# Step 4: Generate Profile Update TX
curl -X POST https://basdn.fun/agent/tx/update-profile \
  -H "Content-Type: application/json" \
  -d '{
    "tokenId": "42",
    "bio": "Web3 builder",
    "socialLinks": [{"platform":"twitter","url":"https://twitter.com/bas"}]
  }'
# → { "data": { "tokenId":"42","transactionCount":2,"transactions":[...] } }

One-Call Workflow

Use POST /agent/workflow/register-domain to get the complete execution plan in a single call:

bash
curl -X POST https://basdn.fun/agent/workflow/register-domain \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "bas",
    "wallet": "0xAbCd1234567890AbCd1234567890AbCd12345678",
    "setPrimary": true,
    "profile": {
      "bio": "Web3 builder",
      "socialLinks": [
        { "platform": "twitter", "url": "https://twitter.com/bas" }
      ]
    }
  }'

json
{
  "success": true,
  "data": {
    "domain": "bas",
    "fullDomain": "bas.bas",
    "wallet": "0xAbCd1234567890AbCd1234567890AbCd12345678",
    "totalSteps": 3,
    "steps": [
      {
        "step": 1,
        "action": "Mint Domain",
        "description": "Mint bas.bas as an NFT on Base Chain",
        "transaction": {
          "to": "0x37F7ba486afE8Be3C3C70A4FC3eCacC6DD51c6C8",
          "data": "0x3f8e4e90...",
          "value": "0",
          "chainId": 8453
        }
      },
      {
        "step": 2,
        "action": "Set Primary Domain",
        "description": "Set bas.bas as primary domain for your wallet",
        "transaction": {
          "to": "0xeDe40500f6047F2Ef8d8F5dec12F096969A1bF47",
          "data": "0xabcdef12...",
          "value": "0",
          "chainId": 8453
        }
      },
      {
        "step": 3,
        "action": "Update Profile",
        "description": "Update profile: bio + social links",
        "transaction": [
          { "to": "0xF960...", "data": "0x...", "value": "0", "chainId": 8453 },
          { "to": "0xF960...", "data": "0x...", "value": "0", "chainId": 8453 }
        ]
      }
    ]
  },
  "meta": { "chain": "Base", "chainId": 8453, "timestamp": "2024-07-21T12:00:00.000Z" }
}

API Reference

Complete reference for every endpoint — parameters, request/response schemas, cURL examples, and error codes.

GET/agent/statusStatus

Returns platform status, chain info, contract addresses, and available endpoints.

cURL

bash
curl https://basdn.fun/agent/status

HTTP

http
GET /agent/status HTTP/1.1
                Host: basdn.fun

Response JSON

json
{
  "success": true,
  "data": {
    "status": "operational",
    "version": "1.0.0",
    "chain": {
      "name": "Base",
      "chainId": 8453,
      "rpcUrl": "https://mainnet.base.org",
      "explorerUrl": "https://basescan.org",
      "symbol": "ETH"
    },
    "contracts": {
      "domainNFT": "0x37F7ba486afE8Be3C3C70A4FC3eCacC6DD51c6C8",
      "marketplace": "0xAefec6e65ADE8D95c0Cf69D20e9254556f6cC637",
      "chat": "0xB96eCa3BE710aFC822e2342D0bCae7103371dE81",
      "resolver": "0xeDe40500f6047F2Ef8d8F5dec12F096969A1bF47",
    },
    "endpoints": [
      "GET  /agent/status",
      "GET  /agent/search/{domain}",
      "POST /agent/tx/mint"
    ],
    "auth": "No API keys required.",
    "openapi": "https://basdn.fun/agent/docs/openapi.yaml"
  },
  "meta": { "chain": "Base", "chainId": 8453, "timestamp": "2024-07-21T12:00:00.000Z" }
}
GET/agent/search/{domain}Read

Search for a .bas domain. Returns availability, owner, tokenId, and profile summary.

Parameter: domain — domain label with or without .bas suffix (e.g. alice or alice.bas)

cURL

bash
curl https://basdn.fun/agent/search/alice

Response — Available

json
{
  "success": true,
  "data": {
    "domain": "alice",
    "fullDomain": "alice.bas",
    "available": true,
    "owner": null,
    "tokenId": null,
    "primaryOwner": null,
    "profile": null
  },
  "meta": { "chain": "Base", "chainId": 8453, "timestamp": "2024-07-21T12:00:00.000Z" }
}

Response — Taken

json
{
  "success": true,
  "data": {
    "domain": "alice",
    "fullDomain": "alice.bas",
    "available": false,
    "owner": "0xAbCd1234567890AbCd1234567890AbCd12345678",
    "tokenId": "42",
    "primaryOwner": "0xAbCd1234567890AbCd1234567890AbCd12345678",
    "profile": {
      "bio": "Web3 builder",
      "profilePicture": "https://example.com/pic.jpg",
      "socialLinks": [{ "platform": "twitter", "url": "https://twitter.com/alice" }],
      "customLinks": []
    }
  },
  "meta": { "chain": "Base", "chainId": 8453, "timestamp": "2024-07-21T12:00:00.000Z" }
}
GET/agent/profile/{domain}Read

Full on-chain profile for a .bas domain. Returns 404 if not minted.

cURL

bash
curl https://basdn.fun/agent/profile/alice

Response

json
{
  "success": true,
  "data": {
    "domain": "alice",
    "fullDomain": "alice.bas",
    "owner": "0xAbCd1234567890AbCd1234567890AbCd12345678",
    "tokenId": "42",
    "profile": {
      "bio": "Web3 builder and open source contributor",
      "profilePicture": "https://example.com/pic.jpg",
      "coverImage": "https://example.com/cover.jpg",
      "background": "bg-gradient-to-br from-purple-900 to-indigo-900",
      "socialLinks": [
        { "platform": "twitter", "url": "https://twitter.com/alice", "icon": "twitter" },
        { "platform": "github",  "url": "https://github.com/alice",  "icon": "github" }
      ],
      "customLinks": [{ "title": "My Website", "url": "https://alice.com" }]
    }
  },
  "meta": { "chain": "Base", "chainId": 8453, "timestamp": "2024-07-21T12:00:00.000Z" }
}
GET/agent/reverse/{wallet}Read

Reverse-resolve a wallet address to its primary .bas domain. Returns resolved: false (not an error) when no primary is set.

cURL

bash
curl https://basdn.fun/agent/reverse/0xAbCd1234567890AbCd1234567890AbCd12345678

Response — Resolved

json
{
  "success": true,
  "data": {
    "wallet": "0xAbCd1234567890AbCd1234567890AbCd12345678",
    "tokenId": "42",
    "domainName": "alice",
    "fullDomain": "alice.bas",
    "resolved": true
  },
  "meta": { "chain": "Base", "chainId": 8453, "timestamp": "2024-07-21T12:00:00.000Z" }
}
POST/agent/tx/mintTransaction

Generate an unsigned mint transaction payload. Domain availability is verified first.

cURL

bash
curl -X POST https://basdn.fun/agent/tx/mint \
  -H "Content-Type: application/json" \
  -d '{"domain":"alice"}'

Request Body

json
{ "domain": "alice" }

Response

json
{
  "success": true,
  "data": {
    "to": "0x37F7ba486afE8Be3C3C70A4FC3eCacC6DD51c6C8",
    "data": "0x3f8e4e90000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000056d6f6e7279000000000000000000000000000000000000000000000000000000",
    "value": "0",
    "chainId": 8453,
    "contractName": "DomainNFT",
    "method": "mintDomain",
    "description": "Mint the domain "alice.bas" as an NFT on Base Chain."
  },
  "meta": { "chain": "Base", "chainId": 8453, "timestamp": "2024-07-21T12:00:00.000Z" }
}

Errors

json
// 400 — domain missing or invalid format
{ "success": false, "code": 400, "message": "Invalid domain name", "details": "Field: domain" }

// 409 — domain already minted
{ "success": false, "code": 409, "message": "Domain alice.bas is already taken" }
POST/agent/tx/set-primaryTransaction

Generate an unsigned set-primary transaction payload. Verifies token ownership before returning.

cURL

bash
curl -X POST https://basdn.fun/agent/tx/set-primary \
  -H "Content-Type: application/json" \
  -d '{"tokenId":"42","wallet":"0xAbCd1234567890AbCd1234567890AbCd12345678"}'

Request Body

json
{
  "tokenId": "42",
  "wallet": "0xAbCd1234567890AbCd1234567890AbCd12345678"
}

Response

json
{
  "success": true,
  "data": {
    "to": "0xeDe40500f6047F2Ef8d8F5dec12F096969A1bF47",
    "data": "0xabcdef12000000000000000000000000000000000000000000000000000000000000002a",
    "value": "0",
    "chainId": 8453,
    "contractName": "BasResolver",
    "method": "setPrimaryDomain",
    "description": "Set token #42 as the primary domain for 0xAbCd...5678."
  },
  "meta": { "chain": "Base", "chainId": 8453, "timestamp": "2024-07-21T12:00:00.000Z" }
}
POST/agent/tx/update-profileTransaction

Generate unsigned update-profile transaction payload(s). Multiple payloads are returned when socialLinks or customLinks are provided — sign and send in order.

cURL

bash
curl -X POST https://basdn.fun/agent/tx/update-profile \
  -H "Content-Type: application/json" \
  -d '{
    "tokenId": "42",
    "bio": "Web3 builder",
    "profilePicture": "https://example.com/pic.jpg",
    "socialLinks": [{"platform":"twitter","url":"https://twitter.com/alice"}],
    "customLinks": [{"title":"My Website","url":"https://alice.com"}]
  }'

Request Body

json
{
  "tokenId": "42",
  "bio": "Web3 builder",
  "profilePicture": "https://example.com/pic.jpg",
  "coverImage": "",
  "background": "bg-gradient-to-br from-purple-900 to-indigo-900",
  "socialLinks": [{ "platform": "twitter", "url": "https://twitter.com/alice" }],
  "customLinks": [{ "title": "My Website", "url": "https://alice.com" }]
}

Response

json
{
  "success": true,
  "data": {
    "tokenId": "42",
    "transactionCount": 3,
    "note": "Sign and broadcast transactions in order.",
    "transactions": [
      {
        "to": "0x37F7ba486afE8Be3C3C70A4FC3eCacC6DD51c6C8",
        "data": "0x...",
        "value": "0",
        "chainId": 8453,
        "contractName": "DomainNFT",
        "method": "setProfile",
        "description": "Set bio and profile picture for token #42."
      },
      {
        "to": "0x37F7ba486afE8Be3C3C70A4FC3eCacC6DD51c6C8",
        "data": "0x...",
        "value": "0",
        "chainId": 8453,
        "contractName": "DomainNFT",
        "method": "setSocialLinks",
        "description": "Set social links for token #42."
      },
      {
        "to": "0x37F7ba486afE8Be3C3C70A4FC3eCacC6DD51c6C8",
        "data": "0x...",
        "value": "0",
        "chainId": 8453,
        "contractName": "DomainNFT",
        "method": "setCustomLinks",
        "description": "Set custom links for token #42."
      }
    ]
  },
  "meta": { "chain": "Base", "chainId": 8453, "timestamp": "2024-07-21T12:00:00.000Z" }
}
POST/agent/workflow/register-domainWorkflow

Complete multi-step execution plan for domain registration. All transaction payloads are included. This is a planning endpoint — it does not execute anything.

cURL

bash
curl -X POST https://basdn.fun/agent/workflow/register-domain \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "alice",
    "wallet": "0xAbCd1234567890AbCd1234567890AbCd12345678",
    "setPrimary": true,
    "profile": {
      "bio": "Web3 builder",
      "socialLinks": [{"platform":"twitter","url":"https://twitter.com/alice"}]
    }
  }'

SDK Examples

Production-ready examples for every major AI SDK and language. Each example demonstrates search, mint, set primary, update profile, and the full workflow.

Vercel AI SDK
vercel-ai.ts
OpenAI
openai.ts
Claude
claude.ts
Gemini
gemini.ts
LangChain
langchain.ts
Cursor
cursor.ts
Windsurf
windsurf.ts
Python
python.py
JavaScript
javascript.js
TypeScript Client
typescript.ts

Quick Example — Vercel AI SDK

typescript
import { generateText, tool } from 'ai';
import { openai } from '@ai-sdk/openai';
import { z } from 'zod';

const BASE = 'https://basdn.fun';

const { text } = await generateText({
  model: openai('gpt-4o'),
  system: 'You are a BAS Domains assistant.',
  prompt: 'Is "alice.bas" available?',
  tools: {
    searchDomain: tool({
      description: 'Search for a .bas domain',
      parameters: z.object({ domain: z.string() }),
      execute: async ({ domain }) => {
        const res = await fetch(`${BASE}/agent/search/${domain}`);
        return res.json();
      },
    }),
    buildMintTx: tool({
      description: 'Generate unsigned mint transaction payload',
      parameters: z.object({ domain: z.string() }),
      execute: async ({ domain }) => {
        const res = await fetch(`${BASE}/agent/tx/mint`, {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' },
          body: JSON.stringify({ domain }),
        });
        return res.json();
      },
    }),
  },
  maxSteps: 3,
});

console.log(text);

Quick Example — Python

python
import os, json, requests
from openai import OpenAI

BASE_URL = "https://basdn.fun"
client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])

def search_domain(domain):
    return requests.get(f"{BASE_URL}/agent/search/{domain}").json()

def build_mint_tx(domain):
    return requests.post(f"{BASE_URL}/agent/tx/mint",
        json={"domain": domain}).json()

# Use these as OpenAI tool handlers — see agent/examples/python.py for the full agent loop

MCP Compatibility

Model Context Protocol (MCP)

MCP is an open standard for connecting AI models to external tools and data sources. BAS Domains is fully compatible with MCP-enabled clients via its REST API.

What is MCP?

The Model Context Protocol (MCP) lets AI assistants like Claude, GPT-4, and others call external tools in a structured way. Any AI client that can issue HTTP requests to a base URL can integrate with BAS Domains — no additional SDK or SDK wrapper required.

Connecting BAS Domains

Base URLhttps://basdn.fun
OpenAPIhttps://basdn.fun/agent/docs/openapi.yaml
Manifesthttps://basdn.fun/.well-known/ai-plugin.json
MCP Confighttps://basdn.fun/mcp/basdomains-mcp.json
AuthNone — all read endpoints are fully public

Available MCP Tools

ToolEndpointDescription
get_statusGET /agent/statusPlatform status, chain info, and contract addresses
search_domainGET /agent/search/{domain}Search a .bas domain for availability, owner, and profile
get_profileGET /agent/profile/{domain}Full on-chain profile for a .bas domain
reverse_resolveGET /agent/reverse/{wallet}Reverse-resolve a wallet address to its primary .bas domain
get_primary_domainGET /agent/primary/{wallet}Primary .bas domain for a wallet from on-chain resolver

Transaction Generation Model

BAS Domains follows a read-first, payload-second model. The AI agent never holds or manages private keys:

Read operations — GET endpoints query on-chain state directly. No wallet interaction needed.
Write operations — POST /agent/tx/* endpoints return ABI-encoded, unsigned transaction payloads.
Wallet signing — The AI presents payloads to the user. The user signs and broadcasts via their own wallet.
No execution — The API never executes transactions on behalf of anyone.

Example MCP Workflow

json
// 1. MCP client discovers tools via OpenAPI spec
GET https://basdn.fun/agent/docs/openapi.yaml

// 2. User says: "Check if bas.bas is available and mint it for me"

// 3. AI calls: search_domain
GET https://basdn.fun/agent/search/bas
→ { "available": true }

// 4. AI calls: build_mint_transaction
POST https://basdn.fun/agent/tx/mint
Body: { "domain": "bas" }
→ { "to": "0xF960...", "data": "0x...", "value": "0", "chainId": 8453 }

// 5. AI presents transaction payload to user for wallet signing
// User signs via MetaMask/WalletConnect → tx broadcast → DomainMinted event emitted

Download MCP Configuration

basdomains-mcp.json

Tool Reference

Complete reference for every available tool — inputs, outputs, and examples.

get_status
GET /agent/status

Platform status, chain info, and contract addresses

Inputs
None
Outputs
status, version, chain, contracts, endpoints
search_domain
GET /agent/search/{domain}

Search a .bas domain for availability, owner, and profile

Inputs
domain (string)
Outputs
domain, fullDomain, available, owner, tokenId, profile
get_profile
GET /agent/profile/{domain}

Full on-chain profile for a .bas domain

Inputs
domain (string)
Outputs
domain, owner, tokenId, profile (bio, socialLinks, customLinks, ...)
reverse_resolve
GET /agent/reverse/{wallet}

Reverse-resolve a wallet address to its primary .bas domain

Inputs
wallet (0x address)
Outputs
wallet, tokenId, domainName, fullDomain, resolved
get_primary_domain
GET /agent/primary/{wallet}

Primary .bas domain for a wallet from on-chain resolver

Inputs
wallet (0x address)
Outputs
wallet, tokenId, domainName, fullDomain, resolved, source
build_mint_transaction
POST /agent/tx/mint

Unsigned mint transaction payload for a .bas domain NFT

Inputs
domain (string)
Outputs
to, data, value, chainId, contractName, method, description
build_set_primary_transaction
POST /agent/tx/set-primary

Unsigned transaction to set a .bas domain as the primary for a wallet

Inputs
tokenId (string), wallet (0x address)
Outputs
to, data, value, chainId, contractName, method, description
build_update_profile_transaction
POST /agent/tx/update-profile

Unsigned transaction payload(s) to update a .bas domain profile

Inputs
tokenId, bio?, profilePicture?, coverImage?, background?, socialLinks?, customLinks?
Outputs
tokenId, transactionCount, transactions[ ], note
register_domain_workflow
POST /agent/workflow/register-domain

Complete multi-step execution plan: mint + optional set primary + optional profile

Inputs
domain, wallet, setPrimary?, profile?
Outputs
domain, wallet, totalSteps, steps[ {step, action, description, transaction} ]

Error Codes

All errors use the standard envelope: { success: false, code, message, details? }

200OKRequest succeeded
400Bad RequestValidation failed — check the details field
403ForbiddenWallet does not own the requested token
404Not FoundDomain not minted or token does not exist
409ConflictDomain is already taken
422UnprocessableRequest body parsed but semantically invalid
500Server ErrorBlockchain RPC or contract call failure

Error Examples

json
// 400 — Validation error
{ "success": false, "code": 400, "message": "Domain is required", "details": "Field: domain" }

// 403 — Wallet doesn't own token
{ "success": false, "code": 403, "message": "Wallet does not own token #42" }

// 404 — Domain not minted
{ "success": false, "code": 404, "message": "Domain alice.bas is not minted" }

// 409 — Domain already taken
{ "success": false, "code": 409, "message": "Domain alice.bas is already taken" }

// 422 — Semantic validation error
{ "success": false, "code": 422, "message": "Invalid social platform", "details": "platform: snapchat" }

// 500 — Blockchain/RPC error
{ "success": false, "code": 500, "message": "Contract call failed", "details": "RPC timeout" }

Supported Chains

🟡
Base Chain
Chain ID: 8453 (0x2105)
RPC URL
https://mainnet.base.org
Native Token
ETH

Contract Addresses

domainNFT0x37F7ba486afE8Be3C3C70A4FC3eCacC6DD51c6C8
marketplace0xAefec6e65ADE8D95c0Cf69D20e9254556f6cC637
resolver0xeDe40500f6047F2Ef8d8F5dec12F096969A1bF47
chatAddress0xB96eCa3BE710aFC822e2342D0bCae7103371dE81

Supported Wallets

Any EIP-1193 / EIP-1559 wallet that supports custom chains. Verified integrations:

MetaMaskWalletConnectCoinbase WalletRainbowFrameethers.jsviemwagmi

Agent Integration

BAS Domains exposes an ai-plugin.json manifest and a full OpenAPI 3.1 specification for seamless agent integration.

OpenAI GPT Store / Custom GPTs

Add the OpenAPI spec URL to your Custom GPT action:

https://basdn.fun/agent/docs/openapi.yaml
AI Plugin Manifest

The manifest is available at the well-known URL:

https://basdn.fun/.well-known/ai-plugin.json
Claude Projects / Computer Use

Download and use agent/examples/claude.ts — it wires up all BAS Domains tools with the Anthropic SDK tool_use interface.

MCP-Compatible Clients

Any MCP client can connect directly to the base URL using the OpenAPI spec or the dedicated MCP configuration file:

https://basdn.fun/mcp/basdomains-mcp.json

Downloads & Resources

Production API. All endpoints read live on-chain state from Base Chain via the deployed contract addresses listed above. Transaction payloads use the live mint fee fetched at request time.