@onlineapps/service-validator-core 1.0.6 → 1.0.8
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 +24 -0
- package/jest.config.js +1 -1
- package/package.json +1 -1
- package/src/types/ValidationProofSchema.js +1 -1
- package/{test → tests}/component/validation-flow.test.js +1 -1
- package/{test → tests}/integration/real-validation.test.js +1 -1
- package/{test → tests}/unit/ValidationCore.test.js +1 -1
package/README.md
CHANGED
|
@@ -81,6 +81,30 @@ Validates health check configuration:
|
|
|
81
81
|
- **TokenManager** - Generates and verifies pre-validation tokens
|
|
82
82
|
- **CertificateManager** - Issues and verifies cryptographic certificates
|
|
83
83
|
|
|
84
|
+
### Validation Proof Structure
|
|
85
|
+
|
|
86
|
+
**Official format** (returned by `ValidationProofCodec.encode()`):
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"validationProof": "<SHA256-hash-64-chars>",
|
|
90
|
+
"validationData": {
|
|
91
|
+
"serviceName": "hello-service",
|
|
92
|
+
"version": "1.0.0",
|
|
93
|
+
"validator": "@onlineapps/conn-orch-validator",
|
|
94
|
+
"validatorVersion": "2.0.6",
|
|
95
|
+
"validatedAt": "2025-10-23T06:53:12.996Z",
|
|
96
|
+
"testsRun": 3,
|
|
97
|
+
"testsPassed": 3,
|
|
98
|
+
"testsFailed": 0,
|
|
99
|
+
"durationMs": 151
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**IMPORTANT:** Always use `validationProof` and `validationData` keys (NOT `hash`/`data`).
|
|
105
|
+
|
|
106
|
+
See [ValidationProofCodec.js](src/security/ValidationProofCodec.js) and [ValidationProofSchema.js](src/types/ValidationProofSchema.js) for complete specification.
|
|
107
|
+
|
|
84
108
|
## API
|
|
85
109
|
|
|
86
110
|
### ValidationCore(config)
|
package/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@ class ValidationProofSchema {
|
|
|
35
35
|
type: 'string',
|
|
36
36
|
required: true,
|
|
37
37
|
description: 'Name of the validator that generated the proof',
|
|
38
|
-
example: '@onlineapps/conn-
|
|
38
|
+
example: '@onlineapps/conn-orch-validator'
|
|
39
39
|
},
|
|
40
40
|
validatorVersion: {
|
|
41
41
|
type: 'string',
|
|
@@ -2,7 +2,7 @@ const ValidationCore = require('../../src/index');
|
|
|
2
2
|
const fs = require('fs').promises;
|
|
3
3
|
const path = require('path');
|
|
4
4
|
|
|
5
|
-
describe('ValidationCore Integration Tests', () => {
|
|
5
|
+
describe('ValidationCore Integration Tests @integration', () => {
|
|
6
6
|
let validationCore;
|
|
7
7
|
|
|
8
8
|
beforeEach(() => {
|