@hashgraphonline/standards-sdk 0.1.136-feat-encrypted-chat.canary.1c46218.30 → 0.1.137

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 (40) hide show
  1. package/dist/es/standards-sdk.es103.js +1 -1
  2. package/dist/es/standards-sdk.es104.js +5 -5
  3. package/dist/es/standards-sdk.es114.js +1 -1
  4. package/dist/es/standards-sdk.es115.js +1 -1
  5. package/dist/es/standards-sdk.es116.js +5 -5
  6. package/dist/es/standards-sdk.es121.js +1 -1
  7. package/dist/es/standards-sdk.es131.js +17 -694
  8. package/dist/es/standards-sdk.es131.js.map +1 -1
  9. package/dist/es/standards-sdk.es133.js +694 -56
  10. package/dist/es/standards-sdk.es133.js.map +1 -1
  11. package/dist/es/standards-sdk.es134.js +161 -53
  12. package/dist/es/standards-sdk.es134.js.map +1 -1
  13. package/dist/es/standards-sdk.es135.js +318 -13
  14. package/dist/es/standards-sdk.es135.js.map +1 -1
  15. package/dist/es/standards-sdk.es136.js +294 -120
  16. package/dist/es/standards-sdk.es136.js.map +1 -1
  17. package/dist/es/standards-sdk.es137.js +322 -191
  18. package/dist/es/standards-sdk.es137.js.map +1 -1
  19. package/dist/es/standards-sdk.es138.js +279 -294
  20. package/dist/es/standards-sdk.es138.js.map +1 -1
  21. package/dist/es/standards-sdk.es139.js +63 -440
  22. package/dist/es/standards-sdk.es139.js.map +1 -1
  23. package/dist/es/standards-sdk.es140.js +55 -330
  24. package/dist/es/standards-sdk.es140.js.map +1 -1
  25. package/dist/es/standards-sdk.es141.js +50 -62
  26. package/dist/es/standards-sdk.es141.js.map +1 -1
  27. package/dist/es/standards-sdk.es17.js +1 -1
  28. package/dist/es/standards-sdk.es19.js +1 -1
  29. package/dist/es/standards-sdk.es20.js +1 -1
  30. package/dist/es/standards-sdk.es28.js +1 -1
  31. package/dist/es/standards-sdk.es36.js +1 -1
  32. package/dist/es/standards-sdk.es57.js +1 -1
  33. package/dist/es/standards-sdk.es59.js +1 -1
  34. package/dist/es/standards-sdk.es60.js +1 -1
  35. package/dist/es/standards-sdk.es61.js +1 -1
  36. package/dist/es/standards-sdk.es63.js +1 -1
  37. package/dist/es/standards-sdk.es65.js +1 -1
  38. package/dist/es/standards-sdk.es66.js +1 -1
  39. package/dist/es/standards-sdk.es78.js +1 -1
  40. package/package.json +59 -61
@@ -1,697 +1,20 @@
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
- });
1
+ import { Logger } from "./standards-sdk.es99.js";
2
+ import { HederaMirrorNode } from "./standards-sdk.es120.js";
3
+ class HCS5BaseClient {
4
+ /**
5
+ * Create a new HCS-5 base client
6
+ */
7
+ constructor(config) {
8
+ this.network = config.network;
9
+ this.logger = config.logger || Logger.getInstance({
10
+ level: config.logLevel || "info",
11
+ module: "HCS5Client",
12
+ silent: config.silent
13
+ });
14
+ this.mirrorNode = new HederaMirrorNode(this.network, this.logger);
15
+ }
16
+ }
660
17
  export {
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
18
+ HCS5BaseClient
696
19
  };
697
20
  //# sourceMappingURL=standards-sdk.es131.js.map