shinjuku-shield 0.3.194 → 0.3.196
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 +109 -77
- package/manifest.json +6 -6
- package/package.json +3 -3
- package/shinjuku-seller.mjs +566 -111
- package/shinjuku-wallet.mjs +2222 -1476
package/README.md
CHANGED
|
@@ -1,113 +1,141 @@
|
|
|
1
1
|
# Shinjuku Shield
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
This is version 0.3.194. The command is `shinjuku`. `shinjuku-shield`
|
|
10
|
-
is the one package that holds the wallet. `shinjuku-shielded` 0.3.194,
|
|
11
|
-
its older npm name, is a small package that runs this package at the same
|
|
12
|
-
version, so wallets installed under it keep updating (0.3.186 and earlier
|
|
13
|
-
versions of `shinjuku-shielded` hold the same files as this package). New
|
|
14
|
-
installs use `shinjuku`.
|
|
3
|
+
Shinjuku Shield is a private wallet on your own computer. It pays for paid
|
|
4
|
+
web services and AI answers from your private balance, so the payment does
|
|
5
|
+
not show who paid. It works inside your AI app (Claude, Cursor, Codex) and in
|
|
6
|
+
a terminal. Only you hold the keys: they never leave your computer.
|
|
7
|
+
|
|
8
|
+
This is version 0.3.196. The command is `shinjuku`.
|
|
15
9
|
|
|
16
10
|
## Set up
|
|
17
11
|
|
|
18
12
|
```sh
|
|
19
|
-
npx -y shinjuku@0.3.
|
|
13
|
+
npx -y shinjuku@0.3.196 setup
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Setup does every step for you:
|
|
17
|
+
|
|
18
|
+
- It makes your wallet on this computer, with a passphrase file that only you
|
|
19
|
+
can read.
|
|
20
|
+
- It asks "Use Tor?" (Tor hides your internet address; on by default). With
|
|
21
|
+
Tor, start Tor yourself before you use the wallet, with an HTTP tunnel port
|
|
22
|
+
(add `HTTPTunnelPort 127.0.0.1:9080` to your torrc); the wallet prints the
|
|
23
|
+
steps when Tor is not running.
|
|
24
|
+
- It downloads and checks the files the wallet needs (about 200 MB), so later
|
|
25
|
+
payments do not wait for them.
|
|
26
|
+
- It offers to install the `shinjuku` command. On Windows it also puts that
|
|
27
|
+
command on your PATH: open a new window after setup to type `shinjuku`.
|
|
28
|
+
- It writes a recovery file. Copy it to two offline places (for example two
|
|
29
|
+
USB drives), then delete it from this computer. It is the only way to get
|
|
30
|
+
your wallet back if this computer is lost.
|
|
31
|
+
|
|
32
|
+
Run setup again at any time: it never changes a wallet that exists.
|
|
33
|
+
|
|
34
|
+
## Add it to your AI app
|
|
35
|
+
|
|
36
|
+
Claude Code: run this line once. Setup then adds the wallet to Claude Code:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
shinjuku setup --add-to claude-code
|
|
20
40
|
```
|
|
21
41
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
42
|
+
Then reconnect the wallet in Claude Code: type `/mcp`, pick `shinjuku`, and
|
|
43
|
+
choose Reconnect.
|
|
44
|
+
|
|
45
|
+
> **In this test version (not offered yet):**
|
|
46
|
+
> - On Windows, the wallet downloads and starts Tor by itself, and starts it
|
|
47
|
+
> again after a restart.
|
|
48
|
+
> - `setup --add-to claude-desktop`, `--add-to cursor` and `--add-to codex` add
|
|
49
|
+
> the wallet to Claude Desktop, Cursor and Codex. At the end of setup, the
|
|
50
|
+
> wallet prints this line for every app it knows.
|
|
51
|
+
|
|
52
|
+
## Add money
|
|
53
|
+
|
|
54
|
+
Ask your AI app: "Add 0.50 USDC to my private balance." It gives you a
|
|
55
|
+
one-time address. Send USDC on Solana to it from any wallet or exchange. Any
|
|
56
|
+
amount from 0.01 USDC works, and you need no SOL. The USDC becomes private by
|
|
57
|
+
itself.
|
|
58
|
+
|
|
59
|
+
In a terminal: `shinjuku add-funds`.
|
|
60
|
+
|
|
61
|
+
## Pay
|
|
62
|
+
|
|
63
|
+
Ask your AI app in plain words, for example:
|
|
64
|
+
|
|
65
|
+
- "Find a paid weather service."
|
|
66
|
+
- "What does this link cost?" (nothing is paid)
|
|
67
|
+
- "Pay for this link."
|
|
68
|
+
|
|
69
|
+
Each answer says what happened and what to do next. A payment that the seller
|
|
70
|
+
does not take comes back to your private balance by itself.
|
|
25
71
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
72
|
+
Spending limits are off by default: only your balance limits a payment. To
|
|
73
|
+
set limits, run setup again with `--max-payment` (the most one payment may
|
|
74
|
+
cost) and `--max-session` (the most in any 24 hours), in USDC: `0.05` is 5
|
|
75
|
+
cents.
|
|
76
|
+
|
|
77
|
+
## Private AI
|
|
78
|
+
|
|
79
|
+
Each AI answer is paid from your private balance, through Tor. The AI service
|
|
80
|
+
sees your words, but not your internet address, and the payment does not show
|
|
81
|
+
who paid. The wallet keeps no copy of a conversation.
|
|
82
|
+
|
|
83
|
+
- `shinjuku chat`: chat with an AI in this terminal. Each answer costs at most
|
|
84
|
+
0.05 USDC and each chat at most 1 USDC, unless you change these limits.
|
|
85
|
+
- `shinjuku infer start`: a private AI address for another app on this
|
|
86
|
+
computer (an app that uses the OpenAI format). It prints the address and a
|
|
87
|
+
key to put in that app. It keeps running after you close the terminal.
|
|
88
|
+
`shinjuku infer status` shows it, and `shinjuku infer stop` stops it.
|
|
89
|
+
- In your AI app, ask "Ask a private AI: ..." for one private answer.
|
|
31
90
|
|
|
32
91
|
## The `shinjuku` command
|
|
33
92
|
|
|
34
|
-
Every wallet command
|
|
35
|
-
`shinjuku
|
|
93
|
+
Every wallet command starts with `shinjuku`, for example `shinjuku balance`,
|
|
94
|
+
`shinjuku add-funds` or `shinjuku chat`. `shinjuku help` lists them all.
|
|
36
95
|
|
|
37
|
-
##
|
|
96
|
+
## What you need
|
|
97
|
+
|
|
98
|
+
- Windows (x64) or Linux. macOS is not supported yet: setup says so before it
|
|
99
|
+
asks anything.
|
|
100
|
+
- Node.js 22.21 or later, or Node.js 24 or later (not Node.js 23).
|
|
101
|
+
`node --version` shows yours.
|
|
102
|
+
|
|
103
|
+
## If setup cannot add the wallet to your app
|
|
104
|
+
|
|
105
|
+
Add it yourself. The name of the wallet in your app is `shinjuku`.
|
|
38
106
|
|
|
39
107
|
Claude Code:
|
|
40
108
|
|
|
41
109
|
```sh
|
|
42
|
-
claude mcp add --scope user shinjuku -- npx -y --no-audit --no-fund shinjuku-shield@0.3.
|
|
110
|
+
claude mcp add --scope user shinjuku -- npx -y --no-audit --no-fund shinjuku-shield@0.3.196 mcp
|
|
43
111
|
```
|
|
44
112
|
|
|
45
|
-
|
|
113
|
+
In this test version only (not offered yet), the same entry for Claude Desktop
|
|
114
|
+
(`claude_desktop_config.json`) or Cursor (`~/.cursor/mcp.json`):
|
|
46
115
|
|
|
47
116
|
```json
|
|
48
|
-
{ "mcpServers": { "shinjuku": { "command": "npx", "args": ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.
|
|
117
|
+
{ "mcpServers": { "shinjuku": { "command": "npx", "args": ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.196", "mcp"] } } }
|
|
49
118
|
```
|
|
50
119
|
|
|
51
|
-
On
|
|
52
|
-
|
|
53
|
-
configs is `shinjuku`.
|
|
120
|
+
On Windows, if the app cannot find `npx`, use `"command": "cmd"` and put
|
|
121
|
+
`"/c", "npx"` at the start of `args`.
|
|
54
122
|
|
|
55
|
-
Codex (the Codex app and Codex
|
|
56
|
-
|
|
123
|
+
In this test version only (not offered yet), Codex (the Codex app and Codex
|
|
124
|
+
CLI read `~/.codex/config.toml`):
|
|
57
125
|
|
|
58
126
|
```toml
|
|
59
127
|
[mcp_servers.shinjuku]
|
|
60
128
|
command = "npx"
|
|
61
|
-
args = ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.
|
|
129
|
+
args = ["-y", "--no-audit", "--no-fund", "shinjuku-shield@0.3.196", "mcp"]
|
|
62
130
|
startup_timeout_sec = 120
|
|
63
131
|
tool_timeout_sec = 300
|
|
64
132
|
```
|
|
65
133
|
|
|
66
|
-
##
|
|
67
|
-
|
|
68
|
-
Ask your agent "Add 0.50 USDC to my shielded balance". It calls
|
|
69
|
-
`wallet_add_funds` and gives a one-time address. Send USDC on Solana to it
|
|
70
|
-
from any wallet or exchange. Cents work (from 0.01 USDC), and you need no
|
|
71
|
-
SOL. The USDC becomes private by itself.
|
|
134
|
+
## For builders: check what you install
|
|
72
135
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
payment. To set them, give setup `--max-payment`, `--max-session`, or
|
|
77
|
-
`--max-cumulative`, in USDC (`0.05` = 5 cents).
|
|
78
|
-
|
|
79
|
-
`x402_discover` finds sellers in public x402 listings, `x402_preview` shows
|
|
80
|
-
the price, and `x402_pay` pays.
|
|
81
|
-
|
|
82
|
-
## Private AI
|
|
83
|
-
|
|
84
|
-
Each answer is paid from your shielded balance, through Tor: the AI
|
|
85
|
-
provider sees your words, not your IP address, and the chain does not show
|
|
86
|
-
which wallet paid. The wallet keeps no copy of a conversation.
|
|
87
|
-
|
|
88
|
-
- `shinjuku chat`: a chat in this terminal. Each answer has a cap (0.05 USDC
|
|
89
|
-
by default) and each chat has a cap (1 USDC by default).
|
|
90
|
-
- `shinjuku infer start`: a local AI address for an agent app that speaks
|
|
91
|
-
the OpenAI API. It prints the `base_url` (`http://127.0.0.1:11402/v1`) and
|
|
92
|
-
an api key. It keeps running in the background after the terminal closes;
|
|
93
|
-
`shinjuku infer status` shows it, and `shinjuku infer stop` stops it. Your
|
|
94
|
-
agent can also start it with the MCP tool `inference_server`. It serves
|
|
95
|
-
the OpenAI Chat Completions API (`/v1/chat/completions`, streaming and
|
|
96
|
-
function tools too), the OpenAI Responses API (`/v1/responses`, which
|
|
97
|
-
Codex uses) and `/v1/models`. `shinjuku infer status --verbose` prints
|
|
98
|
-
the lines that run a whole Codex session on it.
|
|
99
|
-
- `inference_chat` (MCP): one answer for your agent.
|
|
100
|
-
|
|
101
|
-
## Needs
|
|
102
|
-
|
|
103
|
-
- Node.js 22.21 or later, or Node.js 24 or later (`node --version` shows yours; a `--tor` run needs `NODE_USE_ENV_PROXY`, which Node.js 23 does not have).
|
|
104
|
-
- Windows x64 or Linux. macOS is not supported yet: setup says so before it
|
|
105
|
-
asks anything.
|
|
106
|
-
- Tor, for private AI (and for `--tor`).
|
|
107
|
-
|
|
108
|
-
The package has no install scripts. `node_modules/.bin` and the global npm
|
|
109
|
-
folder must not be writable by other users: the MCP server holds your wallet
|
|
110
|
-
keys.
|
|
136
|
+
The package has no install scripts. Do not let other users write to the npm
|
|
137
|
+
folders (`node_modules/.bin` and the global npm folder): the wallet in them
|
|
138
|
+
holds your keys.
|
|
111
139
|
|
|
112
140
|
This package holds one wallet release, unchanged. The `shinjukuRelease` and
|
|
113
141
|
`shinjukuSha256` fields in `package.json` name that release. Compare the hash
|
|
@@ -115,6 +143,10 @@ with the Releases table in
|
|
|
115
143
|
[ShinjukuStaition/shinjuku-shield](https://github.com/ShinjukuStaition/shinjuku-shield#releases).
|
|
116
144
|
Versions are published from GitHub Actions with npm provenance.
|
|
117
145
|
|
|
146
|
+
`shinjuku-shield` is the package that holds the wallet. `shinjuku-shielded`
|
|
147
|
+
0.3.196, its older name, runs this package at the same version, so wallets
|
|
148
|
+
installed under that name keep updating. New installs use `shinjuku`.
|
|
149
|
+
|
|
118
150
|
The full guide is
|
|
119
151
|
[ShinjukuStaition/shinjuku-shield](https://github.com/ShinjukuStaition/shinjuku-shield).
|
|
120
152
|
|
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": "9f713df26eed69219dcf8555afe39ba224a2606edd8ba970e79786a4de4a79b9",
|
|
5
|
+
"bytes": 9433979,
|
|
6
|
+
"sourceCommit": "c925abe323dd202a57545aae720d104f9a986160",
|
|
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": "
|
|
1044
|
-
"bytes":
|
|
1043
|
+
"sha256": "142cb647b014da52a0866704bfa20365894fb75f72c82d9ab4edb572d2727083",
|
|
1044
|
+
"bytes": 3721590,
|
|
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-
|
|
1935
|
+
"publishedAt": "2026-11-08T18:19:02.407Z"
|
|
1936
1936
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shinjuku-shield",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.196",
|
|
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": "9f713df2",
|
|
7
|
+
"shinjukuSha256": "9f713df26eed69219dcf8555afe39ba224a2606edd8ba970e79786a4de4a79b9",
|
|
8
8
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
9
9
|
"author": "Shinjuku Shield",
|
|
10
10
|
"homepage": "https://github.com/ShinjukuStaition/shinjuku-shield#readme",
|