agentic-x402 0.3.5 → 0.3.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
CHANGED
|
@@ -4,7 +4,7 @@ description: Make x402 payments to access gated APIs and content. Fetch paid res
|
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Requires Node.js 20+, network access to x402 facilitators and EVM chains
|
|
6
6
|
homepage: https://www.npmjs.com/package/agentic-x402
|
|
7
|
-
metadata: {"author": "monemetrics", "version": "0.3.
|
|
7
|
+
metadata: {"author": "monemetrics", "version": "0.3.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)"}], "plugin": true}}
|
|
8
8
|
allowed-tools: Bash(x402:*) Bash(npm:*) Read
|
|
9
9
|
---
|
|
10
10
|
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import type { X402PluginConfig } from './types.js';
|
|
5
5
|
|
|
6
|
-
const CONFIG_MAP: Record<keyof Omit<X402PluginConfig, 'watcher'>, string> = {
|
|
6
|
+
const CONFIG_MAP: Record<keyof Omit<X402PluginConfig, 'watcher' | 'hooksToken'>, string> = {
|
|
7
7
|
evmPrivateKey: 'EVM_PRIVATE_KEY',
|
|
8
8
|
network: 'X402_NETWORK',
|
|
9
9
|
maxPaymentUsd: 'X402_MAX_PAYMENT_USD',
|
|
@@ -23,7 +23,7 @@ export function applyConfigBridge(pluginConfig: Record<string, unknown>): void {
|
|
|
23
23
|
const config = pluginConfig as X402PluginConfig;
|
|
24
24
|
|
|
25
25
|
for (const [key, envVar] of Object.entries(CONFIG_MAP)) {
|
|
26
|
-
const value = config[key as keyof Omit<X402PluginConfig, 'watcher'>];
|
|
26
|
+
const value = config[key as keyof Omit<X402PluginConfig, 'watcher' | 'hooksToken'>];
|
|
27
27
|
if (value !== undefined && value !== null && !process.env[envVar]) {
|
|
28
28
|
process.env[envVar] = String(value);
|
|
29
29
|
}
|
package/scripts/plugin/index.ts
CHANGED
|
@@ -11,11 +11,11 @@ export default {
|
|
|
11
11
|
name: 'x402 Payments',
|
|
12
12
|
|
|
13
13
|
register(api: OpenClawPluginApi): void {
|
|
14
|
-
const { logger,
|
|
15
|
-
const pluginConfig =
|
|
14
|
+
const { logger, gatewayPort } = api;
|
|
15
|
+
const pluginConfig = (api.pluginConfig ?? {}) as X402PluginConfig;
|
|
16
16
|
|
|
17
17
|
// 1. Apply config bridge: inject plugin config → process.env
|
|
18
|
-
applyConfigBridge(
|
|
18
|
+
applyConfigBridge(pluginConfig);
|
|
19
19
|
logger.debug('x402 config bridge applied');
|
|
20
20
|
|
|
21
21
|
// 2. Register background watcher service (unless disabled)
|
package/scripts/plugin/types.ts
CHANGED
|
@@ -52,6 +52,7 @@ export interface CliCommand {
|
|
|
52
52
|
export interface OpenClawPluginApi {
|
|
53
53
|
logger: PluginLogger;
|
|
54
54
|
config: Record<string, unknown>;
|
|
55
|
+
pluginConfig?: Record<string, unknown>;
|
|
55
56
|
gatewayPort: number;
|
|
56
57
|
registerService(service: PluginService): void;
|
|
57
58
|
registerTool(tool: PluginTool): void;
|
package/skills/x402/SKILL.md
CHANGED
|
@@ -4,7 +4,7 @@ description: Make x402 payments to access gated APIs and content. Fetch paid res
|
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Requires Node.js 20+, network access to x402 facilitators and EVM chains
|
|
6
6
|
homepage: https://www.npmjs.com/package/agentic-x402
|
|
7
|
-
metadata: {"author": "monemetrics", "version": "0.3.
|
|
7
|
+
metadata: {"author": "monemetrics", "version": "0.3.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)"}], "plugin": true}}
|
|
8
8
|
allowed-tools: Bash(x402:*) Bash(npm:*) Read
|
|
9
9
|
---
|
|
10
10
|
|