@shieldedtech/moth-tui 0.14.0-canary.20260919224808-41b4ef1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/CHANGELOG.md +0 -326
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shieldedtech/moth-tui",
|
|
3
|
-
"version": "0.14.0
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Terminal UI for Midnight Network wallet operations. USE AT YOUR OWN RISK. Experimental software provided AS-IS with no warranty. Not audited. For development and testing purposes only.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@midnight-ntwrk/ledger-v8": "8.1.0",
|
|
30
30
|
"@midnightntwrk/wallet-sdk": "^1.2.0",
|
|
31
|
-
"@shieldedtech/moth-wallet": "0.14.0
|
|
31
|
+
"@shieldedtech/moth-wallet": "^0.14.0",
|
|
32
32
|
"ink": "^7.0.1",
|
|
33
33
|
"ink-spinner": "^5.0.0",
|
|
34
34
|
"ink-text-input": "^6.0.0",
|
|
@@ -39,4 +39,4 @@
|
|
|
39
39
|
"typescript": "^5.5.0",
|
|
40
40
|
"vitest": "^3.1.0"
|
|
41
41
|
}
|
|
42
|
-
}
|
|
42
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
# @shieldedtech/moth-tui
|
|
2
|
-
|
|
3
|
-
## 0.14.0-canary.20260919224808-41b4ef1
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Updated dependencies [3b39fb6]
|
|
8
|
-
- Updated dependencies [3b39fb6]
|
|
9
|
-
- Updated dependencies [3b39fb6]
|
|
10
|
-
- Updated dependencies [55a878c]
|
|
11
|
-
- Updated dependencies [77edf22]
|
|
12
|
-
- Updated dependencies [aa3c276]
|
|
13
|
-
- Updated dependencies [19a1a23]
|
|
14
|
-
- @shieldedtech/moth-wallet@0.14.0-canary.20260919224808-41b4ef1
|
|
15
|
-
|
|
16
|
-
## 0.13.0
|
|
17
|
-
|
|
18
|
-
### Patch Changes
|
|
19
|
-
|
|
20
|
-
- b49c96d: Give the CLI and TUI the pre-seed, timings and DUST-registration behaviour the
|
|
21
|
-
extension already had.
|
|
22
|
-
|
|
23
|
-
**Birthdays.** `chainTip` moves from the extension's background handlers into
|
|
24
|
-
core, and `wallet generate` on both surfaces records the chain tip as the new
|
|
25
|
-
wallet's birthday. Without one the `reference.height <= birthday` guard can never
|
|
26
|
-
pass, so no CLI or TUI wallet could ever be pre-seeded — the difference between
|
|
27
|
-
29.3s and 78.6 min on preprod. Imports still get none, deliberately: a restored
|
|
28
|
-
wallet may hold funds at any height, and seeding it past its own history would
|
|
29
|
-
lose them silently.
|
|
30
|
-
|
|
31
|
-
**`moth preseed status|refresh|build`.** Thin wrappers over core functions
|
|
32
|
-
that already existed but had no caller outside the extension. `refresh` is the
|
|
33
|
-
one worth having — 9.1s to catch a reference up, against 53.6 min to rebuild it
|
|
34
|
-
from genesis, which is what someone does by hand when the command is missing.
|
|
35
|
-
`build` says how long it will take before starting, because an unattended command
|
|
36
|
-
that appears to hang for an hour is indistinguishable from a broken one.
|
|
37
|
-
|
|
38
|
-
**Phase timings on disk.** `createFileTimingStore` backs the existing
|
|
39
|
-
storage-agnostic recorder with `~/.moth/timings.json` — the path
|
|
40
|
-
`docs/BENCHMARKING.md` already documented and nothing wrote. `moth diagnostics
|
|
41
|
-
timings` shows the timeline as deltas, and recording stays off until switched on.
|
|
42
|
-
A headless sync is where this matters most: it is the surface with no other
|
|
43
|
-
signal about where the time went.
|
|
44
|
-
|
|
45
|
-
**DUST registration in the TUI.** `DustRegistrationNotYetError` is now caught
|
|
46
|
-
distinctly, so a wallet whose NIGHT is too new to cover the registration fee is
|
|
47
|
-
told "not yet" instead of shown the raw SDK error as a failure. The panel and the
|
|
48
|
-
CLI already did this; the TUI was the surface still reporting it as a defect.
|
|
49
|
-
- eb4d56a: **The extension can restore an account from a raw hex seed.** Previously it
|
|
50
|
-
accepted a 24-word phrase and nothing else, which made accounts created from a
|
|
51
|
-
seed permanently unreachable there.
|
|
52
|
-
|
|
53
|
-
That was not a policy — a wallet created from a hex seed **has no mnemonic and
|
|
54
|
-
can never be given one**, because BIP-39's phrase-to-seed step is a one-way KDF.
|
|
55
|
-
There was nothing to type into the word grid. Meanwhile the TUI
|
|
56
|
-
(`tui/src/app.tsx`) and the CLI (`moth wallet import --seed-hex`) both had the
|
|
57
|
-
path, and the extension's own session model is seed-based end to end: it derives
|
|
58
|
-
`seedHex` at unlock and carries it through every operation. A mnemonic was only
|
|
59
|
-
ever a transport format for the seed, and the extension accepted just that one
|
|
60
|
-
format at the door.
|
|
61
|
-
|
|
62
|
-
The plumbing was the only thing missing. `wallets` in the browser facade *is* a
|
|
63
|
-
`WalletManager`, so `importFromSeed` was already callable from the offscreen
|
|
64
|
-
document; `unlock` already handled a `seed:` keystore. `ImportWalletRequest` is
|
|
65
|
-
now a union — exactly one of `mnemonic` / `seed`, enforced by the type rather
|
|
66
|
-
than a runtime check — threaded through the background/offscreen RPC, and the
|
|
67
|
-
offscreen host routes to whichever core call fits. The two stay separate calls,
|
|
68
|
-
not one with a branch: `import` runs the BIP-39 checksum, `importFromSeed`
|
|
69
|
-
shape-checks the hex.
|
|
70
|
-
|
|
71
|
-
The restore screen now offers both artifacts as tabs on one page. No
|
|
72
|
-
"which do you have?" step first: anyone restoring already knows which they hold,
|
|
73
|
-
so that step would cost a click and gather nothing.
|
|
74
|
-
|
|
75
|
-
**New in core: `wallet/hex-seed.ts`, and `importFromSeed` now validates.** It had
|
|
76
|
-
no validation whatsoever — a malformed seed reached the SDK and surfaced as a
|
|
77
|
-
bare `Invalid seed`, and a merely wrong-*length* seed was accepted outright,
|
|
78
|
-
silently producing a different wallet. `checkHexSeed` returns a machine-readable
|
|
79
|
-
problem so each surface can word it itself (the extension localises it; the CLI
|
|
80
|
-
and TUI use `describeHexSeedProblem`). The TUI and CLI inherit the fix.
|
|
81
|
-
|
|
82
|
-
**The validation is shaped around the fact that a hex seed has no checksum.**
|
|
83
|
-
Measured against the wallet SDK, `HDWallet.fromSeed` accepts any 16–64 byte
|
|
84
|
-
seed and refuses 15 or 65 — and every accepted length derives a *different*
|
|
85
|
-
wallet. So:
|
|
86
|
-
|
|
87
|
-
- change one character and there is **no error**, just a different, valid, empty
|
|
88
|
-
wallet;
|
|
89
|
-
- truncate a paste and the same is true;
|
|
90
|
-
- whereas one wrong word in a phrase fails `validateMnemonic`.
|
|
91
|
-
|
|
92
|
-
The bounds therefore match what the SDK actually accepts rather than a rule of
|
|
93
|
-
our own, with a test that fails if an SDK bump moves them. Lengths other than 32
|
|
94
|
-
or 64 bytes — the two sizes real tooling emits — are **warned about, not
|
|
95
|
-
refused**: a truncated paste looks exactly like a seed genuinely created at that
|
|
96
|
-
length, and refusing would lock such a wallet out. And the field is deliberately
|
|
97
|
-
**not** a password input: reading the seed back against a backup is the only
|
|
98
|
-
check available, so masking it would remove the sole defence.
|
|
99
|
-
|
|
100
|
-
Note those two sizes are not interchangeable. A 32-byte seed is what the Midnight
|
|
101
|
-
node toolkit and `moth wallet import --seed-hex` deal in; the 64-byte one is the
|
|
102
|
-
BIP-39 seed a phrase expands to, and what `exportSeedHex` returns for a
|
|
103
|
-
phrase-backed wallet. Truncating the latter to the former gives a different
|
|
104
|
-
wallet.
|
|
105
|
-
|
|
106
|
-
Restored accounts keep `createdHere: false` and no birthday, so they scan from
|
|
107
|
-
genesis — they may hold funds at any height, and seeding one past its own history
|
|
108
|
-
would hide them (ADR 0003, rule 4).
|
|
109
|
-
|
|
110
|
-
**The TUI's hex import was that validation.** `SeedEntryScreen` matched
|
|
111
|
-
`/^[0-9a-fA-F]{64}$/` and did it *before* `importFromSeed`, so core's new check
|
|
112
|
-
never ran and the screen refused every length the SDK accepts bar one — including
|
|
113
|
-
the 128-character seed this release teaches the extension to reveal. Round-trip
|
|
114
|
-
a phrase-backed account (extension → Accounts → Reveal → Hex seed) into the
|
|
115
|
-
TUI's hex import and it answered "Invalid hex seed. Must be exactly 64 hex
|
|
116
|
-
characters", while the CLI took the same string. The check now lives in
|
|
117
|
-
`tui/src/screens/onboarding/seed-input.ts` and delegates to `checkHexSeed`, so
|
|
118
|
-
the TUI inherits the bounds and the unusual-length warning instead of
|
|
119
|
-
re-deciding them; a test sweeps 16..64 bytes so the screen cannot silently drift
|
|
120
|
-
tighter than core again.
|
|
121
|
-
|
|
122
|
-
Also corrected: three places documented a BIP-39 seed as 64 hex characters. It is
|
|
123
|
-
128 — 64 hex characters is a 32-byte seed, a different artifact that derives a
|
|
124
|
-
different wallet. `core/src/sync/operations.ts` and two spots in
|
|
125
|
-
`docs/spec/wallet-service/05-key-management.md`. That claim is precisely what
|
|
126
|
-
would lead someone to write `length === 64` validation and reject the seeds this
|
|
127
|
-
app exports (#99).
|
|
128
|
-
|
|
129
|
-
Closes #98.
|
|
130
|
-
- 43eb678: Bound the Wallet State view's coin lists to what the terminal can show.
|
|
131
|
-
|
|
132
|
-
Observed on mainnet, where a shielded wallet holds far more coins than a test
|
|
133
|
-
wallet does. The itemised list ran past its own section and painted over the ones
|
|
134
|
-
beneath it, so the Unshielded and Dust sections printed lines like
|
|
135
|
-
|
|
136
|
-
```
|
|
137
|
-
▸ Unshielded Wallet
|
|
138
|
-
Ba29ed4a053c1ec576e7f7684832c062bebc5cf67c0a4a9242f4defebd4b112b94 522 (1 coin)
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
— that section's `Balance` label with a token row on top of it.
|
|
142
|
-
|
|
143
|
-
The cause is not formatting. Ink renders a frame in full and has no viewport, so a
|
|
144
|
-
frame taller than the terminal corrupts its redraw and lines overwrite one
|
|
145
|
-
another. `components/Select.tsx` already documents exactly this ("makes Ink
|
|
146
|
-
collapse the two lines onto one") and windows its list against `stdout.rows` to
|
|
147
|
-
avoid it; `StateView` had no equivalent and emitted a row per token plus a row per
|
|
148
|
-
coin, unbounded. `Label` pads with `padEnd` and never truncates, which is what
|
|
149
|
-
identifies the 2-character `Ba` as terminal overwrite rather than a truncation
|
|
150
|
-
bug — and why truncating the label would have fixed nothing.
|
|
151
|
-
|
|
152
|
-
Each block is now bounded as a whole, with the remainder reported:
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
Balance
|
|
156
|
-
29ed4a05…4b112b94 522 (1 coin)
|
|
157
|
-
… and 4,312 more
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Bounded as a whole because volume arrives from either direction — a wallet with
|
|
161
|
-
many tokens, or a token with many coins — and capping only the inner coin list
|
|
162
|
-
leaves the outer one unbounded. The rows are flattened into one list and one
|
|
163
|
-
budget covers them, so neither shape can overflow. The three sections split the
|
|
164
|
-
terminal's spare height; the `… and N more` line is counted against the budget it
|
|
165
|
-
belongs to.
|
|
166
|
-
|
|
167
|
-
Long token ids are now middle-elided to fit the terminal width. That is not only
|
|
168
|
-
cosmetic: at 80 columns a full 64-character id wrapped the header onto a second
|
|
169
|
-
line, which cost two rows where the budget assumed one.
|
|
170
|
-
|
|
171
|
-
`Dust` had the same unbounded shape and is fixed the same way, costing a
|
|
172
|
-
deregistered coin as two rows since it renders its `dtime` on a second line.
|
|
173
|
-
|
|
174
|
-
The row arithmetic lives in `utils/` as `flattenBalanceRows`, `windowRows`,
|
|
175
|
-
`truncateMiddle` and `balanceBudget`, unit-tested without rendering Ink.
|
|
176
|
-
- Updated dependencies [a17b719]
|
|
177
|
-
- Updated dependencies [b49c96d]
|
|
178
|
-
- Updated dependencies [f736ebd]
|
|
179
|
-
- Updated dependencies [b49c96d]
|
|
180
|
-
- Updated dependencies [0508a38]
|
|
181
|
-
- Updated dependencies [2dabc50]
|
|
182
|
-
- Updated dependencies [426b757]
|
|
183
|
-
- Updated dependencies [eb4d56a]
|
|
184
|
-
- Updated dependencies [3e131e2]
|
|
185
|
-
- Updated dependencies [9afd580]
|
|
186
|
-
- Updated dependencies [b49c96d]
|
|
187
|
-
- Updated dependencies [e31eaf8]
|
|
188
|
-
- Updated dependencies [c2f8b73]
|
|
189
|
-
- Updated dependencies [b49c96d]
|
|
190
|
-
- Updated dependencies [b49c96d]
|
|
191
|
-
- Updated dependencies [b49c96d]
|
|
192
|
-
- Updated dependencies [c1c462e]
|
|
193
|
-
- Updated dependencies [9be5669]
|
|
194
|
-
- Updated dependencies [ea1793d]
|
|
195
|
-
- Updated dependencies [316ca82]
|
|
196
|
-
- Updated dependencies [89f34aa]
|
|
197
|
-
- Updated dependencies [04f1aa4]
|
|
198
|
-
- @shieldedtech/moth-wallet@0.13.0
|
|
199
|
-
|
|
200
|
-
## 0.12.1
|
|
201
|
-
|
|
202
|
-
### Patch Changes
|
|
203
|
-
|
|
204
|
-
- bd8d41f: Fix the published TUI package to use a semver dependency range for `moth-wallet` so npm consumers can install it outside the Yarn workspace.
|
|
205
|
-
- @shieldedtech/moth-wallet@0.12.1
|
|
206
|
-
|
|
207
|
-
## 0.12.0
|
|
208
|
-
|
|
209
|
-
### Minor Changes
|
|
210
|
-
|
|
211
|
-
- ea15676: Coordinate the first public package release under the Moth package names.
|
|
212
|
-
|
|
213
|
-
This is a minor bump because no package has previously been published under the
|
|
214
|
-
new names. The release remains experimental and unsupported, so it stays below
|
|
215
|
-
1.0.0. Package names, CLI identifiers, environment variables, connector identity,
|
|
216
|
-
and local state paths are aligned before publication; no compatibility shim is
|
|
217
|
-
required for an unpublished package.
|
|
218
|
-
|
|
219
|
-
### Patch Changes
|
|
220
|
-
|
|
221
|
-
- Updated dependencies [be98f55]
|
|
222
|
-
- Updated dependencies [ea15676]
|
|
223
|
-
- @shieldedtech/moth-wallet@0.12.0
|
|
224
|
-
|
|
225
|
-
## 0.2.0
|
|
226
|
-
|
|
227
|
-
### Minor Changes
|
|
228
|
-
|
|
229
|
-
- 36cb067: Add selectable proof-server and local WASM proving across the core wallet, CLI,
|
|
230
|
-
terminal dashboard, browser extension, and dApp connector API.
|
|
231
|
-
- fc93b31: Add the opt-in daemon for sharing one live wallet between a long-running host
|
|
232
|
-
(the TUI dashboard or `moth daemon serve`) and CLI clients over an authenticated
|
|
233
|
-
Unix-socket or TCP RPC. The daemon owns the sync engine and spending keys;
|
|
234
|
-
clients route the build/balance/prove/sign/submit pipeline through it, so keys
|
|
235
|
-
never leave the host process. Adds the `moth daemon serve|transfer|call|deploy|
|
|
236
|
-
submit-tx|dust register|dust deregister|key gen|key list|key revoke|maintenance`
|
|
237
|
-
subcommands, API-key authentication with read/write scopes, an append-only audit
|
|
238
|
-
log, and an L3 confirmation queue (interactive modal, or headless auto-approve
|
|
239
|
-
gated behind an explicit flag + env var).
|
|
240
|
-
|
|
241
|
-
### Patch Changes
|
|
242
|
-
|
|
243
|
-
- b157dd2: Add the browser extension wallet and dApp connector workflow.
|
|
244
|
-
|
|
245
|
-
The wallet core now supports browser-safe persisted sync state, activity history,
|
|
246
|
-
message signing, staged transfer construction and submission, fee estimation,
|
|
247
|
-
and DUST and intent operations. Add the WXT side-panel extension and Connector
|
|
248
|
-
Lab mock dApp, expose the new APIs through the browser adapter, and keep the CLI
|
|
249
|
-
and TUI integrations compatible with asynchronous sync cache handling and the
|
|
250
|
-
Ink runtime.
|
|
251
|
-
|
|
252
|
-
- 003720d: Clear balances on wallet/network switch in the terminal dashboard.
|
|
253
|
-
|
|
254
|
-
`useBalance` reset with `{...prev}`, so switching or importing a wallet briefly
|
|
255
|
-
showed the previous wallet's balances, coins, and sync progress under the new
|
|
256
|
-
wallet's name until the new sync emitted. It now resets to the empty state on a
|
|
257
|
-
switch. There is no steady-state flicker, since the sync effect only re-runs
|
|
258
|
-
when the wallet keys, network, or wallet name change.
|
|
259
|
-
|
|
260
|
-
- b7e2f00: add local network support
|
|
261
|
-
- e431662: Count booked unshielded inputs in the TUI's Wallet State balances.
|
|
262
|
-
|
|
263
|
-
The core folds booked (pending) unshielded inputs into the balance it reports,
|
|
264
|
-
but the state view summed only the available coin list, so the TUI and the
|
|
265
|
-
extension showed different NIGHT totals for the same wallet — observed on
|
|
266
|
-
preprod as 5,423.9987 against 8,423.998700, a gap of exactly the three booked
|
|
267
|
-
coins. A token whose coins were all booked had no row at all and read as not
|
|
268
|
-
held, while the extension still listed it.
|
|
269
|
-
|
|
270
|
-
The fungible balance block now groups over both populations and marks booked
|
|
271
|
-
coins `[in flight]` beside the existing `[Registered for Dust]` flag, so the
|
|
272
|
-
booked portion is visible rather than hidden behind an opaque "Pending N coins"
|
|
273
|
-
count. The grouping moved to `utils/balance.ts` as `groupCoinsForDisplay`, where
|
|
274
|
-
the arithmetic is unit-tested without rendering Ink. Shielded is unchanged: its
|
|
275
|
-
pending also holds incoming coins, which would over-count receipts.
|
|
276
|
-
|
|
277
|
-
- 717639a: Show DUST in DUST, not in NIGHT units, in the TUI balance table.
|
|
278
|
-
|
|
279
|
-
`useBalance` formatted the DUST balance with `formatNight`, which divides by
|
|
280
|
-
10^6 (STARS per NIGHT). DUST is denominated in SPECKS, 10^15 per DUST, so every
|
|
281
|
-
figure the balance table has ever shown was too large by a factor of a billion —
|
|
282
|
-
and plausibly so, which is why it survived. Now uses `formatDustBalance`, which
|
|
283
|
-
core has exported all along.
|
|
284
|
-
|
|
285
|
-
Reported as #78, with the arithmetic worked through against `formatNight`'s
|
|
286
|
-
source. The same substitution was fixed separately in core's sync log line; this
|
|
287
|
-
is the other call site, and the one a user actually reads.
|
|
288
|
-
|
|
289
|
-
- e8b98da: Restore the TUI build after `SyncProgress` gained a required `slowest` field.
|
|
290
|
-
|
|
291
|
-
`overallSyncProgress` now reports which sub-wallet the percentage came from, so
|
|
292
|
-
the sync line can say "syncing 27% (dust)" instead of leaving a reader to guess
|
|
293
|
-
why it disagrees with a gauge showing shielded and unshielded at 100%. Making
|
|
294
|
-
`slowest` required was deliberate — an unlabelled percentage is the defect — but
|
|
295
|
-
two TUI literals construct `SyncProgress` by hand and were not updated, so
|
|
296
|
-
`packages/tui` stopped typechecking the moment that landed.
|
|
297
|
-
|
|
298
|
-
Both are cases where nothing is behind: the fallback used before any progress has
|
|
299
|
-
been reported, and a fully-synced test stub. Both take `slowest: null`.
|
|
300
|
-
|
|
301
|
-
- Updated dependencies [fc93b31]
|
|
302
|
-
- Updated dependencies [fc93b31]
|
|
303
|
-
- Updated dependencies [12881a3]
|
|
304
|
-
- Updated dependencies [b157dd2]
|
|
305
|
-
- Updated dependencies [c7d1ef7]
|
|
306
|
-
- Updated dependencies [36cb067]
|
|
307
|
-
- Updated dependencies [fc93b31]
|
|
308
|
-
- Updated dependencies [6f914fc]
|
|
309
|
-
- Updated dependencies [fc93b31]
|
|
310
|
-
- Updated dependencies [fc93b31]
|
|
311
|
-
- Updated dependencies [771338d]
|
|
312
|
-
- Updated dependencies [fc93b31]
|
|
313
|
-
- Updated dependencies [ba86b72]
|
|
314
|
-
- Updated dependencies [fc93b31]
|
|
315
|
-
- Updated dependencies [b7e2f00]
|
|
316
|
-
- Updated dependencies [1c597ff]
|
|
317
|
-
- Updated dependencies [24cb16c]
|
|
318
|
-
- Updated dependencies [0f9369f]
|
|
319
|
-
- Updated dependencies [bf49ced]
|
|
320
|
-
- Updated dependencies [0f197e2]
|
|
321
|
-
- Updated dependencies [1f69f66]
|
|
322
|
-
- Updated dependencies [fc93b31]
|
|
323
|
-
- Updated dependencies [6766583]
|
|
324
|
-
- Updated dependencies [fc93b31]
|
|
325
|
-
- Updated dependencies [2fde86f]
|
|
326
|
-
- @shieldedtech/moth-wallet@0.2.0
|