xoonya 3.1.16 → 3.2.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 +97 -74
- package/RELEASE_NOTES.md +7 -1
- package/START_HERE.md +38 -134
- package/bin/xoonya-first-run.js +22 -10
- package/bin/xoonya.js +61 -29
- package/lib/native_verify.js +1918 -0
- package/package.json +19 -42
- package/scripts/verify_release_candidate.js +243 -116
- package/scripts/verify_vectors.js +351 -104
- package/verify.js +95 -0
- package/.env.example +0 -10
- package/CARRIED_HANDOFF_DEMO.md +0 -60
- package/COMPATIBILITY_NOTE.md +0 -27
- package/CROSS_RUNTIME_POSTURE.md +0 -77
- package/EXAMPLE_PATHS.md +0 -53
- package/FINAL_CONTRACT.md +0 -445
- package/PARTNER_READY_PATH.md +0 -67
- package/PUBLIC_DEMO_SCRIPT.md +0 -79
- package/SERVICE_CONTRACT.md +0 -207
- package/TERMINOLOGY.md +0 -55
- package/WHY_XYTARA_XOONYA.md +0 -43
- package/XNYA_CONFORMANCE_MARK.md +0 -78
- package/XNYA_REFERENCE_IMPLEMENTATIONS.md +0 -157
- package/XOONYA_DEFAULT_PATH_MODEL.md +0 -63
- package/XOONYA_FOLLOWTHROUGH_TRUTH_MODEL.md +0 -63
- package/XOONYA_NATIVE_ATOM_SPEC.md +0 -184
- package/XOONYA_NATIVE_PROOF_FORMAT.md +0 -570
- package/XOONYA_NATIVE_STANDARD_GOVERNANCE.md +0 -119
- package/XOONYA_PROOF_TRUTH_MODEL.md +0 -58
- package/bin/xoonya-release.js +0 -1367
- package/bin/xoonya-review.js +0 -70
- package/examples/integration_boundary_walkthrough.js +0 -37
- package/examples/package_quickstart.js +0 -1007
- package/examples/partner_proof_walkthrough.js +0 -68
- package/examples/proof_review_walkthrough.js +0 -66
- package/examples/review_carried_handoff.js +0 -72
- package/index.js +0 -31
- package/integrations/PROOF_INTEGRATION_PROCESS.md +0 -45
- package/integrations/examples/example-third-party-verifier-registration.record.json +0 -22
- package/integrations/registration-record.schema.json +0 -99
- package/integrations/registry-snapshot.schema.json +0 -36
- package/integrations/registry.js +0 -636
- package/integrations/views.js +0 -36
- package/lib/adapter_certification_contract.js +0 -90
- package/lib/announcement_pack.js +0 -61
- package/lib/artifact_distribution_lane_contract.js +0 -54
- package/lib/asyncapi_contract.js +0 -135
- package/lib/auth_interop_contract.js +0 -69
- package/lib/authority_binding_lifecycle_contract.js +0 -182
- package/lib/bridge_intelligence.js +0 -102
- package/lib/cloudevents_contract.js +0 -79
- package/lib/crypto_agility_matrix.js +0 -131
- package/lib/default_path_contract.js +0 -380
- package/lib/ecosystem_entry.js +0 -64
- package/lib/erc8004_proof_lane_contract.js +0 -64
- package/lib/event_system_lane_contract.js +0 -76
- package/lib/external_proof_import_lane_contract.js +0 -87
- package/lib/feature_control_lane_contract.js +0 -54
- package/lib/followthrough_truth_contract.js +0 -214
- package/lib/framework_lane_contract.js +0 -76
- package/lib/governance_disputes_summary.js +0 -36
- package/lib/governance_intelligence.js +0 -108
- package/lib/identity_interop_contract.js +0 -83
- package/lib/integration_matrix_contract.js +0 -81
- package/lib/launch_narrative.js +0 -53
- package/lib/machine_identity_registry_contract.js +0 -199
- package/lib/major_rails_proof_lane_contract.js +0 -87
- package/lib/offline_verifiability_recovery_contract.js +0 -155
- package/lib/openapi_contract.js +0 -227
- package/lib/operational_receipt_contract.js +0 -165
- package/lib/outreach_proof.js +0 -71
- package/lib/phase_10_closeout_pack.js +0 -45
- package/lib/phase_10_completion_pack.js +0 -76
- package/lib/phase_10_decision_record_pack.js +0 -54
- package/lib/phase_10_decision_resolution_pack.js +0 -53
- package/lib/phase_10_demand_signal_adapters_proof_pack.js +0 -74
- package/lib/phase_10_ecosystem_backlog_triage_proof_pack.js +0 -74
- package/lib/phase_10_freeze_baseline_pack.js +0 -67
- package/lib/phase_10_freeze_review_pack.js +0 -64
- package/lib/phase_10_gate_pack.js +0 -57
- package/lib/phase_10_long_tail_continuity_pack.js +0 -80
- package/lib/phase_10_long_tail_ecosystem_pack.js +0 -68
- package/lib/phase_10_niche_extension_registry_proof_pack.js +0 -74
- package/lib/phase_1_claude_mcp_pack.js +0 -60
- package/lib/phase_1_claude_mcp_proof_pack.js +0 -57
- package/lib/phase_1_ecosystem_pack.js +0 -51
- package/lib/phase_1_openai_codex_pack.js +0 -60
- package/lib/phase_1_openai_codex_proof_pack.js +0 -57
- package/lib/phase_2_base_proof_pack.js +0 -71
- package/lib/phase_2_base_usdc_proof_pack.js +0 -72
- package/lib/phase_2_closeout_pack.js +0 -65
- package/lib/phase_2_completion_pack.js +0 -113
- package/lib/phase_2_decision_record_pack.js +0 -66
- package/lib/phase_2_decision_resolution_pack.js +0 -69
- package/lib/phase_2_eth_proof_pack.js +0 -70
- package/lib/phase_2_evm_base_proof_pack.js +0 -73
- package/lib/phase_2_evm_proof_pack.js +0 -71
- package/lib/phase_2_flip_preview_pack.js +0 -60
- package/lib/phase_2_freeze_review_pack.js +0 -99
- package/lib/phase_2_gate_pack.js +0 -77
- package/lib/phase_2_payment_rails_pack.js +0 -71
- package/lib/phase_2_usdc_proof_pack.js +0 -71
- package/lib/phase_3_brc_proof_pack.js +0 -81
- package/lib/phase_3_bsv_teranode_proof_pack.js +0 -81
- package/lib/phase_3_closeout_pack.js +0 -62
- package/lib/phase_3_completion_pack.js +0 -92
- package/lib/phase_3_decision_record_pack.js +0 -64
- package/lib/phase_3_decision_resolution_pack.js +0 -69
- package/lib/phase_3_freeze_baseline_pack.js +0 -67
- package/lib/phase_3_freeze_review_pack.js +0 -80
- package/lib/phase_3_gate_pack.js +0 -76
- package/lib/phase_3_metanet_proof_pack.js +0 -81
- package/lib/phase_3_native_bsv_pack.js +0 -89
- package/lib/phase_3_native_continuity_pack.js +0 -82
- package/lib/phase_4_attestation_proof_pack.js +0 -75
- package/lib/phase_4_closeout_pack.js +0 -45
- package/lib/phase_4_completion_pack.js +0 -82
- package/lib/phase_4_decision_record_pack.js +0 -54
- package/lib/phase_4_decision_resolution_pack.js +0 -45
- package/lib/phase_4_erc8004_proof_pack.js +0 -76
- package/lib/phase_4_freeze_baseline_pack.js +0 -67
- package/lib/phase_4_freeze_review_pack.js +0 -68
- package/lib/phase_4_gate_pack.js +0 -58
- package/lib/phase_4_identity_registry_proof_pack.js +0 -75
- package/lib/phase_4_identity_trust_pack.js +0 -73
- package/lib/phase_4_trust_continuity_pack.js +0 -86
- package/lib/phase_5_antelope_proof_pack.js +0 -76
- package/lib/phase_5_closeout_pack.js +0 -44
- package/lib/phase_5_completion_pack.js +0 -82
- package/lib/phase_5_decision_record_pack.js +0 -54
- package/lib/phase_5_decision_resolution_pack.js +0 -45
- package/lib/phase_5_freeze_baseline_pack.js +0 -67
- package/lib/phase_5_freeze_review_pack.js +0 -68
- package/lib/phase_5_gate_pack.js +0 -58
- package/lib/phase_5_major_rails_continuity_pack.js +0 -86
- package/lib/phase_5_major_rails_pack.js +0 -74
- package/lib/phase_5_proton_xpr_proof_pack.js +0 -76
- package/lib/phase_5_solana_proof_pack.js +0 -76
- package/lib/phase_6_autogen_proof_pack.js +0 -74
- package/lib/phase_6_closeout_pack.js +0 -46
- package/lib/phase_6_completion_pack.js +0 -77
- package/lib/phase_6_decision_record_pack.js +0 -54
- package/lib/phase_6_decision_resolution_pack.js +0 -53
- package/lib/phase_6_framework_continuity_pack.js +0 -81
- package/lib/phase_6_framework_runtime_pack.js +0 -68
- package/lib/phase_6_freeze_baseline_pack.js +0 -68
- package/lib/phase_6_freeze_review_pack.js +0 -65
- package/lib/phase_6_gate_pack.js +0 -59
- package/lib/phase_6_langchain_proof_pack.js +0 -74
- package/lib/phase_6_langgraph_proof_pack.js +0 -74
- package/lib/phase_6_semantic_kernel_proof_pack.js +0 -74
- package/lib/phase_7_closeout_pack.js +0 -45
- package/lib/phase_7_completion_pack.js +0 -85
- package/lib/phase_7_decision_record_pack.js +0 -53
- package/lib/phase_7_decision_resolution_pack.js +0 -53
- package/lib/phase_7_event_system_continuity_pack.js +0 -89
- package/lib/phase_7_event_system_pack.js +0 -76
- package/lib/phase_7_freeze_baseline_pack.js +0 -74
- package/lib/phase_7_freeze_review_pack.js +0 -65
- package/lib/phase_7_gate_pack.js +0 -58
- package/lib/phase_7_kafka_proof_pack.js +0 -76
- package/lib/phase_7_mqtt_proof_pack.js +0 -76
- package/lib/phase_7_nats_proof_pack.js +0 -76
- package/lib/phase_7_webhook_event_bus_proof_pack.js +0 -76
- package/lib/phase_8_closeout_pack.js +0 -46
- package/lib/phase_8_completion_pack.js +0 -82
- package/lib/phase_8_decision_record_pack.js +0 -54
- package/lib/phase_8_decision_resolution_pack.js +0 -53
- package/lib/phase_8_external_receipt_import_proof_pack.js +0 -74
- package/lib/phase_8_external_result_import_proof_pack.js +0 -74
- package/lib/phase_8_freeze_baseline_pack.js +0 -71
- package/lib/phase_8_freeze_review_pack.js +0 -64
- package/lib/phase_8_gate_pack.js +0 -58
- package/lib/phase_8_proof_bridge_continuity_pack.js +0 -86
- package/lib/phase_8_proof_bridges_pack.js +0 -72
- package/lib/phase_8_proof_bundle_normalization_proof_pack.js +0 -74
- package/lib/phase_9_closeout_pack.js +0 -46
- package/lib/phase_9_completion_pack.js +0 -82
- package/lib/phase_9_custody_refs_proof_pack.js +0 -74
- package/lib/phase_9_decision_record_pack.js +0 -54
- package/lib/phase_9_decision_resolution_pack.js +0 -53
- package/lib/phase_9_freeze_baseline_pack.js +0 -71
- package/lib/phase_9_freeze_review_pack.js +0 -64
- package/lib/phase_9_gate_pack.js +0 -58
- package/lib/phase_9_operator_accounting_bridges_proof_pack.js +0 -74
- package/lib/phase_9_treasury_connectivity_pack.js +0 -72
- package/lib/phase_9_treasury_continuity_pack.js +0 -86
- package/lib/phase_9_treasury_destinations_proof_pack.js +0 -74
- package/lib/phase_program_pack.js +0 -47
- package/lib/proof_bridge_lane_contract.js +0 -82
- package/lib/proof_truth_contract.js +0 -224
- package/lib/provenance_lane_contract.js +0 -54
- package/lib/provider_lane_contract.js +0 -67
- package/lib/public_surface_policy_contract.js +0 -111
- package/lib/publish_plan.js +0 -51
- package/lib/release_candidate.js +0 -50
- package/lib/release_center.js +0 -1037
- package/lib/release_history.js +0 -206
- package/lib/release_manifest.js +0 -114
- package/lib/release_pack.js +0 -391
- package/lib/result_package_trust_lane_contract.js +0 -74
- package/lib/review_intelligence.js +0 -100
- package/lib/role_freeze.js +0 -436
- package/lib/shared_signals_lane_contract.js +0 -54
- package/lib/signed_audit_provenance_contract.js +0 -93
- package/lib/telemetry_lane_contract.js +0 -54
- package/lib/treasury_proof_lane_contract.js +0 -83
- package/lib/trust_intelligence.js +0 -106
- package/lib/trust_portability_boundary_contract.js +0 -66
- package/lib/trust_portability_pack.js +0 -224
- package/lib/verification_service_pack.js +0 -149
- package/proof_sdk.js +0 -6692
- package/reference/python/README.md +0 -35
- package/reference/python/requirements-optional.txt +0 -1
- package/reference/python/verify_vectors.py +0 -223
- package/reference/python/xnya_reference.py +0 -810
- package/reference/rust/Cargo.toml +0 -11
- package/reference/rust/README.md +0 -28
- package/reference/rust/src/lib.rs +0 -87
- package/scripts/registry_cli.js +0 -157
- package/scripts/verify_all.js +0 -603
- package/scripts/verify_control_plane_contracts.js +0 -34
- package/scripts/verify_control_plane_routes.js +0 -70
- package/scripts/verify_examples.js +0 -19
- package/scripts/verify_external_proof_import_gate.js +0 -84
- package/scripts/verify_external_proof_signature.js +0 -142
- package/scripts/verify_forgery_resistance.js +0 -281
- package/scripts/verify_integrations.js +0 -170
- package/scripts/verify_native_hybrid_design_gate.js +0 -114
- package/scripts/verify_paid_execute.js +0 -133
- package/scripts/verify_paywall_flag.js +0 -86
- package/scripts/verify_reference_promotion_gate.js +0 -74
- package/scripts/verify_reference_python.js +0 -49
- package/scripts/verify_reference_python_crypto.js +0 -87
- package/scripts/verify_reference_rust_scaffold.js +0 -50
- package/scripts/verify_service.js +0 -3038
- package/scripts/verify_tooling.js +0 -1251
- package/scripts/verify_trust_portability.js +0 -56
- package/scripts/verify_verification_services.js +0 -56
- package/server.js +0 -4430
package/package.json
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xoonya",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "
|
|
5
|
-
"main": "
|
|
3
|
+
"version": "3.2.0",
|
|
4
|
+
"description": "Verifier for xoonya proofs and naxytra delivery evidence: deterministic verification of xoonya native proof bundles (replayable digest, Ed25519/secp256k1/P-256 signed, Ed25519 + ML-DSA-65 post-quantum hybrid, anchored), XNYA machine-evidence atoms, and detached signatures (Ed25519, ECDSA, RSA, ML-DSA). The proof engine and server are a hosted service and are not distributed.",
|
|
5
|
+
"main": "verify.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"xoonya": "bin/xoonya.js"
|
|
8
|
-
"xoonya-review": "bin/xoonya-review.js",
|
|
9
|
-
"xoonya-release": "bin/xoonya-release.js"
|
|
7
|
+
"xoonya": "bin/xoonya.js"
|
|
10
8
|
},
|
|
11
9
|
"type": "commonjs",
|
|
12
10
|
"license": "Apache-2.0",
|
|
@@ -19,38 +17,20 @@
|
|
|
19
17
|
"node": ">=24"
|
|
20
18
|
},
|
|
21
19
|
"files": [
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"bin/",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"vectors/",
|
|
31
|
-
"
|
|
32
|
-
".
|
|
20
|
+
"verify.js",
|
|
21
|
+
"lib/native_verify.js",
|
|
22
|
+
"lib/external_proof_verify.js",
|
|
23
|
+
"bin/xoonya.js",
|
|
24
|
+
"bin/xoonya-first-run.js",
|
|
25
|
+
"scripts/verify_vectors.js",
|
|
26
|
+
"scripts/verify_release_candidate.js",
|
|
27
|
+
"vectors/conformance-vectors.json",
|
|
28
|
+
"vectors/adversarial-vectors.json",
|
|
29
|
+
"vectors/native-atom-vectors.json",
|
|
30
|
+
"vectors/native-payload-profile-vectors.json",
|
|
33
31
|
"README.md",
|
|
34
|
-
"XOONYA_PROOF_TRUTH_MODEL.md",
|
|
35
|
-
"XOONYA_DEFAULT_PATH_MODEL.md",
|
|
36
|
-
"XOONYA_FOLLOWTHROUGH_TRUTH_MODEL.md",
|
|
37
|
-
"XOONYA_NATIVE_PROOF_FORMAT.md",
|
|
38
|
-
"XOONYA_NATIVE_ATOM_SPEC.md",
|
|
39
|
-
"XOONYA_NATIVE_STANDARD_GOVERNANCE.md",
|
|
40
|
-
"XNYA_CONFORMANCE_MARK.md",
|
|
41
|
-
"XNYA_REFERENCE_IMPLEMENTATIONS.md",
|
|
42
|
-
"WHY_XYTARA_XOONYA.md",
|
|
43
|
-
"CARRIED_HANDOFF_DEMO.md",
|
|
44
|
-
"PARTNER_READY_PATH.md",
|
|
45
|
-
"EXAMPLE_PATHS.md",
|
|
46
|
-
"PUBLIC_DEMO_SCRIPT.md",
|
|
47
32
|
"START_HERE.md",
|
|
48
|
-
"
|
|
49
|
-
"FINAL_CONTRACT.md",
|
|
50
|
-
"SERVICE_CONTRACT.md",
|
|
51
|
-
"TERMINOLOGY.md",
|
|
52
|
-
"CROSS_RUNTIME_POSTURE.md",
|
|
53
|
-
"COMPATIBILITY_NOTE.md",
|
|
33
|
+
"RELEASE_NOTES.md",
|
|
54
34
|
"LICENSE",
|
|
55
35
|
"NOTICE"
|
|
56
36
|
],
|
|
@@ -60,22 +40,19 @@
|
|
|
60
40
|
},
|
|
61
41
|
"keywords": [
|
|
62
42
|
"proof",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"governance",
|
|
66
|
-
"audit",
|
|
43
|
+
"verifier",
|
|
44
|
+
"verification",
|
|
67
45
|
"receipt",
|
|
68
|
-
"canonical-events",
|
|
69
46
|
"proof-bundle",
|
|
70
47
|
"deterministic",
|
|
71
48
|
"machine",
|
|
72
49
|
"evidence",
|
|
73
50
|
"post-quantum",
|
|
74
51
|
"ml-dsa",
|
|
75
|
-
"slh-dsa",
|
|
76
52
|
"pqc",
|
|
77
53
|
"xnya",
|
|
78
54
|
"ed25519",
|
|
55
|
+
"jws",
|
|
79
56
|
"x402"
|
|
80
57
|
],
|
|
81
58
|
"scripts": {
|
|
@@ -1,131 +1,258 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
// Release-candidate gate for the xoonya verifier package. Node built-ins only.
|
|
4
|
+
//
|
|
5
|
+
// Source checkout (proof_sdk.js present): the `npm pack --dry-run` file list must
|
|
6
|
+
// equal the publish allowlist exactly, the vectors must pass on the standalone
|
|
7
|
+
// verifier AND the engine-parity cross-check must run, and the CLI surface must
|
|
8
|
+
// behave as documented.
|
|
9
|
+
//
|
|
10
|
+
// Installed package (no proof_sdk.js): the engine, server and operator tooling
|
|
11
|
+
// must be absent, and the vectors must pass on the standalone verifier.
|
|
12
|
+
|
|
3
13
|
const assert = require("assert");
|
|
4
14
|
const fs = require("fs");
|
|
5
15
|
const path = require("path");
|
|
6
|
-
const { execFileSync, execSync } = require("child_process");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
const { execFileSync, execSync, spawnSync } = require("child_process");
|
|
17
|
+
|
|
18
|
+
const ROOT = path.resolve(__dirname, "..");
|
|
19
|
+
const packageJson = JSON.parse(fs.readFileSync(path.join(ROOT, "package.json"), "utf8"));
|
|
20
|
+
|
|
21
|
+
const PUBLISHED_FILES = Object.freeze([
|
|
22
|
+
"LICENSE",
|
|
23
|
+
"NOTICE",
|
|
24
|
+
"README.md",
|
|
25
|
+
"RELEASE_NOTES.md",
|
|
26
|
+
"START_HERE.md",
|
|
27
|
+
"bin/xoonya-first-run.js",
|
|
28
|
+
"bin/xoonya.js",
|
|
29
|
+
"lib/external_proof_verify.js",
|
|
30
|
+
"lib/native_verify.js",
|
|
31
|
+
"package.json",
|
|
32
|
+
"scripts/verify_release_candidate.js",
|
|
33
|
+
"scripts/verify_vectors.js",
|
|
34
|
+
"vectors/adversarial-vectors.json",
|
|
35
|
+
"vectors/conformance-vectors.json",
|
|
36
|
+
"vectors/native-atom-vectors.json",
|
|
37
|
+
"vectors/native-payload-profile-vectors.json",
|
|
38
|
+
"verify.js"
|
|
39
|
+
]);
|
|
40
|
+
|
|
41
|
+
// Never published. Checked against the pack list in the source checkout and
|
|
42
|
+
// against the filesystem in an installed package.
|
|
43
|
+
const FORBIDDEN_PATHS = Object.freeze([
|
|
44
|
+
"proof_sdk.js",
|
|
45
|
+
"server.js",
|
|
46
|
+
"index.js",
|
|
47
|
+
".env.example",
|
|
48
|
+
"integrations",
|
|
49
|
+
"reference",
|
|
50
|
+
"examples",
|
|
51
|
+
"bin/xoonya-release.js",
|
|
52
|
+
"bin/xoonya-review.js",
|
|
53
|
+
"scripts/verify_all.js",
|
|
54
|
+
"scripts/verify_service.js",
|
|
55
|
+
"scripts/verify_tooling.js",
|
|
56
|
+
"lib/release_center.js",
|
|
57
|
+
"lib/release_pack.js",
|
|
58
|
+
"lib/review_intelligence.js",
|
|
59
|
+
"lib/governance_intelligence.js",
|
|
60
|
+
"lib/bridge_intelligence.js"
|
|
61
|
+
]);
|
|
62
|
+
|
|
63
|
+
const REQUIRED_NATIVE_METHODS = Object.freeze([
|
|
64
|
+
"xoonya-native-sha256-v1",
|
|
65
|
+
"xoonya-native-signed-v1",
|
|
66
|
+
"xoonya-native-anchored-v1"
|
|
67
|
+
]);
|
|
68
|
+
|
|
69
|
+
const checks = [];
|
|
70
|
+
function check(name, condition, detail) {
|
|
71
|
+
assert.strictEqual(Boolean(condition), true, detail ? `${name}: ${detail}` : name);
|
|
72
|
+
checks.push(name);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function runNode(args, options = {}) {
|
|
76
|
+
return execFileSync(process.execPath, args, { cwd: ROOT, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"], ...options });
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function verifyPackageManifest() {
|
|
80
|
+
check("package name", packageJson.name === "xoonya");
|
|
81
|
+
check("package main is verify.js", packageJson.main === "verify.js");
|
|
82
|
+
check("package bin is xoonya only", JSON.stringify(packageJson.bin) === JSON.stringify({ xoonya: "bin/xoonya.js" }));
|
|
83
|
+
check("package license Apache-2.0", packageJson.license === "Apache-2.0");
|
|
84
|
+
check("package publish access public", packageJson.publishConfig && packageJson.publishConfig.access === "public");
|
|
85
|
+
check("package prepublishOnly runs the gate", packageJson.scripts && packageJson.scripts.prepublishOnly === "npm run verify:release-candidate");
|
|
86
|
+
check("package files allowlist declared", Array.isArray(packageJson.files) && packageJson.files.length > 0);
|
|
87
|
+
for (const forbidden of FORBIDDEN_PATHS) {
|
|
88
|
+
check(`package files excludes ${forbidden}`, !packageJson.files.some((entry) => entry === forbidden || entry === `${forbidden}/` || entry.startsWith(`${forbidden}/`)));
|
|
89
|
+
}
|
|
90
|
+
check("package description names the verifier role", /verif/i.test(packageJson.description || ""));
|
|
16
91
|
}
|
|
17
92
|
|
|
18
93
|
function verifyReleaseNotes() {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
94
|
+
const notes = fs.readFileSync(path.join(ROOT, "RELEASE_NOTES.md"), "utf8");
|
|
95
|
+
check("release notes do not duplicate the release title heading", !/^#\s+xoonya\s+\d+\.\d+\.\d+\s+Release Notes\s*$/m.test(notes));
|
|
96
|
+
check("release notes mention the package version", notes.includes(`\`xoonya\` ${packageJson.version}`), `expected \`xoonya\` ${packageJson.version}`);
|
|
97
|
+
const mentioned = notes.match(/\b\d+\.\d+\.\d+\b/g) || [];
|
|
98
|
+
check("release notes mention no other version", mentioned.every((version) => version === packageJson.version), `found ${JSON.stringify(Array.from(new Set(mentioned)))}`);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Every shipped JS file may require only Node built-ins or other shipped files.
|
|
102
|
+
function verifyShippedRequires() {
|
|
103
|
+
const builtins = new Set(require("module").builtinModules);
|
|
104
|
+
const shippedJs = PUBLISHED_FILES.filter((entry) => entry.endsWith(".js"));
|
|
105
|
+
for (const file of shippedJs) {
|
|
106
|
+
const source = fs.readFileSync(path.join(ROOT, file), "utf8");
|
|
107
|
+
const pattern = /require\(\s*["']([^"']+)["']\s*\)/g;
|
|
108
|
+
let match;
|
|
109
|
+
while ((match = pattern.exec(source)) !== null) {
|
|
110
|
+
const target = match[1];
|
|
111
|
+
if (target.startsWith(".")) {
|
|
112
|
+
const resolved = path.relative(ROOT, path.resolve(ROOT, path.dirname(file), target)).replace(/\\/g, "/");
|
|
113
|
+
const candidates = [resolved, `${resolved}.js`, `${resolved}.json`];
|
|
114
|
+
check(`${file} requires shipped ${target}`, candidates.some((candidate) => PUBLISHED_FILES.includes(candidate)), `resolved to ${resolved}`);
|
|
115
|
+
} else {
|
|
116
|
+
check(`${file} requires built-in ${target}`, builtins.has(target.replace(/^node:/, "")));
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function verifyPackList() {
|
|
123
|
+
const output = execSync("npm pack --dry-run --json", { cwd: ROOT, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] });
|
|
124
|
+
const parsed = JSON.parse(output);
|
|
125
|
+
const dryRun = Array.isArray(parsed) ? parsed[0] : parsed;
|
|
126
|
+
check("npm pack name", dryRun.name === packageJson.name);
|
|
127
|
+
check("npm pack version", dryRun.version === packageJson.version);
|
|
128
|
+
const packed = dryRun.files.map((entry) => entry.path).sort();
|
|
129
|
+
const expected = PUBLISHED_FILES.slice().sort();
|
|
130
|
+
const extra = packed.filter((entry) => !expected.includes(entry));
|
|
131
|
+
const missing = expected.filter((entry) => !packed.includes(entry));
|
|
132
|
+
check("npm pack file list equals the publish allowlist", extra.length === 0 && missing.length === 0, `extra=${JSON.stringify(extra)} missing=${JSON.stringify(missing)}`);
|
|
133
|
+
for (const forbidden of FORBIDDEN_PATHS) {
|
|
134
|
+
check(`npm pack excludes ${forbidden}`, !packed.some((entry) => entry === forbidden || entry.startsWith(`${forbidden}/`)));
|
|
135
|
+
}
|
|
136
|
+
return packed.length;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function verifyInstalledLayout() {
|
|
140
|
+
for (const forbidden of FORBIDDEN_PATHS) {
|
|
141
|
+
check(`installed package has no ${forbidden}`, !fs.existsSync(path.join(ROOT, forbidden)));
|
|
142
|
+
}
|
|
143
|
+
const libFiles = fs.readdirSync(path.join(ROOT, "lib")).sort();
|
|
144
|
+
check("installed lib/ holds only the two verifier modules", JSON.stringify(libFiles) === JSON.stringify(["external_proof_verify.js", "native_verify.js"]), JSON.stringify(libFiles));
|
|
145
|
+
const scriptFiles = fs.readdirSync(path.join(ROOT, "scripts")).sort();
|
|
146
|
+
check("installed scripts/ holds only the two shipped scripts", JSON.stringify(scriptFiles) === JSON.stringify(["verify_release_candidate.js", "verify_vectors.js"]), JSON.stringify(scriptFiles));
|
|
147
|
+
const binFiles = fs.readdirSync(path.join(ROOT, "bin")).sort();
|
|
148
|
+
check("installed bin/ holds only the dispatcher and first-run", JSON.stringify(binFiles) === JSON.stringify(["xoonya-first-run.js", "xoonya.js"]), JSON.stringify(binFiles));
|
|
149
|
+
for (const file of PUBLISHED_FILES) {
|
|
150
|
+
check(`installed package has ${file}`, fs.existsSync(path.join(ROOT, file)));
|
|
151
|
+
}
|
|
152
|
+
return PUBLISHED_FILES.length;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function verifyVectors(inRepo) {
|
|
156
|
+
const args = [path.join(ROOT, "scripts", "verify_vectors.js"), "--json"];
|
|
157
|
+
if (inRepo) args.push("--require-engine-parity");
|
|
158
|
+
const summary = JSON.parse(runNode(args));
|
|
159
|
+
check("vectors ok", summary.ok === true);
|
|
160
|
+
check("conformance vector count", summary.conformance_count >= 8, String(summary.conformance_count));
|
|
161
|
+
check("adversarial vector count", summary.adversarial_count >= 8, String(summary.adversarial_count));
|
|
162
|
+
check("native atom vectors", summary.native_atom_vector_count >= 1 && summary.native_atom_adversarial_count >= 1);
|
|
163
|
+
for (const method of REQUIRED_NATIVE_METHODS) {
|
|
164
|
+
check(`verification methods include ${method}`, summary.verification_methods.includes(method));
|
|
165
|
+
}
|
|
166
|
+
check("verification methods include xoonya-native-hybrid-v1", summary.verification_methods.includes("xoonya-native-hybrid-v1"));
|
|
167
|
+
check("adversarial reasons include native_hybrid_pq_signature_invalid", summary.adversarial_reasons.includes("native_hybrid_pq_signature_invalid"));
|
|
168
|
+
check("external signature self-test Ed25519", summary.external_signature_checks.EdDSA === true);
|
|
169
|
+
check("external signature self-test ML-DSA-65", summary.external_signature_checks["ML-DSA-65"] === true);
|
|
170
|
+
if (inRepo) {
|
|
171
|
+
check("engine parity checked", summary.engine_parity.checked === true);
|
|
172
|
+
check("engine parity comparisons", summary.engine_parity.comparisons >= 100, String(summary.engine_parity.comparisons));
|
|
173
|
+
} else {
|
|
174
|
+
check("engine not present", summary.engine_parity.checked === false && summary.engine_parity.reason === "engine_not_present");
|
|
175
|
+
}
|
|
176
|
+
return summary;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function verifyCli() {
|
|
180
|
+
const cli = path.join(ROOT, "bin", "xoonya.js");
|
|
181
|
+
const startHere = runNode([cli, "start-here"]);
|
|
182
|
+
check("start-here names the anchored method", startHere.includes("xoonya-native-anchored-v1"));
|
|
183
|
+
check("start-here links the first-run kit", startHere.includes("https://www.naxytra.com/v1/first-run-kit"));
|
|
184
|
+
check("start-here states the verifier role", startHere.includes("this package is the verifier"));
|
|
185
|
+
|
|
186
|
+
const firstRun = JSON.parse(runNode([cli, "first-run", "--verify-native", "--pretty"]));
|
|
187
|
+
check("first-run --verify-native ok", firstRun.ok === true);
|
|
188
|
+
check("first-run required native methods present", firstRun.required_native_methods_present === true);
|
|
189
|
+
|
|
190
|
+
const guide = JSON.parse(runNode([cli, "first-run", "--json", "--offline"]));
|
|
191
|
+
check("first-run guide category", guide.category === "xoonya-first-run-proof-guide");
|
|
192
|
+
|
|
193
|
+
const conformance = JSON.parse(runNode([cli, "conformance", "--json"]));
|
|
194
|
+
check("conformance --json ok", conformance.ok === true);
|
|
195
|
+
check("conformance --json includes anchored method", conformance.verification_methods.includes("xoonya-native-anchored-v1"));
|
|
196
|
+
|
|
197
|
+
for (const command of ["release", "review"]) {
|
|
198
|
+
const result = spawnSync(process.execPath, [cli, command, "--summary"], { cwd: ROOT, encoding: "utf8" });
|
|
199
|
+
check(`${command} command exits 2`, result.status === 2, String(result.status));
|
|
200
|
+
check(`${command} command points to the website`, `${result.stdout}${result.stderr}`.includes("Operator tooling is not part of the xoonya verifier package. See https://www.naxytra.com/xoonya"));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const vectors = JSON.parse(fs.readFileSync(path.join(ROOT, "vectors", "conformance-vectors.json"), "utf8"));
|
|
204
|
+
const anchored = vectors.vectors.find((vector) => vector.expected.receipt.algorithm === "xoonya-native-anchored-v1");
|
|
205
|
+
const bundleFile = path.join(require("os").tmpdir(), `xoonya-rc-bundle-${process.pid}.json`);
|
|
206
|
+
fs.writeFileSync(bundleFile, JSON.stringify({
|
|
207
|
+
version: anchored.expected.proof_bundle_version,
|
|
208
|
+
ceb: anchored.event,
|
|
209
|
+
receipt: anchored.expected.receipt,
|
|
210
|
+
anchors: anchored.anchors
|
|
211
|
+
}));
|
|
212
|
+
try {
|
|
213
|
+
const verified = JSON.parse(runNode([cli, "verify", bundleFile]));
|
|
214
|
+
check("verify <bundle> accepts the anchored vector", verified.valid === true && verified.verification_method === "xoonya-native-anchored-v1");
|
|
215
|
+
const strict = spawnSync(process.execPath, [cli, "verify", bundleFile, "--strict"], { cwd: ROOT, encoding: "utf8" });
|
|
216
|
+
check("verify --strict rejects the digest-class bundle with exit 1", strict.status === 1 && JSON.parse(strict.stdout).reason === "digest_only_not_cryptographically_verified");
|
|
217
|
+
} finally {
|
|
218
|
+
fs.unlinkSync(bundleFile);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function verifyEntry() {
|
|
223
|
+
const entry = require(path.join(ROOT, "verify.js"));
|
|
224
|
+
for (const name of ["verifyNativeProof", "verifyNativeBundle", "verifyProofBundle", "verifyDetachedSignature", "verifyJws", "verifyExternalProofSignature", "verifyxoonyaNativeAtom", "verifyVectors", "canonicalizeEvent", "hashEvent"]) {
|
|
225
|
+
check(`entry exports ${name}`, typeof entry[name] === "function");
|
|
226
|
+
}
|
|
227
|
+
for (const name of ["emitReceipt", "buildProofBundle", "buildNativeSignedReceiptProof", "buildNativeHybridReceiptProof", "createReceipt", "reviewGovernanceCase", "buildBridgeCenter"]) {
|
|
228
|
+
check(`entry does not export engine function ${name}`, entry[name] === undefined);
|
|
229
|
+
}
|
|
230
|
+
check("entry version equals package version", entry.version === packageJson.version);
|
|
231
|
+
check("entry endpoints", entry.endpoints.hosted_service === "https://xoonya.onrender.com" && entry.endpoints.website === "https://www.naxytra.com");
|
|
37
232
|
}
|
|
38
233
|
|
|
39
234
|
function main() {
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
"--candidate",
|
|
43
|
-
"--summary"
|
|
44
|
-
], {
|
|
45
|
-
cwd: path.resolve(__dirname, ".."),
|
|
46
|
-
encoding: "utf8"
|
|
47
|
-
});
|
|
48
|
-
const releaseCandidate = JSON.parse(releaseOutput);
|
|
49
|
-
assert.strictEqual(releaseCandidate.product, "xoonya", "release candidate product mismatch");
|
|
50
|
-
assert.strictEqual(releaseCandidate.publish_access, "public", "release candidate publish access mismatch");
|
|
51
|
-
assert.strictEqual(releaseCandidate.checklist_count >= 5, true, "release candidate checklist count mismatch");
|
|
235
|
+
const inRepo = fs.existsSync(path.join(ROOT, "proof_sdk.js"));
|
|
236
|
+
verifyPackageManifest();
|
|
52
237
|
verifyReleaseNotes();
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
);
|
|
71
|
-
assert.deepStrictEqual(
|
|
72
|
-
conformanceSummary.verification_methods,
|
|
73
|
-
[
|
|
74
|
-
"detached-assertion-v1",
|
|
75
|
-
"did-vc-v1",
|
|
76
|
-
"jwt-assertion-v1",
|
|
77
|
-
"legacy-opreturn-v1",
|
|
78
|
-
"partner-proof-envelope-v1",
|
|
79
|
-
"sd-jwt-vc-v1",
|
|
80
|
-
"signed-envelope-v1",
|
|
81
|
-
"xoonya-native-anchored-v1",
|
|
82
|
-
"xoonya-native-hybrid-v1",
|
|
83
|
-
"xoonya-native-sha256-v1",
|
|
84
|
-
"xoonya-native-signed-v1"
|
|
85
|
-
],
|
|
86
|
-
"conformance methods mismatch"
|
|
87
|
-
);
|
|
88
|
-
|
|
89
|
-
const dryRun = parsePackDryRun();
|
|
90
|
-
assert.strictEqual(dryRun.name, packageJson.name, "npm pack dry-run name mismatch");
|
|
91
|
-
assert.strictEqual(dryRun.version, packageJson.version, "npm pack dry-run version mismatch");
|
|
92
|
-
assert.strictEqual(Array.isArray(dryRun.files), true, "npm pack dry-run file list missing");
|
|
93
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "bin/xoonya.js"), true, "npm pack dry-run missing xoonya cli");
|
|
94
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "bin/xoonya-first-run.js"), true, "npm pack dry-run missing xoonya-first-run");
|
|
95
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "bin/xoonya-review.js"), true, "npm pack dry-run missing xoonya-review");
|
|
96
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "bin/xoonya-release.js"), true, "npm pack dry-run missing xoonya-release");
|
|
97
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "scripts/verify_external_proof_import_gate.js"), true, "npm pack dry-run missing external proof import gate verifier script");
|
|
98
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "scripts/verify_vectors.js"), true, "npm pack dry-run missing conformance verifier script");
|
|
99
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "scripts/verify_reference_python.js"), true, "npm pack dry-run missing Python reference verifier script");
|
|
100
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "scripts/verify_reference_python_crypto.js"), true, "npm pack dry-run missing Python crypto reference verifier script");
|
|
101
|
-
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");
|
|
102
|
-
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");
|
|
103
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "scripts/verify_native_hybrid_design_gate.js"), true, "npm pack dry-run missing native hybrid verifier script");
|
|
104
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "scripts/verify_verification_services.js"), true, "npm pack dry-run missing verification services verifier script");
|
|
105
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "scripts/verify_all.js"), true, "npm pack dry-run missing package verifier script");
|
|
106
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "vectors/conformance-vectors.json"), true, "npm pack dry-run missing conformance vectors");
|
|
107
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "vectors/adversarial-vectors.json"), true, "npm pack dry-run missing adversarial vectors");
|
|
108
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "vectors/native-atom-vectors.json"), true, "npm pack dry-run missing native atom vectors");
|
|
109
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "README.md"), true, "npm pack dry-run missing README");
|
|
110
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "XOONYA_NATIVE_ATOM_SPEC.md"), true, "npm pack dry-run missing native atom spec");
|
|
111
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "XOONYA_NATIVE_STANDARD_GOVERNANCE.md"), true, "npm pack dry-run missing native governance doc");
|
|
112
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "XNYA_CONFORMANCE_MARK.md"), true, "npm pack dry-run missing XNYA conformance mark doc");
|
|
113
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "XNYA_REFERENCE_IMPLEMENTATIONS.md"), true, "npm pack dry-run missing XNYA reference implementations doc");
|
|
114
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "reference/python/xnya_reference.py"), true, "npm pack dry-run missing Python XNYA candidate reference");
|
|
115
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "reference/python/verify_vectors.py"), true, "npm pack dry-run missing Python XNYA vector verifier");
|
|
116
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "reference/python/requirements-optional.txt"), true, "npm pack dry-run missing Python optional requirements");
|
|
117
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "reference/rust/Cargo.toml"), true, "npm pack dry-run missing Rust candidate Cargo manifest");
|
|
118
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "reference/rust/src/lib.rs"), true, "npm pack dry-run missing Rust candidate source");
|
|
119
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "reference/rust/README.md"), true, "npm pack dry-run missing Rust candidate boundary doc");
|
|
120
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "RELEASE_NOTES.md"), true, "npm pack dry-run missing release notes");
|
|
121
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "START_HERE.md"), true, "npm pack dry-run missing start-here");
|
|
122
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "SERVICE_CONTRACT.md"), true, "npm pack dry-run missing service contract");
|
|
123
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "OPERATOR_START_HERE.md"), false, "npm pack dry-run should not ship operator start-here");
|
|
124
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "OPERATIONS_RUNBOOK.md"), false, "npm pack dry-run should not ship operations runbook");
|
|
125
|
-
assert.strictEqual(dryRun.files.some((entry) => entry.path === "PUBLISH_PLAN.md"), false, "npm pack dry-run should not ship publish plan");
|
|
126
|
-
assert.strictEqual(dryRun.files.length >= 10, true, "npm pack dry-run file count too small");
|
|
127
|
-
|
|
128
|
-
console.log("xoonya verify:release-candidate passed");
|
|
238
|
+
verifyShippedRequires();
|
|
239
|
+
const publishedFileCount = inRepo ? verifyPackList() : verifyInstalledLayout();
|
|
240
|
+
const summary = verifyVectors(inRepo);
|
|
241
|
+
verifyCli();
|
|
242
|
+
verifyEntry();
|
|
243
|
+
process.stdout.write(`${JSON.stringify({
|
|
244
|
+
ok: true,
|
|
245
|
+
product: "xoonya",
|
|
246
|
+
category: "xoonya-verifier-release-candidate",
|
|
247
|
+
mode: inRepo ? "source_checkout" : "installed_package",
|
|
248
|
+
version: packageJson.version,
|
|
249
|
+
published_file_count: publishedFileCount,
|
|
250
|
+
conformance_count: summary.conformance_count,
|
|
251
|
+
adversarial_count: summary.adversarial_count,
|
|
252
|
+
verification_method_count: summary.verification_methods.length,
|
|
253
|
+
engine_parity_comparisons: summary.engine_parity.checked ? summary.engine_parity.comparisons : null,
|
|
254
|
+
check_count: checks.length
|
|
255
|
+
})}\n`);
|
|
129
256
|
}
|
|
130
257
|
|
|
131
258
|
main();
|