@mysten-incubation/suipay-mcp 0.3.0-dev.8 → 0.3.0-dev.9
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
CHANGED
|
@@ -5,7 +5,7 @@ buyer-funded spend account. The buyer owns the account. The agent holds the
|
|
|
5
5
|
delegate key and can spend only under the on-chain grant (recipient bind,
|
|
6
6
|
per-payment cap, budget).
|
|
7
7
|
|
|
8
|
-
Pin `@mysten-incubation/suipay-mcp@0.3.0-dev.
|
|
8
|
+
Pin `@mysten-incubation/suipay-mcp@0.3.0-dev.9` in MCP config for the `latest` dist-tag.
|
|
9
9
|
`npx -y @mysten-incubation/suipay-mcp@dev` tracks the `dev` prerelease line.
|
|
10
10
|
`1.0.1` remains on the registry as a historical release; do not install it
|
|
11
11
|
for new agents.
|
|
@@ -13,7 +13,7 @@ for new agents.
|
|
|
13
13
|
## Install
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
claude mcp add --scope user suipay -- npx -y @mysten-incubation/suipay-mcp@0.3.0-dev.
|
|
16
|
+
claude mcp add --scope user suipay -- npx -y @mysten-incubation/suipay-mcp@0.3.0-dev.9
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
`@dev` installs the Railway-dev gateway/console defaults. A workspace
|
|
@@ -155,10 +155,10 @@ Default is Railway **suipay-dev**. `--local` / `target: "local"` is laptop-only.
|
|
|
155
155
|
|
|
156
156
|
```bash
|
|
157
157
|
# Railway suipay-dev (default)
|
|
158
|
-
npx @mysten-incubation/suipay-mcp@0.3.0-dev.
|
|
158
|
+
npx @mysten-incubation/suipay-mcp@0.3.0-dev.9
|
|
159
159
|
|
|
160
160
|
# Laptop stack
|
|
161
|
-
npx @mysten-incubation/suipay-mcp@0.3.0-dev.
|
|
161
|
+
npx @mysten-incubation/suipay-mcp@0.3.0-dev.9 --local
|
|
162
162
|
```
|
|
163
163
|
|
|
164
164
|
`SUIPAY_MCP_TARGET=local|dev` selects the same preset. Explicit
|
|
@@ -169,12 +169,32 @@ credential is bound yet. After a successful login, `credentials.json`
|
|
|
169
169
|
Rebind with `suipay_login({ target: "dev" | "local" })` (same key, new consent
|
|
170
170
|
if that stack has no live grant).
|
|
171
171
|
|
|
172
|
+
### Isolate connection environments
|
|
173
|
+
|
|
174
|
+
`SUIPAY_MCP_PROFILE` selects a separate agent-held key file at
|
|
175
|
+
`~/.suipay/profiles/<sha256-of-trimmed-profile>/credentials.json`. Unset or
|
|
176
|
+
blank keeps the existing `~/.suipay/credentials.json`. The profile is a local
|
|
177
|
+
storage selector, not an authorization grant or gateway override: set
|
|
178
|
+
`SUIPAY_GATEWAY_URL` and `SUIPAY_CONSOLE_URL` as well. Use the same stable profile
|
|
179
|
+
for the same environment. Login, status, discovery, pay, and logout all use
|
|
180
|
+
that profile; logout removes only its file. Files stay mode `0600` inside a
|
|
181
|
+
`0700` profile directory. Existing files are never copied, rebound, or deleted
|
|
182
|
+
when selecting a profile. A new profile requires fresh owner authorization.
|
|
183
|
+
|
|
184
|
+
The console's Connect Agent prompt uses its public gateway URL as the profile.
|
|
185
|
+
Install an MCP package that supports profiles before using this prompt, and
|
|
186
|
+
verify the returned login gateway matches the configured environment before
|
|
187
|
+
continuing. An older package may ignore the variable and reuse legacy
|
|
188
|
+
credentials. Stop on a mismatch; do not pay or delete the existing key.
|
|
189
|
+
|
|
172
190
|
## Client environment
|
|
173
191
|
|
|
174
192
|
```bash
|
|
175
193
|
# Optional. Unset = Railway suipay-dev. --local uses localhost:3000 / 127.0.0.1:4340.
|
|
176
194
|
SUIPAY_GATEWAY_URL=https://gateway.example
|
|
177
195
|
SUIPAY_CONSOLE_URL=https://console.example
|
|
196
|
+
# Optional. Unset/blank retains the legacy credentials file.
|
|
197
|
+
SUIPAY_MCP_PROFILE=https://gateway.example
|
|
178
198
|
SUIPAY_RPC_URL=https://your-testnet-rpc.example
|
|
179
199
|
SUIPAY_NETWORK=testnet
|
|
180
200
|
SUIPAY_MCP_TARGET=dev
|
package/dist/bin/suipay.js
CHANGED
|
@@ -9988,6 +9988,7 @@ import { bytesToHex as bytesToHex4 } from "@noble/hashes/utils.js";
|
|
|
9988
9988
|
|
|
9989
9989
|
// src/config.ts
|
|
9990
9990
|
import { homedir } from "os";
|
|
9991
|
+
import { createHash as createHash4 } from "crypto";
|
|
9991
9992
|
import { join as join2 } from "path";
|
|
9992
9993
|
import { SuiGrpcClient as SuiGrpcClient2 } from "@mysten/sui/grpc";
|
|
9993
9994
|
import { normalizeSuiAddress as normalizeSuiAddress7 } from "@mysten/sui/utils";
|
|
@@ -10054,6 +10055,11 @@ function configError(detail) {
|
|
|
10054
10055
|
}
|
|
10055
10056
|
function mcpCredentialsPath() {
|
|
10056
10057
|
const home = process.env.HOME ?? process.env.USERPROFILE ?? homedir();
|
|
10058
|
+
const profile2 = process.env.SUIPAY_MCP_PROFILE?.trim();
|
|
10059
|
+
if (profile2) {
|
|
10060
|
+
const id = createHash4("sha256").update(profile2).digest("hex");
|
|
10061
|
+
return join2(home, ".suipay", "profiles", id, "credentials.json");
|
|
10062
|
+
}
|
|
10057
10063
|
return join2(home, ".suipay", "credentials.json");
|
|
10058
10064
|
}
|
|
10059
10065
|
var MCP_TARGET_PRESETS = {
|
package/dist/http.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadBootProfile,
|
|
3
3
|
main
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QXBN3DSX.js";
|
|
5
5
|
import {
|
|
6
6
|
MCP_TARGET_PRESETS,
|
|
7
7
|
PACKAGE_NAME,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
settlePreparedMcpPayment,
|
|
27
27
|
traceMcpHttpRequest,
|
|
28
28
|
verifySpendAccountPayReconstructs
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3CONDPUL.js";
|
|
30
30
|
export {
|
|
31
31
|
MCP_TARGET_PRESETS,
|
|
32
32
|
PACKAGE_NAME,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mysten-incubation/suipay-mcp",
|
|
3
|
-
"version": "0.3.0-dev.
|
|
3
|
+
"version": "0.3.0-dev.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "SuiPay MCP — pay MPP-gated APIs from a spend-account grant with an agent-held delegate key.",
|
|
6
6
|
"repository": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"tsup": "^8.0.0",
|
|
43
43
|
"typescript": "^6.0.3",
|
|
44
44
|
"vitest": "^4.1.10",
|
|
45
|
-
"@cmdoss/suipay-
|
|
46
|
-
"@cmdoss/suipay-
|
|
45
|
+
"@cmdoss/suipay-core": "0.1.0",
|
|
46
|
+
"@cmdoss/suipay-sdk": "0.1.0"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "tsup",
|