Developer accounts, sandbox, quotas, and Base subscriptions
Create wallet-owned API keys, test fixtures, inspect quota receipts, and subscribe to higher capacity with Base USDC.
The developer gateway adds durable identity, idempotency, quotas, and deterministic fixtures without closing the public MCP baseline. The account owner signs an EIP-712 challenge; API key secrets are shown once and only their SHA-256 hashes are retained.
Before you run this workflow
Networks
- Ethereum mainnet (chain 1) for EIP-712 account ownership
- Base mainnet (chain 8453) for recurring official USDC settlement
Prerequisites
- A connected EOA or ERC-1271 wallet
- A matching Base Account for paid subscriptions
- USDC on Base
- A server-side secret manager for API keys
- A Fetch-compatible JavaScript runtime or direct HTTPS client
Wallet permissions
- EIP-712 signature for account, session, key creation, and revocation
- Optional plan-sized Base USDC spend permission with a 30-day period
Expected result
- One-time API key secret
- Durable quota receipt on every gateway call
- Deterministic non-financial sandbox output
- Confirmed Base USDC charge receipt before paid entitlement
Errors and recovery
- Rotate a leaked key from the console
- Reuse idempotency keys only for exact retries
- Refresh or revoke a subscription from the console
- Never infer payment from a permission response or submitted transaction hash
How to use it
- 1
Create the wallet-owned account
Open the developer console, connect the owner wallet, read the ten-minute EIP-712 challenge, and sign. This grants no token or transaction permission.
- 2
Store the key once
Copy the ensk_live_ secret into the runtime secret manager. Do not place it in ENS records, prompts, logs, client-side bundles, or source control.
- 3
Exercise semantic fixtures
Call the sandbox environment first. Test healthy and unhealthy capability evidence, routing order, active/expired/revoked policy states, and accepted-but-unfunded escrow truth.
- 4
Move the same client live
Switch from client.sandbox to client.live. Supply a stable Idempotency-Key for every call and retain the returned quota receipt.
- 5
Discover live subscription readiness
GET /api/developers/billing and require providers.base.available=true. Pin the plan amount, subscription owner, official Base USDC address, enstools.eth recipient and 30-day period.
- 6
Create or sign in to the Base Account
Open /developers/console?plan=operator#subscribe for the 39 USDC Operator journey, or choose another plan. Your MetaMask or other connected wallet remains the developer-account and ENS owner. Billing opens keys.coinbase.com: sign in if you already use Base App or Smart Wallet, or create a self-custodial Base Account with email or a passkey. A Coinbase exchange account is not required.
- 7
Fund and approve the billing limit
The Base Account is a distinct wallet and needs the plan amount in official USDC on Base. Use Fund from another wallet if necessary, then approve the capped recurring permission. Approval sets a revocable limit; it does not move USDC or pay for the plan.
- 8
Recover an interrupted approval
If the approval succeeded but linking failed or the page reloaded, choose Already approved? Recover it. Sign in to the same Base Account so the console can find only that payer’s exact active ENS.Tools permission. Recovery requests no new allowance and makes no payment.
- 9
Link the payer to the owner
After Base approval, sign the exact account, payer, permission, plan, amount, period, nonce and expiry with the developer-account owner. This is not a transaction, does not move ENS ownership and adds no token permission.
- 10
Review and start the first payment
Registration leaves the account Not paid. Review the displayed plan and click Pay … USDC now. This separately recorded action is required before any initial or hourly charge job may run.
- 11
Resume a stuck payment request
If Payment requested does not produce a Base transaction, use Resume payment or POST resume_base_subscription_charge. The worker reuses the already authorised, period-idempotent charge; it does not create a second permission or prove payment.
- 12
Confirm, then rely on entitlement
A requested payment is not a paid payment. Capacity remains inactive until the console exposes a Base transaction and the exact transfer to enstools.eth reaches five confirmations.
Deterministic sandbox fixtures
Errors and recovery
Plan contract
Examples
import { createEnsToolsClient } from 'https://ens.tools/sdk/ens-agent-client.mjs';
const ens = createEnsToolsClient({
apiKey: process.env.ENS_TOOLS_API_KEY,
});
const fixture = await ens.sandbox(
'check_agent_capabilities',
{ name: 'unhealthy.agent-fixture.eth' },
{ requestId: 'test:capability:001' },
);
const live = await ens.live(
'lookup_domain',
{ name: 'vitalik.eth' },
{ requestId: 'production:lookup:001' },
);curl https://ens.tools/api/v1/tools \
-H "Authorization: Bearer $ENS_TOOLS_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: production:lookup:001" \
-d '{
"environment": "live",
"tool": "lookup_domain",
"arguments": { "name": "vitalik.eth" }
}'