shinjuku-shield 0.3.232 → 0.3.233
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 +3 -3
- package/manifest.json +6 -6
- package/package.json +3 -3
- package/shinjuku-seller.mjs +42 -12
- package/shinjuku-wallet.mjs +1179 -560
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ web services and AI answers from your private balance, so the payment does
|
|
|
8
8
|
not show who paid. It works inside your AI app (Claude, Cursor, Codex) and in
|
|
9
9
|
a terminal. Only you hold the keys: they never leave your computer.
|
|
10
10
|
|
|
11
|
-
This is version 0.3.
|
|
11
|
+
This is version 0.3.233. The command is `shinjuku`.
|
|
12
12
|
|
|
13
13
|
## Set up
|
|
14
14
|
|
|
@@ -112,7 +112,7 @@ Add it yourself. The name of the wallet in your app is `shinjuku`.
|
|
|
112
112
|
Claude Code:
|
|
113
113
|
|
|
114
114
|
```sh
|
|
115
|
-
claude mcp add --scope user shinjuku -- npx -y --prefer-offline --no-audit --no-fund shinjuku-shield@0.3.
|
|
115
|
+
claude mcp add --scope user shinjuku -- npx -y --prefer-offline --no-audit --no-fund shinjuku-shield@0.3.233 mcp
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
`--prefer-offline` runs the copy of the wallet that npm saved. If npm has not saved it yet, that start asks
|
|
@@ -131,7 +131,7 @@ with the Releases table in
|
|
|
131
131
|
Versions are published from GitHub Actions with npm provenance.
|
|
132
132
|
|
|
133
133
|
`shinjuku-shield` is the package that holds the wallet. `shinjuku-shielded`
|
|
134
|
-
0.3.
|
|
134
|
+
0.3.233, its older name, runs this package at the same version, so wallets
|
|
135
135
|
installed under that name keep updating. New installs use `shinjuku`.
|
|
136
136
|
|
|
137
137
|
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": "
|
|
5
|
-
"bytes":
|
|
6
|
-
"sourceCommit": "
|
|
4
|
+
"sha256": "f57e91f4ac8dd91b7c88bf7d1f12b403aeced0b1af85461b7c72baebda923fee",
|
|
5
|
+
"bytes": 10431768,
|
|
6
|
+
"sourceCommit": "d8bf1218551a81a4107dc4e1deb55d976dab9dbf",
|
|
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",
|
|
@@ -1075,8 +1075,8 @@
|
|
|
1075
1075
|
],
|
|
1076
1076
|
"seller": {
|
|
1077
1077
|
"file": "shinjuku-seller.mjs",
|
|
1078
|
-
"sha256": "
|
|
1079
|
-
"bytes":
|
|
1078
|
+
"sha256": "abede46f010801e65f2465cb5787c1bfb8eaa74a1039e0b6024ce8aa697c4e7b",
|
|
1079
|
+
"bytes": 4201219,
|
|
1080
1080
|
"entry": "wallet/src/seller/exact/index.mjs",
|
|
1081
1081
|
"external": [
|
|
1082
1082
|
"@x402/core/http",
|
|
@@ -1968,5 +1968,5 @@
|
|
|
1968
1968
|
}
|
|
1969
1969
|
]
|
|
1970
1970
|
},
|
|
1971
|
-
"publishedAt": "2026-11-
|
|
1971
|
+
"publishedAt": "2026-11-17T02:22:20.609Z"
|
|
1972
1972
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shinjuku-shield",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.233",
|
|
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": "
|
|
7
|
-
"shinjukuSha256": "
|
|
6
|
+
"shinjukuRelease": "f57e91f4",
|
|
7
|
+
"shinjukuSha256": "f57e91f4ac8dd91b7c88bf7d1f12b403aeced0b1af85461b7c72baebda923fee",
|
|
8
8
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
9
9
|
"author": "Shinjuku Shield",
|
|
10
10
|
"homepage": "https://github.com/ShinjukuStaition/shinjuku-shield#readme",
|
package/shinjuku-seller.mjs
CHANGED
|
@@ -34894,6 +34894,12 @@ var init_keepAlive = __esm({
|
|
|
34894
34894
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
34895
34895
|
import net from "node:net";
|
|
34896
34896
|
import { Duplex } from "node:stream";
|
|
34897
|
+
function connectSent(claim) {
|
|
34898
|
+
try {
|
|
34899
|
+
claim?.onConnect?.();
|
|
34900
|
+
} catch {
|
|
34901
|
+
}
|
|
34902
|
+
}
|
|
34897
34903
|
function claimTunnelOpen() {
|
|
34898
34904
|
const claim = tunnelOpenListener.getStore();
|
|
34899
34905
|
if (claim === void 0 || claim.claimed) return void 0;
|
|
@@ -34926,6 +34932,7 @@ function tunnelClient(Dispatcher, proxyPort, proxyHost) {
|
|
|
34926
34932
|
const target = String(params?.path ?? "");
|
|
34927
34933
|
const onOpen = claimTunnelOpen();
|
|
34928
34934
|
if (optimisticTarget(target)) {
|
|
34935
|
+
connectSent(onOpen);
|
|
34929
34936
|
try {
|
|
34930
34937
|
return await optimisticConnect(params, { proxyHost, proxyPort, closedInRow, onOpen });
|
|
34931
34938
|
} catch (error) {
|
|
@@ -34940,6 +34947,7 @@ function tunnelClient(Dispatcher, proxyPort, proxyHost) {
|
|
|
34940
34947
|
const own = claimTunnelSignal();
|
|
34941
34948
|
const signal = own === void 0 ? params?.signal : params?.signal ? AbortSignal.any([params.signal, own]) : own;
|
|
34942
34949
|
const startedAt = Date.now();
|
|
34950
|
+
connectSent(onOpen);
|
|
34943
34951
|
try {
|
|
34944
34952
|
const answer = await direct.connect(signal === params?.signal ? params : { ...params, signal });
|
|
34945
34953
|
closedInRow.delete(target);
|
|
@@ -44464,6 +44472,8 @@ var init_errorCodes = __esm({
|
|
|
44464
44472
|
"wallet_process_identity_unavailable",
|
|
44465
44473
|
"wallet_process_lease_lost",
|
|
44466
44474
|
"wallet_process_locked",
|
|
44475
|
+
// prove/programStart.mjs: this computer refused to start a wallet proof program (Smart App Control on Windows, 2026-11-16).
|
|
44476
|
+
"wallet_program_start_refused",
|
|
44467
44477
|
"wallet_store",
|
|
44468
44478
|
"wallet_store_already_exists",
|
|
44469
44479
|
"wallet_store_missing",
|
|
@@ -44906,6 +44916,9 @@ var init_errorCodes = __esm({
|
|
|
44906
44916
|
"fetch_challenge_invalid",
|
|
44907
44917
|
"fetch_seller_x402_v1",
|
|
44908
44918
|
"fetch_seller_unreachable",
|
|
44919
|
+
// fetch/payAndFetch.mjs payTurn: the seller gave no answer and this request id's payment record could not be read, so
|
|
44920
|
+
// whether another wallet process paid it is not known (Codex round 2 on 8049e71dd item 1).
|
|
44921
|
+
"fetch_payment_state_unknown",
|
|
44909
44922
|
// pay/sellerInput.mjs: the seller's own 402 says this GET lacks a query value; nothing was paid (UX128-6, 2026-10-29).
|
|
44910
44923
|
"fetch_seller_input_missing",
|
|
44911
44924
|
// pay/sellerInput.mjs: the seller's own 402 names another method (POST with a JSON body); nothing was paid (2026-11-12).
|
|
@@ -63181,12 +63194,13 @@ function manifestTool(base, value2, label) {
|
|
|
63181
63194
|
const tool = exactTool(value2, label);
|
|
63182
63195
|
return Object.freeze({ path: manifestPath(base, tool.path, true), sha256: tool.sha256 });
|
|
63183
63196
|
}
|
|
63184
|
-
function childFailure(status, stderr) {
|
|
63197
|
+
function childFailure(status, stderr, startError) {
|
|
63185
63198
|
const error = new Error(`p03_recovered_payment_child_failed:${status ?? "signal"}`);
|
|
63186
63199
|
Object.defineProperty(error, "childStderr", {
|
|
63187
63200
|
value: String(stderr ?? ""),
|
|
63188
63201
|
enumerable: false
|
|
63189
63202
|
});
|
|
63203
|
+
if (startError) Object.defineProperty(error, "startRefusedCode", { value: String(startError.code ?? "UNKNOWN"), enumerable: false });
|
|
63190
63204
|
return error;
|
|
63191
63205
|
}
|
|
63192
63206
|
function runAsync(command, args, { input, ...options } = {}) {
|
|
@@ -63197,6 +63211,7 @@ function runAsync(command, args, { input, ...options } = {}) {
|
|
|
63197
63211
|
function launchAsync(command, args, { stdin = "ignore", ...options } = {}) {
|
|
63198
63212
|
let child;
|
|
63199
63213
|
let timer;
|
|
63214
|
+
let refused2 = false;
|
|
63200
63215
|
const done = new Promise((resolvePromise, reject) => {
|
|
63201
63216
|
const out = [];
|
|
63202
63217
|
const err = [];
|
|
@@ -63205,7 +63220,8 @@ function launchAsync(command, args, { stdin = "ignore", ...options } = {}) {
|
|
|
63205
63220
|
try {
|
|
63206
63221
|
child = spawn(command, args, { windowsHide: true, stdio: [stdin, "pipe", "pipe"], ...options });
|
|
63207
63222
|
} catch (error) {
|
|
63208
|
-
|
|
63223
|
+
refused2 = true;
|
|
63224
|
+
reject(childFailure(void 0, error?.message, error));
|
|
63209
63225
|
return;
|
|
63210
63226
|
}
|
|
63211
63227
|
child.stdin?.on("error", () => {
|
|
@@ -63226,15 +63242,18 @@ function launchAsync(command, args, { stdin = "ignore", ...options } = {}) {
|
|
|
63226
63242
|
child.stdout.on("data", collect(out));
|
|
63227
63243
|
child.stderr.on("data", collect(err));
|
|
63228
63244
|
let settled = false;
|
|
63229
|
-
const finish = (status, stderr) => {
|
|
63245
|
+
const finish = (status, stderr, startError) => {
|
|
63230
63246
|
if (settled) return;
|
|
63231
63247
|
settled = true;
|
|
63232
63248
|
clearTimeout(timer);
|
|
63233
63249
|
if (status === 0 && !failed) resolvePromise(Buffer.concat(out).toString("utf8"));
|
|
63234
|
-
else reject(childFailure(failed ? void 0 : status, stderr ?? Buffer.concat(err).toString("utf8")));
|
|
63250
|
+
else reject(childFailure(failed ? void 0 : status, stderr ?? Buffer.concat(err).toString("utf8"), startError));
|
|
63235
63251
|
};
|
|
63236
63252
|
child.on("error", (error) => {
|
|
63237
|
-
if (child.pid === void 0)
|
|
63253
|
+
if (child.pid === void 0) {
|
|
63254
|
+
refused2 = true;
|
|
63255
|
+
finish(void 0, error?.message, error);
|
|
63256
|
+
}
|
|
63238
63257
|
});
|
|
63239
63258
|
child.on("close", (status) => finish(status));
|
|
63240
63259
|
});
|
|
@@ -63250,7 +63269,7 @@ function launchAsync(command, args, { stdin = "ignore", ...options } = {}) {
|
|
|
63250
63269
|
}
|
|
63251
63270
|
}
|
|
63252
63271
|
};
|
|
63253
|
-
return { done, send: send2, hold };
|
|
63272
|
+
return { done, send: send2, hold, startRefused: () => refused2 };
|
|
63254
63273
|
}
|
|
63255
63274
|
function observedToolSha256Async(tool) {
|
|
63256
63275
|
if (!isAbsolute4(tool.path) || !existsSync(tool.path)) return Promise.reject(new Error("tool_path_invalid"));
|
|
@@ -69623,7 +69642,7 @@ var init_amounts = __esm({
|
|
|
69623
69642
|
});
|
|
69624
69643
|
|
|
69625
69644
|
// wallet/src/mcp/discover.mjs
|
|
69626
|
-
var DEFAULT_DISCOVERY_SOURCES, DISCOVER_LIMITS, SYNONYMS, CACHE_TEMP_MAX_MS, discoverToolDefinition, heavyChain;
|
|
69645
|
+
var DEFAULT_DISCOVERY_SOURCES, TOR_REACH_LIMITS, DISCOVER_LIMITS, SYNONYMS, CACHE_TEMP_MAX_MS, discoverToolDefinition, heavyChain;
|
|
69627
69646
|
var init_discover = __esm({
|
|
69628
69647
|
"wallet/src/mcp/discover.mjs"() {
|
|
69629
69648
|
"use strict";
|
|
@@ -69656,6 +69675,16 @@ var init_discover = __esm({
|
|
|
69656
69675
|
upstream: "https://coinrailz.com/.well-known/x402"
|
|
69657
69676
|
})
|
|
69658
69677
|
]);
|
|
69678
|
+
TOR_REACH_LIMITS = Object.freeze({
|
|
69679
|
+
freshMs: 6 * 60 * 6e4,
|
|
69680
|
+
maxAgeMs: 72 * 60 * 6e4,
|
|
69681
|
+
markMaxAgeMs: 72 * 60 * 6e4,
|
|
69682
|
+
futureSlackMs: 10 * 6e4,
|
|
69683
|
+
fetchMs: 15e3,
|
|
69684
|
+
waitMs: 3e3,
|
|
69685
|
+
maxBytes: 1024 * 1024,
|
|
69686
|
+
failedPauseMs: 10 * 6e4
|
|
69687
|
+
});
|
|
69659
69688
|
DISCOVER_LIMITS = Object.freeze({
|
|
69660
69689
|
pageSize: 1e3,
|
|
69661
69690
|
/**
|
|
@@ -75909,12 +75938,13 @@ function manifestTool2(base, value2, label) {
|
|
|
75909
75938
|
const tool = exactTool2(value2, label);
|
|
75910
75939
|
return Object.freeze({ path: manifestPath2(base, tool.path, true), sha256: tool.sha256 });
|
|
75911
75940
|
}
|
|
75912
|
-
function childFailure2(status, stderr) {
|
|
75941
|
+
function childFailure2(status, stderr, startError) {
|
|
75913
75942
|
const error = new Error(`p03_recovered_exit_child_failed:${status ?? "signal"}`);
|
|
75914
75943
|
Object.defineProperty(error, "childStderr", {
|
|
75915
75944
|
value: String(stderr ?? ""),
|
|
75916
75945
|
enumerable: false
|
|
75917
75946
|
});
|
|
75947
|
+
if (startError) Object.defineProperty(error, "startRefusedCode", { value: String(startError.code ?? "UNKNOWN"), enumerable: false });
|
|
75918
75948
|
return error;
|
|
75919
75949
|
}
|
|
75920
75950
|
function runAsync2(command, args, { input, ...options } = {}) {
|
|
@@ -75931,7 +75961,7 @@ function runAsync2(command, args, { input, ...options } = {}) {
|
|
|
75931
75961
|
...options
|
|
75932
75962
|
});
|
|
75933
75963
|
} catch (error) {
|
|
75934
|
-
reject(childFailure2(void 0, error?.message));
|
|
75964
|
+
reject(childFailure2(void 0, error?.message, error));
|
|
75935
75965
|
return;
|
|
75936
75966
|
}
|
|
75937
75967
|
const timer = setTimeout(() => {
|
|
@@ -75950,15 +75980,15 @@ function runAsync2(command, args, { input, ...options } = {}) {
|
|
|
75950
75980
|
child.stdout.on("data", collect(out));
|
|
75951
75981
|
child.stderr.on("data", collect(err));
|
|
75952
75982
|
let settled = false;
|
|
75953
|
-
const finish = (status, stderr) => {
|
|
75983
|
+
const finish = (status, stderr, startError) => {
|
|
75954
75984
|
if (settled) return;
|
|
75955
75985
|
settled = true;
|
|
75956
75986
|
clearTimeout(timer);
|
|
75957
75987
|
if (status === 0 && !failed) resolvePromise(Buffer.concat(out).toString("utf8"));
|
|
75958
|
-
else reject(childFailure2(failed ? void 0 : status, stderr ?? Buffer.concat(err).toString("utf8")));
|
|
75988
|
+
else reject(childFailure2(failed ? void 0 : status, stderr ?? Buffer.concat(err).toString("utf8"), startError));
|
|
75959
75989
|
};
|
|
75960
75990
|
child.on("error", (error) => {
|
|
75961
|
-
if (child.pid === void 0) finish(void 0, error?.message);
|
|
75991
|
+
if (child.pid === void 0) finish(void 0, error?.message, error);
|
|
75962
75992
|
});
|
|
75963
75993
|
child.on("close", (status) => finish(status));
|
|
75964
75994
|
if (input !== void 0) {
|