@noeos/verification-engine 0.0.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/CHANGELOG.md +8 -0
- package/LICENSE +201 -0
- package/NOTICE +11 -0
- package/README.md +7 -0
- package/dist/cjs/api/engine.js +271 -0
- package/dist/cjs/api/types.js +10 -0
- package/dist/cjs/chains/chain-builder.js +541 -0
- package/dist/cjs/chains/duplicate-detector.js +208 -0
- package/dist/cjs/chains/verify-chain.js +656 -0
- package/dist/cjs/contracts/generated.js +512 -0
- package/dist/cjs/contracts/schema-assets.js +6 -0
- package/dist/cjs/contracts/vector-assets.js +6 -0
- package/dist/cjs/domain/algorithm-id.js +5 -0
- package/dist/cjs/domain/byte-view.js +7 -0
- package/dist/cjs/domain/chain.js +3 -0
- package/dist/cjs/domain/diagnostic.js +6 -0
- package/dist/cjs/domain/digest.js +37 -0
- package/dist/cjs/domain/duplicate-policy.js +3 -0
- package/dist/cjs/domain/evidence.js +10 -0
- package/dist/cjs/domain/identifiers.js +52 -0
- package/dist/cjs/domain/json-value.js +3 -0
- package/dist/cjs/domain/limits.js +24 -0
- package/dist/cjs/domain/operation-result.js +19 -0
- package/dist/cjs/domain/position.js +16 -0
- package/dist/cjs/domain/protocol-version.js +5 -0
- package/dist/cjs/domain/rule.js +3 -0
- package/dist/cjs/domain/stream.js +3 -0
- package/dist/cjs/domain/version.js +16 -0
- package/dist/cjs/evidence/digest-evidence.js +22 -0
- package/dist/cjs/evidence/evidence-parser.js +288 -0
- package/dist/cjs/framing/frame-builders.js +124 -0
- package/dist/cjs/framing/frame-encoder.js +238 -0
- package/dist/cjs/framing/frame-parser.js +173 -0
- package/dist/cjs/framing/frame-types.js +3 -0
- package/dist/cjs/hashing/hash-adapter.js +90 -0
- package/dist/cjs/hashing/hash-frame.js +16 -0
- package/dist/cjs/index.js +16 -0
- package/dist/cjs/normalization/byte-sink.js +70 -0
- package/dist/cjs/normalization/jcs-profile.js +154 -0
- package/dist/cjs/normalization/normalize.js +56 -0
- package/dist/cjs/normalization/profile-registry.js +66 -0
- package/dist/cjs/normalization/profile.js +3 -0
- package/dist/cjs/normalization/raw-bytes-profile.js +27 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/profiles.js +9 -0
- package/dist/cjs/records/record-service.js +278 -0
- package/dist/cjs/rules/rule-set.js +211 -0
- package/dist/cjs/schemas.js +6 -0
- package/dist/cjs/validation/algorithm-validation.js +12 -0
- package/dist/cjs/validation/diagnostic-collector.js +159 -0
- package/dist/cjs/validation/digest-validation.js +48 -0
- package/dist/cjs/validation/identifier-validation.js +33 -0
- package/dist/cjs/validation/json-text-parser.js +297 -0
- package/dist/cjs/validation/json-value-validation.js +155 -0
- package/dist/cjs/validation/limit-validation.js +75 -0
- package/dist/cjs/validation/object-inspection.js +60 -0
- package/dist/cjs/validation/position-validation.js +13 -0
- package/dist/cjs/validation/result-helpers.js +9 -0
- package/dist/cjs/validation/utf8-validation.js +69 -0
- package/dist/cjs/validation/version-validation.js +31 -0
- package/dist/cjs/vectors.js +6 -0
- package/dist/esm/api/engine.js +266 -0
- package/dist/esm/api/types.js +4 -0
- package/dist/esm/chains/chain-builder.js +536 -0
- package/dist/esm/chains/duplicate-detector.js +204 -0
- package/dist/esm/chains/verify-chain.js +652 -0
- package/dist/esm/contracts/generated.js +509 -0
- package/dist/esm/contracts/schema-assets.js +2 -0
- package/dist/esm/contracts/vector-assets.js +2 -0
- package/dist/esm/domain/algorithm-id.js +2 -0
- package/dist/esm/domain/byte-view.js +4 -0
- package/dist/esm/domain/chain.js +2 -0
- package/dist/esm/domain/diagnostic.js +3 -0
- package/dist/esm/domain/digest.js +32 -0
- package/dist/esm/domain/duplicate-policy.js +2 -0
- package/dist/esm/domain/evidence.js +7 -0
- package/dist/esm/domain/identifiers.js +45 -0
- package/dist/esm/domain/json-value.js +2 -0
- package/dist/esm/domain/limits.js +21 -0
- package/dist/esm/domain/operation-result.js +15 -0
- package/dist/esm/domain/position.js +12 -0
- package/dist/esm/domain/protocol-version.js +2 -0
- package/dist/esm/domain/rule.js +2 -0
- package/dist/esm/domain/stream.js +2 -0
- package/dist/esm/domain/version.js +12 -0
- package/dist/esm/evidence/digest-evidence.js +19 -0
- package/dist/esm/evidence/evidence-parser.js +281 -0
- package/dist/esm/framing/frame-builders.js +114 -0
- package/dist/esm/framing/frame-encoder.js +234 -0
- package/dist/esm/framing/frame-parser.js +170 -0
- package/dist/esm/framing/frame-types.js +2 -0
- package/dist/esm/hashing/hash-adapter.js +84 -0
- package/dist/esm/hashing/hash-frame.js +12 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/normalization/byte-sink.js +66 -0
- package/dist/esm/normalization/jcs-profile.js +151 -0
- package/dist/esm/normalization/normalize.js +52 -0
- package/dist/esm/normalization/profile-registry.js +62 -0
- package/dist/esm/normalization/profile.js +2 -0
- package/dist/esm/normalization/raw-bytes-profile.js +24 -0
- package/dist/esm/profiles.js +6 -0
- package/dist/esm/records/record-service.js +270 -0
- package/dist/esm/rules/rule-set.js +206 -0
- package/dist/esm/schemas.js +2 -0
- package/dist/esm/validation/algorithm-validation.js +9 -0
- package/dist/esm/validation/diagnostic-collector.js +154 -0
- package/dist/esm/validation/digest-validation.js +43 -0
- package/dist/esm/validation/identifier-validation.js +27 -0
- package/dist/esm/validation/json-text-parser.js +294 -0
- package/dist/esm/validation/json-value-validation.js +152 -0
- package/dist/esm/validation/limit-validation.js +71 -0
- package/dist/esm/validation/object-inspection.js +54 -0
- package/dist/esm/validation/position-validation.js +10 -0
- package/dist/esm/validation/result-helpers.js +6 -0
- package/dist/esm/validation/utf8-validation.js +63 -0
- package/dist/esm/validation/version-validation.js +26 -0
- package/dist/esm/vectors.js +2 -0
- package/dist/types/api/engine.d.ts +8 -0
- package/dist/types/api/types.d.ts +124 -0
- package/dist/types/chains/chain-builder.d.ts +42 -0
- package/dist/types/chains/duplicate-detector.d.ts +18 -0
- package/dist/types/chains/verify-chain.d.ts +9 -0
- package/dist/types/contracts/generated.d.ts +442 -0
- package/dist/types/contracts/schema-assets.d.ts +2 -0
- package/dist/types/contracts/vector-assets.d.ts +2 -0
- package/dist/types/domain/algorithm-id.d.ts +4 -0
- package/dist/types/domain/byte-view.d.ts +1 -0
- package/dist/types/domain/chain.d.ts +43 -0
- package/dist/types/domain/diagnostic.d.ts +23 -0
- package/dist/types/domain/digest.d.ts +12 -0
- package/dist/types/domain/duplicate-policy.d.ts +26 -0
- package/dist/types/domain/evidence.d.ts +100 -0
- package/dist/types/domain/identifiers.d.ts +29 -0
- package/dist/types/domain/json-value.d.ts +6 -0
- package/dist/types/domain/limits.d.ts +13 -0
- package/dist/types/domain/operation-result.d.ts +12 -0
- package/dist/types/domain/position.d.ts +8 -0
- package/dist/types/domain/protocol-version.d.ts +2 -0
- package/dist/types/domain/rule.d.ts +34 -0
- package/dist/types/domain/stream.d.ts +5 -0
- package/dist/types/domain/version.d.ts +8 -0
- package/dist/types/evidence/digest-evidence.d.ts +4 -0
- package/dist/types/evidence/evidence-parser.d.ts +8 -0
- package/dist/types/framing/frame-builders.d.ts +40 -0
- package/dist/types/framing/frame-encoder.d.ts +6 -0
- package/dist/types/framing/frame-parser.d.ts +4 -0
- package/dist/types/framing/frame-types.d.ts +27 -0
- package/dist/types/hashing/hash-adapter.d.ts +12 -0
- package/dist/types/hashing/hash-frame.d.ts +6 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/normalization/byte-sink.d.ts +19 -0
- package/dist/types/normalization/jcs-profile.d.ts +3 -0
- package/dist/types/normalization/normalize.d.ts +11 -0
- package/dist/types/normalization/profile-registry.d.ts +26 -0
- package/dist/types/normalization/profile.d.ts +22 -0
- package/dist/types/normalization/raw-bytes-profile.d.ts +2 -0
- package/dist/types/profiles.d.ts +8 -0
- package/dist/types/records/record-service.d.ts +38 -0
- package/dist/types/rules/rule-set.d.ts +13 -0
- package/dist/types/schemas.d.ts +2 -0
- package/dist/types/validation/algorithm-validation.d.ts +3 -0
- package/dist/types/validation/diagnostic-collector.d.ts +24 -0
- package/dist/types/validation/digest-validation.d.ts +6 -0
- package/dist/types/validation/identifier-validation.d.ts +6 -0
- package/dist/types/validation/json-text-parser.d.ts +4 -0
- package/dist/types/validation/json-value-validation.d.ts +4 -0
- package/dist/types/validation/limit-validation.d.ts +4 -0
- package/dist/types/validation/object-inspection.d.ts +11 -0
- package/dist/types/validation/position-validation.d.ts +3 -0
- package/dist/types/validation/result-helpers.d.ts +3 -0
- package/dist/types/validation/utf8-validation.d.ts +5 -0
- package/dist/types/validation/version-validation.d.ts +9 -0
- package/dist/types/vectors.d.ts +2 -0
- package/package.json +61 -0
- package/schemas/chain-summary.v1.schema.json +156 -0
- package/schemas/diagnostic.v1.schema.json +107 -0
- package/schemas/link-evidence.v1.schema.json +165 -0
- package/schemas/record-evidence.v1.schema.json +91 -0
- package/schemas/vector-set.v1.schema.json +52 -0
- package/vectors/evidence.json +26 -0
- package/vectors/framing.json +136 -0
- package/vectors/hashing.json +58 -0
- package/vectors/invalid.json +56 -0
- package/vectors/manifest.json +46 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
import { validateProfileId } from "./identifier-validation.js";
|
|
3
|
+
import { ProfileVersion as ProfileVersionValue } from "../domain/version.js";
|
|
4
|
+
import { success } from "../domain/operation-result.js";
|
|
5
|
+
import { failureWithCode } from "./result-helpers.js";
|
|
6
|
+
const semverPattern = /^(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-(?:0|[1-9A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9A-Za-z-][0-9A-Za-z-]*))*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/u;
|
|
7
|
+
export function validateProfileVersion(value) {
|
|
8
|
+
if (typeof value !== "string" || value.length > 256 || !semverPattern.test(value)) {
|
|
9
|
+
return failureWithCode("VERSION_INVALID", "input");
|
|
10
|
+
}
|
|
11
|
+
return success(ProfileVersionValue.fromValidated(value));
|
|
12
|
+
}
|
|
13
|
+
export function validateProtocolVersion(value) {
|
|
14
|
+
if (value !== 1)
|
|
15
|
+
return failureWithCode("VERSION_INVALID", "input");
|
|
16
|
+
return success(1);
|
|
17
|
+
}
|
|
18
|
+
export function validateProfileReference(id, version) {
|
|
19
|
+
const idResult = validateProfileId(id);
|
|
20
|
+
if (!idResult.ok)
|
|
21
|
+
return idResult;
|
|
22
|
+
const versionResult = validateProfileVersion(version);
|
|
23
|
+
if (!versionResult.ok)
|
|
24
|
+
return versionResult;
|
|
25
|
+
return success(Object.freeze({ id: idResult.value, version: versionResult.value }));
|
|
26
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Engine, EngineOptions } from "./types.js";
|
|
2
|
+
/** @public */
|
|
3
|
+
export declare function createEngine(options?: EngineOptions): Engine;
|
|
4
|
+
/** @public */
|
|
5
|
+
export declare class EngineConfigurationError extends TypeError {
|
|
6
|
+
readonly code: "INPUT_TYPE_INVALID" | "INPUT_LIMIT_EXCEEDED" | "RULE_VERSION_CONFLICT" | "PROFILE_VERSION_CONFLICT";
|
|
7
|
+
constructor(code: "INPUT_TYPE_INVALID" | "INPUT_LIMIT_EXCEEDED" | "RULE_VERSION_CONFLICT" | "PROFILE_VERSION_CONFLICT");
|
|
8
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { AlgorithmId } from "../domain/algorithm-id.js";
|
|
2
|
+
import type { ChainRecordInput, ChainSnapshot, ProfileReference, RecordInput } from "../domain/chain.js";
|
|
3
|
+
import type { PreviousLink } from "../domain/evidence.js";
|
|
4
|
+
import type { Diagnostic, DiagnosticDetail, DiagnosticPhase, DiagnosticSeverity } from "../domain/diagnostic.js";
|
|
5
|
+
import type { BoundaryState, DiagnosticSummary, ChainSummaryEvidence, Evidence, LinkEvidence, RecordEvidenceFields, RecordEvidence, VerificationResult, VerificationMode, VerificationStats, VerificationStatus, EvidenceProfile } from "../domain/evidence.js";
|
|
6
|
+
import { CHAIN_SUMMARY_EVIDENCE_SCHEMA, LINK_EVIDENCE_SCHEMA, RECORD_EVIDENCE_SCHEMA } from "../domain/evidence.js";
|
|
7
|
+
import type { DiagnosticDetails } from "../domain/diagnostic.js";
|
|
8
|
+
import { DIAGNOSTIC_SCHEMA } from "../domain/diagnostic.js";
|
|
9
|
+
import type { Digest } from "../domain/digest.js";
|
|
10
|
+
import type { Limits } from "../domain/limits.js";
|
|
11
|
+
import type { OperationResult } from "../domain/operation-result.js";
|
|
12
|
+
import type { DuplicateKind, DuplicateObservation, DuplicatePolicy, ExternalDuplicateIndex } from "../domain/duplicate-policy.js";
|
|
13
|
+
import type { Rule, RuleContext, RuleFinding, RulePhase, ReadonlyByteView } from "../domain/rule.js";
|
|
14
|
+
import type { NormalizationInputKind, NormalizationStats } from "../normalization/profile.js";
|
|
15
|
+
export type { AlgorithmId, ChainRecordInput, ChainSummaryEvidence, ChainSnapshot, BoundaryState, Diagnostic, DiagnosticDetail, DiagnosticDetails, DiagnosticPhase, DiagnosticSeverity, DuplicatePolicy, ExternalDuplicateIndex, Digest, DiagnosticSummary, Evidence, EvidenceProfile, DuplicateKind, DuplicateObservation, LinkEvidence, Limits, OperationResult, ProfileReference, PreviousLink, RecordEvidenceFields, RecordEvidence, RecordInput, Rule, RuleContext, RuleFinding, RulePhase, ReadonlyByteView, VerificationResult, VerificationMode, VerificationStats, VerificationStatus, NormalizationInputKind, NormalizationStats, };
|
|
16
|
+
export { CHAIN_SUMMARY_EVIDENCE_SCHEMA, DIAGNOSTIC_SCHEMA, LINK_EVIDENCE_SCHEMA, RECORD_EVIDENCE_SCHEMA, };
|
|
17
|
+
/** @public */
|
|
18
|
+
export interface ByteSink {
|
|
19
|
+
readonly byteLength: number;
|
|
20
|
+
write(value: Uint8Array): void;
|
|
21
|
+
}
|
|
22
|
+
/** @public */
|
|
23
|
+
export interface ProfileManifest {
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly version: string;
|
|
26
|
+
readonly vectorSha256: string;
|
|
27
|
+
readonly limits: Limits;
|
|
28
|
+
readonly license: string;
|
|
29
|
+
}
|
|
30
|
+
/** @public */
|
|
31
|
+
export interface NormalizationProfile<I = unknown> {
|
|
32
|
+
readonly id: string;
|
|
33
|
+
readonly version: string;
|
|
34
|
+
readonly inputKind: NormalizationInputKind;
|
|
35
|
+
readonly manifest: ProfileManifest;
|
|
36
|
+
validate(input: unknown, limits: Limits): OperationResult<I>;
|
|
37
|
+
normalize(input: I, sink: ByteSink, limits: Limits): OperationResult<NormalizationStats>;
|
|
38
|
+
}
|
|
39
|
+
/** @public */
|
|
40
|
+
export type EngineEventName = "operation.started" | "record.validated" | "record.hashed" | "link.created" | "diagnostic.emitted" | "operation.completed" | "operation.aborted";
|
|
41
|
+
/** @public */
|
|
42
|
+
export interface EngineEvent {
|
|
43
|
+
readonly name: EngineEventName;
|
|
44
|
+
readonly operation: string;
|
|
45
|
+
readonly recordsSeen: number;
|
|
46
|
+
readonly bytesNormalized: number;
|
|
47
|
+
readonly code?: string;
|
|
48
|
+
readonly recordId?: string;
|
|
49
|
+
readonly position?: number;
|
|
50
|
+
}
|
|
51
|
+
/** @public */
|
|
52
|
+
export interface EngineOptions {
|
|
53
|
+
readonly profiles?: readonly NormalizationProfile[];
|
|
54
|
+
readonly rules?: readonly Rule[];
|
|
55
|
+
readonly limits?: Partial<Limits>;
|
|
56
|
+
readonly duplicatePolicy?: DuplicatePolicy;
|
|
57
|
+
readonly onEvent?: (event: EngineEvent) => void;
|
|
58
|
+
}
|
|
59
|
+
/** @public */
|
|
60
|
+
export interface VerifyRecordInput {
|
|
61
|
+
readonly payload: unknown;
|
|
62
|
+
readonly evidence: unknown;
|
|
63
|
+
}
|
|
64
|
+
/** @public */
|
|
65
|
+
export interface VerifyChainRecord {
|
|
66
|
+
readonly payload: unknown;
|
|
67
|
+
readonly evidence: unknown;
|
|
68
|
+
}
|
|
69
|
+
/** @public */
|
|
70
|
+
export interface ChainVerificationConfig {
|
|
71
|
+
readonly contextId: string;
|
|
72
|
+
readonly sequenceId: string;
|
|
73
|
+
readonly profile: ProfileReference;
|
|
74
|
+
readonly algorithm: AlgorithmId;
|
|
75
|
+
readonly expectedCount?: number;
|
|
76
|
+
readonly expectedFinalLinkDigest?: string;
|
|
77
|
+
readonly expectedPrevious?: PreviousLink;
|
|
78
|
+
readonly startPosition?: number;
|
|
79
|
+
readonly allowEmpty?: boolean;
|
|
80
|
+
readonly duplicatePolicy?: DuplicatePolicy;
|
|
81
|
+
}
|
|
82
|
+
/** @public */
|
|
83
|
+
export interface VerifyChainInput extends ChainVerificationConfig {
|
|
84
|
+
readonly mode: "complete" | "fragment" | "internal";
|
|
85
|
+
readonly records: Iterable<VerifyChainRecord>;
|
|
86
|
+
}
|
|
87
|
+
/** @public */
|
|
88
|
+
export interface VerifyStreamInput extends ChainVerificationConfig {
|
|
89
|
+
readonly mode: "complete" | "fragment" | "internal";
|
|
90
|
+
readonly records: AsyncIterable<VerifyChainRecord>;
|
|
91
|
+
readonly signal?: AbortSignal;
|
|
92
|
+
}
|
|
93
|
+
/** @public */
|
|
94
|
+
export interface StreamOptions {
|
|
95
|
+
readonly signal?: AbortSignal;
|
|
96
|
+
readonly onEvidence?: (evidence: LinkEvidence) => void | Promise<void>;
|
|
97
|
+
}
|
|
98
|
+
/** @public */
|
|
99
|
+
export interface ChainConfig {
|
|
100
|
+
readonly contextId: string;
|
|
101
|
+
readonly sequenceId: string;
|
|
102
|
+
readonly profile: ProfileReference;
|
|
103
|
+
readonly algorithm: AlgorithmId;
|
|
104
|
+
readonly duplicatePolicy?: DuplicatePolicy;
|
|
105
|
+
readonly allowEmpty?: boolean;
|
|
106
|
+
}
|
|
107
|
+
/** @public */
|
|
108
|
+
export interface ChainBuilder {
|
|
109
|
+
append(input: ChainRecordInput): OperationResult<LinkEvidence>;
|
|
110
|
+
appendAll(input: Iterable<ChainRecordInput>): OperationResult<ChainSummaryEvidence>;
|
|
111
|
+
appendStream(input: AsyncIterable<ChainRecordInput>, options?: StreamOptions): Promise<OperationResult<ChainSummaryEvidence>>;
|
|
112
|
+
snapshot(): ChainSnapshot;
|
|
113
|
+
finalize(): OperationResult<ChainSummaryEvidence>;
|
|
114
|
+
abort(reason?: string): void;
|
|
115
|
+
}
|
|
116
|
+
/** @public */
|
|
117
|
+
export interface Engine {
|
|
118
|
+
hashRecord(input: RecordInput): OperationResult<RecordEvidence>;
|
|
119
|
+
verifyRecord(input: VerifyRecordInput): VerificationResult<RecordEvidence>;
|
|
120
|
+
createChain(config: ChainConfig): ChainBuilder;
|
|
121
|
+
verifyChain(input: VerifyChainInput): VerificationResult<ChainSummaryEvidence>;
|
|
122
|
+
verifyStream(input: VerifyStreamInput): Promise<VerificationResult<ChainSummaryEvidence>>;
|
|
123
|
+
digestEvidence(input: Evidence): OperationResult<Digest>;
|
|
124
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ChainSnapshot } from "../domain/chain.js";
|
|
2
|
+
import type { StreamOptions } from "../domain/stream.js";
|
|
3
|
+
import type { ChainSummaryEvidence, LinkEvidence } from "../domain/evidence.js";
|
|
4
|
+
import type { Limits } from "../domain/limits.js";
|
|
5
|
+
import type { OperationResult } from "../domain/operation-result.js";
|
|
6
|
+
import type { ProfileRegistry } from "../normalization/profile-registry.js";
|
|
7
|
+
export interface ChainBuilderOptions {
|
|
8
|
+
readonly limits: Limits;
|
|
9
|
+
readonly profiles: ProfileRegistry;
|
|
10
|
+
}
|
|
11
|
+
export declare class ChainLifecycleError extends Error {
|
|
12
|
+
readonly code: "BUILDER_FINALIZED" | "BUILDER_FAILED";
|
|
13
|
+
constructor(code: "BUILDER_FINALIZED" | "BUILDER_FAILED");
|
|
14
|
+
}
|
|
15
|
+
export declare class ChainBuilder {
|
|
16
|
+
private readonly config;
|
|
17
|
+
private readonly rules;
|
|
18
|
+
private readonly options;
|
|
19
|
+
private state;
|
|
20
|
+
private nextPosition;
|
|
21
|
+
private previous;
|
|
22
|
+
private firstDigest;
|
|
23
|
+
private finalDigest;
|
|
24
|
+
private readonly diagnostics;
|
|
25
|
+
private count;
|
|
26
|
+
private readonly duplicates;
|
|
27
|
+
private operationActive;
|
|
28
|
+
private readonly recordServiceOptions;
|
|
29
|
+
private constructor();
|
|
30
|
+
static create(input: unknown, options: ChainBuilderOptions): OperationResult<ChainBuilder>;
|
|
31
|
+
append(input: unknown): OperationResult<LinkEvidence>;
|
|
32
|
+
private appendCore;
|
|
33
|
+
appendAll(input: Iterable<unknown>): OperationResult<ChainSummaryEvidence>;
|
|
34
|
+
appendStream(input: AsyncIterable<unknown>, options?: StreamOptions): Promise<OperationResult<ChainSummaryEvidence>>;
|
|
35
|
+
snapshot(): ChainSnapshot;
|
|
36
|
+
finalize(): OperationResult<ChainSummaryEvidence>;
|
|
37
|
+
abort(reason?: string): void;
|
|
38
|
+
private commit;
|
|
39
|
+
private summary;
|
|
40
|
+
private requireActive;
|
|
41
|
+
private requireReadable;
|
|
42
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DuplicatePolicy } from "../domain/duplicate-policy.js";
|
|
2
|
+
import type { LinkEvidence } from "../domain/evidence.js";
|
|
3
|
+
import type { Limits } from "../domain/limits.js";
|
|
4
|
+
import type { OperationResult } from "../domain/operation-result.js";
|
|
5
|
+
import type { Diagnostic } from "../domain/diagnostic.js";
|
|
6
|
+
interface ObservedLink {
|
|
7
|
+
readonly recordId: string;
|
|
8
|
+
readonly contentDigest: string;
|
|
9
|
+
readonly linkDigest: string;
|
|
10
|
+
readonly forkKey: string;
|
|
11
|
+
}
|
|
12
|
+
interface Detector {
|
|
13
|
+
inspect(value: ObservedLink): OperationResult<readonly Diagnostic[]>;
|
|
14
|
+
commit(value: ObservedLink): void;
|
|
15
|
+
}
|
|
16
|
+
export declare function createDuplicateDetector(policy: DuplicatePolicy, limits: Limits): Detector;
|
|
17
|
+
export declare function observedLink(evidence: LinkEvidence): ObservedLink;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ChainSummaryEvidence, VerificationResult } from "../domain/evidence.js";
|
|
2
|
+
import type { Limits } from "../domain/limits.js";
|
|
3
|
+
import type { ProfileRegistry } from "../normalization/profile-registry.js";
|
|
4
|
+
export interface ChainVerificationOptions {
|
|
5
|
+
readonly limits: Limits;
|
|
6
|
+
readonly profiles: ProfileRegistry;
|
|
7
|
+
}
|
|
8
|
+
export declare function verifyChain(input: unknown, options: ChainVerificationOptions): VerificationResult<ChainSummaryEvidence>;
|
|
9
|
+
export declare function verifyChainStream(input: unknown, options: ChainVerificationOptions, signal?: AbortSignal): Promise<VerificationResult<ChainSummaryEvidence>>;
|
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
/** @public */
|
|
2
|
+
export declare const DIAGNOSTIC_CODES: readonly [{
|
|
3
|
+
readonly code: "INPUT_REQUIRED";
|
|
4
|
+
readonly family: "input";
|
|
5
|
+
readonly severity: "error";
|
|
6
|
+
readonly exitCode: 3;
|
|
7
|
+
readonly since: "1.0.0";
|
|
8
|
+
}, {
|
|
9
|
+
readonly code: "INPUT_TYPE_INVALID";
|
|
10
|
+
readonly family: "input";
|
|
11
|
+
readonly severity: "error";
|
|
12
|
+
readonly exitCode: 3;
|
|
13
|
+
readonly since: "1.0.0";
|
|
14
|
+
}, {
|
|
15
|
+
readonly code: "INPUT_LIMIT_EXCEEDED";
|
|
16
|
+
readonly family: "input";
|
|
17
|
+
readonly severity: "error";
|
|
18
|
+
readonly exitCode: 3;
|
|
19
|
+
readonly since: "1.0.0";
|
|
20
|
+
}, {
|
|
21
|
+
readonly code: "IDENTIFIER_INVALID";
|
|
22
|
+
readonly family: "input";
|
|
23
|
+
readonly severity: "error";
|
|
24
|
+
readonly exitCode: 3;
|
|
25
|
+
readonly since: "1.0.0";
|
|
26
|
+
}, {
|
|
27
|
+
readonly code: "VERSION_INVALID";
|
|
28
|
+
readonly family: "input";
|
|
29
|
+
readonly severity: "error";
|
|
30
|
+
readonly exitCode: 3;
|
|
31
|
+
readonly since: "1.0.0";
|
|
32
|
+
}, {
|
|
33
|
+
readonly code: "JSON_SYNTAX_INVALID";
|
|
34
|
+
readonly family: "input";
|
|
35
|
+
readonly severity: "error";
|
|
36
|
+
readonly exitCode: 3;
|
|
37
|
+
readonly since: "1.0.0";
|
|
38
|
+
}, {
|
|
39
|
+
readonly code: "JSON_DUPLICATE_KEY";
|
|
40
|
+
readonly family: "input";
|
|
41
|
+
readonly severity: "error";
|
|
42
|
+
readonly exitCode: 3;
|
|
43
|
+
readonly since: "1.0.0";
|
|
44
|
+
}, {
|
|
45
|
+
readonly code: "JSON_VALUE_UNSUPPORTED";
|
|
46
|
+
readonly family: "input";
|
|
47
|
+
readonly severity: "error";
|
|
48
|
+
readonly exitCode: 3;
|
|
49
|
+
readonly since: "1.0.0";
|
|
50
|
+
}, {
|
|
51
|
+
readonly code: "JSON_NUMBER_UNSAFE";
|
|
52
|
+
readonly family: "input";
|
|
53
|
+
readonly severity: "error";
|
|
54
|
+
readonly exitCode: 3;
|
|
55
|
+
readonly since: "1.0.0";
|
|
56
|
+
}, {
|
|
57
|
+
readonly code: "UTF8_INVALID";
|
|
58
|
+
readonly family: "input";
|
|
59
|
+
readonly severity: "error";
|
|
60
|
+
readonly exitCode: 3;
|
|
61
|
+
readonly since: "1.0.0";
|
|
62
|
+
}, {
|
|
63
|
+
readonly code: "NDJSON_LINE_EMPTY";
|
|
64
|
+
readonly family: "input";
|
|
65
|
+
readonly severity: "error";
|
|
66
|
+
readonly exitCode: 3;
|
|
67
|
+
readonly since: "1.0.0";
|
|
68
|
+
}, {
|
|
69
|
+
readonly code: "NDJSON_LINE_TOO_LARGE";
|
|
70
|
+
readonly family: "input";
|
|
71
|
+
readonly severity: "error";
|
|
72
|
+
readonly exitCode: 3;
|
|
73
|
+
readonly since: "1.0.0";
|
|
74
|
+
}, {
|
|
75
|
+
readonly code: "PROFILE_UNKNOWN";
|
|
76
|
+
readonly family: "profile";
|
|
77
|
+
readonly severity: "error";
|
|
78
|
+
readonly exitCode: 7;
|
|
79
|
+
readonly since: "1.0.0";
|
|
80
|
+
}, {
|
|
81
|
+
readonly code: "PROFILE_VERSION_UNSUPPORTED";
|
|
82
|
+
readonly family: "profile";
|
|
83
|
+
readonly severity: "error";
|
|
84
|
+
readonly exitCode: 7;
|
|
85
|
+
readonly since: "1.0.0";
|
|
86
|
+
}, {
|
|
87
|
+
readonly code: "PROFILE_VERSION_CONFLICT";
|
|
88
|
+
readonly family: "profile";
|
|
89
|
+
readonly severity: "error";
|
|
90
|
+
readonly exitCode: 7;
|
|
91
|
+
readonly since: "1.0.0";
|
|
92
|
+
}, {
|
|
93
|
+
readonly code: "PROFILE_INPUT_KIND_MISMATCH";
|
|
94
|
+
readonly family: "profile";
|
|
95
|
+
readonly severity: "error";
|
|
96
|
+
readonly exitCode: 7;
|
|
97
|
+
readonly since: "1.0.0";
|
|
98
|
+
}, {
|
|
99
|
+
readonly code: "NORMALIZATION_FAILED";
|
|
100
|
+
readonly family: "profile";
|
|
101
|
+
readonly severity: "error";
|
|
102
|
+
readonly exitCode: 7;
|
|
103
|
+
readonly since: "1.0.0";
|
|
104
|
+
}, {
|
|
105
|
+
readonly code: "ALGORITHM_UNKNOWN";
|
|
106
|
+
readonly family: "algorithm";
|
|
107
|
+
readonly severity: "error";
|
|
108
|
+
readonly exitCode: 7;
|
|
109
|
+
readonly since: "1.0.0";
|
|
110
|
+
}, {
|
|
111
|
+
readonly code: "ALGORITHM_FORBIDDEN";
|
|
112
|
+
readonly family: "algorithm";
|
|
113
|
+
readonly severity: "error";
|
|
114
|
+
readonly exitCode: 7;
|
|
115
|
+
readonly since: "1.0.0";
|
|
116
|
+
}, {
|
|
117
|
+
readonly code: "ALGORITHM_VERIFY_ONLY";
|
|
118
|
+
readonly family: "algorithm";
|
|
119
|
+
readonly severity: "warning";
|
|
120
|
+
readonly exitCode: 0;
|
|
121
|
+
readonly since: "1.0.0";
|
|
122
|
+
}, {
|
|
123
|
+
readonly code: "DIGEST_ENCODING_INVALID";
|
|
124
|
+
readonly family: "algorithm";
|
|
125
|
+
readonly severity: "error";
|
|
126
|
+
readonly exitCode: 3;
|
|
127
|
+
readonly since: "1.0.0";
|
|
128
|
+
}, {
|
|
129
|
+
readonly code: "DIGEST_LENGTH_INVALID";
|
|
130
|
+
readonly family: "algorithm";
|
|
131
|
+
readonly severity: "error";
|
|
132
|
+
readonly exitCode: 3;
|
|
133
|
+
readonly since: "1.0.0";
|
|
134
|
+
}, {
|
|
135
|
+
readonly code: "FRAME_MAGIC_INVALID";
|
|
136
|
+
readonly family: "frame";
|
|
137
|
+
readonly severity: "error";
|
|
138
|
+
readonly exitCode: 3;
|
|
139
|
+
readonly since: "1.0.0";
|
|
140
|
+
}, {
|
|
141
|
+
readonly code: "FRAME_VERSION_UNSUPPORTED";
|
|
142
|
+
readonly family: "frame";
|
|
143
|
+
readonly severity: "error";
|
|
144
|
+
readonly exitCode: 7;
|
|
145
|
+
readonly since: "1.0.0";
|
|
146
|
+
}, {
|
|
147
|
+
readonly code: "FRAME_KIND_UNKNOWN";
|
|
148
|
+
readonly family: "frame";
|
|
149
|
+
readonly severity: "error";
|
|
150
|
+
readonly exitCode: 3;
|
|
151
|
+
readonly since: "1.0.0";
|
|
152
|
+
}, {
|
|
153
|
+
readonly code: "FRAME_FIELD_UNKNOWN";
|
|
154
|
+
readonly family: "frame";
|
|
155
|
+
readonly severity: "error";
|
|
156
|
+
readonly exitCode: 3;
|
|
157
|
+
readonly since: "1.0.0";
|
|
158
|
+
}, {
|
|
159
|
+
readonly code: "FRAME_FIELD_MISSING";
|
|
160
|
+
readonly family: "frame";
|
|
161
|
+
readonly severity: "error";
|
|
162
|
+
readonly exitCode: 3;
|
|
163
|
+
readonly since: "1.0.0";
|
|
164
|
+
}, {
|
|
165
|
+
readonly code: "FRAME_FIELD_DUPLICATE";
|
|
166
|
+
readonly family: "frame";
|
|
167
|
+
readonly severity: "error";
|
|
168
|
+
readonly exitCode: 3;
|
|
169
|
+
readonly since: "1.0.0";
|
|
170
|
+
}, {
|
|
171
|
+
readonly code: "FRAME_FIELD_ORDER_INVALID";
|
|
172
|
+
readonly family: "frame";
|
|
173
|
+
readonly severity: "error";
|
|
174
|
+
readonly exitCode: 3;
|
|
175
|
+
readonly since: "1.0.0";
|
|
176
|
+
}, {
|
|
177
|
+
readonly code: "FRAME_FIELD_TYPE_INVALID";
|
|
178
|
+
readonly family: "frame";
|
|
179
|
+
readonly severity: "error";
|
|
180
|
+
readonly exitCode: 3;
|
|
181
|
+
readonly since: "1.0.0";
|
|
182
|
+
}, {
|
|
183
|
+
readonly code: "FRAME_LENGTH_INVALID";
|
|
184
|
+
readonly family: "frame";
|
|
185
|
+
readonly severity: "error";
|
|
186
|
+
readonly exitCode: 3;
|
|
187
|
+
readonly since: "1.0.0";
|
|
188
|
+
}, {
|
|
189
|
+
readonly code: "FRAME_TRAILING_DATA";
|
|
190
|
+
readonly family: "frame";
|
|
191
|
+
readonly severity: "error";
|
|
192
|
+
readonly exitCode: 3;
|
|
193
|
+
readonly since: "1.0.0";
|
|
194
|
+
}, {
|
|
195
|
+
readonly code: "EVIDENCE_SCHEMA_UNKNOWN";
|
|
196
|
+
readonly family: "evidence";
|
|
197
|
+
readonly severity: "error";
|
|
198
|
+
readonly exitCode: 7;
|
|
199
|
+
readonly since: "1.0.0";
|
|
200
|
+
}, {
|
|
201
|
+
readonly code: "EVIDENCE_INVALID";
|
|
202
|
+
readonly family: "evidence";
|
|
203
|
+
readonly severity: "error";
|
|
204
|
+
readonly exitCode: 3;
|
|
205
|
+
readonly since: "1.0.0";
|
|
206
|
+
}, {
|
|
207
|
+
readonly code: "CONTENT_DIGEST_MISMATCH";
|
|
208
|
+
readonly family: "chain";
|
|
209
|
+
readonly severity: "error";
|
|
210
|
+
readonly exitCode: 1;
|
|
211
|
+
readonly since: "1.0.0";
|
|
212
|
+
}, {
|
|
213
|
+
readonly code: "RECORD_DIGEST_MISMATCH";
|
|
214
|
+
readonly family: "chain";
|
|
215
|
+
readonly severity: "error";
|
|
216
|
+
readonly exitCode: 1;
|
|
217
|
+
readonly since: "1.0.0";
|
|
218
|
+
}, {
|
|
219
|
+
readonly code: "RECORD_ID_DUPLICATE";
|
|
220
|
+
readonly family: "chain";
|
|
221
|
+
readonly severity: "error";
|
|
222
|
+
readonly exitCode: 1;
|
|
223
|
+
readonly since: "1.0.0";
|
|
224
|
+
}, {
|
|
225
|
+
readonly code: "CONTENT_DUPLICATE";
|
|
226
|
+
readonly family: "chain";
|
|
227
|
+
readonly severity: "warning";
|
|
228
|
+
readonly exitCode: 0;
|
|
229
|
+
readonly since: "1.0.0";
|
|
230
|
+
}, {
|
|
231
|
+
readonly code: "LINK_DIGEST_DUPLICATE";
|
|
232
|
+
readonly family: "chain";
|
|
233
|
+
readonly severity: "error";
|
|
234
|
+
readonly exitCode: 1;
|
|
235
|
+
readonly since: "1.0.0";
|
|
236
|
+
}, {
|
|
237
|
+
readonly code: "POSITION_MISMATCH";
|
|
238
|
+
readonly family: "chain";
|
|
239
|
+
readonly severity: "error";
|
|
240
|
+
readonly exitCode: 1;
|
|
241
|
+
readonly since: "1.0.0";
|
|
242
|
+
}, {
|
|
243
|
+
readonly code: "PREVIOUS_LINK_MISMATCH";
|
|
244
|
+
readonly family: "chain";
|
|
245
|
+
readonly severity: "error";
|
|
246
|
+
readonly exitCode: 1;
|
|
247
|
+
readonly since: "1.0.0";
|
|
248
|
+
}, {
|
|
249
|
+
readonly code: "LINK_DIGEST_MISMATCH";
|
|
250
|
+
readonly family: "chain";
|
|
251
|
+
readonly severity: "error";
|
|
252
|
+
readonly exitCode: 1;
|
|
253
|
+
readonly since: "1.0.0";
|
|
254
|
+
}, {
|
|
255
|
+
readonly code: "CHAIN_CONFIGURATION_MISMATCH";
|
|
256
|
+
readonly family: "chain";
|
|
257
|
+
readonly severity: "error";
|
|
258
|
+
readonly exitCode: 1;
|
|
259
|
+
readonly since: "1.0.0";
|
|
260
|
+
}, {
|
|
261
|
+
readonly code: "CHAIN_FORK";
|
|
262
|
+
readonly family: "chain";
|
|
263
|
+
readonly severity: "error";
|
|
264
|
+
readonly exitCode: 1;
|
|
265
|
+
readonly since: "1.0.0";
|
|
266
|
+
}, {
|
|
267
|
+
readonly code: "EXPECTED_COUNT_MISMATCH";
|
|
268
|
+
readonly family: "chain";
|
|
269
|
+
readonly severity: "error";
|
|
270
|
+
readonly exitCode: 1;
|
|
271
|
+
readonly since: "1.0.0";
|
|
272
|
+
}, {
|
|
273
|
+
readonly code: "FINAL_LINK_MISMATCH";
|
|
274
|
+
readonly family: "chain";
|
|
275
|
+
readonly severity: "error";
|
|
276
|
+
readonly exitCode: 1;
|
|
277
|
+
readonly since: "1.0.0";
|
|
278
|
+
}, {
|
|
279
|
+
readonly code: "BOUNDARY_UNVERIFIED";
|
|
280
|
+
readonly family: "chain";
|
|
281
|
+
readonly severity: "warning";
|
|
282
|
+
readonly exitCode: 4;
|
|
283
|
+
readonly since: "1.0.0";
|
|
284
|
+
}, {
|
|
285
|
+
readonly code: "EMPTY_CHAIN_FORBIDDEN";
|
|
286
|
+
readonly family: "chain";
|
|
287
|
+
readonly severity: "error";
|
|
288
|
+
readonly exitCode: 1;
|
|
289
|
+
readonly since: "1.0.0";
|
|
290
|
+
}, {
|
|
291
|
+
readonly code: "RULE_FAILED";
|
|
292
|
+
readonly family: "rule";
|
|
293
|
+
readonly severity: "error";
|
|
294
|
+
readonly exitCode: 1;
|
|
295
|
+
readonly since: "1.0.0";
|
|
296
|
+
}, {
|
|
297
|
+
readonly code: "RULE_EXECUTION_FAILED";
|
|
298
|
+
readonly family: "rule";
|
|
299
|
+
readonly severity: "error";
|
|
300
|
+
readonly exitCode: 1;
|
|
301
|
+
readonly since: "1.0.0";
|
|
302
|
+
}, {
|
|
303
|
+
readonly code: "RULE_VERSION_CONFLICT";
|
|
304
|
+
readonly family: "rule";
|
|
305
|
+
readonly severity: "error";
|
|
306
|
+
readonly exitCode: 1;
|
|
307
|
+
readonly since: "1.0.0";
|
|
308
|
+
}, {
|
|
309
|
+
readonly code: "DIAGNOSTIC_LIMIT_REACHED";
|
|
310
|
+
readonly family: "operation";
|
|
311
|
+
readonly severity: "warning";
|
|
312
|
+
readonly exitCode: 0;
|
|
313
|
+
readonly since: "1.0.0";
|
|
314
|
+
}, {
|
|
315
|
+
readonly code: "INPUT_STREAM_FAILED";
|
|
316
|
+
readonly family: "operation";
|
|
317
|
+
readonly severity: "error";
|
|
318
|
+
readonly exitCode: 3;
|
|
319
|
+
readonly since: "1.0.0";
|
|
320
|
+
}, {
|
|
321
|
+
readonly code: "OUTPUT_SINK_FAILED";
|
|
322
|
+
readonly family: "operation";
|
|
323
|
+
readonly severity: "error";
|
|
324
|
+
readonly exitCode: 6;
|
|
325
|
+
readonly since: "1.0.0";
|
|
326
|
+
}, {
|
|
327
|
+
readonly code: "OPERATION_ABORTED";
|
|
328
|
+
readonly family: "operation";
|
|
329
|
+
readonly severity: "info";
|
|
330
|
+
readonly exitCode: 130;
|
|
331
|
+
readonly since: "1.0.0";
|
|
332
|
+
}, {
|
|
333
|
+
readonly code: "RESOURCE_BUDGET_EXCEEDED";
|
|
334
|
+
readonly family: "operation";
|
|
335
|
+
readonly severity: "error";
|
|
336
|
+
readonly exitCode: 5;
|
|
337
|
+
readonly since: "1.0.0";
|
|
338
|
+
}, {
|
|
339
|
+
readonly code: "CONCURRENT_USE_FORBIDDEN";
|
|
340
|
+
readonly family: "operation";
|
|
341
|
+
readonly severity: "error";
|
|
342
|
+
readonly exitCode: 1;
|
|
343
|
+
readonly since: "1.0.0";
|
|
344
|
+
}, {
|
|
345
|
+
readonly code: "BUILDER_FINALIZED";
|
|
346
|
+
readonly family: "operation";
|
|
347
|
+
readonly severity: "error";
|
|
348
|
+
readonly exitCode: 1;
|
|
349
|
+
readonly since: "1.0.0";
|
|
350
|
+
}, {
|
|
351
|
+
readonly code: "BUILDER_FAILED";
|
|
352
|
+
readonly family: "operation";
|
|
353
|
+
readonly severity: "error";
|
|
354
|
+
readonly exitCode: 1;
|
|
355
|
+
readonly since: "1.0.0";
|
|
356
|
+
}, {
|
|
357
|
+
readonly code: "OBSERVER_FAILED";
|
|
358
|
+
readonly family: "operation";
|
|
359
|
+
readonly severity: "warning";
|
|
360
|
+
readonly exitCode: 0;
|
|
361
|
+
readonly since: "1.0.0";
|
|
362
|
+
}, {
|
|
363
|
+
readonly code: "IO_READ_FAILED";
|
|
364
|
+
readonly family: "operation";
|
|
365
|
+
readonly severity: "error";
|
|
366
|
+
readonly exitCode: 6;
|
|
367
|
+
readonly since: "1.0.0";
|
|
368
|
+
}, {
|
|
369
|
+
readonly code: "IO_WRITE_FAILED";
|
|
370
|
+
readonly family: "operation";
|
|
371
|
+
readonly severity: "error";
|
|
372
|
+
readonly exitCode: 6;
|
|
373
|
+
readonly since: "1.0.0";
|
|
374
|
+
}, {
|
|
375
|
+
readonly code: "OUTPUT_EXISTS";
|
|
376
|
+
readonly family: "operation";
|
|
377
|
+
readonly severity: "error";
|
|
378
|
+
readonly exitCode: 6;
|
|
379
|
+
readonly since: "1.0.0";
|
|
380
|
+
}, {
|
|
381
|
+
readonly code: "INTERNAL_INVARIANT_BROKEN";
|
|
382
|
+
readonly family: "operation";
|
|
383
|
+
readonly severity: "error";
|
|
384
|
+
readonly exitCode: 70;
|
|
385
|
+
readonly since: "1.0.0";
|
|
386
|
+
}];
|
|
387
|
+
/** @public */
|
|
388
|
+
export type DiagnosticCode = (typeof DIAGNOSTIC_CODES)[number]["code"];
|
|
389
|
+
/** @public */
|
|
390
|
+
export type DiagnosticSeverity = (typeof DIAGNOSTIC_CODES)[number]["severity"];
|
|
391
|
+
/** @public */
|
|
392
|
+
export type DiagnosticFamily = (typeof DIAGNOSTIC_CODES)[number]["family"];
|
|
393
|
+
/** @public */
|
|
394
|
+
export declare const SCHEMA_ASSETS: readonly [{
|
|
395
|
+
readonly name: "chain-summary";
|
|
396
|
+
readonly id: "urn:noeos:verification-engine:chain-summary:1";
|
|
397
|
+
readonly path: "chain-summary.v1.schema.json";
|
|
398
|
+
}, {
|
|
399
|
+
readonly name: "diagnostic";
|
|
400
|
+
readonly id: "urn:noeos:verification-engine:diagnostic:1";
|
|
401
|
+
readonly path: "diagnostic.v1.schema.json";
|
|
402
|
+
}, {
|
|
403
|
+
readonly name: "link-evidence";
|
|
404
|
+
readonly id: "urn:noeos:verification-engine:link-evidence:1";
|
|
405
|
+
readonly path: "link-evidence.v1.schema.json";
|
|
406
|
+
}, {
|
|
407
|
+
readonly name: "record-evidence";
|
|
408
|
+
readonly id: "urn:noeos:verification-engine:record-evidence:1";
|
|
409
|
+
readonly path: "record-evidence.v1.schema.json";
|
|
410
|
+
}, {
|
|
411
|
+
readonly name: "vector-set";
|
|
412
|
+
readonly id: "urn:noeos:verification-engine:vector-set:1";
|
|
413
|
+
readonly path: "vector-set.v1.schema.json";
|
|
414
|
+
}];
|
|
415
|
+
/** @public */
|
|
416
|
+
export type SchemaName = (typeof SCHEMA_ASSETS)[number]["name"];
|
|
417
|
+
/** @public */
|
|
418
|
+
export type SchemaId = (typeof SCHEMA_ASSETS)[number]["id"];
|
|
419
|
+
/** @public */
|
|
420
|
+
export declare const VECTOR_SET: {
|
|
421
|
+
readonly version: "1.0.0";
|
|
422
|
+
readonly protocolVersion: 1;
|
|
423
|
+
readonly files: readonly [{
|
|
424
|
+
readonly path: "evidence.json";
|
|
425
|
+
readonly category: "evidence";
|
|
426
|
+
readonly sha256: "b4e3b4a38f67e7489eafb05528fd309ee931db66e1a0c230ffbd0e103db1f032";
|
|
427
|
+
}, {
|
|
428
|
+
readonly path: "framing.json";
|
|
429
|
+
readonly category: "framing";
|
|
430
|
+
readonly sha256: "bacc590419dcee44ad0fa3e707d00a9bf322ac51243efc0a0418821fc6c92ea8";
|
|
431
|
+
}, {
|
|
432
|
+
readonly path: "hashing.json";
|
|
433
|
+
readonly category: "hashing";
|
|
434
|
+
readonly sha256: "8722eba9ec01c80bdfa5f08fe13bc4c010b4712f61f417e5e2f748a8cbad44b3";
|
|
435
|
+
}, {
|
|
436
|
+
readonly path: "invalid.json";
|
|
437
|
+
readonly category: "invalid";
|
|
438
|
+
readonly sha256: "05d098aa80412ce8d85aafea1b4ce4add53381e2fe4a4cda1cad88d9fa286fa6";
|
|
439
|
+
}];
|
|
440
|
+
};
|
|
441
|
+
/** @public */
|
|
442
|
+
export type VectorCategory = (typeof VECTOR_SET.files)[number]["category"];
|