@odatano/nightgate-mcp 0.18.1 → 0.18.3

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