shinjuku-shield 0.3.199 → 0.3.201

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,12 +5,12 @@ web services and AI answers from your private balance, so the payment does
5
5
  not show who paid. It works inside your AI app (Claude, Cursor, Codex) and in
6
6
  a terminal. Only you hold the keys: they never leave your computer.
7
7
 
8
- This is version 0.3.199. The command is `shinjuku`.
8
+ This is version 0.3.201. The command is `shinjuku`.
9
9
 
10
10
  ## Set up
11
11
 
12
12
  ```sh
13
- npx -y shinjuku@0.3.199 setup
13
+ npx -y shinjuku@0.3.201 setup
14
14
  ```
15
15
 
16
16
  Setup does every step for you:
@@ -107,14 +107,14 @@ Add it yourself. The name of the wallet in your app is `shinjuku`.
107
107
  Claude Code:
108
108
 
109
109
  ```sh
110
- claude mcp add --scope user shinjuku -- npx -y --no-audit --no-fund shinjuku-shield@0.3.199 mcp
110
+ claude mcp add --scope user shinjuku -- npx -y --no-audit --no-fund shinjuku-shield@0.3.201 mcp
111
111
  ```
112
112
 
113
113
  In this test version only (not offered yet), the same entry for Claude Desktop
114
114
  (`claude_desktop_config.json`) or Cursor (`~/.cursor/mcp.json`):
115
115
 
116
116
  ```json
117
- { "mcpServers": { "shinjuku": { "command": "npx", "args": ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.199", "mcp"] } } }
117
+ { "mcpServers": { "shinjuku": { "command": "npx", "args": ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.201", "mcp"] } } }
118
118
  ```
119
119
 
120
120
  On Windows, if the app cannot find `npx`, use `"command": "cmd"` and put
@@ -126,7 +126,7 @@ CLI read `~/.codex/config.toml`):
126
126
  ```toml
127
127
  [mcp_servers.shinjuku]
128
128
  command = "npx"
129
- args = ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.199", "mcp"]
129
+ args = ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.201", "mcp"]
130
130
  startup_timeout_sec = 120
131
131
  tool_timeout_sec = 300
132
132
  ```
@@ -144,7 +144,7 @@ with the Releases table in
144
144
  Versions are published from GitHub Actions with npm provenance.
145
145
 
146
146
  `shinjuku-shield` is the package that holds the wallet. `shinjuku-shielded`
147
- 0.3.199, its older name, runs this package at the same version, so wallets
147
+ 0.3.201, its older name, runs this package at the same version, so wallets
148
148
  installed under that name keep updating. New installs use `shinjuku`.
149
149
 
150
150
  The full guide is
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": "00e93f651c5151d2105472d1135cca61a9e68340553f742a990f0c3fa02d51d2",
5
- "bytes": 9469183,
6
- "sourceCommit": "8e3ed35aea4da0e4efd164bf30fc45467f669552",
4
+ "sha256": "571f1b887cf0dbf6b36b6c44932d84de22f13951d26d6c5484dddb44cbfed643",
5
+ "bytes": 9479351,
6
+ "sourceCommit": "fce3de21b6d6f99c10483960e536f000327bb3b2",
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",
@@ -1040,8 +1040,8 @@
1040
1040
  ],
1041
1041
  "seller": {
1042
1042
  "file": "shinjuku-seller.mjs",
1043
- "sha256": "59607c8bdbeb3c5f71a97c03079ca0d5943aca6a37240402dcf22fc1e6a7201d",
1044
- "bytes": 3733801,
1043
+ "sha256": "470aac0b580569eea957eff95a14a3d54f89f61d86bd7813a07304e4c93e3bf1",
1044
+ "bytes": 3734412,
1045
1045
  "entry": "wallet/src/seller/exact/index.mjs",
1046
1046
  "external": [
1047
1047
  "@x402/core/http",
@@ -1932,5 +1932,5 @@
1932
1932
  }
1933
1933
  ]
1934
1934
  },
1935
- "publishedAt": "2026-11-09T02:19:02.096Z"
1935
+ "publishedAt": "2026-11-09T05:18:22.436Z"
1936
1936
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "shinjuku-shield",
3
- "version": "0.3.199",
3
+ "version": "0.3.201",
4
4
  "mcpName": "io.github.ShinjukuStaition/shinjuku-shield",
5
5
  "description": "Shinjuku Shield, private x402 payments 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": "00e93f65",
7
- "shinjukuSha256": "00e93f651c5151d2105472d1135cca61a9e68340553f742a990f0c3fa02d51d2",
6
+ "shinjukuRelease": "571f1b88",
7
+ "shinjukuSha256": "571f1b887cf0dbf6b36b6c44932d84de22f13951d26d6c5484dddb44cbfed643",
8
8
  "license": "SEE LICENSE IN LICENSE.txt",
9
9
  "author": "Shinjuku Shield",
10
10
  "homepage": "https://github.com/ShinjukuStaition/shinjuku-shield#readme",
@@ -39800,8 +39800,8 @@ var init_errorCodes = __esm({
39800
39800
  "mcp_unshield_recipient_refused",
39801
39801
  "mcp_unshield_send_open",
39802
39802
  "mcp_shield_cap_exceeded",
39803
+ // No answer makes it since 2026-11-09 (no balance limit); an older old-transfer record can still hold it as its waitCode.
39803
39804
  "mcp_shield_above_balance_cap",
39804
- "mcp_balance_unknown",
39805
39805
  "mcp_unshield_cap_exceeded",
39806
39806
  "mcp_move_count_unreadable",
39807
39807
  "mcp_request_id_reused",
@@ -48700,6 +48700,9 @@ function rpcRefusalWords(refusal) {
48700
48700
  function rpcRefusalCode(refusal) {
48701
48701
  return refusal.lasting ? `rpc_refused_${refusal.kind}` : "rpc_refused";
48702
48702
  }
48703
+ function rpcRefusalTail(refusal) {
48704
+ return refusal.unlikely ? `${rpcRefusalCode(refusal)}: ${rpcRefusalWords(refusal)}` : rpcRefusalWords(refusal);
48705
+ }
48703
48706
  var JSON_RPC_REQUEST_ERRORS, PASSING_4XX, HTTP_ANSWER, REQUEST_ERROR_TEXT, PASSING_TEXT, ALLOWLIST_TEXT, KEY_TEXT, AUTH_TEXT, KIND_WORDS, RPC_REFUSAL_HINT;
48704
48707
  var init_rpcRefusal = __esm({
48705
48708
  "wallet/src/net/rpcRefusal.mjs"() {
@@ -56349,7 +56352,8 @@ async function walkWalletP03HistoryNow({
56349
56352
  }
56350
56353
  } catch (error) {
56351
56354
  if (split3 && (historyRpcFailed(error) || /^p03_history_/.test(String(error?.message)))) {
56352
- throw new Error("history_rpc_failed", { cause: error });
56355
+ const answered = rpcRefusalOf(error);
56356
+ throw new Error(answered ? `history_rpc_failed: ${rpcRefusalTail(answered)}` : "history_rpc_failed", { cause: error });
56353
56357
  }
56354
56358
  throw error;
56355
56359
  }
@@ -56621,6 +56625,7 @@ var init_walletHistory = __esm({
56621
56625
  init_phaseTiming();
56622
56626
  init_recoveryPath();
56623
56627
  init_runEnd();
56628
+ init_rpcRefusal();
56624
56629
  init_store();
56625
56630
  strictScope = new AsyncLocalStorage3();
56626
56631
  recentScope = new AsyncLocalStorage3();
@@ -58763,10 +58768,11 @@ async function prepareRelayedDepositLeased({
58763
58768
  if (amount < minimum) fail13(pocketIndex !== void 0 && config.pocketMinimumAtomic === void 0 ? "relay_pocket_reshield_not_offered" : "relay_amount_below_facilitator_minimum");
58764
58769
  const pool2 = await poolState(connection, id);
58765
58770
  if (inbound && amount > pool2.maxDepositValue) fail13("relay_inbound_above_pool_limit");
58766
- if (amount > pool2.maxDepositValue) fail13("amount_above_pool_deposit_cap");
58771
+ const limits = { maxDepositValueAtomic: String(pool2.maxDepositValue), maxPoolValueAtomic: String(pool2.maxPoolValue) };
58772
+ if (amount > pool2.maxDepositValue) throw Object.assign(new Error("p03_deposit_amount_above_pool_deposit_cap"), limits);
58767
58773
  if (BigInt(pool2.depositCount) >= BigInt(pool2.maxDeposits)) fail13("pool_at_deposit_cap");
58768
58774
  const vaultAmount = await tokenAmount(connection, pool2.vault);
58769
- if (vaultAmount === void 0 || vaultAmount + amount > pool2.maxPoolValue) fail13("pool_value_cap");
58775
+ if (vaultAmount === void 0 || vaultAmount + amount > pool2.maxPoolValue) throw Object.assign(new Error("p03_deposit_pool_value_cap"), limits);
58770
58776
  checkAmount?.({ amount, pool: pool2, sourceAmount: void 0, vaultAmount, phase: "before-address" });
58771
58777
  if (!record) {
58772
58778
  const unresolved = inbound ? [] : store.listWal().filter((entry) => entry.startsWith("deposit-")).map((entry) => store.readWal(entry)).filter((entry) => entry?.schema === DEPOSIT_WAL_SCHEMA && !RESOLVED_STATES.has(entry.state) && entry.relay?.inbound === void 0);
@@ -61126,7 +61132,7 @@ var init_errorLine = __esm({
61126
61132
  "wallet/src/errorLine.mjs"() {
61127
61133
  "use strict";
61128
61134
  init_errorCodes();
61129
- SELF_TEACHING_CODES = /^(wallet_backup_out_[a-z_]+|wallet_recovery_file_[a-z_]+|wallet_passphrase_too_short|init_flags_required|restore_flags_required|recover_proof_tools_required|recipient_owner_(required|invalid)|broadcaster_key_file_(invalid|unreadable)|p03_agent_(deposit|unshield)_not_pool_denomination|exit_note_not_pool_denomination|inference_(tor_required|ceiling_over_cap|model_unknown|max_tokens_required|messages_invalid|stream_unsupported|temperature_invalid|max_payment_invalid|upstream_failed|response_invalid)|rpc_relay_limit|p03_deposit_(?:token_balance_unreadable|rpc_refused(?:_ip_allowlist|_key)?)|p03_pocket_payment_(?:pocket_balance_unreadable|rpc_refused(?:_ip_allowlist|_key)?))$/;
61135
+ SELF_TEACHING_CODES = /^(wallet_backup_out_[a-z_]+|wallet_recovery_file_[a-z_]+|wallet_passphrase_too_short|init_flags_required|restore_flags_required|recover_proof_tools_required|recipient_owner_(required|invalid)|broadcaster_key_file_(invalid|unreadable)|p03_agent_(deposit|unshield)_not_pool_denomination|exit_note_not_pool_denomination|inference_(tor_required|ceiling_over_cap|model_unknown|max_tokens_required|messages_invalid|stream_unsupported|temperature_invalid|max_payment_invalid|upstream_failed|response_invalid)|rpc_relay_limit|history_rpc_failed|p03_deposit_(?:token_balance_unreadable|rpc_refused(?:_ip_allowlist|_key)?)|p03_pocket_payment_(?:pocket_balance_unreadable|rpc_refused(?:_ip_allowlist|_key)?))$/;
61130
61136
  redact = (text2) => String(text2).replace(/[a-z][a-z0-9+.-]*:\/\/\S+/gi, "<url>").replace(/(api[-_]?key|token|secret|password|auth)=\S+/gi, "$1=<redacted>").replace(/0x[0-9a-f]{16,}/gi, "<hex>").replace(/\b\d{20,}\b/g, "<number>").replace(/[A-Za-z0-9+/=_-]{40,}/g, (token) => /^p03_[a-z0-9_]+$/.test(token) ? token : "<blob>").replace(/\s+/g, " ").trim();
61131
61137
  SYSTEM_CODE = /^E[A-Z0-9_]{1,40}$/;
61132
61138
  SELLER_REFUSED = "seller_refused";