xoonya 2.9.0 → 2.11.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 +7 -77
- 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/lib/release_history.js +25 -1
- package/package.json +1 -1
- 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 +25 -0
- package/scripts/verify_vectors.js +3 -3
- package/server.js +20 -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");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const assert = require("assert");
|
|
4
|
+
const fs = require("fs");
|
|
4
5
|
const path = require("path");
|
|
5
6
|
const { execFileSync, execSync } = require("child_process");
|
|
6
7
|
const packageJson = require("../package.json");
|
|
@@ -14,6 +15,29 @@ function parsePackDryRun() {
|
|
|
14
15
|
return Array.isArray(parsed) ? parsed[0] : parsed;
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
function verifyReleaseNotes() {
|
|
19
|
+
const notesPath = path.resolve(__dirname, "..", "RELEASE_NOTES.md");
|
|
20
|
+
const notes = fs.readFileSync(notesPath, "utf8");
|
|
21
|
+
const headings = (notes.match(/^#\s+xoonya\s+\d+\.\d+\.\d+\s+Release Notes\s*$/gm) || [])
|
|
22
|
+
.map((heading) => heading.trim());
|
|
23
|
+
assert.deepStrictEqual(
|
|
24
|
+
headings,
|
|
25
|
+
[`# xoonya ${packageJson.version} Release Notes`],
|
|
26
|
+
"RELEASE_NOTES.md must contain only the current xoonya release heading"
|
|
27
|
+
);
|
|
28
|
+
assert.strictEqual(
|
|
29
|
+
notes.includes(`xoonya\` ${packageJson.version}`),
|
|
30
|
+
true,
|
|
31
|
+
"RELEASE_NOTES.md must mention the current package version"
|
|
32
|
+
);
|
|
33
|
+
const mentionedVersions = notes.match(/\b\d+\.\d+\.\d+\b/g) || [];
|
|
34
|
+
assert.strictEqual(
|
|
35
|
+
mentionedVersions.every((version) => version === packageJson.version),
|
|
36
|
+
true,
|
|
37
|
+
"RELEASE_NOTES.md must not mention prior package versions"
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
17
41
|
function main() {
|
|
18
42
|
const releaseOutput = execFileSync(process.execPath, [
|
|
19
43
|
path.resolve(__dirname, "..", "bin", "xoonya-release.js"),
|
|
@@ -27,6 +51,7 @@ function main() {
|
|
|
27
51
|
assert.strictEqual(releaseCandidate.product, "xoonya", "release candidate product mismatch");
|
|
28
52
|
assert.strictEqual(releaseCandidate.publish_access, "public", "release candidate publish access mismatch");
|
|
29
53
|
assert.strictEqual(releaseCandidate.checklist_count >= 5, true, "release candidate checklist count mismatch");
|
|
54
|
+
verifyReleaseNotes();
|
|
30
55
|
|
|
31
56
|
const conformanceOutput = execFileSync(process.execPath, [
|
|
32
57
|
path.resolve(__dirname, "..", "bin", "xoonya.js"),
|
|
@@ -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
|
});
|
package/server.js
CHANGED
|
@@ -2357,102 +2357,102 @@ async function routeRequest(req, res) {
|
|
|
2357
2357
|
}
|
|
2358
2358
|
|
|
2359
2359
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-standard') {
|
|
2360
|
-
sendJson(res, 200, proofSdk.
|
|
2360
|
+
sendJson(res, 200, proofSdk.buildxoonyaNativeProofStandard());
|
|
2361
2361
|
return;
|
|
2362
2362
|
}
|
|
2363
2363
|
|
|
2364
2364
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-standard/summary') {
|
|
2365
|
-
sendJson(res, 200, proofSdk.
|
|
2365
|
+
sendJson(res, 200, proofSdk.summarizexoonyaNativeProofStandard());
|
|
2366
2366
|
return;
|
|
2367
2367
|
}
|
|
2368
2368
|
|
|
2369
2369
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-hybrid-readiness') {
|
|
2370
|
-
sendJson(res, 200, proofSdk.
|
|
2370
|
+
sendJson(res, 200, proofSdk.buildxoonyaNativeHybridReadinessPack());
|
|
2371
2371
|
return;
|
|
2372
2372
|
}
|
|
2373
2373
|
|
|
2374
2374
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-hybrid-readiness/summary') {
|
|
2375
|
-
sendJson(res, 200, proofSdk.
|
|
2375
|
+
sendJson(res, 200, proofSdk.summarizexoonyaNativeHybridReadinessPack());
|
|
2376
2376
|
return;
|
|
2377
2377
|
}
|
|
2378
2378
|
|
|
2379
2379
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-standardization') {
|
|
2380
|
-
sendJson(res, 200, proofSdk.
|
|
2380
|
+
sendJson(res, 200, proofSdk.buildxoonyaNativeStandardizationPack());
|
|
2381
2381
|
return;
|
|
2382
2382
|
}
|
|
2383
2383
|
|
|
2384
2384
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-standardization/summary') {
|
|
2385
|
-
sendJson(res, 200, proofSdk.
|
|
2385
|
+
sendJson(res, 200, proofSdk.summarizexoonyaNativeStandardizationPack());
|
|
2386
2386
|
return;
|
|
2387
2387
|
}
|
|
2388
2388
|
|
|
2389
2389
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-conformance-mark') {
|
|
2390
|
-
sendJson(res, 200, proofSdk.
|
|
2390
|
+
sendJson(res, 200, proofSdk.buildxoonyaNativeConformanceMarkPack());
|
|
2391
2391
|
return;
|
|
2392
2392
|
}
|
|
2393
2393
|
|
|
2394
2394
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-conformance-mark/summary') {
|
|
2395
|
-
sendJson(res, 200, proofSdk.
|
|
2395
|
+
sendJson(res, 200, proofSdk.summarizexoonyaNativeConformanceMarkPack());
|
|
2396
2396
|
return;
|
|
2397
2397
|
}
|
|
2398
2398
|
|
|
2399
2399
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-reference-implementations') {
|
|
2400
|
-
sendJson(res, 200, proofSdk.
|
|
2400
|
+
sendJson(res, 200, proofSdk.buildxoonyaNativeReferenceImplementationPack());
|
|
2401
2401
|
return;
|
|
2402
2402
|
}
|
|
2403
2403
|
|
|
2404
2404
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-reference-implementations/summary') {
|
|
2405
|
-
sendJson(res, 200, proofSdk.
|
|
2405
|
+
sendJson(res, 200, proofSdk.summarizexoonyaNativeReferenceImplementationPack());
|
|
2406
2406
|
return;
|
|
2407
2407
|
}
|
|
2408
2408
|
|
|
2409
2409
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-payload-profile') {
|
|
2410
|
-
sendJson(res, 200, proofSdk.
|
|
2410
|
+
sendJson(res, 200, proofSdk.buildxoonyaNativePayloadProfilePack());
|
|
2411
2411
|
return;
|
|
2412
2412
|
}
|
|
2413
2413
|
|
|
2414
2414
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-payload-profile/summary') {
|
|
2415
|
-
sendJson(res, 200, proofSdk.
|
|
2415
|
+
sendJson(res, 200, proofSdk.summarizexoonyaNativePayloadProfilePack());
|
|
2416
2416
|
return;
|
|
2417
2417
|
}
|
|
2418
2418
|
|
|
2419
2419
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-line-rate-frame') {
|
|
2420
|
-
sendJson(res, 200, proofSdk.
|
|
2420
|
+
sendJson(res, 200, proofSdk.buildxoonyaNativeLineRateFramePack());
|
|
2421
2421
|
return;
|
|
2422
2422
|
}
|
|
2423
2423
|
|
|
2424
2424
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-line-rate-frame/summary') {
|
|
2425
|
-
sendJson(res, 200, proofSdk.
|
|
2425
|
+
sendJson(res, 200, proofSdk.summarizexoonyaNativeLineRateFramePack());
|
|
2426
2426
|
return;
|
|
2427
2427
|
}
|
|
2428
2428
|
|
|
2429
2429
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-atom-spec') {
|
|
2430
|
-
sendJson(res, 200, proofSdk.
|
|
2430
|
+
sendJson(res, 200, proofSdk.buildxoonyaNativeAtomSpec());
|
|
2431
2431
|
return;
|
|
2432
2432
|
}
|
|
2433
2433
|
|
|
2434
2434
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-atom-spec/summary') {
|
|
2435
|
-
sendJson(res, 200, proofSdk.
|
|
2435
|
+
sendJson(res, 200, proofSdk.summarizexoonyaNativeAtomSpec());
|
|
2436
2436
|
return;
|
|
2437
2437
|
}
|
|
2438
2438
|
|
|
2439
2439
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-atom-conformance') {
|
|
2440
|
-
sendJson(res, 200, proofSdk.
|
|
2440
|
+
sendJson(res, 200, proofSdk.buildxoonyaNativeAtomConformancePack());
|
|
2441
2441
|
return;
|
|
2442
2442
|
}
|
|
2443
2443
|
|
|
2444
2444
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-atom-conformance/summary') {
|
|
2445
|
-
sendJson(res, 200, proofSdk.
|
|
2445
|
+
sendJson(res, 200, proofSdk.summarizexoonyaNativeAtomConformancePack());
|
|
2446
2446
|
return;
|
|
2447
2447
|
}
|
|
2448
2448
|
|
|
2449
2449
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-anchor-profile') {
|
|
2450
|
-
sendJson(res, 200, proofSdk.
|
|
2450
|
+
sendJson(res, 200, proofSdk.buildxoonyaNativeAnchorProfile());
|
|
2451
2451
|
return;
|
|
2452
2452
|
}
|
|
2453
2453
|
|
|
2454
2454
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-anchor-profile/summary') {
|
|
2455
|
-
sendJson(res, 200, proofSdk.
|
|
2455
|
+
sendJson(res, 200, proofSdk.summarizexoonyaNativeAnchorProfile());
|
|
2456
2456
|
return;
|
|
2457
2457
|
}
|
|
2458
2458
|
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
{
|
|
49
49
|
"id": "reject-bad-length",
|
|
50
50
|
"atom_hex": "584e59410101",
|
|
51
|
-
"expected_reason": "atomHex must be a supported
|
|
51
|
+
"expected_reason": "atomHex must be a supported xoonya native atom",
|
|
52
52
|
"expected_error_code": "atom_unsupported_length"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"id": "reject-bad-magic",
|
|
56
56
|
"atom_hex": "000000000101c88aa17753c173551a00bdd83c24fa2bfc85a87252062d4569aac18ef572cbd7aa15f09827a68d652ce3e9391eca4c8faa26c4b2",
|
|
57
|
-
"expected_reason": "atomHex has bad
|
|
57
|
+
"expected_reason": "atomHex has bad xoonya native atom magic",
|
|
58
58
|
"expected_error_code": "atom_bad_magic"
|
|
59
59
|
},
|
|
60
60
|
{
|