@hsuite/smart-engines-cli 1.0.3 → 1.1.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/dist/__tests__/helpers/fixtures.d.ts +48 -0
- package/dist/__tests__/helpers/fixtures.d.ts.map +1 -0
- package/dist/__tests__/helpers/fixtures.js +79 -0
- package/dist/__tests__/helpers/fixtures.js.map +1 -0
- package/dist/_lib/cluster.d.ts +12 -0
- package/dist/_lib/cluster.d.ts.map +1 -0
- package/dist/_lib/cluster.js +45 -0
- package/dist/_lib/cluster.js.map +1 -0
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +19 -7
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/governance.d.ts +42 -0
- package/dist/commands/governance.d.ts.map +1 -0
- package/dist/commands/governance.js +144 -0
- package/dist/commands/governance.js.map +1 -0
- package/dist/commands/hist-balance.d.ts +52 -0
- package/dist/commands/hist-balance.d.ts.map +1 -0
- package/dist/commands/hist-balance.js +134 -0
- package/dist/commands/hist-balance.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +2 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/personhood.d.ts +42 -0
- package/dist/commands/personhood.d.ts.map +1 -0
- package/dist/commands/personhood.js +150 -0
- package/dist/commands/personhood.js.map +1 -0
- package/dist/commands/subscribe.d.ts.map +1 -1
- package/dist/commands/subscribe.js +25 -6
- package/dist/commands/subscribe.js.map +1 -1
- package/dist/commands/verify.d.ts +43 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +231 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.verifyCommand = void 0;
|
|
7
|
+
exports.buildVerifyCommand = buildVerifyCommand;
|
|
8
|
+
/**
|
|
9
|
+
* `hsuite verify` — verify a PQC attestation cert against a payload.
|
|
10
|
+
*
|
|
11
|
+
* PR 11.1 — Arc 11 (external-verifier surface). Thin Commander wrapper
|
|
12
|
+
* around `verifyPqcAttestation` from `@hsuite/smart-engines-sdk/pqc-verify`
|
|
13
|
+
* (PR 11.0). Three invocation modes:
|
|
14
|
+
*
|
|
15
|
+
* - Direct verify:
|
|
16
|
+
* hsuite verify --cert <cert.json> --payload <payload.json>
|
|
17
|
+
*
|
|
18
|
+
* - Fetch-then-verify via smart-host proxy (PR #820):
|
|
19
|
+
* hsuite verify --topic-msg <consumer>/<contentHash> --payload <p.json>
|
|
20
|
+
*
|
|
21
|
+
* The proxy endpoint is `GET /api/pqc-attestation/<consumer>/<contentHash>`
|
|
22
|
+
* (apps/smart-host/src/pqc-proxy/pqc-attestation-proxy.controller.ts:35),
|
|
23
|
+
* keyed by `(consumer, contentHash)` — NOT a Hedera topic-message id.
|
|
24
|
+
* The flag name follows the design spec (§4.2) for customer-facing
|
|
25
|
+
* parity; the value is the consumer/contentHash slug the proxy actually
|
|
26
|
+
* accepts.
|
|
27
|
+
*
|
|
28
|
+
* - Help: hsuite verify --help
|
|
29
|
+
*
|
|
30
|
+
* Exit codes:
|
|
31
|
+
* 0 cert valid (threshold met)
|
|
32
|
+
* 1 cert invalid (specific reason printed to stderr) OR usage error
|
|
33
|
+
* 2 network / fetch error (only possible in --topic-msg mode)
|
|
34
|
+
*
|
|
35
|
+
* @see docs/superpowers/specs/2026-05-27-pqc-arc11-external-verifier-design.md §4.2
|
|
36
|
+
* @see docs/superpowers/plans/2026-05-27-pqc-arc11-external-verifier-plan.md PR 11.1
|
|
37
|
+
*/
|
|
38
|
+
const commander_1 = require("commander");
|
|
39
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
40
|
+
const fs_1 = require("fs");
|
|
41
|
+
const path_1 = require("path");
|
|
42
|
+
const pqc_verify_1 = require("@hsuite/smart-engines-sdk/pqc-verify");
|
|
43
|
+
const cluster_1 = require("../_lib/cluster");
|
|
44
|
+
/**
|
|
45
|
+
* Slug shape for `--topic-msg`. Matches the proxy controller's two
|
|
46
|
+
* Param() regexes (CONSUMER_RE + HASH_RE in pqc-attestation-proxy.service.ts).
|
|
47
|
+
* Surfacing the parse failure as a usage error (exit 1) rather than a fetch
|
|
48
|
+
* error so the developer fixes the input, not their connectivity.
|
|
49
|
+
*/
|
|
50
|
+
const TOPIC_MSG_SLUG_RE = /^([a-z][a-z0-9-]{0,63})\/([a-f0-9]{64})$/;
|
|
51
|
+
function readJsonFile(label, p) {
|
|
52
|
+
const abs = (0, path_1.resolve)(p);
|
|
53
|
+
if (!(0, fs_1.existsSync)(abs)) {
|
|
54
|
+
throw new Error(`${label} file not found: ${abs}`);
|
|
55
|
+
}
|
|
56
|
+
const raw = (0, fs_1.readFileSync)(abs, 'utf8');
|
|
57
|
+
try {
|
|
58
|
+
return JSON.parse(raw);
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
throw new Error(`${label} file is not valid JSON: ${err.message}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Map the verifier's machine-readable `reason` codes (e.g. `content-hash-mismatch`,
|
|
66
|
+
* `threshold-not-met`, `schema-invalid: <detail>`) to the human strings the CLI
|
|
67
|
+
* surfaces. The exit code is the contract; the wording is a developer-facing
|
|
68
|
+
* affordance, so we humanize "content-hash-mismatch" → "content-hash mismatch"
|
|
69
|
+
* and strip the verifier's debug suffix (computed=/cert=/verified=/required=).
|
|
70
|
+
*/
|
|
71
|
+
function humanizeReason(reason) {
|
|
72
|
+
if (!reason)
|
|
73
|
+
return 'unknown';
|
|
74
|
+
// Strip trailing debug suffix after first ": " — keeps the kind, drops detail.
|
|
75
|
+
const head = reason.split(': ')[0];
|
|
76
|
+
// content-hash-mismatch → content-hash mismatch
|
|
77
|
+
if (head === 'content-hash-mismatch')
|
|
78
|
+
return 'content-hash mismatch';
|
|
79
|
+
// threshold-not-met → threshold not met
|
|
80
|
+
if (head === 'threshold-not-met')
|
|
81
|
+
return 'threshold not met';
|
|
82
|
+
// schema-invalid → schema invalid (preserve original detail when present)
|
|
83
|
+
if (head === 'schema-invalid') {
|
|
84
|
+
const detail = reason.slice('schema-invalid'.length);
|
|
85
|
+
return `schema invalid${detail}`;
|
|
86
|
+
}
|
|
87
|
+
// payload-canonicalization-failed → payload canonicalization failed
|
|
88
|
+
if (head === 'payload-canonicalization-failed') {
|
|
89
|
+
return 'payload canonicalization failed';
|
|
90
|
+
}
|
|
91
|
+
// registry-* → registry <rest>
|
|
92
|
+
if (head.startsWith('registry-')) {
|
|
93
|
+
return head.replace(/^registry-/, 'registry ').replace(/-/g, ' ');
|
|
94
|
+
}
|
|
95
|
+
// Fallback: hyphens → spaces, keep detail.
|
|
96
|
+
return reason.replace(/-/g, ' ');
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Fetch a cert from the smart-host proxy. Throws on transport / 5xx;
|
|
100
|
+
* returns `null` on a missing cert (404 OR `cert: null` payload OR
|
|
101
|
+
* `status: 'pending' | 'missing'` envelope).
|
|
102
|
+
*/
|
|
103
|
+
async function fetchCertFromProxy(args) {
|
|
104
|
+
const base = args.server.replace(/\/+$/, '');
|
|
105
|
+
const url = `${base}/api/pqc-attestation/${args.consumer}/${args.contentHash}`;
|
|
106
|
+
const resp = await fetch(url);
|
|
107
|
+
if (resp.status === 404)
|
|
108
|
+
return null;
|
|
109
|
+
if (!resp.ok) {
|
|
110
|
+
throw new Error(`smart-host proxy returned HTTP ${resp.status}`);
|
|
111
|
+
}
|
|
112
|
+
const body = (await resp.json());
|
|
113
|
+
if (body.status && body.status !== 'valid')
|
|
114
|
+
return null;
|
|
115
|
+
return body.cert ?? null;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Build a fresh `verify` Command. Commander Command instances accumulate
|
|
119
|
+
* parsed-option state across `parseAsync` calls, so tests build their own
|
|
120
|
+
* via this factory to isolate runs; the bin entrypoint calls it once.
|
|
121
|
+
*/
|
|
122
|
+
function buildVerifyCommand() {
|
|
123
|
+
const cmd = new commander_1.Command('verify')
|
|
124
|
+
.description('Verify a PQC attestation cert against a payload (direct or via smart-host proxy)')
|
|
125
|
+
.option('--cert <path>', 'Path to the PQC cert JSON file (direct-verify mode)')
|
|
126
|
+
.option('--topic-msg <consumer/contentHash>', 'Fetch the cert via smart-host proxy at /api/pqc-attestation/<consumer>/<contentHash> then verify')
|
|
127
|
+
.option('--payload <path>', 'Path to the JSON payload to verify against')
|
|
128
|
+
.option('--server <url>', 'Smart-host base URL for --topic-msg mode (default: $SMART_HOST_URL / $VALIDATOR_URL / public testnet)')
|
|
129
|
+
.addHelpText('after', `
|
|
130
|
+
Examples:
|
|
131
|
+
hsuite verify --cert ./cert.json --payload ./payload.json
|
|
132
|
+
hsuite verify --topic-msg license-envelope/abc...def --payload ./payload.json
|
|
133
|
+
|
|
134
|
+
Exit codes:
|
|
135
|
+
0 cert valid (threshold met)
|
|
136
|
+
1 cert invalid (with reason on stderr) OR usage error
|
|
137
|
+
2 network / fetch error (only in --topic-msg mode)
|
|
138
|
+
`)
|
|
139
|
+
.action(async (opts) => {
|
|
140
|
+
// ── Flag validation ───────────────────────────────────────────────────
|
|
141
|
+
if (!opts.payload) {
|
|
142
|
+
console.error(chalk_1.default.red(' --payload is required\n'));
|
|
143
|
+
cmd.outputHelp();
|
|
144
|
+
process.exit(1);
|
|
145
|
+
}
|
|
146
|
+
const haveCert = !!opts.cert;
|
|
147
|
+
const haveTopicMsg = !!opts.topicMsg;
|
|
148
|
+
if (!haveCert && !haveTopicMsg) {
|
|
149
|
+
console.error(chalk_1.default.red(' one of --cert or --topic-msg is required\n'));
|
|
150
|
+
cmd.outputHelp();
|
|
151
|
+
process.exit(1);
|
|
152
|
+
}
|
|
153
|
+
if (haveCert && haveTopicMsg) {
|
|
154
|
+
console.error(chalk_1.default.red(' --cert and --topic-msg are mutually exclusive\n'));
|
|
155
|
+
cmd.outputHelp();
|
|
156
|
+
process.exit(1);
|
|
157
|
+
}
|
|
158
|
+
// ── Load payload (both modes) ─────────────────────────────────────────
|
|
159
|
+
let payload;
|
|
160
|
+
try {
|
|
161
|
+
payload = readJsonFile('payload', opts.payload);
|
|
162
|
+
}
|
|
163
|
+
catch (err) {
|
|
164
|
+
console.error(chalk_1.default.red(` ${err.message}\n`));
|
|
165
|
+
process.exit(1);
|
|
166
|
+
}
|
|
167
|
+
// ── Resolve cert (direct or proxy-fetched) ────────────────────────────
|
|
168
|
+
let cert;
|
|
169
|
+
if (haveCert) {
|
|
170
|
+
try {
|
|
171
|
+
cert = readJsonFile('cert', opts.cert);
|
|
172
|
+
}
|
|
173
|
+
catch (err) {
|
|
174
|
+
console.error(chalk_1.default.red(` ${err.message}\n`));
|
|
175
|
+
process.exit(1);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
const slugMatch = TOPIC_MSG_SLUG_RE.exec(opts.topicMsg);
|
|
180
|
+
if (!slugMatch) {
|
|
181
|
+
console.error(chalk_1.default.red(' --topic-msg must be "<consumer>/<contentHash>" where consumer matches /^[a-z][a-z0-9-]{0,63}$/ and contentHash is 64 hex chars\n'));
|
|
182
|
+
process.exit(1);
|
|
183
|
+
}
|
|
184
|
+
const [, consumer, contentHash] = slugMatch;
|
|
185
|
+
const server = opts.server ??
|
|
186
|
+
process.env.SMART_HOST_URL ??
|
|
187
|
+
process.env.VALIDATOR_URL ??
|
|
188
|
+
cluster_1.DEFAULT_GATEWAY;
|
|
189
|
+
try {
|
|
190
|
+
const fetched = await fetchCertFromProxy({
|
|
191
|
+
server,
|
|
192
|
+
consumer,
|
|
193
|
+
contentHash,
|
|
194
|
+
});
|
|
195
|
+
if (fetched === null) {
|
|
196
|
+
console.error(chalk_1.default.red(' Cert not found on platform\n'));
|
|
197
|
+
process.exit(2);
|
|
198
|
+
}
|
|
199
|
+
cert = fetched;
|
|
200
|
+
}
|
|
201
|
+
catch (err) {
|
|
202
|
+
console.error(chalk_1.default.red(` Network error: ${err.message}\n`));
|
|
203
|
+
process.exit(2);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
// ── Verify ────────────────────────────────────────────────────────────
|
|
207
|
+
const result = await (0, pqc_verify_1.verifyPqcAttestation)(cert, payload);
|
|
208
|
+
if (result.valid) {
|
|
209
|
+
const n = result.verifiedSignerCount ?? 0;
|
|
210
|
+
// `signers.length` is on the cert (already schema-validated by
|
|
211
|
+
// verifyPqcAttestation). We pull it back out for the "N of M"
|
|
212
|
+
// diagnostic without re-parsing.
|
|
213
|
+
const m = Array.isArray(cert.signers)
|
|
214
|
+
? (cert.signers.length)
|
|
215
|
+
: n;
|
|
216
|
+
console.log(chalk_1.default.green(` Cert valid — ${n} of ${m} signers verified, threshold met`));
|
|
217
|
+
process.exit(0);
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
console.error(chalk_1.default.red(` Cert invalid — ${humanizeReason(result.reason)}`));
|
|
221
|
+
process.exit(1);
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
return cmd;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Default command instance used by the bin entrypoint. Tests build their
|
|
228
|
+
* own via {@link buildVerifyCommand}.
|
|
229
|
+
*/
|
|
230
|
+
exports.verifyCommand = buildVerifyCommand();
|
|
231
|
+
//# sourceMappingURL=verify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../src/commands/verify.ts"],"names":[],"mappings":";;;;;;AA6HA,gDA0IC;AAvQD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,yCAAoC;AACpC,kDAA0B;AAC1B,2BAA8C;AAC9C,+BAA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importStar(require("path"));
|
|
|
54
54
|
const init_1 = require("./commands/init");
|
|
55
55
|
const subscribe_1 = require("./commands/subscribe");
|
|
56
56
|
const deploy_1 = require("./commands/deploy");
|
|
57
|
+
const governance_1 = require("./commands/governance");
|
|
58
|
+
const hist_balance_1 = require("./commands/hist-balance");
|
|
59
|
+
const personhood_1 = require("./commands/personhood");
|
|
60
|
+
const verify_1 = require("./commands/verify");
|
|
57
61
|
dotenv.config();
|
|
58
62
|
function getVersion() {
|
|
59
63
|
try {
|
|
@@ -73,6 +77,10 @@ program
|
|
|
73
77
|
program.addCommand(init_1.initCommand);
|
|
74
78
|
program.addCommand(subscribe_1.subscribeCommand);
|
|
75
79
|
program.addCommand(deploy_1.deployCommand);
|
|
80
|
+
program.addCommand(governance_1.governanceCommand);
|
|
81
|
+
program.addCommand(hist_balance_1.histBalanceCommand);
|
|
82
|
+
program.addCommand(personhood_1.personhoodCommand);
|
|
83
|
+
program.addCommand(verify_1.verifyCommand);
|
|
76
84
|
program.parse(process.argv);
|
|
77
85
|
if (!process.argv.slice(2).length) {
|
|
78
86
|
program.outputHelp();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;GAYG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yCAAoC;AACpC,+CAAiC;AACjC,uCAAyB;AACzB,2CAA6B;AAC7B,0CAA8C;AAC9C,oDAAwD;AACxD,8CAAkD;AAElD,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,SAAS,UAAU;IACjB,IAAI,CAAC;QACH,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACnE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,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