agentic-x402 0.2.4 → 0.2.6
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/SKILL.md +2 -3
- package/package.json +1 -1
- package/scripts/commands/fetch-paid.ts +3 -1
- package/scripts/commands/pay.ts +8 -2
package/SKILL.md
CHANGED
|
@@ -3,9 +3,8 @@ name: agentic-x402
|
|
|
3
3
|
description: Make x402 payments to access gated APIs and content. Fetch paid resources, check wallet balance, and create payment links. Use when encountering 402 Payment Required responses or when the user wants to pay for web resources with crypto.
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Requires Node.js 20+, network access to x402 facilitators and EVM chains
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
version: "0.2.1"
|
|
6
|
+
homepage: https://www.npmjs.com/package/agentic-x402
|
|
7
|
+
metadata: {"author": "monemetrics", "version": "0.2.6", "openclaw": {"requires": {"bins": ["x402"], "env": ["EVM_PRIVATE_KEY"]}, "primaryEnv": "EVM_PRIVATE_KEY", "install": [{"id": "node", "kind": "node", "package": "agentic-x402", "bins": ["x402"], "label": "Install agentic-x402 (npm)"}]}}
|
|
9
8
|
allowed-tools: Bash(x402:*) Bash(npm:*) Read
|
|
10
9
|
---
|
|
11
10
|
|
package/package.json
CHANGED
package/scripts/commands/pay.ts
CHANGED
|
@@ -59,7 +59,10 @@ Examples:
|
|
|
59
59
|
const initialResponse = await fetch(url, {
|
|
60
60
|
method,
|
|
61
61
|
body: body ? body : undefined,
|
|
62
|
-
headers:
|
|
62
|
+
headers: {
|
|
63
|
+
'Accept': 'application/json',
|
|
64
|
+
...(body ? { 'Content-Type': 'application/json' } : {}),
|
|
65
|
+
},
|
|
63
66
|
});
|
|
64
67
|
|
|
65
68
|
if (initialResponse.status !== 402) {
|
|
@@ -143,7 +146,10 @@ Examples:
|
|
|
143
146
|
const response = await client.fetchWithPayment(url, {
|
|
144
147
|
method,
|
|
145
148
|
body: body ? body : undefined,
|
|
146
|
-
headers:
|
|
149
|
+
headers: {
|
|
150
|
+
'Accept': 'application/json',
|
|
151
|
+
...(body ? { 'Content-Type': 'application/json' } : {}),
|
|
152
|
+
},
|
|
147
153
|
});
|
|
148
154
|
|
|
149
155
|
if (!response.ok) {
|