@keyban/cli 0.2.4 → 0.3.0
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 +26 -22
- package/dist/index.mjs +449 -237
- package/dist/index.mjs.map +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,17 +31,18 @@ So the order is:
|
|
|
31
31
|
2. **Create an agent wallet** in the admin app, or from your assistant with the
|
|
32
32
|
Keyban admin MCP (`https://mcp.keyban.io/mcp`). It provisions the wallet, its
|
|
33
33
|
API key, and a one-shot invite key that authorises this client as a signer.
|
|
34
|
-
3. **
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
3. **Keep the wallet's configuration on this machine**:
|
|
35
|
+
`keyban wallet import <the file the admin app hands you>`, or
|
|
36
|
+
`keyban wallet import --wallet-id <id>` after `keyban admin login`.
|
|
37
|
+
`keyban admin new-wallet` creates the wallet and keeps it in one go.
|
|
38
|
+
4. **Then** install: the server needs no environment.
|
|
38
39
|
|
|
39
40
|
An [agent skill](https://docs.keyban.io/.well-known/agent-skills/keyban-agent-wallet/SKILL.md)
|
|
40
41
|
walks an AI agent through the same steps, then through operating the wallet.
|
|
41
42
|
|
|
42
43
|
## Install
|
|
43
44
|
|
|
44
|
-
Once
|
|
45
|
+
Once the wallet is kept, step 3:
|
|
45
46
|
|
|
46
47
|
```bash
|
|
47
48
|
npx -y @keyban/cli@latest mcp
|
|
@@ -62,25 +63,24 @@ keyban wallet --help
|
|
|
62
63
|
With Claude Code:
|
|
63
64
|
|
|
64
65
|
```bash
|
|
65
|
-
claude mcp add agent-wallet
|
|
66
|
-
-e KEYBAN_API_KEY=… \
|
|
67
|
-
-e KEYBAN_APP_ID=… \
|
|
68
|
-
-e KEYBAN_INVITE_KEY=0x… \
|
|
69
|
-
-e KEYBAN_WALLET_ADDRESS=0x… \
|
|
70
|
-
-e KEYBAN_NETWORK=… \
|
|
71
|
-
-- npx -y @keyban/cli@latest mcp
|
|
66
|
+
claude mcp add agent-wallet -- npx -y @keyban/cli@latest mcp
|
|
72
67
|
```
|
|
73
68
|
|
|
74
|
-
On first boot the server runs a key generation, keeps its share in the wallet
|
|
75
|
-
file
|
|
69
|
+
On first boot the server runs a key generation, keeps its share in the wallet's
|
|
70
|
+
file, and registers itself on chain as a signer of that wallet using the
|
|
76
71
|
invite key. That happens once per machine; the invite key is spent by it.
|
|
77
72
|
|
|
78
73
|
## Configuration
|
|
79
74
|
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
Each wallet is one file, `$XDG_CONFIG_HOME/keyban/wallets/<wallet id>.json`;
|
|
76
|
+
`$XDG_CONFIG_HOME/keyban/wallet.json`, `{"current": "<wallet id>"}`, names the
|
|
77
|
+
one the server drives, and `keyban wallet use <name|id>` changes it. The server
|
|
78
|
+
reads no other wallet configuration from its environment than the two variables below.
|
|
82
79
|
|
|
83
|
-
|
|
80
|
+
A wallet's file holds these entries, all from step 2 — none of them is
|
|
81
|
+
something you can pick yourself.
|
|
82
|
+
|
|
83
|
+
| Entry | Required | What it is |
|
|
84
84
|
|---|---|---|
|
|
85
85
|
| `KEYBAN_API_KEY` | yes | API key of the application the wallet belongs to. Never exposed to the model. |
|
|
86
86
|
| `KEYBAN_APP_ID` | yes | Identifier of the Keyban application. |
|
|
@@ -88,11 +88,15 @@ can pick yourself.
|
|
|
88
88
|
| `KEYBAN_WALLET_ADDRESS` | yes | Address of the account this server drives. |
|
|
89
89
|
| `KEYBAN_NETWORK` | yes | Network the wallet operates on: `BaseMainnet`, `BaseSepolia`, `XdcMainnet` or `XdcApothem`. |
|
|
90
90
|
| `KEYBAN_BASE_URL` | no | Backend base URL, or one of `dev`, `testing`, `staging`, `prod`, `sandbox`. Defaults to `https://api.prod.keyban.io`. |
|
|
91
|
-
| `KEYBAN_DKG_BLOB` | no |
|
|
92
|
-
| `
|
|
93
|
-
|
|
94
|
-
|
|
|
95
|
-
|
|
91
|
+
| `KEYBAN_DKG_BLOB` | no | The signer share, base64 JSON, written by the first key generation or handed by the admin. |
|
|
92
|
+
| `KEYBAN_WALLET_ID`, `KEYBAN_WALLET_NAME` | yes | The wallet's id, which names its file, and its label, which `keyban wallet use` takes. |
|
|
93
|
+
|
|
94
|
+
| Variable | What it is |
|
|
95
|
+
|---|---|
|
|
96
|
+
| `KEYBAN_WALLET_PATH` | The one wallet file to drive, as a cloud agent mounts it; no `current`, no `wallets/`. |
|
|
97
|
+
| `KEYBAN_CONFIG` | A whole wallet file as one base64 JSON value, for runtimes like AgentCore that have nothing but their environment. Without its client share (a Claude Desktop `.mcpb`), the first start writes it to the wallet's own file, by its id, and keeps the share there. |
|
|
98
|
+
| `MCP_LOG_FILE` | Path the server writes its log to. |
|
|
99
|
+
| `MCP_LOG_LEVEL` | `debug`, `info`, `warn` or `error`. Defaults to `info` for `keyban mcp`, `warn` for `keyban wallet`. |
|
|
96
100
|
|
|
97
101
|
`keyban mcp --http` serves stateless streamable-HTTP on `0.0.0.0:8000`,
|
|
98
102
|
`POST /mcp`, for Amazon Bedrock AgentCore. It has no authentication of its own:
|