shinjuku-shielded 0.3.152 → 0.3.153

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
@@ -6,19 +6,19 @@ answers privately, in a terminal chat or for your agent app. Its `mcp`
6
6
  command runs a local MCP server (stdio) for your agent. Your keys never
7
7
  leave your machine.
8
8
 
9
- This is version 0.3.152. The npm packages `shinjuku-shield` and
9
+ This is version 0.3.153. The npm packages `shinjuku-shield` and
10
10
  `shinjuku-shielded` hold the same files. The command is `shinjuku`.
11
11
 
12
12
  ## Set up
13
13
 
14
14
  ```sh
15
- npm install -g shinjuku@0.3.152
15
+ npm install -g shinjuku@0.3.153
16
16
  shinjuku setup
17
17
  ```
18
18
 
19
19
  Type the two lines as they are. `npx install shinjuku` does not work: npx
20
20
  reads `install` as the name of another npm package. To set up without
21
- installing, type `npx shinjuku@0.3.152 setup`.
21
+ installing, type `npx shinjuku@0.3.153 setup`.
22
22
 
23
23
  Setup makes the wallet on this machine, a private passphrase file, and the
24
24
  checked proof tools (about 191 MB), and writes `config.json`. It also writes
@@ -36,13 +36,13 @@ Every wallet command works after `shinjuku`, for example `shinjuku balance`,
36
36
  Claude Code:
37
37
 
38
38
  ```sh
39
- claude mcp add --scope user shinjuku -- npx -y --no-audit --no-fund shinjuku-shield@0.3.152 mcp
39
+ claude mcp add --scope user shinjuku -- npx -y --no-audit --no-fund shinjuku-shield@0.3.153 mcp
40
40
  ```
41
41
 
42
42
  Claude Desktop (`claude_desktop_config.json`) or Cursor (`~/.cursor/mcp.json`):
43
43
 
44
44
  ```json
45
- { "mcpServers": { "shinjuku": { "command": "npx", "args": ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.152", "mcp"] } } }
45
+ { "mcpServers": { "shinjuku": { "command": "npx", "args": ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.153", "mcp"] } } }
46
46
  ```
47
47
 
48
48
  On native Windows, if the host cannot find `npx`, use `"command": "cmd"` and
@@ -55,7 +55,7 @@ Codex (the Codex app and Codex CLI read the same file, `~/.codex/config.toml`):
55
55
  ```toml
56
56
  [mcp_servers.shinjuku]
57
57
  command = "npx"
58
- args = ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.152", "mcp"]
58
+ args = ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.153", "mcp"]
59
59
  startup_timeout_sec = 120
60
60
  tool_timeout_sec = 300
61
61
  ```
package/manifest.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schema": "carbon-shielded-wallet/bundle-manifest/v1",
3
3
  "file": "shinjuku-wallet.mjs",
4
- "sha256": "8ab2085ba462b3c2dda5d50de087d053593a7e96d2210bf9dfaa6d763dbe20d2",
5
- "bytes": 9047711,
6
- "sourceCommit": "683f9ff9c2d9058994e1628f7dee9116d2eeab39",
4
+ "sha256": "d446c36da9b526aea16cf685fb7b1532542f1eea13d0f2acabca373711bace8f",
5
+ "bytes": 9048030,
6
+ "sourceCommit": "9c091872009ec4e8a82ff9d5540fe00015cc93d1",
7
7
  "sourceDirty": false,
8
8
  "installRecordMatchesLockfile": true,
9
9
  "releaseRule": "valid only when two fresh npm ci --ignore-scripts builds on different OSes give the same sha256; installRecordMatchesLockfile true means every entry npm installed equals its package-lock.json entry and every entry not marked optional, devOptional included, is installed: an optional entry (a package for another platform) may be absent",
@@ -1038,5 +1038,5 @@
1038
1038
  "version": "1.8.0"
1039
1039
  }
1040
1040
  ],
1041
- "publishedAt": "2026-11-02T23:08:13.949Z"
1041
+ "publishedAt": "2026-11-03T05:08:33.860Z"
1042
1042
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "shinjuku-shielded",
3
- "version": "0.3.152",
3
+ "version": "0.3.153",
4
4
  "mcpName": "io.github.ShinjukuStaition/shinjuku-mcp",
5
5
  "description": "Shinjuku Shielded, the private x402 facilitator on Solana: the self-custody wallet CLI and its MCP server. Shield, pay, and unshield USDC from any MCP agent, under caps you set.",
6
- "shinjukuRelease": "8ab2085b",
7
- "shinjukuSha256": "8ab2085ba462b3c2dda5d50de087d053593a7e96d2210bf9dfaa6d763dbe20d2",
6
+ "shinjukuRelease": "d446c36d",
7
+ "shinjukuSha256": "d446c36da9b526aea16cf685fb7b1532542f1eea13d0f2acabca373711bace8f",
8
8
  "license": "SEE LICENSE IN LICENSE.txt",
9
9
  "author": "Shinjuku Shielded",
10
10
  "homepage": "https://github.com/ShinjukuStaition/shinjuku-shield#readme",
@@ -53487,7 +53487,7 @@ var init_p03ProgramHistory = __esm({
53487
53487
  if (entry.indexedReplay === true) e1Seen = true;
53488
53488
  }
53489
53489
  }
53490
- ADDED_EXECUTABLES = globalThis[/* @__PURE__ */ Symbol.for("carbon-road/p03ProgramHistory/addedExecutables/v1")] ??= [];
53490
+ ADDED_EXECUTABLES = globalThis[/* @__PURE__ */ Symbol.for("shinjuku-wallet/p03ProgramHistory/addedExecutables/v1")] ??= [];
53491
53491
  LATER_FLAGS = Object.freeze(["succession", "anchorRingWide"]);
53492
53492
  EXECUTABLE_FLAGS = ["compressedReplay", "indexedReplay", "lockedPoolRetire", "anchorRing", "succession", "anchorRingWide"];
53493
53493
  EXECUTABLE_KEYS = /* @__PURE__ */ new Set([
@@ -74371,7 +74371,7 @@ var init_p03ProgramHistory2 = __esm({
74371
74371
  if (entry.indexedReplay === true) e1Seen = true;
74372
74372
  }
74373
74373
  }
74374
- ADDED_EXECUTABLES2 = globalThis[/* @__PURE__ */ Symbol.for("carbon-road/p03ProgramHistory/addedExecutables/v1")] ??= [];
74374
+ ADDED_EXECUTABLES2 = globalThis[/* @__PURE__ */ Symbol.for("shinjuku-wallet/p03ProgramHistory/addedExecutables/v1")] ??= [];
74375
74375
  LATER_FLAGS2 = Object.freeze(["succession", "anchorRingWide"]);
74376
74376
  EXECUTABLE_FLAGS2 = ["compressedReplay", "indexedReplay", "lockedPoolRetire", "anchorRing", "succession", "anchorRingWide"];
74377
74377
  EXECUTABLE_KEYS2 = /* @__PURE__ */ new Set([
@@ -103310,6 +103310,12 @@ function feePayerRotated(response, accepted) {
103310
103310
  return false;
103311
103311
  }
103312
103312
  }
103313
+ function feePayerNotManaged(response) {
103314
+ return response.status === 402 && [
103315
+ x402HeaderText(response, "payment-required", "error"),
103316
+ x402HeaderText(response, "payment-response", "errorReason")
103317
+ ].includes("fee_payer_not_managed_by_facilitator");
103318
+ }
103313
103319
  async function sellerAnswerText(response) {
103314
103320
  if (response.status >= 400 && response.status < 500) return sellerRefusalText(response);
103315
103321
  try {
@@ -104025,7 +104031,7 @@ function keepDiskPoolDomain(store, poolKey, poolDomain) {
104025
104031
  });
104026
104032
  }
104027
104033
  function walletEta(seedHex) {
104028
- const key = hash7(`carbon-road/float-eta/v1|${seedHex}`);
104034
+ const key = hash7(`shinjuku-wallet/float-eta/v1|${seedHex}`);
104029
104035
  if (etaEntry?.key === key) return etaEntry.eta;
104030
104036
  const { eta } = deriveWalletViewingAuthority2({ seedBytes: Uint8Array.from(Buffer.from(seedHex, "hex")), generator: loadPayerGenerator() });
104031
104037
  etaEntry = { key, eta };
@@ -104088,8 +104094,8 @@ async function ownRefundAddress(store, connection) {
104088
104094
  }
104089
104095
  function canonicalBody({ requestId, seedHex, requirement, refundTo }) {
104090
104096
  if (typeof seedHex !== "string" || !/^[0-9a-f]{64,}$/i.test(seedHex)) fail21("p03_float_record_invalid");
104091
- const key = Buffer.from(hash7(`carbon-road/float-request-key/v1|${seedHex}`), "hex");
104092
- const opaque = `w-${createHmac8("sha256", key).update(`carbon-road/float-request/v2|${requestId}`).digest("hex").slice(0, 40)}`;
104097
+ const key = Buffer.from(hash7(`shinjuku-wallet/float-request-key/v1|${seedHex}`), "hex");
104098
+ const opaque = `w-${createHmac8("sha256", key).update(`shinjuku-wallet/float-request/v2|${requestId}`).digest("hex").slice(0, 40)}`;
104093
104099
  const text3 = `{"requestId":${JSON.stringify(opaque)},"requirement":${JSON.stringify(requirement)},"refundTo":${JSON.stringify(refundTo)}}`;
104094
104100
  const bytes2 = Buffer.from(text3, "utf8");
104095
104101
  if (bytes2.length > MAX_BODY_BYTES) fail21("p03_float_body_too_large");
@@ -104639,7 +104645,7 @@ async function payViaFloat({
104639
104645
  answeredAtMs = Date.now();
104640
104646
  mark(resend === 0 ? "seller-answered" : `seller-answered-resend-${resend}`);
104641
104647
  resendUntilMs ??= Date.now() + FEE_PAYER_RESEND_MS;
104642
- if (wasKept || resend >= FEE_PAYER_RESENDS || stopResends() || !feePayerRotated(response, accepted)) break;
104648
+ if (wasKept || resend >= FEE_PAYER_RESENDS || stopResends() || !(feePayerRotated(response, accepted) || feePayerNotManaged(response))) break;
104643
104649
  dispatcher = newConnectionDispatcher();
104644
104650
  if (dispatcher === void 0) break;
104645
104651
  resendDispatchers.push(dispatcher);
@@ -105144,7 +105150,7 @@ var init_floatPay = __esm({
105144
105150
  poolDomains = /* @__PURE__ */ new Map();
105145
105151
  FLOAT_FACTS_SCHEMA = "carbon-shielded-wallet/float-facts/v1";
105146
105152
  floatFacts = /* @__PURE__ */ new Map();
105147
- floatFactsKey = (store) => createHmac8("sha256", Buffer.from(store.state.seedHex, "hex")).update("carbon-road/float-facts/v1").digest();
105153
+ floatFactsKey = (store) => createHmac8("sha256", Buffer.from(store.state.seedHex, "hex")).update("shinjuku-wallet/float-facts/v1").digest();
105148
105154
  floatFactsMac = (store, facts) => createHmac8("sha256", floatFactsKey(store)).update(JSON.stringify(facts)).digest("hex");
105149
105155
  poolDomainReads = /* @__PURE__ */ new Map();
105150
105156
  poolDomainWarmFailedAt = /* @__PURE__ */ new Map();
@@ -115665,7 +115671,7 @@ function planLeg({ recovered, exitReserved = /* @__PURE__ */ new Set() }) {
115665
115671
  return { leg: void 0, stuckAtomic };
115666
115672
  }
115667
115673
  function moveBody({ amountAtomic, refundTo, fromPool, n, toPool }) {
115668
- const requestId = `w-${hash10(`carbon-road/move-request/v1|${fromPool}|${n}|${refundTo}`).slice(0, 40)}`;
115674
+ const requestId = `w-${hash10(`shinjuku-wallet/move-request/v1|${fromPool}|${n}|${refundTo}`).slice(0, 40)}`;
115669
115675
  const bodyText = `{"amountAtomic":${JSON.stringify(amountAtomic)},"refundTo":${JSON.stringify(refundTo)},"requestId":${JSON.stringify(requestId)},"toPool":${JSON.stringify(toPool)}}`;
115670
115676
  return { bodyText, moveId: hash10(bodyText) };
115671
115677
  }