@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 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. **Take the configuration the wallet's page in the admin app hands you** —
35
- either the environment block for the table below, or a ready-to-install
36
- `.mcpb` bundle with the values already in it.
37
- 4. **Then** install, with those values in the environment.
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 you have the credentials from step 3:
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 (`KEYBAN_WALLET_PATH`, else `$XDG_CONFIG_HOME/keyban/wallet.json`), and registers itself on chain as a signer of that wallet using the
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
- The five required values all come from step 2 — none of them is something you
81
- can pick yourself.
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
- | Variable | Required | What it is |
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 | Pre-generated signer share, base64 JSON. For runtimes whose disk does not last; it does not replace the invite key. |
92
- | `KEYBAN_WALLET_PATH` | no | The wallet file, holding these variables and the share. Defaults to `$XDG_CONFIG_HOME/keyban/wallet.json`. |
93
- | `KEYBAN_CONFIG` | no | All the variables above as one base64 JSON object, for runtimes like AgentCore where each variable is a chore to add. A variable set on its own wins. |
94
- | `MCP_LOG_FILE` | no | Path the server writes its log to. |
95
- | `MCP_LOG_LEVEL` | no | `debug`, `info`, `warn` or `error`. Defaults to `info` for `keyban mcp`, `warn` for `keyban wallet`. |
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: