docs: add WDK CLI documentation - #190
Conversation
90526ac to
1eaed45
Compare
| Changing or resetting a key under `networks` locks all wallets so the next unlock initializes WDK with the new wallet-module configuration. `config reset --all` also locks all wallets. | ||
|
|
||
| ## Indexer | ||
|
|
There was a problem hiding this comment.
it covers how to set the values but not why or where to get them. We should cover these topics:
- What it's for: only wdk get history uses the Indexer API
- Getting a key: link to the existing Indexer API → Get Started page
- Two wiring patterns:
- Direct: default baseUrl + your key: wdk config set --key indexer.apiKey --value (or WDK_INDEXER_API_KEY to avoid persisting it).
- Proxy: point baseUrl at your own endpoint and leave apiKey empty; your proxy injects the key server-side. Useful for teams that don't want keys on developer machines. The proxy must accept: GET {baseUrl}/api/v1/{chain}/{token}/{address}/token-transfers?limit&fromTs&toTs
There was a problem hiding this comment.
Thanks, addressed in 3a4c10f. The section now explains when the Indexer is used, links to key setup, and covers both direct and proxy wiring. It also lists both request forms used by the current CLI.
| `WDK_INDEXER_BASE_URL` is not read by beta.1. | ||
|
|
||
| ## MoonPay | ||
|
|
There was a problem hiding this comment.
Same for the MoonPay section. We should cover these topics:
- What it's for: wdk buy and wdk sell build a MoonPay widget URL for the selected wallet address and open it in the browser. The transaction happens on MoonPay's side, under your own MoonPay account
- apiKey: your publishable MoonPay key (pk_test_… / pk_live_…) from the MoonPay dashboard. It is not the secret key.
- signUrl: MoonPay requires widget URLs to be signed with your secret key. The CLI never stores the secret — you run a small signing service and the CLI calls it. See MoonPay LINK
- environment: sandbox with pk_test_ for testnets, production with pk_live_ for mainnets
There was a problem hiding this comment.
Updated in 3a4c10f. The MoonPay section now covers the publishable key, signing-service request and response, environment pairing, and the current beta.1 behavior where the CLI prints the signed URL for the user to open.
| <Callout type="warn"> | ||
| Use a dedicated development wallet with limited funds. On Unix-like systems, while a wallet is unlocked, any process running as the same OS user that can connect to the owner-only daemon socket can request signing or sending without another passphrase. | ||
| </Callout> | ||
|
|
There was a problem hiding this comment.
We should also explain which CLI capabilities are not exposed over MCP, and why: an agent can operate a wallet a human has unlocked, but can never unlock, export, or reconfigure one.
-
wallet create/import/export/unlock/lock/delete/rename/default
Why: They handle secrets (seed phrase, passphrase) and require interactive input. Unlocking is deliberately the human authorization moment -
config set/reset, network create/delete, token add/delete
Why: They mutate persistent local configuration; these are user-driven decisions
There was a problem hiding this comment.
Covered in 3a4c10f. The guide now lists the wallet and configuration operations that are not exposed through wdk-mcp, explains why they remain user-driven, and notes that separate shell access is outside this boundary.
| The TTL is absolute from unlock; MCP activity does not extend it. Use a short TTL during development and lock the wallet when the session ends. | ||
|
|
||
| ## Configure A Supported AI Client | ||
|
|
There was a problem hiding this comment.
wdk mcp setup covers Claude Desktop, Claude Code, and OpenClaw, but the server is a standard stdio MCP server (wdk-mcp, installed on PATH), so any MCP-compatible client can use it. We should add an "Other MCP clients" as following
{
"mcpServers": {
"wdk-wallet": {
"command": "wdk-mcp"
}
}
}
There was a problem hiding this comment.
Added in 3a4c10f. The guide now includes the generic wdk-mcp stdio configuration and the PATH caveat for clients that do not inherit the shell environment.
| WDK CLI requires Node.js 22.18.0 or later. | ||
|
|
||
| ```bash title="Terminal" | ||
| npm install -g @tetherto/wdk-cli@1.0.0-beta.1 |
There was a problem hiding this comment.
pls use this temporary fixed for postinstall
npm install -g --allow-scripts=@tetherto/wdk-cli @tetherto/wdk-cli@1.0.0-beta.1
There was a problem hiding this comment.
Applied in 3a4c10f. Both install examples now use the temporary --allow-scripts command.
|
Addressed the current CLI docs review feedback in
Validation: the Node 22 production build passed with 278 static pages, LLM output checks, and 0 broken links. After the final wording-only review fixes, all five changed MDX pages compiled, metadata and internal/anchor link checks passed (2,360 links, 0 errors), I left the review threads open for reviewer confirmation. |
| @@ -0,0 +1,187 @@ | |||
| --- | |||
| title: Get Started | |||
There was a problem hiding this comment.
In my opinion, I'd like to revert the Get Started direction: the previous Sepolia version was right.
the new flow makes a MoonPay API and MoonPay signing service prerequisites for the getting-started guide. MoonPay is an optional integration - only buy/sell use it, so the quickstart shouldn't require configuring an optional feature
There was a problem hiding this comment.
Addressed in c8e7258. I removed MoonPay and the signing-service prerequisites from Get Started. Following Lokesh’s direction, the guide remains on Ethereum mainnet and now uses an external transfer to fund the wallet. Leaving this open for your review.
Summary
/cliwith installation, configuration, a complete 31-command API reference, six task guides, and three architecture/security references@tetherto/wdk-cli@1.0.0-beta.1package, all three installed binaries, all nine MCP tools, and the current--json/ error behaviorseed.encv1 recoveryllms.txt, andllms-full.txtfor the new/cliroutesSource baseline
developat8b7ad75tetherto/wdk-cli@v1.0.0-beta.1, source SHA74afd9cwdk-clipackage is not this projectCurrent behavior documented as-is
seed.encanddaemon.piduse0600;daemon.sockuses0700;config.jsonis plaintext with no owner-only guaranteeseed.encv1 uses AES-256-GCM with the documented scrypt parameters and remains recoverable without WDK CLI; automated migration to a future format is not promisedThis PR changes documentation only; it does not change CLI runtime behavior.
Validation
git diff --checknpm run check:metanpm run check:redirectsLINK_CHECK_EXTERNAL=false npm run check:links— 272 pages, 2,355 links, zero errorsnpm run test:llm-md— 12/12 passedPATH=/opt/homebrew/opt/node@22/bin:$PATH npm run buildPATH=/opt/homebrew/opt/node@22/bin:$PATH LINK_CHECK_EXTERNAL=false npm run quality@tetherto/wdk-cli@1.0.0-beta.1, version/binary verification, and all 31 leaf--helpsurfacesKnown validation limit