x402-proxy-openclaw 0.10.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/solana.js ADDED
@@ -0,0 +1,93 @@
1
+ import { address, appendTransactionMessageInstructions, createSolanaRpc, createTransactionMessage, getAddressEncoder, getBase64EncodedWireTransaction, getProgramDerivedAddress, partiallySignTransactionMessageWithSigners, pipe, setTransactionMessageFeePayer, setTransactionMessageLifetimeUsingBlockhash } from "@solana/kit";
2
+ //#region packages/x402-proxy/src/openclaw/solana.ts
3
+ const USDC_MINT = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
4
+ const TOKEN_PROGRAM = address("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
5
+ const ASSOCIATED_TOKEN_PROGRAM = address("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
6
+ async function findAta(mint, owner) {
7
+ const encoder = getAddressEncoder();
8
+ const [pda] = await getProgramDerivedAddress({
9
+ programAddress: ASSOCIATED_TOKEN_PROGRAM,
10
+ seeds: [
11
+ encoder.encode(owner),
12
+ encoder.encode(TOKEN_PROGRAM),
13
+ encoder.encode(mint)
14
+ ]
15
+ });
16
+ return pda;
17
+ }
18
+ function transferCheckedIx(source, mint, destination, authority, amount, decimals) {
19
+ const data = new Uint8Array(10);
20
+ data[0] = 12;
21
+ new DataView(data.buffer).setBigUint64(1, amount, true);
22
+ data[9] = decimals;
23
+ return {
24
+ programAddress: TOKEN_PROGRAM,
25
+ accounts: [
26
+ {
27
+ address: source,
28
+ role: 2
29
+ },
30
+ {
31
+ address: mint,
32
+ role: 0
33
+ },
34
+ {
35
+ address: destination,
36
+ role: 2
37
+ },
38
+ {
39
+ address: authority.address,
40
+ role: 1
41
+ }
42
+ ],
43
+ data
44
+ };
45
+ }
46
+ async function getTokenAccounts(rpcUrl, owner) {
47
+ const { value } = await createSolanaRpc(rpcUrl).getTokenAccountsByOwner(address(owner), { programId: TOKEN_PROGRAM }, { encoding: "jsonParsed" }).send();
48
+ return value.map((v) => {
49
+ const info = v.account.data.parsed.info;
50
+ return {
51
+ mint: info.mint,
52
+ amount: info.tokenAmount.uiAmountString,
53
+ decimals: info.tokenAmount.decimals
54
+ };
55
+ }).filter((t) => t.mint !== USDC_MINT && t.amount !== "0");
56
+ }
57
+ async function getUsdcBalance(rpcUrl, owner) {
58
+ const { value } = await createSolanaRpc(rpcUrl).getTokenAccountsByOwner(address(owner), { mint: address(USDC_MINT) }, { encoding: "jsonParsed" }).send();
59
+ if (value.length > 0) {
60
+ const ta = value[0].account.data.parsed.info.tokenAmount;
61
+ return {
62
+ raw: BigInt(ta.amount),
63
+ ui: ta.uiAmount !== null ? ta.uiAmount.toFixed(2) : "0.00"
64
+ };
65
+ }
66
+ return {
67
+ raw: 0n,
68
+ ui: "0.00"
69
+ };
70
+ }
71
+ async function getSolBalanceLamports(rpcUrl, owner) {
72
+ const { value } = await createSolanaRpc(rpcUrl).getBalance(address(owner)).send();
73
+ return value;
74
+ }
75
+ async function getSolBalance(rpcUrl, owner) {
76
+ const lamports = await getSolBalanceLamports(rpcUrl, owner);
77
+ return (Number(lamports) / 1e9).toFixed(4);
78
+ }
79
+ async function checkAtaExists(rpcUrl, owner) {
80
+ const ata = await findAta(address(USDC_MINT), address(owner));
81
+ const { value } = await createSolanaRpc(rpcUrl).getAccountInfo(ata, { encoding: "base64" }).send();
82
+ return value !== null;
83
+ }
84
+ async function transferUsdc(signer, rpcUrl, dest, amountRaw) {
85
+ const rpc = createSolanaRpc(rpcUrl);
86
+ const usdcMint = address(USDC_MINT);
87
+ const transferIx = transferCheckedIx(await findAta(usdcMint, signer.address), usdcMint, await findAta(usdcMint, address(dest)), signer, amountRaw, 6);
88
+ const { value: latestBlockhash } = await rpc.getLatestBlockhash().send();
89
+ const encoded = getBase64EncodedWireTransaction(await partiallySignTransactionMessageWithSigners(pipe(createTransactionMessage({ version: 0 }), (m) => setTransactionMessageFeePayer(signer.address, m), (m) => appendTransactionMessageInstructions([transferIx], m), (m) => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, m))));
90
+ return await rpc.sendTransaction(encoded, { encoding: "base64" }).send();
91
+ }
92
+ //#endregion
93
+ export { checkAtaExists, getSolBalance, getTokenAccounts, getUsdcBalance, transferUsdc };
package/dist/tools.js ADDED
@@ -0,0 +1,269 @@
1
+ import { TEMPO_NETWORK, createMppProxyHandler, extractTxSignature } from "./handler.js";
2
+ import { appendHistory, calcSpend, formatAmount, readHistory } from "./history.js";
3
+ import { getSolBalance, getTokenAccounts, getUsdcBalance } from "./solana.js";
4
+ import { fetchAllBalances } from "./commands/wallet.js";
5
+ import { Type } from "@sinclair/typebox";
6
+ //#region packages/x402-proxy/src/openclaw/tools.ts
7
+ const SOL_MAINNET = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
8
+ const USDC_DECIMALS = 6;
9
+ const INFERENCE_RESERVE = .3;
10
+ const MAX_RESPONSE_CHARS = 5e4;
11
+ function paymentAmount(payment) {
12
+ if (!payment?.amount) return void 0;
13
+ const parsed = Number.parseFloat(payment.amount);
14
+ return Number.isNaN(parsed) ? void 0 : parsed / 10 ** USDC_DECIMALS;
15
+ }
16
+ function parseMppAmount(value) {
17
+ if (!value) return void 0;
18
+ const parsed = Number(value);
19
+ return Number.isFinite(parsed) ? parsed : void 0;
20
+ }
21
+ function toolResult(text) {
22
+ return {
23
+ content: [{
24
+ type: "text",
25
+ text
26
+ }],
27
+ details: {}
28
+ };
29
+ }
30
+ function addressForNetwork(evmAddress, solanaAddress, network) {
31
+ if (network?.startsWith("eip155:")) return evmAddress ?? solanaAddress;
32
+ if (network?.startsWith("solana:")) return solanaAddress ?? evmAddress;
33
+ return solanaAddress ?? evmAddress;
34
+ }
35
+ function walletAddressForNetwork(ctx, network) {
36
+ return addressForNetwork(ctx.getEvmWalletAddress(), ctx.getSolanaWalletAddress(), network) ?? "unknown";
37
+ }
38
+ async function getWalletSnapshot(rpcUrl, solanaWallet, evmWallet, historyPath) {
39
+ const [{ ui, raw }, sol, tokens, balances] = await Promise.all([
40
+ solanaWallet ? getUsdcBalance(rpcUrl, solanaWallet) : Promise.resolve({
41
+ ui: "0",
42
+ raw: 0n
43
+ }),
44
+ solanaWallet ? getSolBalance(rpcUrl, solanaWallet) : Promise.resolve("0"),
45
+ solanaWallet ? getTokenAccounts(rpcUrl, solanaWallet).catch(() => []) : Promise.resolve([]),
46
+ fetchAllBalances(evmWallet ?? void 0, solanaWallet ?? void 0)
47
+ ]);
48
+ const records = readHistory(historyPath);
49
+ return {
50
+ ui,
51
+ raw,
52
+ sol,
53
+ tokens,
54
+ balances,
55
+ records,
56
+ spend: calcSpend(records)
57
+ };
58
+ }
59
+ function createWalletTool(ctx) {
60
+ return {
61
+ name: "x_wallet",
62
+ label: "Wallet Status",
63
+ description: "Check wallet readiness, balances, and spend history for x402 and MPP payments before making paid requests.",
64
+ parameters: Type.Object({}),
65
+ async execute() {
66
+ await ctx.ensureReady();
67
+ const solanaWallet = ctx.getSolanaWalletAddress();
68
+ const evmWallet = ctx.getEvmWalletAddress();
69
+ if (!solanaWallet && !evmWallet) return toolResult("Wallet not configured yet. Run `x402-proxy setup` or set X402_PROXY_WALLET_MNEMONIC.");
70
+ try {
71
+ const snap = await getWalletSnapshot(ctx.rpcUrl, solanaWallet, evmWallet, ctx.historyPath);
72
+ const total = Number.parseFloat(snap.ui);
73
+ const available = Math.max(0, total - INFERENCE_RESERVE);
74
+ const tokenLines = snap.tokens.slice(0, 5).map((t) => {
75
+ const short = `${t.mint.slice(0, 4)}...${t.mint.slice(-4)}`;
76
+ return `${Number.parseFloat(t.amount).toLocaleString("en-US", { maximumFractionDigits: 0 })} (${short})`;
77
+ });
78
+ const lines = [
79
+ `Default protocol: ${ctx.getDefaultRequestProtocol()}`,
80
+ `MPP budget: ${ctx.getDefaultMppSessionBudget()} USDC`,
81
+ `MPP ready: ${evmWallet ? "yes" : "no"}`,
82
+ `x402 ready: ${solanaWallet ? "yes" : "no"}`
83
+ ];
84
+ if (evmWallet) {
85
+ lines.push(`Base wallet: ${evmWallet}`);
86
+ lines.push(`Base balance: ${snap.balances.evm?.usdc ?? "?"} USDC`);
87
+ lines.push(`Tempo balance: ${snap.balances.tempo?.usdc ?? "?"} USDC`);
88
+ }
89
+ if (solanaWallet) {
90
+ lines.push(`Solana wallet: ${solanaWallet}`);
91
+ lines.push(`Solana: ${snap.sol} SOL`);
92
+ lines.push(`Solana USDC: ${snap.ui} USDC`);
93
+ lines.push(`Available for x402 tools: ${available.toFixed(2)} USDC`);
94
+ lines.push(`Reserved for inference: ${INFERENCE_RESERVE.toFixed(2)} USDC`);
95
+ }
96
+ lines.push(`Spent today: ${formatAmount(snap.spend.today, "USDC")}`);
97
+ lines.push(`Total spent: ${formatAmount(snap.spend.total, "USDC")} (${snap.spend.count} txs)`);
98
+ if (tokenLines.length > 0) lines.push(`Tokens held: ${tokenLines.join(", ")}`);
99
+ if (!evmWallet) lines.push("MPP setup hint: set X402_PROXY_WALLET_MNEMONIC or X402_PROXY_WALLET_EVM_KEY, or run x402-proxy setup.");
100
+ if (!solanaWallet) lines.push("x402 setup hint: add a Solana wallet or mnemonic if you want to pay Solana x402 endpoints.");
101
+ return toolResult(lines.join("\n"));
102
+ } catch (err) {
103
+ return toolResult(`Failed to check wallet status: ${String(err)}`);
104
+ }
105
+ }
106
+ };
107
+ }
108
+ function createRequestTool(ctx) {
109
+ return {
110
+ name: "x_request",
111
+ label: "Paid Request",
112
+ description: "Call a paid HTTP endpoint with automatic x402 or MPP settlement. Defaults to the plugin protocol and supports explicit protocol override.",
113
+ parameters: Type.Object({
114
+ url: Type.String({ description: "The paid endpoint URL" }),
115
+ method: Type.Optional(Type.String({ description: "HTTP method (default: GET)" })),
116
+ params: Type.Optional(Type.String({ description: "For GET: query params as JSON object. For POST/PUT/PATCH: JSON request body." })),
117
+ headers: Type.Optional(Type.String({ description: "Custom HTTP headers as JSON object" })),
118
+ protocol: Type.Optional(Type.Union([
119
+ Type.Literal("x402"),
120
+ Type.Literal("mpp"),
121
+ Type.Literal("auto")
122
+ ], { description: "Override the default payment protocol for this request." }))
123
+ }),
124
+ async execute(_id, params) {
125
+ await ctx.ensureReady();
126
+ const solanaWallet = ctx.getSolanaWalletAddress();
127
+ const evmWallet = ctx.getEvmWalletAddress();
128
+ const method = (params.method || "GET").toUpperCase();
129
+ let url = params.url;
130
+ const reqInit = { method };
131
+ if (params.headers) try {
132
+ reqInit.headers = JSON.parse(params.headers);
133
+ } catch {
134
+ return toolResult("Invalid headers JSON.");
135
+ }
136
+ if (params.params) if (method === "GET" || method === "HEAD") try {
137
+ const qp = JSON.parse(params.params);
138
+ const qs = new URLSearchParams(qp).toString();
139
+ url = qs ? `${url}${url.includes("?") ? "&" : "?"}${qs}` : url;
140
+ } catch {
141
+ return toolResult("Invalid params JSON for GET request.");
142
+ }
143
+ else {
144
+ reqInit.body = params.params;
145
+ reqInit.headers = {
146
+ "Content-Type": "application/json",
147
+ ...reqInit.headers
148
+ };
149
+ }
150
+ const protocol = params.protocol && [
151
+ "x402",
152
+ "mpp",
153
+ "auto"
154
+ ].includes(params.protocol) ? params.protocol : ctx.getDefaultRequestProtocol();
155
+ const toolStartMs = Date.now();
156
+ if ((protocol === "mpp" || protocol === "auto") && !ctx.getEvmKey()) return toolResult("MPP request failed: no EVM wallet configured. Run x402-proxy setup or set X402_PROXY_WALLET_EVM_KEY.");
157
+ if (protocol === "x402") {
158
+ if (!solanaWallet) return toolResult("x402 request failed: no Solana wallet configured. Add a mnemonic or Solana key first.");
159
+ try {
160
+ const { ui } = await getUsdcBalance(ctx.rpcUrl, solanaWallet);
161
+ if (Number.parseFloat(ui) <= INFERENCE_RESERVE) return toolResult(`Insufficient funds. Balance: ${ui} USDC, reserved for inference: ${INFERENCE_RESERVE.toFixed(2)} USDC. Top up wallet: ${solanaWallet}`);
162
+ } catch {}
163
+ const proxy = ctx.getX402Proxy();
164
+ if (!proxy) return toolResult("x402 wallet is not ready yet. Try again in a moment.");
165
+ try {
166
+ const response = await proxy.x402Fetch(url, reqInit);
167
+ const body = await response.text();
168
+ if (response.status === 402) {
169
+ const payment = proxy.shiftPayment();
170
+ appendHistory(ctx.historyPath, {
171
+ t: Date.now(),
172
+ ok: false,
173
+ kind: "x402_payment",
174
+ net: payment?.network ?? "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
175
+ from: walletAddressForNetwork(ctx, payment?.network),
176
+ label: url,
177
+ ms: Date.now() - toolStartMs,
178
+ error: "payment_required"
179
+ });
180
+ return toolResult(`Payment failed (402): ${body.substring(0, 500)}. Wallet: ${walletAddressForNetwork(ctx, payment?.network)}`);
181
+ }
182
+ const payment = proxy.shiftPayment();
183
+ const amount = paymentAmount(payment);
184
+ appendHistory(ctx.historyPath, {
185
+ t: Date.now(),
186
+ ok: true,
187
+ kind: "x402_payment",
188
+ net: payment?.network ?? "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
189
+ from: walletAddressForNetwork(ctx, payment?.network),
190
+ to: payment?.payTo,
191
+ tx: extractTxSignature(response),
192
+ amount,
193
+ token: "USDC",
194
+ label: url,
195
+ ms: Date.now() - toolStartMs
196
+ });
197
+ const truncated = body.length > MAX_RESPONSE_CHARS ? `${body.substring(0, MAX_RESPONSE_CHARS)}\n\n[Truncated - response was ${body.length} chars]` : body;
198
+ return toolResult(`HTTP ${response.status}\n\n${truncated}`);
199
+ } catch (err) {
200
+ ctx.getX402Proxy()?.shiftPayment();
201
+ appendHistory(ctx.historyPath, {
202
+ t: Date.now(),
203
+ ok: false,
204
+ kind: "x402_payment",
205
+ net: SOL_MAINNET,
206
+ from: solanaWallet,
207
+ label: params.url,
208
+ error: String(err).substring(0, 200)
209
+ });
210
+ const msg = String(err);
211
+ return toolResult(msg.includes("Simulation failed") || msg.includes("insufficient") ? `Payment failed - insufficient funds. Wallet: ${solanaWallet}. Error: ${msg}` : `Request failed: ${msg}`);
212
+ }
213
+ }
214
+ const evmKey = ctx.getEvmKey();
215
+ if (!evmKey) return toolResult("MPP request failed: no EVM wallet configured. Run x402-proxy setup or set X402_PROXY_WALLET_EVM_KEY.");
216
+ const mpp = await createMppProxyHandler({
217
+ evmKey,
218
+ maxDeposit: ctx.getDefaultMppSessionBudget()
219
+ });
220
+ try {
221
+ const response = await mpp.fetch(url, reqInit);
222
+ const body = await response.text();
223
+ const payment = mpp.shiftPayment();
224
+ if (response.status === 402) {
225
+ appendHistory(ctx.historyPath, {
226
+ t: Date.now(),
227
+ ok: false,
228
+ kind: "mpp_payment",
229
+ net: payment?.network ?? "eip155:4217",
230
+ from: evmWallet ?? "unknown",
231
+ label: url,
232
+ ms: Date.now() - toolStartMs,
233
+ error: "payment_required"
234
+ });
235
+ return toolResult(`MPP payment failed (402): ${body.substring(0, 500)}`);
236
+ }
237
+ appendHistory(ctx.historyPath, {
238
+ t: Date.now(),
239
+ ok: true,
240
+ kind: "mpp_payment",
241
+ net: payment?.network ?? "eip155:4217",
242
+ from: evmWallet ?? "unknown",
243
+ tx: extractTxSignature(response) ?? payment?.receipt?.reference,
244
+ amount: parseMppAmount(payment?.amount),
245
+ token: "USDC",
246
+ label: url,
247
+ ms: Date.now() - toolStartMs
248
+ });
249
+ const truncated = body.length > MAX_RESPONSE_CHARS ? `${body.substring(0, MAX_RESPONSE_CHARS)}\n\n[Truncated - response was ${body.length} chars]` : body;
250
+ return toolResult(`HTTP ${response.status}\n\n${truncated}`);
251
+ } catch (err) {
252
+ appendHistory(ctx.historyPath, {
253
+ t: Date.now(),
254
+ ok: false,
255
+ kind: "mpp_payment",
256
+ net: TEMPO_NETWORK,
257
+ from: evmWallet ?? "unknown",
258
+ label: params.url,
259
+ error: String(err).substring(0, 200)
260
+ });
261
+ return toolResult(`MPP request failed: ${String(err)}`);
262
+ } finally {
263
+ await mpp.close().catch(() => {});
264
+ }
265
+ }
266
+ };
267
+ }
268
+ //#endregion
269
+ export { SOL_MAINNET, addressForNetwork, createRequestTool, createWalletTool, getWalletSnapshot, parseMppAmount, paymentAmount };
package/dist/wallet.js ADDED
@@ -0,0 +1,15 @@
1
+ import { createKeyPairSignerFromBytes } from "@solana/kit";
2
+ import { readFileSync } from "node:fs";
3
+ import "viem/accounts";
4
+ import "@x402/evm";
5
+ //#region packages/x402-proxy/src/wallet.ts
6
+ /**
7
+ * Load a Solana keypair from a solana-keygen JSON file.
8
+ * Format: JSON array of 64 numbers [32 secret bytes + 32 public bytes].
9
+ */
10
+ async function loadSvmWallet(keypairPath) {
11
+ const data = JSON.parse(readFileSync(keypairPath, "utf-8"));
12
+ return createKeyPairSignerFromBytes(new Uint8Array(data));
13
+ }
14
+ //#endregion
15
+ export { loadSvmWallet };
@@ -0,0 +1,112 @@
1
+ {
2
+ "id": "x402-proxy",
3
+ "name": "mpp/x402 Payments Proxy",
4
+ "description": "x402 and MPP payments, wallet tools, and paid inference proxying",
5
+ "version": "0.10.9",
6
+ "providers": [
7
+ "surf"
8
+ ],
9
+ "autoEnableWhenConfiguredProviders": [
10
+ "surf"
11
+ ],
12
+ "skills": [
13
+ "skills"
14
+ ],
15
+ "contracts": {
16
+ "tools": [
17
+ "x_wallet",
18
+ "x_balance",
19
+ "x_request",
20
+ "x_payment"
21
+ ]
22
+ },
23
+ "configSchema": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "properties": {
27
+ "providers": {
28
+ "type": "object",
29
+ "description": "Provider catalog keyed by name. Defaults to the built-in surf provider when omitted.",
30
+ "additionalProperties": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "properties": {
34
+ "baseUrl": {
35
+ "type": "string",
36
+ "description": "Gateway base path for this provider, typically under /x402-proxy"
37
+ },
38
+ "upstreamUrl": {
39
+ "type": "string",
40
+ "description": "Upstream inference origin to proxy to"
41
+ },
42
+ "protocol": {
43
+ "type": "string",
44
+ "enum": [
45
+ "x402",
46
+ "mpp",
47
+ "auto"
48
+ ],
49
+ "description": "Payment protocol for this provider. Defaults to mpp."
50
+ },
51
+ "mppSessionBudget": {
52
+ "type": "string",
53
+ "description": "Maximum USDC budget to lock for MPP sessions for this provider (default: 0.5)"
54
+ },
55
+ "models": {
56
+ "type": "array",
57
+ "description": "Static OpenClaw model catalog entries for this provider"
58
+ }
59
+ }
60
+ }
61
+ },
62
+ "protocol": {
63
+ "type": "string",
64
+ "enum": [
65
+ "x402",
66
+ "mpp",
67
+ "auto"
68
+ ],
69
+ "description": "Default payment protocol fallback for providers that do not override it."
70
+ },
71
+ "mppSessionBudget": {
72
+ "type": "string",
73
+ "description": "Default maximum USDC budget to lock for MPP sessions (default: 0.5)"
74
+ },
75
+ "keypairPath": {
76
+ "type": "string",
77
+ "description": "Optional path to Solana keypair JSON file (overrides x402-proxy wallet resolution for Solana/x402 surfaces)"
78
+ },
79
+ "rpcUrl": {
80
+ "type": "string",
81
+ "description": "Solana RPC URL"
82
+ },
83
+ "dashboardUrl": {
84
+ "type": "string",
85
+ "description": "URL to link from /x_wallet dashboard"
86
+ }
87
+ },
88
+ "required": []
89
+ },
90
+ "uiHints": {
91
+ "protocol": {
92
+ "label": "Default protocol",
93
+ "help": "Used only when a provider entry does not set its own protocol."
94
+ },
95
+ "mppSessionBudget": {
96
+ "label": "Default MPP budget",
97
+ "placeholder": "0.5"
98
+ },
99
+ "keypairPath": {
100
+ "label": "Solana keypair path",
101
+ "advanced": true
102
+ },
103
+ "rpcUrl": {
104
+ "label": "Solana RPC URL",
105
+ "advanced": true
106
+ },
107
+ "dashboardUrl": {
108
+ "label": "Dashboard URL",
109
+ "advanced": true
110
+ }
111
+ }
112
+ }
package/package.json ADDED
@@ -0,0 +1,93 @@
1
+ {
2
+ "name": "x402-proxy-openclaw",
3
+ "description": "OpenClaw plugin for x402 and MPP payments, wallet tools, and paid inference proxying.",
4
+ "version": "0.10.9",
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "license": "Apache-2.0",
8
+ "engines": {
9
+ "node": ">=22.0.0"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/cascade-protocol/x402-proxy.git",
14
+ "directory": "packages/x402-proxy"
15
+ },
16
+ "homepage": "https://github.com/cascade-protocol/x402-proxy#readme",
17
+ "bugs": {
18
+ "url": "https://github.com/cascade-protocol/x402-proxy/issues"
19
+ },
20
+ "main": "./dist/openclaw/plugin.js",
21
+ "types": "./dist/openclaw/plugin.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/openclaw/plugin.d.ts",
25
+ "default": "./dist/openclaw/plugin.js"
26
+ },
27
+ "./package.json": "./package.json"
28
+ },
29
+ "openclaw": {
30
+ "extensions": [
31
+ "./dist/openclaw/plugin.js"
32
+ ],
33
+ "providers": [
34
+ "surf"
35
+ ],
36
+ "compat": {
37
+ "pluginApi": ">=2026.3.24",
38
+ "minGatewayVersion": "2026.3.24"
39
+ },
40
+ "build": {
41
+ "openclawVersion": "2026.3.24",
42
+ "pluginSdkVersion": "2026.3.24"
43
+ }
44
+ },
45
+ "peerDependencies": {
46
+ "openclaw": ">=2026.3.8"
47
+ },
48
+ "peerDependenciesMeta": {
49
+ "openclaw": {
50
+ "optional": true
51
+ }
52
+ },
53
+ "dependencies": {
54
+ "@clack/prompts": "^1.1.0",
55
+ "@getmcp/generators": "^0.10.1",
56
+ "@modelcontextprotocol/sdk": "^1.28.0",
57
+ "@noble/curves": "^2.0.1",
58
+ "@noble/hashes": "^2.0.1",
59
+ "@scure/base": "^2.0.0",
60
+ "@scure/bip32": "^2.0.1",
61
+ "@scure/bip39": "^2.0.1",
62
+ "@sinclair/typebox": "^0.34.48",
63
+ "@solana-program/token": "^0.12.0",
64
+ "@solana/kit": "^6.5.0",
65
+ "@stricli/core": "^1.2.6",
66
+ "@x402/core": "^2.8.0",
67
+ "@x402/evm": "^2.8.0",
68
+ "@x402/fetch": "^2.8.0",
69
+ "@x402/mcp": "^2.8.0",
70
+ "@x402/svm": "^2.8.0",
71
+ "ethers": "^6.16.0",
72
+ "mppx": "^0.5.1",
73
+ "picocolors": "^1.1.1",
74
+ "viem": "^2.47.6",
75
+ "yaml": "^2.8.3"
76
+ },
77
+ "keywords": [
78
+ "x402",
79
+ "mpp",
80
+ "http-402",
81
+ "mcp",
82
+ "mcp-proxy",
83
+ "ai-agent",
84
+ "agentic-commerce",
85
+ "base",
86
+ "solana",
87
+ "tempo",
88
+ "usdc",
89
+ "coinbase",
90
+ "openclaw",
91
+ "openclaw-plugin"
92
+ ]
93
+ }