midnight-wallet-cli 0.5.5 → 0.5.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/docs/SKILL.md CHANGED
@@ -15,10 +15,14 @@ Manage wallets, check balances, transfer NIGHT tokens, register dust (fee token)
15
15
  - **No self-shielding** — a wallet cannot move its own funds from unshielded to shielded. To get shielded NIGHT, receive a shielded transfer from a wallet that already has some (genesis wallet has 250M shielded NIGHT on localnet).
16
16
  - **Networks**
17
17
  - `undeployed` — local Docker network via `mn localnet up`. Use this for dev iteration.
18
- - `preprod` — public testnet. First-time wallet sync processes the full event history and can take significantly longer than subsequent syncs (which restore from cached wallet state). Exact time depends on wallet age, event density, network, and hardware.
18
+ - `preprod` — public testnet. Its indexer and node are served by Blockfrost and need the user's own project id (see "Preprod needs a Blockfrost project id" below). First-time wallet sync processes the full event history and can take significantly longer than subsequent syncs (which restore from cached wallet state). Exact time depends on wallet age, event density, network, and hardware.
19
19
  - `preview` — public preview testnet. Same first-sync trade-off as preprod.
20
20
  - **Proof server** — local HTTP service that generates ZK proofs for transactions. Default port 6300. Version must match the network's ledger version or writes fail with "Custom error 170".
21
21
 
22
+ ### Preprod needs a Blockfrost project id
23
+
24
+ Midnight shut its own preprod indexer down on 2026-10-09. Blockfrost serves preprod's indexer and node now, and every request needs the user's own project id (created at https://blockfrost.io, one project per network; preprod ids start with `nightpreprod`; requests count against the user's Blockfrost plan). The user sets it once with `midnight config set blockfrost-project-id <project id>` in their own terminal, or `BLOCKFROST_PROJECT_ID` (or `MN_BLOCKFROST_PROJECT_ID`) in the MCP server's environment. It is a secret: `midnight_config_get` shows it masked, no tool result contains it, and you should never ask for it in chat or echo it. Preview and the local network need none.
25
+
22
26
  ## Intent routing (natural language → tool)
23
27
 
24
28
  | User says | Call this tool |
@@ -111,6 +115,10 @@ Every MCP tool error returns `{ error: true, code: <ERROR_CODE>, message: <human
111
115
  | `PROOF_TIMEOUT` | ZK proof generation didn't finish within the deadline. | Retry — proofs can be slow under load. |
112
116
  | `SYNC_TIMEOUT` | Long-running wallet sync hit its deadline. Common on a hosted-network first-cold-sync. | Retry; the cache resumes from the last applied event so progress is preserved. |
113
117
  | `NETWORK_ERROR` | Indexer/node/proof-server connection refused or DNS failure. | Check `midnight_status()`; if localnet, `midnight_localnet_up()`. |
118
+ | `BLOCKFROST_PROJECT_ID_REQUIRED` | The network (preprod) is served by Blockfrost and no project id is set. | Ask the user to create a Midnight preprod project at https://blockfrost.io and run `midnight config set blockfrost-project-id <project id>` themselves. Never ask them to paste the id into the chat. Don't retry until they have. |
119
+ | `BLOCKFROST_PROJECT_ID_REJECTED` | Blockfrost refused the project id (HTTP 403): mistyped, revoked, or for another network. | Ask the user to check it at blockfrost.io and set it again. Don't retry blindly. |
120
+ | `BLOCKFROST_LIMIT_REACHED` | Blockfrost's plan limit or rate limit. | Wait and retry once; if it persists, tell the user it is their Blockfrost plan. |
121
+ | `ENDPOINT_SHUT_DOWN` | An endpoint set by flag or config was shut down by its operator (the old preprod indexer). | `midnight_config_unset({ key: "indexer-ws" })` (and `node` if set), then retry. |
114
122
  | `WALLET_NOT_FOUND` | Named wallet doesn't exist on disk. | `midnight_wallet_list()` — user may have removed it. |
115
123
  | `INVALID_ARGS` | Missing/invalid argument. | Show the message to the user verbatim — it names the missing field. |
116
124
  | `TX_REJECTED` | Chain rejected the submitted transaction (catch-all when no more specific code applies). | Read the message; usually a state mismatch resolved by re-sync + retry. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "midnight-wallet-cli",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
4
4
  "type": "module",
5
5
  "description": "Git-style CLI wallet for the Midnight blockchain",
6
6
  "license": "Apache-2.0",
@@ -39,7 +39,7 @@
39
39
  "NOTICE"
40
40
  ],
41
41
  "engines": {
42
- "node": ">=20",
42
+ "node": ">=22",
43
43
  "bun": ">=1.3.0"
44
44
  },
45
45
  "scripts": {
@@ -53,29 +53,31 @@
53
53
  "typecheck": "tsc --noEmit"
54
54
  },
55
55
  "dependencies": {
56
- "@midnight-ntwrk/compact-runtime": "^0.16.0",
57
- "@midnight-ntwrk/dapp-connector-api": "^4.0.1",
58
- "@midnight-ntwrk/ledger-v8": "^8.1.0",
59
- "@midnight-ntwrk/midnight-js-contracts": "^4.1.1",
60
- "@midnight-ntwrk/midnight-js-http-client-proof-provider": "^4.1.1",
61
- "@midnight-ntwrk/midnight-js-indexer-public-data-provider": "^4.1.1",
62
- "@midnight-ntwrk/midnight-js-level-private-state-provider": "^4.1.1",
63
- "@midnight-ntwrk/midnight-js-network-id": "^4.1.1",
64
- "@midnight-ntwrk/midnight-js-node-zk-config-provider": "^4.1.1",
65
- "@midnight-ntwrk/midnight-js-types": "^4.1.1",
66
- "@midnight-ntwrk/midnight-js-utils": "^4.1.1",
67
- "@midnight-ntwrk/wallet-sdk-abstractions": "^2.0.0",
68
- "@midnight-ntwrk/wallet-sdk-address-format": "^3.1.0",
69
- "@midnight-ntwrk/wallet-sdk-capabilities": "^3.2.0",
70
- "@midnight-ntwrk/wallet-sdk-dust-wallet": "^4.0.0",
71
- "@midnight-ntwrk/wallet-sdk-facade": "^4.0.0",
72
- "@midnight-ntwrk/wallet-sdk-hd": "^3.0.1",
73
- "@midnight-ntwrk/wallet-sdk-shielded": "^3.0.0",
74
- "@midnight-ntwrk/wallet-sdk-unshielded-wallet": "^3.0.0",
56
+ "@midnight-ntwrk/compact-runtime": "0.16.0",
57
+ "@midnight-ntwrk/dapp-connector-api": "4.0.1",
58
+ "@midnight-ntwrk/ledger-v8": "8.1.0",
59
+ "@midnight-ntwrk/midnight-js-contracts": "4.1.1",
60
+ "@midnight-ntwrk/midnight-js-http-client-proof-provider": "4.1.1",
61
+ "@midnight-ntwrk/midnight-js-indexer-public-data-provider": "4.1.1",
62
+ "@midnight-ntwrk/midnight-js-level-private-state-provider": "4.1.1",
63
+ "@midnight-ntwrk/midnight-js-network-id": "4.1.1",
64
+ "@midnight-ntwrk/midnight-js-node-zk-config-provider": "4.1.1",
65
+ "@midnight-ntwrk/midnight-js-types": "4.1.1",
66
+ "@midnight-ntwrk/midnight-js-utils": "4.1.1",
67
+ "@midnight-ntwrk/onchain-runtime-v3": "3.0.0",
68
+ "@midnight-ntwrk/wallet-sdk-abstractions": "2.1.0",
69
+ "@midnight-ntwrk/wallet-sdk-address-format": "3.1.1",
70
+ "@midnight-ntwrk/wallet-sdk-capabilities": "3.3.0",
71
+ "@midnight-ntwrk/wallet-sdk-dust-wallet": "4.0.0",
72
+ "@midnight-ntwrk/wallet-sdk-facade": "4.0.0",
73
+ "@midnight-ntwrk/wallet-sdk-hd": "3.0.1",
74
+ "@midnight-ntwrk/wallet-sdk-shielded": "3.0.0",
75
+ "@midnight-ntwrk/wallet-sdk-unshielded-wallet": "3.0.0",
75
76
  "@midnight-ntwrk/wallet-sdk-utilities": "1.1.1",
76
77
  "@modelcontextprotocol/sdk": "^1.27.1",
78
+ "@scure/base": "2.0.0",
77
79
  "@scure/bip39": "^2.0.1",
78
- "rxjs": "^7.8.1",
80
+ "rxjs": "7.8.2",
79
81
  "ws": "^8.19.0"
80
82
  },
81
83
  "devDependencies": {
@@ -86,10 +88,10 @@
86
88
  "vitest": "^3.2.4"
87
89
  },
88
90
  "optionalDependencies": {
89
- "@nel349/dust-sync-darwin-arm64": "0.5.5",
90
- "@nel349/dust-sync-darwin-x64": "0.5.5",
91
- "@nel349/dust-sync-linux-x64": "0.5.5",
92
- "@nel349/dust-sync-linux-arm64": "0.5.5",
93
- "@nel349/dust-sync-win32-x64": "0.5.5"
91
+ "@nel349/dust-sync-darwin-arm64": "0.5.7",
92
+ "@nel349/dust-sync-darwin-x64": "0.5.7",
93
+ "@nel349/dust-sync-linux-x64": "0.5.7",
94
+ "@nel349/dust-sync-linux-arm64": "0.5.7",
95
+ "@nel349/dust-sync-win32-x64": "0.5.7"
94
96
  }
95
97
  }