xoonya 2.10.0 → 2.12.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/README.md +13 -13
- package/RELEASE_NOTES.md +6 -8
- package/XNYA_CONFORMANCE_MARK.md +3 -3
- package/XNYA_REFERENCE_IMPLEMENTATIONS.md +1 -1
- package/XOONYA_NATIVE_ATOM_SPEC.md +6 -6
- package/XOONYA_NATIVE_PROOF_FORMAT.md +28 -28
- package/XOONYA_NATIVE_STANDARD_GOVERNANCE.md +6 -6
- package/bin/xoonya-release.js +8 -8
- package/index.js +2 -0
- package/lib/release_history.js +25 -1
- package/lib/trust_portability_pack.js +224 -0
- package/lib/verification_service_pack.js +149 -0
- package/package.json +4 -2
- package/proof_sdk.js +117 -117
- package/reference/python/xnya_reference.py +2 -2
- package/scripts/verify_all.js +45 -45
- package/scripts/verify_native_hybrid_design_gate.js +1 -1
- package/scripts/verify_reference_promotion_gate.js +7 -7
- package/scripts/verify_release_candidate.js +5 -6
- package/scripts/verify_service.js +26 -0
- package/scripts/verify_trust_portability.js +56 -0
- package/scripts/verify_vectors.js +3 -3
- package/scripts/verify_verification_services.js +56 -0
- package/server.js +65 -20
- package/vectors/native-atom-vectors.json +2 -2
package/scripts/verify_all.js
CHANGED
|
@@ -383,21 +383,21 @@ function verifyProofBundleConformance() {
|
|
|
383
383
|
function verifyNativeAtomConformance() {
|
|
384
384
|
ensure(nativeAtomVectors.version === "xoonya-native-atom-vectors-v1", "native atom vector version mismatch");
|
|
385
385
|
const payloadBytes = Buffer.from(nativeAtomVectors.payload_ascii, "utf8");
|
|
386
|
-
const generatedV1 = sdk.
|
|
386
|
+
const generatedV1 = sdk.createxoonyaNativeAtomV1(nativeAtomVectors.identity_material_hex, payloadBytes);
|
|
387
387
|
const expectedV1 = nativeAtomVectors.vectors.find((vector) => vector.id === "xnya-v1-with-payload");
|
|
388
388
|
ensure(generatedV1.atom_hex === expectedV1.atom_hex, "native atom v1 payload vector mismatch");
|
|
389
|
-
const generatedV2 = sdk.
|
|
389
|
+
const generatedV2 = sdk.createxoonyaNativeAtomV2(nativeAtomVectors.identity_material_hex, payloadBytes);
|
|
390
390
|
const expectedV2 = nativeAtomVectors.vectors.find((vector) => vector.id === "xnya-v2-with-payload");
|
|
391
391
|
ensure(generatedV2.atom_hex === expectedV2.atom_hex, "native atom v2 payload vector mismatch");
|
|
392
392
|
|
|
393
393
|
for (const vector of nativeAtomVectors.vectors) {
|
|
394
|
-
const parsed = sdk.
|
|
394
|
+
const parsed = sdk.parsexoonyaNativeAtom(vector.atom_hex);
|
|
395
395
|
ensure(parsed.atom_version === vector.atom_version, `${vector.id} atom version mismatch`);
|
|
396
396
|
ensure(parsed.byte_length === vector.byte_length, `${vector.id} byte length mismatch`);
|
|
397
397
|
ensure(parsed.agent_id === vector.agent_id, `${vector.id} agent id mismatch`);
|
|
398
398
|
ensure(parsed.payload_hash_sha256 === vector.payload_hash_sha256, `${vector.id} payload hash mismatch`);
|
|
399
399
|
const hasPayload = vector.payload_hash_sha256 !== "00".repeat(32);
|
|
400
|
-
const verification = sdk.
|
|
400
|
+
const verification = sdk.verifyxoonyaNativeAtom(vector.atom_hex, {
|
|
401
401
|
identity_material_hex: nativeAtomVectors.identity_material_hex,
|
|
402
402
|
...(hasPayload ? { payload_bytes: payloadBytes } : {})
|
|
403
403
|
});
|
|
@@ -406,7 +406,7 @@ function verifyNativeAtomConformance() {
|
|
|
406
406
|
}
|
|
407
407
|
|
|
408
408
|
for (const vector of nativeAtomVectors.adversarial) {
|
|
409
|
-
const verification = sdk.
|
|
409
|
+
const verification = sdk.verifyxoonyaNativeAtom(vector.atom_hex, {
|
|
410
410
|
identity_material_hex: vector.identity_material_hex || nativeAtomVectors.identity_material_hex,
|
|
411
411
|
...(vector.payload_ascii ? { payload_bytes: Buffer.from(vector.payload_ascii, "utf8") } : {})
|
|
412
412
|
});
|
|
@@ -420,56 +420,56 @@ function verifyNativeAtomConformance() {
|
|
|
420
420
|
|
|
421
421
|
function verifyNativePayloadProfileConformance() {
|
|
422
422
|
ensure(nativePayloadProfileVectors.version === "xoonya-native-payload-profile-vectors-v1", "native payload profile vector version mismatch");
|
|
423
|
-
ensure(typeof sdk.
|
|
424
|
-
ensure(typeof sdk.
|
|
425
|
-
ensure(typeof sdk.
|
|
426
|
-
ensure(typeof sdk.
|
|
427
|
-
ensure(typeof sdk.
|
|
428
|
-
ensure(typeof sdk.
|
|
423
|
+
ensure(typeof sdk.encodexoonyaNativePayloadProfileV1 === "function", "missing encodexoonyaNativePayloadProfileV1");
|
|
424
|
+
ensure(typeof sdk.parsexoonyaNativePayloadProfileV1 === "function", "missing parsexoonyaNativePayloadProfileV1");
|
|
425
|
+
ensure(typeof sdk.verifyxoonyaNativePayloadProfileV1 === "function", "missing verifyxoonyaNativePayloadProfileV1");
|
|
426
|
+
ensure(typeof sdk.createxoonyaNativeLineRateFrameV1 === "function", "missing createxoonyaNativeLineRateFrameV1");
|
|
427
|
+
ensure(typeof sdk.parsexoonyaNativeLineRateFrameV1 === "function", "missing parsexoonyaNativeLineRateFrameV1");
|
|
428
|
+
ensure(typeof sdk.verifyxoonyaNativeLineRateFrameV1 === "function", "missing verifyxoonyaNativeLineRateFrameV1");
|
|
429
429
|
|
|
430
430
|
const vector = nativePayloadProfileVectors.profile_vector;
|
|
431
|
-
const profile = sdk.
|
|
431
|
+
const profile = sdk.encodexoonyaNativePayloadProfileV1(vector.input);
|
|
432
432
|
ensure(profile.profile === "xoonya-native-payload-profile/v1", "native payload profile id mismatch");
|
|
433
433
|
ensure(profile.canonical_bytes_hex.startsWith(Buffer.from("XNYP", "ascii").toString("hex")), "native payload profile magic mismatch");
|
|
434
434
|
ensure(profile.field_count === 4, "native payload profile field count mismatch");
|
|
435
435
|
ensure(profile.canonical_bytes_hex === vector.expected.canonical_bytes_hex, "native payload profile canonical vector mismatch");
|
|
436
436
|
ensure(profile.payload_hash_sha256 === vector.expected.payload_hash_sha256, "native payload profile payload hash vector mismatch");
|
|
437
437
|
ensure(profile.schema_hash_sha256 === vector.expected.schema_hash_sha256, "native payload profile schema hash vector mismatch");
|
|
438
|
-
const parsedProfile = sdk.
|
|
438
|
+
const parsedProfile = sdk.parsexoonyaNativePayloadProfileV1(profile.canonical_bytes_hex);
|
|
439
439
|
ensure(parsedProfile.payload_hash_sha256 === profile.payload_hash_sha256, "native payload profile hash mismatch");
|
|
440
440
|
ensure(parsedProfile.fields.map((field) => field.field_id).join(",") === "1,2,3,4", "native payload profile canonical ordering mismatch");
|
|
441
441
|
ensure(parsedProfile.fields.find((field) => field.field_id === 2).value === "42", "native payload profile uint64 decode mismatch");
|
|
442
442
|
ensure(parsedProfile.fields.find((field) => field.field_id === 4).value === true, "native payload profile bool decode mismatch");
|
|
443
|
-
const profileVerification = sdk.
|
|
443
|
+
const profileVerification = sdk.verifyxoonyaNativePayloadProfileV1(profile.canonical_bytes_hex, {
|
|
444
444
|
payload_hash_sha256: profile.payload_hash_sha256,
|
|
445
445
|
schema_ref: "xoonya.payload.test.v1",
|
|
446
446
|
allowed_field_ids: [1, 2, 3, 4]
|
|
447
447
|
});
|
|
448
448
|
ensure(profileVerification.valid === true, "native payload profile verification should pass");
|
|
449
|
-
const unknownFieldPolicy = sdk.
|
|
449
|
+
const unknownFieldPolicy = sdk.verifyxoonyaNativePayloadProfileV1(profile.canonical_bytes_hex, {
|
|
450
450
|
allowed_field_ids: [1, 2, 3]
|
|
451
451
|
});
|
|
452
452
|
ensure(unknownFieldPolicy.valid === false, "native payload profile policy should reject unknown field ids");
|
|
453
453
|
ensure(unknownFieldPolicy.reason === "payload_profile_unknown_field", "native payload profile unknown field reason mismatch");
|
|
454
454
|
|
|
455
|
-
const atom = sdk.
|
|
455
|
+
const atom = sdk.createxoonyaNativeAtomV1(
|
|
456
456
|
"01" + "11".repeat(33),
|
|
457
457
|
Buffer.from(profile.canonical_bytes_hex, "hex")
|
|
458
458
|
);
|
|
459
|
-
const frame = sdk.
|
|
459
|
+
const frame = sdk.createxoonyaNativeLineRateFrameV1(atom.atom_hex);
|
|
460
460
|
const frameVector = nativePayloadProfileVectors.line_rate_frame_vector;
|
|
461
461
|
ensure(frame.profile === "xoonya-native-line-rate-frame/v1", "line-rate frame profile mismatch");
|
|
462
462
|
ensure(frame.frame_byte_length === 60, "line-rate frame v1 size mismatch");
|
|
463
463
|
ensure(atom.atom_hex === frameVector.atom_hex, "line-rate frame atom vector mismatch");
|
|
464
464
|
ensure(frame.frame_hex === frameVector.frame_hex, "line-rate frame vector mismatch");
|
|
465
465
|
ensure(frame.checksum_hex === frameVector.checksum_hex, "line-rate frame checksum vector mismatch");
|
|
466
|
-
const frameVerification = sdk.
|
|
466
|
+
const frameVerification = sdk.verifyxoonyaNativeLineRateFrameV1(frame.frame_hex, {
|
|
467
467
|
identity_material_hex: "01" + "11".repeat(33),
|
|
468
468
|
payload_bytes: Buffer.from(profile.canonical_bytes_hex, "hex")
|
|
469
469
|
});
|
|
470
470
|
ensure(frameVerification.valid === true, "line-rate frame should verify");
|
|
471
471
|
const tamperedFrameHex = `${frame.frame_hex.slice(0, -1)}${frame.frame_hex.endsWith("0") ? "1" : "0"}`;
|
|
472
|
-
const tamperedFrameVerification = sdk.
|
|
472
|
+
const tamperedFrameVerification = sdk.verifyxoonyaNativeLineRateFrameV1(tamperedFrameHex, {
|
|
473
473
|
identity_material_hex: "01" + "11".repeat(33),
|
|
474
474
|
payload_bytes: Buffer.from(profile.canonical_bytes_hex, "hex")
|
|
475
475
|
});
|
|
@@ -516,33 +516,33 @@ function main() {
|
|
|
516
516
|
ensure(typeof sdk.getProofVerificationMethod === "function", "missing getProofVerificationMethod");
|
|
517
517
|
ensure(typeof sdk.listNativeSignatureSuites === "function", "missing listNativeSignatureSuites");
|
|
518
518
|
ensure(typeof sdk.getNativeSignatureSuite === "function", "missing getNativeSignatureSuite");
|
|
519
|
-
ensure(typeof sdk.
|
|
520
|
-
ensure(typeof sdk.
|
|
521
|
-
ensure(typeof sdk.
|
|
522
|
-
ensure(typeof sdk.
|
|
523
|
-
ensure(typeof sdk.
|
|
524
|
-
ensure(typeof sdk.
|
|
525
|
-
ensure(typeof sdk.
|
|
526
|
-
ensure(typeof sdk.
|
|
519
|
+
ensure(typeof sdk.listxoonyaNativeIdentityTypes === "function", "missing listxoonyaNativeIdentityTypes");
|
|
520
|
+
ensure(typeof sdk.buildxoonyaNativeAtomSpec === "function", "missing buildxoonyaNativeAtomSpec");
|
|
521
|
+
ensure(typeof sdk.buildxoonyaNativeAtomConformancePack === "function", "missing buildxoonyaNativeAtomConformancePack");
|
|
522
|
+
ensure(typeof sdk.summarizexoonyaNativeAtomConformancePack === "function", "missing summarizexoonyaNativeAtomConformancePack");
|
|
523
|
+
ensure(typeof sdk.createxoonyaNativeAtomV1 === "function", "missing createxoonyaNativeAtomV1");
|
|
524
|
+
ensure(typeof sdk.createxoonyaNativeAtomV2 === "function", "missing createxoonyaNativeAtomV2");
|
|
525
|
+
ensure(typeof sdk.parsexoonyaNativeAtom === "function", "missing parsexoonyaNativeAtom");
|
|
526
|
+
ensure(typeof sdk.verifyxoonyaNativeAtom === "function", "missing verifyxoonyaNativeAtom");
|
|
527
527
|
ensure(typeof sdk.buildNativeReceiptSignature === "function", "missing buildNativeReceiptSignature");
|
|
528
528
|
ensure(typeof sdk.buildNativeSignedReceiptProof === "function", "missing buildNativeSignedReceiptProof");
|
|
529
529
|
ensure(typeof sdk.buildNativeAnchoredReceiptProof === "function", "missing buildNativeAnchoredReceiptProof");
|
|
530
|
-
ensure(typeof sdk.
|
|
531
|
-
ensure(typeof sdk.
|
|
530
|
+
ensure(typeof sdk.buildxoonyaNativeAnchorProfile === "function", "missing buildxoonyaNativeAnchorProfile");
|
|
531
|
+
ensure(typeof sdk.summarizexoonyaNativeAnchorProfile === "function", "missing summarizexoonyaNativeAnchorProfile");
|
|
532
532
|
ensure(typeof sdk.buildExternalProofImportAdapterPack === "function", "missing buildExternalProofImportAdapterPack");
|
|
533
533
|
ensure(typeof sdk.summarizeExternalProofImportAdapterPack === "function", "missing summarizeExternalProofImportAdapterPack");
|
|
534
|
-
ensure(typeof sdk.
|
|
535
|
-
ensure(typeof sdk.
|
|
536
|
-
ensure(typeof sdk.
|
|
537
|
-
ensure(typeof sdk.
|
|
538
|
-
ensure(typeof sdk.
|
|
539
|
-
ensure(typeof sdk.
|
|
540
|
-
ensure(typeof sdk.
|
|
541
|
-
ensure(typeof sdk.
|
|
542
|
-
ensure(typeof sdk.
|
|
543
|
-
ensure(typeof sdk.
|
|
544
|
-
ensure(typeof sdk.
|
|
545
|
-
ensure(typeof sdk.
|
|
534
|
+
ensure(typeof sdk.buildxoonyaNativeHybridReadinessPack === "function", "missing buildxoonyaNativeHybridReadinessPack");
|
|
535
|
+
ensure(typeof sdk.summarizexoonyaNativeHybridReadinessPack === "function", "missing summarizexoonyaNativeHybridReadinessPack");
|
|
536
|
+
ensure(typeof sdk.buildxoonyaNativeStandardizationPack === "function", "missing buildxoonyaNativeStandardizationPack");
|
|
537
|
+
ensure(typeof sdk.summarizexoonyaNativeStandardizationPack === "function", "missing summarizexoonyaNativeStandardizationPack");
|
|
538
|
+
ensure(typeof sdk.buildxoonyaNativeConformanceMarkPack === "function", "missing buildxoonyaNativeConformanceMarkPack");
|
|
539
|
+
ensure(typeof sdk.summarizexoonyaNativeConformanceMarkPack === "function", "missing summarizexoonyaNativeConformanceMarkPack");
|
|
540
|
+
ensure(typeof sdk.buildxoonyaNativeReferenceImplementationPack === "function", "missing buildxoonyaNativeReferenceImplementationPack");
|
|
541
|
+
ensure(typeof sdk.summarizexoonyaNativeReferenceImplementationPack === "function", "missing summarizexoonyaNativeReferenceImplementationPack");
|
|
542
|
+
ensure(typeof sdk.buildxoonyaNativePayloadProfilePack === "function", "missing buildxoonyaNativePayloadProfilePack");
|
|
543
|
+
ensure(typeof sdk.summarizexoonyaNativePayloadProfilePack === "function", "missing summarizexoonyaNativePayloadProfilePack");
|
|
544
|
+
ensure(typeof sdk.buildxoonyaNativeLineRateFramePack === "function", "missing buildxoonyaNativeLineRateFramePack");
|
|
545
|
+
ensure(typeof sdk.summarizexoonyaNativeLineRateFramePack === "function", "missing summarizexoonyaNativeLineRateFramePack");
|
|
546
546
|
ensure(typeof sdk.reviewExternalProofImport === "function", "missing reviewExternalProofImport");
|
|
547
547
|
ensure(typeof sdk.runExternalProofImport === "function", "missing runExternalProofImport");
|
|
548
548
|
ensure(typeof sdk.buildProofBundle === "function", "missing buildProofBundle");
|
|
@@ -566,18 +566,18 @@ function main() {
|
|
|
566
566
|
ensure(typeof sdk.verifyRegistryProfileV1 === "function", "missing verifyRegistryProfileV1");
|
|
567
567
|
ensure(fs.existsSync(path.resolve(__dirname, "..", "integrations", "registration-record.schema.json")), "missing integration registration schema");
|
|
568
568
|
ensure(fs.existsSync(path.resolve(__dirname, "..", "integrations", "registry-snapshot.schema.json")), "missing integration registry snapshot schema");
|
|
569
|
-
const hybridReadiness = sdk.
|
|
569
|
+
const hybridReadiness = sdk.summarizexoonyaNativeHybridReadinessPack();
|
|
570
570
|
ensure(hybridReadiness.status === "design_gated", "native hybrid readiness must stay design gated");
|
|
571
571
|
ensure(hybridReadiness.implemented_classical_suites.includes("secp256k1"), "native hybrid readiness secp256k1 suite missing");
|
|
572
572
|
ensure(hybridReadiness.implemented_classical_suites.includes("p256"), "native hybrid readiness p256 suite missing");
|
|
573
|
-
const standardization = sdk.
|
|
573
|
+
const standardization = sdk.summarizexoonyaNativeStandardizationPack();
|
|
574
574
|
ensure(standardization.canonical_magic === "XNYA", "native standardization magic mismatch");
|
|
575
575
|
ensure(standardization.conformance_forbidden_condition_count >= 4, "native standardization forbidden conditions missing");
|
|
576
|
-
const conformanceMark = sdk.
|
|
576
|
+
const conformanceMark = sdk.summarizexoonyaNativeConformanceMarkPack();
|
|
577
577
|
ensure(conformanceMark.mark === "XNYA-compatible", "native conformance mark mismatch");
|
|
578
578
|
ensure(conformanceMark.forbidden_claim_count >= 3, "native conformance mark forbidden claims missing");
|
|
579
579
|
ensure(conformanceMark.implemented_signature_suites.includes("secp256k1"), "native conformance mark secp256k1 suite missing");
|
|
580
|
-
const referenceImplementations = sdk.
|
|
580
|
+
const referenceImplementations = sdk.summarizexoonyaNativeReferenceImplementationPack();
|
|
581
581
|
ensure(referenceImplementations.status === "js_reference_implemented_independent_references_planned", "native reference implementation status mismatch");
|
|
582
582
|
ensure(referenceImplementations.implemented_reference_count === 1, "native reference implementation count mismatch");
|
|
583
583
|
ensure(referenceImplementations.planned_reference_count >= 2, "native planned reference implementation count mismatch");
|
|
@@ -28,7 +28,7 @@ function buildHybridAttemptBundle() {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
function runNativeHybridDesignGateVerification() {
|
|
31
|
-
const readiness = sdk.
|
|
31
|
+
const readiness = sdk.summarizexoonyaNativeHybridReadinessPack();
|
|
32
32
|
assert.strictEqual(readiness.status, "design_gated", "hybrid readiness must stay design gated");
|
|
33
33
|
assert.strictEqual(
|
|
34
34
|
readiness.current_decision.includes("do_not_claim_pqc"),
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const assert = require("assert");
|
|
4
4
|
const {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
buildxoonyaNativeReferenceImplementationPack,
|
|
6
|
+
summarizexoonyaNativeReferenceImplementationPack,
|
|
7
|
+
validatexoonyaNativeReferencePromotionEvidence
|
|
8
8
|
} = require("../proof_sdk");
|
|
9
9
|
|
|
10
10
|
function buildValidPromotionEvidence(pack, language = "python") {
|
|
@@ -23,7 +23,7 @@ function buildValidPromotionEvidence(pack, language = "python") {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
function assertRejected(pack, evidence, expectedCode) {
|
|
26
|
-
const validation =
|
|
26
|
+
const validation = validatexoonyaNativeReferencePromotionEvidence(pack, evidence);
|
|
27
27
|
assert.strictEqual(validation.promotion_allowed, false, `expected ${expectedCode} to block reference promotion`);
|
|
28
28
|
assert.strictEqual(
|
|
29
29
|
validation.rejection_codes.includes(expectedCode),
|
|
@@ -34,10 +34,10 @@ function assertRejected(pack, evidence, expectedCode) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
function main() {
|
|
37
|
-
const pack =
|
|
38
|
-
const summary =
|
|
37
|
+
const pack = buildxoonyaNativeReferenceImplementationPack();
|
|
38
|
+
const summary = summarizexoonyaNativeReferenceImplementationPack();
|
|
39
39
|
const validPythonEvidence = buildValidPromotionEvidence(pack, "python");
|
|
40
|
-
const validPythonPromotion =
|
|
40
|
+
const validPythonPromotion = validatexoonyaNativeReferencePromotionEvidence(pack, validPythonEvidence);
|
|
41
41
|
|
|
42
42
|
assert.strictEqual(pack.category, "xoonya-native-reference-implementation-pack", "native reference pack category mismatch");
|
|
43
43
|
assert.strictEqual(summary.category, "xoonya-native-reference-implementation-summary", "native reference summary category mismatch");
|
|
@@ -18,12 +18,10 @@ function parsePackDryRun() {
|
|
|
18
18
|
function verifyReleaseNotes() {
|
|
19
19
|
const notesPath = path.resolve(__dirname, "..", "RELEASE_NOTES.md");
|
|
20
20
|
const notes = fs.readFileSync(notesPath, "utf8");
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
[`# xoonya ${packageJson.version} Release Notes`],
|
|
26
|
-
"RELEASE_NOTES.md must contain only the current xoonya release heading"
|
|
21
|
+
assert.strictEqual(
|
|
22
|
+
/^#\s+xoonya\s+\d+\.\d+\.\d+\s+Release Notes\s*$/m.test(notes),
|
|
23
|
+
false,
|
|
24
|
+
"RELEASE_NOTES.md must not duplicate the GitHub release title as a heading"
|
|
27
25
|
);
|
|
28
26
|
assert.strictEqual(
|
|
29
27
|
notes.includes(`xoonya\` ${packageJson.version}`),
|
|
@@ -102,6 +100,7 @@ function main() {
|
|
|
102
100
|
assert.strictEqual(dryRun.files.some((entry) => entry.path === "scripts/verify_reference_promotion_gate.js"), true, "npm pack dry-run missing reference promotion gate verifier script");
|
|
103
101
|
assert.strictEqual(dryRun.files.some((entry) => entry.path === "scripts/verify_reference_rust_scaffold.js"), true, "npm pack dry-run missing Rust reference scaffold verifier script");
|
|
104
102
|
assert.strictEqual(dryRun.files.some((entry) => entry.path === "scripts/verify_native_hybrid_design_gate.js"), true, "npm pack dry-run missing native hybrid design-gate verifier script");
|
|
103
|
+
assert.strictEqual(dryRun.files.some((entry) => entry.path === "scripts/verify_verification_services.js"), true, "npm pack dry-run missing verification services verifier script");
|
|
105
104
|
assert.strictEqual(dryRun.files.some((entry) => entry.path === "scripts/verify_all.js"), true, "npm pack dry-run missing package verifier script");
|
|
106
105
|
assert.strictEqual(dryRun.files.some((entry) => entry.path === "vectors/conformance-vectors.json"), true, "npm pack dry-run missing conformance vectors");
|
|
107
106
|
assert.strictEqual(dryRun.files.some((entry) => entry.path === "vectors/adversarial-vectors.json"), true, "npm pack dry-run missing adversarial vectors");
|
|
@@ -105,6 +105,22 @@ async function main() {
|
|
|
105
105
|
assert.strictEqual(identityInteropSummaryResponse.json.product, 'xoonya', 'identity interop summary product missing');
|
|
106
106
|
assert.strictEqual(identityInteropSummaryResponse.json.profile_count >= 4, true, 'identity interop summary count missing');
|
|
107
107
|
|
|
108
|
+
const trustPortabilityResponse = await getJson(baseUrl, '/v1/proof-center/trust-portability');
|
|
109
|
+
assert.strictEqual(trustPortabilityResponse.status, 200, 'trust portability route failed');
|
|
110
|
+
assert.strictEqual(trustPortabilityResponse.json.product, 'xoonya', 'trust portability product missing');
|
|
111
|
+
assert.strictEqual(trustPortabilityResponse.json.category, 'xoonya-trust-portability-pack', 'trust portability category missing');
|
|
112
|
+
assert.strictEqual(Array.isArray(trustPortabilityResponse.json.portability_profiles), true, 'trust portability profiles missing');
|
|
113
|
+
assert.strictEqual(trustPortabilityResponse.json.portability_profiles.length >= 4, true, 'trust portability profile count missing');
|
|
114
|
+
|
|
115
|
+
const trustPortabilitySummaryResponse = await getJson(baseUrl, '/v1/proof-center/trust-portability/summary');
|
|
116
|
+
assert.strictEqual(trustPortabilitySummaryResponse.status, 200, 'trust portability summary route failed');
|
|
117
|
+
assert.strictEqual(trustPortabilitySummaryResponse.json.product, 'xoonya', 'trust portability summary product missing');
|
|
118
|
+
assert.strictEqual(trustPortabilitySummaryResponse.json.profile_count >= 4, true, 'trust portability summary profile count missing');
|
|
119
|
+
|
|
120
|
+
const trustPortabilityDetailResponse = await getJson(baseUrl, '/v1/proof-center/trust-portability/agent_identity_portability');
|
|
121
|
+
assert.strictEqual(trustPortabilityDetailResponse.status, 200, 'trust portability detail route failed');
|
|
122
|
+
assert.strictEqual(trustPortabilityDetailResponse.json.profile.profile_id, 'agent_identity_portability', 'trust portability detail profile missing');
|
|
123
|
+
|
|
108
124
|
const providerLaneResponse = await getJson(baseUrl, '/v1/providers');
|
|
109
125
|
assert.strictEqual(providerLaneResponse.status, 200, 'provider lane route failed');
|
|
110
126
|
assert.strictEqual(providerLaneResponse.json.product, 'xoonya', 'provider lane product missing');
|
|
@@ -191,6 +207,16 @@ async function main() {
|
|
|
191
207
|
assert.strictEqual(proofBridgeLaneSummaryResponse.json.product, 'xoonya', 'proof bridge lane summary product missing');
|
|
192
208
|
assert.strictEqual(proofBridgeLaneSummaryResponse.json.first_run_flow_count >= 2, true, 'proof bridge lane summary flow count missing');
|
|
193
209
|
|
|
210
|
+
const verificationServicesResponse = await getJson(baseUrl, '/v1/proof-center/verification-services');
|
|
211
|
+
assert.strictEqual(verificationServicesResponse.status, 200, 'verification services route failed');
|
|
212
|
+
assert.strictEqual(verificationServicesResponse.json.category, 'xoonya-verification-services-pack', 'verification services category missing');
|
|
213
|
+
assert.strictEqual(verificationServicesResponse.json.service_count >= 6, true, 'verification services count missing');
|
|
214
|
+
|
|
215
|
+
const verificationServicesSummaryResponse = await getJson(baseUrl, '/v1/proof-center/verification-services/summary');
|
|
216
|
+
assert.strictEqual(verificationServicesSummaryResponse.status, 200, 'verification services summary route failed');
|
|
217
|
+
assert.strictEqual(verificationServicesSummaryResponse.json.category, 'xoonya-verification-services-summary', 'verification services summary category missing');
|
|
218
|
+
assert.strictEqual(verificationServicesSummaryResponse.json.service_count >= 6, true, 'verification services summary count missing');
|
|
219
|
+
|
|
194
220
|
const externalProofImportResponse = await getJson(baseUrl, '/v1/external-proof-import');
|
|
195
221
|
assert.strictEqual(externalProofImportResponse.status, 200, 'external proof import lane route failed');
|
|
196
222
|
assert.strictEqual(externalProofImportResponse.json.product, 'xoonya', 'external proof import lane product missing');
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const assert = require("assert");
|
|
4
|
+
const { createServer } = require("../server.js");
|
|
5
|
+
|
|
6
|
+
async function getJson(baseUrl, path) {
|
|
7
|
+
const response = await fetch(`${baseUrl}${path}`);
|
|
8
|
+
return {
|
|
9
|
+
status: response.status,
|
|
10
|
+
json: await response.json()
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async function main() {
|
|
15
|
+
const server = createServer();
|
|
16
|
+
await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve));
|
|
17
|
+
const address = server.address();
|
|
18
|
+
const baseUrl = `http://127.0.0.1:${address.port}`;
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
const pack = await getJson(baseUrl, "/v1/proof-center/trust-portability");
|
|
22
|
+
assert.strictEqual(pack.status, 200, "trust portability route failed");
|
|
23
|
+
assert.strictEqual(pack.json.category, "xoonya-trust-portability-pack", "trust portability category mismatch");
|
|
24
|
+
assert.strictEqual(pack.json.portability_profiles.length >= 4, true, "trust portability profile count mismatch");
|
|
25
|
+
assert.strictEqual(
|
|
26
|
+
pack.json.portability_profiles.some((entry) => entry.profile_id === "agent_identity_portability" && entry.callable_surfaces.includes("/v1/identity-interop")),
|
|
27
|
+
true,
|
|
28
|
+
"agent identity portability profile missing identity-interop surface"
|
|
29
|
+
);
|
|
30
|
+
assert.strictEqual(
|
|
31
|
+
pack.json.portability_profiles.some((entry) => entry.profile_id === "delivery_history_portability" && entry.supporting_surfaces.includes("/v1/result-package-trust/summary")),
|
|
32
|
+
true,
|
|
33
|
+
"delivery history portability profile missing result-package-trust support"
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const summary = await getJson(baseUrl, "/v1/proof-center/trust-portability/summary");
|
|
37
|
+
assert.strictEqual(summary.status, 200, "trust portability summary route failed");
|
|
38
|
+
assert.strictEqual(summary.json.profile_count >= 4, true, "trust portability summary profile count mismatch");
|
|
39
|
+
assert.strictEqual(summary.json.bounded_live_profile_count >= 4, true, "trust portability bounded-live count mismatch");
|
|
40
|
+
assert.strictEqual(summary.json.callable_profile_count >= 4, true, "trust portability callable profile count mismatch");
|
|
41
|
+
|
|
42
|
+
const detail = await getJson(baseUrl, "/v1/proof-center/trust-portability/agent_identity_portability");
|
|
43
|
+
assert.strictEqual(detail.status, 200, "trust portability detail route failed");
|
|
44
|
+
assert.strictEqual(detail.json.profile.profile_id, "agent_identity_portability", "trust portability detail profile mismatch");
|
|
45
|
+
assert.strictEqual(detail.json.profile.claim_status, "bounded_live", "trust portability detail claim status mismatch");
|
|
46
|
+
} finally {
|
|
47
|
+
await new Promise((resolve) => server.close(resolve));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
console.log("xoonya verify:trust-portability passed");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
main().catch((error) => {
|
|
54
|
+
console.error(error);
|
|
55
|
+
process.exit(1);
|
|
56
|
+
});
|
|
@@ -79,13 +79,13 @@ function runVectorVerification() {
|
|
|
79
79
|
const nativeAtomResults = [];
|
|
80
80
|
const nativeAtomPayload = Buffer.from(nativeAtomVectors.payload_ascii, "utf8");
|
|
81
81
|
for (const vector of nativeAtomVectors.vectors) {
|
|
82
|
-
const parsed = sdk.
|
|
82
|
+
const parsed = sdk.parsexoonyaNativeAtom(vector.atom_hex);
|
|
83
83
|
assert.strictEqual(parsed.atom_version, vector.atom_version, `${vector.id} atom version mismatch`);
|
|
84
84
|
assert.strictEqual(parsed.byte_length, vector.byte_length, `${vector.id} byte length mismatch`);
|
|
85
85
|
assert.strictEqual(parsed.agent_id, vector.agent_id, `${vector.id} agent id mismatch`);
|
|
86
86
|
assert.strictEqual(parsed.payload_hash_sha256, vector.payload_hash_sha256, `${vector.id} payload hash mismatch`);
|
|
87
87
|
const hasPayload = vector.payload_hash_sha256 !== "00".repeat(32);
|
|
88
|
-
const verification = sdk.
|
|
88
|
+
const verification = sdk.verifyxoonyaNativeAtom(vector.atom_hex, {
|
|
89
89
|
identity_material_hex: nativeAtomVectors.identity_material_hex,
|
|
90
90
|
...(hasPayload ? { payload_bytes: nativeAtomPayload } : {})
|
|
91
91
|
});
|
|
@@ -100,7 +100,7 @@ function runVectorVerification() {
|
|
|
100
100
|
|
|
101
101
|
const nativeAtomAdversarialResults = [];
|
|
102
102
|
for (const vector of nativeAtomVectors.adversarial) {
|
|
103
|
-
const verification = sdk.
|
|
103
|
+
const verification = sdk.verifyxoonyaNativeAtom(vector.atom_hex, {
|
|
104
104
|
identity_material_hex: vector.identity_material_hex || nativeAtomVectors.identity_material_hex,
|
|
105
105
|
...(vector.payload_ascii ? { payload_bytes: Buffer.from(vector.payload_ascii, "utf8") } : {})
|
|
106
106
|
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const assert = require("assert");
|
|
4
|
+
const { createServer } = require("../server.js");
|
|
5
|
+
|
|
6
|
+
async function getJson(baseUrl, path) {
|
|
7
|
+
const response = await fetch(`${baseUrl}${path}`);
|
|
8
|
+
return {
|
|
9
|
+
status: response.status,
|
|
10
|
+
json: await response.json()
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async function main() {
|
|
15
|
+
const server = createServer();
|
|
16
|
+
await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve));
|
|
17
|
+
const address = server.address();
|
|
18
|
+
const baseUrl = `http://127.0.0.1:${address.port}`;
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
const pack = await getJson(baseUrl, "/v1/proof-center/verification-services");
|
|
22
|
+
assert.strictEqual(pack.status, 200, "verification services route failed");
|
|
23
|
+
assert.strictEqual(pack.json.category, "xoonya-verification-services-pack", "verification services category mismatch");
|
|
24
|
+
assert.strictEqual(pack.json.service_count >= 6, true, "verification services count mismatch");
|
|
25
|
+
assert.strictEqual(
|
|
26
|
+
pack.json.verification_services.some((entry) => entry.service_id === "bundle_verify" && entry.callable_surfaces.includes("/v1/proof-bundles/verify")),
|
|
27
|
+
true,
|
|
28
|
+
"bundle verify service missing proof-bundles verify surface"
|
|
29
|
+
);
|
|
30
|
+
assert.strictEqual(
|
|
31
|
+
pack.json.verification_services.some((entry) => entry.service_id === "dispute_replay" && entry.callable_surfaces.includes("/v1/proof-center/governance/disputes/case-bundle")),
|
|
32
|
+
true,
|
|
33
|
+
"dispute replay service missing case bundle surface"
|
|
34
|
+
);
|
|
35
|
+
assert.strictEqual(
|
|
36
|
+
pack.json.verification_services.some((entry) => entry.service_id === "identity_link_verify" && entry.supporting_surfaces.includes("/v1/identity-interop/summary")),
|
|
37
|
+
true,
|
|
38
|
+
"identity-link verification service missing identity interop support"
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const summary = await getJson(baseUrl, "/v1/proof-center/verification-services/summary");
|
|
42
|
+
assert.strictEqual(summary.status, 200, "verification services summary route failed");
|
|
43
|
+
assert.strictEqual(summary.json.service_count >= 6, true, "verification services summary count mismatch");
|
|
44
|
+
assert.strictEqual(summary.json.live_service_count >= 1, true, "verification services summary live count missing");
|
|
45
|
+
assert.strictEqual(summary.json.bounded_live_service_count >= 5, true, "verification services summary bounded-live count missing");
|
|
46
|
+
} finally {
|
|
47
|
+
await new Promise((resolve) => server.close(resolve));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
console.log("xoonya verify:verification-services passed");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
main().catch((error) => {
|
|
54
|
+
console.error(error);
|
|
55
|
+
process.exit(1);
|
|
56
|
+
});
|