@hashgraphonline/standards-sdk 0.1.138 → 0.1.139-feat-pong-agent.canary.e66e7a5.36

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 (84) hide show
  1. package/dist/cjs/hcs-21/base-client.d.ts +11 -9
  2. package/dist/cjs/hcs-21/base-client.d.ts.map +1 -1
  3. package/dist/cjs/hcs-21/browser.d.ts +3 -3
  4. package/dist/cjs/hcs-21/sdk.d.ts +5 -5
  5. package/dist/cjs/hcs-21/sdk.d.ts.map +1 -1
  6. package/dist/cjs/hcs-21/tx.d.ts +2 -2
  7. package/dist/cjs/hcs-21/tx.d.ts.map +1 -1
  8. package/dist/cjs/hcs-21/types.d.ts +50 -33
  9. package/dist/cjs/hcs-21/types.d.ts.map +1 -1
  10. package/dist/cjs/services/registry-broker/client.d.ts.map +1 -1
  11. package/dist/cjs/services/registry-broker/schemas.d.ts +1043 -231
  12. package/dist/cjs/services/registry-broker/schemas.d.ts.map +1 -1
  13. package/dist/cjs/standards-sdk.cjs +1 -1
  14. package/dist/cjs/standards-sdk.cjs.map +1 -1
  15. package/dist/es/hcs-21/base-client.d.ts +11 -9
  16. package/dist/es/hcs-21/base-client.d.ts.map +1 -1
  17. package/dist/es/hcs-21/browser.d.ts +3 -3
  18. package/dist/es/hcs-21/sdk.d.ts +5 -5
  19. package/dist/es/hcs-21/sdk.d.ts.map +1 -1
  20. package/dist/es/hcs-21/tx.d.ts +2 -2
  21. package/dist/es/hcs-21/tx.d.ts.map +1 -1
  22. package/dist/es/hcs-21/types.d.ts +50 -33
  23. package/dist/es/hcs-21/types.d.ts.map +1 -1
  24. package/dist/es/services/registry-broker/client.d.ts.map +1 -1
  25. package/dist/es/services/registry-broker/schemas.d.ts +1043 -231
  26. package/dist/es/services/registry-broker/schemas.d.ts.map +1 -1
  27. package/dist/es/standards-sdk.es.js +3 -2
  28. package/dist/es/standards-sdk.es109.js +1 -1
  29. package/dist/es/standards-sdk.es110.js +5 -5
  30. package/dist/es/standards-sdk.es120.js +1 -1
  31. package/dist/es/standards-sdk.es121.js +1 -1
  32. package/dist/es/standards-sdk.es122.js +5 -5
  33. package/dist/es/standards-sdk.es124.js +1 -1
  34. package/dist/es/standards-sdk.es125.js +1 -1
  35. package/dist/es/standards-sdk.es127.js +22 -8
  36. package/dist/es/standards-sdk.es127.js.map +1 -1
  37. package/dist/es/standards-sdk.es137.js +715 -56
  38. package/dist/es/standards-sdk.es137.js.map +1 -1
  39. package/dist/es/standards-sdk.es138.js +12254 -44
  40. package/dist/es/standards-sdk.es138.js.map +1 -1
  41. package/dist/es/standards-sdk.es139.js +17 -694
  42. package/dist/es/standards-sdk.es139.js.map +1 -1
  43. package/dist/es/standards-sdk.es140.js +168 -13
  44. package/dist/es/standards-sdk.es140.js.map +1 -1
  45. package/dist/es/standards-sdk.es141.js +263 -12215
  46. package/dist/es/standards-sdk.es141.js.map +1 -1
  47. package/dist/es/standards-sdk.es142.js +294 -120
  48. package/dist/es/standards-sdk.es142.js.map +1 -1
  49. package/dist/es/standards-sdk.es143.js +322 -191
  50. package/dist/es/standards-sdk.es143.js.map +1 -1
  51. package/dist/es/standards-sdk.es144.js +279 -294
  52. package/dist/es/standards-sdk.es144.js.map +1 -1
  53. package/dist/es/standards-sdk.es145.js +63 -440
  54. package/dist/es/standards-sdk.es145.js.map +1 -1
  55. package/dist/es/standards-sdk.es146.js +55 -330
  56. package/dist/es/standards-sdk.es146.js.map +1 -1
  57. package/dist/es/standards-sdk.es147.js +50 -62
  58. package/dist/es/standards-sdk.es147.js.map +1 -1
  59. package/dist/es/standards-sdk.es17.js +1 -1
  60. package/dist/es/standards-sdk.es19.js +2 -2
  61. package/dist/es/standards-sdk.es20.js +2 -2
  62. package/dist/es/standards-sdk.es28.js +2 -2
  63. package/dist/es/standards-sdk.es31.js +1 -1
  64. package/dist/es/standards-sdk.es32.js +1 -1
  65. package/dist/es/standards-sdk.es36.js +2 -2
  66. package/dist/es/standards-sdk.es37.js +1 -1
  67. package/dist/es/standards-sdk.es38.js +1 -1
  68. package/dist/es/standards-sdk.es57.js +1 -1
  69. package/dist/es/standards-sdk.es59.js +1 -1
  70. package/dist/es/standards-sdk.es60.js +1 -1
  71. package/dist/es/standards-sdk.es61.js +1 -1
  72. package/dist/es/standards-sdk.es63.js +1 -1
  73. package/dist/es/standards-sdk.es65.js +1 -1
  74. package/dist/es/standards-sdk.es66.js +1 -1
  75. package/dist/es/standards-sdk.es78.js +1 -1
  76. package/dist/es/standards-sdk.es80.js +22 -6
  77. package/dist/es/standards-sdk.es80.js.map +1 -1
  78. package/dist/es/standards-sdk.es82.js.map +1 -1
  79. package/dist/es/standards-sdk.es83.js +8 -6
  80. package/dist/es/standards-sdk.es83.js.map +1 -1
  81. package/dist/es/standards-sdk.es84.js +2 -2
  82. package/dist/es/standards-sdk.es84.js.map +1 -1
  83. package/dist/es/standards-sdk.es85.js.map +1 -1
  84. package/package.json +63 -60
@@ -1,59 +1,718 @@
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 { AIAgentCapability, AIAgentType } from "./standards-sdk.es29.js";
3
+ const capabilitySchema = z.nativeEnum(AIAgentCapability);
4
+ const capabilityValueSchema = z.union([capabilitySchema, z.string()]);
5
+ const jsonPrimitiveSchema = z.union([
6
+ z.string(),
7
+ z.number(),
8
+ z.boolean(),
9
+ z.null()
10
+ ]);
11
+ const jsonValueSchema = z.lazy(
12
+ () => z.union([
13
+ jsonPrimitiveSchema,
14
+ z.array(jsonValueSchema),
15
+ z.record(jsonValueSchema)
16
+ ])
17
+ );
18
+ const agentProfileSchema = z.object({
19
+ version: z.string(),
20
+ type: z.number(),
21
+ display_name: z.string(),
22
+ alias: z.string().optional(),
23
+ bio: z.string().optional(),
24
+ socials: z.array(jsonValueSchema).optional(),
25
+ aiAgent: z.object({
26
+ type: z.nativeEnum(AIAgentType),
27
+ creator: z.string().optional(),
28
+ model: z.string().optional(),
29
+ capabilities: z.array(capabilitySchema).optional()
30
+ }).optional(),
31
+ uaid: z.string().optional()
32
+ }).catchall(jsonValueSchema);
33
+ const cipherEnvelopeRecipientSchema = z.object({
34
+ uaid: z.string().optional(),
35
+ ledgerAccountId: z.string().optional(),
36
+ userId: z.string().optional(),
37
+ email: z.string().optional(),
38
+ encryptedShare: z.string()
39
+ });
40
+ const cipherEnvelopeSchema = z.object({
41
+ algorithm: z.string(),
42
+ ciphertext: z.string(),
43
+ nonce: z.string(),
44
+ associatedData: z.string().optional(),
45
+ keyLocator: z.object({
46
+ sessionId: z.string().optional(),
47
+ revision: z.number().optional()
48
+ }).optional(),
49
+ recipients: z.array(cipherEnvelopeRecipientSchema)
50
+ });
51
+ const peerSummarySchema = z.object({
52
+ keyType: z.string(),
53
+ publicKey: z.string(),
54
+ uaid: z.string().optional(),
55
+ ledgerAccountId: z.string().optional(),
56
+ userId: z.string().optional(),
57
+ email: z.string().optional()
58
+ });
59
+ const handshakeParticipantSchema = z.object({
60
+ role: z.enum(["requester", "responder"]),
61
+ uaid: z.string().optional(),
62
+ userId: z.string().optional(),
63
+ ledgerAccountId: z.string().optional(),
64
+ keyType: z.string(),
65
+ longTermPublicKey: z.string().optional(),
66
+ ephemeralPublicKey: z.string(),
67
+ signature: z.string().optional(),
68
+ metadata: z.record(jsonValueSchema).optional(),
69
+ submittedAt: z.string()
70
+ });
71
+ const encryptionHandshakeRecordSchema = z.object({
72
+ sessionId: z.string(),
73
+ algorithm: z.string(),
74
+ createdAt: z.string(),
75
+ expiresAt: z.number(),
76
+ status: z.enum(["pending", "complete"]),
77
+ requester: handshakeParticipantSchema.optional(),
78
+ responder: handshakeParticipantSchema.optional()
79
+ });
80
+ const sessionEncryptionSummarySchema = z.object({
81
+ enabled: z.boolean(),
82
+ algorithm: z.string(),
83
+ requireCiphertext: z.boolean(),
84
+ requester: peerSummarySchema.nullable().optional(),
85
+ responder: peerSummarySchema.nullable().optional(),
86
+ handshake: encryptionHandshakeRecordSchema.nullable().optional()
87
+ });
88
+ const chatHistoryEntrySchema = z.object({
89
+ messageId: z.string(),
90
+ role: z.enum(["user", "agent"]),
91
+ content: z.string(),
92
+ timestamp: z.string(),
93
+ cipherEnvelope: cipherEnvelopeSchema.optional(),
94
+ metadata: z.record(jsonValueSchema).optional()
95
+ });
96
+ const metadataFacetSchema = z.record(z.array(jsonValueSchema)).optional();
97
+ const searchHitSchema = z.object({
98
+ id: z.string(),
99
+ uaid: z.string(),
100
+ registry: z.string(),
101
+ name: z.string(),
102
+ description: z.string().optional(),
103
+ capabilities: z.array(capabilityValueSchema),
104
+ endpoints: z.union([z.record(jsonValueSchema), z.array(z.string())]).optional(),
105
+ metadata: z.record(jsonValueSchema).optional(),
106
+ metadataFacet: metadataFacetSchema,
107
+ profile: agentProfileSchema.optional(),
108
+ protocols: z.array(z.string()).optional(),
109
+ adapter: z.string().optional(),
110
+ originalId: z.string().optional(),
111
+ communicationSupported: z.boolean().optional(),
112
+ routingSupported: z.boolean().optional(),
113
+ available: z.boolean().optional(),
114
+ availabilityStatus: z.string().optional(),
115
+ availabilityCheckedAt: z.string().optional(),
116
+ availabilitySource: z.string().optional(),
117
+ availabilityLatencyMs: z.number().optional(),
118
+ availabilityScore: z.number().optional(),
119
+ capabilityLabels: z.array(z.string()).optional(),
120
+ capabilityTokens: z.array(z.string()).optional(),
121
+ image: z.string().optional(),
122
+ createdAt: z.string().optional(),
123
+ updatedAt: z.string().optional(),
124
+ lastSeen: z.string().optional(),
125
+ lastIndexed: z.string().optional()
126
+ }).passthrough();
127
+ const searchResponseSchema = z.object({
128
+ hits: z.array(searchHitSchema),
129
+ total: z.number(),
130
+ page: z.number(),
131
+ limit: z.number()
132
+ });
133
+ const statsResponseSchema = z.object({
134
+ totalAgents: z.number(),
135
+ registries: z.record(z.number()),
136
+ capabilities: z.record(z.number()),
137
+ lastUpdate: z.string(),
138
+ status: z.string()
139
+ });
140
+ const registriesResponseSchema = z.object({
141
+ registries: z.array(z.string())
142
+ });
143
+ const popularResponseSchema = z.object({
144
+ searches: z.array(z.string())
145
+ });
146
+ const resolveResponseSchema = z.object({
147
+ agent: searchHitSchema
148
+ });
149
+ const createSessionResponseSchema = z.object({
150
+ sessionId: z.string(),
151
+ uaid: z.string().nullable().optional(),
152
+ agent: z.object({
153
+ name: z.string(),
154
+ description: z.string().optional(),
155
+ capabilities: z.record(jsonValueSchema).nullable().optional(),
156
+ skills: z.array(z.string()).optional()
157
+ }),
158
+ history: z.array(chatHistoryEntrySchema),
159
+ historyTtlSeconds: z.number().nullable().optional(),
160
+ encryption: sessionEncryptionSummarySchema.nullable().optional()
161
+ });
162
+ const sendMessageResponseSchema = z.object({
163
+ sessionId: z.string(),
164
+ uaid: z.string().nullable().optional(),
165
+ message: z.string(),
166
+ timestamp: z.string(),
167
+ rawResponse: jsonValueSchema.optional(),
168
+ content: z.string().optional(),
169
+ history: z.array(chatHistoryEntrySchema).optional(),
170
+ historyTtlSeconds: z.number().nullable().optional(),
171
+ encrypted: z.boolean().optional()
172
+ });
173
+ const chatHistorySnapshotResponseSchema = z.object({
174
+ sessionId: z.string(),
175
+ history: z.array(chatHistoryEntrySchema),
176
+ historyTtlSeconds: z.number()
177
+ });
178
+ z.object({
179
+ preserveEntries: z.number().int().min(0).optional()
180
+ }).strict();
181
+ const chatHistoryCompactionResponseSchema = z.object({
182
+ sessionId: z.string(),
183
+ history: z.array(chatHistoryEntrySchema),
184
+ summaryEntry: chatHistoryEntrySchema,
185
+ preservedEntries: z.array(chatHistoryEntrySchema),
186
+ historyTtlSeconds: z.number(),
187
+ creditsDebited: z.number(),
188
+ metadata: z.record(jsonValueSchema).optional()
189
+ });
190
+ const sessionEncryptionStatusResponseSchema = z.object({
191
+ sessionId: z.string(),
192
+ encryption: sessionEncryptionSummarySchema.nullable()
193
+ });
194
+ const encryptionHandshakeResponseSchema = z.object({
195
+ sessionId: z.string(),
196
+ handshake: encryptionHandshakeRecordSchema
197
+ });
198
+ const registerEncryptionKeyResponseSchema = z.object({
199
+ id: z.string(),
200
+ keyType: z.string(),
201
+ publicKey: z.string(),
202
+ uaid: z.string().nullable(),
203
+ ledgerAccountId: z.string().nullable(),
204
+ ledgerNetwork: z.string().nullable().optional(),
205
+ userId: z.string().nullable().optional(),
206
+ email: z.string().nullable().optional(),
207
+ createdAt: z.string(),
208
+ updatedAt: z.string()
209
+ });
210
+ const ledgerChallengeResponseSchema = z.object({
211
+ challengeId: z.string(),
212
+ message: z.string(),
213
+ expiresAt: z.string()
214
+ });
215
+ const ledgerApiKeySummarySchema = z.object({
216
+ id: z.string(),
217
+ label: z.string().optional(),
218
+ prefix: z.string(),
219
+ lastFour: z.string(),
220
+ createdAt: z.string(),
221
+ lastUsedAt: z.string().nullable().optional(),
222
+ ownerType: z.literal("ledger"),
223
+ ledgerAccountId: z.string().optional(),
224
+ ledgerNetwork: z.string().optional(),
225
+ ledgerNetworkCanonical: z.string().optional()
226
+ });
227
+ const ledgerVerifyResponseSchema = z.object({
228
+ key: z.string(),
229
+ apiKey: ledgerApiKeySummarySchema,
230
+ accountId: z.string(),
231
+ network: z.string(),
232
+ networkCanonical: z.string().optional()
233
+ });
234
+ const protocolsResponseSchema = z.object({
235
+ protocols: z.array(z.string())
236
+ });
237
+ const detectProtocolResponseSchema = z.object({
238
+ protocol: z.string().nullable()
239
+ });
240
+ const registrySearchByNamespaceSchema = z.object({
241
+ hits: z.array(searchHitSchema),
242
+ total: z.number(),
243
+ page: z.number().optional(),
244
+ limit: z.number().optional()
245
+ });
246
+ const capabilityFilterValueSchema = z.union([z.string(), z.number()]);
247
+ const vectorSearchFilterSchema = z.object({
248
+ capabilities: z.array(capabilityFilterValueSchema).optional(),
249
+ type: z.enum(["ai-agents", "mcp-servers"]).optional(),
250
+ registry: z.string().optional(),
251
+ protocols: z.array(z.string()).optional(),
252
+ adapter: z.array(z.string()).optional()
253
+ }).strict();
254
+ z.object({
255
+ query: z.string(),
256
+ filter: vectorSearchFilterSchema.optional(),
257
+ limit: z.number().int().min(1).max(100).optional(),
258
+ offset: z.number().int().min(0).optional()
259
+ }).strict();
260
+ const vectorSearchHitSchema = z.object({
261
+ agent: searchHitSchema,
262
+ score: z.number().optional(),
263
+ highlights: z.record(z.array(z.string())).optional()
264
+ });
265
+ const vectorSearchResponseSchema = z.object({
266
+ hits: z.array(vectorSearchHitSchema),
267
+ total: z.number(),
268
+ took: z.number(),
269
+ totalAvailable: z.number().optional(),
270
+ visible: z.number().optional(),
271
+ limited: z.boolean().optional(),
272
+ credits_used: z.number().optional()
273
+ });
274
+ const websocketStatsResponseSchema = z.object({
275
+ clients: z.number(),
276
+ stats: z.object({
277
+ totalClients: z.number().optional(),
278
+ clientsByRegistry: z.record(z.number()).optional(),
279
+ clientsByEventType: z.record(z.number()).optional()
280
+ }).passthrough()
281
+ });
282
+ const durationStatsSchema = z.object({
283
+ p50: z.number(),
284
+ p90: z.number(),
285
+ p95: z.number(),
286
+ p99: z.number()
287
+ });
288
+ const metricsSummaryResponseSchema = z.object({
289
+ http: z.object({
290
+ requestsTotal: z.number(),
291
+ activeConnections: z.number(),
292
+ requestDuration: durationStatsSchema
293
+ }),
294
+ search: z.object({
295
+ queriesTotal: z.number(),
296
+ queryDuration: durationStatsSchema
297
+ }),
298
+ indexing: z.object({ agentsTotal: z.number(), crawlErrors: z.number() }),
299
+ registration: z.object({
300
+ total: z.number(),
301
+ failures: z.number(),
302
+ duration: durationStatsSchema
303
+ }),
304
+ cache: z.object({
305
+ hits: z.number(),
306
+ misses: z.number(),
307
+ hitRate: z.number()
308
+ }),
309
+ websocket: z.object({ connections: z.number() })
310
+ });
311
+ const uaidValidationResponseSchema = z.object({
312
+ uaid: z.string(),
313
+ valid: z.boolean(),
314
+ formats: z.array(z.string())
315
+ });
316
+ const adapterConnectionSchema = z.object({
317
+ id: z.string(),
318
+ agentId: z.string(),
319
+ protocol: z.string(),
320
+ endpoint: z.string(),
321
+ status: z.enum(["connected", "disconnected", "error"]),
322
+ metadata: z.record(jsonPrimitiveSchema).optional(),
323
+ createdAt: z.string()
324
+ });
325
+ const uaidConnectionStatusSchema = z.object({
326
+ connected: z.boolean(),
327
+ connection: adapterConnectionSchema.optional(),
328
+ adapter: z.string().optional(),
329
+ agentId: z.string().optional()
330
+ });
331
+ const dashboardStatsResponseSchema = z.object({
332
+ operatorId: z.string().optional(),
333
+ adapters: z.array(
334
+ z.object({
335
+ name: z.string(),
336
+ version: z.string(),
337
+ status: z.string(),
338
+ agentCount: z.number(),
339
+ lastDiscovery: z.string(),
340
+ registryType: z.string(),
341
+ health: z.string()
342
+ })
343
+ ).optional(),
344
+ totalAgents: z.number().optional(),
345
+ elasticsearchDocumentCount: z.number().optional(),
346
+ agentsByAdapter: z.record(z.number()).optional(),
347
+ agentsByRegistry: z.record(z.number()).optional(),
348
+ systemInfo: z.object({
349
+ uptime: z.number().optional(),
350
+ version: z.string().optional(),
351
+ network: z.string().optional()
352
+ }).optional()
353
+ });
354
+ const registrationAgentSchema = z.object({
355
+ id: z.string(),
356
+ name: z.string(),
357
+ type: z.string(),
358
+ endpoint: z.string().optional(),
359
+ capabilities: z.array(capabilityValueSchema),
360
+ registry: z.string().optional(),
361
+ protocol: z.string().optional(),
362
+ profile: agentProfileSchema.optional(),
363
+ nativeId: z.string().optional(),
364
+ metadata: z.record(jsonValueSchema).optional()
365
+ });
366
+ const registrationProfileInfoSchema = z.object({
367
+ tId: z.string().nullable(),
368
+ sizeBytes: z.number().optional()
369
+ });
370
+ const profileRegistrySchema = z.object({
371
+ topicId: z.string().optional(),
372
+ sequenceNumber: z.number().optional(),
373
+ profileReference: z.string().optional(),
374
+ profileTopicId: z.string().optional()
375
+ }).passthrough().nullable().optional();
376
+ const additionalRegistryResultSchema = z.object({
377
+ registry: z.string(),
378
+ status: z.enum([
379
+ "created",
380
+ "duplicate",
381
+ "skipped",
382
+ "error",
383
+ "updated",
384
+ "pending"
385
+ ]),
386
+ agentId: z.string().nullable().optional(),
387
+ agentUri: z.string().nullable().optional(),
388
+ error: z.string().optional(),
389
+ metadata: z.record(jsonValueSchema).optional(),
390
+ registryKey: z.string().optional(),
391
+ networkId: z.string().optional(),
392
+ networkName: z.string().optional(),
393
+ chainId: z.number().optional(),
394
+ estimatedCredits: z.number().nullable().optional(),
395
+ gasEstimateCredits: z.number().nullable().optional(),
396
+ gasEstimateUsd: z.number().nullable().optional(),
397
+ gasPriceGwei: z.number().nullable().optional(),
398
+ gasLimit: z.number().nullable().optional(),
399
+ creditMode: z.enum(["fixed", "gas"]).nullable().optional(),
400
+ minCredits: z.number().nullable().optional(),
401
+ consumedCredits: z.number().nullable().optional(),
402
+ cost: z.object({
403
+ credits: z.number(),
404
+ usd: z.number(),
405
+ eth: z.number(),
406
+ gasUsedWei: z.string(),
407
+ effectiveGasPriceWei: z.string().nullable().optional(),
408
+ transactions: z.array(
409
+ z.object({
410
+ hash: z.string(),
411
+ gasUsedWei: z.string(),
412
+ effectiveGasPriceWei: z.string().nullable().optional(),
413
+ costWei: z.string()
414
+ })
415
+ ).optional()
416
+ }).optional()
417
+ });
418
+ const registrationCreditsSchema = z.object({
419
+ base: z.number(),
420
+ additional: z.number(),
421
+ total: z.number()
422
+ });
423
+ const hcs10RegistrySchema = z.object({
424
+ status: z.string(),
425
+ uaid: z.string().optional(),
426
+ transactionId: z.string().optional(),
427
+ consensusTimestamp: z.string().optional(),
428
+ registryTopicId: z.string().optional(),
429
+ topicSequenceNumber: z.number().optional(),
430
+ payloadHash: z.string().optional(),
431
+ profileReference: z.string().optional(),
432
+ tId: z.string().optional(),
433
+ profileSizeBytes: z.number().optional(),
434
+ error: z.string().optional()
435
+ }).passthrough();
436
+ const additionalRegistryNetworkSchema = z.object({
437
+ key: z.string(),
438
+ registryId: z.string().optional(),
439
+ networkId: z.string().optional(),
440
+ name: z.string().optional(),
441
+ chainId: z.number().optional(),
442
+ label: z.string().optional(),
443
+ estimatedCredits: z.number().nullable().optional(),
444
+ baseCredits: z.number().nullable().optional(),
445
+ gasPortionCredits: z.number().nullable().optional(),
446
+ gasPortionUsd: z.number().nullable().optional(),
447
+ gasEstimateCredits: z.number().nullable().optional(),
448
+ gasEstimateUsd: z.number().nullable().optional(),
449
+ gasPriceGwei: z.number().nullable().optional(),
450
+ gasLimit: z.number().nullable().optional(),
451
+ minCredits: z.number().nullable().optional(),
452
+ creditMode: z.string().nullable().optional()
453
+ }).passthrough();
454
+ const additionalRegistryDescriptorSchema = z.object({
455
+ id: z.string(),
456
+ label: z.string(),
457
+ networks: z.array(additionalRegistryNetworkSchema)
458
+ });
459
+ const additionalRegistryCatalogResponseSchema = z.object({
460
+ registries: z.array(additionalRegistryDescriptorSchema)
461
+ });
462
+ const registerAgentSuccessResponse = z.object({
463
+ success: z.literal(true),
464
+ status: z.enum(["created", "duplicate", "updated"]).optional(),
465
+ uaid: z.string(),
466
+ agentId: z.string(),
467
+ message: z.string().optional(),
468
+ registry: z.string().optional(),
469
+ attemptId: z.string().nullable().optional(),
470
+ agent: registrationAgentSchema,
471
+ openConvAI: z.object({
472
+ compatible: z.boolean(),
473
+ hcs11Profile: agentProfileSchema.optional(),
474
+ bridgeEndpoint: z.string().optional()
475
+ }).optional(),
476
+ profile: registrationProfileInfoSchema.optional(),
477
+ profileRegistry: profileRegistrySchema.nullable().optional(),
478
+ hcs10Registry: hcs10RegistrySchema.nullable().optional(),
479
+ credits: registrationCreditsSchema.optional(),
480
+ additionalRegistries: z.array(additionalRegistryResultSchema).optional(),
481
+ additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
482
+ additionalRegistryCostPerRegistry: z.number().optional()
483
+ });
484
+ const registerAgentPendingResponse = z.object({
485
+ success: z.literal(true),
486
+ status: z.literal("pending"),
487
+ message: z.string(),
488
+ uaid: z.string(),
489
+ agentId: z.string(),
490
+ registry: z.string().optional(),
491
+ attemptId: z.string().nullable(),
492
+ agent: registrationAgentSchema,
493
+ openConvAI: z.object({
494
+ compatible: z.boolean(),
495
+ hcs11Profile: agentProfileSchema.optional(),
496
+ bridgeEndpoint: z.string().optional()
497
+ }).optional(),
498
+ profile: registrationProfileInfoSchema.optional(),
499
+ profileRegistry: profileRegistrySchema.nullable().optional(),
500
+ hcs10Registry: hcs10RegistrySchema.nullable().optional(),
501
+ credits: registrationCreditsSchema,
502
+ additionalRegistries: z.array(additionalRegistryResultSchema),
503
+ additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
504
+ additionalRegistryCostPerRegistry: z.number().optional()
505
+ });
506
+ const registerAgentPartialResponse = z.object({
507
+ success: z.literal(false),
508
+ status: z.literal("partial"),
509
+ message: z.string(),
510
+ uaid: z.string(),
511
+ agentId: z.string(),
512
+ registry: z.string().optional(),
513
+ attemptId: z.string().nullable().optional(),
514
+ agent: registrationAgentSchema,
515
+ openConvAI: z.object({
516
+ compatible: z.boolean(),
517
+ hcs11Profile: agentProfileSchema.optional(),
518
+ bridgeEndpoint: z.string().optional()
519
+ }).optional(),
520
+ profile: registrationProfileInfoSchema.optional(),
521
+ profileRegistry: profileRegistrySchema.nullable().optional(),
522
+ hcs10Registry: hcs10RegistrySchema.nullable().optional(),
523
+ credits: registrationCreditsSchema.optional(),
524
+ additionalRegistries: z.array(additionalRegistryResultSchema).optional(),
525
+ additionalRegistryCredits: z.array(additionalRegistryResultSchema).optional(),
526
+ additionalRegistryCostPerRegistry: z.number().optional(),
527
+ errors: z.array(
528
+ z.object({
529
+ registry: z.string(),
530
+ registryKey: z.string().nullable().optional(),
531
+ error: z.string()
532
+ })
533
+ ).min(1)
534
+ });
535
+ const registerAgentResponseSchema = z.union([
536
+ registerAgentSuccessResponse,
537
+ registerAgentPendingResponse,
538
+ registerAgentPartialResponse
539
+ ]);
540
+ const registrationProgressAdditionalEntry = z.object({
541
+ registryId: z.string(),
542
+ registryKey: z.string(),
543
+ networkId: z.string().optional(),
544
+ networkName: z.string().optional(),
545
+ chainId: z.number().optional(),
546
+ label: z.string().optional(),
547
+ status: z.enum(["pending", "in_progress", "completed", "failed"]),
548
+ error: z.string().optional(),
549
+ credits: z.number().nullable().optional(),
550
+ agentId: z.string().nullable().optional(),
551
+ agentUri: z.string().nullable().optional(),
552
+ metadata: z.record(jsonValueSchema).optional(),
553
+ lastUpdated: z.string()
554
+ });
555
+ const registrationProgressRecord = z.object({
556
+ attemptId: z.string(),
557
+ mode: z.enum(["register", "update"]),
558
+ status: z.enum(["pending", "partial", "completed", "failed"]),
559
+ uaid: z.string().optional(),
560
+ agentId: z.string().optional(),
561
+ registryNamespace: z.string(),
562
+ accountId: z.string().optional(),
563
+ startedAt: z.string(),
564
+ completedAt: z.string().optional(),
565
+ primary: z.object({
566
+ status: z.enum(["pending", "completed", "failed"]),
567
+ finishedAt: z.string().optional(),
568
+ error: z.string().optional()
569
+ }),
570
+ additionalRegistries: z.record(
571
+ z.string(),
572
+ registrationProgressAdditionalEntry
573
+ ),
574
+ errors: z.array(z.string()).optional()
575
+ });
576
+ const registrationProgressResponseSchema = z.object({
577
+ progress: registrationProgressRecord
578
+ });
579
+ const registrationQuoteResponseSchema = z.object({
580
+ accountId: z.string().nullable().optional(),
581
+ registry: z.string().optional(),
582
+ protocol: z.string().optional(),
583
+ requiredCredits: z.number(),
584
+ availableCredits: z.number().nullable().optional(),
585
+ shortfallCredits: z.number().nullable().optional(),
586
+ creditsPerHbar: z.number().nullable().optional(),
587
+ estimatedHbar: z.number().nullable().optional()
588
+ });
589
+ const creditPurchaseResponseSchema = z.object({
590
+ success: z.boolean().optional(),
591
+ purchaser: z.string(),
592
+ credits: z.number(),
593
+ hbarAmount: z.number(),
594
+ transactionId: z.string(),
595
+ consensusTimestamp: z.string().nullable().optional()
596
+ });
597
+ const x402SettlementSchema = z.object({
598
+ success: z.boolean().optional(),
599
+ transaction: z.string().optional(),
600
+ network: z.string().optional(),
601
+ payer: z.string().optional(),
602
+ errorReason: z.string().optional()
603
+ }).strict();
604
+ const x402CreditPurchaseResponseSchema = z.object({
605
+ success: z.boolean(),
606
+ accountId: z.string(),
607
+ creditedCredits: z.number(),
608
+ usdAmount: z.number(),
609
+ balance: z.number(),
610
+ payment: z.object({
611
+ payer: z.string().optional(),
612
+ requirement: z.record(jsonValueSchema).optional(),
613
+ settlement: x402SettlementSchema.optional()
614
+ }).optional()
615
+ });
616
+ const x402MinimumsResponseSchema = z.object({
617
+ minimums: z.record(
618
+ z.object({
619
+ network: z.string().optional(),
620
+ gasLimit: z.number().optional(),
621
+ gasPriceWei: z.string().optional(),
622
+ gasUsd: z.number().optional(),
623
+ minUsd: z.number().optional(),
624
+ ethUsd: z.number().optional(),
625
+ fetchedAt: z.string().optional(),
626
+ source: z.string().optional()
627
+ })
628
+ ).optional(),
629
+ creditUnitUsd: z.number().optional()
630
+ });
631
+ const adaptersResponseSchema = z.object({
632
+ adapters: z.array(z.string())
633
+ });
634
+ const adapterChatProfileSchema = z.object({
635
+ supportsChat: z.boolean(),
636
+ delivery: z.string().optional(),
637
+ transport: z.string().optional(),
638
+ streaming: z.boolean().optional(),
639
+ requiresAuth: z.array(z.string()).optional(),
640
+ notes: z.string().optional()
641
+ });
642
+ const adapterCapabilitiesSchema = z.object({
643
+ discovery: z.boolean(),
644
+ routing: z.boolean(),
645
+ communication: z.boolean(),
646
+ translation: z.boolean(),
647
+ protocols: z.array(z.string())
648
+ });
649
+ const adapterDescriptorSchema = z.object({
650
+ id: z.string(),
651
+ name: z.string(),
652
+ version: z.string(),
653
+ author: z.string(),
654
+ description: z.string(),
655
+ supportedProtocols: z.array(z.string()),
656
+ registryType: z.enum(["web2", "web3", "hybrid"]),
657
+ chatProfile: adapterChatProfileSchema.optional(),
658
+ capabilities: adapterCapabilitiesSchema,
659
+ enabled: z.boolean(),
660
+ priority: z.number(),
661
+ status: z.enum(["running", "stopped"])
662
+ });
663
+ const adapterDetailsResponseSchema = z.object({
664
+ adapters: z.array(adapterDescriptorSchema)
665
+ });
666
+ const metadataFacetOptionSchema = z.object({
667
+ value: z.union([z.string(), z.number(), z.boolean()]),
668
+ label: z.string()
669
+ });
670
+ const searchFacetSchema = z.object({
671
+ key: z.string(),
672
+ label: z.string(),
673
+ description: z.string().optional(),
674
+ type: z.enum(["string", "boolean", "number"]),
675
+ adapters: z.array(z.string()).optional(),
676
+ options: z.array(metadataFacetOptionSchema).optional()
677
+ });
678
+ const searchFacetsResponseSchema = z.object({
679
+ facets: z.array(searchFacetSchema)
680
+ });
54
681
  export {
55
- base58Decode,
56
- base58Encode,
57
- multibaseB58btcDecode
682
+ adapterChatProfileSchema,
683
+ adapterDescriptorSchema,
684
+ adapterDetailsResponseSchema,
685
+ adaptersResponseSchema,
686
+ additionalRegistryCatalogResponseSchema,
687
+ chatHistoryCompactionResponseSchema,
688
+ chatHistorySnapshotResponseSchema,
689
+ createSessionResponseSchema,
690
+ creditPurchaseResponseSchema,
691
+ dashboardStatsResponseSchema,
692
+ detectProtocolResponseSchema,
693
+ encryptionHandshakeResponseSchema,
694
+ ledgerChallengeResponseSchema,
695
+ ledgerVerifyResponseSchema,
696
+ metricsSummaryResponseSchema,
697
+ popularResponseSchema,
698
+ protocolsResponseSchema,
699
+ registerAgentResponseSchema,
700
+ registerEncryptionKeyResponseSchema,
701
+ registrationProgressResponseSchema,
702
+ registrationQuoteResponseSchema,
703
+ registriesResponseSchema,
704
+ registrySearchByNamespaceSchema,
705
+ resolveResponseSchema,
706
+ searchFacetsResponseSchema,
707
+ searchResponseSchema,
708
+ sendMessageResponseSchema,
709
+ sessionEncryptionStatusResponseSchema,
710
+ statsResponseSchema,
711
+ uaidConnectionStatusSchema,
712
+ uaidValidationResponseSchema,
713
+ vectorSearchResponseSchema,
714
+ websocketStatsResponseSchema,
715
+ x402CreditPurchaseResponseSchema,
716
+ x402MinimumsResponseSchema
58
717
  };
59
718
  //# sourceMappingURL=standards-sdk.es137.js.map