@keeperhub/wallet 0.1.10 → 0.1.12
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 +16 -0
- package/bin/keeperhub-wallet-mcp.js +21 -0
- package/dist/cli.cjs +487 -159
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +501 -158
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +501 -171
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +78 -239
- package/dist/index.d.ts +78 -239
- package/dist/index.js +512 -167
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.cjs +1206 -0
- package/dist/mcp-server.cjs.map +1 -0
- package/dist/mcp-server.d.cts +54 -0
- package/dist/mcp-server.d.ts +54 -0
- package/dist/mcp-server.js +1184 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/payment-signer-CyeRXcX2.d.cts +236 -0
- package/dist/payment-signer-CyeRXcX2.d.ts +236 -0
- package/package.json +57 -54
- package/skill/keeperhub-wallet.skill.md +8 -2
package/README.md
CHANGED
|
@@ -20,6 +20,22 @@ The `npx` form is **pinned to the installer's own version** — never `@latest`.
|
|
|
20
20
|
|
|
21
21
|
Override with `KEEPERHUB_WALLET_HOOK_COMMAND` if you need a different command (monorepo bin path, wrapper script, etc.) — it is written verbatim into `settings.json`, so treat it as trusted input. Re-running `skill install` is idempotent across either form: switching between global, npx, or version-bumped npx replaces the existing entry rather than duplicating it. The de-dup matcher only inspects the `command` field of each hook, so unrelated entries that mention `keeperhub-wallet-hook` in their `matcher` or args are preserved.
|
|
22
22
|
|
|
23
|
+
## MCP server
|
|
24
|
+
|
|
25
|
+
`skill install` also registers a stdio MCP server (`keeperhub-wallet`) in each detected agent's MCP config so Claude — and any MCP-aware client — can call paid KeeperHub workflows from a tool call without writing a Node script.
|
|
26
|
+
|
|
27
|
+
Three tools are exposed:
|
|
28
|
+
|
|
29
|
+
- `call_workflow(slug, body?, paymentHint?, responseFormat?)` — pay-and-invoke a marketplace workflow by slug. Auto-pays x402 on Base USDC or MPP on Tempo USDC.e.
|
|
30
|
+
- `balance()` — Base USDC + Tempo USDC.e on-chain balance.
|
|
31
|
+
- `info()` — public wallet metadata (`subOrgId`, `walletAddress`). The HMAC secret is never returned.
|
|
32
|
+
|
|
33
|
+
On the very first tool call, if `~/.keeperhub/wallet.json` is missing the server provisions a fresh wallet automatically — there is no manual `keeperhub-wallet add` step to run. The provisioned wallet starts with zero balance; the first 402 round-trip surfaces `INSUFFICIENT_FUNDS` with a Coinbase Onramp URL.
|
|
34
|
+
|
|
35
|
+
The local `block_threshold_usd` from `~/.keeperhub/safety.json` is enforced inside the MCP server before paymentSigner signs. Calls above the cap return `{code:"POLICY_BLOCKED"}` without contacting Turnkey. Auto/ask thresholds are not enforced by the MCP server in v1 — everything below `block_threshold_usd` is auto-paid.
|
|
36
|
+
|
|
37
|
+
Auto-registration covers Claude Code, Cursor, Windsurf, and OpenCode. Cline emits a copy-paste notice with the exact entry to paste into its config (the VS Code extension's globalStorage path is too variant-dependent to auto-detect reliably).
|
|
38
|
+
|
|
23
39
|
## First use
|
|
24
40
|
|
|
25
41
|
```ts
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { runMcpServer } from "../dist/mcp-server.js";
|
|
3
|
+
|
|
4
|
+
function reportCrash(label, err) {
|
|
5
|
+
const detail = err instanceof Error && err.stack ? err.stack : String(err);
|
|
6
|
+
process.stderr.write(`[keeperhub-wallet] ${label}:\n${detail}\n`);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
process.on("uncaughtException", (err) => {
|
|
10
|
+
reportCrash("uncaughtException", err);
|
|
11
|
+
process.exit(2);
|
|
12
|
+
});
|
|
13
|
+
process.on("unhandledRejection", (reason) => {
|
|
14
|
+
reportCrash("unhandledRejection", reason);
|
|
15
|
+
process.exit(3);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
runMcpServer().catch((err) => {
|
|
19
|
+
reportCrash("mcp server crashed", err);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
});
|