@hashgraphonline/standards-sdk 0.1.138 → 0.1.139

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