@dominusnode/openclaw-plugin 1.0.1 → 1.1.0

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/plugin.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Dominus Node OpenClaw Plugin
3
3
  *
4
- * Implements 24 tools for interacting with Dominus Node's rotating proxy service
4
+ * Implements 26 tools for interacting with Dominus Node's rotating proxy service
5
5
  * directly from OpenClaw AI coding sessions.
6
6
  *
7
7
  * Uses native fetch (no external dependencies). Runs via jiti runtime.
package/dist/plugin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Dominus Node OpenClaw Plugin
3
3
  *
4
- * Implements 24 tools for interacting with Dominus Node's rotating proxy service
4
+ * Implements 26 tools for interacting with Dominus Node's rotating proxy service
5
5
  * directly from OpenClaw AI coding sessions.
6
6
  *
7
7
  * Uses native fetch (no external dependencies). Runs via jiti runtime.
@@ -61,6 +61,9 @@ function getProxyPort() {
61
61
  return 8080;
62
62
  return port;
63
63
  }
64
+ function getAgentSecret() {
65
+ return process.env.DOMINUSNODE_AGENT_SECRET || undefined;
66
+ }
64
67
  // ---------------------------------------------------------------------------
65
68
  // Credential scrubbing
66
69
  // ---------------------------------------------------------------------------
@@ -351,9 +354,18 @@ async function ensureAuth(apiKey, baseUrl) {
351
354
  const keyPrefix = apiKey.slice(0, 16);
352
355
  if (cachedJwt && Date.now() < jwtExpiresAt && cachedApiKeyPrefix === keyPrefix)
353
356
  return cachedJwt;
357
+ const authHeaders = {
358
+ "Content-Type": "application/json",
359
+ "User-Agent": "dominusnode-openclaw-plugin/1.0.0",
360
+ };
361
+ const agentSecret = getAgentSecret();
362
+ if (agentSecret) {
363
+ authHeaders["X-DominusNode-Agent"] = "mcp";
364
+ authHeaders["X-DominusNode-Agent-Secret"] = agentSecret;
365
+ }
354
366
  const res = await fetch(`${baseUrl}/api/auth/verify-key`, {
355
367
  method: "POST",
356
- headers: { "Content-Type": "application/json", "User-Agent": "dominusnode-openclaw-plugin/1.0.0" },
368
+ headers: authHeaders,
357
369
  body: JSON.stringify({ apiKey }),
358
370
  redirect: "error",
359
371
  });
@@ -378,6 +390,11 @@ async function apiRequest(method, path, body) {
378
390
  "Accept": "application/json",
379
391
  "User-Agent": "dominusnode-openclaw-plugin/1.0.0",
380
392
  };
393
+ const agentSecret = getAgentSecret();
394
+ if (agentSecret) {
395
+ headers["X-DominusNode-Agent"] = "mcp";
396
+ headers["X-DominusNode-Agent-Secret"] = agentSecret;
397
+ }
381
398
  const init = {
382
399
  method,
383
400
  headers,
@@ -1454,7 +1471,92 @@ const topupPaypalTool = {
1454
1471
  }
1455
1472
  },
1456
1473
  };
1457
- // 22. x402_info
1474
+ // 22. topup_stripe
1475
+ const topupStripeTool = {
1476
+ name: "topup_stripe",
1477
+ description: "Top up your Dominus Node wallet balance via Stripe. Creates a Stripe checkout session and returns " +
1478
+ "a checkout URL to complete payment. Minimum $5 (500 cents), maximum $1,000 (100000 cents).",
1479
+ parameters: {
1480
+ amount_cents: {
1481
+ type: "number",
1482
+ description: "Amount in cents to top up (min 500 = $5, max 100000 = $1,000)",
1483
+ required: true,
1484
+ },
1485
+ },
1486
+ execute: async (args) => {
1487
+ try {
1488
+ const amountCents = Number(args.amount_cents ?? 0);
1489
+ if (!Number.isInteger(amountCents) || amountCents < 500 || amountCents > 100000) {
1490
+ return "Error: amount_cents must be an integer between 500 ($5) and 100000 ($1,000).";
1491
+ }
1492
+ const data = await apiPost("/api/wallet/topup/stripe", { amountCents });
1493
+ return [
1494
+ "Stripe Checkout Session Created",
1495
+ "",
1496
+ `Session ID: ${data.sessionId}`,
1497
+ `Amount: ${formatCents(amountCents)}`,
1498
+ `Checkout URL: ${data.url}`,
1499
+ "",
1500
+ "Open the checkout URL in a browser to complete payment.",
1501
+ "Once paid, the funds will be credited to your wallet automatically.",
1502
+ ].join("\n");
1503
+ }
1504
+ catch (err) {
1505
+ return `Error: ${safeError(err)}`;
1506
+ }
1507
+ },
1508
+ };
1509
+ // 23. topup_crypto
1510
+ const VALID_CRYPTO_CURRENCIES = new Set([
1511
+ "BTC", "ETH", "LTC", "XMR", "ZEC", "USDC", "SOL", "USDT", "DAI", "BNB", "LINK",
1512
+ ]);
1513
+ const topupCryptoTool = {
1514
+ name: "topup_crypto",
1515
+ description: "Top up your Dominus Node wallet balance via cryptocurrency. Creates a crypto payment invoice " +
1516
+ "and returns payment details. Minimum $5, maximum $1,000. " +
1517
+ "Supported currencies: BTC, ETH, LTC, XMR, ZEC, USDC, SOL, USDT, DAI, BNB, LINK.",
1518
+ parameters: {
1519
+ amount_usd: {
1520
+ type: "number",
1521
+ description: "Amount in USD to top up (min 5, max 1000)",
1522
+ required: true,
1523
+ },
1524
+ currency: {
1525
+ type: "string",
1526
+ description: "Cryptocurrency to pay with",
1527
+ required: true,
1528
+ enum: ["BTC", "ETH", "LTC", "XMR", "ZEC", "USDC", "SOL", "USDT", "DAI", "BNB", "LINK"],
1529
+ },
1530
+ },
1531
+ execute: async (args) => {
1532
+ try {
1533
+ const amountUsd = Number(args.amount_usd ?? 0);
1534
+ if (typeof amountUsd !== "number" || !Number.isFinite(amountUsd) || amountUsd < 5 || amountUsd > 1000) {
1535
+ return "Error: amount_usd must be a number between 5 and 1000.";
1536
+ }
1537
+ const currency = String(args.currency ?? "").toUpperCase();
1538
+ if (!VALID_CRYPTO_CURRENCIES.has(currency)) {
1539
+ return `Error: currency must be one of: ${[...VALID_CRYPTO_CURRENCIES].join(", ")}.`;
1540
+ }
1541
+ const data = await apiPost("/api/wallet/topup/crypto", { amountUsd, currency: currency.toLowerCase() });
1542
+ return [
1543
+ "Crypto Payment Invoice Created",
1544
+ "",
1545
+ `Invoice ID: ${data.invoiceId}`,
1546
+ `Amount: $${amountUsd}`,
1547
+ `Pay: ${data.priceAmount} ${data.payCurrency?.toUpperCase() ?? currency}`,
1548
+ `Payment URL: ${data.invoiceUrl}`,
1549
+ "",
1550
+ "Open the payment URL to complete payment.",
1551
+ "Once confirmed on-chain, the funds will be credited to your wallet.",
1552
+ ].join("\n");
1553
+ }
1554
+ catch (err) {
1555
+ return `Error: ${safeError(err)}`;
1556
+ }
1557
+ },
1558
+ };
1559
+ // 24. x402_info
1458
1560
  const x402InfoTool = {
1459
1561
  name: "x402_info",
1460
1562
  description: "Get x402 micropayment protocol information including supported " +
@@ -1470,7 +1572,7 @@ const x402InfoTool = {
1470
1572
  }
1471
1573
  },
1472
1574
  };
1473
- // 23. update_team_member_role
1575
+ // 25. update_team_member_role
1474
1576
  const updateTeamMemberRoleTool = {
1475
1577
  name: "update_team_member_role",
1476
1578
  description: "Update a team member's role (member or admin). Only owners and admins can change roles.",
@@ -1516,7 +1618,7 @@ const updateTeamMemberRoleTool = {
1516
1618
  }
1517
1619
  },
1518
1620
  };
1519
- // 24. update_wallet_policy
1621
+ // 26. update_wallet_policy
1520
1622
  const updateWalletPolicyTool = {
1521
1623
  name: "update_wallet_policy",
1522
1624
  description: "Update the policy of an agentic wallet. Sets or clears the daily budget cap " +
@@ -1623,6 +1725,8 @@ export const tools = [
1623
1725
  updateTeamTool,
1624
1726
  updateTeamMemberRoleTool,
1625
1727
  topupPaypalTool,
1728
+ topupStripeTool,
1729
+ topupCryptoTool,
1626
1730
  x402InfoTool,
1627
1731
  updateWalletPolicyTool,
1628
1732
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dominusnode/openclaw-plugin",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Dominus Node proxy plugin for OpenClaw — route web requests through rotating proxy networks",
5
5
  "main": "dist/plugin.js",
6
6
  "types": "dist/plugin.d.ts",