enigma-memory 0.1.11 → 0.1.13
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 +8 -0
- package/apps/cli/bin/enigma.mjs +362 -10
- package/deploy/SIMULATION.md +152 -0
- package/deploy/docker-compose.local-production-simulation.yml +237 -0
- package/deploy/docker-compose.production.example.yml +19 -0
- package/deploy/kms-mock.mjs +64 -0
- package/deploy/nginx.local-production-simulation.conf +33 -0
- package/deploy/siem-mock.mjs +50 -0
- package/docs/benchmark-attestation-network.md +488 -0
- package/docs/benchmark-reproducibility.md +19 -2
- package/docs/blockchain-only-mechanisms.md +388 -0
- package/docs/client-connectors.md +512 -0
- package/docs/demo-proof-network.md +275 -0
- package/docs/developer-ecosystem.md +47 -4
- package/docs/developer-proof-quickstart.md +325 -0
- package/docs/enigma-memory-ready-conformance.md +376 -0
- package/docs/enterprise-proof-control-plane.md +365 -0
- package/docs/install-anywhere.md +517 -0
- package/docs/market-category-narrative.md +398 -0
- package/docs/memory-drive-health-model.md +649 -0
- package/docs/memory-drive-strategy.md +458 -0
- package/docs/memory-passport-standard.md +445 -0
- package/docs/novelty-invention-candidates.md +161 -0
- package/docs/privacy-ledger-model.md +229 -0
- package/docs/proof-network-build-notes.md +240 -0
- package/docs/proof-network-claim-boundaries.md +318 -0
- package/docs/proof-network-dashboard-spec.md +773 -0
- package/docs/proof-network-glossary.md +27 -0
- package/docs/proof-network-launch-plan.md +421 -0
- package/docs/proof-network-operator-protocol.md +432 -0
- package/docs/proof-network-roadmap.md +431 -0
- package/docs/proof-network-test-plan.md +216 -0
- package/docs/proof-network-threat-model.md +373 -0
- package/docs/proof-network.md +257 -0
- package/docs/sdk-api.md +132 -10
- package/docs/solana-devnet-acceptance.md +226 -0
- package/docs/solana-proof-rail.md +453 -0
- package/examples/ci/github-actions.yml +6 -3
- package/examples/proof-network-anchor.json +37 -0
- package/examples/proof-network-attestation.json +35 -0
- package/examples/proof-network-grant.json +27 -0
- package/examples/proof-network-packet.json +71 -0
- package/package.json +42 -3
- package/packages/mcp-server/src/index.js +1 -1
- package/packages/proof-network/src/index.js +570 -0
- package/scripts/build-hosted-api-key-lifecycle.mjs +1 -1
- package/scripts/build-hosted-customer-lifecycle.mjs +1 -1
- package/scripts/build-installer-assets.mjs +1 -1
- package/scripts/build-proof-network-packet.mjs +213 -0
- package/scripts/run-standard-memory-benchmarks.mjs +1 -1
- package/scripts/simulate-production-env.mjs +210 -0
- package/scripts/verify-registry-install.mjs +1 -0
- package/scripts/wait-for-backend-ready.mjs +101 -0
- package/specs/goal-completion-audit-v1.schema.json +1 -0
- package/specs/proof-network-anchor-batch-v1.schema.json +125 -0
- package/specs/proof-network-benchmark-attestation-v1.schema.json +103 -0
- package/specs/proof-network-capability-grant-v1.schema.json +132 -0
- package/specs/proof-network-packet-v1.schema.json +171 -0
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
export const PROOF_NETWORK_ANCHOR_BATCH_SCHEMA = 'enigma.proof_network.anchor_batch.v1';
|
|
4
|
+
export const PROOF_NETWORK_CAPABILITY_GRANT_SCHEMA = 'enigma.proof_network.capability_grant.v1';
|
|
5
|
+
export const PROOF_NETWORK_CAPABILITY_REVOCATION_SCHEMA = 'enigma.proof_network.capability_revocation.v1';
|
|
6
|
+
export const PROOF_NETWORK_BENCHMARK_ATTESTATION_SCHEMA = 'enigma.proof_network.benchmark_attestation.v1';
|
|
7
|
+
export const PROOF_NETWORK_PACKET_SCHEMA = 'enigma.proof_network.packet.v1';
|
|
8
|
+
|
|
9
|
+
export const ANCHOR_BATCH_SCHEMA = PROOF_NETWORK_ANCHOR_BATCH_SCHEMA;
|
|
10
|
+
export const CAPABILITY_GRANT_SCHEMA = PROOF_NETWORK_CAPABILITY_GRANT_SCHEMA;
|
|
11
|
+
export const CAPABILITY_REVOCATION_SCHEMA = PROOF_NETWORK_CAPABILITY_REVOCATION_SCHEMA;
|
|
12
|
+
export const BENCHMARK_ATTESTATION_SCHEMA = PROOF_NETWORK_BENCHMARK_ATTESTATION_SCHEMA;
|
|
13
|
+
export const PACKET_SCHEMA = PROOF_NETWORK_PACKET_SCHEMA;
|
|
14
|
+
|
|
15
|
+
export const PROOF_NETWORK_SCHEMAS = Object.freeze({
|
|
16
|
+
anchor_batch: PROOF_NETWORK_ANCHOR_BATCH_SCHEMA,
|
|
17
|
+
capability_grant: PROOF_NETWORK_CAPABILITY_GRANT_SCHEMA,
|
|
18
|
+
capability_revocation: PROOF_NETWORK_CAPABILITY_REVOCATION_SCHEMA,
|
|
19
|
+
benchmark_attestation: PROOF_NETWORK_BENCHMARK_ATTESTATION_SCHEMA,
|
|
20
|
+
packet: PROOF_NETWORK_PACKET_SCHEMA,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const SHA256_PREFIX = 'sha256:';
|
|
24
|
+
const REF_RE = /^[a-z0-9][a-z0-9._:/@+-]{2,191}$/u;
|
|
25
|
+
const ROOT_RE = /^sha256:[a-f0-9]{64}$/u;
|
|
26
|
+
const SIGNATURE_REF_RE = /^(?:ed25519|secp256k1|signature):[A-Za-z0-9._~+/=-]{16,256}$/u;
|
|
27
|
+
const SCOPE_RE = /^[a-z][a-z0-9._:-]{1,63}$/u;
|
|
28
|
+
const SAFE_BOOLEAN_BOUNDARIES = Object.freeze({
|
|
29
|
+
transaction_submitted: false,
|
|
30
|
+
raw_memory_on_chain: false,
|
|
31
|
+
provider_deletion_claim: false,
|
|
32
|
+
model_forgetting_claim: false,
|
|
33
|
+
hosted_saas_claim: false,
|
|
34
|
+
});
|
|
35
|
+
const SAFE_FIELD_NAMES = new Set(Object.keys(SAFE_BOOLEAN_BOUNDARIES));
|
|
36
|
+
const FORBIDDEN_KEY_RE = /(?:^|_)(?:raw|plaintext|plain_text|prompt|prompts|message|messages|text|content|document|documents|transcript|transcripts|completion|completions|embedding|embeddings|acl|acl_body|access_control_list|provider_response|provider_responses|response_body|credential|credentials|api_key|secret|password|private_key|seed|seed_phrase|mnemonic|tenant_name|customer_name|organization_name|org_name)(?:$|_)/iu;
|
|
37
|
+
const SECRET_VALUE_RE = /(?:Bearer\s+[A-Za-z0-9._~+/=-]{12,}|Basic\s+[A-Za-z0-9+/=-]{12,}|-----BEGIN [A-Z ]*PRIVATE KEY-----|https?:\/\/[^\s/@]+:[^\s/@]+@|sk-[A-Za-z0-9_-]{16,}|AKIA[0-9A-Z]{16}|(?:seed phrase|mnemonic phrase|raw memory|private prompt|full transcript|provider response|embedding vector))/iu;
|
|
38
|
+
const SUPPORTED_ARTIFACT_SCHEMAS = new Set(Object.values(PROOF_NETWORK_SCHEMAS));
|
|
39
|
+
|
|
40
|
+
function isPlainObject(value) {
|
|
41
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function assertJsonValue(value, path = 'value') {
|
|
45
|
+
if (value === null) return;
|
|
46
|
+
if (Array.isArray(value)) {
|
|
47
|
+
value.forEach((item, index) => assertJsonValue(item, `${path}[${index}]`));
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
switch (typeof value) {
|
|
51
|
+
case 'string':
|
|
52
|
+
case 'number':
|
|
53
|
+
case 'boolean':
|
|
54
|
+
if (typeof value === 'number' && !Number.isFinite(value)) throw new TypeError(`${path} must be finite`);
|
|
55
|
+
return;
|
|
56
|
+
case 'object':
|
|
57
|
+
if (!isPlainObject(value)) throw new TypeError(`${path} must be JSON-serializable`);
|
|
58
|
+
for (const [key, child] of Object.entries(value)) {
|
|
59
|
+
if (child === undefined) throw new TypeError(`${path}.${key} must not be undefined`);
|
|
60
|
+
assertJsonValue(child, `${path}.${key}`);
|
|
61
|
+
}
|
|
62
|
+
return;
|
|
63
|
+
default:
|
|
64
|
+
throw new TypeError(`${path} must be JSON-serializable`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function canonicalize(value) {
|
|
69
|
+
assertJsonValue(value);
|
|
70
|
+
if (Array.isArray(value)) return value.map(canonicalize);
|
|
71
|
+
if (isPlainObject(value)) {
|
|
72
|
+
const out = {};
|
|
73
|
+
for (const key of Object.keys(value).sort()) out[key] = canonicalize(value[key]);
|
|
74
|
+
return out;
|
|
75
|
+
}
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function assertNoPrivateProofPayload(value, path = 'proof') {
|
|
80
|
+
if (typeof value === 'string') {
|
|
81
|
+
if (SECRET_VALUE_RE.test(value)) throw new TypeError(`${path} contains private or secret-looking data`);
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
if (Array.isArray(value)) {
|
|
85
|
+
value.forEach((item, index) => assertNoPrivateProofPayload(item, `${path}[${index}]`));
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
if (!isPlainObject(value)) return value;
|
|
89
|
+
for (const [key, child] of Object.entries(value)) {
|
|
90
|
+
if (FORBIDDEN_KEY_RE.test(key) && !SAFE_FIELD_NAMES.has(key)) throw new TypeError(`${path}.${key} is not allowed in proof-network artifacts`);
|
|
91
|
+
if (SAFE_FIELD_NAMES.has(key) && child !== false) throw new TypeError(`${path}.${key} must be false`);
|
|
92
|
+
assertNoPrivateProofPayload(child, `${path}.${key}`);
|
|
93
|
+
}
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function sha256Json(value) {
|
|
98
|
+
assertNoPrivateProofPayload(value);
|
|
99
|
+
return `${SHA256_PREFIX}${createHash('sha256').update(JSON.stringify(canonicalize(value))).digest('hex')}`;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function requiredObject(value, field) {
|
|
103
|
+
if (!isPlainObject(value)) throw new TypeError(`${field} must be an object`);
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function requiredString(value, field) {
|
|
108
|
+
if (typeof value !== 'string' || value.trim().length === 0) throw new TypeError(`${field} must be a non-empty string`);
|
|
109
|
+
return value.trim();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function optionalString(value, fallback, field) {
|
|
113
|
+
if (value === undefined || value === null || value === '') return fallback;
|
|
114
|
+
return requiredString(value, field);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function publicRef(value, field) {
|
|
118
|
+
const string = requiredString(value, field);
|
|
119
|
+
if (!REF_RE.test(string)) throw new TypeError(`${field} must be an opaque public ref`);
|
|
120
|
+
return string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function optionalPublicRef(value, fallback, field) {
|
|
124
|
+
if (value === undefined || value === null || value === '') return fallback;
|
|
125
|
+
return publicRef(value, field);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function digestRef(value, field) {
|
|
129
|
+
const string = requiredString(value, field);
|
|
130
|
+
if (!ROOT_RE.test(string)) throw new TypeError(`${field} must be a sha256-prefixed digest`);
|
|
131
|
+
return string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function optionalDigestRef(value, fallback, field) {
|
|
135
|
+
if (value === undefined || value === null || value === '') return fallback;
|
|
136
|
+
return digestRef(value, field);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function refFromDigest(prefix, digest) {
|
|
140
|
+
return `${prefix}:${digest.slice(SHA256_PREFIX.length, SHA256_PREFIX.length + 32)}`;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
function signatureRef(value, field) {
|
|
145
|
+
const string = requiredString(value, field);
|
|
146
|
+
if (!SIGNATURE_REF_RE.test(string)) throw new TypeError(`${field} must be an opaque signature ref`);
|
|
147
|
+
return string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function optionalSignatureRef(value, fallback, field) {
|
|
151
|
+
if (value === undefined || value === null || value === '') return fallback;
|
|
152
|
+
return signatureRef(value, field);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function isoTimestamp(value, field, fallback = '1970-01-01T00:00:00.000Z') {
|
|
156
|
+
const timestamp = optionalString(value, fallback, field);
|
|
157
|
+
if (Number.isNaN(Date.parse(timestamp))) throw new TypeError(`${field} must be ISO-parseable`);
|
|
158
|
+
return timestamp;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function nonNegativeInteger(value, field, fallback = 0) {
|
|
162
|
+
const number = Number(value ?? fallback);
|
|
163
|
+
if (!Number.isInteger(number) || number < 0) throw new TypeError(`${field} must be a non-negative integer`);
|
|
164
|
+
return number;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function positiveInteger(value, field) {
|
|
168
|
+
const number = Number(value);
|
|
169
|
+
if (!Number.isInteger(number) || number <= 0) throw new TypeError(`${field} must be a positive integer`);
|
|
170
|
+
return number;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function publicScopes(value, field) {
|
|
174
|
+
const scopes = Array.isArray(value) ? value : [value];
|
|
175
|
+
if (scopes.length === 0 || scopes.length > 32) throw new TypeError(`${field} must contain 1-32 scopes`);
|
|
176
|
+
return Object.freeze([...new Set(scopes.map((scope, index) => {
|
|
177
|
+
const string = requiredString(scope, `${field}[${index}]`);
|
|
178
|
+
if (!SCOPE_RE.test(string)) throw new TypeError(`${field}[${index}] must be a public scope token`);
|
|
179
|
+
return string;
|
|
180
|
+
}))].sort());
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function digestArray(value, field, { min = 1, max = 64 } = {}) {
|
|
184
|
+
const list = Array.isArray(value) ? value : [value];
|
|
185
|
+
if (list.length < min || list.length > max) throw new TypeError(`${field} must contain ${min}-${max} digest refs`);
|
|
186
|
+
return Object.freeze(list.map((item, index) => digestRef(item, `${field}[${index}]`)));
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function publicRefArray(value, field, { min = 0, max = 64 } = {}) {
|
|
190
|
+
const list = value === undefined || value === null ? [] : (Array.isArray(value) ? value : [value]);
|
|
191
|
+
if (list.length < min || list.length > max) throw new TypeError(`${field} must contain ${min}-${max} refs`);
|
|
192
|
+
return Object.freeze(list.map((item, index) => publicRef(item, `${field}[${index}]`)).sort());
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function arrayInput(value) {
|
|
196
|
+
if (value === undefined || value === null) return [];
|
|
197
|
+
return Array.isArray(value) ? value : [value];
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function firstDefined(...values) {
|
|
201
|
+
return values.find((value) => value !== undefined && value !== null);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
function commitmentKind(value) {
|
|
206
|
+
const kind = optionalString(value, 'memory_root', 'kind');
|
|
207
|
+
if (!SCOPE_RE.test(kind)) throw new TypeError('kind must be a public scope token');
|
|
208
|
+
return kind;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function normalizeCommitment(item, index) {
|
|
212
|
+
if (typeof item === 'string') {
|
|
213
|
+
return Object.freeze({ kind: 'memory_root', root: digestRef(item, `roots[${index}]`) });
|
|
214
|
+
}
|
|
215
|
+
const object = requiredObject(item, `commitments[${index}]`);
|
|
216
|
+
const commitment = {
|
|
217
|
+
kind: commitmentKind(object.kind),
|
|
218
|
+
root: digestRef(object.root ?? object.commitment_root ?? object.commitmentRoot, `commitments[${index}].root`),
|
|
219
|
+
};
|
|
220
|
+
const ref = object.ref ?? object.public_ref ?? object.publicRef;
|
|
221
|
+
if (ref !== undefined && ref !== null && ref !== '') commitment.ref = publicRef(ref, `commitments[${index}].ref`);
|
|
222
|
+
const count = object.count ?? object.leaf_count ?? object.leafCount;
|
|
223
|
+
if (count !== undefined && count !== null) commitment.count = positiveInteger(count, `commitments[${index}].count`);
|
|
224
|
+
return Object.freeze(commitment);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function normalizeCommitments(input) {
|
|
228
|
+
const raw = firstDefined(
|
|
229
|
+
input.commitments,
|
|
230
|
+
input.memory_roots,
|
|
231
|
+
input.memoryRoots,
|
|
232
|
+
input.roots,
|
|
233
|
+
input.commitment_roots,
|
|
234
|
+
input.commitmentRoots,
|
|
235
|
+
input.event_roots,
|
|
236
|
+
input.eventRoots,
|
|
237
|
+
);
|
|
238
|
+
const refs = publicRefArray(input.refs ?? input.artifact_refs ?? input.artifactRefs, 'refs', { min: 0, max: 64 });
|
|
239
|
+
const list = arrayInput(raw).map((item, index) => {
|
|
240
|
+
if (typeof item === 'string' && refs[index]) return { kind: 'memory_root', root: item, ref: refs[index] };
|
|
241
|
+
return item;
|
|
242
|
+
});
|
|
243
|
+
if (list.length === 0 || raw === undefined || raw === null) throw new TypeError('commitments must be non-empty');
|
|
244
|
+
return Object.freeze(list.map(normalizeCommitment).sort(compareCommitments));
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
function compareCommitments(a, b) {
|
|
248
|
+
return `${a.kind}:${a.root}:${a.ref ?? ''}`.localeCompare(`${b.kind}:${b.root}:${b.ref ?? ''}`);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function freezeArtifact(body, idField, hashField, prefix) {
|
|
252
|
+
const hash = sha256Json(body);
|
|
253
|
+
const artifact = Object.freeze({ ...body, [idField]: `${prefix}_${hash.slice(SHA256_PREFIX.length, SHA256_PREFIX.length + 32)}`, [hashField]: hash });
|
|
254
|
+
assertNoPrivateProofPayload(artifact);
|
|
255
|
+
return artifact;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function bodyWithoutIdentity(artifact, idField, hashField) {
|
|
259
|
+
const { [idField]: _id, [hashField]: _hash, ...body } = artifact;
|
|
260
|
+
return body;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
function requireSafeBoundaries(artifact, errors, path = 'artifact') {
|
|
264
|
+
for (const [key, expected] of Object.entries(SAFE_BOOLEAN_BOUNDARIES)) {
|
|
265
|
+
if (artifact?.[key] !== expected) errors.push(`${path}.${key} must be ${expected}`);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
function collectValidation(validate) {
|
|
270
|
+
const errors = [];
|
|
271
|
+
try {
|
|
272
|
+
validate(errors);
|
|
273
|
+
} catch (error) {
|
|
274
|
+
errors.push(error instanceof Error ? error.message : String(error));
|
|
275
|
+
}
|
|
276
|
+
return Object.freeze({ ok: errors.length === 0, valid: errors.length === 0, errors: Object.freeze(errors) });
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function validateIdentity(artifact, errors, idField, hashField, prefix) {
|
|
280
|
+
const body = bodyWithoutIdentity(artifact, idField, hashField);
|
|
281
|
+
const expectedHash = sha256Json(body);
|
|
282
|
+
const expectedId = `${prefix}_${expectedHash.slice(SHA256_PREFIX.length, SHA256_PREFIX.length + 32)}`;
|
|
283
|
+
if (artifact[hashField] !== expectedHash) errors.push(`${hashField} mismatch`);
|
|
284
|
+
if (artifact[idField] !== expectedId) errors.push(`${idField} mismatch`);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
function artifactHash(artifact, index) {
|
|
288
|
+
switch (artifact?.schema) {
|
|
289
|
+
case PROOF_NETWORK_ANCHOR_BATCH_SCHEMA:
|
|
290
|
+
return requiredString(artifact.anchor_batch_hash, `artifacts[${index}].anchor_batch_hash`);
|
|
291
|
+
case PROOF_NETWORK_CAPABILITY_GRANT_SCHEMA:
|
|
292
|
+
return requiredString(artifact.capability_grant_hash, `artifacts[${index}].capability_grant_hash`);
|
|
293
|
+
case PROOF_NETWORK_CAPABILITY_REVOCATION_SCHEMA:
|
|
294
|
+
return requiredString(artifact.capability_revocation_hash, `artifacts[${index}].capability_revocation_hash`);
|
|
295
|
+
case PROOF_NETWORK_BENCHMARK_ATTESTATION_SCHEMA:
|
|
296
|
+
return requiredString(artifact.benchmark_attestation_hash, `artifacts[${index}].benchmark_attestation_hash`);
|
|
297
|
+
case PROOF_NETWORK_PACKET_SCHEMA:
|
|
298
|
+
return requiredString(artifact.proof_network_packet_hash, `artifacts[${index}].proof_network_packet_hash`);
|
|
299
|
+
default:
|
|
300
|
+
throw new TypeError(`artifacts[${index}] has unsupported schema`);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
function validateSupportedArtifact(artifact) {
|
|
305
|
+
switch (artifact?.schema) {
|
|
306
|
+
case PROOF_NETWORK_ANCHOR_BATCH_SCHEMA:
|
|
307
|
+
return validateProofNetworkAnchorBatch(artifact);
|
|
308
|
+
case PROOF_NETWORK_CAPABILITY_GRANT_SCHEMA:
|
|
309
|
+
return validateCapabilityGrant(artifact);
|
|
310
|
+
case PROOF_NETWORK_CAPABILITY_REVOCATION_SCHEMA:
|
|
311
|
+
return validateCapabilityRevocation(artifact);
|
|
312
|
+
case PROOF_NETWORK_BENCHMARK_ATTESTATION_SCHEMA:
|
|
313
|
+
return validateBenchmarkAttestation(artifact);
|
|
314
|
+
case PROOF_NETWORK_PACKET_SCHEMA:
|
|
315
|
+
return validateProofNetworkPacket(artifact);
|
|
316
|
+
default:
|
|
317
|
+
return Object.freeze({ ok: false, valid: false, errors: Object.freeze(['unsupported artifact schema']) });
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export function createProofNetworkAnchorBatch(input = {}) {
|
|
322
|
+
requiredObject(input, 'input');
|
|
323
|
+
assertNoPrivateProofPayload(input, 'input');
|
|
324
|
+
const commitments = normalizeCommitments(input);
|
|
325
|
+
const commitmentRoot = sha256Json(commitments);
|
|
326
|
+
const body = {
|
|
327
|
+
schema: PROOF_NETWORK_ANCHOR_BATCH_SCHEMA,
|
|
328
|
+
generated_at: isoTimestamp(input.generated_at ?? input.generatedAt ?? input.created_at ?? input.createdAt, 'generated_at'),
|
|
329
|
+
anchor_ref: optionalPublicRef(input.anchor_ref ?? input.anchorRef ?? input.batch_ref ?? input.batchRef, refFromDigest('anchor', commitmentRoot), 'anchor_ref'),
|
|
330
|
+
chain: optionalPublicRef(input.chain ?? input.network ?? input.public_chain_ref ?? input.publicChainRef, 'solana', 'chain'),
|
|
331
|
+
cluster_ref: optionalPublicRef(input.cluster_ref ?? input.clusterRef ?? input.cluster, 'solana:mainnet-ready', 'cluster_ref'),
|
|
332
|
+
commitment_count: commitments.length,
|
|
333
|
+
root_count: commitments.length,
|
|
334
|
+
commitment_root: commitmentRoot,
|
|
335
|
+
commitments,
|
|
336
|
+
solana_ready_anchor: Object.freeze({
|
|
337
|
+
payload_hash: commitmentRoot,
|
|
338
|
+
account_derivation_ref: `proofnet:${commitmentRoot.slice(SHA256_PREFIX.length, SHA256_PREFIX.length + 32)}`,
|
|
339
|
+
instruction_ref: optionalPublicRef(input.instruction_ref ?? input.instructionRef, 'proof-network-anchor-batch-v1', 'instruction_ref'),
|
|
340
|
+
opaque_payload_only: true,
|
|
341
|
+
}),
|
|
342
|
+
...SAFE_BOOLEAN_BOUNDARIES,
|
|
343
|
+
};
|
|
344
|
+
return freezeArtifact(body, 'anchor_batch_id', 'anchor_batch_hash', 'pna');
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export function validateProofNetworkAnchorBatch(batch) {
|
|
348
|
+
return collectValidation((errors) => {
|
|
349
|
+
requiredObject(batch, 'batch');
|
|
350
|
+
assertNoPrivateProofPayload(batch, 'batch');
|
|
351
|
+
if (batch.schema !== PROOF_NETWORK_ANCHOR_BATCH_SCHEMA) errors.push(`schema must be ${PROOF_NETWORK_ANCHOR_BATCH_SCHEMA}`);
|
|
352
|
+
requireSafeBoundaries(batch, errors, 'batch');
|
|
353
|
+
isoTimestamp(batch.generated_at, 'generated_at');
|
|
354
|
+
publicRef(batch.anchor_ref, 'anchor_ref');
|
|
355
|
+
publicRef(batch.chain, 'chain');
|
|
356
|
+
publicRef(batch.cluster_ref, 'cluster_ref');
|
|
357
|
+
const commitments = normalizeCommitments({ commitments: batch.commitments });
|
|
358
|
+
if (batch.commitment_count !== commitments.length) errors.push('commitment_count mismatch');
|
|
359
|
+
if (batch.root_count !== undefined && batch.root_count !== commitments.length) errors.push('root_count mismatch');
|
|
360
|
+
const expectedRoot = sha256Json(commitments);
|
|
361
|
+
if (batch.commitment_root !== expectedRoot) errors.push('commitment_root mismatch');
|
|
362
|
+
if (batch.solana_ready_anchor?.payload_hash !== expectedRoot) errors.push('solana_ready_anchor.payload_hash mismatch');
|
|
363
|
+
if (batch.solana_ready_anchor?.opaque_payload_only !== true) errors.push('solana_ready_anchor.opaque_payload_only must be true');
|
|
364
|
+
publicRef(batch.solana_ready_anchor?.instruction_ref, 'solana_ready_anchor.instruction_ref');
|
|
365
|
+
validateIdentity(batch, errors, 'anchor_batch_id', 'anchor_batch_hash', 'pna');
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export function createCapabilityGrant(input = {}) {
|
|
370
|
+
requiredObject(input, 'input');
|
|
371
|
+
assertNoPrivateProofPayload(input, 'input');
|
|
372
|
+
const resourceRoots = digestArray(input.resource_roots ?? input.resourceRoots ?? input.scope_hashes ?? input.scopeHashes ?? input.scope_roots ?? input.scopeRoots ?? input.policy_hash ?? input.policyHash ?? input.policy_root ?? input.policyRoot ?? input.proof_root ?? input.proofRoot ?? input.roots, 'resource_roots', { min: 1, max: 64 });
|
|
373
|
+
const resourceRoot = sha256Json(resourceRoots);
|
|
374
|
+
const grantRef = optionalPublicRef(input.grant_ref ?? input.grantRef, refFromDigest('grant', resourceRoot), 'grant_ref');
|
|
375
|
+
const body = {
|
|
376
|
+
schema: PROOF_NETWORK_CAPABILITY_GRANT_SCHEMA,
|
|
377
|
+
issued_at: isoTimestamp(input.issued_at ?? input.issuedAt, 'issued_at'),
|
|
378
|
+
expires_at: isoTimestamp(input.expires_at ?? input.expiresAt, 'expires_at', '2100-01-01T00:00:00.000Z'),
|
|
379
|
+
grant_ref: grantRef,
|
|
380
|
+
issuer_ref: publicRef(input.issuer_ref ?? input.issuerRef, 'issuer_ref'),
|
|
381
|
+
subject_ref: publicRef(input.subject_ref ?? input.subjectRef, 'subject_ref'),
|
|
382
|
+
audience_ref: optionalPublicRef(input.audience_ref ?? input.audienceRef, 'audience:proof-network', 'audience_ref'),
|
|
383
|
+
scopes: publicScopes(input.scopes ?? input.scope ?? input.capability_scope ?? input.capabilityScope ?? input.capability, 'scopes'),
|
|
384
|
+
resource_root: resourceRoot,
|
|
385
|
+
resource_roots: resourceRoots,
|
|
386
|
+
max_uses: nonNegativeInteger(input.max_uses ?? input.maxUses, 'max_uses', 0),
|
|
387
|
+
nonce_hash: optionalDigestRef(input.nonce_hash ?? input.nonceHash, sha256Json({ grant_ref: grantRef, resource_roots: resourceRoots }), 'nonce_hash'),
|
|
388
|
+
...((input.signature_ref ?? input.signatureRef) ? { signature_ref: signatureRef(input.signature_ref ?? input.signatureRef, 'signature_ref') } : {}),
|
|
389
|
+
...SAFE_BOOLEAN_BOUNDARIES,
|
|
390
|
+
};
|
|
391
|
+
if (Date.parse(body.expires_at) <= Date.parse(body.issued_at)) throw new RangeError('expires_at must be after issued_at');
|
|
392
|
+
return freezeArtifact(body, 'capability_grant_id', 'capability_grant_hash', 'png');
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export function validateCapabilityGrant(grant) {
|
|
396
|
+
return collectValidation((errors) => {
|
|
397
|
+
requiredObject(grant, 'grant');
|
|
398
|
+
assertNoPrivateProofPayload(grant, 'grant');
|
|
399
|
+
if (grant.schema !== PROOF_NETWORK_CAPABILITY_GRANT_SCHEMA) errors.push(`schema must be ${PROOF_NETWORK_CAPABILITY_GRANT_SCHEMA}`);
|
|
400
|
+
requireSafeBoundaries(grant, errors, 'grant');
|
|
401
|
+
isoTimestamp(grant.issued_at, 'issued_at');
|
|
402
|
+
isoTimestamp(grant.expires_at, 'expires_at');
|
|
403
|
+
if (Date.parse(grant.expires_at) <= Date.parse(grant.issued_at)) errors.push('expires_at must be after issued_at');
|
|
404
|
+
publicRef(grant.grant_ref, 'grant_ref');
|
|
405
|
+
publicRef(grant.issuer_ref, 'issuer_ref');
|
|
406
|
+
publicRef(grant.subject_ref, 'subject_ref');
|
|
407
|
+
publicRef(grant.audience_ref, 'audience_ref');
|
|
408
|
+
const resourceRoots = digestArray(grant.resource_roots, 'resource_roots', { min: 1, max: 64 });
|
|
409
|
+
if (grant.resource_root !== sha256Json(resourceRoots)) errors.push('resource_root mismatch');
|
|
410
|
+
publicScopes(grant.scopes, 'scopes');
|
|
411
|
+
nonNegativeInteger(grant.max_uses, 'max_uses');
|
|
412
|
+
digestRef(grant.nonce_hash, 'nonce_hash');
|
|
413
|
+
if (grant.signature_ref !== undefined) signatureRef(grant.signature_ref, 'signature_ref');
|
|
414
|
+
validateIdentity(grant, errors, 'capability_grant_id', 'capability_grant_hash', 'png');
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export function createCapabilityRevocation(input = {}) {
|
|
419
|
+
requiredObject(input, 'input');
|
|
420
|
+
assertNoPrivateProofPayload(input, 'input');
|
|
421
|
+
const grantHash = digestRef(input.grant_hash ?? input.grantHash, 'grant_hash');
|
|
422
|
+
const nullifierRoot = optionalDigestRef(input.nullifier_root ?? input.nullifierRoot ?? input.nullifier_hash ?? input.nullifierHash, sha256Json({ grant_hash: grantHash, reason_ref: input.reason_ref ?? input.reasonRef ?? input.revocation_reason ?? input.revocationReason ?? 'reason:unspecified' }), 'nullifier_root');
|
|
423
|
+
const revocationRef = optionalPublicRef(input.revocation_ref ?? input.revocationRef, refFromDigest('revocation', grantHash), 'revocation_ref');
|
|
424
|
+
const grantId = optionalPublicRef(input.grant_id ?? input.grantId, refFromDigest('grant', grantHash), 'grant_id');
|
|
425
|
+
const nullifierRef = optionalPublicRef(input.nullifier_ref ?? input.nullifierRef, refFromDigest('nullifier', nullifierRoot), 'nullifier_ref');
|
|
426
|
+
const body = {
|
|
427
|
+
schema: PROOF_NETWORK_CAPABILITY_REVOCATION_SCHEMA,
|
|
428
|
+
revoked_at: isoTimestamp(input.revoked_at ?? input.revokedAt, 'revoked_at'),
|
|
429
|
+
revocation_ref: revocationRef,
|
|
430
|
+
grant_id: grantId,
|
|
431
|
+
grant_hash: grantHash,
|
|
432
|
+
issuer_ref: optionalPublicRef(input.issuer_ref ?? input.issuerRef, 'issuer:proof-network', 'issuer_ref'),
|
|
433
|
+
reason_ref: optionalPublicRef(input.reason_ref ?? input.reasonRef ?? input.revocation_reason ?? input.revocationReason, 'reason:unspecified', 'reason_ref'),
|
|
434
|
+
nullifier_ref: nullifierRef,
|
|
435
|
+
nullifier_root: nullifierRoot,
|
|
436
|
+
...((input.signature_ref ?? input.signatureRef) ? { signature_ref: signatureRef(input.signature_ref ?? input.signatureRef, 'signature_ref') } : {}),
|
|
437
|
+
...SAFE_BOOLEAN_BOUNDARIES,
|
|
438
|
+
};
|
|
439
|
+
return freezeArtifact(body, 'capability_revocation_id', 'capability_revocation_hash', 'pnr');
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export function validateCapabilityRevocation(revocation) {
|
|
443
|
+
return collectValidation((errors) => {
|
|
444
|
+
requiredObject(revocation, 'revocation');
|
|
445
|
+
assertNoPrivateProofPayload(revocation, 'revocation');
|
|
446
|
+
if (revocation.schema !== PROOF_NETWORK_CAPABILITY_REVOCATION_SCHEMA) errors.push(`schema must be ${PROOF_NETWORK_CAPABILITY_REVOCATION_SCHEMA}`);
|
|
447
|
+
requireSafeBoundaries(revocation, errors, 'revocation');
|
|
448
|
+
isoTimestamp(revocation.revoked_at, 'revoked_at');
|
|
449
|
+
publicRef(revocation.revocation_ref, 'revocation_ref');
|
|
450
|
+
publicRef(revocation.grant_id, 'grant_id');
|
|
451
|
+
digestRef(revocation.grant_hash, 'grant_hash');
|
|
452
|
+
publicRef(revocation.issuer_ref, 'issuer_ref');
|
|
453
|
+
publicRef(revocation.reason_ref, 'reason_ref');
|
|
454
|
+
publicRef(revocation.nullifier_ref, 'nullifier_ref');
|
|
455
|
+
digestRef(revocation.nullifier_root, 'nullifier_root');
|
|
456
|
+
if (revocation.signature_ref !== undefined) signatureRef(revocation.signature_ref, 'signature_ref');
|
|
457
|
+
validateIdentity(revocation, errors, 'capability_revocation_id', 'capability_revocation_hash', 'pnr');
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export function createBenchmarkAttestation(input = {}) {
|
|
462
|
+
requiredObject(input, 'input');
|
|
463
|
+
assertNoPrivateProofPayload(input, 'input');
|
|
464
|
+
const reportHash = digestRef(input.report_hash ?? input.reportHash ?? input.report_file_hash ?? input.reportFileHash, 'report_hash');
|
|
465
|
+
const metricRoots = digestArray(input.metric_roots ?? input.metricRoots ?? input.metrics_hash ?? input.metricsHash ?? input.result_roots ?? input.resultRoots ?? input.score_refs ?? input.scoreRefs ?? reportHash, 'metric_roots', { min: 1, max: 64 });
|
|
466
|
+
const body = {
|
|
467
|
+
schema: PROOF_NETWORK_BENCHMARK_ATTESTATION_SCHEMA,
|
|
468
|
+
attested_at: isoTimestamp(input.attested_at ?? input.attestedAt ?? input.generated_at ?? input.generatedAt ?? input.created_at ?? input.createdAt, 'attested_at'),
|
|
469
|
+
benchmark_ref: optionalPublicRef(input.benchmark_ref ?? input.benchmarkRef, 'benchmark:memory-v1', 'benchmark_ref'),
|
|
470
|
+
dataset_ref: publicRef(input.dataset_ref ?? input.datasetRef, 'dataset_ref'),
|
|
471
|
+
runner_ref: publicRef(input.runner_ref ?? input.runnerRef, 'runner_ref'),
|
|
472
|
+
package_ref: publicRef(input.package_ref ?? input.packageRef, 'package_ref'),
|
|
473
|
+
report_hash: reportHash,
|
|
474
|
+
metric_root: sha256Json(metricRoots),
|
|
475
|
+
metric_roots: metricRoots,
|
|
476
|
+
sample_count: nonNegativeInteger(input.sample_count ?? input.sampleCount, 'sample_count', 0),
|
|
477
|
+
run_count: positiveInteger(input.run_count ?? input.runCount ?? 1, 'run_count'),
|
|
478
|
+
...((input.signature_ref ?? input.signatureRef) ? { signature_ref: signatureRef(input.signature_ref ?? input.signatureRef, 'signature_ref') } : {}),
|
|
479
|
+
...SAFE_BOOLEAN_BOUNDARIES,
|
|
480
|
+
};
|
|
481
|
+
return freezeArtifact(body, 'benchmark_attestation_id', 'benchmark_attestation_hash', 'pnb');
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export function validateBenchmarkAttestation(attestation) {
|
|
485
|
+
return collectValidation((errors) => {
|
|
486
|
+
requiredObject(attestation, 'attestation');
|
|
487
|
+
assertNoPrivateProofPayload(attestation, 'attestation');
|
|
488
|
+
if (attestation.schema !== PROOF_NETWORK_BENCHMARK_ATTESTATION_SCHEMA) errors.push(`schema must be ${PROOF_NETWORK_BENCHMARK_ATTESTATION_SCHEMA}`);
|
|
489
|
+
requireSafeBoundaries(attestation, errors, 'attestation');
|
|
490
|
+
isoTimestamp(attestation.attested_at, 'attested_at');
|
|
491
|
+
publicRef(attestation.benchmark_ref, 'benchmark_ref');
|
|
492
|
+
publicRef(attestation.dataset_ref, 'dataset_ref');
|
|
493
|
+
publicRef(attestation.runner_ref, 'runner_ref');
|
|
494
|
+
publicRef(attestation.package_ref, 'package_ref');
|
|
495
|
+
digestRef(attestation.report_hash, 'report_hash');
|
|
496
|
+
const metricRoots = digestArray(attestation.metric_roots, 'metric_roots', { min: 1, max: 64 });
|
|
497
|
+
if (attestation.metric_root !== sha256Json(metricRoots)) errors.push('metric_root mismatch');
|
|
498
|
+
nonNegativeInteger(attestation.sample_count, 'sample_count');
|
|
499
|
+
positiveInteger(attestation.run_count, 'run_count');
|
|
500
|
+
if (attestation.signature_ref !== undefined) signatureRef(attestation.signature_ref, 'signature_ref');
|
|
501
|
+
validateIdentity(attestation, errors, 'benchmark_attestation_id', 'benchmark_attestation_hash', 'pnb');
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export function createProofNetworkPacket(input = {}) {
|
|
506
|
+
requiredObject(input, 'input');
|
|
507
|
+
assertNoPrivateProofPayload(input, 'input');
|
|
508
|
+
const artifacts = Object.freeze([
|
|
509
|
+
...arrayInput(input.artifacts),
|
|
510
|
+
...arrayInput(input.anchor_batch ?? input.anchorBatch),
|
|
511
|
+
...arrayInput(input.anchor_batches ?? input.anchorBatches),
|
|
512
|
+
...arrayInput(input.capability_grants ?? input.capabilityGrants),
|
|
513
|
+
...arrayInput(input.grants),
|
|
514
|
+
...arrayInput(input.capability_revocations ?? input.capabilityRevocations),
|
|
515
|
+
...arrayInput(input.revocations),
|
|
516
|
+
...arrayInput(input.benchmark_attestations ?? input.benchmarkAttestations),
|
|
517
|
+
...arrayInput(input.attestations),
|
|
518
|
+
]);
|
|
519
|
+
if (artifacts.length === 0) throw new TypeError('artifacts must be non-empty');
|
|
520
|
+
if (artifacts.length > 128) throw new TypeError('artifacts must contain at most 128 entries');
|
|
521
|
+
const validatedArtifacts = Object.freeze(artifacts.map((artifact, index) => {
|
|
522
|
+
requiredObject(artifact, `artifacts[${index}]`);
|
|
523
|
+
if (!SUPPORTED_ARTIFACT_SCHEMAS.has(artifact.schema) || artifact.schema === PROOF_NETWORK_PACKET_SCHEMA) throw new TypeError(`artifacts[${index}] has unsupported schema`);
|
|
524
|
+
const validation = validateSupportedArtifact(artifact);
|
|
525
|
+
if (!validation.ok) throw new TypeError(`artifacts[${index}] is invalid: ${validation.errors.join('; ')}`);
|
|
526
|
+
return Object.freeze(artifact);
|
|
527
|
+
}));
|
|
528
|
+
const artifactHashes = Object.freeze(validatedArtifacts.map(artifactHash).sort());
|
|
529
|
+
const artifactRoot = sha256Json(artifactHashes);
|
|
530
|
+
const body = {
|
|
531
|
+
schema: PROOF_NETWORK_PACKET_SCHEMA,
|
|
532
|
+
created_at: isoTimestamp(input.created_at ?? input.createdAt ?? input.generated_at ?? input.generatedAt, 'created_at'),
|
|
533
|
+
packet_ref: optionalPublicRef(input.packet_ref ?? input.packetRef, refFromDigest('packet', artifactRoot), 'packet_ref'),
|
|
534
|
+
artifact_count: validatedArtifacts.length,
|
|
535
|
+
artifact_root: artifactRoot,
|
|
536
|
+
artifact_hashes: artifactHashes,
|
|
537
|
+
artifacts: validatedArtifacts,
|
|
538
|
+
...SAFE_BOOLEAN_BOUNDARIES,
|
|
539
|
+
};
|
|
540
|
+
return freezeArtifact(body, 'proof_network_packet_id', 'proof_network_packet_hash', 'pnp');
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export function validateProofNetworkPacket(packet) {
|
|
544
|
+
return collectValidation((errors) => {
|
|
545
|
+
requiredObject(packet, 'packet');
|
|
546
|
+
assertNoPrivateProofPayload(packet, 'packet');
|
|
547
|
+
if (packet.schema !== PROOF_NETWORK_PACKET_SCHEMA) errors.push(`schema must be ${PROOF_NETWORK_PACKET_SCHEMA}`);
|
|
548
|
+
requireSafeBoundaries(packet, errors, 'packet');
|
|
549
|
+
isoTimestamp(packet.created_at, 'created_at');
|
|
550
|
+
publicRef(packet.packet_ref, 'packet_ref');
|
|
551
|
+
const artifacts = Array.isArray(packet.artifacts) ? packet.artifacts : [];
|
|
552
|
+
if (artifacts.length === 0 || artifacts.length > 128) errors.push('artifacts must contain 1-128 entries');
|
|
553
|
+
const artifactHashes = [];
|
|
554
|
+
for (const [index, artifact] of artifacts.entries()) {
|
|
555
|
+
requiredObject(artifact, `artifacts[${index}]`);
|
|
556
|
+
if (artifact.schema === PROOF_NETWORK_PACKET_SCHEMA) {
|
|
557
|
+
errors.push(`artifacts[${index}] must not be a nested packet`);
|
|
558
|
+
continue;
|
|
559
|
+
}
|
|
560
|
+
const validation = validateSupportedArtifact(artifact);
|
|
561
|
+
if (!validation.ok) errors.push(`artifacts[${index}] is invalid: ${validation.errors.join('; ')}`);
|
|
562
|
+
artifactHashes.push(artifactHash(artifact, index));
|
|
563
|
+
}
|
|
564
|
+
artifactHashes.sort();
|
|
565
|
+
if (packet.artifact_count !== artifacts.length) errors.push('artifact_count mismatch');
|
|
566
|
+
if (packet.artifact_root !== sha256Json(artifactHashes)) errors.push('artifact_root mismatch');
|
|
567
|
+
if (JSON.stringify(packet.artifact_hashes) !== JSON.stringify(artifactHashes)) errors.push('artifact_hashes mismatch');
|
|
568
|
+
validateIdentity(packet, errors, 'proof_network_packet_id', 'proof_network_packet_hash', 'pnp');
|
|
569
|
+
});
|
|
570
|
+
}
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from '../packages/hosted-cloud/src/index.js';
|
|
14
14
|
|
|
15
15
|
export const HOSTED_API_KEY_LIFECYCLE_PACKET_SCHEMA = HOSTED_CLOUD_API_KEY_LIFECYCLE_PACKET_SCHEMA;
|
|
16
|
-
export const HOSTED_API_KEY_LIFECYCLE_RELEASE_TARGET = '0.1.
|
|
16
|
+
export const HOSTED_API_KEY_LIFECYCLE_RELEASE_TARGET = '0.1.13';
|
|
17
17
|
|
|
18
18
|
const PROVIDED = 'provided';
|
|
19
19
|
const BLOCKED = 'blocked_external_dependency';
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from 'enigma-memory/hosted-cloud';
|
|
29
29
|
|
|
30
30
|
export const HOSTED_CUSTOMER_LIFECYCLE_PACKET_SCHEMA = HOSTED_CLOUD_CUSTOMER_LIFECYCLE_PACKET_SCHEMA;
|
|
31
|
-
export const HOSTED_CUSTOMER_LIFECYCLE_RELEASE_TARGET = '0.1.
|
|
31
|
+
export const HOSTED_CUSTOMER_LIFECYCLE_RELEASE_TARGET = '0.1.13';
|
|
32
32
|
|
|
33
33
|
const PROVIDED = 'provided';
|
|
34
34
|
const BLOCKED_MISSING = 'blocked_missing_evidence';
|
|
@@ -6,7 +6,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
6
6
|
|
|
7
7
|
export const INSTALLER_ASSET_SCHEMA = 'enigma.installer_assets.v1';
|
|
8
8
|
export const INSTALLER_ASSET_PACKAGE = 'enigma-memory';
|
|
9
|
-
export const INSTALLER_ASSET_VERSION = '0.1.
|
|
9
|
+
export const INSTALLER_ASSET_VERSION = '0.1.13';
|
|
10
10
|
export const INSTALLER_ASSET_GENERATED_AT = '1970-01-01T00:00:00.000Z';
|
|
11
11
|
|
|
12
12
|
const SCRIPT_PATH = fileURLToPath(import.meta.url);
|