@wafermapxyz/cli 0.4.9 → 0.4.10

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.10 (12 Nov 2026)
4
+
5
+ **`wafermap discover` shows the price on every network a service accepts.**
6
+
7
+ - Under each result, a `pays on:` line lists each network the service takes and its price there, for example `Base $0.002 · Polygon $0.002 · Solana $0.002`. Networks this wallet cannot pay on are marked `(not supported)`. Use the network you hold funds on with `wafermap pay <url> --network <net>`.
8
+ - SDK: `discover()` results carry `prices` (`network`, `chain`, `name`, `priceUsd`); `chain` is `null` for a network the wallet does not support. The MCP tool `wafermap_discover` returns the same field.
9
+ - `wafermap init` ends with a link to https://wafermap.xyz/start, the first paid call step by step.
10
+
3
11
  ## 0.4.9 (7 Nov 2026)
4
12
 
5
13
  **`wafermap call <llm> --stream`: watch the answer arrive.**
package/dist/cli.js CHANGED
@@ -1288,7 +1288,7 @@ var VERSION;
1288
1288
  var init_version = __esm({
1289
1289
  "src/version.ts"() {
1290
1290
  "use strict";
1291
- VERSION = "0.4.9";
1291
+ VERSION = "0.4.10";
1292
1292
  }
1293
1293
  });
1294
1294
 
@@ -1901,6 +1901,14 @@ function die(msg) {
1901
1901
  console.error(`\u2715 ${msg}`);
1902
1902
  process.exit(1);
1903
1903
  }
1904
+ function pricesLine(prices) {
1905
+ if (!prices?.length) return "";
1906
+ const fmt = (p) => `${p.name} ${p.priceUsd !== null ? `$${p.priceUsd}` : "\u2014"}`;
1907
+ const ours = prices.filter((p) => p.chain).map(fmt);
1908
+ const other = prices.filter((p) => !p.chain).map((p) => `${fmt(p)} (not supported)`);
1909
+ return `
1910
+ pays on: ${[...ours, ...other].join(" \xB7 ")}`;
1911
+ }
1904
1912
  function inputOf(a, from = 0) {
1905
1913
  const input = {};
1906
1914
  if (typeof a.flags.json === "string") {
@@ -1967,7 +1975,8 @@ async function main() {
1967
1975
  Solana address ${sol} (derived from the same key)
1968
1976
  Key encrypted in ${HOME}/keystore.json. Forget the password and the key is gone: run \`wafermap export-key\` to back it up.
1969
1977
  Fund it with a few dollars of USDC on Solana (Solana address), or USDG on Robinhood Chain or USDC on Base, Arbitrum, Polygon, Arc or Soneium (EVM address). Payments are gasless; swaps need a little ETH.
1970
- Caps: $0.10 per payment, $1 per day, $25 per swap. Change with \`wafermap limits\`.`);
1978
+ Caps: $0.10 per payment, $1 per day, $25 per swap. Change with \`wafermap limits\`.
1979
+ New here? Your first paid call, step by step: https://wafermap.xyz/start`);
1971
1980
  return;
1972
1981
  }
1973
1982
  case "approve-wafermap": {
@@ -2083,7 +2092,7 @@ Total $${total.toFixed(4)} in ${pays.length} payments. From 0.3.3 every payment
2083
2092
  const wm = openWallet(await password());
2084
2093
  const list = await wm.discover(q, Number(a.flags.limit ?? 10));
2085
2094
  for (const s of list) console.log(`${s.payable ? "\u25CF" : "\u25CB"} ${s.priceUsd !== null ? `$${s.priceUsd}`.padEnd(8) : "\u2014".padEnd(8)} ${s.method.padEnd(4)} ${s.url}
2086
- ${s.description.slice(0, 140)}${s.input ? `
2095
+ ${s.description.slice(0, 140)}${pricesLine(s.prices)}${s.input ? `
2087
2096
  input: ${JSON.stringify(s.input).slice(0, 140)}` : ""}`);
2088
2097
  return console.log(`
2089
2098
  \u25CF payable with USDG (Robinhood Chain) or USDC (Solana, Base, Arbitrum, Polygon, Arc, Soneium) \u25CB other networks only`);
@@ -186,6 +186,12 @@ export declare class Wafermap {
186
186
  name: string | null;
187
187
  description: string;
188
188
  priceUsd: number | null;
189
+ prices?: {
190
+ network: string;
191
+ chain: string | null;
192
+ name: string;
193
+ priceUsd: number | null;
194
+ }[];
189
195
  networks: string[];
190
196
  payable: boolean;
191
197
  input: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wafermapxyz/cli",
3
- "version": "0.4.9",
3
+ "version": "0.4.10",
4
4
  "description": "Wafermap for agents: an encrypted local wallet that pays x402 resources, discovers and pays third-party x402 services (USDG on Robinhood Chain; USDC on Solana, Base, Arbitrum, Polygon, Arc, Soneium), and swaps on Robinhood Chain and Base. CLI, SDK and MCP server.",
5
5
  "type": "module",
6
6
  "bin": {