shinjuku-shielded 0.3.21 → 0.3.23

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/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": "79f40d948e80ecdbe29b67d336b971ecc50c3f6b220349e0915ff7d8cae7178d",
5
- "bytes": 11130649,
6
- "sourceCommit": "cfeed80b47acc01080d5499b8bcc371155aadaaa",
4
+ "sha256": "10c8bdfe8bd677ce6f50d143c1af4b28d5b3f653c5c65f6356f1034e6f5840df",
5
+ "bytes": 11132902,
6
+ "sourceCommit": "f718d9f247df010a8e2b5045666be78877dd3933",
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",
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "shinjuku-shielded",
3
- "version": "0.3.21",
3
+ "version": "0.3.23",
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": "79f40d94",
7
- "shinjukuSha256": "79f40d948e80ecdbe29b67d336b971ecc50c3f6b220349e0915ff7d8cae7178d",
6
+ "shinjukuRelease": "10c8bdfe",
7
+ "shinjukuSha256": "10c8bdfe8bd677ce6f50d143c1af4b28d5b3f653c5c65f6356f1034e6f5840df",
8
8
  "license": "SEE LICENSE IN LICENSE.txt",
9
9
  "author": "Shinjuku Shielded",
10
10
  "homepage": "https://github.com/ShinjukuStaition/shinjuku-mcp#readme",
@@ -50603,12 +50603,15 @@ var init_chain2 = __esm({
50603
50603
  "45mhosfA2MuygZWeqYRVcEZX2Q3gA8KR8FwP6AZkK1zR": "http://d6xg3phhurxhzqcsgh2mh52yf744labhrnd7mducwynlertfsjzyslqd.onion/",
50604
50604
  // Production E1 pool F7MW (since 2026-10-12): the same proxy serves it beside 45mh, which
50605
50605
  // stays while its wallets move out (the move walks 45mh).
50606
- F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV: "http://d6xg3phhurxhzqcsgh2mh52yf744labhrnd7mducwynlertfsjzyslqd.onion/"
50606
+ F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV: "http://d6xg3phhurxhzqcsgh2mh52yf744labhrnd7mducwynlertfsjzyslqd.onion/",
50607
+ // Production E1 pool CDtx (succession of F7MW, 2026-10-14): the same proxy; F7MW stays while its wallets move out.
50608
+ CDtxyRjCUs2pu7t3U9TwtpnZwyxBFZ4dKXvb4RCmXHXv: "http://d6xg3phhurxhzqcsgh2mh52yf744labhrnd7mducwynlertfsjzyslqd.onion/"
50607
50609
  });
50608
50610
  PINNED_HISTORY_HTTPS = Object.freeze({
50609
50611
  AAG16mNWTtC1sBeu2tTVTwWjqWXCefLTCByVPj5X3kV8: "https://pay.shinjukustaition.com/history-proxy/",
50610
50612
  "45mhosfA2MuygZWeqYRVcEZX2Q3gA8KR8FwP6AZkK1zR": "https://pay.shinjukustaition.com/history-proxy/",
50611
- F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV: "https://pay.shinjukustaition.com/history-proxy/"
50613
+ F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV: "https://pay.shinjukustaition.com/history-proxy/",
50614
+ CDtxyRjCUs2pu7t3U9TwtpnZwyxBFZ4dKXvb4RCmXHXv: "https://pay.shinjukustaition.com/history-proxy/"
50612
50615
  });
50613
50616
  HISTORY_RPC_OWN = "own";
50614
50617
  historyRpcErrors = /* @__PURE__ */ new WeakSet();
@@ -117774,7 +117777,9 @@ var NPX_PACKAGE = "shinjuku-shielded";
117774
117777
  var MCP_SERVER_NAME = "shinjuku-shielded";
117775
117778
  var P03_BINDING2 = "carbon-shielded-exact/svm-v3";
117776
117779
  var PRODUCTION = Object.freeze({
117777
- pool: "F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV",
117780
+ // CDtx since the succession F7MW -> CDtx (2026-10-14, link slot 456,964,330); a build pinned to F7MW still sets up
117781
+ // through the signed successions file (setup.mjs successorChain).
117782
+ pool: "CDtxyRjCUs2pu7t3U9TwtpnZwyxBFZ4dKXvb4RCmXHXv",
117778
117783
  program: "8PYPw3FSFTMbvSneXdcoH6jNoN4VD23nHwPY2A2riUy1",
117779
117784
  network: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
117780
117785
  asset: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
@@ -118251,8 +118256,8 @@ function channelListsSet(body, { facilitator, pool, dir, sumsSha256 }) {
118251
118256
  // wallet/src/setup/proofTools.mjs
118252
118257
  var PINNED_PROOF_TOOLS = Object.freeze({
118253
118258
  [DEFAULT_FACILITATOR_ORIGIN]: Object.freeze({
118254
- dir: "5fa83692",
118255
- sumsSha256: "5fa8369234088b532977254d91109e7eced3aef0228b9ed55c7c8a02e0a9a908"
118259
+ dir: "78c71143",
118260
+ sumsSha256: "78c71143ecedf22096fdc1901eda5160e29c141f6961cce935b92e714ff85bd9"
118256
118261
  })
118257
118262
  });
118258
118263
  var UPDATE_NEXT = "update the wallet: npx -y shinjuku-shielded@latest setup";
@@ -122861,7 +122866,7 @@ function createSuccessionScheduler(options) {
122861
122866
  } = options;
122862
122867
  const now = options.now ?? Date.now;
122863
122868
  const randomInt9 = options.randomInt ?? cryptoRandomInt;
122864
- const valueOf = options.valueOf ?? ((store) => {
122869
+ const valueOf = (Object.hasOwn(options, "valueOf") ? options.valueOf : void 0) ?? ((store) => {
122865
122870
  try {
122866
122871
  return computeBalance({ store, snapshotRead: readBalanceSnapshot(store), source: "local" }).split?.shieldedAtomic ?? null;
122867
122872
  } catch {
@@ -122951,6 +122956,7 @@ function createSuccessionScheduler(options) {
122951
122956
  });
122952
122957
  }
122953
122958
  if (verified.record.importDone) job = schedule(store, job);
122959
+ else job = save2(store, job, {});
122954
122960
  return job;
122955
122961
  }
122956
122962
  const base = (entry, value, verified) => ({
@@ -123054,6 +123060,10 @@ function createSuccessionScheduler(options) {
123054
123060
  }
123055
123061
  switch (job.state) {
123056
123062
  case "linked-waiting-import": {
123063
+ try {
123064
+ if (hasWallet(job.to) && !readSuccessionJob(storeOf(job.to), entry.from)) job = save2(store, job, {});
123065
+ } catch {
123066
+ }
123057
123067
  if (now() - (recordCheckedAt.get(entry.from) ?? -Infinity) < SUCCESSION_TICK_MS - 1e3) return job;
123058
123068
  recordCheckedAt.set(entry.from, now());
123059
123069
  let verified;
@@ -126524,7 +126534,10 @@ function createWalletTools({
126524
126534
  await mover.refreshRelease();
126525
126535
  } catch {
126526
126536
  }
126527
- return json({ ok: true, ...mover.status(), ...extra });
126537
+ const moved2 = mover.status();
126538
+ const lead = switches.find((item) => item.state !== "done") ?? switches[0];
126539
+ if (moved2.state === "none" && lead) return json({ ok: true, ...moved2, state: lead.state, detail: lead.message, next: POOL_SWITCH_NEXT, ...extra });
126540
+ return json({ ok: true, ...moved2, ...extra });
126528
126541
  }
126529
126542
  };
126530
126543
  const discover = discoverTool(join26(dirname23(session.walletPath), "discover-cache"));
@@ -127464,15 +127477,25 @@ function proverPlatform({ platform = process.platform, hasWsl = wslAvailable } =
127464
127477
  detail: `the provers are Linux x86-64 programs, and ${platform === "darwin" ? "macOS" : "this system"} cannot run them. Run the wallet on a Linux machine, in a Linux container, or on Windows with WSL. Nothing was created`
127465
127478
  };
127466
127479
  }
127467
- function identityOf(facilitator, release) {
127480
+ function successorChain(body, pool) {
127481
+ const chain = [pool];
127482
+ for (let at = pool; ; ) {
127483
+ const next = (body?.successions ?? []).find((entry) => entry.from === at)?.to;
127484
+ if (!next || chain.includes(next)) return chain;
127485
+ chain.push(next);
127486
+ at = next;
127487
+ }
127488
+ }
127489
+ function identityOf(facilitator, release, successors = []) {
127468
127490
  const served = { pool: release.pool, program: release.programId, network: release.network, asset: release.asset };
127469
127491
  if (new URL(facilitator).origin === new URL(PRODUCTION.memoService).origin) {
127492
+ const pool = successors.includes(served.pool) ? served.pool : PRODUCTION.pool;
127470
127493
  for (const [name, value] of Object.entries(served)) {
127471
- if (value !== null && value !== void 0 && value !== PRODUCTION[name]) {
127472
- throw fail34("setup_identity_mismatch", `the production facilitator's release names another ${name} than this wallet build; nothing was created. Update the wallet (npx -y shinjuku-shielded@latest setup)`);
127494
+ if (value !== null && value !== void 0 && value !== (name === "pool" ? pool : PRODUCTION[name])) {
127495
+ throw fail34("setup_identity_mismatch", `the production facilitator's release names another ${name} than this wallet build, and no signed succession links it; nothing was created. Run npx -y shinjuku-shielded@latest setup; if the latest build says the same, the facilitator is not serving the production pool`);
127473
127496
  }
127474
127497
  }
127475
- return { pool: PRODUCTION.pool, program: PRODUCTION.program, network: PRODUCTION.network, asset: PRODUCTION.asset };
127498
+ return { pool, program: PRODUCTION.program, network: PRODUCTION.network, asset: PRODUCTION.asset };
127476
127499
  }
127477
127500
  if (Object.values(served).some((value) => typeof value !== "string" || !value)) {
127478
127501
  throw fail34("setup_identity_mismatch", "this facilitator's release names no pool identity (it runs no public facilitator); nothing was created");
@@ -127558,7 +127581,16 @@ async function runSetup(options, deps = {}) {
127558
127581
  let identity;
127559
127582
  if (release) {
127560
127583
  expected = await trustServedSet({ home, facilitator, release, expected, fetchImpl: deps.fetchImpl ?? fetch });
127561
- identity = identityOf(facilitator, release);
127584
+ let successions;
127585
+ const needsChain = release.pool !== PRODUCTION.pool || old && old.pool !== release.pool;
127586
+ if (needsChain) {
127587
+ try {
127588
+ successions = await (deps.loadSuccessions ?? loadSuccessions)({ home, facilitator, release, fetchImpl: deps.fetchImpl ?? fetch });
127589
+ } catch {
127590
+ successions = void 0;
127591
+ }
127592
+ }
127593
+ identity = identityOf(facilitator, release, successorChain(successions, PRODUCTION.pool));
127562
127594
  try {
127563
127595
  releasePools = parseReleasePools(release, facilitator);
127564
127596
  } catch {
@@ -127566,7 +127598,8 @@ async function runSetup(options, deps = {}) {
127566
127598
  }
127567
127599
  if (old && old.pool !== identity.pool && !(retired && RETIRED_POOLS[retired] === identity.pool)) {
127568
127600
  const pools = releasePools;
127569
- if (!(pools?.migration?.to.pool === identity.pool && pools.migration.from.some((entry) => entry.pool === old.pool))) {
127601
+ const succeeded = successorChain(successions, old.pool).includes(identity.pool);
127602
+ if (!succeeded && !(pools?.migration?.to.pool === identity.pool && pools.migration.from.some((entry) => entry.pool === old.pool))) {
127570
127603
  throw fail34("setup_identity_mismatch", "config.json names another pool than the facilitator serves now; setup changes no existing wallet. Move config.json aside to set up the new pool");
127571
127604
  }
127572
127605
  movedFrom = old.pool;
@@ -131828,7 +131861,7 @@ var CLI2 = "shinjuku-wallet";
131828
131861
  var P03_BINDING3 = "carbon-shielded-exact/svm-v3";
131829
131862
  var GUIDE = Object.freeze({
131830
131863
  program: "8PYPw3FSFTMbvSneXdcoH6jNoN4VD23nHwPY2A2riUy1",
131831
- pool: "F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV",
131864
+ pool: "CDtxyRjCUs2pu7t3U9TwtpnZwyxBFZ4dKXvb4RCmXHXv",
131832
131865
  mint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
131833
131866
  network: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
131834
131867
  facilitator: DEFAULT_FACILITATOR_ORIGIN
@@ -132446,7 +132479,8 @@ function setupDependencies(deps) {
132446
132479
  fetchImpl: deps.fetch,
132447
132480
  init: (options) => deps.setupInit(options, deps),
132448
132481
  openWalletStore: deps.openWalletStore,
132449
- now: () => new Date(deps.now())
132482
+ now: () => new Date(deps.now()),
132483
+ ...deps.loadSuccessions ? { loadSuccessions: deps.loadSuccessions } : {}
132450
132484
  };
132451
132485
  }
132452
132486
  async function setupInit({ home, passphrase: passphrase2, args }, deps) {
@@ -134233,7 +134267,9 @@ var RELAYED_DEPOSIT_UNIT = Object.freeze({
134233
134267
  // The production E1 pool since the tag-28 window (its pool plan: poolDenominationAtomic 1000000).
134234
134268
  "45mhosfA2MuygZWeqYRVcEZX2Q3gA8KR8FwP6AZkK1zR": "1000000",
134235
134269
  // The production E1 pool since 2026-10-12 (GET /api/x402/deposit: depositUnitAtomic 1000000).
134236
- F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV: "1000000"
134270
+ F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV: "1000000",
134271
+ // The production E1 pool since the succession of 2026-10-14 (same deposit unit as F7MW).
134272
+ CDtxyRjCUs2pu7t3U9TwtpnZwyxBFZ4dKXvb4RCmXHXv: "1000000"
134237
134273
  });
134238
134274
  async function runDeposit(args, values, deps) {
134239
134275
  const unit = values.has("--relay") && !values.has("--pool-denomination") ? RELAYED_DEPOSIT_UNIT[values.get("--pool")] : void 0;