@hashgraphonline/standards-sdk 0.1.146-feat-rb-inscriber.canary.34d466c.88 → 0.1.147

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 (41) hide show
  1. package/dist/es/standards-sdk.es109.js +1 -1
  2. package/dist/es/standards-sdk.es124.js +1 -1
  3. package/dist/es/standards-sdk.es125.js +1 -1
  4. package/dist/es/standards-sdk.es127.js +2 -2
  5. package/dist/es/standards-sdk.es128.js +1 -1
  6. package/dist/es/standards-sdk.es129.js +1 -1
  7. package/dist/es/standards-sdk.es130.js +2 -2
  8. package/dist/es/standards-sdk.es131.js +1 -1
  9. package/dist/es/standards-sdk.es132.js +1 -1
  10. package/dist/es/standards-sdk.es133.js +1 -1
  11. package/dist/es/standards-sdk.es134.js +1 -1
  12. package/dist/es/standards-sdk.es135.js +1 -1
  13. package/dist/es/standards-sdk.es137.js +1 -1
  14. package/dist/es/standards-sdk.es149.js +54 -12287
  15. package/dist/es/standards-sdk.es149.js.map +1 -1
  16. package/dist/es/standards-sdk.es150.js +84 -959
  17. package/dist/es/standards-sdk.es150.js.map +1 -1
  18. package/dist/es/standards-sdk.es151.js +959 -56
  19. package/dist/es/standards-sdk.es151.js.map +1 -1
  20. package/dist/es/standards-sdk.es152.js +15 -82
  21. package/dist/es/standards-sdk.es152.js.map +1 -1
  22. package/dist/es/standards-sdk.es153.js +12284 -12
  23. package/dist/es/standards-sdk.es153.js.map +1 -1
  24. package/dist/es/standards-sdk.es16.js +1 -1
  25. package/dist/es/standards-sdk.es18.js +2 -2
  26. package/dist/es/standards-sdk.es19.js +2 -2
  27. package/dist/es/standards-sdk.es27.js +2 -2
  28. package/dist/es/standards-sdk.es30.js +1 -1
  29. package/dist/es/standards-sdk.es31.js +1 -1
  30. package/dist/es/standards-sdk.es35.js +2 -2
  31. package/dist/es/standards-sdk.es36.js +1 -1
  32. package/dist/es/standards-sdk.es37.js +1 -1
  33. package/dist/es/standards-sdk.es56.js +1 -1
  34. package/dist/es/standards-sdk.es58.js +1 -1
  35. package/dist/es/standards-sdk.es59.js +1 -1
  36. package/dist/es/standards-sdk.es60.js +1 -1
  37. package/dist/es/standards-sdk.es62.js +1 -1
  38. package/dist/es/standards-sdk.es64.js +1 -1
  39. package/dist/es/standards-sdk.es65.js +1 -1
  40. package/dist/es/standards-sdk.es77.js +1 -1
  41. package/package.json +1 -1
@@ -1,59 +1,962 @@
1
- const ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
2
- const BASE = 58;
3
- function base58Encode(bytes) {
4
- if (bytes.length === 0) return "";
5
- let zeros = 0;
6
- while (zeros < bytes.length && bytes[zeros] === 0) zeros++;
7
- if (zeros === bytes.length) return "1".repeat(zeros);
8
- const digits = [0];
9
- for (let i = zeros; i < bytes.length; i++) {
10
- let carry = bytes[i];
11
- for (let j = 0; j < digits.length; j++) {
12
- const val = (digits[j] << 8) + carry;
13
- digits[j] = val % BASE;
14
- carry = val / BASE | 0;
15
- }
16
- while (carry > 0) {
17
- digits.push(carry % BASE);
18
- carry = carry / BASE | 0;
19
- }
20
- }
21
- let result = "";
22
- for (let i = 0; i < zeros; i++) result += "1";
23
- for (let i = digits.length - 1; i >= 0; i--) result += ALPHABET[digits[i]];
24
- return result;
25
- }
26
- function base58Decode(text) {
27
- if (text.length === 0) return new Uint8Array(0);
28
- let zeros = 0;
29
- while (zeros < text.length && text[zeros] === "1") zeros++;
30
- const b256 = [];
31
- for (let i = zeros; i < text.length; i++) {
32
- const ch = text[i];
33
- const val = ALPHABET.indexOf(ch);
34
- if (val === -1) throw new Error("Invalid Base58 character");
35
- let carry = val;
36
- for (let j = 0; j < b256.length; j++) {
37
- const x = b256[j] * BASE + carry;
38
- b256[j] = x & 255;
39
- carry = x >> 8;
40
- }
41
- while (carry > 0) {
42
- b256.push(carry & 255);
43
- carry >>= 8;
44
- }
45
- }
46
- for (let i = 0; i < zeros; i++) b256.push(0);
47
- b256.reverse();
48
- return Uint8Array.from(b256);
49
- }
50
- function multibaseB58btcDecode(zText) {
51
- if (!zText.startsWith("z")) throw new Error("Invalid multibase base58btc");
52
- return base58Decode(zText.slice(1));
53
- }
1
+ import { z } from "zod";
2
+ import { adapterDeclarationSchema } from "./standards-sdk.es79.js";
3
+ var AIAgentType = /* @__PURE__ */ ((AIAgentType2) => {
4
+ AIAgentType2[AIAgentType2["MANUAL"] = 0] = "MANUAL";
5
+ AIAgentType2[AIAgentType2["AUTONOMOUS"] = 1] = "AUTONOMOUS";
6
+ return AIAgentType2;
7
+ })(AIAgentType || {});
8
+ var AIAgentCapability = /* @__PURE__ */ ((AIAgentCapability2) => {
9
+ AIAgentCapability2[AIAgentCapability2["TEXT_GENERATION"] = 0] = "TEXT_GENERATION";
10
+ AIAgentCapability2[AIAgentCapability2["IMAGE_GENERATION"] = 1] = "IMAGE_GENERATION";
11
+ AIAgentCapability2[AIAgentCapability2["AUDIO_GENERATION"] = 2] = "AUDIO_GENERATION";
12
+ AIAgentCapability2[AIAgentCapability2["VIDEO_GENERATION"] = 3] = "VIDEO_GENERATION";
13
+ AIAgentCapability2[AIAgentCapability2["CODE_GENERATION"] = 4] = "CODE_GENERATION";
14
+ AIAgentCapability2[AIAgentCapability2["LANGUAGE_TRANSLATION"] = 5] = "LANGUAGE_TRANSLATION";
15
+ AIAgentCapability2[AIAgentCapability2["SUMMARIZATION_EXTRACTION"] = 6] = "SUMMARIZATION_EXTRACTION";
16
+ AIAgentCapability2[AIAgentCapability2["KNOWLEDGE_RETRIEVAL"] = 7] = "KNOWLEDGE_RETRIEVAL";
17
+ AIAgentCapability2[AIAgentCapability2["DATA_INTEGRATION"] = 8] = "DATA_INTEGRATION";
18
+ AIAgentCapability2[AIAgentCapability2["MARKET_INTELLIGENCE"] = 9] = "MARKET_INTELLIGENCE";
19
+ AIAgentCapability2[AIAgentCapability2["TRANSACTION_ANALYTICS"] = 10] = "TRANSACTION_ANALYTICS";
20
+ AIAgentCapability2[AIAgentCapability2["SMART_CONTRACT_AUDIT"] = 11] = "SMART_CONTRACT_AUDIT";
21
+ AIAgentCapability2[AIAgentCapability2["GOVERNANCE_FACILITATION"] = 12] = "GOVERNANCE_FACILITATION";
22
+ AIAgentCapability2[AIAgentCapability2["SECURITY_MONITORING"] = 13] = "SECURITY_MONITORING";
23
+ AIAgentCapability2[AIAgentCapability2["COMPLIANCE_ANALYSIS"] = 14] = "COMPLIANCE_ANALYSIS";
24
+ AIAgentCapability2[AIAgentCapability2["FRAUD_DETECTION"] = 15] = "FRAUD_DETECTION";
25
+ AIAgentCapability2[AIAgentCapability2["MULTI_AGENT_COORDINATION"] = 16] = "MULTI_AGENT_COORDINATION";
26
+ AIAgentCapability2[AIAgentCapability2["API_INTEGRATION"] = 17] = "API_INTEGRATION";
27
+ AIAgentCapability2[AIAgentCapability2["WORKFLOW_AUTOMATION"] = 18] = "WORKFLOW_AUTOMATION";
28
+ return AIAgentCapability2;
29
+ })(AIAgentCapability || {});
30
+ const capabilitySchema = z.nativeEnum(AIAgentCapability);
31
+ const capabilityValueSchema = z.union([z.number(), z.string()]);
32
+ const jsonPrimitiveSchema = z.union([
33
+ z.string(),
34
+ z.number(),
35
+ z.boolean(),
36
+ z.null()
37
+ ]);
38
+ const jsonValueSchema = z.lazy(
39
+ () => z.union([
40
+ jsonPrimitiveSchema,
41
+ z.array(jsonValueSchema),
42
+ z.record(jsonValueSchema)
43
+ ])
44
+ );
45
+ const agentProfileSchema = z.object({
46
+ version: z.string(),
47
+ type: z.number(),
48
+ display_name: z.string(),
49
+ alias: z.string().optional(),
50
+ bio: z.string().optional(),
51
+ socials: z.array(jsonValueSchema).optional(),
52
+ aiAgent: z.object({
53
+ type: z.nativeEnum(AIAgentType),
54
+ creator: z.string().optional(),
55
+ model: z.string().optional(),
56
+ capabilities: z.array(z.union([capabilitySchema, z.number()])).optional()
57
+ }).optional(),
58
+ uaid: z.string().optional()
59
+ }).catchall(jsonValueSchema);
60
+ const cipherEnvelopeRecipientSchema = z.object({
61
+ uaid: z.string().optional(),
62
+ ledgerAccountId: z.string().optional(),
63
+ userId: z.string().optional(),
64
+ email: z.string().optional(),
65
+ encryptedShare: z.string()
66
+ });
67
+ const cipherEnvelopeSchema = z.object({
68
+ algorithm: z.string(),
69
+ ciphertext: z.string(),
70
+ nonce: z.string(),
71
+ associatedData: z.string().optional(),
72
+ keyLocator: z.object({
73
+ sessionId: z.string().optional(),
74
+ revision: z.number().optional()
75
+ }).optional(),
76
+ recipients: z.array(cipherEnvelopeRecipientSchema)
77
+ });
78
+ const peerSummarySchema = z.object({
79
+ keyType: z.string(),
80
+ publicKey: z.string(),
81
+ uaid: z.string().optional(),
82
+ ledgerAccountId: z.string().optional(),
83
+ userId: z.string().optional(),
84
+ email: z.string().optional()
85
+ });
86
+ const handshakeParticipantSchema = z.object({
87
+ role: z.enum(["requester", "responder"]),
88
+ uaid: z.string().optional(),
89
+ userId: z.string().optional(),
90
+ ledgerAccountId: z.string().optional(),
91
+ keyType: z.string(),
92
+ longTermPublicKey: z.string().optional(),
93
+ ephemeralPublicKey: z.string(),
94
+ signature: z.string().optional(),
95
+ metadata: z.record(jsonValueSchema).optional(),
96
+ submittedAt: z.string()
97
+ });
98
+ const encryptionHandshakeRecordSchema = z.object({
99
+ sessionId: z.string(),
100
+ algorithm: z.string(),
101
+ createdAt: z.string(),
102
+ expiresAt: z.number(),
103
+ status: z.enum(["pending", "complete"]),
104
+ requester: handshakeParticipantSchema.optional(),
105
+ responder: handshakeParticipantSchema.optional()
106
+ });
107
+ const sessionEncryptionSummarySchema = z.object({
108
+ enabled: z.boolean(),
109
+ algorithm: z.string(),
110
+ requireCiphertext: z.boolean(),
111
+ requester: peerSummarySchema.nullable().optional(),
112
+ responder: peerSummarySchema.nullable().optional(),
113
+ handshake: encryptionHandshakeRecordSchema.nullable().optional()
114
+ });
115
+ const chatHistoryEntrySchema = z.object({
116
+ messageId: z.string(),
117
+ role: z.enum(["user", "agent"]),
118
+ content: z.string(),
119
+ timestamp: z.string(),
120
+ cipherEnvelope: cipherEnvelopeSchema.optional(),
121
+ metadata: z.record(jsonValueSchema).optional()
122
+ });
123
+ const metadataFacetSchema = z.record(
124
+ z.union([
125
+ z.array(jsonValueSchema),
126
+ z.record(jsonValueSchema),
127
+ jsonValueSchema
128
+ ])
129
+ ).optional();
130
+ const searchHitSchema = z.object({
131
+ id: z.string(),
132
+ uaid: z.string(),
133
+ registry: z.string(),
134
+ name: z.string(),
135
+ description: z.string().optional(),
136
+ capabilities: z.array(capabilityValueSchema),
137
+ endpoints: z.union([z.record(jsonValueSchema), z.array(z.string())]).optional(),
138
+ metadata: z.record(jsonValueSchema).optional(),
139
+ metadataFacet: metadataFacetSchema,
140
+ profile: agentProfileSchema.optional(),
141
+ protocols: z.array(z.string()).optional(),
142
+ adapter: z.string().optional(),
143
+ originalId: z.string().optional(),
144
+ communicationSupported: z.boolean().optional(),
145
+ routingSupported: z.boolean().optional(),
146
+ available: z.boolean().optional(),
147
+ availabilityStatus: z.string().optional(),
148
+ availabilityCheckedAt: z.string().optional(),
149
+ availabilitySource: z.string().optional(),
150
+ availabilityLatencyMs: z.number().optional(),
151
+ availabilityScore: z.number().optional(),
152
+ capabilityLabels: z.array(z.string()).optional(),
153
+ capabilityTokens: z.array(z.string()).optional(),
154
+ image: z.string().optional(),
155
+ createdAt: z.string().optional(),
156
+ updatedAt: z.string().optional(),
157
+ lastSeen: z.string().optional(),
158
+ lastIndexed: z.string().optional()
159
+ }).passthrough();
160
+ const searchResponseSchema = z.object({
161
+ hits: z.array(searchHitSchema),
162
+ total: z.number(),
163
+ page: z.number(),
164
+ limit: z.number()
165
+ });
166
+ const statsResponseSchema = z.object({
167
+ totalAgents: z.number(),
168
+ registries: z.record(z.number()),
169
+ capabilities: z.record(z.number()),
170
+ lastUpdate: z.string(),
171
+ status: z.string()
172
+ });
173
+ const registriesResponseSchema = z.object({
174
+ registries: z.array(z.string())
175
+ });
176
+ const popularResponseSchema = z.object({
177
+ searches: z.array(z.string())
178
+ });
179
+ const resolveResponseSchema = z.object({
180
+ agent: searchHitSchema
181
+ });
182
+ const agentFeedbackSummarySchema = z.object({
183
+ averageScore: z.number(),
184
+ totalFeedbacks: z.number(),
185
+ registry: z.string().optional(),
186
+ network: z.string().optional(),
187
+ updatedAt: z.string().optional()
188
+ });
189
+ const agentFeedbackEntrySchema = z.object({
190
+ registry: z.string(),
191
+ network: z.string().optional(),
192
+ agentId: z.number(),
193
+ client: z.string(),
194
+ score: z.number(),
195
+ tag1: z.string().nullable().optional(),
196
+ tag2: z.string().nullable().optional(),
197
+ revoked: z.boolean(),
198
+ feedbackIndex: z.number().nullable().optional(),
199
+ fileUri: z.string().nullable().optional(),
200
+ fileHash: z.string().nullable().optional(),
201
+ createdAt: z.string().nullable().optional()
202
+ });
203
+ const agentFeedbackResponseSchema = z.object({
204
+ uaid: z.string(),
205
+ summary: agentFeedbackSummarySchema,
206
+ entries: z.array(agentFeedbackEntrySchema)
207
+ });
208
+ const agentFeedbackEligibilityResponseSchema = z.object({
209
+ uaid: z.string(),
210
+ sessionId: z.string(),
211
+ eligible: z.boolean(),
212
+ messageCount: z.number(),
213
+ minimumMessages: z.number(),
214
+ reason: z.string().optional(),
215
+ onchain: z.object({
216
+ eligible: z.boolean(),
217
+ reason: z.string().optional(),
218
+ estimatedCredits: z.number().optional(),
219
+ usdEstimate: z.number().optional(),
220
+ nativeFeeEstimate: z.number().optional()
221
+ }).optional()
222
+ });
223
+ const agentFeedbackSubmissionResponseSchema = z.object({
224
+ uaid: z.string(),
225
+ registry: z.string(),
226
+ network: z.string().optional(),
227
+ agentId: z.number(),
228
+ score: z.number(),
229
+ tag1: z.string().nullable().optional(),
230
+ tag2: z.string().nullable().optional(),
231
+ fileUri: z.string().nullable().optional(),
232
+ fileHash: z.string().nullable().optional(),
233
+ feedbackIndex: z.number().nullable().optional(),
234
+ transactionHash: z.string().nullable().optional(),
235
+ signature: z.string().nullable().optional(),
236
+ submittedAt: z.string()
237
+ });
238
+ const agentFeedbackIndexResponseSchema = z.object({
239
+ page: z.number(),
240
+ limit: z.number(),
241
+ total: z.number(),
242
+ items: z.array(
243
+ z.object({
244
+ uaid: z.string(),
245
+ registry: z.string(),
246
+ network: z.string().optional(),
247
+ agentId: z.number().nullable().optional(),
248
+ summary: agentFeedbackSummarySchema.nullable(),
249
+ trustScore: z.number().nullable().optional()
250
+ })
251
+ )
252
+ });
253
+ const agentFeedbackEntriesIndexResponseSchema = z.object({
254
+ page: z.number(),
255
+ limit: z.number(),
256
+ total: z.number(),
257
+ items: z.array(
258
+ z.object({
259
+ uaid: z.string(),
260
+ entry: agentFeedbackEntrySchema
261
+ })
262
+ )
263
+ });
264
+ const createSessionResponseSchema = z.object({
265
+ sessionId: z.string(),
266
+ uaid: z.string().nullable().optional(),
267
+ agent: z.object({
268
+ name: z.string(),
269
+ description: z.string().optional(),
270
+ capabilities: z.record(jsonValueSchema).nullable().optional(),
271
+ skills: z.array(z.string()).optional()
272
+ }),
273
+ history: z.array(chatHistoryEntrySchema).optional().default([]),
274
+ historyTtlSeconds: z.number().nullable().optional(),
275
+ encryption: sessionEncryptionSummarySchema.nullable().optional()
276
+ });
277
+ const sendMessageResponseSchema = z.object({
278
+ sessionId: z.string(),
279
+ uaid: z.string().nullable().optional(),
280
+ message: z.string(),
281
+ timestamp: z.string(),
282
+ rawResponse: jsonValueSchema.optional(),
283
+ content: z.string().optional(),
284
+ ops: z.array(z.record(jsonValueSchema)).optional(),
285
+ history: z.array(chatHistoryEntrySchema).optional(),
286
+ historyTtlSeconds: z.number().nullable().optional(),
287
+ encrypted: z.boolean().optional()
288
+ });
289
+ const chatHistorySnapshotResponseSchema = z.object({
290
+ sessionId: z.string(),
291
+ history: z.array(chatHistoryEntrySchema),
292
+ historyTtlSeconds: z.number()
293
+ });
294
+ z.object({
295
+ preserveEntries: z.number().int().min(0).optional()
296
+ }).strict();
297
+ const chatHistoryCompactionResponseSchema = z.object({
298
+ sessionId: z.string(),
299
+ history: z.array(chatHistoryEntrySchema),
300
+ summaryEntry: chatHistoryEntrySchema,
301
+ preservedEntries: z.array(chatHistoryEntrySchema),
302
+ historyTtlSeconds: z.number(),
303
+ creditsDebited: z.number(),
304
+ metadata: z.record(jsonValueSchema).optional()
305
+ });
306
+ const sessionEncryptionStatusResponseSchema = z.object({
307
+ sessionId: z.string(),
308
+ encryption: sessionEncryptionSummarySchema.nullable()
309
+ });
310
+ const encryptionHandshakeResponseSchema = z.object({
311
+ sessionId: z.string(),
312
+ handshake: encryptionHandshakeRecordSchema
313
+ });
314
+ const registerEncryptionKeyResponseSchema = z.object({
315
+ id: z.string(),
316
+ keyType: z.string(),
317
+ publicKey: z.string(),
318
+ uaid: z.string().nullable(),
319
+ ledgerAccountId: z.string().nullable(),
320
+ ledgerNetwork: z.string().nullable().optional(),
321
+ userId: z.string().nullable().optional(),
322
+ email: z.string().nullable().optional(),
323
+ createdAt: z.string(),
324
+ updatedAt: z.string()
325
+ });
326
+ const ledgerChallengeResponseSchema = z.object({
327
+ challengeId: z.string(),
328
+ message: z.string(),
329
+ expiresAt: z.string()
330
+ });
331
+ const ledgerApiKeySummarySchema = z.object({
332
+ id: z.string(),
333
+ label: z.string().optional(),
334
+ prefix: z.string(),
335
+ lastFour: z.string(),
336
+ createdAt: z.string(),
337
+ lastUsedAt: z.string().nullable().optional(),
338
+ ownerType: z.literal("ledger"),
339
+ ledgerAccountId: z.string().optional(),
340
+ ledgerNetwork: z.string().optional(),
341
+ ledgerNetworkCanonical: z.string().optional()
342
+ });
343
+ const ledgerVerifyResponseSchema = z.object({
344
+ key: z.string(),
345
+ apiKey: ledgerApiKeySummarySchema,
346
+ accountId: z.string(),
347
+ network: z.string(),
348
+ networkCanonical: z.string().optional()
349
+ });
350
+ const protocolsResponseSchema = z.object({
351
+ protocols: z.array(z.string())
352
+ });
353
+ const detectProtocolResponseSchema = z.object({
354
+ protocol: z.string().nullable()
355
+ });
356
+ const registrySearchByNamespaceSchema = z.object({
357
+ hits: z.array(searchHitSchema),
358
+ total: z.number(),
359
+ page: z.number().optional(),
360
+ limit: z.number().optional()
361
+ });
362
+ const capabilityFilterValueSchema = z.union([z.string(), z.number()]);
363
+ const vectorSearchFilterSchema = z.object({
364
+ capabilities: z.array(capabilityFilterValueSchema).optional(),
365
+ type: z.enum(["ai-agents", "mcp-servers"]).optional(),
366
+ registry: z.string().optional(),
367
+ protocols: z.array(z.string()).optional(),
368
+ adapter: z.array(z.string()).optional()
369
+ }).strict();
370
+ z.object({
371
+ query: z.string(),
372
+ filter: vectorSearchFilterSchema.optional(),
373
+ limit: z.number().int().min(1).max(100).optional(),
374
+ offset: z.number().int().min(0).optional()
375
+ }).strict();
376
+ const vectorSearchHitSchema = z.object({
377
+ agent: searchHitSchema,
378
+ score: z.number().optional(),
379
+ highlights: z.record(z.array(z.string())).optional()
380
+ });
381
+ const vectorSearchResponseSchema = z.object({
382
+ hits: z.array(vectorSearchHitSchema),
383
+ total: z.number(),
384
+ took: z.number(),
385
+ totalAvailable: z.number().optional(),
386
+ visible: z.number().optional(),
387
+ limited: z.boolean().optional(),
388
+ credits_used: z.number().optional()
389
+ });
390
+ const vectorStatusSchema = z.object({
391
+ enabled: z.boolean(),
392
+ healthy: z.boolean(),
393
+ mode: z.enum(["disabled", "initializing", "healthy", "degraded", "error"]),
394
+ lastUpdated: z.string(),
395
+ details: z.record(z.any()).optional(),
396
+ lastError: z.object({
397
+ message: z.string(),
398
+ stack: z.string().optional(),
399
+ timestamp: z.string().optional()
400
+ }).optional()
401
+ });
402
+ const searchStatusResponseSchema = z.object({
403
+ storageMode: z.string(),
404
+ vectorStatus: vectorStatusSchema
405
+ });
406
+ const websocketStatsResponseSchema = z.object({
407
+ clients: z.number(),
408
+ stats: z.object({
409
+ totalClients: z.number().optional(),
410
+ clientsByRegistry: z.record(z.number()).optional(),
411
+ clientsByEventType: z.record(z.number()).optional()
412
+ }).passthrough()
413
+ });
414
+ const durationStatsSchema = z.object({
415
+ p50: z.number(),
416
+ p90: z.number(),
417
+ p95: z.number(),
418
+ p99: z.number()
419
+ });
420
+ const metricsSummaryResponseSchema = z.object({
421
+ http: z.object({
422
+ requestsTotal: z.number(),
423
+ activeConnections: z.number(),
424
+ requestDuration: durationStatsSchema
425
+ }),
426
+ search: z.object({
427
+ queriesTotal: z.number(),
428
+ queryDuration: durationStatsSchema
429
+ }),
430
+ indexing: z.object({ agentsTotal: z.number(), crawlErrors: z.number() }),
431
+ registration: z.object({
432
+ total: z.number(),
433
+ failures: z.number(),
434
+ duration: durationStatsSchema
435
+ }),
436
+ cache: z.object({
437
+ hits: z.number(),
438
+ misses: z.number(),
439
+ hitRate: z.number()
440
+ }),
441
+ websocket: z.object({ connections: z.number() })
442
+ });
443
+ const uaidValidationResponseSchema = z.object({
444
+ uaid: z.string(),
445
+ valid: z.boolean(),
446
+ formats: z.array(z.string())
447
+ });
448
+ const adapterConnectionSchema = z.object({
449
+ id: z.string(),
450
+ agentId: z.string(),
451
+ protocol: z.string(),
452
+ endpoint: z.string(),
453
+ status: z.enum(["connected", "disconnected", "error"]),
454
+ metadata: z.record(jsonPrimitiveSchema).optional(),
455
+ createdAt: z.string()
456
+ });
457
+ const uaidConnectionStatusSchema = z.object({
458
+ connected: z.boolean(),
459
+ connection: adapterConnectionSchema.optional(),
460
+ adapter: z.string().optional(),
461
+ agentId: z.string().optional()
462
+ });
463
+ const dashboardStatsResponseSchema = z.object({
464
+ operatorId: z.string().optional(),
465
+ adapters: z.array(
466
+ z.object({
467
+ name: z.string(),
468
+ version: z.string(),
469
+ status: z.string(),
470
+ agentCount: z.number(),
471
+ lastDiscovery: z.string(),
472
+ registryType: z.string(),
473
+ health: z.string()
474
+ })
475
+ ).optional(),
476
+ totalAgents: z.number().optional(),
477
+ elasticsearchDocumentCount: z.number().optional(),
478
+ agentsByAdapter: z.record(z.number()).optional(),
479
+ agentsByRegistry: z.record(z.number()).optional(),
480
+ systemInfo: z.object({
481
+ uptime: z.number().optional(),
482
+ version: z.string().optional(),
483
+ network: z.string().optional()
484
+ }).optional()
485
+ });
486
+ const registrationAgentSchema = z.object({
487
+ id: z.string(),
488
+ name: z.string(),
489
+ type: z.string(),
490
+ endpoint: z.string().optional(),
491
+ capabilities: z.array(capabilityValueSchema),
492
+ registry: z.string().optional(),
493
+ protocol: z.string().optional(),
494
+ profile: agentProfileSchema.optional(),
495
+ nativeId: z.string().optional(),
496
+ metadata: z.record(jsonValueSchema).optional()
497
+ });
498
+ const registrationProfileInfoSchema = z.object({
499
+ tId: z.string().nullable(),
500
+ sizeBytes: z.number().optional()
501
+ });
502
+ const profileRegistrySchema = z.object({
503
+ topicId: z.string().optional(),
504
+ sequenceNumber: z.number().optional(),
505
+ profileReference: z.string().optional(),
506
+ profileTopicId: z.string().optional()
507
+ }).passthrough().nullable().optional();
508
+ const additionalRegistryResultSchema = z.object({
509
+ registry: z.string(),
510
+ status: z.enum([
511
+ "created",
512
+ "duplicate",
513
+ "skipped",
514
+ "error",
515
+ "updated",
516
+ "pending"
517
+ ]),
518
+ agentId: z.string().nullable().optional(),
519
+ agentUri: z.string().nullable().optional(),
520
+ error: z.string().optional(),
521
+ metadata: z.record(jsonValueSchema).optional(),
522
+ registryKey: z.string().optional(),
523
+ networkId: z.string().optional(),
524
+ networkName: z.string().optional(),
525
+ chainId: z.number().optional(),
526
+ estimatedCredits: z.number().nullable().optional(),
527
+ gasEstimateCredits: z.number().nullable().optional(),
528
+ gasEstimateUsd: z.number().nullable().optional(),
529
+ gasPriceGwei: z.number().nullable().optional(),
530
+ gasLimit: z.number().nullable().optional(),
531
+ creditMode: z.enum(["fixed", "gas"]).nullable().optional(),
532
+ minCredits: z.number().nullable().optional(),
533
+ consumedCredits: z.number().nullable().optional(),
534
+ cost: z.object({
535
+ credits: z.number(),
536
+ usd: z.number(),
537
+ eth: z.number(),
538
+ gasUsedWei: z.string(),
539
+ effectiveGasPriceWei: z.string().nullable().optional(),
540
+ transactions: z.array(
541
+ z.object({
542
+ hash: z.string(),
543
+ gasUsedWei: z.string(),
544
+ effectiveGasPriceWei: z.string().nullable().optional(),
545
+ costWei: z.string()
546
+ })
547
+ ).optional()
548
+ }).optional()
549
+ });
550
+ const registrationCreditsSchema = z.object({
551
+ base: z.number(),
552
+ additional: z.number(),
553
+ total: z.number()
554
+ });
555
+ const hcs10RegistrySchema = z.object({
556
+ status: z.string(),
557
+ uaid: z.string().optional(),
558
+ transactionId: z.string().optional(),
559
+ consensusTimestamp: z.string().optional(),
560
+ registryTopicId: z.string().optional(),
561
+ topicSequenceNumber: z.number().optional(),
562
+ payloadHash: z.string().optional(),
563
+ profileReference: z.string().optional(),
564
+ tId: z.string().optional(),
565
+ profileSizeBytes: z.number().optional(),
566
+ error: z.string().optional()
567
+ }).passthrough();
568
+ const additionalRegistryNetworkSchema = z.object({
569
+ key: z.string(),
570
+ registryId: z.string().optional(),
571
+ networkId: z.string().optional(),
572
+ name: z.string().optional(),
573
+ chainId: z.number().optional(),
574
+ label: z.string().optional(),
575
+ estimatedCredits: z.number().nullable().optional(),
576
+ baseCredits: z.number().nullable().optional(),
577
+ gasPortionCredits: z.number().nullable().optional(),
578
+ gasPortionUsd: z.number().nullable().optional(),
579
+ gasEstimateCredits: z.number().nullable().optional(),
580
+ gasEstimateUsd: z.number().nullable().optional(),
581
+ gasPriceGwei: z.number().nullable().optional(),
582
+ gasLimit: z.number().nullable().optional(),
583
+ minCredits: z.number().nullable().optional(),
584
+ creditMode: z.string().nullable().optional()
585
+ }).passthrough();
586
+ const additionalRegistryDescriptorSchema = z.object({
587
+ id: z.string(),
588
+ label: z.string(),
589
+ networks: z.array(additionalRegistryNetworkSchema)
590
+ });
591
+ const additionalRegistryCatalogResponseSchema = z.object({
592
+ registries: z.array(additionalRegistryDescriptorSchema)
593
+ });
594
+ const registerAgentSuccessResponse = z.object({
595
+ success: z.literal(true),
596
+ status: z.enum(["created", "duplicate", "updated"]).optional(),
597
+ uaid: z.string(),
598
+ agentId: z.string(),
599
+ message: z.string().optional(),
600
+ registry: z.string().optional(),
601
+ attemptId: z.string().nullable().optional(),
602
+ agent: registrationAgentSchema,
603
+ openConvAI: z.object({
604
+ compatible: z.boolean(),
605
+ hcs11Profile: agentProfileSchema.optional(),
606
+ bridgeEndpoint: z.string().optional()
607
+ }).optional(),
608
+ profile: registrationProfileInfoSchema.optional(),
609
+ profileRegistry: profileRegistrySchema.nullable().optional(),
610
+ hcs10Registry: hcs10RegistrySchema.nullable().optional(),
611
+ credits: registrationCreditsSchema.optional(),
612
+ additionalRegistries: z.array(additionalRegistryResultSchema).optional(),
613
+ additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
614
+ additionalRegistryCostPerRegistry: z.number().optional()
615
+ });
616
+ const registerAgentPendingResponse = z.object({
617
+ success: z.literal(true),
618
+ status: z.literal("pending"),
619
+ message: z.string(),
620
+ uaid: z.string(),
621
+ agentId: z.string(),
622
+ registry: z.string().optional(),
623
+ attemptId: z.string().nullable(),
624
+ agent: registrationAgentSchema,
625
+ openConvAI: z.object({
626
+ compatible: z.boolean(),
627
+ hcs11Profile: agentProfileSchema.optional(),
628
+ bridgeEndpoint: z.string().optional()
629
+ }).optional(),
630
+ profile: registrationProfileInfoSchema.optional(),
631
+ profileRegistry: profileRegistrySchema.nullable().optional(),
632
+ hcs10Registry: hcs10RegistrySchema.nullable().optional(),
633
+ credits: registrationCreditsSchema,
634
+ additionalRegistries: z.array(additionalRegistryResultSchema),
635
+ additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
636
+ additionalRegistryCostPerRegistry: z.number().optional()
637
+ });
638
+ const registerAgentPartialResponse = z.object({
639
+ success: z.literal(false),
640
+ status: z.literal("partial"),
641
+ message: z.string(),
642
+ uaid: z.string(),
643
+ agentId: z.string(),
644
+ registry: z.string().optional(),
645
+ attemptId: z.string().nullable().optional(),
646
+ agent: registrationAgentSchema,
647
+ openConvAI: z.object({
648
+ compatible: z.boolean(),
649
+ hcs11Profile: agentProfileSchema.optional(),
650
+ bridgeEndpoint: z.string().optional()
651
+ }).optional(),
652
+ profile: registrationProfileInfoSchema.optional(),
653
+ profileRegistry: profileRegistrySchema.nullable().optional(),
654
+ hcs10Registry: hcs10RegistrySchema.nullable().optional(),
655
+ credits: registrationCreditsSchema.optional(),
656
+ additionalRegistries: z.array(additionalRegistryResultSchema).optional(),
657
+ additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
658
+ additionalRegistryCostPerRegistry: z.number().optional(),
659
+ errors: z.array(
660
+ z.object({
661
+ registry: z.string(),
662
+ registryKey: z.string().nullable().optional(),
663
+ error: z.string()
664
+ })
665
+ ).min(1)
666
+ });
667
+ const registerAgentResponseSchema = z.union([
668
+ registerAgentSuccessResponse,
669
+ registerAgentPendingResponse,
670
+ registerAgentPartialResponse
671
+ ]);
672
+ const registrationProgressAdditionalEntry = z.object({
673
+ registryId: z.string(),
674
+ registryKey: z.string(),
675
+ networkId: z.string().optional(),
676
+ networkName: z.string().optional(),
677
+ chainId: z.number().optional(),
678
+ label: z.string().optional(),
679
+ status: z.enum(["pending", "in_progress", "completed", "failed"]),
680
+ error: z.string().optional(),
681
+ credits: z.number().nullable().optional(),
682
+ agentId: z.string().nullable().optional(),
683
+ agentUri: z.string().nullable().optional(),
684
+ metadata: z.record(jsonValueSchema).optional(),
685
+ lastUpdated: z.string()
686
+ });
687
+ const registrationProgressRecord = z.object({
688
+ attemptId: z.string(),
689
+ mode: z.enum(["register", "update"]),
690
+ status: z.enum(["pending", "partial", "completed", "failed"]),
691
+ uaid: z.string().optional(),
692
+ agentId: z.string().optional(),
693
+ registryNamespace: z.string(),
694
+ accountId: z.string().optional(),
695
+ startedAt: z.string(),
696
+ completedAt: z.string().optional(),
697
+ primary: z.object({
698
+ status: z.enum(["pending", "completed", "failed"]),
699
+ finishedAt: z.string().optional(),
700
+ error: z.string().optional()
701
+ }),
702
+ additionalRegistries: z.record(
703
+ z.string(),
704
+ registrationProgressAdditionalEntry
705
+ ),
706
+ errors: z.array(z.string()).optional()
707
+ });
708
+ const registrationProgressResponseSchema = z.object({
709
+ progress: registrationProgressRecord
710
+ });
711
+ const registrationQuoteResponseSchema = z.object({
712
+ accountId: z.string().nullable().optional(),
713
+ registry: z.string().optional(),
714
+ protocol: z.string().optional(),
715
+ requiredCredits: z.number(),
716
+ availableCredits: z.number().nullable().optional(),
717
+ shortfallCredits: z.number().nullable().optional(),
718
+ creditsPerHbar: z.number().nullable().optional(),
719
+ estimatedHbar: z.number().nullable().optional()
720
+ });
721
+ const creditPurchaseResponseSchema = z.object({
722
+ success: z.boolean().optional(),
723
+ purchaser: z.string(),
724
+ credits: z.number(),
725
+ hbarAmount: z.number(),
726
+ transactionId: z.string(),
727
+ consensusTimestamp: z.string().nullable().optional()
728
+ });
729
+ const x402SettlementSchema = z.object({
730
+ success: z.boolean().optional(),
731
+ transaction: z.string().optional(),
732
+ network: z.string().optional(),
733
+ payer: z.string().optional(),
734
+ errorReason: z.string().optional()
735
+ }).strict();
736
+ const x402CreditPurchaseResponseSchema = z.object({
737
+ success: z.boolean(),
738
+ accountId: z.string(),
739
+ creditedCredits: z.number(),
740
+ usdAmount: z.number(),
741
+ balance: z.number(),
742
+ payment: z.object({
743
+ payer: z.string().optional(),
744
+ requirement: z.record(jsonValueSchema).optional(),
745
+ settlement: x402SettlementSchema.optional()
746
+ }).optional()
747
+ });
748
+ const x402MinimumsResponseSchema = z.object({
749
+ minimums: z.record(
750
+ z.object({
751
+ network: z.string().optional(),
752
+ gasLimit: z.number().optional(),
753
+ gasPriceWei: z.string().optional(),
754
+ gasUsd: z.number().optional(),
755
+ minUsd: z.number().optional(),
756
+ ethUsd: z.number().optional(),
757
+ fetchedAt: z.string().optional(),
758
+ source: z.string().optional()
759
+ })
760
+ ).optional(),
761
+ creditUnitUsd: z.number().optional()
762
+ });
763
+ const adaptersResponseSchema = z.object({
764
+ adapters: z.array(z.string())
765
+ });
766
+ const adapterRegistryCategorySchema = z.object({
767
+ id: z.number().int(),
768
+ network: z.string(),
769
+ type: z.string(),
770
+ slug: z.string(),
771
+ name: z.string(),
772
+ description: z.string().nullable().optional(),
773
+ topicId: z.string(),
774
+ versionTopicId: z.string(),
775
+ registryTransactionId: z.string().nullable().optional(),
776
+ versionTransactionId: z.string().nullable().optional(),
777
+ metadataPointer: z.string().nullable().optional(),
778
+ metadataSequence: z.number().int().nullable().optional(),
779
+ createdAt: z.string(),
780
+ updatedAt: z.string(),
781
+ metadata: jsonValueSchema.optional().nullable()
782
+ });
783
+ const adapterRegistryCategoriesResponseSchema = z.object({
784
+ categories: z.array(adapterRegistryCategorySchema)
785
+ });
786
+ const adapterRegistryAdapterSchema = z.object({
787
+ id: z.union([z.string(), z.number()]).optional(),
788
+ network: z.string().optional(),
789
+ categoryId: z.union([z.string(), z.number()]).nullable().optional(),
790
+ operation: z.string().optional(),
791
+ adapterId: z.string(),
792
+ adapterName: z.string(),
793
+ entity: z.string(),
794
+ manifestPointer: z.string().nullable().optional(),
795
+ manifestSequence: z.number().int().nullable().optional(),
796
+ packageRegistry: z.string().nullable().optional(),
797
+ packageName: z.string().nullable().optional(),
798
+ packageVersion: z.string().nullable().optional(),
799
+ packageIntegrity: z.string().nullable().optional(),
800
+ stateModel: z.string().nullable().optional(),
801
+ config: jsonValueSchema.nullable().optional(),
802
+ signature: z.string().nullable().optional(),
803
+ manifest: jsonValueSchema.nullable().optional(),
804
+ keywords: z.array(z.string()).optional(),
805
+ searchText: z.string().nullable().optional(),
806
+ creditAccountId: z.string().nullable().optional(),
807
+ registeredByUserId: z.string().nullable().optional(),
808
+ registeredByEmail: z.string().nullable().optional(),
809
+ totalCostHbar: z.number().nullable().optional(),
810
+ totalCostCredits: z.number().nullable().optional(),
811
+ consensusTimestamp: z.string().nullable().optional(),
812
+ sequenceNumber: z.number().int().nullable().optional(),
813
+ payerAccountId: z.string().nullable().optional(),
814
+ mirrorNodePayload: jsonValueSchema.nullable().optional(),
815
+ versionTopicId: z.string().nullable().optional(),
816
+ declarationTopicId: z.string().nullable().optional(),
817
+ categoryEntrySequence: z.number().int().nullable().optional(),
818
+ categoryEntryTransactionId: z.string().nullable().optional(),
819
+ versionPointerSequence: z.number().int().nullable().optional(),
820
+ versionPointerTransactionId: z.string().nullable().optional(),
821
+ transactionId: z.string().nullable().optional(),
822
+ createdAt: z.string().optional(),
823
+ category: adapterRegistryCategorySchema.optional()
824
+ }).passthrough();
825
+ const adapterRegistryAdaptersResponseSchema = z.object({
826
+ network: z.string(),
827
+ adapters: z.array(adapterRegistryAdapterSchema)
828
+ });
829
+ const adapterRegistryCreateCategoryResponseSchema = z.object({
830
+ category: adapterRegistryCategorySchema
831
+ });
832
+ z.object({
833
+ adapter: z.record(jsonValueSchema),
834
+ declaration: adapterDeclarationSchema,
835
+ transactionId: z.string().optional().nullable(),
836
+ category: adapterRegistryCategorySchema
837
+ });
838
+ const adapterRegistrySubmitAdapterAcceptedResponseSchema = z.object({
839
+ submissionId: z.string(),
840
+ status: z.string().optional(),
841
+ network: z.string().optional(),
842
+ message: z.string().optional()
843
+ }).passthrough();
844
+ const adapterRegistrySubmissionStatusResponseSchema = z.object({
845
+ submission: z.object({
846
+ id: z.string(),
847
+ network: z.string(),
848
+ status: z.enum(["pending", "running", "completed", "failed"]),
849
+ adapterId: z.string(),
850
+ categorySlug: z.string().nullable().optional(),
851
+ creditAccountId: z.string().nullable().optional(),
852
+ registeredByUserId: z.string().nullable().optional(),
853
+ registeredByEmail: z.string().nullable().optional(),
854
+ requestPayload: jsonValueSchema.optional(),
855
+ resultPayload: jsonValueSchema.nullable().optional(),
856
+ error: z.string().nullable().optional(),
857
+ createdAt: z.string().optional(),
858
+ updatedAt: z.string().optional(),
859
+ startedAt: z.string().nullable().optional(),
860
+ completedAt: z.string().nullable().optional()
861
+ }).passthrough()
862
+ });
863
+ const adapterChatProfileSchema = z.object({
864
+ supportsChat: z.boolean(),
865
+ delivery: z.string().optional(),
866
+ transport: z.string().optional(),
867
+ streaming: z.boolean().optional(),
868
+ requiresAuth: z.array(z.string()).optional(),
869
+ notes: z.string().optional()
870
+ });
871
+ const adapterCapabilitiesSchema = z.object({
872
+ discovery: z.boolean(),
873
+ routing: z.boolean(),
874
+ communication: z.boolean(),
875
+ translation: z.boolean(),
876
+ protocols: z.array(z.string())
877
+ });
878
+ const adapterDescriptorSchema = z.object({
879
+ id: z.string(),
880
+ name: z.string(),
881
+ version: z.string(),
882
+ author: z.string(),
883
+ description: z.string(),
884
+ supportedProtocols: z.array(z.string()),
885
+ registryType: z.enum(["web2", "web3", "hybrid"]),
886
+ chatProfile: adapterChatProfileSchema.optional(),
887
+ capabilities: adapterCapabilitiesSchema,
888
+ enabled: z.boolean(),
889
+ priority: z.number(),
890
+ status: z.enum(["running", "stopped"])
891
+ });
892
+ const adapterDetailsResponseSchema = z.object({
893
+ adapters: z.array(adapterDescriptorSchema)
894
+ });
895
+ const metadataFacetOptionSchema = z.object({
896
+ value: z.union([z.string(), z.number(), z.boolean()]),
897
+ label: z.string()
898
+ });
899
+ const searchFacetSchema = z.object({
900
+ key: z.string(),
901
+ label: z.string(),
902
+ description: z.string().optional(),
903
+ type: z.enum(["string", "boolean", "number"]),
904
+ adapters: z.array(z.string()).optional(),
905
+ options: z.array(metadataFacetOptionSchema).optional()
906
+ });
907
+ const searchFacetsResponseSchema = z.object({
908
+ facets: z.array(searchFacetSchema)
909
+ });
54
910
  export {
55
- base58Decode,
56
- base58Encode,
57
- multibaseB58btcDecode
911
+ AIAgentCapability,
912
+ AIAgentType,
913
+ adapterChatProfileSchema,
914
+ adapterDescriptorSchema,
915
+ adapterDetailsResponseSchema,
916
+ adapterRegistryAdapterSchema,
917
+ adapterRegistryAdaptersResponseSchema,
918
+ adapterRegistryCategoriesResponseSchema,
919
+ adapterRegistryCategorySchema,
920
+ adapterRegistryCreateCategoryResponseSchema,
921
+ adapterRegistrySubmissionStatusResponseSchema,
922
+ adapterRegistrySubmitAdapterAcceptedResponseSchema,
923
+ adaptersResponseSchema,
924
+ additionalRegistryCatalogResponseSchema,
925
+ agentFeedbackEligibilityResponseSchema,
926
+ agentFeedbackEntriesIndexResponseSchema,
927
+ agentFeedbackIndexResponseSchema,
928
+ agentFeedbackResponseSchema,
929
+ agentFeedbackSubmissionResponseSchema,
930
+ chatHistoryCompactionResponseSchema,
931
+ chatHistorySnapshotResponseSchema,
932
+ createSessionResponseSchema,
933
+ creditPurchaseResponseSchema,
934
+ dashboardStatsResponseSchema,
935
+ detectProtocolResponseSchema,
936
+ encryptionHandshakeResponseSchema,
937
+ ledgerChallengeResponseSchema,
938
+ ledgerVerifyResponseSchema,
939
+ metricsSummaryResponseSchema,
940
+ popularResponseSchema,
941
+ protocolsResponseSchema,
942
+ registerAgentResponseSchema,
943
+ registerEncryptionKeyResponseSchema,
944
+ registrationProgressResponseSchema,
945
+ registrationQuoteResponseSchema,
946
+ registriesResponseSchema,
947
+ registrySearchByNamespaceSchema,
948
+ resolveResponseSchema,
949
+ searchFacetsResponseSchema,
950
+ searchResponseSchema,
951
+ searchStatusResponseSchema,
952
+ sendMessageResponseSchema,
953
+ sessionEncryptionStatusResponseSchema,
954
+ statsResponseSchema,
955
+ uaidConnectionStatusSchema,
956
+ uaidValidationResponseSchema,
957
+ vectorSearchResponseSchema,
958
+ websocketStatsResponseSchema,
959
+ x402CreditPurchaseResponseSchema,
960
+ x402MinimumsResponseSchema
58
961
  };
59
962
  //# sourceMappingURL=standards-sdk.es151.js.map