@hlos-ai/schemas 0.4.2
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/LICENSE +190 -0
- package/README.md +148 -0
- package/dist/chunk-RQP6MVT3.js +40 -0
- package/dist/chunk-RQP6MVT3.js.map +1 -0
- package/dist/ids.cjs +66 -0
- package/dist/ids.cjs.map +1 -0
- package/dist/ids.d.cts +69 -0
- package/dist/ids.d.ts +69 -0
- package/dist/ids.js +27 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.cjs +1081 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1830 -0
- package/dist/index.d.ts +1830 -0
- package/dist/index.js +965 -0
- package/dist/index.js.map +1 -0
- package/package.json +63 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1830 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ReceiptId } from './ids.js';
|
|
3
|
+
export { CorrelationId, CorrelationIdSchema, CrossingId, CrossingIdSchema, IdempotencyKey, IdempotencyKeySchema, PassportId, PassportIdSchema, ReceiptIdSchema, WalletId, WalletIdSchema, generateCrossingId, generateId, generatePassportId, generateReceiptId, generateWalletId } from './ids.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @hlos-ai/schemas - Surface Types
|
|
7
|
+
*
|
|
8
|
+
* Canonical surface identifiers for idempotency scoping,
|
|
9
|
+
* audit logging, and request attribution.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Known surfaces that interact with HLOS Kernel v2.
|
|
14
|
+
* Used for idempotency scoping: (surface, idempotency_key) must be unique.
|
|
15
|
+
*/
|
|
16
|
+
declare const SurfaceSchema: z.ZodEnum<["mcp", "x402", "events", "cli", "web", "acp", "api"]>;
|
|
17
|
+
type Surface = z.infer<typeof SurfaceSchema>;
|
|
18
|
+
/**
|
|
19
|
+
* All known surfaces as a const array (for iteration).
|
|
20
|
+
*/
|
|
21
|
+
declare const SURFACES: ["mcp", "x402", "events", "cli", "web", "acp", "api"];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @hlos-ai/schemas - Error Codes
|
|
25
|
+
*
|
|
26
|
+
* Canonical error codes for HLOS Kernel v2 API.
|
|
27
|
+
* These are FROZEN — additive changes only.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Kernel error codes (stable, exhaustive).
|
|
32
|
+
*/
|
|
33
|
+
declare const KernelErrorCodeSchema$1: z.ZodEnum<["INVALID_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "IDEMPOTENCY_CONFLICT", "INSUFFICIENT_BALANCE", "SPEND_CAP_EXCEEDED", "RATE_LIMITED", "INTERNAL_ERROR", "SERVICE_UNAVAILABLE"]>;
|
|
34
|
+
type KernelErrorCode$1 = z.infer<typeof KernelErrorCodeSchema$1>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @hlos-ai/schemas - Response Types
|
|
38
|
+
*
|
|
39
|
+
* Standard response envelopes for HLOS Kernel v2 API.
|
|
40
|
+
*
|
|
41
|
+
* - Reads return SuccessResponse<T>
|
|
42
|
+
* - Mutations return SignedReceiptV0<T>
|
|
43
|
+
* - Errors return ErrorResponse
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Standard success response for read operations.
|
|
48
|
+
* Mutations return SignedReceiptV0 instead.
|
|
49
|
+
*/
|
|
50
|
+
interface SuccessResponse<T> {
|
|
51
|
+
success: true;
|
|
52
|
+
data: T;
|
|
53
|
+
meta?: {
|
|
54
|
+
request_id?: string;
|
|
55
|
+
correlation_id: string;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a SuccessResponse.
|
|
60
|
+
*/
|
|
61
|
+
declare function success<T>(data: T, correlationId: string, requestId?: string): SuccessResponse<T>;
|
|
62
|
+
/**
|
|
63
|
+
* Standard error response.
|
|
64
|
+
*/
|
|
65
|
+
interface ErrorResponse {
|
|
66
|
+
success: false;
|
|
67
|
+
error: {
|
|
68
|
+
code: KernelErrorCode$1;
|
|
69
|
+
message: string;
|
|
70
|
+
details?: unknown;
|
|
71
|
+
correlation_id: string;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Create an ErrorResponse.
|
|
76
|
+
*/
|
|
77
|
+
declare function error(code: KernelErrorCode$1, message: string, correlationId: string, details?: unknown): ErrorResponse;
|
|
78
|
+
declare const SuccessResponseSchema: <T extends z.ZodType>(dataSchema: T) => z.ZodObject<{
|
|
79
|
+
success: z.ZodLiteral<true>;
|
|
80
|
+
data: T;
|
|
81
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
request_id: z.ZodOptional<z.ZodString>;
|
|
83
|
+
correlation_id: z.ZodString;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
correlation_id: string;
|
|
86
|
+
request_id?: string | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
correlation_id: string;
|
|
89
|
+
request_id?: string | undefined;
|
|
90
|
+
}>>;
|
|
91
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
92
|
+
success: z.ZodLiteral<true>;
|
|
93
|
+
data: T;
|
|
94
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
request_id: z.ZodOptional<z.ZodString>;
|
|
96
|
+
correlation_id: z.ZodString;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
correlation_id: string;
|
|
99
|
+
request_id?: string | undefined;
|
|
100
|
+
}, {
|
|
101
|
+
correlation_id: string;
|
|
102
|
+
request_id?: string | undefined;
|
|
103
|
+
}>>;
|
|
104
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
105
|
+
success: z.ZodLiteral<true>;
|
|
106
|
+
data: T;
|
|
107
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
108
|
+
request_id: z.ZodOptional<z.ZodString>;
|
|
109
|
+
correlation_id: z.ZodString;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
correlation_id: string;
|
|
112
|
+
request_id?: string | undefined;
|
|
113
|
+
}, {
|
|
114
|
+
correlation_id: string;
|
|
115
|
+
request_id?: string | undefined;
|
|
116
|
+
}>>;
|
|
117
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
118
|
+
declare const ErrorResponseSchema: z.ZodObject<{
|
|
119
|
+
success: z.ZodLiteral<false>;
|
|
120
|
+
error: z.ZodObject<{
|
|
121
|
+
code: z.ZodEnum<["INVALID_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "IDEMPOTENCY_CONFLICT", "INSUFFICIENT_BALANCE", "SPEND_CAP_EXCEEDED", "RATE_LIMITED", "INTERNAL_ERROR", "SERVICE_UNAVAILABLE"]>;
|
|
122
|
+
message: z.ZodString;
|
|
123
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
124
|
+
correlation_id: z.ZodString;
|
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
code: "INVALID_REQUEST" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "IDEMPOTENCY_CONFLICT" | "INSUFFICIENT_BALANCE" | "SPEND_CAP_EXCEEDED" | "RATE_LIMITED" | "INTERNAL_ERROR" | "SERVICE_UNAVAILABLE";
|
|
127
|
+
message: string;
|
|
128
|
+
correlation_id: string;
|
|
129
|
+
details?: unknown;
|
|
130
|
+
}, {
|
|
131
|
+
code: "INVALID_REQUEST" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "IDEMPOTENCY_CONFLICT" | "INSUFFICIENT_BALANCE" | "SPEND_CAP_EXCEEDED" | "RATE_LIMITED" | "INTERNAL_ERROR" | "SERVICE_UNAVAILABLE";
|
|
132
|
+
message: string;
|
|
133
|
+
correlation_id: string;
|
|
134
|
+
details?: unknown;
|
|
135
|
+
}>;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
success: false;
|
|
138
|
+
error: {
|
|
139
|
+
code: "INVALID_REQUEST" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "IDEMPOTENCY_CONFLICT" | "INSUFFICIENT_BALANCE" | "SPEND_CAP_EXCEEDED" | "RATE_LIMITED" | "INTERNAL_ERROR" | "SERVICE_UNAVAILABLE";
|
|
140
|
+
message: string;
|
|
141
|
+
correlation_id: string;
|
|
142
|
+
details?: unknown;
|
|
143
|
+
};
|
|
144
|
+
}, {
|
|
145
|
+
success: false;
|
|
146
|
+
error: {
|
|
147
|
+
code: "INVALID_REQUEST" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "IDEMPOTENCY_CONFLICT" | "INSUFFICIENT_BALANCE" | "SPEND_CAP_EXCEEDED" | "RATE_LIMITED" | "INTERNAL_ERROR" | "SERVICE_UNAVAILABLE";
|
|
148
|
+
message: string;
|
|
149
|
+
correlation_id: string;
|
|
150
|
+
details?: unknown;
|
|
151
|
+
};
|
|
152
|
+
}>;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @hlos-ai/schemas - SignedReceiptV0
|
|
156
|
+
*
|
|
157
|
+
* Canonical receipt format for HLOS Kernel v2 mutations.
|
|
158
|
+
* All mutating operations emit this receipt type.
|
|
159
|
+
*
|
|
160
|
+
* FROZEN: Breaking changes require version bump.
|
|
161
|
+
*/
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Receipt type URI (JSON-LD style).
|
|
165
|
+
*/
|
|
166
|
+
declare const RECEIPT_TYPE_URI: "https://hlos.ai/schema/SignedReceiptV0";
|
|
167
|
+
/**
|
|
168
|
+
* Current receipt format version.
|
|
169
|
+
* This is a NUMBER, not semver.
|
|
170
|
+
*/
|
|
171
|
+
declare const RECEIPT_VERSION: 0;
|
|
172
|
+
/**
|
|
173
|
+
* SignedReceiptV0: Canonical receipt for all v2 mutations.
|
|
174
|
+
*
|
|
175
|
+
* Content is JCS-canonicalized, SHA-256 hashed, Ed25519 signed.
|
|
176
|
+
*
|
|
177
|
+
* @template T - The content type (mutation-specific payload)
|
|
178
|
+
*/
|
|
179
|
+
interface SignedReceiptV0<T = unknown> {
|
|
180
|
+
/**
|
|
181
|
+
* Type URI for JSON-LD compatibility.
|
|
182
|
+
*/
|
|
183
|
+
'@type': typeof RECEIPT_TYPE_URI;
|
|
184
|
+
/**
|
|
185
|
+
* Format version (number, not semver).
|
|
186
|
+
* Increment for breaking format changes.
|
|
187
|
+
*/
|
|
188
|
+
version: typeof RECEIPT_VERSION;
|
|
189
|
+
/**
|
|
190
|
+
* Unique receipt identifier.
|
|
191
|
+
*/
|
|
192
|
+
receipt_id: ReceiptId | string;
|
|
193
|
+
/**
|
|
194
|
+
* The mutation payload (JCS-canonicalized before hashing).
|
|
195
|
+
*/
|
|
196
|
+
content: T;
|
|
197
|
+
/**
|
|
198
|
+
* SHA-256 hash of JCS(content), base64url encoded.
|
|
199
|
+
*
|
|
200
|
+
* IMPORTANT: This is base64url of the raw 32-byte digest,
|
|
201
|
+
* NOT hex encoding. Matches signature input format.
|
|
202
|
+
*/
|
|
203
|
+
content_hash: string;
|
|
204
|
+
/**
|
|
205
|
+
* Ed25519 signature over the raw 32-byte content_hash digest.
|
|
206
|
+
* base64url encoded.
|
|
207
|
+
*
|
|
208
|
+
* Signing process:
|
|
209
|
+
* 1. canonicalize = JCS(content)
|
|
210
|
+
* 2. digest = SHA-256(canonicalize) → 32 bytes
|
|
211
|
+
* 3. signature = Ed25519.sign(private_key, digest)
|
|
212
|
+
* 4. encode = base64url(signature)
|
|
213
|
+
*/
|
|
214
|
+
signature: string;
|
|
215
|
+
/**
|
|
216
|
+
* Key identifier for signature verification.
|
|
217
|
+
* Resolves via JWKS endpoint: GET /api/v2/.well-known/keys
|
|
218
|
+
*/
|
|
219
|
+
key_id: string;
|
|
220
|
+
/**
|
|
221
|
+
* ISO 8601 timestamp when receipt was issued.
|
|
222
|
+
*/
|
|
223
|
+
issued_at: string;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Strict base64url length constants:
|
|
227
|
+
* - SHA-256 digest (32 bytes) = 43 chars base64url (no padding)
|
|
228
|
+
* - Ed25519 signature (64 bytes) = 86 chars base64url (no padding)
|
|
229
|
+
*/
|
|
230
|
+
declare const CONTENT_HASH_LENGTH = 43;
|
|
231
|
+
declare const SIGNATURE_LENGTH = 86;
|
|
232
|
+
declare const SignedReceiptV0Schema: <T extends z.ZodType>(contentSchema: T) => z.ZodObject<{
|
|
233
|
+
'@type': z.ZodLiteral<"https://hlos.ai/schema/SignedReceiptV0">;
|
|
234
|
+
version: z.ZodLiteral<0>;
|
|
235
|
+
receipt_id: z.ZodString;
|
|
236
|
+
content: T;
|
|
237
|
+
content_hash: z.ZodString;
|
|
238
|
+
signature: z.ZodString;
|
|
239
|
+
key_id: z.ZodString;
|
|
240
|
+
issued_at: z.ZodString;
|
|
241
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
242
|
+
'@type': z.ZodLiteral<"https://hlos.ai/schema/SignedReceiptV0">;
|
|
243
|
+
version: z.ZodLiteral<0>;
|
|
244
|
+
receipt_id: z.ZodString;
|
|
245
|
+
content: T;
|
|
246
|
+
content_hash: z.ZodString;
|
|
247
|
+
signature: z.ZodString;
|
|
248
|
+
key_id: z.ZodString;
|
|
249
|
+
issued_at: z.ZodString;
|
|
250
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
251
|
+
'@type': z.ZodLiteral<"https://hlos.ai/schema/SignedReceiptV0">;
|
|
252
|
+
version: z.ZodLiteral<0>;
|
|
253
|
+
receipt_id: z.ZodString;
|
|
254
|
+
content: T;
|
|
255
|
+
content_hash: z.ZodString;
|
|
256
|
+
signature: z.ZodString;
|
|
257
|
+
key_id: z.ZodString;
|
|
258
|
+
issued_at: z.ZodString;
|
|
259
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
260
|
+
/**
|
|
261
|
+
* Loose schema for unknown content types.
|
|
262
|
+
*/
|
|
263
|
+
declare const SignedReceiptV0LooseSchema: z.ZodObject<{
|
|
264
|
+
'@type': z.ZodLiteral<"https://hlos.ai/schema/SignedReceiptV0">;
|
|
265
|
+
version: z.ZodLiteral<0>;
|
|
266
|
+
receipt_id: z.ZodString;
|
|
267
|
+
content: z.ZodUnknown;
|
|
268
|
+
content_hash: z.ZodString;
|
|
269
|
+
signature: z.ZodString;
|
|
270
|
+
key_id: z.ZodString;
|
|
271
|
+
issued_at: z.ZodString;
|
|
272
|
+
}, "strip", z.ZodTypeAny, {
|
|
273
|
+
'@type': "https://hlos.ai/schema/SignedReceiptV0";
|
|
274
|
+
version: 0;
|
|
275
|
+
receipt_id: string;
|
|
276
|
+
content_hash: string;
|
|
277
|
+
signature: string;
|
|
278
|
+
key_id: string;
|
|
279
|
+
issued_at: string;
|
|
280
|
+
content?: unknown;
|
|
281
|
+
}, {
|
|
282
|
+
'@type': "https://hlos.ai/schema/SignedReceiptV0";
|
|
283
|
+
version: 0;
|
|
284
|
+
receipt_id: string;
|
|
285
|
+
content_hash: string;
|
|
286
|
+
signature: string;
|
|
287
|
+
key_id: string;
|
|
288
|
+
issued_at: string;
|
|
289
|
+
content?: unknown;
|
|
290
|
+
}>;
|
|
291
|
+
/**
|
|
292
|
+
* Check if a value is a SignedReceiptV0.
|
|
293
|
+
*/
|
|
294
|
+
declare function isSignedReceiptV0(value: unknown): value is SignedReceiptV0;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* @hlos-ai/schemas - Shared Contract Types
|
|
298
|
+
*
|
|
299
|
+
* LOCKED CONTRACT — All tracks must import from this file.
|
|
300
|
+
* No local redefinitions allowed.
|
|
301
|
+
*
|
|
302
|
+
* Contains:
|
|
303
|
+
* - Response envelopes (KernelOk, KernelError, ApiResponse)
|
|
304
|
+
* - Error codes (KernelErrorCode) - STRICT ENUM
|
|
305
|
+
* - Attribution enums (FundingSource, CredentialSource)
|
|
306
|
+
* - Crossing types (CrossingSnapshotV0, CrossingHashInputV0, CrossingSettledReceipt)
|
|
307
|
+
* - Stack primitives (Stack, StackProvider, StackConnection)
|
|
308
|
+
* - Test fixtures (golden vectors for conformance)
|
|
309
|
+
*/
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Kernel error codes - STRICT ENUM.
|
|
313
|
+
* Uses KernelErrorCodeSchema instead of z.string() to prevent drift.
|
|
314
|
+
*/
|
|
315
|
+
declare const KernelErrorCodeSchema: z.ZodEnum<["VALIDATION_ERROR", "INVALID_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CROSSING_NOT_FOUND", "STACK_NOT_FOUND", "STACK_CONNECTION_NOT_FOUND", "CONFLICT", "INVALID_STATE_TRANSITION", "CROSSING_ALREADY_SETTLED", "IDEMPOTENCY_CONFLICT", "INSUFFICIENT_BALANCE", "SPEND_CAP_EXCEEDED", "RATE_LIMITED", "INTERNAL_ERROR", "SERVICE_UNAVAILABLE"]>;
|
|
316
|
+
type KernelErrorCode = z.infer<typeof KernelErrorCodeSchema>;
|
|
317
|
+
/**
|
|
318
|
+
* HTTP status code mapping for each error code.
|
|
319
|
+
*/
|
|
320
|
+
declare const ERROR_CODE_STATUS: Record<KernelErrorCode, number>;
|
|
321
|
+
/**
|
|
322
|
+
* KernelOk - Standard success envelope.
|
|
323
|
+
* Status: 200-299 (success) OR 304 (not modified).
|
|
324
|
+
* NOT arbitrary 3xx (302 implies navigation semantics, not API success).
|
|
325
|
+
*/
|
|
326
|
+
declare const KernelOkSchema: <T extends z.ZodType>(dataSchema: T) => z.ZodObject<{
|
|
327
|
+
ok: z.ZodLiteral<true>;
|
|
328
|
+
status: z.ZodUnion<[z.ZodNumber, z.ZodLiteral<304>]>;
|
|
329
|
+
data: T;
|
|
330
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
331
|
+
ok: z.ZodLiteral<true>;
|
|
332
|
+
status: z.ZodUnion<[z.ZodNumber, z.ZodLiteral<304>]>;
|
|
333
|
+
data: T;
|
|
334
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
335
|
+
ok: z.ZodLiteral<true>;
|
|
336
|
+
status: z.ZodUnion<[z.ZodNumber, z.ZodLiteral<304>]>;
|
|
337
|
+
data: T;
|
|
338
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
339
|
+
type KernelOk<T> = {
|
|
340
|
+
ok: true;
|
|
341
|
+
status: number;
|
|
342
|
+
data: T;
|
|
343
|
+
};
|
|
344
|
+
/**
|
|
345
|
+
* KernelError - Standard error envelope.
|
|
346
|
+
* Uses STRICT KernelErrorCodeSchema.
|
|
347
|
+
*/
|
|
348
|
+
declare const KernelErrorSchema: z.ZodObject<{
|
|
349
|
+
ok: z.ZodLiteral<false>;
|
|
350
|
+
status: z.ZodNumber;
|
|
351
|
+
error: z.ZodObject<{
|
|
352
|
+
code: z.ZodEnum<["VALIDATION_ERROR", "INVALID_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CROSSING_NOT_FOUND", "STACK_NOT_FOUND", "STACK_CONNECTION_NOT_FOUND", "CONFLICT", "INVALID_STATE_TRANSITION", "CROSSING_ALREADY_SETTLED", "IDEMPOTENCY_CONFLICT", "INSUFFICIENT_BALANCE", "SPEND_CAP_EXCEEDED", "RATE_LIMITED", "INTERNAL_ERROR", "SERVICE_UNAVAILABLE"]>;
|
|
353
|
+
message: z.ZodString;
|
|
354
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
355
|
+
}, "strip", z.ZodTypeAny, {
|
|
356
|
+
code: "INVALID_REQUEST" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "IDEMPOTENCY_CONFLICT" | "INSUFFICIENT_BALANCE" | "SPEND_CAP_EXCEEDED" | "RATE_LIMITED" | "INTERNAL_ERROR" | "SERVICE_UNAVAILABLE" | "VALIDATION_ERROR" | "CROSSING_NOT_FOUND" | "STACK_NOT_FOUND" | "STACK_CONNECTION_NOT_FOUND" | "INVALID_STATE_TRANSITION" | "CROSSING_ALREADY_SETTLED";
|
|
357
|
+
message: string;
|
|
358
|
+
details?: Record<string, unknown> | undefined;
|
|
359
|
+
}, {
|
|
360
|
+
code: "INVALID_REQUEST" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "IDEMPOTENCY_CONFLICT" | "INSUFFICIENT_BALANCE" | "SPEND_CAP_EXCEEDED" | "RATE_LIMITED" | "INTERNAL_ERROR" | "SERVICE_UNAVAILABLE" | "VALIDATION_ERROR" | "CROSSING_NOT_FOUND" | "STACK_NOT_FOUND" | "STACK_CONNECTION_NOT_FOUND" | "INVALID_STATE_TRANSITION" | "CROSSING_ALREADY_SETTLED";
|
|
361
|
+
message: string;
|
|
362
|
+
details?: Record<string, unknown> | undefined;
|
|
363
|
+
}>;
|
|
364
|
+
}, "strip", z.ZodTypeAny, {
|
|
365
|
+
status: number;
|
|
366
|
+
error: {
|
|
367
|
+
code: "INVALID_REQUEST" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "IDEMPOTENCY_CONFLICT" | "INSUFFICIENT_BALANCE" | "SPEND_CAP_EXCEEDED" | "RATE_LIMITED" | "INTERNAL_ERROR" | "SERVICE_UNAVAILABLE" | "VALIDATION_ERROR" | "CROSSING_NOT_FOUND" | "STACK_NOT_FOUND" | "STACK_CONNECTION_NOT_FOUND" | "INVALID_STATE_TRANSITION" | "CROSSING_ALREADY_SETTLED";
|
|
368
|
+
message: string;
|
|
369
|
+
details?: Record<string, unknown> | undefined;
|
|
370
|
+
};
|
|
371
|
+
ok: false;
|
|
372
|
+
}, {
|
|
373
|
+
status: number;
|
|
374
|
+
error: {
|
|
375
|
+
code: "INVALID_REQUEST" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "IDEMPOTENCY_CONFLICT" | "INSUFFICIENT_BALANCE" | "SPEND_CAP_EXCEEDED" | "RATE_LIMITED" | "INTERNAL_ERROR" | "SERVICE_UNAVAILABLE" | "VALIDATION_ERROR" | "CROSSING_NOT_FOUND" | "STACK_NOT_FOUND" | "STACK_CONNECTION_NOT_FOUND" | "INVALID_STATE_TRANSITION" | "CROSSING_ALREADY_SETTLED";
|
|
376
|
+
message: string;
|
|
377
|
+
details?: Record<string, unknown> | undefined;
|
|
378
|
+
};
|
|
379
|
+
ok: false;
|
|
380
|
+
}>;
|
|
381
|
+
type KernelError = z.infer<typeof KernelErrorSchema>;
|
|
382
|
+
/**
|
|
383
|
+
* ApiResponse - Union of success and error.
|
|
384
|
+
*/
|
|
385
|
+
type ApiResponse<T> = KernelOk<T> | KernelError;
|
|
386
|
+
/**
|
|
387
|
+
* CrossingId format: cross_[a-z0-9]{20,}
|
|
388
|
+
*/
|
|
389
|
+
declare const CrossingIdFormatSchema: z.ZodString;
|
|
390
|
+
/**
|
|
391
|
+
* ReceiptId format: rcpt_[0-9A-HJKMNP-TV-Z]{26}
|
|
392
|
+
*/
|
|
393
|
+
declare const ReceiptIdFormatSchema: z.ZodString;
|
|
394
|
+
/**
|
|
395
|
+
* PassportId format: passport_[a-z0-9]{20,}
|
|
396
|
+
*/
|
|
397
|
+
declare const PassportIdFormatSchema: z.ZodString;
|
|
398
|
+
/**
|
|
399
|
+
* WalletId format: wallet_[a-z0-9]{20,}
|
|
400
|
+
*/
|
|
401
|
+
declare const WalletIdFormatSchema: z.ZodString;
|
|
402
|
+
/**
|
|
403
|
+
* FundingSource - Who paid for this crossing.
|
|
404
|
+
* Determined by credential_source (see mapping rule below).
|
|
405
|
+
*/
|
|
406
|
+
declare const FundingSourceSchema: z.ZodEnum<["SPONSOR", "PLATFORM", "USER"]>;
|
|
407
|
+
type FundingSource = z.infer<typeof FundingSourceSchema>;
|
|
408
|
+
/**
|
|
409
|
+
* CredentialSource - Where the credential came from.
|
|
410
|
+
*/
|
|
411
|
+
declare const CredentialSourceSchema: z.ZodEnum<["SPONSOR_KEY", "BYOK", "HLOS_FALLBACK"]>;
|
|
412
|
+
type CredentialSource = z.infer<typeof CredentialSourceSchema>;
|
|
413
|
+
/**
|
|
414
|
+
* Deterministic funding mapping rule.
|
|
415
|
+
* INVARIANT: credential_source determines funding_source.
|
|
416
|
+
*/
|
|
417
|
+
declare function deriveFundingSource(credentialSource: CredentialSource): FundingSource;
|
|
418
|
+
/**
|
|
419
|
+
* CrossingSnapshotV0 - Stable fields for hash computation.
|
|
420
|
+
*
|
|
421
|
+
* INVARIANT: Must NOT include any derived or mutable fields:
|
|
422
|
+
* - state, receiptIds, settledAt, createdAt/updatedAt
|
|
423
|
+
*/
|
|
424
|
+
declare const CrossingSnapshotV0Schema: z.ZodObject<{
|
|
425
|
+
crossingId: z.ZodString;
|
|
426
|
+
capabilityId: z.ZodString;
|
|
427
|
+
passportId: z.ZodString;
|
|
428
|
+
event_id: z.ZodNullable<z.ZodString>;
|
|
429
|
+
access_window_id: z.ZodNullable<z.ZodString>;
|
|
430
|
+
access_grant_id: z.ZodNullable<z.ZodString>;
|
|
431
|
+
attribution_org_id: z.ZodNullable<z.ZodString>;
|
|
432
|
+
funding_source: z.ZodNullable<z.ZodEnum<["SPONSOR", "PLATFORM", "USER"]>>;
|
|
433
|
+
credential_source: z.ZodEnum<["SPONSOR_KEY", "BYOK", "HLOS_FALLBACK"]>;
|
|
434
|
+
}, "strip", z.ZodTypeAny, {
|
|
435
|
+
crossingId: string;
|
|
436
|
+
capabilityId: string;
|
|
437
|
+
passportId: string;
|
|
438
|
+
event_id: string | null;
|
|
439
|
+
access_window_id: string | null;
|
|
440
|
+
access_grant_id: string | null;
|
|
441
|
+
attribution_org_id: string | null;
|
|
442
|
+
funding_source: "SPONSOR" | "PLATFORM" | "USER" | null;
|
|
443
|
+
credential_source: "SPONSOR_KEY" | "BYOK" | "HLOS_FALLBACK";
|
|
444
|
+
}, {
|
|
445
|
+
crossingId: string;
|
|
446
|
+
capabilityId: string;
|
|
447
|
+
passportId: string;
|
|
448
|
+
event_id: string | null;
|
|
449
|
+
access_window_id: string | null;
|
|
450
|
+
access_grant_id: string | null;
|
|
451
|
+
attribution_org_id: string | null;
|
|
452
|
+
funding_source: "SPONSOR" | "PLATFORM" | "USER" | null;
|
|
453
|
+
credential_source: "SPONSOR_KEY" | "BYOK" | "HLOS_FALLBACK";
|
|
454
|
+
}>;
|
|
455
|
+
type CrossingSnapshotV0 = z.infer<typeof CrossingSnapshotV0Schema>;
|
|
456
|
+
/**
|
|
457
|
+
* CrossingHashInputV0 - Input to hash function.
|
|
458
|
+
* Uses version marker for future-proofing.
|
|
459
|
+
*/
|
|
460
|
+
declare const CrossingHashInputV0Schema: z.ZodObject<{
|
|
461
|
+
v: z.ZodLiteral<0>;
|
|
462
|
+
snapshot: z.ZodObject<{
|
|
463
|
+
crossingId: z.ZodString;
|
|
464
|
+
capabilityId: z.ZodString;
|
|
465
|
+
passportId: z.ZodString;
|
|
466
|
+
event_id: z.ZodNullable<z.ZodString>;
|
|
467
|
+
access_window_id: z.ZodNullable<z.ZodString>;
|
|
468
|
+
access_grant_id: z.ZodNullable<z.ZodString>;
|
|
469
|
+
attribution_org_id: z.ZodNullable<z.ZodString>;
|
|
470
|
+
funding_source: z.ZodNullable<z.ZodEnum<["SPONSOR", "PLATFORM", "USER"]>>;
|
|
471
|
+
credential_source: z.ZodEnum<["SPONSOR_KEY", "BYOK", "HLOS_FALLBACK"]>;
|
|
472
|
+
}, "strip", z.ZodTypeAny, {
|
|
473
|
+
crossingId: string;
|
|
474
|
+
capabilityId: string;
|
|
475
|
+
passportId: string;
|
|
476
|
+
event_id: string | null;
|
|
477
|
+
access_window_id: string | null;
|
|
478
|
+
access_grant_id: string | null;
|
|
479
|
+
attribution_org_id: string | null;
|
|
480
|
+
funding_source: "SPONSOR" | "PLATFORM" | "USER" | null;
|
|
481
|
+
credential_source: "SPONSOR_KEY" | "BYOK" | "HLOS_FALLBACK";
|
|
482
|
+
}, {
|
|
483
|
+
crossingId: string;
|
|
484
|
+
capabilityId: string;
|
|
485
|
+
passportId: string;
|
|
486
|
+
event_id: string | null;
|
|
487
|
+
access_window_id: string | null;
|
|
488
|
+
access_grant_id: string | null;
|
|
489
|
+
attribution_org_id: string | null;
|
|
490
|
+
funding_source: "SPONSOR" | "PLATFORM" | "USER" | null;
|
|
491
|
+
credential_source: "SPONSOR_KEY" | "BYOK" | "HLOS_FALLBACK";
|
|
492
|
+
}>;
|
|
493
|
+
attested_receipt_id: z.ZodString;
|
|
494
|
+
}, "strip", z.ZodTypeAny, {
|
|
495
|
+
v: 0;
|
|
496
|
+
snapshot: {
|
|
497
|
+
crossingId: string;
|
|
498
|
+
capabilityId: string;
|
|
499
|
+
passportId: string;
|
|
500
|
+
event_id: string | null;
|
|
501
|
+
access_window_id: string | null;
|
|
502
|
+
access_grant_id: string | null;
|
|
503
|
+
attribution_org_id: string | null;
|
|
504
|
+
funding_source: "SPONSOR" | "PLATFORM" | "USER" | null;
|
|
505
|
+
credential_source: "SPONSOR_KEY" | "BYOK" | "HLOS_FALLBACK";
|
|
506
|
+
};
|
|
507
|
+
attested_receipt_id: string;
|
|
508
|
+
}, {
|
|
509
|
+
v: 0;
|
|
510
|
+
snapshot: {
|
|
511
|
+
crossingId: string;
|
|
512
|
+
capabilityId: string;
|
|
513
|
+
passportId: string;
|
|
514
|
+
event_id: string | null;
|
|
515
|
+
access_window_id: string | null;
|
|
516
|
+
access_grant_id: string | null;
|
|
517
|
+
attribution_org_id: string | null;
|
|
518
|
+
funding_source: "SPONSOR" | "PLATFORM" | "USER" | null;
|
|
519
|
+
credential_source: "SPONSOR_KEY" | "BYOK" | "HLOS_FALLBACK";
|
|
520
|
+
};
|
|
521
|
+
attested_receipt_id: string;
|
|
522
|
+
}>;
|
|
523
|
+
type CrossingHashInputV0 = z.infer<typeof CrossingHashInputV0Schema>;
|
|
524
|
+
/**
|
|
525
|
+
* SettlementAuthority - LITERAL (no drift).
|
|
526
|
+
*/
|
|
527
|
+
declare const SETTLEMENT_AUTHORITY: "hlos.ai";
|
|
528
|
+
/**
|
|
529
|
+
* CrossingSettledReceipt - Issued when crossing reaches SETTLED state.
|
|
530
|
+
*/
|
|
531
|
+
declare const CrossingSettledReceiptSchema: z.ZodObject<{
|
|
532
|
+
type: z.ZodLiteral<"CrossingSettled">;
|
|
533
|
+
crossingId: z.ZodString;
|
|
534
|
+
event_id: z.ZodNullable<z.ZodString>;
|
|
535
|
+
access_window_id: z.ZodNullable<z.ZodString>;
|
|
536
|
+
access_grant_id: z.ZodNullable<z.ZodString>;
|
|
537
|
+
attribution_org_id: z.ZodNullable<z.ZodString>;
|
|
538
|
+
funding_source: z.ZodNullable<z.ZodEnum<["SPONSOR", "PLATFORM", "USER"]>>;
|
|
539
|
+
credential_source: z.ZodEnum<["SPONSOR_KEY", "BYOK", "HLOS_FALLBACK"]>;
|
|
540
|
+
settlement_authority: z.ZodLiteral<"hlos.ai">;
|
|
541
|
+
crossing_hash: z.ZodString;
|
|
542
|
+
attested_receipt_id: z.ZodString;
|
|
543
|
+
settled_at: z.ZodString;
|
|
544
|
+
}, "strip", z.ZodTypeAny, {
|
|
545
|
+
type: "CrossingSettled";
|
|
546
|
+
crossingId: string;
|
|
547
|
+
event_id: string | null;
|
|
548
|
+
access_window_id: string | null;
|
|
549
|
+
access_grant_id: string | null;
|
|
550
|
+
attribution_org_id: string | null;
|
|
551
|
+
funding_source: "SPONSOR" | "PLATFORM" | "USER" | null;
|
|
552
|
+
credential_source: "SPONSOR_KEY" | "BYOK" | "HLOS_FALLBACK";
|
|
553
|
+
attested_receipt_id: string;
|
|
554
|
+
settlement_authority: "hlos.ai";
|
|
555
|
+
crossing_hash: string;
|
|
556
|
+
settled_at: string;
|
|
557
|
+
}, {
|
|
558
|
+
type: "CrossingSettled";
|
|
559
|
+
crossingId: string;
|
|
560
|
+
event_id: string | null;
|
|
561
|
+
access_window_id: string | null;
|
|
562
|
+
access_grant_id: string | null;
|
|
563
|
+
attribution_org_id: string | null;
|
|
564
|
+
funding_source: "SPONSOR" | "PLATFORM" | "USER" | null;
|
|
565
|
+
credential_source: "SPONSOR_KEY" | "BYOK" | "HLOS_FALLBACK";
|
|
566
|
+
attested_receipt_id: string;
|
|
567
|
+
settlement_authority: "hlos.ai";
|
|
568
|
+
crossing_hash: string;
|
|
569
|
+
settled_at: string;
|
|
570
|
+
}>;
|
|
571
|
+
type CrossingSettledReceipt = z.infer<typeof CrossingSettledReceiptSchema>;
|
|
572
|
+
/**
|
|
573
|
+
* AvailabilityType - Provider availability classification.
|
|
574
|
+
*/
|
|
575
|
+
declare const AvailabilityTypeSchema: z.ZodEnum<["EVENT_SPONSOR", "EVERGREEN", "CATALOG"]>;
|
|
576
|
+
type AvailabilityType = z.infer<typeof AvailabilityTypeSchema>;
|
|
577
|
+
/**
|
|
578
|
+
* ProviderRole - P1: Constrained enum for provider roles.
|
|
579
|
+
*/
|
|
580
|
+
declare const ProviderRoleSchema: z.ZodEnum<["AI", "DATABASE", "AUTH", "DEPLOY", "STORAGE", "SEARCH", "PAYMENTS", "COMPUTE", "OTHER"]>;
|
|
581
|
+
type ProviderRole = z.infer<typeof ProviderRoleSchema>;
|
|
582
|
+
/**
|
|
583
|
+
* StackProvider - Provider within a stack.
|
|
584
|
+
*/
|
|
585
|
+
declare const StackProviderSchema: z.ZodObject<{
|
|
586
|
+
provider_id: z.ZodString;
|
|
587
|
+
role: z.ZodEnum<["AI", "DATABASE", "AUTH", "DEPLOY", "STORAGE", "SEARCH", "PAYMENTS", "COMPUTE", "OTHER"]>;
|
|
588
|
+
display_name: z.ZodString;
|
|
589
|
+
budget_allocation: z.ZodNumber;
|
|
590
|
+
sku_ids: z.ZodArray<z.ZodString, "many">;
|
|
591
|
+
availability_type: z.ZodEnum<["EVENT_SPONSOR", "EVERGREEN", "CATALOG"]>;
|
|
592
|
+
}, "strip", z.ZodTypeAny, {
|
|
593
|
+
provider_id: string;
|
|
594
|
+
role: "AI" | "DATABASE" | "AUTH" | "DEPLOY" | "STORAGE" | "SEARCH" | "PAYMENTS" | "COMPUTE" | "OTHER";
|
|
595
|
+
display_name: string;
|
|
596
|
+
budget_allocation: number;
|
|
597
|
+
sku_ids: string[];
|
|
598
|
+
availability_type: "EVENT_SPONSOR" | "EVERGREEN" | "CATALOG";
|
|
599
|
+
}, {
|
|
600
|
+
provider_id: string;
|
|
601
|
+
role: "AI" | "DATABASE" | "AUTH" | "DEPLOY" | "STORAGE" | "SEARCH" | "PAYMENTS" | "COMPUTE" | "OTHER";
|
|
602
|
+
display_name: string;
|
|
603
|
+
budget_allocation: number;
|
|
604
|
+
sku_ids: string[];
|
|
605
|
+
availability_type: "EVENT_SPONSOR" | "EVERGREEN" | "CATALOG";
|
|
606
|
+
}>;
|
|
607
|
+
type StackProvider = z.infer<typeof StackProviderSchema>;
|
|
608
|
+
/**
|
|
609
|
+
* Stack - Curated capability bundle.
|
|
610
|
+
*/
|
|
611
|
+
declare const StackSchema: z.ZodObject<{
|
|
612
|
+
id: z.ZodString;
|
|
613
|
+
slug: z.ZodString;
|
|
614
|
+
name: z.ZodString;
|
|
615
|
+
tagline: z.ZodString;
|
|
616
|
+
icon: z.ZodString;
|
|
617
|
+
providers: z.ZodArray<z.ZodObject<{
|
|
618
|
+
provider_id: z.ZodString;
|
|
619
|
+
role: z.ZodEnum<["AI", "DATABASE", "AUTH", "DEPLOY", "STORAGE", "SEARCH", "PAYMENTS", "COMPUTE", "OTHER"]>;
|
|
620
|
+
display_name: z.ZodString;
|
|
621
|
+
budget_allocation: z.ZodNumber;
|
|
622
|
+
sku_ids: z.ZodArray<z.ZodString, "many">;
|
|
623
|
+
availability_type: z.ZodEnum<["EVENT_SPONSOR", "EVERGREEN", "CATALOG"]>;
|
|
624
|
+
}, "strip", z.ZodTypeAny, {
|
|
625
|
+
provider_id: string;
|
|
626
|
+
role: "AI" | "DATABASE" | "AUTH" | "DEPLOY" | "STORAGE" | "SEARCH" | "PAYMENTS" | "COMPUTE" | "OTHER";
|
|
627
|
+
display_name: string;
|
|
628
|
+
budget_allocation: number;
|
|
629
|
+
sku_ids: string[];
|
|
630
|
+
availability_type: "EVENT_SPONSOR" | "EVERGREEN" | "CATALOG";
|
|
631
|
+
}, {
|
|
632
|
+
provider_id: string;
|
|
633
|
+
role: "AI" | "DATABASE" | "AUTH" | "DEPLOY" | "STORAGE" | "SEARCH" | "PAYMENTS" | "COMPUTE" | "OTHER";
|
|
634
|
+
display_name: string;
|
|
635
|
+
budget_allocation: number;
|
|
636
|
+
sku_ids: string[];
|
|
637
|
+
availability_type: "EVENT_SPONSOR" | "EVERGREEN" | "CATALOG";
|
|
638
|
+
}>, "many">;
|
|
639
|
+
github_template: z.ZodNullable<z.ZodString>;
|
|
640
|
+
total_budget: z.ZodNumber;
|
|
641
|
+
event_id: z.ZodNullable<z.ZodString>;
|
|
642
|
+
}, "strip", z.ZodTypeAny, {
|
|
643
|
+
event_id: string | null;
|
|
644
|
+
id: string;
|
|
645
|
+
slug: string;
|
|
646
|
+
name: string;
|
|
647
|
+
tagline: string;
|
|
648
|
+
icon: string;
|
|
649
|
+
providers: {
|
|
650
|
+
provider_id: string;
|
|
651
|
+
role: "AI" | "DATABASE" | "AUTH" | "DEPLOY" | "STORAGE" | "SEARCH" | "PAYMENTS" | "COMPUTE" | "OTHER";
|
|
652
|
+
display_name: string;
|
|
653
|
+
budget_allocation: number;
|
|
654
|
+
sku_ids: string[];
|
|
655
|
+
availability_type: "EVENT_SPONSOR" | "EVERGREEN" | "CATALOG";
|
|
656
|
+
}[];
|
|
657
|
+
github_template: string | null;
|
|
658
|
+
total_budget: number;
|
|
659
|
+
}, {
|
|
660
|
+
event_id: string | null;
|
|
661
|
+
id: string;
|
|
662
|
+
slug: string;
|
|
663
|
+
name: string;
|
|
664
|
+
tagline: string;
|
|
665
|
+
icon: string;
|
|
666
|
+
providers: {
|
|
667
|
+
provider_id: string;
|
|
668
|
+
role: "AI" | "DATABASE" | "AUTH" | "DEPLOY" | "STORAGE" | "SEARCH" | "PAYMENTS" | "COMPUTE" | "OTHER";
|
|
669
|
+
display_name: string;
|
|
670
|
+
budget_allocation: number;
|
|
671
|
+
sku_ids: string[];
|
|
672
|
+
availability_type: "EVENT_SPONSOR" | "EVERGREEN" | "CATALOG";
|
|
673
|
+
}[];
|
|
674
|
+
github_template: string | null;
|
|
675
|
+
total_budget: number;
|
|
676
|
+
}>;
|
|
677
|
+
type Stack = z.infer<typeof StackSchema>;
|
|
678
|
+
/**
|
|
679
|
+
* StackConnection - User's connection to a stack.
|
|
680
|
+
*/
|
|
681
|
+
declare const StackConnectionSchema: z.ZodObject<{
|
|
682
|
+
id: z.ZodString;
|
|
683
|
+
stack_id: z.ZodString;
|
|
684
|
+
passport_id: z.ZodString;
|
|
685
|
+
team_id: z.ZodNullable<z.ZodString>;
|
|
686
|
+
environment_id: z.ZodString;
|
|
687
|
+
connected_at: z.ZodString;
|
|
688
|
+
connected_providers: z.ZodArray<z.ZodString, "many">;
|
|
689
|
+
}, "strip", z.ZodTypeAny, {
|
|
690
|
+
id: string;
|
|
691
|
+
stack_id: string;
|
|
692
|
+
passport_id: string;
|
|
693
|
+
team_id: string | null;
|
|
694
|
+
environment_id: string;
|
|
695
|
+
connected_at: string;
|
|
696
|
+
connected_providers: string[];
|
|
697
|
+
}, {
|
|
698
|
+
id: string;
|
|
699
|
+
stack_id: string;
|
|
700
|
+
passport_id: string;
|
|
701
|
+
team_id: string | null;
|
|
702
|
+
environment_id: string;
|
|
703
|
+
connected_at: string;
|
|
704
|
+
connected_providers: string[];
|
|
705
|
+
}>;
|
|
706
|
+
type StackConnection = z.infer<typeof StackConnectionSchema>;
|
|
707
|
+
/**
|
|
708
|
+
* Create a KernelOk response.
|
|
709
|
+
*/
|
|
710
|
+
declare function kernelOk<T>(data: T, status?: number): KernelOk<T>;
|
|
711
|
+
/**
|
|
712
|
+
* Create a KernelError response.
|
|
713
|
+
*/
|
|
714
|
+
declare function kernelError(code: KernelErrorCode, // P0: Now typed to KernelErrorCode
|
|
715
|
+
message: string, status?: number, details?: Record<string, unknown>): KernelError;
|
|
716
|
+
/**
|
|
717
|
+
* Golden test fixtures for downstream conformance testing.
|
|
718
|
+
* Surfaces (MCP, Agent Passport, Caravan, events-hlos) can import these
|
|
719
|
+
* to verify they're hashing/encoding/typing identically.
|
|
720
|
+
*/
|
|
721
|
+
declare const GOLDEN_FIXTURES: {
|
|
722
|
+
/**
|
|
723
|
+
* Sample CrossingHashInputV0 for hash conformance.
|
|
724
|
+
*/
|
|
725
|
+
readonly crossingHashInput: {
|
|
726
|
+
v: 0;
|
|
727
|
+
snapshot: {
|
|
728
|
+
crossingId: string;
|
|
729
|
+
capabilityId: string;
|
|
730
|
+
passportId: string;
|
|
731
|
+
event_id: string;
|
|
732
|
+
access_window_id: string;
|
|
733
|
+
access_grant_id: string;
|
|
734
|
+
attribution_org_id: string;
|
|
735
|
+
funding_source: "SPONSOR";
|
|
736
|
+
credential_source: "SPONSOR_KEY";
|
|
737
|
+
};
|
|
738
|
+
attested_receipt_id: string;
|
|
739
|
+
};
|
|
740
|
+
/**
|
|
741
|
+
* Expected crossing_hash for the above input (FROZEN).
|
|
742
|
+
* Compute: JCS canonicalize → SHA-256 → base64url (no padding)
|
|
743
|
+
*
|
|
744
|
+
* This is the golden vector. If your hash differs, your implementation
|
|
745
|
+
* is not conformant. DO NOT CHANGE unless crossingHashInput changes.
|
|
746
|
+
*/
|
|
747
|
+
readonly expectedCrossingHash_base64url_sha256_jcs_v0: "z8A2kCNck4rPL4ugNe-Fbxputdi3PkjkVpSrIBhojU0";
|
|
748
|
+
/**
|
|
749
|
+
* Sample CrossingSettledReceipt.
|
|
750
|
+
*/
|
|
751
|
+
readonly crossingSettledReceipt: {
|
|
752
|
+
type: "CrossingSettled";
|
|
753
|
+
crossingId: string;
|
|
754
|
+
event_id: string;
|
|
755
|
+
access_window_id: string;
|
|
756
|
+
access_grant_id: string;
|
|
757
|
+
attribution_org_id: string;
|
|
758
|
+
funding_source: "SPONSOR";
|
|
759
|
+
credential_source: "SPONSOR_KEY";
|
|
760
|
+
settlement_authority: "hlos.ai";
|
|
761
|
+
crossing_hash: string;
|
|
762
|
+
attested_receipt_id: string;
|
|
763
|
+
settled_at: string;
|
|
764
|
+
};
|
|
765
|
+
};
|
|
766
|
+
/**
|
|
767
|
+
* Type guard: check if a value is a valid CrossingHashInputV0.
|
|
768
|
+
*/
|
|
769
|
+
declare function isCrossingHashInputV0(value: unknown): value is CrossingHashInputV0;
|
|
770
|
+
/**
|
|
771
|
+
* Type guard: check if a value is a valid CrossingSettledReceipt.
|
|
772
|
+
*/
|
|
773
|
+
declare function isCrossingSettledReceipt(value: unknown): value is CrossingSettledReceipt;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Family W — Privacy-Preserving Proofs (Phase 1 Lock)
|
|
777
|
+
*
|
|
778
|
+
* CC-W-01: RP-specific pseudonym derivation + rotation
|
|
779
|
+
* CC-W-03: transaction_context_hash binding prevents replay
|
|
780
|
+
*
|
|
781
|
+
* Phase 1 schemas are LOCKED. Any changes require:
|
|
782
|
+
* - Golden vector updates
|
|
783
|
+
* - Invariants note
|
|
784
|
+
* - Contract tests
|
|
785
|
+
*
|
|
786
|
+
* @packageDocumentation
|
|
787
|
+
*/
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* RPID derivation domain separator.
|
|
791
|
+
* Used in HKDF info: concat(W_RPID_DOMAIN, encodeEpoch(epoch))
|
|
792
|
+
*/
|
|
793
|
+
declare const W_RPID_DOMAIN: Uint8Array<ArrayBuffer>;
|
|
794
|
+
/**
|
|
795
|
+
* Transaction context domain separator (reserved for future use).
|
|
796
|
+
*/
|
|
797
|
+
declare const W_TXCTX_DOMAIN: Uint8Array<ArrayBuffer>;
|
|
798
|
+
declare function encodeEpoch(epoch: number | string): Uint8Array;
|
|
799
|
+
/**
|
|
800
|
+
* Relying Party identifier.
|
|
801
|
+
* Uniquely identifies a verifier/merchant for pseudonym derivation.
|
|
802
|
+
*/
|
|
803
|
+
declare const RelyingPartyIdSchema: z.ZodObject<{
|
|
804
|
+
/** RP domain (e.g., "merchant.example.com") */
|
|
805
|
+
domain: z.ZodString;
|
|
806
|
+
/** Audience URI (e.g., "https://merchant.example.com/verify") */
|
|
807
|
+
audience_uri: z.ZodString;
|
|
808
|
+
/** SHA-256 hash of verifier's public key (hex, 64 chars) */
|
|
809
|
+
verifier_key_hash: z.ZodString;
|
|
810
|
+
}, "strip", z.ZodTypeAny, {
|
|
811
|
+
domain: string;
|
|
812
|
+
audience_uri: string;
|
|
813
|
+
verifier_key_hash: string;
|
|
814
|
+
}, {
|
|
815
|
+
domain: string;
|
|
816
|
+
audience_uri: string;
|
|
817
|
+
verifier_key_hash: string;
|
|
818
|
+
}>;
|
|
819
|
+
type RelyingPartyId = z.infer<typeof RelyingPartyIdSchema>;
|
|
820
|
+
/**
|
|
821
|
+
* Rotation epoch for RPID derivation.
|
|
822
|
+
*
|
|
823
|
+
* Accepts:
|
|
824
|
+
* - number: milliseconds since Unix epoch (non-negative integer)
|
|
825
|
+
* - string: RFC3339 datetime (e.g., "2026-01-29T00:00:00Z")
|
|
826
|
+
*
|
|
827
|
+
* INVARIANT: All epochs normalize to millisecond timestamps via encodeEpoch().
|
|
828
|
+
*/
|
|
829
|
+
declare const RotationEpochSchema: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
830
|
+
type RotationEpoch = z.infer<typeof RotationEpochSchema>;
|
|
831
|
+
/**
|
|
832
|
+
* RP-specific pseudonym.
|
|
833
|
+
* Base64url-encoded, 32 bytes = 43 chars without padding.
|
|
834
|
+
* We prefer no-padding format per RFC 7515.
|
|
835
|
+
*/
|
|
836
|
+
declare const RPIDSchema: z.ZodString;
|
|
837
|
+
type RPID = z.infer<typeof RPIDSchema>;
|
|
838
|
+
/**
|
|
839
|
+
* Transaction context for replay protection.
|
|
840
|
+
*
|
|
841
|
+
* Core fields (required, stable):
|
|
842
|
+
* - relying_party_id: who is verifying
|
|
843
|
+
* - operation_hash: sha256(JCS({ intent, request }))
|
|
844
|
+
* - not_before/not_after: validity window
|
|
845
|
+
*
|
|
846
|
+
* Optional fields (part of hash, must be consistent):
|
|
847
|
+
* - amount/currency: economic context
|
|
848
|
+
* - surface_id/channel_id: routing context
|
|
849
|
+
*/
|
|
850
|
+
declare const TransactionContextSchema: z.ZodObject<{
|
|
851
|
+
relying_party_id: z.ZodObject<{
|
|
852
|
+
/** RP domain (e.g., "merchant.example.com") */
|
|
853
|
+
domain: z.ZodString;
|
|
854
|
+
/** Audience URI (e.g., "https://merchant.example.com/verify") */
|
|
855
|
+
audience_uri: z.ZodString;
|
|
856
|
+
/** SHA-256 hash of verifier's public key (hex, 64 chars) */
|
|
857
|
+
verifier_key_hash: z.ZodString;
|
|
858
|
+
}, "strip", z.ZodTypeAny, {
|
|
859
|
+
domain: string;
|
|
860
|
+
audience_uri: string;
|
|
861
|
+
verifier_key_hash: string;
|
|
862
|
+
}, {
|
|
863
|
+
domain: string;
|
|
864
|
+
audience_uri: string;
|
|
865
|
+
verifier_key_hash: string;
|
|
866
|
+
}>;
|
|
867
|
+
/** sha256(JCS({ intent, request })) — see computeOperationHash() */
|
|
868
|
+
operation_hash: z.ZodString;
|
|
869
|
+
/** Validity start (RFC3339) */
|
|
870
|
+
not_before: z.ZodString;
|
|
871
|
+
/** Validity end (RFC3339) */
|
|
872
|
+
not_after: z.ZodString;
|
|
873
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
874
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
875
|
+
surface_id: z.ZodOptional<z.ZodString>;
|
|
876
|
+
channel_id: z.ZodOptional<z.ZodString>;
|
|
877
|
+
}, "strip", z.ZodTypeAny, {
|
|
878
|
+
relying_party_id: {
|
|
879
|
+
domain: string;
|
|
880
|
+
audience_uri: string;
|
|
881
|
+
verifier_key_hash: string;
|
|
882
|
+
};
|
|
883
|
+
operation_hash: string;
|
|
884
|
+
not_before: string;
|
|
885
|
+
not_after: string;
|
|
886
|
+
amount?: number | undefined;
|
|
887
|
+
currency?: string | undefined;
|
|
888
|
+
surface_id?: string | undefined;
|
|
889
|
+
channel_id?: string | undefined;
|
|
890
|
+
}, {
|
|
891
|
+
relying_party_id: {
|
|
892
|
+
domain: string;
|
|
893
|
+
audience_uri: string;
|
|
894
|
+
verifier_key_hash: string;
|
|
895
|
+
};
|
|
896
|
+
operation_hash: string;
|
|
897
|
+
not_before: string;
|
|
898
|
+
not_after: string;
|
|
899
|
+
amount?: number | undefined;
|
|
900
|
+
currency?: string | undefined;
|
|
901
|
+
surface_id?: string | undefined;
|
|
902
|
+
channel_id?: string | undefined;
|
|
903
|
+
}>;
|
|
904
|
+
type TransactionContext = z.infer<typeof TransactionContextSchema>;
|
|
905
|
+
/**
|
|
906
|
+
* SHA-256 hash of JCS-canonicalized TransactionContext.
|
|
907
|
+
* 64-character lowercase hex string.
|
|
908
|
+
*/
|
|
909
|
+
declare const TransactionContextHashSchema: z.ZodString;
|
|
910
|
+
type TransactionContextHash = z.infer<typeof TransactionContextHashSchema>;
|
|
911
|
+
/**
|
|
912
|
+
* Golden fixtures for Phase 1 W schemas.
|
|
913
|
+
* Used for drift detection and cross-repo alignment.
|
|
914
|
+
*/
|
|
915
|
+
declare const W_GOLDEN_FIXTURES: {
|
|
916
|
+
/**
|
|
917
|
+
* encodeEpoch(1706486400000) = 2024-01-29T00:00:00.000Z
|
|
918
|
+
* Expected: 8 bytes, u64 big-endian
|
|
919
|
+
*/
|
|
920
|
+
readonly epochMs: 1706486400000;
|
|
921
|
+
readonly expectedEpochBytes: Uint8Array<ArrayBuffer>;
|
|
922
|
+
/**
|
|
923
|
+
* Sample RelyingPartyId for test vectors
|
|
924
|
+
*/
|
|
925
|
+
readonly sampleRpId: {
|
|
926
|
+
domain: string;
|
|
927
|
+
audience_uri: string;
|
|
928
|
+
verifier_key_hash: string;
|
|
929
|
+
};
|
|
930
|
+
/**
|
|
931
|
+
* Sample TransactionContext for test vectors
|
|
932
|
+
*/
|
|
933
|
+
readonly sampleTxContext: {
|
|
934
|
+
relying_party_id: {
|
|
935
|
+
domain: string;
|
|
936
|
+
audience_uri: string;
|
|
937
|
+
verifier_key_hash: string;
|
|
938
|
+
};
|
|
939
|
+
operation_hash: string;
|
|
940
|
+
not_before: string;
|
|
941
|
+
not_after: string;
|
|
942
|
+
};
|
|
943
|
+
/**
|
|
944
|
+
* MAX_WINDOW_MS: Maximum allowed not_after - not_before (5 minutes)
|
|
945
|
+
*/
|
|
946
|
+
readonly MAX_WINDOW_MS: number;
|
|
947
|
+
};
|
|
948
|
+
/**
|
|
949
|
+
* Validate transaction context time window.
|
|
950
|
+
*
|
|
951
|
+
* Enforces:
|
|
952
|
+
* - not_after > not_before
|
|
953
|
+
* - not_after - not_before <= MAX_WINDOW_MS
|
|
954
|
+
*
|
|
955
|
+
* @param context - Transaction context to validate
|
|
956
|
+
* @returns true if valid, throws otherwise
|
|
957
|
+
*/
|
|
958
|
+
declare function validateTimeWindow(context: TransactionContext): boolean;
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* @hlos-ai/schemas - Agents Contracts
|
|
962
|
+
*
|
|
963
|
+
* Shared schemas for Agents Index + Passport Stub.
|
|
964
|
+
* Routes are authoritative source of truth; these schemas validate conformance.
|
|
965
|
+
*
|
|
966
|
+
* Design choices:
|
|
967
|
+
* - .passthrough() allows extra fields without breaking
|
|
968
|
+
* - Enums use .or(z.string()) pattern for forward compatibility
|
|
969
|
+
* - passport_id is z.null() as a boundary constraint
|
|
970
|
+
*/
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* AgentStatus - Known values documented, but accepts future additions.
|
|
974
|
+
*/
|
|
975
|
+
declare const AgentStatusSchema: z.ZodUnion<[z.ZodEnum<["ACTIVE", "PENDING", "SUSPENDED", "REVOKED"]>, z.ZodString]>;
|
|
976
|
+
type AgentStatus = z.infer<typeof AgentStatusSchema>;
|
|
977
|
+
/**
|
|
978
|
+
* AgentType - Known values documented, but accepts future additions.
|
|
979
|
+
*/
|
|
980
|
+
declare const AgentTypeSchema: z.ZodUnion<[z.ZodEnum<["CUSTOM", "CLAUDE", "GPT", "GEMINI", "CURSOR", "COPILOT", "OTHER"]>, z.ZodString]>;
|
|
981
|
+
type AgentType = z.infer<typeof AgentTypeSchema>;
|
|
982
|
+
/**
|
|
983
|
+
* Agent item in list response (snake_case wire format).
|
|
984
|
+
*/
|
|
985
|
+
declare const AgentListItemSchema: z.ZodObject<{
|
|
986
|
+
id: z.ZodString;
|
|
987
|
+
external_id: z.ZodString;
|
|
988
|
+
name: z.ZodString;
|
|
989
|
+
status: z.ZodUnion<[z.ZodEnum<["ACTIVE", "PENDING", "SUSPENDED", "REVOKED"]>, z.ZodString]>;
|
|
990
|
+
agent_type: z.ZodUnion<[z.ZodEnum<["CUSTOM", "CLAUDE", "GPT", "GEMINI", "CURSOR", "COPILOT", "OTHER"]>, z.ZodString]>;
|
|
991
|
+
trust_score: z.ZodNumber;
|
|
992
|
+
hosting_model: z.ZodNull;
|
|
993
|
+
declared_tier: z.ZodNull;
|
|
994
|
+
created_at: z.ZodString;
|
|
995
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
996
|
+
id: z.ZodString;
|
|
997
|
+
external_id: z.ZodString;
|
|
998
|
+
name: z.ZodString;
|
|
999
|
+
status: z.ZodUnion<[z.ZodEnum<["ACTIVE", "PENDING", "SUSPENDED", "REVOKED"]>, z.ZodString]>;
|
|
1000
|
+
agent_type: z.ZodUnion<[z.ZodEnum<["CUSTOM", "CLAUDE", "GPT", "GEMINI", "CURSOR", "COPILOT", "OTHER"]>, z.ZodString]>;
|
|
1001
|
+
trust_score: z.ZodNumber;
|
|
1002
|
+
hosting_model: z.ZodNull;
|
|
1003
|
+
declared_tier: z.ZodNull;
|
|
1004
|
+
created_at: z.ZodString;
|
|
1005
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1006
|
+
id: z.ZodString;
|
|
1007
|
+
external_id: z.ZodString;
|
|
1008
|
+
name: z.ZodString;
|
|
1009
|
+
status: z.ZodUnion<[z.ZodEnum<["ACTIVE", "PENDING", "SUSPENDED", "REVOKED"]>, z.ZodString]>;
|
|
1010
|
+
agent_type: z.ZodUnion<[z.ZodEnum<["CUSTOM", "CLAUDE", "GPT", "GEMINI", "CURSOR", "COPILOT", "OTHER"]>, z.ZodString]>;
|
|
1011
|
+
trust_score: z.ZodNumber;
|
|
1012
|
+
hosting_model: z.ZodNull;
|
|
1013
|
+
declared_tier: z.ZodNull;
|
|
1014
|
+
created_at: z.ZodString;
|
|
1015
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1016
|
+
type AgentListItem = z.infer<typeof AgentListItemSchema>;
|
|
1017
|
+
/**
|
|
1018
|
+
* GET /api/agents response schema.
|
|
1019
|
+
* _meta.source: "hlos" (authoritative list)
|
|
1020
|
+
*/
|
|
1021
|
+
declare const AgentsListResponseSchema: z.ZodObject<{
|
|
1022
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
1023
|
+
id: z.ZodString;
|
|
1024
|
+
external_id: z.ZodString;
|
|
1025
|
+
name: z.ZodString;
|
|
1026
|
+
status: z.ZodUnion<[z.ZodEnum<["ACTIVE", "PENDING", "SUSPENDED", "REVOKED"]>, z.ZodString]>;
|
|
1027
|
+
agent_type: z.ZodUnion<[z.ZodEnum<["CUSTOM", "CLAUDE", "GPT", "GEMINI", "CURSOR", "COPILOT", "OTHER"]>, z.ZodString]>;
|
|
1028
|
+
trust_score: z.ZodNumber;
|
|
1029
|
+
hosting_model: z.ZodNull;
|
|
1030
|
+
declared_tier: z.ZodNull;
|
|
1031
|
+
created_at: z.ZodString;
|
|
1032
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1033
|
+
id: z.ZodString;
|
|
1034
|
+
external_id: z.ZodString;
|
|
1035
|
+
name: z.ZodString;
|
|
1036
|
+
status: z.ZodUnion<[z.ZodEnum<["ACTIVE", "PENDING", "SUSPENDED", "REVOKED"]>, z.ZodString]>;
|
|
1037
|
+
agent_type: z.ZodUnion<[z.ZodEnum<["CUSTOM", "CLAUDE", "GPT", "GEMINI", "CURSOR", "COPILOT", "OTHER"]>, z.ZodString]>;
|
|
1038
|
+
trust_score: z.ZodNumber;
|
|
1039
|
+
hosting_model: z.ZodNull;
|
|
1040
|
+
declared_tier: z.ZodNull;
|
|
1041
|
+
created_at: z.ZodString;
|
|
1042
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1043
|
+
id: z.ZodString;
|
|
1044
|
+
external_id: z.ZodString;
|
|
1045
|
+
name: z.ZodString;
|
|
1046
|
+
status: z.ZodUnion<[z.ZodEnum<["ACTIVE", "PENDING", "SUSPENDED", "REVOKED"]>, z.ZodString]>;
|
|
1047
|
+
agent_type: z.ZodUnion<[z.ZodEnum<["CUSTOM", "CLAUDE", "GPT", "GEMINI", "CURSOR", "COPILOT", "OTHER"]>, z.ZodString]>;
|
|
1048
|
+
trust_score: z.ZodNumber;
|
|
1049
|
+
hosting_model: z.ZodNull;
|
|
1050
|
+
declared_tier: z.ZodNull;
|
|
1051
|
+
created_at: z.ZodString;
|
|
1052
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
1053
|
+
_meta: z.ZodObject<{
|
|
1054
|
+
source: z.ZodLiteral<"hlos">;
|
|
1055
|
+
}, "strip", z.ZodTypeAny, {
|
|
1056
|
+
source: "hlos";
|
|
1057
|
+
}, {
|
|
1058
|
+
source: "hlos";
|
|
1059
|
+
}>;
|
|
1060
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1061
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
1062
|
+
id: z.ZodString;
|
|
1063
|
+
external_id: z.ZodString;
|
|
1064
|
+
name: z.ZodString;
|
|
1065
|
+
status: z.ZodUnion<[z.ZodEnum<["ACTIVE", "PENDING", "SUSPENDED", "REVOKED"]>, z.ZodString]>;
|
|
1066
|
+
agent_type: z.ZodUnion<[z.ZodEnum<["CUSTOM", "CLAUDE", "GPT", "GEMINI", "CURSOR", "COPILOT", "OTHER"]>, z.ZodString]>;
|
|
1067
|
+
trust_score: z.ZodNumber;
|
|
1068
|
+
hosting_model: z.ZodNull;
|
|
1069
|
+
declared_tier: z.ZodNull;
|
|
1070
|
+
created_at: z.ZodString;
|
|
1071
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1072
|
+
id: z.ZodString;
|
|
1073
|
+
external_id: z.ZodString;
|
|
1074
|
+
name: z.ZodString;
|
|
1075
|
+
status: z.ZodUnion<[z.ZodEnum<["ACTIVE", "PENDING", "SUSPENDED", "REVOKED"]>, z.ZodString]>;
|
|
1076
|
+
agent_type: z.ZodUnion<[z.ZodEnum<["CUSTOM", "CLAUDE", "GPT", "GEMINI", "CURSOR", "COPILOT", "OTHER"]>, z.ZodString]>;
|
|
1077
|
+
trust_score: z.ZodNumber;
|
|
1078
|
+
hosting_model: z.ZodNull;
|
|
1079
|
+
declared_tier: z.ZodNull;
|
|
1080
|
+
created_at: z.ZodString;
|
|
1081
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1082
|
+
id: z.ZodString;
|
|
1083
|
+
external_id: z.ZodString;
|
|
1084
|
+
name: z.ZodString;
|
|
1085
|
+
status: z.ZodUnion<[z.ZodEnum<["ACTIVE", "PENDING", "SUSPENDED", "REVOKED"]>, z.ZodString]>;
|
|
1086
|
+
agent_type: z.ZodUnion<[z.ZodEnum<["CUSTOM", "CLAUDE", "GPT", "GEMINI", "CURSOR", "COPILOT", "OTHER"]>, z.ZodString]>;
|
|
1087
|
+
trust_score: z.ZodNumber;
|
|
1088
|
+
hosting_model: z.ZodNull;
|
|
1089
|
+
declared_tier: z.ZodNull;
|
|
1090
|
+
created_at: z.ZodString;
|
|
1091
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
1092
|
+
_meta: z.ZodObject<{
|
|
1093
|
+
source: z.ZodLiteral<"hlos">;
|
|
1094
|
+
}, "strip", z.ZodTypeAny, {
|
|
1095
|
+
source: "hlos";
|
|
1096
|
+
}, {
|
|
1097
|
+
source: "hlos";
|
|
1098
|
+
}>;
|
|
1099
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1100
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
1101
|
+
id: z.ZodString;
|
|
1102
|
+
external_id: z.ZodString;
|
|
1103
|
+
name: z.ZodString;
|
|
1104
|
+
status: z.ZodUnion<[z.ZodEnum<["ACTIVE", "PENDING", "SUSPENDED", "REVOKED"]>, z.ZodString]>;
|
|
1105
|
+
agent_type: z.ZodUnion<[z.ZodEnum<["CUSTOM", "CLAUDE", "GPT", "GEMINI", "CURSOR", "COPILOT", "OTHER"]>, z.ZodString]>;
|
|
1106
|
+
trust_score: z.ZodNumber;
|
|
1107
|
+
hosting_model: z.ZodNull;
|
|
1108
|
+
declared_tier: z.ZodNull;
|
|
1109
|
+
created_at: z.ZodString;
|
|
1110
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1111
|
+
id: z.ZodString;
|
|
1112
|
+
external_id: z.ZodString;
|
|
1113
|
+
name: z.ZodString;
|
|
1114
|
+
status: z.ZodUnion<[z.ZodEnum<["ACTIVE", "PENDING", "SUSPENDED", "REVOKED"]>, z.ZodString]>;
|
|
1115
|
+
agent_type: z.ZodUnion<[z.ZodEnum<["CUSTOM", "CLAUDE", "GPT", "GEMINI", "CURSOR", "COPILOT", "OTHER"]>, z.ZodString]>;
|
|
1116
|
+
trust_score: z.ZodNumber;
|
|
1117
|
+
hosting_model: z.ZodNull;
|
|
1118
|
+
declared_tier: z.ZodNull;
|
|
1119
|
+
created_at: z.ZodString;
|
|
1120
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1121
|
+
id: z.ZodString;
|
|
1122
|
+
external_id: z.ZodString;
|
|
1123
|
+
name: z.ZodString;
|
|
1124
|
+
status: z.ZodUnion<[z.ZodEnum<["ACTIVE", "PENDING", "SUSPENDED", "REVOKED"]>, z.ZodString]>;
|
|
1125
|
+
agent_type: z.ZodUnion<[z.ZodEnum<["CUSTOM", "CLAUDE", "GPT", "GEMINI", "CURSOR", "COPILOT", "OTHER"]>, z.ZodString]>;
|
|
1126
|
+
trust_score: z.ZodNumber;
|
|
1127
|
+
hosting_model: z.ZodNull;
|
|
1128
|
+
declared_tier: z.ZodNull;
|
|
1129
|
+
created_at: z.ZodString;
|
|
1130
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
1131
|
+
_meta: z.ZodObject<{
|
|
1132
|
+
source: z.ZodLiteral<"hlos">;
|
|
1133
|
+
}, "strip", z.ZodTypeAny, {
|
|
1134
|
+
source: "hlos";
|
|
1135
|
+
}, {
|
|
1136
|
+
source: "hlos";
|
|
1137
|
+
}>;
|
|
1138
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1139
|
+
type AgentsListResponse = z.infer<typeof AgentsListResponseSchema>;
|
|
1140
|
+
/**
|
|
1141
|
+
* GET /api/agents/[agentId]/passport response schema.
|
|
1142
|
+
*
|
|
1143
|
+
* BOUNDARY CONSTRAINT:
|
|
1144
|
+
* - passport_id MUST be null (HLOS does not mint passports)
|
|
1145
|
+
* - _meta.source: "stub" signals non-authoritative response
|
|
1146
|
+
* - All counters/tiers are null until backed by Agent-Passport system
|
|
1147
|
+
*/
|
|
1148
|
+
declare const AgentPassportStubResponseSchema: z.ZodObject<{
|
|
1149
|
+
passport_id: z.ZodNull;
|
|
1150
|
+
agent_id: z.ZodString;
|
|
1151
|
+
hosting_model: z.ZodNull;
|
|
1152
|
+
declared_tier: z.ZodNull;
|
|
1153
|
+
effective_tier: z.ZodNull;
|
|
1154
|
+
finality_level: z.ZodNull;
|
|
1155
|
+
graph: z.ZodObject<{
|
|
1156
|
+
incoming_edges: z.ZodNull;
|
|
1157
|
+
outgoing_edges: z.ZodNull;
|
|
1158
|
+
active_visas: z.ZodNull;
|
|
1159
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1160
|
+
incoming_edges: z.ZodNull;
|
|
1161
|
+
outgoing_edges: z.ZodNull;
|
|
1162
|
+
active_visas: z.ZodNull;
|
|
1163
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1164
|
+
incoming_edges: z.ZodNull;
|
|
1165
|
+
outgoing_edges: z.ZodNull;
|
|
1166
|
+
active_visas: z.ZodNull;
|
|
1167
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1168
|
+
links: z.ZodObject<{
|
|
1169
|
+
passport_url: z.ZodString;
|
|
1170
|
+
docs_url: z.ZodLiteral<"/agents/passport">;
|
|
1171
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1172
|
+
passport_url: z.ZodString;
|
|
1173
|
+
docs_url: z.ZodLiteral<"/agents/passport">;
|
|
1174
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1175
|
+
passport_url: z.ZodString;
|
|
1176
|
+
docs_url: z.ZodLiteral<"/agents/passport">;
|
|
1177
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1178
|
+
_meta: z.ZodObject<{
|
|
1179
|
+
source: z.ZodLiteral<"stub">;
|
|
1180
|
+
}, "strip", z.ZodTypeAny, {
|
|
1181
|
+
source: "stub";
|
|
1182
|
+
}, {
|
|
1183
|
+
source: "stub";
|
|
1184
|
+
}>;
|
|
1185
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1186
|
+
passport_id: z.ZodNull;
|
|
1187
|
+
agent_id: z.ZodString;
|
|
1188
|
+
hosting_model: z.ZodNull;
|
|
1189
|
+
declared_tier: z.ZodNull;
|
|
1190
|
+
effective_tier: z.ZodNull;
|
|
1191
|
+
finality_level: z.ZodNull;
|
|
1192
|
+
graph: z.ZodObject<{
|
|
1193
|
+
incoming_edges: z.ZodNull;
|
|
1194
|
+
outgoing_edges: z.ZodNull;
|
|
1195
|
+
active_visas: z.ZodNull;
|
|
1196
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1197
|
+
incoming_edges: z.ZodNull;
|
|
1198
|
+
outgoing_edges: z.ZodNull;
|
|
1199
|
+
active_visas: z.ZodNull;
|
|
1200
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1201
|
+
incoming_edges: z.ZodNull;
|
|
1202
|
+
outgoing_edges: z.ZodNull;
|
|
1203
|
+
active_visas: z.ZodNull;
|
|
1204
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1205
|
+
links: z.ZodObject<{
|
|
1206
|
+
passport_url: z.ZodString;
|
|
1207
|
+
docs_url: z.ZodLiteral<"/agents/passport">;
|
|
1208
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1209
|
+
passport_url: z.ZodString;
|
|
1210
|
+
docs_url: z.ZodLiteral<"/agents/passport">;
|
|
1211
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1212
|
+
passport_url: z.ZodString;
|
|
1213
|
+
docs_url: z.ZodLiteral<"/agents/passport">;
|
|
1214
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1215
|
+
_meta: z.ZodObject<{
|
|
1216
|
+
source: z.ZodLiteral<"stub">;
|
|
1217
|
+
}, "strip", z.ZodTypeAny, {
|
|
1218
|
+
source: "stub";
|
|
1219
|
+
}, {
|
|
1220
|
+
source: "stub";
|
|
1221
|
+
}>;
|
|
1222
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1223
|
+
passport_id: z.ZodNull;
|
|
1224
|
+
agent_id: z.ZodString;
|
|
1225
|
+
hosting_model: z.ZodNull;
|
|
1226
|
+
declared_tier: z.ZodNull;
|
|
1227
|
+
effective_tier: z.ZodNull;
|
|
1228
|
+
finality_level: z.ZodNull;
|
|
1229
|
+
graph: z.ZodObject<{
|
|
1230
|
+
incoming_edges: z.ZodNull;
|
|
1231
|
+
outgoing_edges: z.ZodNull;
|
|
1232
|
+
active_visas: z.ZodNull;
|
|
1233
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1234
|
+
incoming_edges: z.ZodNull;
|
|
1235
|
+
outgoing_edges: z.ZodNull;
|
|
1236
|
+
active_visas: z.ZodNull;
|
|
1237
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1238
|
+
incoming_edges: z.ZodNull;
|
|
1239
|
+
outgoing_edges: z.ZodNull;
|
|
1240
|
+
active_visas: z.ZodNull;
|
|
1241
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1242
|
+
links: z.ZodObject<{
|
|
1243
|
+
passport_url: z.ZodString;
|
|
1244
|
+
docs_url: z.ZodLiteral<"/agents/passport">;
|
|
1245
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1246
|
+
passport_url: z.ZodString;
|
|
1247
|
+
docs_url: z.ZodLiteral<"/agents/passport">;
|
|
1248
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1249
|
+
passport_url: z.ZodString;
|
|
1250
|
+
docs_url: z.ZodLiteral<"/agents/passport">;
|
|
1251
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1252
|
+
_meta: z.ZodObject<{
|
|
1253
|
+
source: z.ZodLiteral<"stub">;
|
|
1254
|
+
}, "strip", z.ZodTypeAny, {
|
|
1255
|
+
source: "stub";
|
|
1256
|
+
}, {
|
|
1257
|
+
source: "stub";
|
|
1258
|
+
}>;
|
|
1259
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1260
|
+
type AgentPassportStubResponse = z.infer<typeof AgentPassportStubResponseSchema>;
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* @hlos-ai/schemas - Base64url Encoding Utilities
|
|
1264
|
+
*
|
|
1265
|
+
* RFC 4648 §5 compliant base64url encoding/decoding.
|
|
1266
|
+
* Zero external dependencies.
|
|
1267
|
+
*
|
|
1268
|
+
* Used for:
|
|
1269
|
+
* - receipt_hash: base64url(SHA-256(JCS(receipt)))
|
|
1270
|
+
* - content_hash: base64url(SHA-256(JCS(content)))
|
|
1271
|
+
* - crossing_hash: base64url(SHA-256(JCS(CrossingHashInputV0)))
|
|
1272
|
+
* - Ed25519 signatures and public keys
|
|
1273
|
+
*/
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* Encode Uint8Array to base64url (RFC 4648 §5, no padding).
|
|
1277
|
+
*/
|
|
1278
|
+
declare function bytesToBase64url(bytes: Uint8Array): string;
|
|
1279
|
+
/**
|
|
1280
|
+
* Decode base64url string to Uint8Array.
|
|
1281
|
+
*/
|
|
1282
|
+
declare function base64urlToBytes(str: string): Uint8Array;
|
|
1283
|
+
/**
|
|
1284
|
+
* Regex for base64url-encoded SHA-256 hash (32 bytes = 43 chars, no padding).
|
|
1285
|
+
*/
|
|
1286
|
+
declare const BASE64URL_SHA256_REGEX: RegExp;
|
|
1287
|
+
/**
|
|
1288
|
+
* Zod schema for a base64url-encoded SHA-256 hash.
|
|
1289
|
+
* 32 bytes = 43 chars base64url (no padding).
|
|
1290
|
+
*/
|
|
1291
|
+
declare const Base64urlSha256Schema: z.ZodString;
|
|
1292
|
+
/**
|
|
1293
|
+
* Zod schema for a base64url-encoded Ed25519 signature.
|
|
1294
|
+
* 64 bytes = 86 chars base64url (no padding).
|
|
1295
|
+
*/
|
|
1296
|
+
declare const Base64urlEd25519SigSchema: z.ZodString;
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* @hlos-ai/schemas - Receipt Hash Computation
|
|
1300
|
+
*
|
|
1301
|
+
* Canonical hash computation for HLOS receipts.
|
|
1302
|
+
*
|
|
1303
|
+
* receipt_hash = base64url(SHA-256(JCS(receipt)))
|
|
1304
|
+
*
|
|
1305
|
+
* This is the hash that:
|
|
1306
|
+
* - BazaarReceiptEnvelope references (hash-first, per BRIDGE_SPEC.md §1.1)
|
|
1307
|
+
* - Notary Attestation (NA) binds to (per BRIDGE_SPEC.md §4.3)
|
|
1308
|
+
* - Surfaces use to reference kernel receipts unambiguously
|
|
1309
|
+
*
|
|
1310
|
+
* IMPORTANT: receipt_hash is computed over the ENTIRE SignedReceiptV0 envelope
|
|
1311
|
+
* (including content, content_hash, signature, key_id, etc.), NOT just content.
|
|
1312
|
+
* This binds the hash to a specific signed receipt version.
|
|
1313
|
+
*
|
|
1314
|
+
* Requires @noble/hashes as peer dependency.
|
|
1315
|
+
*
|
|
1316
|
+
* @see BRIDGE_SPEC.md §1.3 for canonical hashing requirements
|
|
1317
|
+
*/
|
|
1318
|
+
|
|
1319
|
+
/**
|
|
1320
|
+
* JCS (RFC 8785) canonical JSON serialization.
|
|
1321
|
+
*
|
|
1322
|
+
* Per RFC 8785:
|
|
1323
|
+
* - Object keys are lexicographically sorted
|
|
1324
|
+
* - Numbers use ES6 serialization
|
|
1325
|
+
* - Rejects: undefined, functions, symbols, bigint, non-finite numbers
|
|
1326
|
+
*
|
|
1327
|
+
* @throws Error if value contains non-canonicalizable types
|
|
1328
|
+
*/
|
|
1329
|
+
declare function jcsCanonicalize(value: unknown): string;
|
|
1330
|
+
/**
|
|
1331
|
+
* Compute receipt_hash for a SignedReceiptV0.
|
|
1332
|
+
*
|
|
1333
|
+
* receipt_hash = base64url(SHA-256(JCS(receipt)))
|
|
1334
|
+
*
|
|
1335
|
+
* The hash is over the ENTIRE receipt envelope (content, content_hash,
|
|
1336
|
+
* signature, key_id, @type, version, receipt_id, issued_at).
|
|
1337
|
+
*
|
|
1338
|
+
* This is the canonical hash format per BRIDGE_SPEC.md §1.3:
|
|
1339
|
+
* 1. Canonicalize the receipt using RFC 8785 JCS
|
|
1340
|
+
* 2. Hash canonical bytes using SHA-256
|
|
1341
|
+
* 3. Encode as base64url (no padding)
|
|
1342
|
+
*
|
|
1343
|
+
* @param receipt - A fully-formed SignedReceiptV0 (must already be signed)
|
|
1344
|
+
* @returns 43-char base64url string (32-byte SHA-256 digest)
|
|
1345
|
+
*
|
|
1346
|
+
* @example
|
|
1347
|
+
* ```typescript
|
|
1348
|
+
* const receipt = issueReceiptV0(content);
|
|
1349
|
+
* const hash = computeReceiptHash(receipt);
|
|
1350
|
+
* // hash is e.g. "z8A2kCNck4rPL4ugNe-Fbxputdi3PkjkVpSrIBhojU0"
|
|
1351
|
+
* ```
|
|
1352
|
+
*/
|
|
1353
|
+
declare function computeReceiptHash(receipt: SignedReceiptV0): string;
|
|
1354
|
+
/**
|
|
1355
|
+
* Compute content_hash for arbitrary content.
|
|
1356
|
+
*
|
|
1357
|
+
* content_hash = base64url(SHA-256(JCS(content)))
|
|
1358
|
+
*
|
|
1359
|
+
* This is the hash stored in SignedReceiptV0.content_hash.
|
|
1360
|
+
* It hashes only the content field, NOT the entire receipt.
|
|
1361
|
+
*
|
|
1362
|
+
* @param content - The content to hash (will be JCS-canonicalized)
|
|
1363
|
+
* @returns 43-char base64url string (32-byte SHA-256 digest)
|
|
1364
|
+
*/
|
|
1365
|
+
declare function computeContentHash(content: unknown): string;
|
|
1366
|
+
/**
|
|
1367
|
+
* Zod schema for receipt_hash field.
|
|
1368
|
+
* base64url(SHA-256(JCS(receipt))) — always 43 chars.
|
|
1369
|
+
*/
|
|
1370
|
+
declare const ReceiptHashSchema: z.ZodString;
|
|
1371
|
+
/**
|
|
1372
|
+
* Golden receipt fixture for hash conformance testing.
|
|
1373
|
+
*
|
|
1374
|
+
* This is a deterministic SignedReceiptV0 with fixed field values.
|
|
1375
|
+
* The receipt_hash computed over this fixture is FROZEN.
|
|
1376
|
+
*
|
|
1377
|
+
* If your computeReceiptHash() produces a different result for this input,
|
|
1378
|
+
* your implementation is non-conformant. DO NOT CHANGE these values.
|
|
1379
|
+
*/
|
|
1380
|
+
declare const RECEIPT_HASH_GOLDEN_FIXTURE: {
|
|
1381
|
+
readonly receipt: {
|
|
1382
|
+
'@type': "https://hlos.ai/schema/SignedReceiptV0";
|
|
1383
|
+
version: 0;
|
|
1384
|
+
receipt_id: string;
|
|
1385
|
+
content: {
|
|
1386
|
+
type: "CrossingSettled";
|
|
1387
|
+
crossingId: string;
|
|
1388
|
+
settlement_authority: string;
|
|
1389
|
+
};
|
|
1390
|
+
content_hash: string;
|
|
1391
|
+
signature: string;
|
|
1392
|
+
key_id: string;
|
|
1393
|
+
issued_at: string;
|
|
1394
|
+
};
|
|
1395
|
+
/**
|
|
1396
|
+
* Expected JCS canonical form of the receipt.
|
|
1397
|
+
* Keys are lexicographically sorted at all levels.
|
|
1398
|
+
*/
|
|
1399
|
+
readonly expectedJcs: "{\"@type\":\"https://hlos.ai/schema/SignedReceiptV0\",\"content\":{\"crossingId\":\"cross_test123abc456def789ghi\",\"settlement_authority\":\"hlos.ai\",\"type\":\"CrossingSettled\"},\"content_hash\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\",\"issued_at\":\"2026-01-27T00:00:00.000Z\",\"key_id\":\"hlos-v2-1\",\"receipt_id\":\"rcpt_01HZGOLDENTEST000000000000\",\"signature\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\",\"version\":0}";
|
|
1400
|
+
/**
|
|
1401
|
+
* Expected receipt_hash (FROZEN).
|
|
1402
|
+
* Compute: JCS canonicalize receipt → SHA-256 → base64url (no padding)
|
|
1403
|
+
*
|
|
1404
|
+
* DO NOT CHANGE unless the receipt fixture above changes.
|
|
1405
|
+
*/
|
|
1406
|
+
readonly expectedReceiptHash: "uLiQVUeVKcE35Rdje2fArZQfTcECDgwK6UbmQB_36Pg";
|
|
1407
|
+
};
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* @hlos-ai/schemas - Finality Schemas
|
|
1411
|
+
*
|
|
1412
|
+
* Defines the Notary Attestation (NA) schema and related types
|
|
1413
|
+
* for HLOS kernel-level HARD finality.
|
|
1414
|
+
*
|
|
1415
|
+
* Per BRIDGE_SPEC.md §4:
|
|
1416
|
+
* - SOFT finality: SignedReceiptV0 signed by settlement authority hlos.ai
|
|
1417
|
+
* - HARD finality: SignedReceiptV0 + NA where STAAMPID countersigns receipt_hash
|
|
1418
|
+
*
|
|
1419
|
+
* HARD finality is a platform feature (POST /api/finality/notarize),
|
|
1420
|
+
* not surface-specific. Any surface can request it.
|
|
1421
|
+
*
|
|
1422
|
+
* @see BRIDGE_SPEC.md §4.3 for NA schema
|
|
1423
|
+
* @see BRIDGE_SPEC.md §4.2 for notarize endpoint
|
|
1424
|
+
*/
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* NA ID prefix.
|
|
1428
|
+
*/
|
|
1429
|
+
declare const NA_ID_PREFIX: "na_";
|
|
1430
|
+
/**
|
|
1431
|
+
* Finality levels.
|
|
1432
|
+
*/
|
|
1433
|
+
declare const FinalityLevel: {
|
|
1434
|
+
readonly SOFT: "SOFT";
|
|
1435
|
+
readonly HARD: "HARD";
|
|
1436
|
+
};
|
|
1437
|
+
type FinalityLevel = (typeof FinalityLevel)[keyof typeof FinalityLevel];
|
|
1438
|
+
/**
|
|
1439
|
+
* Notary Attestation ID format: na_ + alphanumeric (20+ chars).
|
|
1440
|
+
*/
|
|
1441
|
+
declare const NotaryAttestationIdFormatSchema: z.ZodString;
|
|
1442
|
+
/**
|
|
1443
|
+
* Merkle proof for append-only log inclusion.
|
|
1444
|
+
* Future-proof: STAAMPID may provide this for auditable transparency.
|
|
1445
|
+
*/
|
|
1446
|
+
declare const LogInclusionProofSchema: z.ZodObject<{
|
|
1447
|
+
/** Merkle root hash (base64url SHA-256) */
|
|
1448
|
+
root: z.ZodString;
|
|
1449
|
+
/** Sibling hashes along the path (base64url SHA-256 each) */
|
|
1450
|
+
proof: z.ZodArray<z.ZodString, "many">;
|
|
1451
|
+
/** Leaf index in the log */
|
|
1452
|
+
index: z.ZodNumber;
|
|
1453
|
+
}, "strip", z.ZodTypeAny, {
|
|
1454
|
+
root: string;
|
|
1455
|
+
proof: string[];
|
|
1456
|
+
index: number;
|
|
1457
|
+
}, {
|
|
1458
|
+
root: string;
|
|
1459
|
+
proof: string[];
|
|
1460
|
+
index: number;
|
|
1461
|
+
}>;
|
|
1462
|
+
type LogInclusionProof = z.infer<typeof LogInclusionProofSchema>;
|
|
1463
|
+
/**
|
|
1464
|
+
* NotaryAttestation (NA): STAAMPID's countersignature over a receipt_hash.
|
|
1465
|
+
*
|
|
1466
|
+
* This is the artifact that promotes SOFT finality → HARD finality.
|
|
1467
|
+
* The notary binds to receipt_hash, NOT the receipt content directly.
|
|
1468
|
+
*
|
|
1469
|
+
* Required fields (per BRIDGE_SPEC.md §4.3):
|
|
1470
|
+
* - na_id: Unique NA identifier
|
|
1471
|
+
* - receipt_hash: The kernel receipt hash being attested
|
|
1472
|
+
* - notary_id: Identifier of the notary service
|
|
1473
|
+
* - issued_at: When the attestation was issued
|
|
1474
|
+
* - signature: The notary's countersignature
|
|
1475
|
+
* - signature_alg: Signature algorithm used
|
|
1476
|
+
*
|
|
1477
|
+
* Optional fields (future-proof):
|
|
1478
|
+
* - receipt_type, receipt_version: For schema evolution
|
|
1479
|
+
* - settlement_authority: Cross-check field
|
|
1480
|
+
* - validity_window_seconds, expires_at: TTL for NA validity
|
|
1481
|
+
* - log_inclusion: Merkle proof for append-only log
|
|
1482
|
+
*/
|
|
1483
|
+
declare const NotaryAttestationSchema: z.ZodObject<{
|
|
1484
|
+
/** Unique NA identifier */
|
|
1485
|
+
na_id: z.ZodString;
|
|
1486
|
+
/** The receipt_hash this NA attests to */
|
|
1487
|
+
receipt_hash: z.ZodString;
|
|
1488
|
+
/** Notary service identifier (e.g. "staampid") */
|
|
1489
|
+
notary_id: z.ZodString;
|
|
1490
|
+
/** ISO 8601 timestamp when NA was issued */
|
|
1491
|
+
issued_at: z.ZodString;
|
|
1492
|
+
/** Notary's countersignature (base64url encoded) */
|
|
1493
|
+
signature: z.ZodString;
|
|
1494
|
+
/** Signature algorithm (e.g. "EdDSA") */
|
|
1495
|
+
signature_alg: z.ZodString;
|
|
1496
|
+
/** Receipt type being attested */
|
|
1497
|
+
receipt_type: z.ZodOptional<z.ZodString>;
|
|
1498
|
+
/** Receipt version being attested */
|
|
1499
|
+
receipt_version: z.ZodOptional<z.ZodNumber>;
|
|
1500
|
+
/** Settlement authority that issued the receipt (cross-check) */
|
|
1501
|
+
settlement_authority: z.ZodOptional<z.ZodString>;
|
|
1502
|
+
/** TTL in seconds for this attestation */
|
|
1503
|
+
validity_window_seconds: z.ZodOptional<z.ZodNumber>;
|
|
1504
|
+
/** ISO 8601 expiry (derived from issued_at + validity_window_seconds) */
|
|
1505
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
1506
|
+
/** Merkle proof for append-only log inclusion */
|
|
1507
|
+
log_inclusion: z.ZodOptional<z.ZodObject<{
|
|
1508
|
+
/** Merkle root hash (base64url SHA-256) */
|
|
1509
|
+
root: z.ZodString;
|
|
1510
|
+
/** Sibling hashes along the path (base64url SHA-256 each) */
|
|
1511
|
+
proof: z.ZodArray<z.ZodString, "many">;
|
|
1512
|
+
/** Leaf index in the log */
|
|
1513
|
+
index: z.ZodNumber;
|
|
1514
|
+
}, "strip", z.ZodTypeAny, {
|
|
1515
|
+
root: string;
|
|
1516
|
+
proof: string[];
|
|
1517
|
+
index: number;
|
|
1518
|
+
}, {
|
|
1519
|
+
root: string;
|
|
1520
|
+
proof: string[];
|
|
1521
|
+
index: number;
|
|
1522
|
+
}>>;
|
|
1523
|
+
}, "strip", z.ZodTypeAny, {
|
|
1524
|
+
signature: string;
|
|
1525
|
+
issued_at: string;
|
|
1526
|
+
na_id: string;
|
|
1527
|
+
receipt_hash: string;
|
|
1528
|
+
notary_id: string;
|
|
1529
|
+
signature_alg: string;
|
|
1530
|
+
settlement_authority?: string | undefined;
|
|
1531
|
+
receipt_type?: string | undefined;
|
|
1532
|
+
receipt_version?: number | undefined;
|
|
1533
|
+
validity_window_seconds?: number | undefined;
|
|
1534
|
+
expires_at?: string | undefined;
|
|
1535
|
+
log_inclusion?: {
|
|
1536
|
+
root: string;
|
|
1537
|
+
proof: string[];
|
|
1538
|
+
index: number;
|
|
1539
|
+
} | undefined;
|
|
1540
|
+
}, {
|
|
1541
|
+
signature: string;
|
|
1542
|
+
issued_at: string;
|
|
1543
|
+
na_id: string;
|
|
1544
|
+
receipt_hash: string;
|
|
1545
|
+
notary_id: string;
|
|
1546
|
+
signature_alg: string;
|
|
1547
|
+
settlement_authority?: string | undefined;
|
|
1548
|
+
receipt_type?: string | undefined;
|
|
1549
|
+
receipt_version?: number | undefined;
|
|
1550
|
+
validity_window_seconds?: number | undefined;
|
|
1551
|
+
expires_at?: string | undefined;
|
|
1552
|
+
log_inclusion?: {
|
|
1553
|
+
root: string;
|
|
1554
|
+
proof: string[];
|
|
1555
|
+
index: number;
|
|
1556
|
+
} | undefined;
|
|
1557
|
+
}>;
|
|
1558
|
+
type NotaryAttestation = z.infer<typeof NotaryAttestationSchema>;
|
|
1559
|
+
/**
|
|
1560
|
+
* NotaryRequest: The payload HLOS sends to STAAMPID to request a countersignature.
|
|
1561
|
+
*
|
|
1562
|
+
* This is a deterministic payload per BRIDGE_SPEC.md §4.3.
|
|
1563
|
+
* STAAMPID uses this to:
|
|
1564
|
+
* 1. Verify the receipt_hash is well-formed
|
|
1565
|
+
* 2. Log the attestation request
|
|
1566
|
+
* 3. Countersign and return NA
|
|
1567
|
+
*/
|
|
1568
|
+
declare const NotaryRequestSchema: z.ZodObject<{
|
|
1569
|
+
/** receipt_hash to be attested (base64url SHA-256) */
|
|
1570
|
+
receipt_hash: z.ZodString;
|
|
1571
|
+
/** Must be literal 'hlos.ai' */
|
|
1572
|
+
settlement_authority: z.ZodLiteral<"hlos.ai">;
|
|
1573
|
+
/** Crossing this receipt belongs to */
|
|
1574
|
+
crossing_id: z.ZodString;
|
|
1575
|
+
/** Type of the receipt being attested */
|
|
1576
|
+
receipt_type: z.ZodString;
|
|
1577
|
+
/** Version of the receipt being attested */
|
|
1578
|
+
receipt_version: z.ZodNumber;
|
|
1579
|
+
/** ISO 8601 timestamp of the request */
|
|
1580
|
+
timestamp: z.ZodString;
|
|
1581
|
+
/** Optional: requested validity window in seconds */
|
|
1582
|
+
validity_window_seconds: z.ZodOptional<z.ZodNumber>;
|
|
1583
|
+
}, "strip", z.ZodTypeAny, {
|
|
1584
|
+
settlement_authority: "hlos.ai";
|
|
1585
|
+
receipt_hash: string;
|
|
1586
|
+
receipt_type: string;
|
|
1587
|
+
receipt_version: number;
|
|
1588
|
+
crossing_id: string;
|
|
1589
|
+
timestamp: string;
|
|
1590
|
+
validity_window_seconds?: number | undefined;
|
|
1591
|
+
}, {
|
|
1592
|
+
settlement_authority: "hlos.ai";
|
|
1593
|
+
receipt_hash: string;
|
|
1594
|
+
receipt_type: string;
|
|
1595
|
+
receipt_version: number;
|
|
1596
|
+
crossing_id: string;
|
|
1597
|
+
timestamp: string;
|
|
1598
|
+
validity_window_seconds?: number | undefined;
|
|
1599
|
+
}>;
|
|
1600
|
+
type NotaryRequest = z.infer<typeof NotaryRequestSchema>;
|
|
1601
|
+
/**
|
|
1602
|
+
* Status values for the notarize endpoint response.
|
|
1603
|
+
*/
|
|
1604
|
+
declare const NotarizeStatusSchema: z.ZodEnum<["HARD", "PENDING", "FAILED", "ALREADY_HARD"]>;
|
|
1605
|
+
type NotarizeStatus = z.infer<typeof NotarizeStatusSchema>;
|
|
1606
|
+
/**
|
|
1607
|
+
* Response from POST /api/finality/notarize.
|
|
1608
|
+
*/
|
|
1609
|
+
declare const NotarizeResponseSchema: z.ZodObject<{
|
|
1610
|
+
/** Finality status after this operation */
|
|
1611
|
+
status: z.ZodEnum<["HARD", "PENDING", "FAILED", "ALREADY_HARD"]>;
|
|
1612
|
+
/** The receipt_hash that was notarized */
|
|
1613
|
+
receipt_hash: z.ZodString;
|
|
1614
|
+
/** Hash of the NA itself (optional, present when status is HARD) */
|
|
1615
|
+
na_hash: z.ZodOptional<z.ZodString>;
|
|
1616
|
+
/** The full NA object (optional embed) */
|
|
1617
|
+
na: z.ZodOptional<z.ZodObject<{
|
|
1618
|
+
/** Unique NA identifier */
|
|
1619
|
+
na_id: z.ZodString;
|
|
1620
|
+
/** The receipt_hash this NA attests to */
|
|
1621
|
+
receipt_hash: z.ZodString;
|
|
1622
|
+
/** Notary service identifier (e.g. "staampid") */
|
|
1623
|
+
notary_id: z.ZodString;
|
|
1624
|
+
/** ISO 8601 timestamp when NA was issued */
|
|
1625
|
+
issued_at: z.ZodString;
|
|
1626
|
+
/** Notary's countersignature (base64url encoded) */
|
|
1627
|
+
signature: z.ZodString;
|
|
1628
|
+
/** Signature algorithm (e.g. "EdDSA") */
|
|
1629
|
+
signature_alg: z.ZodString;
|
|
1630
|
+
/** Receipt type being attested */
|
|
1631
|
+
receipt_type: z.ZodOptional<z.ZodString>;
|
|
1632
|
+
/** Receipt version being attested */
|
|
1633
|
+
receipt_version: z.ZodOptional<z.ZodNumber>;
|
|
1634
|
+
/** Settlement authority that issued the receipt (cross-check) */
|
|
1635
|
+
settlement_authority: z.ZodOptional<z.ZodString>;
|
|
1636
|
+
/** TTL in seconds for this attestation */
|
|
1637
|
+
validity_window_seconds: z.ZodOptional<z.ZodNumber>;
|
|
1638
|
+
/** ISO 8601 expiry (derived from issued_at + validity_window_seconds) */
|
|
1639
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
1640
|
+
/** Merkle proof for append-only log inclusion */
|
|
1641
|
+
log_inclusion: z.ZodOptional<z.ZodObject<{
|
|
1642
|
+
/** Merkle root hash (base64url SHA-256) */
|
|
1643
|
+
root: z.ZodString;
|
|
1644
|
+
/** Sibling hashes along the path (base64url SHA-256 each) */
|
|
1645
|
+
proof: z.ZodArray<z.ZodString, "many">;
|
|
1646
|
+
/** Leaf index in the log */
|
|
1647
|
+
index: z.ZodNumber;
|
|
1648
|
+
}, "strip", z.ZodTypeAny, {
|
|
1649
|
+
root: string;
|
|
1650
|
+
proof: string[];
|
|
1651
|
+
index: number;
|
|
1652
|
+
}, {
|
|
1653
|
+
root: string;
|
|
1654
|
+
proof: string[];
|
|
1655
|
+
index: number;
|
|
1656
|
+
}>>;
|
|
1657
|
+
}, "strip", z.ZodTypeAny, {
|
|
1658
|
+
signature: string;
|
|
1659
|
+
issued_at: string;
|
|
1660
|
+
na_id: string;
|
|
1661
|
+
receipt_hash: string;
|
|
1662
|
+
notary_id: string;
|
|
1663
|
+
signature_alg: string;
|
|
1664
|
+
settlement_authority?: string | undefined;
|
|
1665
|
+
receipt_type?: string | undefined;
|
|
1666
|
+
receipt_version?: number | undefined;
|
|
1667
|
+
validity_window_seconds?: number | undefined;
|
|
1668
|
+
expires_at?: string | undefined;
|
|
1669
|
+
log_inclusion?: {
|
|
1670
|
+
root: string;
|
|
1671
|
+
proof: string[];
|
|
1672
|
+
index: number;
|
|
1673
|
+
} | undefined;
|
|
1674
|
+
}, {
|
|
1675
|
+
signature: string;
|
|
1676
|
+
issued_at: string;
|
|
1677
|
+
na_id: string;
|
|
1678
|
+
receipt_hash: string;
|
|
1679
|
+
notary_id: string;
|
|
1680
|
+
signature_alg: string;
|
|
1681
|
+
settlement_authority?: string | undefined;
|
|
1682
|
+
receipt_type?: string | undefined;
|
|
1683
|
+
receipt_version?: number | undefined;
|
|
1684
|
+
validity_window_seconds?: number | undefined;
|
|
1685
|
+
expires_at?: string | undefined;
|
|
1686
|
+
log_inclusion?: {
|
|
1687
|
+
root: string;
|
|
1688
|
+
proof: string[];
|
|
1689
|
+
index: number;
|
|
1690
|
+
} | undefined;
|
|
1691
|
+
}>>;
|
|
1692
|
+
/** Notary service identifier */
|
|
1693
|
+
notary: z.ZodOptional<z.ZodString>;
|
|
1694
|
+
/** NA ID for retrieval */
|
|
1695
|
+
notary_receipt_id: z.ZodOptional<z.ZodString>;
|
|
1696
|
+
/** ISO 8601 timestamp */
|
|
1697
|
+
timestamp: z.ZodString;
|
|
1698
|
+
/** Error details (present when status is FAILED) */
|
|
1699
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1700
|
+
}, "strip", z.ZodTypeAny, {
|
|
1701
|
+
status: "PENDING" | "HARD" | "FAILED" | "ALREADY_HARD";
|
|
1702
|
+
receipt_hash: string;
|
|
1703
|
+
timestamp: string;
|
|
1704
|
+
error?: string | undefined;
|
|
1705
|
+
na_hash?: string | undefined;
|
|
1706
|
+
na?: {
|
|
1707
|
+
signature: string;
|
|
1708
|
+
issued_at: string;
|
|
1709
|
+
na_id: string;
|
|
1710
|
+
receipt_hash: string;
|
|
1711
|
+
notary_id: string;
|
|
1712
|
+
signature_alg: string;
|
|
1713
|
+
settlement_authority?: string | undefined;
|
|
1714
|
+
receipt_type?: string | undefined;
|
|
1715
|
+
receipt_version?: number | undefined;
|
|
1716
|
+
validity_window_seconds?: number | undefined;
|
|
1717
|
+
expires_at?: string | undefined;
|
|
1718
|
+
log_inclusion?: {
|
|
1719
|
+
root: string;
|
|
1720
|
+
proof: string[];
|
|
1721
|
+
index: number;
|
|
1722
|
+
} | undefined;
|
|
1723
|
+
} | undefined;
|
|
1724
|
+
notary?: string | undefined;
|
|
1725
|
+
notary_receipt_id?: string | undefined;
|
|
1726
|
+
}, {
|
|
1727
|
+
status: "PENDING" | "HARD" | "FAILED" | "ALREADY_HARD";
|
|
1728
|
+
receipt_hash: string;
|
|
1729
|
+
timestamp: string;
|
|
1730
|
+
error?: string | undefined;
|
|
1731
|
+
na_hash?: string | undefined;
|
|
1732
|
+
na?: {
|
|
1733
|
+
signature: string;
|
|
1734
|
+
issued_at: string;
|
|
1735
|
+
na_id: string;
|
|
1736
|
+
receipt_hash: string;
|
|
1737
|
+
notary_id: string;
|
|
1738
|
+
signature_alg: string;
|
|
1739
|
+
settlement_authority?: string | undefined;
|
|
1740
|
+
receipt_type?: string | undefined;
|
|
1741
|
+
receipt_version?: number | undefined;
|
|
1742
|
+
validity_window_seconds?: number | undefined;
|
|
1743
|
+
expires_at?: string | undefined;
|
|
1744
|
+
log_inclusion?: {
|
|
1745
|
+
root: string;
|
|
1746
|
+
proof: string[];
|
|
1747
|
+
index: number;
|
|
1748
|
+
} | undefined;
|
|
1749
|
+
} | undefined;
|
|
1750
|
+
notary?: string | undefined;
|
|
1751
|
+
notary_receipt_id?: string | undefined;
|
|
1752
|
+
}>;
|
|
1753
|
+
type NotarizeResponse = z.infer<typeof NotarizeResponseSchema>;
|
|
1754
|
+
/**
|
|
1755
|
+
* Check if a value is a valid NotaryAttestation.
|
|
1756
|
+
*/
|
|
1757
|
+
declare function isNotaryAttestation(value: unknown): value is NotaryAttestation;
|
|
1758
|
+
/**
|
|
1759
|
+
* Check if a value is a valid NotaryRequest.
|
|
1760
|
+
*/
|
|
1761
|
+
declare function isNotaryRequest(value: unknown): value is NotaryRequest;
|
|
1762
|
+
/**
|
|
1763
|
+
* ArtifactRef: A typed reference to a kernel artifact (for BRE assembly).
|
|
1764
|
+
* Per BRIDGE_SPEC.md §2.3.
|
|
1765
|
+
*/
|
|
1766
|
+
declare const ArtifactRefSchema: z.ZodObject<{
|
|
1767
|
+
/** Artifact type */
|
|
1768
|
+
type: z.ZodEnum<["CR", "LAT", "EGP", "SA", "SignedReceiptV0", "NA"]>;
|
|
1769
|
+
/** base64url SHA-256 hash of the artifact */
|
|
1770
|
+
hash: z.ZodString;
|
|
1771
|
+
/** Issuer of the artifact */
|
|
1772
|
+
issuer: z.ZodString;
|
|
1773
|
+
/** Schema version */
|
|
1774
|
+
version: z.ZodString;
|
|
1775
|
+
/** Optional retrieval URI */
|
|
1776
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
1777
|
+
}, "strip", z.ZodTypeAny, {
|
|
1778
|
+
type: "CR" | "LAT" | "EGP" | "SA" | "SignedReceiptV0" | "NA";
|
|
1779
|
+
version: string;
|
|
1780
|
+
hash: string;
|
|
1781
|
+
issuer: string;
|
|
1782
|
+
uri?: string | undefined;
|
|
1783
|
+
}, {
|
|
1784
|
+
type: "CR" | "LAT" | "EGP" | "SA" | "SignedReceiptV0" | "NA";
|
|
1785
|
+
version: string;
|
|
1786
|
+
hash: string;
|
|
1787
|
+
issuer: string;
|
|
1788
|
+
uri?: string | undefined;
|
|
1789
|
+
}>;
|
|
1790
|
+
type ArtifactRef = z.infer<typeof ArtifactRefSchema>;
|
|
1791
|
+
/**
|
|
1792
|
+
* Golden fixtures for finality schema conformance testing.
|
|
1793
|
+
*
|
|
1794
|
+
* These are deterministic test values. DO NOT CHANGE unless the
|
|
1795
|
+
* schema definition changes.
|
|
1796
|
+
*/
|
|
1797
|
+
declare const FINALITY_GOLDEN_FIXTURES: {
|
|
1798
|
+
/** Sample NotaryAttestation */
|
|
1799
|
+
readonly notaryAttestation: {
|
|
1800
|
+
na_id: string;
|
|
1801
|
+
receipt_hash: string;
|
|
1802
|
+
notary_id: string;
|
|
1803
|
+
issued_at: string;
|
|
1804
|
+
signature: string;
|
|
1805
|
+
signature_alg: string;
|
|
1806
|
+
receipt_type: string;
|
|
1807
|
+
receipt_version: number;
|
|
1808
|
+
settlement_authority: string;
|
|
1809
|
+
};
|
|
1810
|
+
/** Sample NotaryRequest */
|
|
1811
|
+
readonly notaryRequest: {
|
|
1812
|
+
receipt_hash: string;
|
|
1813
|
+
settlement_authority: "hlos.ai";
|
|
1814
|
+
crossing_id: string;
|
|
1815
|
+
receipt_type: string;
|
|
1816
|
+
receipt_version: number;
|
|
1817
|
+
timestamp: string;
|
|
1818
|
+
};
|
|
1819
|
+
/** Sample successful notarize response */
|
|
1820
|
+
readonly notarizeResponseHard: {
|
|
1821
|
+
status: "HARD";
|
|
1822
|
+
receipt_hash: string;
|
|
1823
|
+
na_hash: string;
|
|
1824
|
+
notary: string;
|
|
1825
|
+
notary_receipt_id: string;
|
|
1826
|
+
timestamp: string;
|
|
1827
|
+
};
|
|
1828
|
+
};
|
|
1829
|
+
|
|
1830
|
+
export { type AgentListItem, AgentListItemSchema, type AgentPassportStubResponse, AgentPassportStubResponseSchema, type AgentStatus, AgentStatusSchema, type AgentType, AgentTypeSchema, type AgentsListResponse, AgentsListResponseSchema, type ApiResponse, type ArtifactRef, ArtifactRefSchema, type AvailabilityType, AvailabilityTypeSchema, BASE64URL_SHA256_REGEX, Base64urlEd25519SigSchema, Base64urlSha256Schema, CONTENT_HASH_LENGTH, type CredentialSource, CredentialSourceSchema, type CrossingHashInputV0, CrossingHashInputV0Schema, CrossingIdFormatSchema, type CrossingSettledReceipt, CrossingSettledReceiptSchema, type CrossingSnapshotV0, CrossingSnapshotV0Schema, ERROR_CODE_STATUS, type ErrorResponse, ErrorResponseSchema, FINALITY_GOLDEN_FIXTURES, FinalityLevel, type FundingSource, FundingSourceSchema, GOLDEN_FIXTURES, type KernelError, type KernelErrorCode, KernelErrorCodeSchema, KernelErrorSchema, type KernelOk, KernelOkSchema, type LogInclusionProof, LogInclusionProofSchema, NA_ID_PREFIX, type NotarizeResponse, NotarizeResponseSchema, type NotarizeStatus, NotarizeStatusSchema, type NotaryAttestation, NotaryAttestationIdFormatSchema, NotaryAttestationSchema, type NotaryRequest, NotaryRequestSchema, PassportIdFormatSchema, type ProviderRole, ProviderRoleSchema, RECEIPT_HASH_GOLDEN_FIXTURE, RECEIPT_TYPE_URI, RECEIPT_VERSION, type RPID, RPIDSchema, ReceiptHashSchema, ReceiptId, ReceiptIdFormatSchema, type RelyingPartyId, RelyingPartyIdSchema, type RotationEpoch, RotationEpochSchema, SETTLEMENT_AUTHORITY, SIGNATURE_LENGTH, SURFACES, type SignedReceiptV0, SignedReceiptV0LooseSchema, SignedReceiptV0Schema, type Stack, type StackConnection, StackConnectionSchema, type StackProvider, StackProviderSchema, StackSchema, type SuccessResponse, SuccessResponseSchema, type Surface, SurfaceSchema, type TransactionContext, type TransactionContextHash, TransactionContextHashSchema, TransactionContextSchema, W_GOLDEN_FIXTURES, W_RPID_DOMAIN, W_TXCTX_DOMAIN, WalletIdFormatSchema, base64urlToBytes, bytesToBase64url, computeContentHash, computeReceiptHash, deriveFundingSource, encodeEpoch, error, isCrossingHashInputV0, isCrossingSettledReceipt, isNotaryAttestation, isNotaryRequest, isSignedReceiptV0, jcsCanonicalize, kernelError, kernelOk, success, validateTimeWindow };
|