@oxdeai/conformance 1.3.0 → 2.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 +101 -0
- package/LICENSE +213 -0
- package/README.md +217 -5
- package/dist/evidence-metadata.json +3489 -0
- package/dist/scripts/build-evidence-metadata.d.mts +1 -0
- package/dist/scripts/build-evidence-metadata.mjs +7 -0
- package/dist/scripts/build-evidence-metadata.mjs.map +1 -0
- package/dist/scripts/extract-vectors.js +228 -22
- package/dist/scripts/extract-vectors.js.map +1 -1
- package/dist/src/evidenceScope.d.mts +68 -0
- package/dist/src/evidenceScope.mjs +127 -0
- package/dist/src/evidenceScope.mjs.map +1 -0
- package/dist/src/fixtures/conformance-engine-secret.fixture.d.ts +5 -0
- package/dist/src/fixtures/conformance-engine-secret.fixture.js +7 -0
- package/dist/src/fixtures/conformance-engine-secret.fixture.js.map +1 -0
- package/dist/src/fixtures/ed25519.test-only.fixture.d.ts +1 -1
- package/dist/src/fixtures/ed25519.test-only.fixture.js +2 -1
- package/dist/src/fixtures/ed25519.test-only.fixture.js.map +1 -1
- package/dist/src/fixtures/krl-ed25519.test-only.fixture.d.ts +13 -0
- package/dist/src/fixtures/krl-ed25519.test-only.fixture.js +19 -0
- package/dist/src/fixtures/krl-ed25519.test-only.fixture.js.map +1 -0
- package/dist/src/trustedTimeConformance.d.ts +32 -0
- package/dist/src/trustedTimeConformance.js +484 -0
- package/dist/src/trustedTimeConformance.js.map +1 -0
- package/dist/src/validate-trusted-time.d.ts +1 -0
- package/dist/src/validate-trusted-time.js +14 -0
- package/dist/src/validate-trusted-time.js.map +1 -0
- package/dist/src/validate.d.ts +1 -0
- package/dist/src/validate.js +723 -31
- package/dist/src/validate.js.map +1 -1
- package/package.json +37 -12
- package/vectors/audit-chain.json +2 -2
- package/vectors/authorization-payload.json +46 -34
- package/vectors/authorization-signature-verification.json +39 -1
- package/vectors/authorization-verification.json +54 -1
- package/vectors/clock-semantics-verification.json +136 -0
- package/vectors/delegation-chain-verification.json +366 -0
- package/vectors/delegation-parent-hash.json +54 -0
- package/vectors/delegation-signature-verification.json +317 -0
- package/vectors/delegation-verification.json +252 -0
- package/vectors/envelope-verification.json +3 -3
- package/vectors/key-lifecycle-verification.json +131 -0
- package/vectors/profile-c-state-verification.json +217 -0
- package/vectors/signed-krl-verification.json +103 -0
- package/vectors/trusted-time.json +50 -0
- package/dist/extract-vectors.js +0 -416
- package/scripts/extract-vectors.ts +0 -466
- package/src/fixtures/README.md +0 -11
- package/src/fixtures/ed25519.test-only.fixture.ts +0 -14
- package/src/validate.ts +0 -828
- package/tsconfig.json +0 -14
package/dist/extract-vectors.js
DELETED
|
@@ -1,416 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @oxdeai/conformance — Vector Extraction Script
|
|
3
|
-
*
|
|
4
|
-
* Generates frozen conformance vectors against @oxdeai/core@1.0.0.
|
|
5
|
-
*/
|
|
6
|
-
import * as fs from "node:fs";
|
|
7
|
-
import * as path from "node:path";
|
|
8
|
-
import { createHash } from "node:crypto";
|
|
9
|
-
import { sha256HexFromJson, encodeCanonicalState, decodeCanonicalState, verifySnapshot, verifyEnvelope, encodeEnvelope, PolicyEngine } from "@oxdeai/core";
|
|
10
|
-
const BINDING_FIELDS = [
|
|
11
|
-
"intent_id",
|
|
12
|
-
"agent_id",
|
|
13
|
-
"action_type",
|
|
14
|
-
"depth",
|
|
15
|
-
"amount",
|
|
16
|
-
"asset",
|
|
17
|
-
"target",
|
|
18
|
-
"timestamp",
|
|
19
|
-
"metadata_hash",
|
|
20
|
-
"nonce",
|
|
21
|
-
"type",
|
|
22
|
-
"authorization_id",
|
|
23
|
-
"tool",
|
|
24
|
-
"tool_call"
|
|
25
|
-
];
|
|
26
|
-
function canonicalize(value) {
|
|
27
|
-
if (value === undefined)
|
|
28
|
-
return null;
|
|
29
|
-
if (typeof value === "bigint")
|
|
30
|
-
return value.toString();
|
|
31
|
-
if (Array.isArray(value))
|
|
32
|
-
return value.map(canonicalize);
|
|
33
|
-
if (typeof value === "object" && value !== null) {
|
|
34
|
-
const out = {};
|
|
35
|
-
for (const k of Object.keys(value).sort()) {
|
|
36
|
-
out[k] = canonicalize(value[k]);
|
|
37
|
-
}
|
|
38
|
-
return out;
|
|
39
|
-
}
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
function canonicalJson(value) {
|
|
43
|
-
return JSON.stringify(canonicalize(value));
|
|
44
|
-
}
|
|
45
|
-
function sha256hexUtf8(input) {
|
|
46
|
-
return createHash("sha256").update(input, "utf8").digest("hex");
|
|
47
|
-
}
|
|
48
|
-
function writeVector(filename, data) {
|
|
49
|
-
const dir = path.resolve(process.cwd(), "vectors");
|
|
50
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
51
|
-
fs.writeFileSync(path.join(dir, filename), JSON.stringify(data, (_k, v) => (typeof v === "bigint" ? v.toString() : v), 2), "utf8");
|
|
52
|
-
console.log(`wrote ${filename}`);
|
|
53
|
-
}
|
|
54
|
-
const ENGINE_SECRET = "test-secret";
|
|
55
|
-
function makeEngine() {
|
|
56
|
-
return new PolicyEngine({
|
|
57
|
-
policy_version: "v1.0.0",
|
|
58
|
-
engine_secret: ENGINE_SECRET,
|
|
59
|
-
authorization_ttl_seconds: 60,
|
|
60
|
-
policyId: "a".repeat(64)
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
function makeState() {
|
|
64
|
-
return {
|
|
65
|
-
policy_version: "v1.0.0",
|
|
66
|
-
period_id: "period-1",
|
|
67
|
-
kill_switch: { global: false, agents: {} },
|
|
68
|
-
allowlists: {},
|
|
69
|
-
budget: {
|
|
70
|
-
budget_limit: { "agent-1": 5000000n },
|
|
71
|
-
spent_in_period: { "agent-1": 0n }
|
|
72
|
-
},
|
|
73
|
-
max_amount_per_action: { "agent-1": 2000000n },
|
|
74
|
-
velocity: {
|
|
75
|
-
config: { window_seconds: 60, max_actions: 10 },
|
|
76
|
-
counters: {}
|
|
77
|
-
},
|
|
78
|
-
replay: {
|
|
79
|
-
window_seconds: 300,
|
|
80
|
-
max_nonces_per_agent: 256,
|
|
81
|
-
nonces: {}
|
|
82
|
-
},
|
|
83
|
-
concurrency: {
|
|
84
|
-
max_concurrent: { "agent-1": 3 },
|
|
85
|
-
active: {},
|
|
86
|
-
active_auths: {}
|
|
87
|
-
},
|
|
88
|
-
recursion: {
|
|
89
|
-
max_depth: { "agent-1": 5 }
|
|
90
|
-
},
|
|
91
|
-
tool_limits: {
|
|
92
|
-
window_seconds: 60,
|
|
93
|
-
max_calls: { "agent-1": 50 },
|
|
94
|
-
calls: {}
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
function makeIntent(nonce, timestamp, extra) {
|
|
99
|
-
return {
|
|
100
|
-
intent_id: `intent-${nonce.toString()}`,
|
|
101
|
-
agent_id: "agent-1",
|
|
102
|
-
action_type: "PAYMENT",
|
|
103
|
-
amount: 1000000n,
|
|
104
|
-
target: "merchant-1",
|
|
105
|
-
timestamp,
|
|
106
|
-
metadata_hash: "0".repeat(64),
|
|
107
|
-
nonce,
|
|
108
|
-
signature: "sig-placeholder",
|
|
109
|
-
depth: 0,
|
|
110
|
-
tool: "openai.responses",
|
|
111
|
-
tool_call: true,
|
|
112
|
-
type: "EXECUTE",
|
|
113
|
-
...extra
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function authSigningPayload(auth, policyId) {
|
|
117
|
-
return {
|
|
118
|
-
expires_at: auth.expires_at,
|
|
119
|
-
intent_hash: auth.intent_hash,
|
|
120
|
-
policy_id: policyId,
|
|
121
|
-
state_hash: auth.state_snapshot_hash
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
function bindingIntentProjection(intent) {
|
|
125
|
-
const out = {};
|
|
126
|
-
for (const key of BINDING_FIELDS) {
|
|
127
|
-
if (intent[key] !== undefined)
|
|
128
|
-
out[key] = intent[key];
|
|
129
|
-
}
|
|
130
|
-
return out;
|
|
131
|
-
}
|
|
132
|
-
function b64(bytes) {
|
|
133
|
-
return Buffer.from(bytes).toString("base64");
|
|
134
|
-
}
|
|
135
|
-
async function extractIntentHash() {
|
|
136
|
-
const base = makeIntent(42n, 1730000000);
|
|
137
|
-
const reordered = {
|
|
138
|
-
tool_call: base.tool_call,
|
|
139
|
-
tool: base.tool,
|
|
140
|
-
depth: base.depth,
|
|
141
|
-
nonce: base.nonce,
|
|
142
|
-
timestamp: base.timestamp,
|
|
143
|
-
target: base.target,
|
|
144
|
-
amount: base.amount,
|
|
145
|
-
action_type: base.action_type,
|
|
146
|
-
agent_id: base.agent_id,
|
|
147
|
-
metadata_hash: base.metadata_hash,
|
|
148
|
-
intent_id: base.intent_id,
|
|
149
|
-
type: base.type,
|
|
150
|
-
signature: base.signature
|
|
151
|
-
};
|
|
152
|
-
const withExtra = { ...base, _internal_trace_id: "ignored" };
|
|
153
|
-
const h1 = sha256HexFromJson(bindingIntentProjection(base));
|
|
154
|
-
const h2 = sha256HexFromJson(bindingIntentProjection(reordered));
|
|
155
|
-
const h3 = sha256HexFromJson(bindingIntentProjection(withExtra));
|
|
156
|
-
writeVector("intent-hash.json", {
|
|
157
|
-
version: "1.0.0",
|
|
158
|
-
vectors: [
|
|
159
|
-
{ id: "intent-hash-001", input: base, expected: { hash: h1 } },
|
|
160
|
-
{ id: "intent-hash-002", input: reordered, expected: { hash: h2 }, invariant: "equals intent-hash-001" },
|
|
161
|
-
{
|
|
162
|
-
id: "intent-hash-003",
|
|
163
|
-
input: withExtra,
|
|
164
|
-
binding_fields: [...BINDING_FIELDS],
|
|
165
|
-
expected: { hash: h3 },
|
|
166
|
-
invariant: "equals intent-hash-001"
|
|
167
|
-
}
|
|
168
|
-
]
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
async function extractAuthorizationPayload() {
|
|
172
|
-
const engine = makeEngine();
|
|
173
|
-
const state = makeState();
|
|
174
|
-
const policyId = engine.computePolicyId();
|
|
175
|
-
const r1 = engine.evaluatePure(makeIntent(100n, 1730000000), state);
|
|
176
|
-
if (r1.decision !== "ALLOW")
|
|
177
|
-
throw new Error("expected ALLOW for auth vector 1");
|
|
178
|
-
const r2 = engine.evaluatePure(makeIntent(101n, 0), makeState());
|
|
179
|
-
if (r2.decision !== "ALLOW")
|
|
180
|
-
throw new Error("expected ALLOW for auth vector 2");
|
|
181
|
-
writeVector("authorization-payload.json", {
|
|
182
|
-
version: "1.0.0",
|
|
183
|
-
ttl_seconds: 60,
|
|
184
|
-
signing_algorithm: "HMAC-SHA256",
|
|
185
|
-
vectors: [
|
|
186
|
-
{
|
|
187
|
-
id: "auth-payload-001",
|
|
188
|
-
input: makeIntent(100n, 1730000000),
|
|
189
|
-
expected: {
|
|
190
|
-
intent_hash: r1.authorization.intent_hash,
|
|
191
|
-
policy_id: policyId,
|
|
192
|
-
state_hash: r1.authorization.state_snapshot_hash,
|
|
193
|
-
expires_at: r1.authorization.expires_at,
|
|
194
|
-
canonical_signing_payload: canonicalJson(authSigningPayload(r1.authorization, policyId)),
|
|
195
|
-
signature: r1.authorization.engine_signature
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
id: "auth-payload-002",
|
|
200
|
-
input: makeIntent(101n, 0),
|
|
201
|
-
expected: {
|
|
202
|
-
intent_hash: r2.authorization.intent_hash,
|
|
203
|
-
expires_at: r2.authorization.expires_at,
|
|
204
|
-
expires_at_derivation: "intent.timestamp(0) + ttl_seconds(60) = 60",
|
|
205
|
-
canonical_signing_payload: canonicalJson(authSigningPayload(r2.authorization, policyId)),
|
|
206
|
-
signature: r2.authorization.engine_signature
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
]
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
async function extractSnapshotHash() {
|
|
213
|
-
const engine = makeEngine();
|
|
214
|
-
const state1 = makeState();
|
|
215
|
-
const snap1 = engine.exportState(state1);
|
|
216
|
-
const bytes1 = encodeCanonicalState(snap1);
|
|
217
|
-
const decoded1 = decodeCanonicalState(bytes1);
|
|
218
|
-
const verify1 = verifySnapshot(bytes1, { expectedPolicyId: engine.computePolicyId() });
|
|
219
|
-
if (verify1.status !== "ok" || !verify1.stateHash)
|
|
220
|
-
throw new Error("verifySnapshot failed for vector 1");
|
|
221
|
-
const state2 = makeState();
|
|
222
|
-
state2.budget.budget_limit["agent-1"] = 999999999999999999n;
|
|
223
|
-
const snap2 = engine.exportState(state2);
|
|
224
|
-
const bytes2 = encodeCanonicalState(snap2);
|
|
225
|
-
const verify2 = verifySnapshot(bytes2, { expectedPolicyId: engine.computePolicyId() });
|
|
226
|
-
if (verify2.status !== "ok" || !verify2.stateHash)
|
|
227
|
-
throw new Error("verifySnapshot failed for vector 2");
|
|
228
|
-
const reEncoded = encodeCanonicalState(decoded1);
|
|
229
|
-
const verify3 = verifySnapshot(reEncoded, { expectedPolicyId: engine.computePolicyId() });
|
|
230
|
-
if (verify3.status !== "ok" || !verify3.stateHash)
|
|
231
|
-
throw new Error("verifySnapshot failed for vector 3");
|
|
232
|
-
writeVector("snapshot-hash.json", {
|
|
233
|
-
version: "1.0.0",
|
|
234
|
-
vectors: [
|
|
235
|
-
{
|
|
236
|
-
id: "snapshot-hash-001",
|
|
237
|
-
input_state: state1,
|
|
238
|
-
expected: {
|
|
239
|
-
snapshot_base64: b64(bytes1),
|
|
240
|
-
state_hash: verify1.stateHash
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
id: "snapshot-hash-002",
|
|
245
|
-
input_state: state2,
|
|
246
|
-
expected: {
|
|
247
|
-
snapshot_base64: b64(bytes2),
|
|
248
|
-
state_hash: verify2.stateHash,
|
|
249
|
-
normalized_budget_limit: "999999999999999999"
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
id: "snapshot-hash-003",
|
|
254
|
-
input_snapshot_base64: b64(bytes1),
|
|
255
|
-
expected: { state_hash: verify3.stateHash },
|
|
256
|
-
invariant: "equals snapshot-hash-001"
|
|
257
|
-
}
|
|
258
|
-
]
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
async function extractAuditChain() {
|
|
262
|
-
const engine = makeEngine();
|
|
263
|
-
const state = makeState();
|
|
264
|
-
const out = engine.evaluatePure(makeIntent(200n, 1730000000), state);
|
|
265
|
-
if (out.decision !== "ALLOW")
|
|
266
|
-
throw new Error("expected ALLOW for audit-chain vectors");
|
|
267
|
-
const events = engine.audit.snapshot();
|
|
268
|
-
if (events.length < 3)
|
|
269
|
-
throw new Error(`expected >=3 events, got ${events.length}`);
|
|
270
|
-
const e0 = events[0];
|
|
271
|
-
const e1 = events[1];
|
|
272
|
-
const e2 = events[2];
|
|
273
|
-
const genesis = sha256hexUtf8("OxDeAI::GENESIS::v1");
|
|
274
|
-
const head1 = sha256hexUtf8(`${genesis}\n${canonicalJson(e0)}`);
|
|
275
|
-
const head2 = sha256hexUtf8(`${head1}\n${canonicalJson(e1)}`);
|
|
276
|
-
const head3 = sha256hexUtf8(`${head2}\n${canonicalJson(e2)}`);
|
|
277
|
-
const tampered0 = { ...e0, type: "TAMPERED" };
|
|
278
|
-
const tamperedHead1 = sha256hexUtf8(`${genesis}\n${canonicalJson(tampered0)}`);
|
|
279
|
-
writeVector("audit-chain.json", {
|
|
280
|
-
version: "1.0.0",
|
|
281
|
-
hash_algorithm: "SHA256",
|
|
282
|
-
separator: "0x0A",
|
|
283
|
-
chain_rule: "head_(k+1) = SHA256(head_k || 0x0A || canonical(event_k))",
|
|
284
|
-
vectors: [
|
|
285
|
-
{
|
|
286
|
-
id: "audit-chain-001",
|
|
287
|
-
input: "OxDeAI::GENESIS::v1",
|
|
288
|
-
expected: { genesis_hex: genesis }
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
id: "audit-chain-002",
|
|
292
|
-
input: { head_0: genesis, event_0: e0, canonical_event_0: canonicalJson(e0) },
|
|
293
|
-
expected: { head_1: head1 }
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
id: "audit-chain-003",
|
|
297
|
-
input: { genesis, events: [e0, e1, e2] },
|
|
298
|
-
expected: { head_1: head1, head_2: head2, head_3: head3 }
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
id: "audit-chain-004",
|
|
302
|
-
input: { original_event_0: e0, mutated_event_0: tampered0, head_0: genesis },
|
|
303
|
-
expected: {
|
|
304
|
-
original_head_1: head1,
|
|
305
|
-
mutated_head_1: tamperedHead1,
|
|
306
|
-
must_not_equal_original_head_1: true
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
]
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
async function extractEnvelopeVerification() {
|
|
313
|
-
const engine = makeEngine();
|
|
314
|
-
const state = makeState();
|
|
315
|
-
const out = engine.evaluatePure(makeIntent(300n, 1730000000), state);
|
|
316
|
-
if (out.decision !== "ALLOW")
|
|
317
|
-
throw new Error("expected ALLOW for envelope vectors");
|
|
318
|
-
const events = engine.audit.snapshot();
|
|
319
|
-
const snapshotBytes = encodeCanonicalState(engine.exportState(state));
|
|
320
|
-
const snapCheck = verifySnapshot(snapshotBytes, { expectedPolicyId: engine.computePolicyId() });
|
|
321
|
-
if (snapCheck.status !== "ok" || !snapCheck.stateHash)
|
|
322
|
-
throw new Error("snapshot verification failed");
|
|
323
|
-
const validEnvelopeBytes = encodeEnvelope({
|
|
324
|
-
formatVersion: 1,
|
|
325
|
-
snapshot: snapshotBytes,
|
|
326
|
-
events
|
|
327
|
-
});
|
|
328
|
-
const withCheckpointBytes = encodeEnvelope({
|
|
329
|
-
formatVersion: 1,
|
|
330
|
-
snapshot: snapshotBytes,
|
|
331
|
-
events: [
|
|
332
|
-
...events,
|
|
333
|
-
{
|
|
334
|
-
type: "STATE_CHECKPOINT",
|
|
335
|
-
stateHash: snapCheck.stateHash,
|
|
336
|
-
timestamp: makeIntent(300n, 1730000000).timestamp,
|
|
337
|
-
policyId: engine.computePolicyId()
|
|
338
|
-
}
|
|
339
|
-
]
|
|
340
|
-
});
|
|
341
|
-
const mismatchedPolicyBytes = encodeEnvelope({
|
|
342
|
-
formatVersion: 1,
|
|
343
|
-
snapshot: snapshotBytes,
|
|
344
|
-
events: events.map((e) => ({ ...e, policyId: "c".repeat(64) }))
|
|
345
|
-
});
|
|
346
|
-
const corruptBytes = new Uint8Array([1, 2, 3, 4, 5]);
|
|
347
|
-
const r1 = verifyEnvelope(withCheckpointBytes, {
|
|
348
|
-
expectedPolicyId: engine.computePolicyId(),
|
|
349
|
-
mode: "strict"
|
|
350
|
-
});
|
|
351
|
-
const r2 = verifyEnvelope(validEnvelopeBytes, {
|
|
352
|
-
expectedPolicyId: engine.computePolicyId(),
|
|
353
|
-
mode: "best-effort"
|
|
354
|
-
});
|
|
355
|
-
const r3 = verifyEnvelope(mismatchedPolicyBytes, {
|
|
356
|
-
expectedPolicyId: engine.computePolicyId(),
|
|
357
|
-
mode: "best-effort"
|
|
358
|
-
});
|
|
359
|
-
const r4 = verifyEnvelope(corruptBytes, {
|
|
360
|
-
expectedPolicyId: engine.computePolicyId(),
|
|
361
|
-
mode: "best-effort"
|
|
362
|
-
});
|
|
363
|
-
const r5 = verifyEnvelope(validEnvelopeBytes, {
|
|
364
|
-
expectedPolicyId: engine.computePolicyId(),
|
|
365
|
-
mode: "strict"
|
|
366
|
-
});
|
|
367
|
-
writeVector("envelope-verification.json", {
|
|
368
|
-
version: "1.0.0",
|
|
369
|
-
vectors: [
|
|
370
|
-
{
|
|
371
|
-
id: "envelope-001",
|
|
372
|
-
description: "ok — strict mode with STATE_CHECKPOINT",
|
|
373
|
-
expected: {
|
|
374
|
-
status: r1.status,
|
|
375
|
-
policyId: r1.policyId,
|
|
376
|
-
stateHash: r1.stateHash,
|
|
377
|
-
auditHeadHash: r1.auditHeadHash,
|
|
378
|
-
violations: r1.violations
|
|
379
|
-
}
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
id: "envelope-002",
|
|
383
|
-
description: "ok — best-effort mode without checkpoint",
|
|
384
|
-
expected: { status: r2.status, violations: r2.violations }
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
id: "envelope-003",
|
|
388
|
-
description: "invalid — policyId mismatch",
|
|
389
|
-
expected: { status: r3.status, violations: r3.violations }
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
id: "envelope-004",
|
|
393
|
-
description: "invalid — corrupt envelope bytes",
|
|
394
|
-
expected: { status: r4.status, violations: r4.violations }
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
id: "envelope-005",
|
|
398
|
-
description: "inconclusive — strict mode without checkpoint",
|
|
399
|
-
expected: { status: r5.status, violations: r5.violations }
|
|
400
|
-
}
|
|
401
|
-
]
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
async function main() {
|
|
405
|
-
console.log("Extracting conformance vectors against @oxdeai/core@1.0.0");
|
|
406
|
-
await extractIntentHash();
|
|
407
|
-
await extractAuthorizationPayload();
|
|
408
|
-
await extractSnapshotHash();
|
|
409
|
-
await extractAuditChain();
|
|
410
|
-
await extractEnvelopeVerification();
|
|
411
|
-
console.log("done");
|
|
412
|
-
}
|
|
413
|
-
main().catch((err) => {
|
|
414
|
-
console.error(err);
|
|
415
|
-
process.exit(1);
|
|
416
|
-
});
|