@kya-os/contracts 1.2.1 → 1.3.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.
Files changed (69) hide show
  1. package/dist/delegation/constraints.d.ts +982 -0
  2. package/dist/delegation/constraints.d.ts.map +1 -0
  3. package/dist/delegation/constraints.js +205 -0
  4. package/dist/delegation/index.d.ts +8 -0
  5. package/dist/delegation/index.d.ts.map +1 -0
  6. package/dist/delegation/index.js +24 -0
  7. package/dist/delegation/schemas.d.ts +3787 -0
  8. package/dist/delegation/schemas.d.ts.map +1 -0
  9. package/dist/delegation/schemas.js +230 -0
  10. package/dist/did/index.d.ts +8 -0
  11. package/dist/did/index.d.ts.map +1 -0
  12. package/dist/did/index.js +24 -0
  13. package/dist/did/resolve-contract.d.ts +220 -0
  14. package/dist/did/resolve-contract.d.ts.map +1 -0
  15. package/dist/did/resolve-contract.js +32 -0
  16. package/dist/did/types.d.ts +164 -0
  17. package/dist/did/types.d.ts.map +1 -0
  18. package/dist/did/types.js +71 -0
  19. package/dist/env/constants.d.ts +58 -0
  20. package/dist/env/constants.d.ts.map +1 -0
  21. package/dist/env/constants.js +60 -0
  22. package/dist/env/index.d.ts +5 -0
  23. package/dist/env/index.d.ts.map +1 -0
  24. package/dist/env/index.js +21 -0
  25. package/dist/index.d.ts +9 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +17 -2
  28. package/dist/proof/index.d.ts +9 -0
  29. package/dist/proof/index.d.ts.map +1 -0
  30. package/dist/proof/index.js +25 -0
  31. package/dist/proof/proof-record.d.ts +838 -0
  32. package/dist/proof/proof-record.d.ts.map +1 -0
  33. package/dist/proof/proof-record.js +134 -0
  34. package/dist/proof/signing-spec.d.ts +147 -0
  35. package/dist/proof/signing-spec.d.ts.map +1 -0
  36. package/dist/proof/signing-spec.js +123 -0
  37. package/dist/runtime/errors.d.ts +348 -0
  38. package/dist/runtime/errors.d.ts.map +1 -0
  39. package/dist/runtime/errors.js +120 -0
  40. package/dist/runtime/headers.d.ts +84 -0
  41. package/dist/runtime/headers.d.ts.map +1 -0
  42. package/dist/runtime/headers.js +82 -0
  43. package/dist/runtime/index.d.ts +6 -0
  44. package/dist/runtime/index.d.ts.map +1 -0
  45. package/dist/runtime/index.js +22 -0
  46. package/dist/tlkrc/index.d.ts +5 -0
  47. package/dist/tlkrc/index.d.ts.map +1 -0
  48. package/dist/tlkrc/index.js +21 -0
  49. package/dist/tlkrc/rotation.d.ts +246 -0
  50. package/dist/tlkrc/rotation.d.ts.map +1 -0
  51. package/dist/tlkrc/rotation.js +127 -0
  52. package/dist/vc/index.d.ts +8 -0
  53. package/dist/vc/index.d.ts.map +1 -0
  54. package/dist/vc/index.js +24 -0
  55. package/dist/vc/schemas.d.ts +2484 -0
  56. package/dist/vc/schemas.d.ts.map +1 -0
  57. package/dist/vc/schemas.js +225 -0
  58. package/dist/vc/statuslist.d.ts +494 -0
  59. package/dist/vc/statuslist.d.ts.map +1 -0
  60. package/dist/vc/statuslist.js +133 -0
  61. package/package.json +52 -6
  62. package/dist/cli.js.map +0 -1
  63. package/dist/handshake.js.map +0 -1
  64. package/dist/index.js.map +0 -1
  65. package/dist/proof.js.map +0 -1
  66. package/dist/registry.js.map +0 -1
  67. package/dist/test.js.map +0 -1
  68. package/dist/utils/validation.js.map +0 -1
  69. package/dist/verifier.js.map +0 -1
@@ -0,0 +1,164 @@
1
+ /**
2
+ * DID Document Types (W3C Compliant)
3
+ *
4
+ * These types conform to the W3C DID Core specification and provide
5
+ * TypeScript parity with the Python implementation.
6
+ *
7
+ * Related Spec: MCP-I §2.1, §2.3
8
+ * Python Reference: DID-Documentation.md, DID-Service.md
9
+ */
10
+ /**
11
+ * Verification Method Types
12
+ *
13
+ * Supported types for verification methods in DID Documents.
14
+ */
15
+ export type VerificationMethodType = 'Ed25519VerificationKey2020' | 'JsonWebKey2020' | 'EcdsaSecp256k1VerificationKey2019';
16
+ /**
17
+ * Verification Method
18
+ *
19
+ * A verification method as defined in the W3C DID Core specification.
20
+ * Used for cryptographic verification of signatures and authentication.
21
+ *
22
+ * **kid Derivation Guidelines:**
23
+ * - For did:key: kid = `${did}#${multibaseKey}`
24
+ * - For did:web: kid = `${did}#${keyId}` where keyId is from DID Document
25
+ * - The kid MUST be resolvable to a verification method in the DID Document
26
+ */
27
+ export interface VerificationMethod {
28
+ /** Verification method identifier (e.g., "#key-1" or full DID URL) */
29
+ id: string;
30
+ /** Type of verification method */
31
+ type: VerificationMethodType;
32
+ /** DID of the controller of this verification method */
33
+ controller: string;
34
+ /**
35
+ * Public key encoded as multibase for Ed25519VerificationKey2020
36
+ * Format: z + base58btc(public key bytes)
37
+ */
38
+ publicKeyMultibase?: string;
39
+ /**
40
+ * Public key as JSON Web Key for JsonWebKey2020
41
+ * See RFC 7517 for JWK format
42
+ */
43
+ publicKeyJwk?: {
44
+ kty: string;
45
+ crv: string;
46
+ x: string;
47
+ y?: string;
48
+ [key: string]: any;
49
+ };
50
+ }
51
+ /**
52
+ * DID Service
53
+ *
54
+ * A service endpoint as defined in the W3C DID Core specification.
55
+ * Services enable discovery of service endpoints for the DID subject.
56
+ */
57
+ export interface DidService {
58
+ /** Service identifier (e.g., "#service-1") */
59
+ id: string;
60
+ /** Service type (e.g., "LinkedDomains", "CredentialRegistry") */
61
+ type: string | string[];
62
+ /** Service endpoint URL(s) or endpoint descriptor object */
63
+ serviceEndpoint: string | string[] | Record<string, any>;
64
+ }
65
+ /**
66
+ * DID Document
67
+ *
68
+ * A DID Document as defined in the W3C DID Core specification.
69
+ * Represents the full descriptor of a DID, including verification methods
70
+ * and service endpoints.
71
+ *
72
+ * **Supported DID Methods:**
73
+ * - did:key - Self-contained, ephemeral identities
74
+ * - did:web - Domain-bound identities resolved via HTTPS
75
+ * - did:jwk - JWK-based identities
76
+ *
77
+ * **@context:**
78
+ * While the W3C spec requires @context, it's optional in this type to support
79
+ * simplified parsing. Implementations should include "https://www.w3.org/ns/did/v1"
80
+ * as the base context.
81
+ */
82
+ export interface DidDocument {
83
+ /** JSON-LD context (typically "https://www.w3.org/ns/did/v1") */
84
+ '@context'?: string | string[] | Record<string, any>;
85
+ /** The DID this document describes (e.g., "did:key:z6Mk...") */
86
+ id: string;
87
+ /** Also known as - alternative identifiers for this DID */
88
+ alsoKnownAs?: string[];
89
+ /**
90
+ * Verification methods available for this DID
91
+ * Contains public key information for signature verification
92
+ */
93
+ verificationMethod?: VerificationMethod[];
94
+ /**
95
+ * Authentication verification relationship
96
+ * References to verification methods or embedded methods
97
+ * Used for authenticating as the DID subject
98
+ */
99
+ authentication?: (string | VerificationMethod)[];
100
+ /**
101
+ * Assertion method verification relationship
102
+ * References to verification methods or embedded methods
103
+ * Used for issuing verifiable credentials
104
+ */
105
+ assertionMethod?: (string | VerificationMethod)[];
106
+ /**
107
+ * Key agreement verification relationship
108
+ * References to verification methods or embedded methods
109
+ * Used for encryption and key agreement protocols
110
+ */
111
+ keyAgreement?: (string | VerificationMethod)[];
112
+ /**
113
+ * Capability invocation verification relationship
114
+ * References to verification methods or embedded methods
115
+ * Used for invoking capabilities
116
+ */
117
+ capabilityInvocation?: (string | VerificationMethod)[];
118
+ /**
119
+ * Capability delegation verification relationship
120
+ * References to verification methods or embedded methods
121
+ * Used for delegating capabilities
122
+ */
123
+ capabilityDelegation?: (string | VerificationMethod)[];
124
+ /** Service endpoints for the DID */
125
+ service?: DidService[];
126
+ /** Additional properties allowed for extensibility */
127
+ [key: string]: any;
128
+ }
129
+ /**
130
+ * DID Method
131
+ *
132
+ * String literal type for supported DID methods
133
+ */
134
+ export type DidMethod = 'key' | 'web' | 'jwk' | 'ion' | 'ebsi';
135
+ /**
136
+ * Helper type guards
137
+ */
138
+ /**
139
+ * Type guard to check if a value is a VerificationMethod
140
+ */
141
+ export declare function isVerificationMethod(value: any): value is VerificationMethod;
142
+ /**
143
+ * Type guard to check if a value is a string reference to a verification method
144
+ */
145
+ export declare function isVerificationMethodReference(value: any): value is string;
146
+ /**
147
+ * Type guard to check if a DID Document is valid (basic structural check)
148
+ */
149
+ export declare function isDidDocument(value: any): value is DidDocument;
150
+ /**
151
+ * Extract DID method from a DID string
152
+ *
153
+ * @param did - The DID string (e.g., "did:key:z6Mk...")
154
+ * @returns The method name (e.g., "key") or null if invalid
155
+ */
156
+ export declare function extractDidMethod(did: string): string | null;
157
+ /**
158
+ * Extract key ID from a DID URL
159
+ *
160
+ * @param didUrl - A DID URL with fragment (e.g., "did:key:z6Mk...#key-1")
161
+ * @returns The fragment part (e.g., "key-1") or null if no fragment
162
+ */
163
+ export declare function extractKeyId(didUrl: string): string | null;
164
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/did/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAC9B,4BAA4B,GAC5B,gBAAgB,GAChB,mCAAmC,CAAC;AAExC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,EAAE,EAAE,MAAM,CAAC;IAEX,kCAAkC;IAClC,IAAI,EAAE,sBAAsB,CAAC;IAE7B,wDAAwD;IACxD,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,YAAY,CAAC,EAAE;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,CAAC,EAAE,MAAM,CAAC;QACX,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IAEX,iEAAiE;IACjE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAExB,4DAA4D;IAC5D,eAAe,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,WAAW;IAC1B,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAErD,gEAAgE;IAChE,EAAE,EAAE,MAAM,CAAC;IAEX,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAEvB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAE1C;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,GAAG,kBAAkB,CAAC,EAAE,CAAC;IAEjD;;;;OAIG;IACH,eAAe,CAAC,EAAE,CAAC,MAAM,GAAG,kBAAkB,CAAC,EAAE,CAAC;IAElD;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,GAAG,kBAAkB,CAAC,EAAE,CAAC;IAE/C;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,CAAC,MAAM,GAAG,kBAAkB,CAAC,EAAE,CAAC;IAEvD;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,CAAC,MAAM,GAAG,kBAAkB,CAAC,EAAE,CAAC;IAEvD,oCAAoC;IACpC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IAEvB,sDAAsD;IACtD,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAE/D;;GAEG;AAEH;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,GAAG,GACT,KAAK,IAAI,kBAAkB,CAQ7B;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,MAAM,CAEzE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,WAAW,CAO9D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM3D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM1D"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ /**
3
+ * DID Document Types (W3C Compliant)
4
+ *
5
+ * These types conform to the W3C DID Core specification and provide
6
+ * TypeScript parity with the Python implementation.
7
+ *
8
+ * Related Spec: MCP-I §2.1, §2.3
9
+ * Python Reference: DID-Documentation.md, DID-Service.md
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.isVerificationMethod = isVerificationMethod;
13
+ exports.isVerificationMethodReference = isVerificationMethodReference;
14
+ exports.isDidDocument = isDidDocument;
15
+ exports.extractDidMethod = extractDidMethod;
16
+ exports.extractKeyId = extractKeyId;
17
+ /**
18
+ * Helper type guards
19
+ */
20
+ /**
21
+ * Type guard to check if a value is a VerificationMethod
22
+ */
23
+ function isVerificationMethod(value) {
24
+ return (typeof value === 'object' &&
25
+ value !== null &&
26
+ typeof value.id === 'string' &&
27
+ typeof value.type === 'string' &&
28
+ typeof value.controller === 'string');
29
+ }
30
+ /**
31
+ * Type guard to check if a value is a string reference to a verification method
32
+ */
33
+ function isVerificationMethodReference(value) {
34
+ return typeof value === 'string';
35
+ }
36
+ /**
37
+ * Type guard to check if a DID Document is valid (basic structural check)
38
+ */
39
+ function isDidDocument(value) {
40
+ return (typeof value === 'object' &&
41
+ value !== null &&
42
+ typeof value.id === 'string' &&
43
+ value.id.startsWith('did:'));
44
+ }
45
+ /**
46
+ * Extract DID method from a DID string
47
+ *
48
+ * @param did - The DID string (e.g., "did:key:z6Mk...")
49
+ * @returns The method name (e.g., "key") or null if invalid
50
+ */
51
+ function extractDidMethod(did) {
52
+ const parts = did.split(':');
53
+ if (parts.length < 3 || parts[0] !== 'did') {
54
+ return null;
55
+ }
56
+ return parts[1];
57
+ }
58
+ /**
59
+ * Extract key ID from a DID URL
60
+ *
61
+ * @param didUrl - A DID URL with fragment (e.g., "did:key:z6Mk...#key-1")
62
+ * @returns The fragment part (e.g., "key-1") or null if no fragment
63
+ */
64
+ function extractKeyId(didUrl) {
65
+ const hashIndex = didUrl.indexOf('#');
66
+ if (hashIndex === -1) {
67
+ return null;
68
+ }
69
+ return didUrl.substring(hashIndex + 1);
70
+ }
71
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Environment Constants
3
+ *
4
+ * System-wide constants for algorithms, TTLs, and limits
5
+ *
6
+ * Related Spec: MCP-I §8
7
+ * Python Reference: All service documentation files
8
+ */
9
+ /**
10
+ * Hash algorithm for cryptographic operations
11
+ */
12
+ export declare const HASH_ALGO: "SHA-256";
13
+ /**
14
+ * Supported signature algorithms
15
+ */
16
+ export declare const SIG_ALGOS: readonly ["Ed25519", "ES256"];
17
+ export type SignatureAlgorithm = (typeof SIG_ALGOS)[number];
18
+ /**
19
+ * Nonce TTL in milliseconds (5 minutes)
20
+ */
21
+ export declare const NONCE_TTL_MS: number;
22
+ /**
23
+ * Resume token TTL in milliseconds (10 minutes)
24
+ */
25
+ export declare const RESUME_TOKEN_TTL_MS: number;
26
+ /**
27
+ * StatusList2021 cache TTL in seconds (1 minute)
28
+ */
29
+ export declare const STATUSLIST_CACHE_SEC = 60;
30
+ /**
31
+ * DID resolution timeout in milliseconds (500ms)
32
+ */
33
+ export declare const DID_RESOLVE_TIMEOUT_MS = 500;
34
+ /**
35
+ * Default session TTL in minutes (30 minutes)
36
+ */
37
+ export declare const DEFAULT_SESSION_TTL_MINUTES = 30;
38
+ /**
39
+ * Maximum timestamp skew in seconds (2 minutes)
40
+ */
41
+ export declare const MAX_TIMESTAMP_SKEW_SEC = 120;
42
+ /**
43
+ * Maximum delegation chain depth
44
+ */
45
+ export declare const MAX_DELEGATION_CHAIN_DEPTH = 10;
46
+ /**
47
+ * Maximum status list size (1 million entries)
48
+ */
49
+ export declare const MAX_STATUSLIST_SIZE = 1000000;
50
+ /**
51
+ * Proof archive TTL in seconds (30 days)
52
+ */
53
+ export declare const PROOF_ARCHIVE_TTL_SEC: number;
54
+ /**
55
+ * Key rotation grace period in seconds (24 hours)
56
+ */
57
+ export declare const KEY_ROTATION_GRACE_PERIOD_SEC: number;
58
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/env/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,eAAO,MAAM,SAAS,EAAG,SAAkB,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,SAAS,+BAAgC,CAAC;AAEvD,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,YAAY,QAAgB,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAiB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,qBAAqB,QAAoB,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,6BAA6B,QAAe,CAAC"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /**
3
+ * Environment Constants
4
+ *
5
+ * System-wide constants for algorithms, TTLs, and limits
6
+ *
7
+ * Related Spec: MCP-I §8
8
+ * Python Reference: All service documentation files
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.KEY_ROTATION_GRACE_PERIOD_SEC = exports.PROOF_ARCHIVE_TTL_SEC = exports.MAX_STATUSLIST_SIZE = exports.MAX_DELEGATION_CHAIN_DEPTH = exports.MAX_TIMESTAMP_SKEW_SEC = exports.DEFAULT_SESSION_TTL_MINUTES = exports.DID_RESOLVE_TIMEOUT_MS = exports.STATUSLIST_CACHE_SEC = exports.RESUME_TOKEN_TTL_MS = exports.NONCE_TTL_MS = exports.SIG_ALGOS = exports.HASH_ALGO = void 0;
12
+ /**
13
+ * Hash algorithm for cryptographic operations
14
+ */
15
+ exports.HASH_ALGO = 'SHA-256';
16
+ /**
17
+ * Supported signature algorithms
18
+ */
19
+ exports.SIG_ALGOS = ['Ed25519', 'ES256'];
20
+ /**
21
+ * Nonce TTL in milliseconds (5 minutes)
22
+ */
23
+ exports.NONCE_TTL_MS = 5 * 60 * 1000;
24
+ /**
25
+ * Resume token TTL in milliseconds (10 minutes)
26
+ */
27
+ exports.RESUME_TOKEN_TTL_MS = 10 * 60 * 1000;
28
+ /**
29
+ * StatusList2021 cache TTL in seconds (1 minute)
30
+ */
31
+ exports.STATUSLIST_CACHE_SEC = 60;
32
+ /**
33
+ * DID resolution timeout in milliseconds (500ms)
34
+ */
35
+ exports.DID_RESOLVE_TIMEOUT_MS = 500;
36
+ /**
37
+ * Default session TTL in minutes (30 minutes)
38
+ */
39
+ exports.DEFAULT_SESSION_TTL_MINUTES = 30;
40
+ /**
41
+ * Maximum timestamp skew in seconds (2 minutes)
42
+ */
43
+ exports.MAX_TIMESTAMP_SKEW_SEC = 120;
44
+ /**
45
+ * Maximum delegation chain depth
46
+ */
47
+ exports.MAX_DELEGATION_CHAIN_DEPTH = 10;
48
+ /**
49
+ * Maximum status list size (1 million entries)
50
+ */
51
+ exports.MAX_STATUSLIST_SIZE = 1000000;
52
+ /**
53
+ * Proof archive TTL in seconds (30 days)
54
+ */
55
+ exports.PROOF_ARCHIVE_TTL_SEC = 30 * 24 * 60 * 60;
56
+ /**
57
+ * Key rotation grace period in seconds (24 hours)
58
+ */
59
+ exports.KEY_ROTATION_GRACE_PERIOD_SEC = 24 * 60 * 60;
60
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Environment Constants Module
3
+ */
4
+ export * from './constants.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/env/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Environment Constants Module
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ __exportStar(require("./constants.js"), exports);
21
+ //# sourceMappingURL=index.js.map
package/dist/index.d.ts CHANGED
@@ -3,6 +3,14 @@
3
3
  *
4
4
  * This package provides a single source of truth for all types and contracts
5
5
  * used across the XMCP-I ecosystem, including runtime, CLI, verifier, and registry.
6
+ *
7
+ * NOTE: Some exports may conflict. Use subpath imports for new modules:
8
+ * - import { ... } from '@kya-os/contracts/did'
9
+ * - import { ... } from '@kya-os/contracts/vc'
10
+ * - import { ... } from '@kya-os/contracts/delegation'
11
+ * - import { ... } from '@kya-os/contracts/runtime'
12
+ * - import { ... } from '@kya-os/contracts/tlkrc'
13
+ * - import { ... } from '@kya-os/contracts/env'
6
14
  */
7
15
  export * from "./handshake.js";
8
16
  export * from "./proof.js";
@@ -11,6 +19,6 @@ export * from "./registry.js";
11
19
  export * from "./cli.js";
12
20
  export * from "./test.js";
13
21
  export * from "./utils/validation.js";
14
- export declare const CONTRACTS_VERSION = "1.0.0";
22
+ export declare const CONTRACTS_VERSION = "1.2.1";
15
23
  export declare const SUPPORTED_XMCP_I_VERSION = "^1.0.0";
16
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AAGtC,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,wBAAwB,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AAGtC,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,wBAAwB,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -4,6 +4,14 @@
4
4
  *
5
5
  * This package provides a single source of truth for all types and contracts
6
6
  * used across the XMCP-I ecosystem, including runtime, CLI, verifier, and registry.
7
+ *
8
+ * NOTE: Some exports may conflict. Use subpath imports for new modules:
9
+ * - import { ... } from '@kya-os/contracts/did'
10
+ * - import { ... } from '@kya-os/contracts/vc'
11
+ * - import { ... } from '@kya-os/contracts/delegation'
12
+ * - import { ... } from '@kya-os/contracts/runtime'
13
+ * - import { ... } from '@kya-os/contracts/tlkrc'
14
+ * - import { ... } from '@kya-os/contracts/env'
7
15
  */
8
16
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
17
  if (k2 === undefined) k2 = k;
@@ -21,7 +29,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
21
29
  };
22
30
  Object.defineProperty(exports, "__esModule", { value: true });
23
31
  exports.SUPPORTED_XMCP_I_VERSION = exports.CONTRACTS_VERSION = void 0;
24
- // Re-export all schemas and types from submodules
32
+ // Legacy exports (maintain backward compatibility)
25
33
  __exportStar(require("./handshake.js"), exports);
26
34
  __exportStar(require("./proof.js"), exports);
27
35
  __exportStar(require("./verifier.js"), exports);
@@ -30,6 +38,13 @@ __exportStar(require("./cli.js"), exports);
30
38
  __exportStar(require("./test.js"), exports);
31
39
  __exportStar(require("./utils/validation.js"), exports);
32
40
  // Version information
33
- exports.CONTRACTS_VERSION = "1.0.0";
41
+ exports.CONTRACTS_VERSION = "1.2.1";
34
42
  exports.SUPPORTED_XMCP_I_VERSION = "^1.0.0";
43
+ // New MCP-I contract types are available via subpath imports:
44
+ // import { ... } from '@kya-os/contracts/did'
45
+ // import { ... } from '@kya-os/contracts/vc'
46
+ // import { ... } from '@kya-os/contracts/delegation'
47
+ // import { ... } from '@kya-os/contracts/runtime'
48
+ // import { ... } from '@kya-os/contracts/tlkrc'
49
+ // import { ... } from '@kya-os/contracts/env'
35
50
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Proof Module Exports
3
+ *
4
+ * Note: This module exports proof record and signing spec types.
5
+ * The existing proof.ts file with DetachedProofSchema is separate.
6
+ */
7
+ export * from './signing-spec.js';
8
+ export * from './proof-record.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proof/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * Proof Module Exports
4
+ *
5
+ * Note: This module exports proof record and signing spec types.
6
+ * The existing proof.ts file with DetachedProofSchema is separate.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ __exportStar(require("./signing-spec.js"), exports);
24
+ __exportStar(require("./proof-record.js"), exports);
25
+ //# sourceMappingURL=index.js.map