@tokamak-private-dapps/private-state-cli 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/commands/system.mjs +6 -0
- package/lib/private-state-cli-command-registry.mjs +11 -0
- package/lib/runtime.mjs +38 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 2.3.0 - 2026-05-20
|
|
6
|
+
|
|
7
|
+
- Added `help observer` to print the deployed public observer URL for the private-state monitoring
|
|
8
|
+
surface.
|
|
9
|
+
- Documented the deployed public observer in the monitoring audit packet and observability matrix.
|
|
10
|
+
|
|
5
11
|
## 2.2.1 - 2026-05-18
|
|
6
12
|
|
|
7
13
|
- Added `channel recover-workspace --source rpc --output-raw` to append raw JSON-RPC request and response history
|
package/commands/system.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertDoctorArgs,
|
|
3
3
|
assertGuideArgs,
|
|
4
|
+
assertObserverArgs,
|
|
4
5
|
assertInstallZkEvmArgs,
|
|
5
6
|
assertSetRpcArgs,
|
|
6
7
|
assertTransactionFeesArgs,
|
|
@@ -8,6 +9,7 @@ import {
|
|
|
8
9
|
assertUpdateArgs,
|
|
9
10
|
handleDoctor,
|
|
10
11
|
handleGuide,
|
|
12
|
+
handleObserver,
|
|
11
13
|
handleInstallZkEvm,
|
|
12
14
|
handleSetRpc,
|
|
13
15
|
handleTransactionFees,
|
|
@@ -41,6 +43,10 @@ export const systemCommands = Object.freeze({
|
|
|
41
43
|
assertGuideArgs(args);
|
|
42
44
|
await handleGuide({ args });
|
|
43
45
|
},
|
|
46
|
+
"help-observer": async (args) => {
|
|
47
|
+
assertObserverArgs(args);
|
|
48
|
+
handleObserver();
|
|
49
|
+
},
|
|
44
50
|
"help-transaction-fees": async (args) => {
|
|
45
51
|
assertTransactionFeesArgs(args);
|
|
46
52
|
const { network, provider, rpcUrl } = loadExplicitCommandRuntime(args);
|
|
@@ -329,6 +329,17 @@ export const PRIVATE_STATE_CLI_COMMANDS = Object.freeze([
|
|
|
329
329
|
usage: "optional --network, --channel-name, --account, and --wallet",
|
|
330
330
|
help: ["Does not accept --rpc-url and never writes RPC configuration"],
|
|
331
331
|
},
|
|
332
|
+
{
|
|
333
|
+
id: "help-observer",
|
|
334
|
+
display: "help observer",
|
|
335
|
+
description: "Show the deployed public observer URL.",
|
|
336
|
+
fields: [],
|
|
337
|
+
usage: "no options",
|
|
338
|
+
help: [
|
|
339
|
+
"Prints the deployed observer URL so terminals can present it as a clickable link",
|
|
340
|
+
"The observer is a public monitoring surface; it is not a wallet, key manager, or disclosure authority",
|
|
341
|
+
],
|
|
342
|
+
},
|
|
332
343
|
{
|
|
333
344
|
id: "help-transaction-fees",
|
|
334
345
|
display: "help transaction-fees",
|
package/lib/runtime.mjs
CHANGED
|
@@ -137,6 +137,7 @@ const PRIVATE_STATE_UNINSTALL_CONFIRMATION =
|
|
|
137
137
|
const ACTION_IMPACT_CONFIRMATION =
|
|
138
138
|
"I understand the public and private impact of this action";
|
|
139
139
|
const PRIVATE_STATE_CLI_PACKAGE_NAME = privateStateCliPackageJson.name;
|
|
140
|
+
const PRIVATE_STATE_OBSERVER_URL = "https://project-scw1r.vercel.app";
|
|
140
141
|
const GROTH16_PACKAGE_NAME = "@tokamak-private-dapps/groth16";
|
|
141
142
|
const TOKAMAK_ZKEVM_CLI_PACKAGE_NAME = "@tokamak-zk-evm/cli";
|
|
142
143
|
const WALLET_BACKUP_EXPORT_FORMAT = "tokamak-private-state-wallet-backup-export";
|
|
@@ -3078,6 +3079,18 @@ async function handleDoctor({ args }) {
|
|
|
3078
3079
|
}
|
|
3079
3080
|
}
|
|
3080
3081
|
|
|
3082
|
+
function handleObserver() {
|
|
3083
|
+
printJson({
|
|
3084
|
+
action: "observer",
|
|
3085
|
+
url: PRIVATE_STATE_OBSERVER_URL,
|
|
3086
|
+
scope: "Public monitoring observer for Tokamak Private App Channels and the private-state DApp.",
|
|
3087
|
+
notes: [
|
|
3088
|
+
"The observer helps users and reviewers inspect public monitoring surfaces.",
|
|
3089
|
+
"The observer does not receive wallet secrets, spending keys, viewing keys, or private note plaintext.",
|
|
3090
|
+
],
|
|
3091
|
+
});
|
|
3092
|
+
}
|
|
3093
|
+
|
|
3081
3094
|
function handleInvestigator() {
|
|
3082
3095
|
const htmlPath = resolveInvestigatorIndexPath();
|
|
3083
3096
|
const fileUrl = pathToFileURL(htmlPath).href;
|
|
@@ -10255,6 +10268,10 @@ function assertGuideArgs(args) {
|
|
|
10255
10268
|
assertAllowedCommandSchema(args, "help-guide");
|
|
10256
10269
|
}
|
|
10257
10270
|
|
|
10271
|
+
function assertObserverArgs(args) {
|
|
10272
|
+
assertAllowedCommandSchema(args, "help-observer");
|
|
10273
|
+
}
|
|
10274
|
+
|
|
10258
10275
|
function assertTransactionFeesArgs(args) {
|
|
10259
10276
|
assertAllowedCommandSchema(args, "help-transaction-fees");
|
|
10260
10277
|
}
|
|
@@ -11206,6 +11223,7 @@ function loadWalletCommandRuntime(args, { prepareArtifacts = false } = {}) {
|
|
|
11206
11223
|
const HUMAN_RESULT_RENDERERS = Object.freeze({
|
|
11207
11224
|
guide: printGuideHumanResult,
|
|
11208
11225
|
investigator: printInvestigatorHumanResult,
|
|
11226
|
+
observer: printObserverHumanResult,
|
|
11209
11227
|
"transaction-fees": printTransactionFeesHumanResult,
|
|
11210
11228
|
update: printUpdateHumanResult,
|
|
11211
11229
|
});
|
|
@@ -11288,6 +11306,24 @@ function printInvestigatorHumanResult(result) {
|
|
|
11288
11306
|
console.log(lines.join("\n"));
|
|
11289
11307
|
}
|
|
11290
11308
|
|
|
11309
|
+
function printObserverHumanResult(result) {
|
|
11310
|
+
const lines = [
|
|
11311
|
+
"Private-State Public Observer",
|
|
11312
|
+
`URL: ${formatHumanValue(result.url)}`,
|
|
11313
|
+
];
|
|
11314
|
+
if (result.scope) {
|
|
11315
|
+
lines.push(`Scope: ${formatHumanValue(result.scope)}`);
|
|
11316
|
+
}
|
|
11317
|
+
if (Array.isArray(result.notes) && result.notes.length > 0) {
|
|
11318
|
+
lines.push(
|
|
11319
|
+
"",
|
|
11320
|
+
"Notes",
|
|
11321
|
+
...result.notes.map((note) => `- ${note}`),
|
|
11322
|
+
);
|
|
11323
|
+
}
|
|
11324
|
+
console.log(lines.join("\n"));
|
|
11325
|
+
}
|
|
11326
|
+
|
|
11291
11327
|
function printTransactionFeesHumanResult(report) {
|
|
11292
11328
|
const lines = [
|
|
11293
11329
|
"Transaction Fees",
|
|
@@ -11700,6 +11736,7 @@ export {
|
|
|
11700
11736
|
assertUpdateArgs,
|
|
11701
11737
|
assertDoctorArgs,
|
|
11702
11738
|
assertGuideArgs,
|
|
11739
|
+
assertObserverArgs,
|
|
11703
11740
|
assertTransactionFeesArgs,
|
|
11704
11741
|
assertInvestigatorArgs,
|
|
11705
11742
|
assertAccountGetL1AddressArgs,
|
|
@@ -11733,6 +11770,7 @@ export {
|
|
|
11733
11770
|
handleUpdate,
|
|
11734
11771
|
handleDoctor,
|
|
11735
11772
|
handleGuide,
|
|
11773
|
+
handleObserver,
|
|
11736
11774
|
handleTransactionFees,
|
|
11737
11775
|
handleInvestigator,
|
|
11738
11776
|
handleAccountGetL1Address,
|
package/package.json
CHANGED