@true402.dev/openclaw-swap-guard 1.0.3 → 1.0.5

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/README.md CHANGED
@@ -5,9 +5,11 @@
5
5
  It hooks OpenClaw's `before_tool_call`, so it sits in front of *every* trading skill and MCP tool you have installed — Base trade skills, Uniswap, Jupiter, sniper bots, your own scripts. A skill the agent forgets to follow cannot skip it.
6
6
 
7
7
  ```bash
8
- openclaw plugins install @true402.dev/openclaw-swap-guard
8
+ openclaw plugins install clawhub:@true402.dev/openclaw-swap-guard
9
9
  ```
10
10
 
11
+ Published on [ClawHub](https://clawhub.ai) (security scan: clean) and npm; OpenClaw asks you to approve its tool-call hook on install.
12
+
11
13
  ## What it does
12
14
 
13
15
  Before a tool call that buys a token, the guard asks [true402](https://true402.dev):
package/dist/index.js CHANGED
@@ -263,7 +263,7 @@ function reasonText(v) {
263
263
  return v.reasons.length ? ` (${v.reasons.slice(0, 4).join("; ")})` : "";
264
264
  }
265
265
  function clean(s, max = 160) {
266
- const t = s.replace(/[\u0000-\u001f\u007f-\u009f​-‏‪-‮⁦-⁩]/g, " ").replace(/\s+/g, " ").trim();
266
+ const t = s.replace(/[\u0000-\u001f\u007f-\u009f\u200b-\u200f\u202a-\u202e\u2066-\u2069]/g, " ").replace(/\s+/g, " ").trim();
267
267
  return t.length > max ? `${t.slice(0, max - 1)}\u2026` : t;
268
268
  }
269
269
 
@@ -279,7 +279,7 @@ import { privateKeyToAccount } from "viem/accounts";
279
279
  import { base } from "viem/chains";
280
280
 
281
281
  // src/client.ts
282
- var CLIENT = { id: "openclaw-guard", version: "1.0.3", package: "@true402.dev/openclaw-swap-guard", install: "openclaw plugins install @true402.dev/openclaw-swap-guard" };
282
+ var CLIENT = { id: "openclaw-guard", version: "1.0.5", package: "@true402.dev/openclaw-swap-guard", install: "openclaw plugins install clawhub:@true402.dev/openclaw-swap-guard" };
283
283
 
284
284
  // src/x402.ts
285
285
  var USDC_ABI = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@true402.dev/openclaw-swap-guard",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "OpenClaw plugin: before any tool call that buys a token, check it with true402 (executed buy/sell honeypot simulation) and block honeypots and rugs. Base, Ethereum, BSC, Solana. Free daily checks; pay-per-check over x402.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -54,7 +54,7 @@
54
54
  "install": {
55
55
  "clawhubSpec": "clawhub:@true402.dev/openclaw-swap-guard",
56
56
  "npmSpec": "@true402.dev/openclaw-swap-guard",
57
- "defaultChoice": "npm",
57
+ "defaultChoice": "clawhub",
58
58
  "minHostVersion": ">=2026.10.5"
59
59
  },
60
60
  "compat": {