Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Dexter-DAO/opendexter-ide --skill x402-clientgit clone --depth 1 https://github.com/Dexter-DAO/opendexter-ideWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/dexter-dao/opendexter-ide/x402-client)<a href="https://agentmods.dev/skills/dexter-dao/opendexter-ide/x402-client"><img src="https://agentmods.dev/badge/skills/dexter-dao/opendexter-ide/x402-client/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/dexter-dao/opendexter-ide/x402-client"><img src="https://agentmods.dev/badge/skills/dexter-dao/opendexter-ide/x402-client.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00060 | $0.01760 |
| Opus 5 | $0.00030 | $0.00880 |
| Sonnet 5 | $0.00012 | $0.00352 |
| Haiku 4.5 | $0.00006 | $0.00176 |
Grade A, and why
x402-client scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 210 lines — stays where its author put it; the contents beside it link to each section on GitHub.
@dexterai/x402 Client SDK
Use the V6 one-shot client to probe an endpoint once, detect its x402 version, sign an accepted USDC payment, and send the paid request.
This is an independent application-owned executor. It is not the OpenDexter MCP runtime, does not inherit an OpenDexter OAuth bearer or governed grant, and must never become a fallback for a blocked OpenDexter operation. Keep private keys out of prompts, logs, tool output, and source control.
Install the tested V6 pair
Use Node 22 or newer and install the exact Vault peer with the SDK:
npm install @dexterai/[email protected] @dexterai/[email protected]
Canonical one-shot payment
import {
createEvmKeypairWallet,
createKeypairWallet,
payAndFetch,
} from '@dexterai/x402/client';
const wallets = {
solana: await createKeypairWallet(process.env.SOLANA_PRIVATE_KEY!),
evm: await createEvmKeypairWallet(process.env.EVM_PRIVATE_KEY!),
};
const result = await payAndFetch(
'https://api.example.com/paid/data',
{ method: 'GET' },
wallets,
{
maxAmountAtomic: '100000', // at most $0.10 USDC for this call
solanaRpcUrl: process.env.SOLANA_RPC_URL,
},
);
if (!result.ok) {
if (result.reason === 'payment_unconfirmed') {
throw new Error(`Payment may have settled; reconcile before retrying: ${result.detail}`);
}
throw new Error(`Payment failed before delivery: ${result.reason}: ${result.detail ?? ''}`);
}
if (!result.response) {
// paid:true with no response means settlement was confirmed but the
// merchant did not answer. Never turn this into an automatic second pay.
throw new Error('Payment settled, but the merchant returned no response');
}
const data = await result.response.json();
console.log(data);
payAndFetch handles x402 V1 and V2. It returns a discriminated PayResult
instead of throwing for expected payment failures:
ok: true, paid: false: the endpoint returned without requiring payment.ok: true, paid: true: payment settled;responsecan still be absent if the merchant never answered after settlement.ok: false, reason: 'timeout': no authorization was sent; a retry can be safe after reviewing the request.ok: false, reason: 'payment_unconfirmed': authorization was sent and may have settled. Do not blindly retry.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 210 lines · 60 tokens per session scan A 4363b0ec3e67
x402-client is a skill published in the GitHub repository Dexter-DAO/opendexter-ide (2 stars, last pushed 5d ago), licensed MIT. It adds 60 tokens to every session and 1,760 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
defi-protocol-templates
Implement DeFi protocols with production-ready templates for staking, AMMs, governance, and flash loans. Use when building decentralized finance applications or smart contract protocols.
sera
Multi-currency settlement skill — quote, swap, and settle across 40 stablecoins via Sera Protocol.
sera
Multi-currency settlement for AI agents. Quote, swap, and settle across 40 stablecoins (USDC, USDT, EURC, XSGD, JPYC, MYRT, TGBP, BRZ, MXNT, IDRT, AUDD, and more) and 22 fiat currencies via Sera Protocol. 55 tools — quotes, swaps, treasury management, FX deal scanning, and a maker spread ladder.
x402
HTTP 402 payment protocol for AI agent commerce — three-actor model (Client, Resource Server, Facilitator), ERC-3009 transferWithAuthorization, server middleware (@x402/express), client patterns in TypeScript and Python, facilitator integration, agent-to-agent payments, pricing strategies, and replay protection. Works…
sera-protocol
Build, review, or explain integrations with Sera Protocol for stablecoin FX, multi-currency settlement, Sera MCP, Sera Agents, or x402. Use for quotes, corridors, settlement workflows, agent integrations, and Sera Protocol API or contract questions.
gentech-x402-services
GenTech Labs paid API gateway — 7 x402 pay-per-call services on Base USDC: token security, market data, agent discovery, DeFi LP analytics, wallet analysis, NFT search. Use when an agent needs token risk scoring, token prices, onchain agent discovery, LP/pool analytics, wallet portfolio data, or NFT collection search…