← Market · x402 Help

Agent Wallet Guide

Use minia2a's x402 services from a MetaMask Agent Wallet or a Cloudflare-hosted agent. Trial with an EIP-191 signature — pay in USDC on Base. No registration to buy.

TL;DR — Any agent that holds an EVM wallet on Base can use minia2a today. MetaMask Agent Wallet and Cloudflare's Agents SDK both present a standard EVM key, so the flow is identical to any other x402 client: sign the trial message, get 5 free calls, then pay per call in USDC. No credits, no top-ups — single USDC rail.

Why this works

minia2a is an x402 service marketplace (1,600+ endpoints). Every call either:

MetaMask Agent Wallet is a self-custodial EVM EOA wallet (Base supported). Cloudflare's Agents SDK pays through a plain EVM private key. Both therefore interoperate with minia2a's standard EVM rail — no platform-side changes needed. (Cloudflare's separate Web Bot Auth Ed25519 identity and its cloudflare:402 merchant network are not required for paying minia2a, and are not what this guide uses.)

MetaMask Agent Wallet

Setup

STEP 1 — Install & log in
npm install -g @metamask/agentic-cli@3
mm login && mm init
mm doctor   # expect: authenticated: true, initialized: true

Confirm your Base address before funding — it varies by sign-in method:

mm wallet address --chain-id 8453

Try a service free (trial)

minia2a trials need an EIP-191 personal_sign of the trial message. MetaMask Agent Wallet exposes this directly:

STEP 2 — Sign the trial message
TS=$(date +%s)
mm wallet sign-message --chain-id 8453 --message "minia2a trial:0xYOUR_WALLET:x402-time:$TS"
# returns { signature: "0x...", standard: "EIP-191 (personal_sign)", verified: true }

curl "https://minia2a.uk/x402/time?wallet=0xYOUR_WALLET" \
  -H "X-Wallet-Signature: 0xSIGNATURE" \
  -H "X-Trial-Timestamp: $TS"
# → 200 with real data, header X-Trial-Remaining: 4

Note: the timestamp must be within ±5 minutes of the server clock. The signature proves you own the wallet — 5 free trial calls per wallet, no registration.

Pay per call (production)

Two options, both standard USDC-on-Base:

Option A — Direct transfer
mm transfer --chain-id 8453 --token USDC \
  --to 0xAb62452b4b019bC4402BFfCca6C706d16d72A7Bf --amount 0.01 --wait

Sends USDC straight to the service's payTo address. Base ERC-20 sends auto-route through a gasless relay when ETH is short. (In Guard Mode the recipient may need to be in the owner's allowlist.)

Option B — x402 (recommended)

MetaMask's agent-wallet skill ships an x402 buyer helper: inspect reads the 402 accepts[] offer, pay signs an EIP-3009 TransferWithAuthorization and retries with the payment header. It parses minia2a's exact-scheme offer (Base USDC, EIP-712 domain name/version) natively.

python3 scripts/x402_pay.py inspect https://minia2a.uk/x402/time
python3 scripts/x402_pay.py pay https://minia2a.uk/x402/time --confirm

Not verified live yet: whether server-wallet mode pauses a plain message signature for human 2FA. No funds move on a trial signature, so friction is expected to be low — but confirm with a real account before automating at scale.

Cloudflare-hosted agents

If your agent runs on Cloudflare Workers and uses the Agents SDK, the x402 pay path loads a plain EVM private key and pays exactly like any other x402 client:

STEP 1 — Fund an EVM key on Base
# env: X402_PRIVATE_KEY = your EVM private key (Base, USDC balance)
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(env.X402_PRIVATE_KEY);

Try a service free

Sign the trial message with the same key and call with the signature headers:

import { signMessage } from "viem/accounts";
const ts = Math.floor(Date.now() / 1000);
const sig = await signMessage({
  account, message: `minia2a trial:${account.address}:x402-time:${ts}`,
});
await fetch("https://minia2a.uk/x402/time?wallet=" + account.address, {
  headers: { "X-Wallet-Signature": sig, "X-Trial-Timestamp": String(ts) },
});
// → 200, X-Trial-Remaining: 4

Pay per call

Use withX402Client from Cloudflare's Agents SDK, or any x402 client — it handles the 402 → EIP-3009 sign → retry loop against any facilitator (x402.org, Coinbase CDP, or payai):

import { withX402Client } from "cloudflare:agents";
const client = withX402Client(env, account);
const res = await client.fetch("https://minia2a.uk/x402/captcha-solve", {
  method: "POST", body: JSON.stringify({ imageUrl: "..." }),
});
// → 200 with the solved result
Cloudflare Wallets note: Cloudflare's Wallets product (announced Aug 2026) is still rolling out — handle reservation is live, but agent spending/guardrails were "coming months" as of this writing. When virtual wallets ship with an EVM signing surface, they'll interoperate the same way. Cloudflare's separate cloudflare:402 merchant-of-record network is a different rail (off-chain, USD-batched) and is not used to pay minia2a. Re-check Cloudflare's docs as it evolves.

Mastercard Agent Pay for Machines (AP4M)

Mastercard's Agent Pay for Machines (June 2026) settles on multiple rails — cards, bank accounts, and stablecoins — and records agent credentials on public chains including Base. A Mastercard-credentialed agent that settles through its stablecoin / Base leg (via launch partners like Coinbase, Stripe, or Cloudflare) pays minia2a exactly like any other x402 client: our 402 offer advertises permit2-exact / EIP-3009 on Base USDC, so no platform-side change is needed. Verified 2026-09-08.

AP4M is distributed through Mastercard's launch partners, not a public self-service API. When a processor you already use (Stripe Agent SDK, Coinbase, etc.) surfaces AP4M acceptance, minia2a endpoints stay standard x402 and remain payable as-is. minia2a deliberately does not take the AP4M card/credentialing track directly — it stays permissionless, zero-KYC, and USDC-on-Base.

Guides for other agent frameworks

Platform wallet: 0xAb62452b4b019bC4402BFfCca6C706d16d72A7Bf · Base (eip155:8453) · USDC · Home