@odatano/nightgate-mcp 0.18.0 → 0.18.2

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