shinjuku-shielded 0.3.9 → 0.3.10
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 +3 -3
- package/package.json +3 -3
- package/shinjuku-wallet.mjs +36 -14
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": "28f33853062c9982283f59bef13a6bb33b6ce474ea62c0d30ae6e0d473e66da2",
|
|
5
|
+
"bytes": 10945718,
|
|
6
|
+
"sourceCommit": "981ee2d7a103a8e3934a5e13cf3e7dccbc09b6c0",
|
|
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.
|
|
3
|
+
"version": "0.3.10",
|
|
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": "28f33853",
|
|
7
|
+
"shinjukuSha256": "28f33853062c9982283f59bef13a6bb33b6ce474ea62c0d30ae6e0d473e66da2",
|
|
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
|
@@ -50517,11 +50517,15 @@ var init_chain2 = __esm({
|
|
|
50517
50517
|
// Production E1 pool 45mh (since the tag-28 window): the same proxy
|
|
50518
50518
|
// (UNDERMARKET_HISTORY_PROXY_POOLS = AAG16,45mh). AAG16 stays: an old
|
|
50519
50519
|
// wallet home still reads its retired pool.
|
|
50520
|
-
"45mhosfA2MuygZWeqYRVcEZX2Q3gA8KR8FwP6AZkK1zR": "http://d6xg3phhurxhzqcsgh2mh52yf744labhrnd7mducwynlertfsjzyslqd.onion/"
|
|
50520
|
+
"45mhosfA2MuygZWeqYRVcEZX2Q3gA8KR8FwP6AZkK1zR": "http://d6xg3phhurxhzqcsgh2mh52yf744labhrnd7mducwynlertfsjzyslqd.onion/",
|
|
50521
|
+
// Production E1 pool F7MW (since 2026-10-12): the same proxy serves it beside 45mh, which
|
|
50522
|
+
// stays while its wallets move out (the move walks 45mh).
|
|
50523
|
+
F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV: "http://d6xg3phhurxhzqcsgh2mh52yf744labhrnd7mducwynlertfsjzyslqd.onion/"
|
|
50521
50524
|
});
|
|
50522
50525
|
PINNED_HISTORY_HTTPS = Object.freeze({
|
|
50523
50526
|
AAG16mNWTtC1sBeu2tTVTwWjqWXCefLTCByVPj5X3kV8: "https://pay.shinjukustaition.com/history-proxy/",
|
|
50524
|
-
"45mhosfA2MuygZWeqYRVcEZX2Q3gA8KR8FwP6AZkK1zR": "https://pay.shinjukustaition.com/history-proxy/"
|
|
50527
|
+
"45mhosfA2MuygZWeqYRVcEZX2Q3gA8KR8FwP6AZkK1zR": "https://pay.shinjukustaition.com/history-proxy/",
|
|
50528
|
+
F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV: "https://pay.shinjukustaition.com/history-proxy/"
|
|
50525
50529
|
});
|
|
50526
50530
|
HISTORY_RPC_OWN = "own";
|
|
50527
50531
|
historyRpcErrors = /* @__PURE__ */ new WeakSet();
|
|
@@ -61582,7 +61586,9 @@ var init_errorCodes = __esm({
|
|
|
61582
61586
|
"move_body_invalid",
|
|
61583
61587
|
"move_liquidity_wait",
|
|
61584
61588
|
"move_payer_unavailable_retry_later",
|
|
61589
|
+
"move_payment_in_flight",
|
|
61585
61590
|
"move_pool_not_draining",
|
|
61591
|
+
"move_quote_open",
|
|
61586
61592
|
"move_refund_to_invalid",
|
|
61587
61593
|
"move_to_pool_unknown",
|
|
61588
61594
|
"move_unknown",
|
|
@@ -116601,14 +116607,15 @@ var NPX_PACKAGE = "shinjuku-shielded";
|
|
|
116601
116607
|
var MCP_SERVER_NAME = "shinjuku-shielded";
|
|
116602
116608
|
var P03_BINDING2 = "carbon-shielded-exact/svm-v3";
|
|
116603
116609
|
var PRODUCTION = Object.freeze({
|
|
116604
|
-
pool: "
|
|
116610
|
+
pool: "F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV",
|
|
116605
116611
|
program: "8PYPw3FSFTMbvSneXdcoH6jNoN4VD23nHwPY2A2riUy1",
|
|
116606
116612
|
network: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
|
116607
116613
|
asset: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
116608
116614
|
memoService: DEFAULT_FACILITATOR_ORIGIN
|
|
116609
116615
|
});
|
|
116610
116616
|
var RETIRED_POOLS = Object.freeze({
|
|
116611
|
-
|
|
116617
|
+
// Setup moves an AAG16 config.json to the pool the facilitator runs NOW (setup.mjs compares with the release's pool).
|
|
116618
|
+
AAG16mNWTtC1sBeu2tTVTwWjqWXCefLTCByVPj5X3kV8: "F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV"
|
|
116612
116619
|
});
|
|
116613
116620
|
function retiredPoolText(pool) {
|
|
116614
116621
|
const next = RETIRED_POOLS[pool];
|
|
@@ -116875,6 +116882,7 @@ var TIMEOUT_MS = 3e4;
|
|
|
116875
116882
|
var HEX642 = /^[0-9a-f]{64}$/;
|
|
116876
116883
|
var DIR = /^[0-9a-f]{8}$/;
|
|
116877
116884
|
var BASE58_KEY2 = /^[1-9A-HJ-NP-Za-km-z]{32,44}$/;
|
|
116885
|
+
var V3_ONION_KEY = /^http:\/\/[a-z2-7]{56}\.onion(\/|$)/;
|
|
116878
116886
|
var ED25519_SPKI_PREFIX3 = Buffer.from("302a300506032b6570032100", "hex");
|
|
116879
116887
|
var fail21 = (code, detail) => new Error(`${code}: ${detail}`);
|
|
116880
116888
|
function canonicalJson(value) {
|
|
@@ -116913,8 +116921,8 @@ function checkBody(body) {
|
|
|
116913
116921
|
} catch {
|
|
116914
116922
|
key = void 0;
|
|
116915
116923
|
}
|
|
116916
|
-
if (!key || !key.startsWith("https://") && !/^http:\/\/(127\.0\.0\.1|localhost)(:|\/|$)/.test(key)) {
|
|
116917
|
-
throw fail21("wallet_channel_invalid", "a channel proof-tool set names a facilitator that is not an https URL");
|
|
116924
|
+
if (!key || !key.startsWith("https://") && !V3_ONION_KEY.test(key) && !/^http:\/\/(127\.0\.0\.1|localhost)(:|\/|$)/.test(key)) {
|
|
116925
|
+
throw fail21("wallet_channel_invalid", "a channel proof-tool set names a facilitator that is not an https URL or a v3 onion");
|
|
116918
116926
|
}
|
|
116919
116927
|
return Object.freeze({ facilitator: key, pool: set.pool, dir: set.dir, sumsSha256: set.sumsSha256 });
|
|
116920
116928
|
});
|
|
@@ -117073,8 +117081,8 @@ function channelListsSet(body, { facilitator, pool, dir, sumsSha256 }) {
|
|
|
117073
117081
|
// wallet/src/setup/proofTools.mjs
|
|
117074
117082
|
var PINNED_PROOF_TOOLS = Object.freeze({
|
|
117075
117083
|
[DEFAULT_FACILITATOR_ORIGIN]: Object.freeze({
|
|
117076
|
-
dir: "
|
|
117077
|
-
sumsSha256: "
|
|
117084
|
+
dir: "5bed238f",
|
|
117085
|
+
sumsSha256: "5bed238f3696208ca3a8e66d206e5fffc85f1823e959abe1901c2d57c17bcdf3"
|
|
117078
117086
|
})
|
|
117079
117087
|
});
|
|
117080
117088
|
var UPDATE_NEXT = "update the wallet: npx -y shinjuku-shielded@latest setup";
|
|
@@ -119548,7 +119556,11 @@ var MOVE_SERVER_CODES = Object.freeze([
|
|
|
119548
119556
|
"move_payer_unavailable_retry_later",
|
|
119549
119557
|
"move_liquidity_wait",
|
|
119550
119558
|
"move_unknown",
|
|
119551
|
-
"pool_draining"
|
|
119559
|
+
"pool_draining",
|
|
119560
|
+
// 409s of an UNPAID leg (production 2026-10-12 20:48Z: a re-quote of the same body met the open quote and the leg failed
|
|
119561
|
+
// challenge_missing:409). Both mean "this body is quoted or being paid now"; the leg waits with the same body.
|
|
119562
|
+
"move_quote_open",
|
|
119563
|
+
"move_payment_in_flight"
|
|
119552
119564
|
]);
|
|
119553
119565
|
var hash11 = (value) => sha256Hex2(Buffer.from(value, "utf8"));
|
|
119554
119566
|
var sum = (values) => values.reduce((total, value) => total + BigInt(value ?? 0), 0n);
|
|
@@ -119826,6 +119838,13 @@ function refusalOf(serverCode3) {
|
|
|
119826
119838
|
return { code: "wallet_move_payer_busy_retry_later", transient: true };
|
|
119827
119839
|
case "move_liquidity_wait":
|
|
119828
119840
|
return { code: "wallet_move_payer_busy_retry_later", transient: true };
|
|
119841
|
+
// The drain holds an open quote for this exact body until its validBefore + 60 s: ask again after that, same body.
|
|
119842
|
+
case "move_quote_open":
|
|
119843
|
+
return { code: "wallet_move_leg_paused", transient: true };
|
|
119844
|
+
// Only an unpaid request reaches here (moveFetch passes every request that carries payment bytes), so this wallet
|
|
119845
|
+
// holds no bytes for the leg: it never asks for a new quote to pay; it keeps the leg and asks again later.
|
|
119846
|
+
case "move_payment_in_flight":
|
|
119847
|
+
return { code: "wallet_move_leg_paused", transient: true };
|
|
119829
119848
|
case "pool_draining":
|
|
119830
119849
|
return { code: "wallet_move_route_missing", transient: true };
|
|
119831
119850
|
case "move_pool_not_draining":
|
|
@@ -120051,10 +120070,11 @@ async function runMove({
|
|
|
120051
120070
|
if (seen.refusal) {
|
|
120052
120071
|
const refusal2 = refusalOf(seen.refusal);
|
|
120053
120072
|
if (unsent && !refusal2.transient) open3(sourcePath, passphrase2).removeWal(moveWalName(from.pool, leg.n));
|
|
120054
|
-
log(
|
|
120073
|
+
log(`${refusal2.transient ? "MOVE_LEG_WAIT" : "MOVE_LEG_REFUSED"} n=${leg.n} ${seen.refusal}`);
|
|
120055
120074
|
return answer(refusal2.transient ? "waiting" : "failed", refusal2.code, { ...base, serverCode: seen.refusal });
|
|
120056
120075
|
}
|
|
120057
120076
|
const code = firstCode4(error);
|
|
120077
|
+
const shown = /^[a-z0-9_]+:[0-9]{3}(?=$|[\s;(])/.exec(String(error?.message ?? ""))?.[0] ?? code;
|
|
120058
120078
|
if (LEG_REFUSED_CODES.has(code)) {
|
|
120059
120079
|
save2({ state: "refused", code, refusedAtMs: now() });
|
|
120060
120080
|
log(`MOVE_LEG_REFUSED n=${leg.n} ${code}`);
|
|
@@ -120065,8 +120085,8 @@ async function runMove({
|
|
|
120065
120085
|
return answer("waiting", "wallet_move_leg_paused", { ...base, payCode: code });
|
|
120066
120086
|
}
|
|
120067
120087
|
if (unsent) open3(sourcePath, passphrase2).removeWal(moveWalName(from.pool, leg.n));
|
|
120068
|
-
log(`MOVE_LEG_FAILED n=${leg.n} ${
|
|
120069
|
-
return answer(unsent ? "failed" : "waiting", unsent ? "wallet_move_leg_failed" : "wallet_move_leg_paused", { ...base, payCode:
|
|
120088
|
+
log(`MOVE_LEG_FAILED n=${leg.n} ${shown}`);
|
|
120089
|
+
return answer(unsent ? "failed" : "waiting", unsent ? "wallet_move_leg_failed" : "wallet_move_leg_paused", { ...base, payCode: shown });
|
|
120070
120090
|
}
|
|
120071
120091
|
save2({ state: "paid", paidAtMs: now(), ...isSolanaSignature(result?.receipt?.transaction) ? { settleTransaction: result.receipt.transaction } : {} });
|
|
120072
120092
|
log(`MOVE_LEG_PAID n=${leg.n}`);
|
|
@@ -128221,7 +128241,7 @@ var CLI2 = "shinjuku-wallet";
|
|
|
128221
128241
|
var P03_BINDING3 = "carbon-shielded-exact/svm-v3";
|
|
128222
128242
|
var GUIDE = Object.freeze({
|
|
128223
128243
|
program: "8PYPw3FSFTMbvSneXdcoH6jNoN4VD23nHwPY2A2riUy1",
|
|
128224
|
-
pool: "
|
|
128244
|
+
pool: "F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV",
|
|
128225
128245
|
mint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
128226
128246
|
network: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
|
128227
128247
|
facilitator: DEFAULT_FACILITATOR_ORIGIN
|
|
@@ -130447,7 +130467,9 @@ var RELAYED_DEPOSIT_UNIT = Object.freeze({
|
|
|
130447
130467
|
DFCCPHdw7pH9vKk9FEN9z6cy9M1UKjF168j7HfLwxYk3: "1000000",
|
|
130448
130468
|
AAG16mNWTtC1sBeu2tTVTwWjqWXCefLTCByVPj5X3kV8: "1000000",
|
|
130449
130469
|
// The production E1 pool since the tag-28 window (its pool plan: poolDenominationAtomic 1000000).
|
|
130450
|
-
"45mhosfA2MuygZWeqYRVcEZX2Q3gA8KR8FwP6AZkK1zR": "1000000"
|
|
130470
|
+
"45mhosfA2MuygZWeqYRVcEZX2Q3gA8KR8FwP6AZkK1zR": "1000000",
|
|
130471
|
+
// The production E1 pool since 2026-10-12 (GET /api/x402/deposit: depositUnitAtomic 1000000).
|
|
130472
|
+
F7MWGF8vG8Bv3Y4pRRFqky5YzZndGtQaUXbMMvpmtoRV: "1000000"
|
|
130451
130473
|
});
|
|
130452
130474
|
async function runDeposit(args, values, deps) {
|
|
130453
130475
|
const unit = values.has("--relay") && !values.has("--pool-denomination") ? RELAYED_DEPOSIT_UNIT[values.get("--pool")] : void 0;
|