@odatano/nightgate-mcp 0.18.2 → 0.19.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/CHANGELOG.md CHANGED
@@ -1,394 +1,430 @@
1
- # Changelog
2
-
3
- All notable changes to `@odatano/nightgate-mcp` are documented in this file.
4
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
5
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
- The README says which NIGHTGATE the current version needs.
7
-
8
- ## [Unreleased]
9
-
10
- ## [0.18.2] - 2026-10-27
11
-
12
- Needs NIGHTGATE 0.36.0.
13
-
14
- ### Fixed
15
-
16
- - **`get_swap_wallet` reads the posted offers in one call.** It settled each
17
- offer posted from this server with its own `getSwapOffer`, on every call.
18
- It now reads the caller's offers changed since the last read with one
19
- `listSwapOffers` (`mine`, `status: all`, `since`). A failed read or a full
20
- page falls back to the single reads.
21
- - The MCP server reports the package version instead of a fixed one.
22
-
23
- ## [0.18.1] - 2026-10-26
24
-
25
- Needs NIGHTGATE 0.36.0.
26
-
27
- ### Fixed
28
-
29
- - **Writes from a fresh install.** `@odatano/nightgate-tx` ^0.15.1 installs one
30
- copy of `@midnight-ntwrk/onchain-runtime-v3`. Two copies failed every write
31
- after proving with `expected instance of StateValue`.
32
-
33
- ### Documentation
34
-
35
- - `docs/tools.md`: how a client keeps a write open, and that the MCP Inspector
36
- CLI stops it after 60 seconds.
37
- - README and `docs/tools.md`: servers on one machine share one seed file and
38
- so one identity unless each sets its own seed.
39
-
40
- ## [0.18.0] - 2026-10-26
41
-
42
- Needs NIGHTGATE 0.36.0; from 0.37.0 the server holds each status read until the job settles.
43
-
44
- ### Changed
45
-
46
- - **No tool takes a server wallet session.** Every write is built, proven and
47
- signed here with the caller seed, and a sponsor pays the fee.
48
- - **Writes wait for their job.** `anchor_document`, `submit_vault_call`,
49
- `sponsor_unbound_transaction`, `sponsor_finalized_transaction`,
50
- `sponsor_swap`, `take_swap_offer` (`submit: true`) and `mint_token` return
51
- `status`, `txHash`, `transactionHash`, `result`, on failure `next`, and
52
- `check`, the free call that shows the effect on-chain. They send MCP progress
53
- every 5 seconds. A job still open after 5 minutes, or one whose status cannot
54
- be read, comes back as `pending` with its `jobId` and `txHash`.
55
- - **A repeated call picks up its job.** The same write with the same arguments,
56
- after a client timeout or a `pending`, waits for the job it started instead
57
- of submitting again. A failed job is built anew.
58
- - **`anchor_document(sha256, metadata?, contentRoot?, schemaId?)`** builds the
59
- attest call here; with a content root it anchors that too.
60
- - **`contractAddress` is optional** on the vault tools: default the shared
61
- sandbox vault of the network (preprod `ca0b1e3c…`, preview `31df87bc…`); a
62
- 16-slot `attestation-vault` needs its address.
63
- - **Seed file.** Without `NIGHTGATE_SEED_HEX` the seed is read from
64
- `NIGHTGATE_SEED_FILE` (default `~/.nightgate-mcp/seed`) and created there on
65
- first use; that answer carries `seed: { created, file, meaning }`.
66
- - **Free state reads.** `verify_attestation` and `verify_predicate` read the
67
- public verify service (`/odata/v4/midnight-verify`) without credentials,
68
- unless basic auth or an `ngat_` grant of a direct instance is set.
69
- `NIGHTGATE_VERIFY_SERVICE_PATH` overrides it.
70
- - **`get_usage`** replaces `get_grant_usage`. With a gateway key it reads
71
- `GET /me`: units left, validity, usage and the cost of the last calls.
72
- - `@odatano/nightgate-tx` is a dependency, no longer an optional peer.
73
- - `verify_attestation` describes `bindingRegistered`.
74
-
75
- ### Added
76
-
77
- - `submit_vault_call(call, params, merkleProof?, docPair?)`: any vault call in
78
- one go, with the calls and params of `build_sponsorable_transaction`.
79
-
80
- ### Removed
81
-
82
- - `get_job_status`.
83
- - The tools that needed a server wallet session: `attest_agent_output`,
84
- `prove_field_predicate`, `prove_field_equality`, `prove_field_membership`,
85
- `prove_field_predicates_batch`, `prove_document_integrity`,
86
- `prove_document_diff`, `grant_disclosure`, `revoke_disclosure`,
87
- `verify_document`, `verify_predicate_attestation`. The claims and the
88
- disclosure calls run through `submit_vault_call`.
89
- - `sessionId` on `mint_token`.
90
- - `grant_disclosure_to_holders`, `revoke_holder_disclosure`,
91
- `claim_disclosure`, `holder_claim_key`.
92
-
93
- ## [0.17.1] - 2026-10-25
94
-
95
- Needs NIGHTGATE 0.36.0; `get_job_status` waits on the server from 0.37.0.
96
-
97
- ### Changed
98
-
99
- - The errors for a missing `NIGHTGATE_SEED_HEX` name its format: 128 hex
100
- characters, a 64-byte BIP39 seed. Same wording in
101
- [docs/configuration.md](docs/configuration.md).
102
-
103
- ## [0.17.0] - 2026-10-25
104
-
105
- Needs NIGHTGATE 0.36.0; `get_job_status` waits on the server from 0.37.0.
106
-
107
- ### Changed
108
-
109
- - **`get_job_status` waits instead of polling.** It passes `waitMs` (default
110
- 20000, at most 25000) and the server holds the call until the job settles;
111
- a server without `waitMs` is asked again without it. Tool descriptions say
112
- call instead of poll.
113
- - **Explorer hash.** The descriptions name `transactionHash`, the hash
114
- explorers show, next to the ledger identifier `txHash` / `transactionId`.
115
- - **Default vault lineage `attestation-vault-32`**, the lineage of the hosted
116
- sandbox vaults: the local builder, its prover keys and every tool that
117
- sends `compiledArtifactRef` use it when none is given. A 16-slot vault needs
118
- `compiledArtifactRef: 'attestation-vault'`.
119
-
120
- ## [0.16.0] - 2026-10-24
121
-
122
- Needs NIGHTGATE 0.36.0 and `@odatano/nightgate-tx` 0.14.0.
123
-
124
- ### Changed
125
-
126
- - **The proof tools send typed parameters.** `siblings`, `dirs`, `setSiblings`,
127
- `setDirs`, `allowedValues`, `claims`, `schema`, `openingA`, `openingB`,
128
- `document` and `proofFields` go to NIGHTGATE as arrays and objects; the
129
- `*Json` string parameters of NIGHTGATE 0.35 and below are not sent anymore.
130
- `post_swap_offer` sends `tags` as an array. Tool inputs are unchanged.
131
-
132
- ## [0.15.0] - 2026-10-19
133
-
134
- Needs NIGHTGATE 0.35.0 and `@odatano/nightgate-tx` 0.14.0; analytics under `/odata/v4/analytics` (the gateway serves both names).
135
-
136
- ### Changed
137
-
138
- - **The analytics URL defaults to `<ODATANO_ACCESS_URL>/odata/v4/analytics`**
139
- instead of `…/odata/v4/astra`. An ASTRA instance that still serves
140
- `/odata/v4/astra` needs `ODATANO_ANALYTICS_URL` set to that path.
141
-
142
- ## [0.14.0] - 2026-10-18
143
-
144
- Needs NIGHTGATE 0.35.0 and `@odatano/nightgate-tx` 0.14.0 (the gateway serves both spellings).
145
-
146
- ### Changed
147
-
148
- - The tools call NIGHTGATE under `/odata/v4/midnight` and
149
- `/odata/v4/midnight-indexer`. Against a server below 0.35.0 set
150
- `NIGHTGATE_SERVICE_PATH=/api/v1/nightgate` and
151
- `NIGHTGATE_INDEXER_SERVICE_PATH=/api/v1/indexer`.
152
-
153
- ## [0.13.0] - 2026-10-15
154
-
155
- Needs NIGHTGATE 0.34.0 and `@odatano/nightgate-tx` 0.12.2.
156
-
157
- ### Added
158
-
159
- - `get_grant_usage`: the key's jobs and its limits, the hour and day budgets
160
- and the rate classes with what is left.
161
-
162
- ### Changed
163
-
164
- - A 429 from NIGHTGATE carries `retryAfterSeconds` from `Retry-After`, as a
165
- gateway 429 did already.
166
-
167
- ## [0.12.0] - 2026-10-13
168
-
169
- Needs NIGHTGATE 0.33.0 and `@odatano/nightgate-tx` 0.12.2.
170
-
171
- ### Changed
172
-
173
- - `build_sponsorable_transaction` and the local `mint_token` read contract
174
- state through the NIGHTGATE API (`createTxBuilder({ api })`); they dial no
175
- indexer and no node. `NIGHTGATE_INDEXER_HTTP_URL` and `NIGHTGATE_INDEXER_WS_URL`
176
- switch them back to a Midnight indexer.
177
- - The swap wallet syncs from `NIGHTGATE_INDEXER_HTTP_URL` and
178
- `NIGHTGATE_INDEXER_WS_URL` only; without them the swap tools refuse with
179
- the two names instead of dialing the public indexer.
180
- - `build_sponsorable_transaction` returns `txId` (sha256 of the bytes),
181
- `characters` and `bytes` instead of the base64; the bytes stay in the server
182
- process for one hour, `outFile` writes them to a path.
183
- - `sponsor_unbound_transaction` and `sponsor_finalized_transaction` take `txId`
184
- or `file` (base64 text or raw bytes); the base64 argument remains for callers
185
- without either. The result carries `sent` with characters, bytes and `txId`.
186
-
187
- ## [0.11.0] - 2026-10-12
188
-
189
- Needs NIGHTGATE 0.32.0.
190
-
191
- ### Changed
192
-
193
- - `sponsor_finalized_transaction`, `sponsor_unbound_transaction`, `sponsor_swap`
194
- and `mint_token` take no `sponsorSessionId`: the server's sponsor pool pays,
195
- or the wallet session the agent grant is pinned to.
196
- - `take_swap_offer`: `submit: true` hands both halves to the sponsor at once;
197
- it replaces the sponsor session id as the trigger.
198
- - The platform pool id is gone from every tool description.
199
-
200
- ## [0.10.1] - 2026-10-03
201
-
202
- ### Fixed
203
-
204
- - A maker half posted with `post_swap_offer` is tied to its `offerId`; `get_swap_wallet`
205
- lists it with `offerId` and `boardStatus` and drops it once the offer is `filled`
206
- (read through `get_swap_wallet`, `get_swap_offer`, `list_swap_offers`, `my_swap_offers`).
207
- An expired or retired offer keeps its half for `revert_swap_offer`.
208
- - Board rows carry `tags` as the server sends them: an array from NIGHTGATE 0.30.3 on.
209
-
210
- ## [0.10.0] - 2026-10-02
211
-
212
- ### Added
213
-
214
- - **Offer board** (NIGHTGATE 0.30.0): `post_swap_offer(offer, expiresAt?, tags?)`,
215
- `list_swap_offers(givesType?, wantsType?, tag?, limit?)`, `retire_swap_offer(offerId)`.
216
- `sponsor_swap` and `take_swap_offer` take an `offerId` from the board in place of the
217
- maker half: `take_swap_offer` reads the entry first and refuses before proving when it
218
- is closed or carries another offer; `sponsor_swap` pairs `offerId` with `takerHalf` or
219
- the `halfId` of a taken offer.
220
- - **Board reads** (NIGHTGATE 0.30.1): `list_swap_offers(status?, since?)` reads closed
221
- offers and the change feed, `my_swap_offers(status?, since?, limit?)` the caller's own
222
- posts, `get_swap_offer(offerId)` one offer open or closed, `get_board_status()` the
223
- board's counts and sponsor readiness without credentials (indexer service,
224
- `NIGHTGATE_INDEXER_SERVICE_PATH`, default `/api/v1/indexer`).
225
- - **`mint_token(contractAddress, name, amount, recipientCoinPublicKey?, recipientEncryptionPublicKey?, sponsorSessionId?, sessionId?, idempotencyKey?)`**:
226
- a token of your own name on a token factory. Without `sessionId` the seed is the issuer,
227
- the mint is built, proven and signed here (`@odatano/nightgate-tx` 0.10.2 on
228
- `@odatano/contract-token-factory`) and `sponsorUnboundTransaction` pays; with `sessionId`
229
- the server session mints (`mintFactoryToken`, NIGHTGATE 0.30.1). The recipient defaults
230
- to this wallet; another wallet takes both of its keys. The type is in the response.
231
- - **Disclosure to token holders**: `grant_disclosure_to_holders(payloadHash, tokenType,
232
- registryAddress, content?, contentType?, expiresAt?)`, `revoke_holder_disclosure(holderGrantId)`,
233
- `claim_disclosure(payloadHash, tokenType, claimSecret)`, `holder_claim_key(claimSecret?)`.
234
-
235
- ### Changed
236
-
237
- - Peer dependency `@odatano/nightgate-tx` `>=0.10.2` (`holderClaimKey`, `tokenFactoryIssuerSecret`); local building and swaps still run on 0.8.0. A missing or older install is reported per tool with the version it needs. Optional peer `@odatano/contract-token-factory` for local minting.
238
- - `mint_token` derives the default recipient from the seed without starting the local builder.
239
- - Amounts given as JS numbers must be safe integers; pass a decimal string for anything larger.
240
- - Function calls pass an unused declared parameter as `null`.
241
-
242
- ## [0.9.0] - 2026-09-30
243
-
244
- ### Added
245
-
246
- - **Shielded swap tools** (NIGHTGATE 0.29.0, `@odatano/nightgate-tx` 0.8.0):
247
- - `get_swap_wallet`: address, public keys, per token type balance, free coins and
248
- `spendable`; halves built here that have not landed.
249
- - `read_swap_offer`: `gives`, `wants`, `inputs`, `outputs`, `bound` of an offer file or
250
- base64 half, read from the transaction.
251
- - `build_swap_offer(give, want, bind?)`: one proven half, as offer file (`swapoffer1...`).
252
- - `take_swap_offer(offer, expect?, sponsorSessionId?, idempotencyKey?)`: the mirror half;
253
- with a sponsor session it submits both halves. A refusal carries `halfId`.
254
- - `sponsor_swap(makerHalf, takerHalf | halfId, sponsorSessionId, idempotencyKey?)`.
255
- - `revert_swap_offer(id)`: releases the coins of a half built here.
256
- - `NIGHTGATE_SWAP_STATE_FILE`, `NIGHTGATE_SWAP_MAX_INPUTS`.
257
- - `get_attester_identity` returns `shieldedAddress`, `coinPublicKey`, `encryptionPublicKey`.
258
- - `npm run integration` covers the swap tools (`scripts/integration-swap.mjs`).
259
-
260
- ### Changed
261
-
262
- - Peer dependency `@odatano/nightgate-tx` `>=0.8.0` (was `>=0.6.0`).
263
- - Lockfile: one `@midnight-ntwrk/ledger-v8` (8.1.0) in the tree. Two copies made the local
264
- builder fail with `expected instance of DustParameters`.
265
- - `live:sponsor-unbound` verifies with the attester id.
266
- - `NIGHTGATE_SEED_HEX` is 128 hex (a 64-byte BIP39 seed); 64 hex is refused at startup.
267
- - `get_job_status` describes the `swap` result of a swap job.
268
-
269
- ## [0.8.1] - 2026-09-27
270
-
271
- ### Changed
272
-
273
- - `get_job_status` describes `chainSegments` (NIGHTGATE 0.28.0): for a confirmed batch,
274
- which calls applied. Tool errors carry the server's string `code` (`INVALID_ARGUMENT`, ...).
275
- - README reorganized; compatibility names the current version only.
276
-
277
- ## [0.8.0] - 2026-09-23
278
-
279
- ### Added
280
-
281
- - **Analytics tools over ODATANO ASTRA** (`analytics_overview`, `analytics_key_figures`,
282
- `analytics_daily`, `analytics_top_block_producers`, `analytics_metrics`, `analytics_metric`,
283
- `analytics_series`, `analytics_compare`, `analytics_anomalies`), registered when the host
284
- serves ASTRA at `ODATANO_ANALYTICS_URL` (default: the gateway's `/odata/v4/astra`). Same key,
285
- one unit per read, chain pinned to Midnight; `analytics_compare` puts Cardano next to it.
286
-
287
- ### Changed
288
-
289
- - **Default gateway host is `https://api.preprod.odatano.dev`** (one host per
290
- network; `api.odatano.dev` now only redirects there with a 307). Node drops
291
- the `Authorization` header on a cross-host redirect, so the old default
292
- would answer 401 for every call: set `ODATANO_ACCESS_URL` explicitly on
293
- older versions, or upgrade. The missing-key warning fires for any
294
- `api.<network>.odatano.dev` host.
295
-
296
- ## [0.7.0] - 2026-09-20
297
-
298
- ### Changed (breaking)
299
-
300
- - **One connection env for both ODATANO MCP servers.** `ODATANO_ACCESS_URL`
301
- (default `https://api.odatano.dev`, the gateway), `ODATANO_ACCESS_KEY`
302
- (the `oda_…` key, or an `ngat_…` grant / other bearer against a direct
303
- instance) and `ODATANO_ACCESS_USER` / `ODATANO_ACCESS_PASSWORD` (basic
304
- auth for a direct instance) replace `NIGHTGATE_BASE_URL`,
305
- `NIGHTGATE_TOKEN`, `NIGHTGATE_USERNAME` and `NIGHTGATE_PASSWORD`; the old
306
- names are not read any more. `@odatano/core-mcp` 0.3.0 reads the same
307
- four, so an `.mcp.json` needs one key for both chains and no URL. The
308
- other `NIGHTGATE_*` variables (network, seed, indexer, zk-config, proof
309
- server, timeout, service path) are unchanged.
310
- - **Gateway error bodies reach the agent.** The ODATANO ACCESS gateway
311
- answers with `{ error: "<text>", ...detail }`; the client now keeps the
312
- text as the message and hands the detail (`unitsLeft`, `price`, the
313
- `topup` hint, `products`, `validUntil`, `retryAfterSeconds` from
314
- `Retry-After`) through to the tool error, so a 402 says how to top up
315
- instead of "request failed with HTTP 402".
316
- - **The hosted API is the documented default.** README: quick start with a
317
- key from api.odatano.dev first, sponsoring through the gateway's platform
318
- pool, own instance second; the server warns at startup when the gateway
319
- is the target and no key is set. Server version constant follows the
320
- package.
321
-
322
- ## [0.6.1] - 2026-09-19
323
-
324
- ### Changed
325
-
326
- - **The ODATANO ACCESS key (`oda_…`) is the documented credential.**
327
- `api.nightgate.dev` is the ODATANO ACCESS gateway since 2026-09-18: it
328
- meters the key in units, swaps in the NIGHTGATE agent grant underneath and
329
- fronts ODATANO with the same key. Set `NIGHTGATE_BASE_URL=https://api.nightgate.dev`
330
- and `NIGHTGATE_TOKEN=oda_…`; the key goes as a plain `Authorization: Bearer`.
331
- Get one at `POST https://api.odatano.dev/keys` (x402), from a giveaway
332
- code, or by signing in at the console. A raw `ngat_…` agent grant
333
- (`x-agent-token`) still works against a direct NIGHTGATE instance. No code
334
- change: the client already sent a prefix-less token as a bearer.
335
- - `.env.example` and README updated accordingly; this changelog added and
336
- shipped with the package.
337
-
338
- ## [0.6.0] - 2026-09
339
-
340
- ### Changed (breaking)
341
-
342
- - **Vault lineage 4: every record is keyed by attester AND payload**
343
- (NIGHTGATE >= 0.24.0). `verify_attestation` takes `attesterId` +
344
- `payloadHash` (or a bound `documentId`), `verify_predicate` takes
345
- `attesterId`, the `prove_*` tools accept an optional `attesterId` (the
346
- record the claim is proven against), `anchor_document` is one plain attest
347
- and returns `attesterId`.
348
- - `prepare_anchor_commitment` and `commit_document_anchor` are gone: nothing
349
- is left to guard, no identity can take over another attester's record.
350
- - Local building needs `@odatano/nightgate-tx` >= 0.6.0; the proof calls
351
- take `recordKey` or `payloadHash` (+ `attesterId`). Against a 0.23.x server
352
- the verify calls fail with 400 (unknown parameter).
353
-
354
- ## [0.5.1] - 2026-08-23
355
-
356
- ### Added
357
-
358
- - **32-slot vault.** Schema and opening take 16 or 32 entries, `allowedMask`
359
- up to 32 bits, `k` up to 32; the vacuity guard is checked against the
360
- schema instead of a fixed all-ones constant. Target it with
361
- `compiledArtifactRef: 'attestation-vault-32'` (NIGHTGATE >= 0.19.0 for
362
- width 32). A 16-slot setup keeps working against any 0.18.x server.
363
- - Local ZK claims: field and document proofs can be built in-process.
364
-
365
- ## [0.5.0] - 2026-08-19
366
-
367
- ### Added
368
-
369
- - **Parallel sponsoring channel:** `sponsor_unbound_transaction` with the
370
- platform pool id (NIGHTGATE >= 0.18.0; 404 against older servers).
371
- - **Local transaction building** for agents: `build_sponsorable_transaction`
372
- and `get_attester_identity` via the optional `@odatano/nightgate-tx`
373
- >= 0.2.0 txbuilder, driven by `NIGHTGATE_SEED_HEX` (never a tool argument).
374
-
375
- ## [0.3.0] - 2026-08-16
376
-
377
- ### Added
378
-
379
- - Cross-root document proofs and guarded anchoring (`prepare_anchor_commitment`
380
- / `commit_document_anchor`, removed again in 0.6.0).
381
-
382
- ## [0.2.0] - 2026-08-10
383
-
384
- ### Added
385
-
386
- - Membership and equality proof tools; README documents the tool set and the
387
- server compatibility table.
388
-
389
- ## [0.1.0] - 2026-08-07
390
-
391
- ### Added
392
-
393
- - Initial MCP server: attestation, verification and job tools over the
394
- NIGHTGATE OData API, agent-grant (`ngat_…`) or basic auth.
1
+ # Changelog
2
+
3
+ All notable changes to `@odatano/nightgate-mcp` are documented in this file.
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+ The README says which NIGHTGATE the current version needs.
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.19.0] - 2026-10-28
11
+
12
+ Needs NIGHTGATE 0.36.0; `waitMs` needs 0.38.0.
13
+
14
+ ### Added
15
+
16
+ - **The board waits.** `list_swap_offers` and `my_swap_offers` take `waitMs`
17
+ (up to 25000): the server holds an empty answer until an offer matches or
18
+ the time is up, so a watcher with `status: 'all'` and `since` makes one
19
+ call per change instead of one per interval. Sent only when set, so an
20
+ older server answers as before.
21
+ - **The wallet reports what is pending.** Each token row of `get_swap_wallet`
22
+ carries `pending`, what the halves built here bring back once their swaps
23
+ land (the change and the wanted coins). `balance` stays the free coins: a
24
+ half can give only from `balance`, and while it can still land the wallet
25
+ is worth `balance` plus `pending`. Needs `@odatano/nightgate-tx` 0.16.0,
26
+ which comes with the package.
27
+
28
+ ### Changed
29
+
30
+ - `zod` 4 and `@modelcontextprotocol/sdk` 1.32: the tool schemas are
31
+ unchanged for callers; the install carries no known vulnerable package.
32
+
33
+ ## [0.18.3] - 2026-10-27
34
+
35
+ Needs NIGHTGATE 0.36.0.
36
+
37
+ ### Added
38
+
39
+ - **Stage timings for writes.** `anchor_document` and `submit_vault_call`
40
+ return `timings`: `setupMs` and `proveMs` for the local build, `queueMs`,
41
+ `sponsorMs` and `settleMs` from the job's timestamps.
42
+ - **Progress names the stage.** The progress messages say what runs, for
43
+ example `proving` or `submitted, waiting for the block`, instead of
44
+ `working`.
45
+
46
+ ## [0.18.2] - 2026-10-27
47
+
48
+ Needs NIGHTGATE 0.36.0.
49
+
50
+ ### Fixed
51
+
52
+ - **`get_swap_wallet` reads the posted offers in one call.** It settled each
53
+ offer posted from this server with its own `getSwapOffer`, on every call.
54
+ It now reads the caller's offers changed since the last read with one
55
+ `listSwapOffers` (`mine`, `status: all`, `since`). A failed read or a full
56
+ page falls back to the single reads.
57
+ - The MCP server reports the package version instead of a fixed one.
58
+
59
+ ## [0.18.1] - 2026-10-26
60
+
61
+ Needs NIGHTGATE 0.36.0.
62
+
63
+ ### Fixed
64
+
65
+ - **Writes from a fresh install.** `@odatano/nightgate-tx` ^0.15.1 installs one
66
+ copy of `@midnight-ntwrk/onchain-runtime-v3`. Two copies failed every write
67
+ after proving with `expected instance of StateValue`.
68
+
69
+ ### Documentation
70
+
71
+ - `docs/tools.md`: how a client keeps a write open, and that the MCP Inspector
72
+ CLI stops it after 60 seconds.
73
+ - README and `docs/tools.md`: servers on one machine share one seed file and
74
+ so one identity unless each sets its own seed.
75
+
76
+ ## [0.18.0] - 2026-10-26
77
+
78
+ Needs NIGHTGATE 0.36.0; from 0.37.0 the server holds each status read until the job settles.
79
+
80
+ ### Changed
81
+
82
+ - **No tool takes a server wallet session.** Every write is built, proven and
83
+ signed here with the caller seed, and a sponsor pays the fee.
84
+ - **Writes wait for their job.** `anchor_document`, `submit_vault_call`,
85
+ `sponsor_unbound_transaction`, `sponsor_finalized_transaction`,
86
+ `sponsor_swap`, `take_swap_offer` (`submit: true`) and `mint_token` return
87
+ `status`, `txHash`, `transactionHash`, `result`, on failure `next`, and
88
+ `check`, the free call that shows the effect on-chain. They send MCP progress
89
+ every 5 seconds. A job still open after 5 minutes, or one whose status cannot
90
+ be read, comes back as `pending` with its `jobId` and `txHash`.
91
+ - **A repeated call picks up its job.** The same write with the same arguments,
92
+ after a client timeout or a `pending`, waits for the job it started instead
93
+ of submitting again. A failed job is built anew.
94
+ - **`anchor_document(sha256, metadata?, contentRoot?, schemaId?)`** builds the
95
+ attest call here; with a content root it anchors that too.
96
+ - **`contractAddress` is optional** on the vault tools: default the shared
97
+ sandbox vault of the network (preprod `ca0b1e3c…`, preview `31df87bc…`); a
98
+ 16-slot `attestation-vault` needs its address.
99
+ - **Seed file.** Without `NIGHTGATE_SEED_HEX` the seed is read from
100
+ `NIGHTGATE_SEED_FILE` (default `~/.nightgate-mcp/seed`) and created there on
101
+ first use; that answer carries `seed: { created, file, meaning }`.
102
+ - **Free state reads.** `verify_attestation` and `verify_predicate` read the
103
+ public verify service (`/odata/v4/midnight-verify`) without credentials,
104
+ unless basic auth or an `ngat_` grant of a direct instance is set.
105
+ `NIGHTGATE_VERIFY_SERVICE_PATH` overrides it.
106
+ - **`get_usage`** replaces `get_grant_usage`. With a gateway key it reads
107
+ `GET /me`: units left, validity, usage and the cost of the last calls.
108
+ - `@odatano/nightgate-tx` is a dependency, no longer an optional peer.
109
+ - `verify_attestation` describes `bindingRegistered`.
110
+
111
+ ### Added
112
+
113
+ - `submit_vault_call(call, params, merkleProof?, docPair?)`: any vault call in
114
+ one go, with the calls and params of `build_sponsorable_transaction`.
115
+
116
+ ### Removed
117
+
118
+ - `get_job_status`.
119
+ - The tools that needed a server wallet session: `attest_agent_output`,
120
+ `prove_field_predicate`, `prove_field_equality`, `prove_field_membership`,
121
+ `prove_field_predicates_batch`, `prove_document_integrity`,
122
+ `prove_document_diff`, `grant_disclosure`, `revoke_disclosure`,
123
+ `verify_document`, `verify_predicate_attestation`. The claims and the
124
+ disclosure calls run through `submit_vault_call`.
125
+ - `sessionId` on `mint_token`.
126
+ - `grant_disclosure_to_holders`, `revoke_holder_disclosure`,
127
+ `claim_disclosure`, `holder_claim_key`.
128
+
129
+ ## [0.17.1] - 2026-10-25
130
+
131
+ Needs NIGHTGATE 0.36.0; `get_job_status` waits on the server from 0.37.0.
132
+
133
+ ### Changed
134
+
135
+ - The errors for a missing `NIGHTGATE_SEED_HEX` name its format: 128 hex
136
+ characters, a 64-byte BIP39 seed. Same wording in
137
+ [docs/configuration.md](docs/configuration.md).
138
+
139
+ ## [0.17.0] - 2026-10-25
140
+
141
+ Needs NIGHTGATE 0.36.0; `get_job_status` waits on the server from 0.37.0.
142
+
143
+ ### Changed
144
+
145
+ - **`get_job_status` waits instead of polling.** It passes `waitMs` (default
146
+ 20000, at most 25000) and the server holds the call until the job settles;
147
+ a server without `waitMs` is asked again without it. Tool descriptions say
148
+ call instead of poll.
149
+ - **Explorer hash.** The descriptions name `transactionHash`, the hash
150
+ explorers show, next to the ledger identifier `txHash` / `transactionId`.
151
+ - **Default vault lineage `attestation-vault-32`**, the lineage of the hosted
152
+ sandbox vaults: the local builder, its prover keys and every tool that
153
+ sends `compiledArtifactRef` use it when none is given. A 16-slot vault needs
154
+ `compiledArtifactRef: 'attestation-vault'`.
155
+
156
+ ## [0.16.0] - 2026-10-24
157
+
158
+ Needs NIGHTGATE 0.36.0 and `@odatano/nightgate-tx` 0.14.0.
159
+
160
+ ### Changed
161
+
162
+ - **The proof tools send typed parameters.** `siblings`, `dirs`, `setSiblings`,
163
+ `setDirs`, `allowedValues`, `claims`, `schema`, `openingA`, `openingB`,
164
+ `document` and `proofFields` go to NIGHTGATE as arrays and objects; the
165
+ `*Json` string parameters of NIGHTGATE 0.35 and below are not sent anymore.
166
+ `post_swap_offer` sends `tags` as an array. Tool inputs are unchanged.
167
+
168
+ ## [0.15.0] - 2026-10-19
169
+
170
+ Needs NIGHTGATE 0.35.0 and `@odatano/nightgate-tx` 0.14.0; analytics under `/odata/v4/analytics` (the gateway serves both names).
171
+
172
+ ### Changed
173
+
174
+ - **The analytics URL defaults to `<ODATANO_ACCESS_URL>/odata/v4/analytics`**
175
+ instead of `…/odata/v4/astra`. An ASTRA instance that still serves
176
+ `/odata/v4/astra` needs `ODATANO_ANALYTICS_URL` set to that path.
177
+
178
+ ## [0.14.0] - 2026-10-18
179
+
180
+ Needs NIGHTGATE 0.35.0 and `@odatano/nightgate-tx` 0.14.0 (the gateway serves both spellings).
181
+
182
+ ### Changed
183
+
184
+ - The tools call NIGHTGATE under `/odata/v4/midnight` and
185
+ `/odata/v4/midnight-indexer`. Against a server below 0.35.0 set
186
+ `NIGHTGATE_SERVICE_PATH=/api/v1/nightgate` and
187
+ `NIGHTGATE_INDEXER_SERVICE_PATH=/api/v1/indexer`.
188
+
189
+ ## [0.13.0] - 2026-10-15
190
+
191
+ Needs NIGHTGATE 0.34.0 and `@odatano/nightgate-tx` 0.12.2.
192
+
193
+ ### Added
194
+
195
+ - `get_grant_usage`: the key's jobs and its limits, the hour and day budgets
196
+ and the rate classes with what is left.
197
+
198
+ ### Changed
199
+
200
+ - A 429 from NIGHTGATE carries `retryAfterSeconds` from `Retry-After`, as a
201
+ gateway 429 did already.
202
+
203
+ ## [0.12.0] - 2026-10-13
204
+
205
+ Needs NIGHTGATE 0.33.0 and `@odatano/nightgate-tx` 0.12.2.
206
+
207
+ ### Changed
208
+
209
+ - `build_sponsorable_transaction` and the local `mint_token` read contract
210
+ state through the NIGHTGATE API (`createTxBuilder({ api })`); they dial no
211
+ indexer and no node. `NIGHTGATE_INDEXER_HTTP_URL` and `NIGHTGATE_INDEXER_WS_URL`
212
+ switch them back to a Midnight indexer.
213
+ - The swap wallet syncs from `NIGHTGATE_INDEXER_HTTP_URL` and
214
+ `NIGHTGATE_INDEXER_WS_URL` only; without them the swap tools refuse with
215
+ the two names instead of dialing the public indexer.
216
+ - `build_sponsorable_transaction` returns `txId` (sha256 of the bytes),
217
+ `characters` and `bytes` instead of the base64; the bytes stay in the server
218
+ process for one hour, `outFile` writes them to a path.
219
+ - `sponsor_unbound_transaction` and `sponsor_finalized_transaction` take `txId`
220
+ or `file` (base64 text or raw bytes); the base64 argument remains for callers
221
+ without either. The result carries `sent` with characters, bytes and `txId`.
222
+
223
+ ## [0.11.0] - 2026-10-12
224
+
225
+ Needs NIGHTGATE 0.32.0.
226
+
227
+ ### Changed
228
+
229
+ - `sponsor_finalized_transaction`, `sponsor_unbound_transaction`, `sponsor_swap`
230
+ and `mint_token` take no `sponsorSessionId`: the server's sponsor pool pays,
231
+ or the wallet session the agent grant is pinned to.
232
+ - `take_swap_offer`: `submit: true` hands both halves to the sponsor at once;
233
+ it replaces the sponsor session id as the trigger.
234
+ - The platform pool id is gone from every tool description.
235
+
236
+ ## [0.10.1] - 2026-10-03
237
+
238
+ ### Fixed
239
+
240
+ - A maker half posted with `post_swap_offer` is tied to its `offerId`; `get_swap_wallet`
241
+ lists it with `offerId` and `boardStatus` and drops it once the offer is `filled`
242
+ (read through `get_swap_wallet`, `get_swap_offer`, `list_swap_offers`, `my_swap_offers`).
243
+ An expired or retired offer keeps its half for `revert_swap_offer`.
244
+ - Board rows carry `tags` as the server sends them: an array from NIGHTGATE 0.30.3 on.
245
+
246
+ ## [0.10.0] - 2026-10-02
247
+
248
+ ### Added
249
+
250
+ - **Offer board** (NIGHTGATE 0.30.0): `post_swap_offer(offer, expiresAt?, tags?)`,
251
+ `list_swap_offers(givesType?, wantsType?, tag?, limit?)`, `retire_swap_offer(offerId)`.
252
+ `sponsor_swap` and `take_swap_offer` take an `offerId` from the board in place of the
253
+ maker half: `take_swap_offer` reads the entry first and refuses before proving when it
254
+ is closed or carries another offer; `sponsor_swap` pairs `offerId` with `takerHalf` or
255
+ the `halfId` of a taken offer.
256
+ - **Board reads** (NIGHTGATE 0.30.1): `list_swap_offers(status?, since?)` reads closed
257
+ offers and the change feed, `my_swap_offers(status?, since?, limit?)` the caller's own
258
+ posts, `get_swap_offer(offerId)` one offer open or closed, `get_board_status()` the
259
+ board's counts and sponsor readiness without credentials (indexer service,
260
+ `NIGHTGATE_INDEXER_SERVICE_PATH`, default `/api/v1/indexer`).
261
+ - **`mint_token(contractAddress, name, amount, recipientCoinPublicKey?, recipientEncryptionPublicKey?, sponsorSessionId?, sessionId?, idempotencyKey?)`**:
262
+ a token of your own name on a token factory. Without `sessionId` the seed is the issuer,
263
+ the mint is built, proven and signed here (`@odatano/nightgate-tx` 0.10.2 on
264
+ `@odatano/contract-token-factory`) and `sponsorUnboundTransaction` pays; with `sessionId`
265
+ the server session mints (`mintFactoryToken`, NIGHTGATE 0.30.1). The recipient defaults
266
+ to this wallet; another wallet takes both of its keys. The type is in the response.
267
+ - **Disclosure to token holders**: `grant_disclosure_to_holders(payloadHash, tokenType,
268
+ registryAddress, content?, contentType?, expiresAt?)`, `revoke_holder_disclosure(holderGrantId)`,
269
+ `claim_disclosure(payloadHash, tokenType, claimSecret)`, `holder_claim_key(claimSecret?)`.
270
+
271
+ ### Changed
272
+
273
+ - Peer dependency `@odatano/nightgate-tx` `>=0.10.2` (`holderClaimKey`, `tokenFactoryIssuerSecret`); local building and swaps still run on 0.8.0. A missing or older install is reported per tool with the version it needs. Optional peer `@odatano/contract-token-factory` for local minting.
274
+ - `mint_token` derives the default recipient from the seed without starting the local builder.
275
+ - Amounts given as JS numbers must be safe integers; pass a decimal string for anything larger.
276
+ - Function calls pass an unused declared parameter as `null`.
277
+
278
+ ## [0.9.0] - 2026-09-30
279
+
280
+ ### Added
281
+
282
+ - **Shielded swap tools** (NIGHTGATE 0.29.0, `@odatano/nightgate-tx` 0.8.0):
283
+ - `get_swap_wallet`: address, public keys, per token type balance, free coins and
284
+ `spendable`; halves built here that have not landed.
285
+ - `read_swap_offer`: `gives`, `wants`, `inputs`, `outputs`, `bound` of an offer file or
286
+ base64 half, read from the transaction.
287
+ - `build_swap_offer(give, want, bind?)`: one proven half, as offer file (`swapoffer1...`).
288
+ - `take_swap_offer(offer, expect?, sponsorSessionId?, idempotencyKey?)`: the mirror half;
289
+ with a sponsor session it submits both halves. A refusal carries `halfId`.
290
+ - `sponsor_swap(makerHalf, takerHalf | halfId, sponsorSessionId, idempotencyKey?)`.
291
+ - `revert_swap_offer(id)`: releases the coins of a half built here.
292
+ - `NIGHTGATE_SWAP_STATE_FILE`, `NIGHTGATE_SWAP_MAX_INPUTS`.
293
+ - `get_attester_identity` returns `shieldedAddress`, `coinPublicKey`, `encryptionPublicKey`.
294
+ - `npm run integration` covers the swap tools (`scripts/integration-swap.mjs`).
295
+
296
+ ### Changed
297
+
298
+ - Peer dependency `@odatano/nightgate-tx` `>=0.8.0` (was `>=0.6.0`).
299
+ - Lockfile: one `@midnight-ntwrk/ledger-v8` (8.1.0) in the tree. Two copies made the local
300
+ builder fail with `expected instance of DustParameters`.
301
+ - `live:sponsor-unbound` verifies with the attester id.
302
+ - `NIGHTGATE_SEED_HEX` is 128 hex (a 64-byte BIP39 seed); 64 hex is refused at startup.
303
+ - `get_job_status` describes the `swap` result of a swap job.
304
+
305
+ ## [0.8.1] - 2026-09-27
306
+
307
+ ### Changed
308
+
309
+ - `get_job_status` describes `chainSegments` (NIGHTGATE 0.28.0): for a confirmed batch,
310
+ which calls applied. Tool errors carry the server's string `code` (`INVALID_ARGUMENT`, ...).
311
+ - README reorganized; compatibility names the current version only.
312
+
313
+ ## [0.8.0] - 2026-09-23
314
+
315
+ ### Added
316
+
317
+ - **Analytics tools over ODATANO ASTRA** (`analytics_overview`, `analytics_key_figures`,
318
+ `analytics_daily`, `analytics_top_block_producers`, `analytics_metrics`, `analytics_metric`,
319
+ `analytics_series`, `analytics_compare`, `analytics_anomalies`), registered when the host
320
+ serves ASTRA at `ODATANO_ANALYTICS_URL` (default: the gateway's `/odata/v4/astra`). Same key,
321
+ one unit per read, chain pinned to Midnight; `analytics_compare` puts Cardano next to it.
322
+
323
+ ### Changed
324
+
325
+ - **Default gateway host is `https://api.preprod.odatano.dev`** (one host per
326
+ network; `api.odatano.dev` now only redirects there with a 307). Node drops
327
+ the `Authorization` header on a cross-host redirect, so the old default
328
+ would answer 401 for every call: set `ODATANO_ACCESS_URL` explicitly on
329
+ older versions, or upgrade. The missing-key warning fires for any
330
+ `api.<network>.odatano.dev` host.
331
+
332
+ ## [0.7.0] - 2026-09-20
333
+
334
+ ### Changed (breaking)
335
+
336
+ - **One connection env for both ODATANO MCP servers.** `ODATANO_ACCESS_URL`
337
+ (default `https://api.odatano.dev`, the gateway), `ODATANO_ACCESS_KEY`
338
+ (the `oda_…` key, or an `ngat_…` grant / other bearer against a direct
339
+ instance) and `ODATANO_ACCESS_USER` / `ODATANO_ACCESS_PASSWORD` (basic
340
+ auth for a direct instance) replace `NIGHTGATE_BASE_URL`,
341
+ `NIGHTGATE_TOKEN`, `NIGHTGATE_USERNAME` and `NIGHTGATE_PASSWORD`; the old
342
+ names are not read any more. `@odatano/core-mcp` 0.3.0 reads the same
343
+ four, so an `.mcp.json` needs one key for both chains and no URL. The
344
+ other `NIGHTGATE_*` variables (network, seed, indexer, zk-config, proof
345
+ server, timeout, service path) are unchanged.
346
+ - **Gateway error bodies reach the agent.** The ODATANO ACCESS gateway
347
+ answers with `{ error: "<text>", ...detail }`; the client now keeps the
348
+ text as the message and hands the detail (`unitsLeft`, `price`, the
349
+ `topup` hint, `products`, `validUntil`, `retryAfterSeconds` from
350
+ `Retry-After`) through to the tool error, so a 402 says how to top up
351
+ instead of "request failed with HTTP 402".
352
+ - **The hosted API is the documented default.** README: quick start with a
353
+ key from api.odatano.dev first, sponsoring through the gateway's platform
354
+ pool, own instance second; the server warns at startup when the gateway
355
+ is the target and no key is set. Server version constant follows the
356
+ package.
357
+
358
+ ## [0.6.1] - 2026-09-19
359
+
360
+ ### Changed
361
+
362
+ - **The ODATANO ACCESS key (`oda_…`) is the documented credential.**
363
+ `api.nightgate.dev` is the ODATANO ACCESS gateway since 2026-09-18: it
364
+ meters the key in units, swaps in the NIGHTGATE agent grant underneath and
365
+ fronts ODATANO with the same key. Set `NIGHTGATE_BASE_URL=https://api.nightgate.dev`
366
+ and `NIGHTGATE_TOKEN=oda_…`; the key goes as a plain `Authorization: Bearer`.
367
+ Get one at `POST https://api.odatano.dev/keys` (x402), from a giveaway
368
+ code, or by signing in at the console. A raw `ngat_…` agent grant
369
+ (`x-agent-token`) still works against a direct NIGHTGATE instance. No code
370
+ change: the client already sent a prefix-less token as a bearer.
371
+ - `.env.example` and README updated accordingly; this changelog added and
372
+ shipped with the package.
373
+
374
+ ## [0.6.0] - 2026-09
375
+
376
+ ### Changed (breaking)
377
+
378
+ - **Vault lineage 4: every record is keyed by attester AND payload**
379
+ (NIGHTGATE >= 0.24.0). `verify_attestation` takes `attesterId` +
380
+ `payloadHash` (or a bound `documentId`), `verify_predicate` takes
381
+ `attesterId`, the `prove_*` tools accept an optional `attesterId` (the
382
+ record the claim is proven against), `anchor_document` is one plain attest
383
+ and returns `attesterId`.
384
+ - `prepare_anchor_commitment` and `commit_document_anchor` are gone: nothing
385
+ is left to guard, no identity can take over another attester's record.
386
+ - Local building needs `@odatano/nightgate-tx` >= 0.6.0; the proof calls
387
+ take `recordKey` or `payloadHash` (+ `attesterId`). Against a 0.23.x server
388
+ the verify calls fail with 400 (unknown parameter).
389
+
390
+ ## [0.5.1] - 2026-08-23
391
+
392
+ ### Added
393
+
394
+ - **32-slot vault.** Schema and opening take 16 or 32 entries, `allowedMask`
395
+ up to 32 bits, `k` up to 32; the vacuity guard is checked against the
396
+ schema instead of a fixed all-ones constant. Target it with
397
+ `compiledArtifactRef: 'attestation-vault-32'` (NIGHTGATE >= 0.19.0 for
398
+ width 32). A 16-slot setup keeps working against any 0.18.x server.
399
+ - Local ZK claims: field and document proofs can be built in-process.
400
+
401
+ ## [0.5.0] - 2026-08-19
402
+
403
+ ### Added
404
+
405
+ - **Parallel sponsoring channel:** `sponsor_unbound_transaction` with the
406
+ platform pool id (NIGHTGATE >= 0.18.0; 404 against older servers).
407
+ - **Local transaction building** for agents: `build_sponsorable_transaction`
408
+ and `get_attester_identity` via the optional `@odatano/nightgate-tx`
409
+ >= 0.2.0 txbuilder, driven by `NIGHTGATE_SEED_HEX` (never a tool argument).
410
+
411
+ ## [0.3.0] - 2026-08-16
412
+
413
+ ### Added
414
+
415
+ - Cross-root document proofs and guarded anchoring (`prepare_anchor_commitment`
416
+ / `commit_document_anchor`, removed again in 0.6.0).
417
+
418
+ ## [0.2.0] - 2026-08-10
419
+
420
+ ### Added
421
+
422
+ - Membership and equality proof tools; README documents the tool set and the
423
+ server compatibility table.
424
+
425
+ ## [0.1.0] - 2026-08-07
426
+
427
+ ### Added
428
+
429
+ - Initial MCP server: attestation, verification and job tools over the
430
+ NIGHTGATE OData API, agent-grant (`ngat_…`) or basic auth.