@needmoretruth/nmts-cli 0.52.0 → 0.52.1
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 +7 -0
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/dist/artifact-about.d.ts +1 -1
- package/dist/client-id.d.ts +1 -1
- package/dist/client-id.js +1 -1
- package/dist/product.d.ts +1 -1
- package/dist/product.js +1 -1
- package/dist/shared/lib/wallet/address-history.d.ts +12 -0
- package/dist/shared/lib/wallet/address-history.js +97 -31
- package/dist/wallet-sign-external.d.ts +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
Each version's entry is what changed for the person or the program using `nmts`. The product's own
|
|
4
4
|
update history, which covers the site and the server too, is at https://nmts.me/updates.
|
|
5
5
|
|
|
6
|
+
## 0.52.1 — 2026-11-07
|
|
7
|
+
|
|
8
|
+
- `nmts wallet activity` and `nmts wallet list` failed on mainnet from about 5 November: the Sui
|
|
9
|
+
nodes now refuse a transaction query that starts at the first checkpoint, and that refusal stopped
|
|
10
|
+
the command before Sui's GraphQL service was asked for the older history. A refused query is now
|
|
11
|
+
asked again from just inside the node's range, and the older history comes from GraphQL as before.
|
|
12
|
+
|
|
6
13
|
## 0.52.0 — 2026-10-24
|
|
7
14
|
|
|
8
15
|
- `nmts` talks to Sui over gRPC-web instead of JSON-RPC, which Sui retired in October 2026. The
|
package/README.ko.md
CHANGED
|
@@ -50,7 +50,7 @@ nmts --help
|
|
|
50
50
|
|
|
51
51
|
```sh
|
|
52
52
|
npm install -g github:needmoretruth/nmts-cli # 기본 브랜치
|
|
53
|
-
npm install -g github:needmoretruth/nmts-cli#v0.52.
|
|
53
|
+
npm install -g github:needmoretruth/nmts-cli#v0.52.1 # 버전을 고정할 때
|
|
54
54
|
npm install -g https://github.com/needmoretruth/nmts-cli/releases/latest/download/nmts.tgz
|
|
55
55
|
```
|
|
56
56
|
|
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ default branch, from a pinned version, or from the tarball attached to the
|
|
|
51
51
|
|
|
52
52
|
```sh
|
|
53
53
|
npm install -g github:needmoretruth/nmts-cli # the default branch
|
|
54
|
-
npm install -g github:needmoretruth/nmts-cli#v0.52.
|
|
54
|
+
npm install -g github:needmoretruth/nmts-cli#v0.52.1 # a pinned version
|
|
55
55
|
npm install -g https://github.com/needmoretruth/nmts-cli/releases/latest/download/nmts.tgz
|
|
56
56
|
```
|
|
57
57
|
|
package/dist/artifact-about.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare const CRYPTO_SPEC_URL = "https://github.com/needmoretruth/nmts-re
|
|
|
11
11
|
* is the field's own contract — what the writer says about itself — and a person holding two
|
|
12
12
|
* copies of one account's artefacts can then tell which program made each.
|
|
13
13
|
*/
|
|
14
|
-
export declare const WRITTEN_BY = "nmts-cli 0.52.
|
|
14
|
+
export declare const WRITTEN_BY = "nmts-cli 0.52.1";
|
|
15
15
|
/** Which of the three artefacts a wrapper is. A reader holding several can sort them. */
|
|
16
16
|
export type ArtifactKind = "recovery-list" | "file-list" | "recovery-kit";
|
|
17
17
|
/**
|
package/dist/client-id.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export type ClientKind = "cli" | "mcp" | "sdk";
|
|
|
7
7
|
* points with `"sdk"` and the SDK's own version.
|
|
8
8
|
*/
|
|
9
9
|
export declare function identifyClient(next: ClientKind, nextVersion?: string): void;
|
|
10
|
-
/** `cli/0.52.
|
|
10
|
+
/** `cli/0.52.1`, `mcp/0.52.1`, `sdk/0.17.0`. */
|
|
11
11
|
export declare function clientHeaderValue(): string;
|
package/dist/client-id.js
CHANGED
|
@@ -24,7 +24,7 @@ export function identifyClient(next, nextVersion = VERSION) {
|
|
|
24
24
|
kind = next;
|
|
25
25
|
version = nextVersion;
|
|
26
26
|
}
|
|
27
|
-
/** `cli/0.52.
|
|
27
|
+
/** `cli/0.52.1`, `mcp/0.52.1`, `sdk/0.17.0`. */
|
|
28
28
|
export function clientHeaderValue() {
|
|
29
29
|
return `${kind}/${version}`;
|
|
30
30
|
}
|
package/dist/product.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const BINARY_NAME = "nmts";
|
|
|
9
9
|
* beside it. Here rather than in `main.ts` because the MCP server has to say it too, and a
|
|
10
10
|
* command importing the entry point is a cycle waiting to bite.
|
|
11
11
|
*/
|
|
12
|
-
export declare const VERSION = "0.52.
|
|
12
|
+
export declare const VERSION = "0.52.1";
|
|
13
13
|
/** Where the product lives, for messages that need to send somebody somewhere real. */
|
|
14
14
|
export declare const HOME_URL = "https://nmts.me";
|
|
15
15
|
/** The source, so a person holding only the built program can find what it was built from. */
|
package/dist/product.js
CHANGED
|
@@ -18,7 +18,7 @@ export const BINARY_NAME = "nmts";
|
|
|
18
18
|
* beside it. Here rather than in `main.ts` because the MCP server has to say it too, and a
|
|
19
19
|
* command importing the entry point is a cycle waiting to bite.
|
|
20
20
|
*/
|
|
21
|
-
export const VERSION = "0.52.
|
|
21
|
+
export const VERSION = "0.52.1";
|
|
22
22
|
/** Where the product lives, for messages that need to send somebody somewhere real. */
|
|
23
23
|
export const HOME_URL = "https://nmts.me";
|
|
24
24
|
/** The source, so a person holding only the built program can find what it was built from. */
|
|
@@ -20,6 +20,18 @@ export type DeeperHistory = (address: string, limit: number, signal?: AbortSigna
|
|
|
20
20
|
* here leaves the answer `complete: false`, never "nothing there".
|
|
21
21
|
*/
|
|
22
22
|
export declare const SUI_GRAPHQL_URLS: Readonly<Record<"mainnet" | "testnet", string>>;
|
|
23
|
+
/**
|
|
24
|
+
* How far above a node's lowest checkpoint a read starts. Mainnet seals about four checkpoints a
|
|
25
|
+
* second, so 20,000 is over an hour of the node pruning before the start falls out of its window
|
|
26
|
+
* again — and a refusal then simply moves it up (same margin as the chain service's gift reader).
|
|
27
|
+
*/
|
|
28
|
+
export declare const WINDOW_MARGIN = 20000n;
|
|
29
|
+
/**
|
|
30
|
+
* The lowest checkpoint a node said it holds, read from its refusal, or `null` for any other error.
|
|
31
|
+
* Suiscan and Mysten Labs both answered `requested data below earliest available; lowest available
|
|
32
|
+
* checkpoint is <n>` on 2026-11-07.
|
|
33
|
+
*/
|
|
34
|
+
export declare function lowestAvailable(e: unknown): bigint | null;
|
|
23
35
|
/**
|
|
24
36
|
* The newest transactions that moved `address`'s state, newest first.
|
|
25
37
|
*
|
|
@@ -20,6 +20,15 @@
|
|
|
20
20
|
// filter back to 2023 on both networks; its rows are read by the SAME parser as the node's (its
|
|
21
21
|
// `transactionJson` and `balanceChangesJson` are the gRPC messages written as JSON).
|
|
22
22
|
//
|
|
23
|
+
// ⛔ A REQUEST WITHOUT A START IS REFUSED (measured 2026-11-07). `ListTransactions` without
|
|
24
|
+
// `startCheckpoint` starts at genesis, and since about 2026-11-05 both Suiscan and Mysten Labs refuse
|
|
25
|
+
// that outright — "requested data below earliest available; lowest available checkpoint is <n>" —
|
|
26
|
+
// instead of stopping quietly at their window's edge. Every wallet walk and activity list then
|
|
27
|
+
// failed on Suiscan, and on Mysten for any address idle for a few weeks, before the deeper source
|
|
28
|
+
// was ever asked. So a refused read is sent again from a little above the checkpoint the refusal
|
|
29
|
+
// names, that floor is remembered per network, and the scan then ends at that start, which is the
|
|
30
|
+
// window's edge: what lies below it is the deeper source's to answer.
|
|
31
|
+
//
|
|
23
32
|
// ⛔ A SCAN THAT STOPPED SHORT IS NOT "NOTHING THERE". The node also bounds how much of its index one
|
|
24
33
|
// request reads; a request can end with fewer items than asked — even none — and say it stopped
|
|
25
34
|
// because of that bound (`SCAN_LIMIT`). This file follows the cursor for a bounded number of
|
|
@@ -41,6 +50,42 @@ export const SUI_GRAPHQL_URLS = {
|
|
|
41
50
|
};
|
|
42
51
|
/** How many requests one question may take before it answers with what it has. */
|
|
43
52
|
const MAX_REQUESTS = 8;
|
|
53
|
+
/**
|
|
54
|
+
* How far above a node's lowest checkpoint a read starts. Mainnet seals about four checkpoints a
|
|
55
|
+
* second, so 20,000 is over an hour of the node pruning before the start falls out of its window
|
|
56
|
+
* again — and a refusal then simply moves it up (same margin as the chain service's gift reader).
|
|
57
|
+
*/
|
|
58
|
+
export const WINDOW_MARGIN = 20000n;
|
|
59
|
+
/** Refusals answered by moving the start up before the read counts as failed. */
|
|
60
|
+
const MAX_WINDOW_RETRIES = 2;
|
|
61
|
+
// The lowest checkpoint a node has named in a refusal, per network (or per client when it names none,
|
|
62
|
+
// as a test's fake does). Remembered so a page that asks many times pays the refusal once.
|
|
63
|
+
const floorByNetwork = new Map();
|
|
64
|
+
const floorByClient = new WeakMap();
|
|
65
|
+
function networkOf(client) {
|
|
66
|
+
return "network" in client && typeof client.network === "string" ? client.network : undefined;
|
|
67
|
+
}
|
|
68
|
+
function knownFloor(client) {
|
|
69
|
+
const network = networkOf(client);
|
|
70
|
+
return network === undefined ? floorByClient.get(client) : floorByNetwork.get(network);
|
|
71
|
+
}
|
|
72
|
+
function rememberFloor(client, floor) {
|
|
73
|
+
const network = networkOf(client);
|
|
74
|
+
if (network === undefined)
|
|
75
|
+
floorByClient.set(client, floor);
|
|
76
|
+
else
|
|
77
|
+
floorByNetwork.set(network, floor);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The lowest checkpoint a node said it holds, read from its refusal, or `null` for any other error.
|
|
81
|
+
* Suiscan and Mysten Labs both answered `requested data below earliest available; lowest available
|
|
82
|
+
* checkpoint is <n>` on 2026-11-07.
|
|
83
|
+
*/
|
|
84
|
+
export function lowestAvailable(e) {
|
|
85
|
+
const message = e instanceof Error ? e.message : typeof e === "string" ? e : "";
|
|
86
|
+
const found = /lowest available checkpoint is (\d{1,20})/.exec(message);
|
|
87
|
+
return found === null || found[1] === undefined ? null : BigInt(found[1]);
|
|
88
|
+
}
|
|
44
89
|
/** The fields the parser reads for `{ transaction, balanceChanges }` (the SDK's own read mask, by name). */
|
|
45
90
|
const READ_MASK = [
|
|
46
91
|
"digest",
|
|
@@ -59,41 +104,62 @@ async function recentTransactions(client, address, limit, signal) {
|
|
|
59
104
|
const transactions = [];
|
|
60
105
|
let before;
|
|
61
106
|
for (let request = 0; request < MAX_REQUESTS; request += 1) {
|
|
62
|
-
const call = client.ledgerService.listTransactions({
|
|
63
|
-
readMask: { paths: READ_MASK },
|
|
64
|
-
filter: {
|
|
65
|
-
terms: [
|
|
66
|
-
{
|
|
67
|
-
literals: [
|
|
68
|
-
{ negated: false, predicate: { oneofKind: "affectedAddress", affectedAddress: { address } } },
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
options: {
|
|
74
|
-
limit: limit - transactions.length,
|
|
75
|
-
ordering: GrpcTypes.Ordering.DESCENDING,
|
|
76
|
-
...(before === undefined ? {} : { before }),
|
|
77
|
-
},
|
|
78
|
-
}, signal === undefined ? {} : { abort: signal });
|
|
79
107
|
let frontier;
|
|
80
108
|
let reachedCheckpoint;
|
|
81
109
|
let reason;
|
|
82
|
-
for
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
110
|
+
for (let attempt = 0;; attempt += 1) {
|
|
111
|
+
const floor = knownFloor(client);
|
|
112
|
+
const startCheckpoint = floor === undefined ? undefined : floor + WINDOW_MARGIN;
|
|
113
|
+
// Rows of one attempt are kept only if the attempt finishes: a refusal mid-stream adds nothing.
|
|
114
|
+
const rows = [];
|
|
115
|
+
frontier = undefined;
|
|
116
|
+
reachedCheckpoint = undefined;
|
|
117
|
+
reason = undefined;
|
|
118
|
+
try {
|
|
119
|
+
const call = client.ledgerService.listTransactions({
|
|
120
|
+
...(startCheckpoint === undefined ? {} : { startCheckpoint }),
|
|
121
|
+
readMask: { paths: READ_MASK },
|
|
122
|
+
filter: {
|
|
123
|
+
terms: [
|
|
124
|
+
{
|
|
125
|
+
literals: [
|
|
126
|
+
{ negated: false, predicate: { oneofKind: "affectedAddress", affectedAddress: { address } } },
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
options: {
|
|
132
|
+
limit: limit - transactions.length,
|
|
133
|
+
ordering: GrpcTypes.Ordering.DESCENDING,
|
|
134
|
+
...(before === undefined ? {} : { before }),
|
|
135
|
+
},
|
|
136
|
+
}, signal === undefined ? {} : { abort: signal });
|
|
137
|
+
for await (const frame of call.responses) {
|
|
138
|
+
if (frame.watermark?.cursor !== undefined)
|
|
139
|
+
frontier = frame.watermark.cursor;
|
|
140
|
+
if (frame.watermark?.checkpoint !== undefined)
|
|
141
|
+
reachedCheckpoint = frame.watermark.checkpoint;
|
|
142
|
+
if (frame.transaction !== undefined && transactions.length + rows.length < limit) {
|
|
143
|
+
const parsed = parseGrpcTransactionResponse(frame.transaction, {
|
|
144
|
+
include: { transaction: true, balanceChanges: true },
|
|
145
|
+
});
|
|
146
|
+
const tx = parsed.Transaction ?? parsed.FailedTransaction;
|
|
147
|
+
if (tx !== undefined)
|
|
148
|
+
rows.push(tx);
|
|
149
|
+
}
|
|
150
|
+
if (frame.end !== undefined)
|
|
151
|
+
reason = frame.end.reason;
|
|
152
|
+
}
|
|
153
|
+
transactions.push(...rows);
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
catch (e) {
|
|
157
|
+
const lowest = lowestAvailable(e);
|
|
158
|
+
// Anything else is a real failure, and so is a window that keeps moving past a fresh floor.
|
|
159
|
+
if (lowest === null || attempt >= MAX_WINDOW_RETRIES)
|
|
160
|
+
throw e;
|
|
161
|
+
rememberFloor(client, lowest);
|
|
94
162
|
}
|
|
95
|
-
if (frame.end !== undefined)
|
|
96
|
-
reason = frame.end.reason;
|
|
97
163
|
}
|
|
98
164
|
if (transactions.length >= limit)
|
|
99
165
|
return { transactions, fromGenesis: true };
|
|
@@ -11,7 +11,7 @@ export interface SignedTransaction {
|
|
|
11
11
|
/**
|
|
12
12
|
* The wallet that pays, from outside this tool.
|
|
13
13
|
*
|
|
14
|
-
* ⚠ THE SHAPE IS THE WALLET STANDARD'S, so a page hands over what `
|
|
14
|
+
* ⚠ THE SHAPE IS THE WALLET STANDARD'S, so a page hands over what `useDAppKit().signTransaction()` gives it
|
|
15
15
|
* and a server hands over whatever signs for the person whose storage this is.
|
|
16
16
|
*/
|
|
17
17
|
export interface ExternalPayer {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needmoretruth/nmts-cli",
|
|
3
|
-
"version": "0.52.
|
|
3
|
+
"version": "0.52.1",
|
|
4
4
|
"description": "Command-line and MCP access to NMTS (NeedMoreTruthStorage, https://nmts.me): open-source, end-to-end encrypted storage on the Walrus network. No fee to NMTS; you pay the network from your own wallet. For people and for their agents.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"publishConfig": {
|
package/server.json
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
"url": "https://github.com/needmoretruth/nmts-cli",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.52.
|
|
9
|
+
"version": "0.52.1",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
14
14
|
"identifier": "@needmoretruth/nmts-cli",
|
|
15
|
-
"version": "0.52.
|
|
15
|
+
"version": "0.52.1",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|