@cmdoss/suipay-mcp 0.2.2-dev.5 → 0.2.2-dev.7
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 +17 -1
- package/dist/bin/suipay.js +2 -2
- package/dist/{chunk-THLDEMGS.js → chunk-6ZSOXII5.js} +1790 -273
- package/dist/{chunk-P54ZYBPN.js → chunk-KR6WRUDY.js} +2 -2
- package/dist/{http-B4YTVw0k.d.ts → http-DggnqM91.d.ts} +247 -4
- package/dist/http.d.ts +4 -1
- package/dist/http.js +1 -1
- package/dist/index.d.ts +14 -210
- package/dist/index.js +2 -2
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ missing, expired, or revoked.
|
|
|
51
51
|
| Tool | Purpose |
|
|
52
52
|
| --- | --- |
|
|
53
53
|
| `discover` | Search live gateway resources. After login: `name`, `path`, `url`, `targetHash`, catalog price, and `affordable` (can this session cover one call — not authorization). `pay({ url })` still settles |
|
|
54
|
-
| `pay` | Fetch resource, prepare `spend_account` settlement, settle when this process holds the grant key |
|
|
54
|
+
| `pay` | Fetch resource, prepare `spend_account` settlement, settle when this process holds the grant key. POST `json` is the paid body. Optional stdio `file` + `fileField` fill one JSON key from a local file as canonical base64 (Walrus `contentBase64`); requires `SUIPAY_MCP_FILE_ROOT`; hosted `/mcp` refuses `file` |
|
|
55
55
|
| `receipts` | List settlement receipts, optionally by challenge ID |
|
|
56
56
|
| `access_context` | Report current session / delegate / policy state (no secret material) |
|
|
57
57
|
| `suipay_login` | Mint or reuse the local delegate key and return a clickable console URL (does not wait for the wallet). Default target is Railway suipay-dev; pass `target: "local"` for the laptop stack |
|
|
@@ -76,6 +76,22 @@ json: {"prompt":"a cat"}
|
|
|
76
76
|
maxAmount: 50000
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
To store local bytes (Walrus), do not paste base64. Name the file and field.
|
|
80
|
+
Set `SUIPAY_MCP_FILE_ROOT` to an absolute directory; `file` must resolve inside
|
|
81
|
+
it (unset disables attach). Paths under `~/.suipay` are refused even if that
|
|
82
|
+
directory falls inside the root.
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
Pay this SuiPay resource with the suipay MCP `pay` tool. Do not write SDK code.
|
|
86
|
+
|
|
87
|
+
url: https://gateway.example/v1/walrus/store
|
|
88
|
+
method: POST
|
|
89
|
+
json: {"contentType":"text/plain"}
|
|
90
|
+
file: /absolute/path/to/note.txt
|
|
91
|
+
fileField: contentBase64
|
|
92
|
+
maxAmount: 50000
|
|
93
|
+
```
|
|
94
|
+
|
|
79
95
|
`pay` uses SDK `createPayer` internally. When this process settles, a binary
|
|
80
96
|
body is written once under `~/.suipay/deliveries/` and named first in the
|
|
81
97
|
JSON as `savedTo` (absolute path) and `savedToUrl` (`file://`). Hosted `/mcp`
|