shinjuku-shielded 0.3.64 → 0.3.65
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 +4 -4
- package/package.json +3 -3
- package/shinjuku-wallet.mjs +29 -5
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": "f1563e53fc8d137fe44e6fb65d7247fa157b3066b7129b41ef9f99d2e3061ba7",
|
|
5
|
+
"bytes": 12180292,
|
|
6
|
+
"sourceCommit": "274f1d09a81983902118eeb923b5a4093acd757c",
|
|
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",
|
|
@@ -1282,5 +1282,5 @@
|
|
|
1282
1282
|
"version": "1.8.0"
|
|
1283
1283
|
}
|
|
1284
1284
|
],
|
|
1285
|
-
"publishedAt": "2026-10-
|
|
1285
|
+
"publishedAt": "2026-10-22T10:20:32.328Z"
|
|
1286
1286
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shinjuku-shielded",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.65",
|
|
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": "
|
|
7
|
-
"shinjukuSha256": "
|
|
6
|
+
"shinjukuRelease": "f1563e53",
|
|
7
|
+
"shinjukuSha256": "f1563e53fc8d137fe44e6fb65d7247fa157b3066b7129b41ef9f99d2e3061ba7",
|
|
8
8
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
9
9
|
"author": "Shinjuku Shielded",
|
|
10
10
|
"homepage": "https://github.com/ShinjukuStaition/shinjuku-mcp#readme",
|
package/shinjuku-wallet.mjs
CHANGED
|
@@ -50664,11 +50664,12 @@ function poolLayoutForLength(length) {
|
|
|
50664
50664
|
}
|
|
50665
50665
|
function connect2(rpcUrl, commitment = "finalized", { timeoutMs, wrapFetch = (fetch2) => fetch2 } = {}) {
|
|
50666
50666
|
const pooled = (input, init) => rpcFetch(input, rpcKeepAliveInit(input, init));
|
|
50667
|
-
const fetch2 = wrapFetch(timeoutMs === void 0 ? pooled : async (input, init) => {
|
|
50667
|
+
const fetch2 = wrapFetch(timeoutMs === void 0 ? pooled : async (input, { onResponseHead, ...init } = {}) => {
|
|
50668
50668
|
const circuit = torCircuit();
|
|
50669
50669
|
const timeout = AbortSignal.timeout(timeoutMs);
|
|
50670
50670
|
try {
|
|
50671
50671
|
const response = await pooled(input, { ...init, signal: init?.signal ? AbortSignal.any([init.signal, timeout]) : timeout });
|
|
50672
|
+
onResponseHead?.(response);
|
|
50672
50673
|
const body = await response.text();
|
|
50673
50674
|
const headers = new Headers(response.headers);
|
|
50674
50675
|
headers.delete("content-encoding");
|
|
@@ -50682,13 +50683,24 @@ function connect2(rpcUrl, commitment = "finalized", { timeoutMs, wrapFetch = (fe
|
|
|
50682
50683
|
const connection = countRpcCalls(new import_web395.Connection(rpcUrl, { commitment, fetch: fetch2, disableRetryOnRateLimit: true }));
|
|
50683
50684
|
let nextId = 0;
|
|
50684
50685
|
Object.defineProperty(connection, "abortableRpcRequest", {
|
|
50685
|
-
value: async (method, params, signal) => {
|
|
50686
|
+
value: async (method, params, signal, onResponse) => {
|
|
50687
|
+
let reported = false;
|
|
50688
|
+
const onResponseHead = (response2) => {
|
|
50689
|
+
if (reported) return;
|
|
50690
|
+
reported = true;
|
|
50691
|
+
try {
|
|
50692
|
+
onResponse?.({ status: response2.status, contentLength: Number(response2.headers.get("content-length")) });
|
|
50693
|
+
} catch {
|
|
50694
|
+
}
|
|
50695
|
+
};
|
|
50686
50696
|
const response = await fetch2(rpcUrl, {
|
|
50687
50697
|
method: "POST",
|
|
50688
50698
|
signal,
|
|
50699
|
+
onResponseHead,
|
|
50689
50700
|
headers: { "content-type": "application/json" },
|
|
50690
50701
|
body: JSON.stringify({ jsonrpc: "2.0", id: `abortable-${nextId += 1}`, method, params })
|
|
50691
50702
|
});
|
|
50703
|
+
onResponseHead(response);
|
|
50692
50704
|
return response.json();
|
|
50693
50705
|
},
|
|
50694
50706
|
enumerable: false,
|
|
@@ -59164,13 +59176,23 @@ async function waitForCompactSource(source, pool2, slot3, budgetMs) {
|
|
|
59164
59176
|
const until = Date.now() + budgetMs;
|
|
59165
59177
|
for (; ; ) {
|
|
59166
59178
|
const abort = new AbortController();
|
|
59179
|
+
let answerBytes;
|
|
59167
59180
|
const params = [pool2, { commitment: "finalized", fromOrdinal: 0, toOrdinal: P03_COMPACT_PAGE, minContextSlot: slot3 }];
|
|
59168
|
-
const read = (typeof source.abortableRpcRequest === "function" ? source.abortableRpcRequest("getP03Transitions", params, abort.signal
|
|
59181
|
+
const read = (typeof source.abortableRpcRequest === "function" ? source.abortableRpcRequest("getP03Transitions", params, abort.signal, ({ contentLength }) => {
|
|
59182
|
+
answerBytes = contentLength;
|
|
59183
|
+
}) : source._rpcRequest("getP03Transitions", params)).catch(() => ({ failed: true }));
|
|
59169
59184
|
let timer;
|
|
59170
|
-
|
|
59185
|
+
let answer = await Promise.race([read, new Promise((resolve38) => {
|
|
59171
59186
|
timer = setTimeout(resolve38, Math.max(inTorRun() ? COMPACT_BEHIND_TOR_READ_MS : COMPACT_BEHIND_READ_MS, until - Date.now()));
|
|
59172
59187
|
})]);
|
|
59173
59188
|
clearTimeout(timer);
|
|
59189
|
+
if (answer === void 0 && answerBytes > COMPACT_BEHIND_REFUSAL_MAX_BYTES) {
|
|
59190
|
+
markPhase("compact-behind-page-coming");
|
|
59191
|
+
answer = await Promise.race([read, new Promise((resolve38) => {
|
|
59192
|
+
timer = setTimeout(resolve38, COMPACT_BEHIND_PAGE_BODY_MS);
|
|
59193
|
+
})]);
|
|
59194
|
+
clearTimeout(timer);
|
|
59195
|
+
}
|
|
59174
59196
|
if (answer === void 0) abort.abort();
|
|
59175
59197
|
if (answer?.result !== void 0) {
|
|
59176
59198
|
markPhase("compact-behind-caught-up");
|
|
@@ -59231,7 +59253,7 @@ function reportHistoryRpc(split5, source, result, crossChecked) {
|
|
|
59231
59253
|
writeStderr(`history: ${who} answered ${list(split5.history)}; your own RPC answered ${list(split5.own)} (the pool account the history must match, and the cross-check)${window2}${integrity}
|
|
59232
59254
|
`);
|
|
59233
59255
|
}
|
|
59234
|
-
var prepareReport, strictScope, withStrictHistorySource, recentScope, withRecentWalletHistory, recentLoads, forgetRecentWalletHistory, proofBuiltAt, historyCacheKey, latestPrewarm, HOME_MARKS_SETTLED_MS, HISTORY_PREWARM_JOIN_MS, SHARED_WALK_WAIT_MS, PAGE0_PREREAD_AFTER_MS, SUBTREE_LEAVES4, prewarmedWalks, sharedWalks, PREWARMED_REPORTS, PAYMENT_TAKEN_REPORTS, isPrewarmedWalletHistory, REPORT_STARTED_AT, walkStartedAtOf, COMPACT_BEHIND_POLL_MS, COMPACT_BEHIND_READ_MS, COMPACT_BEHIND_TOR_READ_MS, COMPACT_BEHIND_RETRY_MS, lastRunReports, writeStderr, announcedSources;
|
|
59256
|
+
var prepareReport, strictScope, withStrictHistorySource, recentScope, withRecentWalletHistory, recentLoads, forgetRecentWalletHistory, proofBuiltAt, historyCacheKey, latestPrewarm, HOME_MARKS_SETTLED_MS, HISTORY_PREWARM_JOIN_MS, SHARED_WALK_WAIT_MS, PAGE0_PREREAD_AFTER_MS, SUBTREE_LEAVES4, prewarmedWalks, sharedWalks, PREWARMED_REPORTS, PAYMENT_TAKEN_REPORTS, isPrewarmedWalletHistory, REPORT_STARTED_AT, walkStartedAtOf, COMPACT_BEHIND_POLL_MS, COMPACT_BEHIND_READ_MS, COMPACT_BEHIND_TOR_READ_MS, COMPACT_BEHIND_REFUSAL_MAX_BYTES, COMPACT_BEHIND_PAGE_BODY_MS, COMPACT_BEHIND_RETRY_MS, lastRunReports, writeStderr, announcedSources;
|
|
59235
59257
|
var init_walletHistory = __esm({
|
|
59236
59258
|
"wallet/src/history/walletHistory.mjs"() {
|
|
59237
59259
|
"use strict";
|
|
@@ -59274,6 +59296,8 @@ var init_walletHistory = __esm({
|
|
|
59274
59296
|
COMPACT_BEHIND_POLL_MS = 150;
|
|
59275
59297
|
COMPACT_BEHIND_READ_MS = 1e3;
|
|
59276
59298
|
COMPACT_BEHIND_TOR_READ_MS = 5e3;
|
|
59299
|
+
COMPACT_BEHIND_REFUSAL_MAX_BYTES = 8192;
|
|
59300
|
+
COMPACT_BEHIND_PAGE_BODY_MS = HISTORY_RPC_REQUEST_TIMEOUT_MS;
|
|
59277
59301
|
COMPACT_BEHIND_RETRY_MS = [500, 1e3, 2e3, 5e3];
|
|
59278
59302
|
lastRunReports = /* @__PURE__ */ new Map();
|
|
59279
59303
|
writeStderr = (text3) => {
|