@kya-os/contracts 1.3.1-canary.0 → 1.3.1-canary.1

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.
Files changed (85) hide show
  1. package/dist/cli.d.ts +9 -9
  2. package/dist/cli.js +5 -5
  3. package/dist/handshake.d.ts +2 -2
  4. package/dist/index.d.ts +2 -0
  5. package/dist/index.js +3 -0
  6. package/dist/proof.d.ts +16 -16
  7. package/dist/registry.d.ts +15 -15
  8. package/dist/registry.js +3 -2
  9. package/dist/test.d.ts +19 -19
  10. package/dist/test.js +5 -5
  11. package/dist/utils/validation.d.ts +1 -1
  12. package/dist/utils/validation.js +1 -1
  13. package/dist/verifier.d.ts +39 -25
  14. package/dist/verifier.js +18 -2
  15. package/package.json +3 -5
  16. package/dist/cli.d.ts.map +0 -1
  17. package/dist/delegation/constraints.d.ts +0 -992
  18. package/dist/delegation/constraints.d.ts.map +0 -1
  19. package/dist/delegation/constraints.js +0 -210
  20. package/dist/delegation/index.d.ts +0 -8
  21. package/dist/delegation/index.d.ts.map +0 -1
  22. package/dist/delegation/index.js +0 -24
  23. package/dist/delegation/schemas.d.ts +0 -4081
  24. package/dist/delegation/schemas.d.ts.map +0 -1
  25. package/dist/delegation/schemas.js +0 -230
  26. package/dist/did/index.d.ts +0 -8
  27. package/dist/did/index.d.ts.map +0 -1
  28. package/dist/did/index.js +0 -24
  29. package/dist/did/resolve-contract.d.ts +0 -220
  30. package/dist/did/resolve-contract.d.ts.map +0 -1
  31. package/dist/did/resolve-contract.js +0 -32
  32. package/dist/did/types.d.ts +0 -164
  33. package/dist/did/types.d.ts.map +0 -1
  34. package/dist/did/types.js +0 -71
  35. package/dist/env/constants.d.ts +0 -58
  36. package/dist/env/constants.d.ts.map +0 -1
  37. package/dist/env/constants.js +0 -60
  38. package/dist/env/index.d.ts +0 -5
  39. package/dist/env/index.d.ts.map +0 -1
  40. package/dist/env/index.js +0 -21
  41. package/dist/handshake.d.ts.map +0 -1
  42. package/dist/index.d.ts.map +0 -1
  43. package/dist/proof/index.d.ts +0 -9
  44. package/dist/proof/index.d.ts.map +0 -1
  45. package/dist/proof/index.js +0 -25
  46. package/dist/proof/proof-record.d.ts +0 -838
  47. package/dist/proof/proof-record.d.ts.map +0 -1
  48. package/dist/proof/proof-record.js +0 -134
  49. package/dist/proof/signing-spec.d.ts +0 -147
  50. package/dist/proof/signing-spec.d.ts.map +0 -1
  51. package/dist/proof/signing-spec.js +0 -123
  52. package/dist/proof.d.ts.map +0 -1
  53. package/dist/registry.d.ts.map +0 -1
  54. package/dist/runtime/errors.d.ts +0 -348
  55. package/dist/runtime/errors.d.ts.map +0 -1
  56. package/dist/runtime/errors.js +0 -120
  57. package/dist/runtime/headers.d.ts +0 -84
  58. package/dist/runtime/headers.d.ts.map +0 -1
  59. package/dist/runtime/headers.js +0 -82
  60. package/dist/runtime/index.d.ts +0 -6
  61. package/dist/runtime/index.d.ts.map +0 -1
  62. package/dist/runtime/index.js +0 -22
  63. package/dist/test.d.ts.map +0 -1
  64. package/dist/tlkrc/index.d.ts +0 -5
  65. package/dist/tlkrc/index.d.ts.map +0 -1
  66. package/dist/tlkrc/index.js +0 -21
  67. package/dist/tlkrc/rotation.d.ts +0 -246
  68. package/dist/tlkrc/rotation.d.ts.map +0 -1
  69. package/dist/tlkrc/rotation.js +0 -127
  70. package/dist/utils/validation.d.ts.map +0 -1
  71. package/dist/vc/index.d.ts +0 -8
  72. package/dist/vc/index.d.ts.map +0 -1
  73. package/dist/vc/index.js +0 -24
  74. package/dist/vc/schemas.d.ts +0 -2484
  75. package/dist/vc/schemas.d.ts.map +0 -1
  76. package/dist/vc/schemas.js +0 -225
  77. package/dist/vc/statuslist.d.ts +0 -494
  78. package/dist/vc/statuslist.d.ts.map +0 -1
  79. package/dist/vc/statuslist.js +0 -133
  80. package/dist/verifier.d.ts.map +0 -1
  81. package/schemas/cli/register-output/v1.0.0.json +0 -69
  82. package/schemas/proof/v1.0.0.json +0 -80
  83. package/schemas/registry/receipt-v1.0.0.json +0 -60
  84. package/schemas/verifier/verify-page/v1.0.0.json +0 -94
  85. package/schemas/well-known/agent/v1.0.0.json +0 -49
package/dist/cli.d.ts CHANGED
@@ -5,27 +5,27 @@ import { z } from "zod";
5
5
  export declare const IdentityConfigSchema: z.ZodObject<{
6
6
  version: z.ZodLiteral<"1.0">;
7
7
  did: z.ZodString;
8
- keyId: z.ZodString;
8
+ kid: z.ZodString;
9
9
  privateKey: z.ZodString;
10
10
  publicKey: z.ZodString;
11
11
  createdAt: z.ZodString;
12
- lastRotated: z.ZodString;
12
+ lastRotated: z.ZodOptional<z.ZodString>;
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  version: "1.0";
15
15
  did: string;
16
- keyId: string;
16
+ kid: string;
17
17
  privateKey: string;
18
18
  publicKey: string;
19
19
  createdAt: string;
20
- lastRotated: string;
20
+ lastRotated?: string | undefined;
21
21
  }, {
22
22
  version: "1.0";
23
23
  did: string;
24
- keyId: string;
24
+ kid: string;
25
25
  privateKey: string;
26
26
  publicKey: string;
27
27
  createdAt: string;
28
- lastRotated: string;
28
+ lastRotated?: string | undefined;
29
29
  }>;
30
30
  export declare const KeyRotationResultSchema: z.ZodObject<{
31
31
  success: z.ZodBoolean;
@@ -57,21 +57,21 @@ export declare const KeyRotationResultSchema: z.ZodObject<{
57
57
  }>;
58
58
  export declare const StatusReportSchema: z.ZodObject<{
59
59
  did: z.ZodString;
60
- keyId: z.ZodString;
60
+ kid: z.ZodString;
61
61
  ktaURL: z.ZodString;
62
62
  mirrorStatus: z.ZodEnum<["pending", "success", "error"]>;
63
63
  lastHandshake: z.ZodOptional<z.ZodNumber>;
64
64
  environment: z.ZodEnum<["dev", "prod"]>;
65
65
  }, "strip", z.ZodTypeAny, {
66
66
  did: string;
67
- keyId: string;
67
+ kid: string;
68
68
  ktaURL: string;
69
69
  mirrorStatus: "success" | "pending" | "error";
70
70
  environment: "dev" | "prod";
71
71
  lastHandshake?: number | undefined;
72
72
  }, {
73
73
  did: string;
74
- keyId: string;
74
+ kid: string;
75
75
  ktaURL: string;
76
76
  mirrorStatus: "success" | "pending" | "error";
77
77
  environment: "dev" | "prod";
package/dist/cli.js CHANGED
@@ -8,11 +8,11 @@ const zod_1 = require("zod");
8
8
  exports.IdentityConfigSchema = zod_1.z.object({
9
9
  version: zod_1.z.literal("1.0"),
10
10
  did: zod_1.z.string().min(1),
11
- keyId: zod_1.z.string().min(1),
12
- privateKey: zod_1.z.string().min(1), // base64-encoded Ed25519 private key
13
- publicKey: zod_1.z.string().min(1), // base64-encoded Ed25519 public key
11
+ kid: zod_1.z.string().min(1), // Changed from kid to kid for spec compliance
12
+ privateKey: zod_1.z.string().regex(/^[A-Za-z0-9+/]{43}=$/, "Must be a valid base64-encoded Ed25519 private key (44 characters)"),
13
+ publicKey: zod_1.z.string().regex(/^[A-Za-z0-9+/]{43}=$/, "Must be a valid base64-encoded Ed25519 public key (44 characters)"),
14
14
  createdAt: zod_1.z.string().datetime(),
15
- lastRotated: zod_1.z.string().datetime(),
15
+ lastRotated: zod_1.z.string().datetime().optional(),
16
16
  });
17
17
  exports.KeyRotationResultSchema = zod_1.z.object({
18
18
  success: zod_1.z.boolean(),
@@ -26,7 +26,7 @@ exports.KeyRotationResultSchema = zod_1.z.object({
26
26
  });
27
27
  exports.StatusReportSchema = zod_1.z.object({
28
28
  did: zod_1.z.string().min(1),
29
- keyId: zod_1.z.string().min(1),
29
+ kid: zod_1.z.string().min(1), // Changed from kid to kid for spec compliance
30
30
  ktaURL: zod_1.z.string().url(),
31
31
  mirrorStatus: zod_1.z.enum(["pending", "success", "error"]),
32
32
  lastHandshake: zod_1.z.number().int().positive().optional(),
@@ -28,20 +28,20 @@ export declare const SessionContextSchema: z.ZodObject<{
28
28
  ttlMinutes: z.ZodDefault<z.ZodNumber>;
29
29
  agentDid: z.ZodOptional<z.ZodString>;
30
30
  }, "strip", z.ZodTypeAny, {
31
+ createdAt: number;
31
32
  nonce: string;
32
33
  audience: string;
33
34
  timestamp: number;
34
35
  sessionId: string;
35
- createdAt: number;
36
36
  lastActivity: number;
37
37
  ttlMinutes: number;
38
38
  agentDid?: string | undefined;
39
39
  }, {
40
+ createdAt: number;
40
41
  nonce: string;
41
42
  audience: string;
42
43
  timestamp: number;
43
44
  sessionId: string;
44
- createdAt: number;
45
45
  lastActivity: number;
46
46
  agentDid?: string | undefined;
47
47
  ttlMinutes?: number | undefined;
package/dist/index.d.ts CHANGED
@@ -19,6 +19,8 @@ export * from "./registry.js";
19
19
  export * from "./cli.js";
20
20
  export * from "./test.js";
21
21
  export * from "./utils/validation.js";
22
+ export * from "./vc/index.js";
23
+ export * from "./delegation/index.js";
22
24
  export declare const CONTRACTS_VERSION = "1.2.1";
23
25
  export declare const SUPPORTED_XMCP_I_VERSION = "^1.0.0";
24
26
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -37,6 +37,9 @@ __exportStar(require("./registry.js"), exports);
37
37
  __exportStar(require("./cli.js"), exports);
38
38
  __exportStar(require("./test.js"), exports);
39
39
  __exportStar(require("./utils/validation.js"), exports);
40
+ // W3C VC and Delegation exports (for mcp-i-core compatibility)
41
+ __exportStar(require("./vc/index.js"), exports);
42
+ __exportStar(require("./delegation/index.js"), exports);
40
43
  // Version information
41
44
  exports.CONTRACTS_VERSION = "1.2.1";
42
45
  exports.SUPPORTED_XMCP_I_VERSION = "^1.0.0";
package/dist/proof.d.ts CHANGED
@@ -22,22 +22,22 @@ export declare const ProofMetaSchema: z.ZodObject<{
22
22
  delegationRef: z.ZodOptional<z.ZodString>;
23
23
  }, "strip", z.ZodTypeAny, {
24
24
  did: string;
25
- kid: string;
26
- ts: number;
27
25
  nonce: string;
28
26
  audience: string;
29
27
  sessionId: string;
28
+ kid: string;
29
+ ts: number;
30
30
  requestHash: string;
31
31
  responseHash: string;
32
32
  scopeId?: string | undefined;
33
33
  delegationRef?: string | undefined;
34
34
  }, {
35
35
  did: string;
36
- kid: string;
37
- ts: number;
38
36
  nonce: string;
39
37
  audience: string;
40
38
  sessionId: string;
39
+ kid: string;
40
+ ts: number;
41
41
  requestHash: string;
42
42
  responseHash: string;
43
43
  scopeId?: string | undefined;
@@ -58,22 +58,22 @@ export declare const DetachedProofSchema: z.ZodObject<{
58
58
  delegationRef: z.ZodOptional<z.ZodString>;
59
59
  }, "strip", z.ZodTypeAny, {
60
60
  did: string;
61
- kid: string;
62
- ts: number;
63
61
  nonce: string;
64
62
  audience: string;
65
63
  sessionId: string;
64
+ kid: string;
65
+ ts: number;
66
66
  requestHash: string;
67
67
  responseHash: string;
68
68
  scopeId?: string | undefined;
69
69
  delegationRef?: string | undefined;
70
70
  }, {
71
71
  did: string;
72
- kid: string;
73
- ts: number;
74
72
  nonce: string;
75
73
  audience: string;
76
74
  sessionId: string;
75
+ kid: string;
76
+ ts: number;
77
77
  requestHash: string;
78
78
  responseHash: string;
79
79
  scopeId?: string | undefined;
@@ -83,11 +83,11 @@ export declare const DetachedProofSchema: z.ZodObject<{
83
83
  jws: string;
84
84
  meta: {
85
85
  did: string;
86
- kid: string;
87
- ts: number;
88
86
  nonce: string;
89
87
  audience: string;
90
88
  sessionId: string;
89
+ kid: string;
90
+ ts: number;
91
91
  requestHash: string;
92
92
  responseHash: string;
93
93
  scopeId?: string | undefined;
@@ -97,11 +97,11 @@ export declare const DetachedProofSchema: z.ZodObject<{
97
97
  jws: string;
98
98
  meta: {
99
99
  did: string;
100
- kid: string;
101
- ts: number;
102
100
  nonce: string;
103
101
  audience: string;
104
102
  sessionId: string;
103
+ kid: string;
104
+ ts: number;
105
105
  requestHash: string;
106
106
  responseHash: string;
107
107
  scopeId?: string | undefined;
@@ -130,22 +130,22 @@ export declare const AuditRecordSchema: z.ZodObject<{
130
130
  verified: z.ZodEnum<["yes", "no"]>;
131
131
  scope: z.ZodString;
132
132
  }, "strip", z.ZodTypeAny, {
133
+ version: "audit.v1";
133
134
  did: string;
135
+ audience: string;
134
136
  kid: string;
135
137
  ts: number;
136
- audience: string;
137
- version: "audit.v1";
138
138
  session: string;
139
139
  reqHash: string;
140
140
  resHash: string;
141
141
  verified: "yes" | "no";
142
142
  scope: string;
143
143
  }, {
144
+ version: "audit.v1";
144
145
  did: string;
146
+ audience: string;
145
147
  kid: string;
146
148
  ts: number;
147
- audience: string;
148
- version: "audit.v1";
149
149
  session: string;
150
150
  reqHash: string;
151
151
  resHash: string;
@@ -57,12 +57,12 @@ export declare const ClaimTokenSchema: z.ZodObject<{
57
57
  expiresAt: z.ZodNumber;
58
58
  ttlHours: z.ZodDefault<z.ZodNumber>;
59
59
  }, "strip", z.ZodTypeAny, {
60
- expiresAt: number;
61
60
  token: string;
61
+ expiresAt: number;
62
62
  ttlHours: number;
63
63
  }, {
64
- expiresAt: number;
65
64
  token: string;
65
+ expiresAt: number;
66
66
  ttlHours?: number | undefined;
67
67
  }>;
68
68
  export declare const MirrorStatusSchema: z.ZodObject<{
@@ -83,7 +83,7 @@ export declare const MirrorStatusSchema: z.ZodObject<{
83
83
  }>;
84
84
  export declare const AgentStatusSchema: z.ZodObject<{
85
85
  did: z.ZodString;
86
- keyId: z.ZodString;
86
+ kid: z.ZodString;
87
87
  ktaURL: z.ZodString;
88
88
  mirrorStatus: z.ZodObject<{
89
89
  status: z.ZodEnum<["pending", "success", "error"]>;
@@ -104,7 +104,7 @@ export declare const AgentStatusSchema: z.ZodObject<{
104
104
  lastHandshake: z.ZodOptional<z.ZodNumber>;
105
105
  }, "strip", z.ZodTypeAny, {
106
106
  did: string;
107
- keyId: string;
107
+ kid: string;
108
108
  ktaURL: string;
109
109
  mirrorStatus: {
110
110
  status: "success" | "pending" | "error";
@@ -115,7 +115,7 @@ export declare const AgentStatusSchema: z.ZodObject<{
115
115
  lastHandshake?: number | undefined;
116
116
  }, {
117
117
  did: string;
118
- keyId: string;
118
+ kid: string;
119
119
  ktaURL: string;
120
120
  mirrorStatus: {
121
121
  status: "success" | "pending" | "error";
@@ -161,13 +161,13 @@ export declare const DelegationRequestSchema: z.ZodObject<{
161
161
  }, "strip", z.ZodTypeAny, {
162
162
  subject: string;
163
163
  scopes: string[];
164
- audience?: string | undefined;
165
164
  duration?: number | undefined;
165
+ audience?: string | undefined;
166
166
  }, {
167
167
  subject: string;
168
168
  scopes: string[];
169
- audience?: string | undefined;
170
169
  duration?: number | undefined;
170
+ audience?: string | undefined;
171
171
  }>;
172
172
  /**
173
173
  * Storage mode configuration for verifiable credentials and delegations
@@ -182,24 +182,24 @@ export declare const ReceiptSchema: z.ZodObject<{
182
182
  ref: z.ZodString;
183
183
  contentHash: z.ZodString;
184
184
  action: z.ZodEnum<["issue", "revoke"]>;
185
- ts: z.ZodNumber;
185
+ ts: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
186
186
  logIndex: z.ZodNumber;
187
187
  logRoot: z.ZodString;
188
188
  inclusionProof: z.ZodArray<z.ZodString, "many">;
189
189
  }, "strip", z.ZodTypeAny, {
190
- ts: number;
191
190
  ref: string;
192
191
  contentHash: string;
193
192
  action: "issue" | "revoke";
193
+ ts: string | number;
194
194
  logIndex: number;
195
195
  logRoot: string;
196
196
  inclusionProof: string[];
197
197
  $schema?: "https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json" | undefined;
198
198
  }, {
199
- ts: number;
200
199
  ref: string;
201
200
  contentHash: string;
202
201
  action: "issue" | "revoke";
202
+ ts: string | number;
203
203
  logIndex: number;
204
204
  logRoot: string;
205
205
  inclusionProof: string[];
@@ -236,24 +236,24 @@ export declare const DelegationResponseSchema: z.ZodObject<{
236
236
  ref: z.ZodString;
237
237
  contentHash: z.ZodString;
238
238
  action: z.ZodEnum<["issue", "revoke"]>;
239
- ts: z.ZodNumber;
239
+ ts: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
240
240
  logIndex: z.ZodNumber;
241
241
  logRoot: z.ZodString;
242
242
  inclusionProof: z.ZodArray<z.ZodString, "many">;
243
243
  }, "strip", z.ZodTypeAny, {
244
- ts: number;
245
244
  ref: string;
246
245
  contentHash: string;
247
246
  action: "issue" | "revoke";
247
+ ts: string | number;
248
248
  logIndex: number;
249
249
  logRoot: string;
250
250
  inclusionProof: string[];
251
251
  $schema?: "https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json" | undefined;
252
252
  }, {
253
- ts: number;
254
253
  ref: string;
255
254
  contentHash: string;
256
255
  action: "issue" | "revoke";
256
+ ts: string | number;
257
257
  logIndex: number;
258
258
  logRoot: string;
259
259
  inclusionProof: string[];
@@ -271,10 +271,10 @@ export declare const DelegationResponseSchema: z.ZodObject<{
271
271
  aud?: string | undefined;
272
272
  };
273
273
  receipt: {
274
- ts: number;
275
274
  ref: string;
276
275
  contentHash: string;
277
276
  action: "issue" | "revoke";
277
+ ts: string | number;
278
278
  logIndex: number;
279
279
  logRoot: string;
280
280
  inclusionProof: string[];
@@ -292,10 +292,10 @@ export declare const DelegationResponseSchema: z.ZodObject<{
292
292
  aud?: string | undefined;
293
293
  };
294
294
  receipt: {
295
- ts: number;
296
295
  ref: string;
297
296
  contentHash: string;
298
297
  action: "issue" | "revoke";
298
+ ts: string | number;
299
299
  logIndex: number;
300
300
  logRoot: string;
301
301
  inclusionProof: string[];
package/dist/registry.js CHANGED
@@ -40,7 +40,7 @@ exports.MirrorStatusSchema = zod_1.z.object({
40
40
  });
41
41
  exports.AgentStatusSchema = zod_1.z.object({
42
42
  did: zod_1.z.string().min(1),
43
- keyId: zod_1.z.string().min(1),
43
+ kid: zod_1.z.string().min(1),
44
44
  ktaURL: zod_1.z.string().url(),
45
45
  mirrorStatus: exports.MirrorStatusSchema,
46
46
  lastHandshake: zod_1.z.number().int().positive().optional(),
@@ -82,7 +82,8 @@ exports.ReceiptSchema = zod_1.z.object({
82
82
  ref: zod_1.z.string().min(1),
83
83
  contentHash: zod_1.z.string().regex(/^sha256:[a-f0-9]{64}$/),
84
84
  action: zod_1.z.enum(["issue", "revoke"]),
85
- ts: zod_1.z.number().int().positive(),
85
+ // Back-compat: accept ISO string (preferred) or legacy epoch number
86
+ ts: zod_1.z.union([zod_1.z.string().datetime(), zod_1.z.number().int().positive()]),
86
87
  logIndex: zod_1.z.number().int().nonnegative(),
87
88
  logRoot: zod_1.z.string().min(1),
88
89
  inclusionProof: zod_1.z.array(zod_1.z.string()),
package/dist/test.d.ts CHANGED
@@ -30,25 +30,25 @@ export type TestEnvironment = z.infer<typeof TestEnvironmentSchema>;
30
30
  */
31
31
  export declare const MockIdentitySchema: z.ZodObject<{
32
32
  did: z.ZodString;
33
- keyId: z.ZodString;
33
+ kid: z.ZodString;
34
34
  privateKey: z.ZodString;
35
35
  publicKey: z.ZodString;
36
36
  createdAt: z.ZodString;
37
- lastRotated: z.ZodString;
37
+ lastRotated: z.ZodOptional<z.ZodString>;
38
38
  }, "strip", z.ZodTypeAny, {
39
39
  did: string;
40
- keyId: string;
40
+ kid: string;
41
41
  privateKey: string;
42
42
  publicKey: string;
43
43
  createdAt: string;
44
- lastRotated: string;
44
+ lastRotated?: string | undefined;
45
45
  }, {
46
46
  did: string;
47
- keyId: string;
47
+ kid: string;
48
48
  privateKey: string;
49
49
  publicKey: string;
50
50
  createdAt: string;
51
- lastRotated: string;
51
+ lastRotated?: string | undefined;
52
52
  }>;
53
53
  export type MockIdentity = z.infer<typeof MockIdentitySchema>;
54
54
  /**
@@ -67,25 +67,25 @@ export type MockKTAFailureType = z.infer<typeof MockKTAFailureTypeSchema>;
67
67
  export declare const MockIdentityProviderConfigSchema: z.ZodObject<{
68
68
  identities: z.ZodRecord<z.ZodString, z.ZodObject<{
69
69
  did: z.ZodString;
70
- keyId: z.ZodString;
70
+ kid: z.ZodString;
71
71
  privateKey: z.ZodString;
72
72
  publicKey: z.ZodString;
73
73
  createdAt: z.ZodString;
74
- lastRotated: z.ZodString;
74
+ lastRotated: z.ZodOptional<z.ZodString>;
75
75
  }, "strip", z.ZodTypeAny, {
76
76
  did: string;
77
- keyId: string;
77
+ kid: string;
78
78
  privateKey: string;
79
79
  publicKey: string;
80
80
  createdAt: string;
81
- lastRotated: string;
81
+ lastRotated?: string | undefined;
82
82
  }, {
83
83
  did: string;
84
- keyId: string;
84
+ kid: string;
85
85
  privateKey: string;
86
86
  publicKey: string;
87
87
  createdAt: string;
88
- lastRotated: string;
88
+ lastRotated?: string | undefined;
89
89
  }>>;
90
90
  delegations: z.ZodRecord<z.ZodString, z.ZodEnum<["active", "revoked", "pending"]>>;
91
91
  ktaFailures: z.ZodDefault<z.ZodArray<z.ZodEnum<["network", "auth", "invalid", "timeout"]>, "many">>;
@@ -93,11 +93,11 @@ export declare const MockIdentityProviderConfigSchema: z.ZodObject<{
93
93
  }, "strip", z.ZodTypeAny, {
94
94
  identities: Record<string, {
95
95
  did: string;
96
- keyId: string;
96
+ kid: string;
97
97
  privateKey: string;
98
98
  publicKey: string;
99
99
  createdAt: string;
100
- lastRotated: string;
100
+ lastRotated?: string | undefined;
101
101
  }>;
102
102
  delegations: Record<string, "pending" | "active" | "revoked">;
103
103
  ktaFailures: ("network" | "auth" | "invalid" | "timeout")[];
@@ -105,11 +105,11 @@ export declare const MockIdentityProviderConfigSchema: z.ZodObject<{
105
105
  }, {
106
106
  identities: Record<string, {
107
107
  did: string;
108
- keyId: string;
108
+ kid: string;
109
109
  privateKey: string;
110
110
  publicKey: string;
111
111
  createdAt: string;
112
- lastRotated: string;
112
+ lastRotated?: string | undefined;
113
113
  }>;
114
114
  delegations: Record<string, "pending" | "active" | "revoked">;
115
115
  ktaFailures?: ("network" | "auth" | "invalid" | "timeout")[] | undefined;
@@ -122,7 +122,7 @@ export type MockIdentityProviderConfig = z.infer<typeof MockIdentityProviderConf
122
122
  export declare const LocalVerificationResultSchema: z.ZodObject<{
123
123
  valid: z.ZodBoolean;
124
124
  did: z.ZodOptional<z.ZodString>;
125
- keyId: z.ZodOptional<z.ZodString>;
125
+ kid: z.ZodOptional<z.ZodString>;
126
126
  signature: z.ZodObject<{
127
127
  valid: z.ZodBoolean;
128
128
  algorithm: z.ZodString;
@@ -192,7 +192,7 @@ export declare const LocalVerificationResultSchema: z.ZodObject<{
192
192
  };
193
193
  errors: string[];
194
194
  did?: string | undefined;
195
- keyId?: string | undefined;
195
+ kid?: string | undefined;
196
196
  }, {
197
197
  valid: boolean;
198
198
  session: {
@@ -213,7 +213,7 @@ export declare const LocalVerificationResultSchema: z.ZodObject<{
213
213
  error?: string | undefined;
214
214
  };
215
215
  did?: string | undefined;
216
- keyId?: string | undefined;
216
+ kid?: string | undefined;
217
217
  warnings?: string[] | undefined;
218
218
  errors?: string[] | undefined;
219
219
  }>;
package/dist/test.js CHANGED
@@ -24,11 +24,11 @@ exports.TestEnvironmentSchema = zod_1.z.object({
24
24
  */
25
25
  exports.MockIdentitySchema = zod_1.z.object({
26
26
  did: zod_1.z.string(),
27
- keyId: zod_1.z.string(),
28
- privateKey: zod_1.z.string(),
29
- publicKey: zod_1.z.string(),
27
+ kid: zod_1.z.string(),
28
+ privateKey: zod_1.z.string().regex(/^[A-Za-z0-9+/]{43}=$/, "Must be a valid base64-encoded Ed25519 private key (44 characters)"),
29
+ publicKey: zod_1.z.string().regex(/^[A-Za-z0-9+/]{43}=$/, "Must be a valid base64-encoded Ed25519 public key (44 characters)"),
30
30
  createdAt: zod_1.z.string(),
31
- lastRotated: zod_1.z.string(),
31
+ lastRotated: zod_1.z.string().optional(),
32
32
  });
33
33
  /**
34
34
  * Mock delegation status for testing
@@ -62,7 +62,7 @@ exports.MockIdentityProviderConfigSchema = zod_1.z.object({
62
62
  exports.LocalVerificationResultSchema = zod_1.z.object({
63
63
  valid: zod_1.z.boolean(),
64
64
  did: zod_1.z.string().optional(),
65
- keyId: zod_1.z.string().optional(),
65
+ kid: zod_1.z.string().optional(),
66
66
  signature: zod_1.z.object({
67
67
  valid: zod_1.z.boolean(),
68
68
  algorithm: zod_1.z.string(),
@@ -24,7 +24,7 @@ export declare function hasRequiredProperties(obj: any, properties: string[], co
24
24
  */
25
25
  export declare const StringValidators: {
26
26
  did: (value: string) => boolean;
27
- keyId: (value: string) => boolean;
27
+ kid: (value: string) => boolean;
28
28
  url: (value: string) => boolean;
29
29
  projectName: (value: string) => boolean;
30
30
  };
@@ -55,7 +55,7 @@ function hasRequiredProperties(obj, properties, context) {
55
55
  */
56
56
  exports.StringValidators = {
57
57
  did: (value) => /^did:[a-z0-9]+:[a-zA-Z0-9._-]+$/.test(value),
58
- keyId: (value) => /^[a-zA-Z0-9._-]+$/.test(value),
58
+ kid: (value) => /^[a-zA-Z0-9._-]+$/.test(value),
59
59
  url: (value) => {
60
60
  try {
61
61
  new URL(value);