@hol-org/rb-client 0.1.176 → 0.1.177
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +342 -282
- package/dist/index.d.cts +6827 -24027
- package/dist/index.d.ts +6827 -24027
- package/dist/index.js +342 -282
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -297,13 +297,6 @@ var metadataFacetSchema = import_zod2.z.record(
|
|
|
297
297
|
jsonValueSchema
|
|
298
298
|
])
|
|
299
299
|
).optional();
|
|
300
|
-
var searchHitMetadataSchema = import_zod2.z.object({
|
|
301
|
-
delegationRoles: jsonValueSchema.optional(),
|
|
302
|
-
delegationTaskTags: jsonValueSchema.optional(),
|
|
303
|
-
delegationProtocols: jsonValueSchema.optional(),
|
|
304
|
-
delegationSummary: jsonValueSchema.optional(),
|
|
305
|
-
delegationSignals: jsonValueSchema.optional()
|
|
306
|
-
}).passthrough();
|
|
307
300
|
var searchHitSchema = import_zod2.z.object({
|
|
308
301
|
id: import_zod2.z.string(),
|
|
309
302
|
uaid: import_zod2.z.string(),
|
|
@@ -312,7 +305,7 @@ var searchHitSchema = import_zod2.z.object({
|
|
|
312
305
|
description: import_zod2.z.string().optional(),
|
|
313
306
|
capabilities: import_zod2.z.array(capabilityValueSchema),
|
|
314
307
|
endpoints: import_zod2.z.union([import_zod2.z.record(jsonValueSchema), import_zod2.z.array(import_zod2.z.string())]).optional(),
|
|
315
|
-
metadata:
|
|
308
|
+
metadata: import_zod2.z.record(jsonValueSchema).optional(),
|
|
316
309
|
metadataFacet: metadataFacetSchema,
|
|
317
310
|
profile: agentProfileSchema.optional(),
|
|
318
311
|
protocols: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
@@ -358,22 +351,13 @@ var resolveResponseSchema = import_zod2.z.object({
|
|
|
358
351
|
});
|
|
359
352
|
var delegationPlanCandidateSchema = import_zod2.z.object({
|
|
360
353
|
uaid: import_zod2.z.string(),
|
|
361
|
-
label: import_zod2.z.string(),
|
|
362
|
-
registry: import_zod2.z.string().optional(),
|
|
363
|
-
agent: searchHitSchema,
|
|
364
354
|
score: import_zod2.z.number(),
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
matchedTaskTags: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
372
|
-
reasons: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
373
|
-
suggestedMessage: import_zod2.z.string().optional(),
|
|
374
|
-
trustScore: import_zod2.z.number().optional(),
|
|
375
|
-
verified: import_zod2.z.boolean().optional(),
|
|
376
|
-
communicationSupported: import_zod2.z.boolean().optional(),
|
|
355
|
+
displayName: import_zod2.z.string().optional(),
|
|
356
|
+
summary: import_zod2.z.string().optional(),
|
|
357
|
+
protocols: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
358
|
+
surfaces: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
359
|
+
languages: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
360
|
+
artifacts: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
377
361
|
availability: import_zod2.z.boolean().optional(),
|
|
378
362
|
explanation: import_zod2.z.string().optional()
|
|
379
363
|
}).passthrough();
|
|
@@ -1291,14 +1275,6 @@ var skillRegistryListResponseSchema = import_zod2.z.object({
|
|
|
1291
1275
|
items: import_zod2.z.array(skillRegistryPublishSummarySchema),
|
|
1292
1276
|
nextCursor: import_zod2.z.string().nullable()
|
|
1293
1277
|
}).passthrough();
|
|
1294
|
-
var skillSecurityBreakdownResponseSchema = import_zod2.z.object({
|
|
1295
|
-
name: import_zod2.z.string(),
|
|
1296
|
-
version: import_zod2.z.string(),
|
|
1297
|
-
jobId: import_zod2.z.string(),
|
|
1298
|
-
createdAt: import_zod2.z.string(),
|
|
1299
|
-
safety: skillSafetySummarySchema.nullable(),
|
|
1300
|
-
findings: import_zod2.z.array(skillSafetyFindingSchema)
|
|
1301
|
-
}).passthrough();
|
|
1302
1278
|
var skillCatalogChannelSchema = import_zod2.z.enum([
|
|
1303
1279
|
"stable",
|
|
1304
1280
|
"prerelease",
|
|
@@ -1352,58 +1328,188 @@ var skillDeprecationsResponseSchema = import_zod2.z.object({
|
|
|
1352
1328
|
name: import_zod2.z.string(),
|
|
1353
1329
|
items: import_zod2.z.array(skillDeprecationRecordSchema)
|
|
1354
1330
|
}).passthrough();
|
|
1355
|
-
var
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1331
|
+
var skillSecurityBreakdownResponseSchema = import_zod2.z.object({
|
|
1332
|
+
jobId: import_zod2.z.string(),
|
|
1333
|
+
score: import_zod2.z.number().nullable().optional(),
|
|
1334
|
+
findings: import_zod2.z.array(import_zod2.z.unknown()).optional(),
|
|
1335
|
+
summary: import_zod2.z.unknown().optional(),
|
|
1336
|
+
generatedAt: import_zod2.z.string().nullable().optional(),
|
|
1337
|
+
scannerVersion: import_zod2.z.string().nullable().optional()
|
|
1361
1338
|
}).passthrough();
|
|
1362
|
-
var
|
|
1363
|
-
|
|
1339
|
+
var skillBadgeMetricSchema = import_zod2.z.enum([
|
|
1340
|
+
"version",
|
|
1341
|
+
"version_verification",
|
|
1342
|
+
"status",
|
|
1343
|
+
"verification",
|
|
1344
|
+
"repo_commit",
|
|
1345
|
+
"manifest",
|
|
1346
|
+
"domain",
|
|
1347
|
+
"trust",
|
|
1348
|
+
"tier",
|
|
1349
|
+
"safety",
|
|
1350
|
+
"upvotes",
|
|
1351
|
+
"updated"
|
|
1352
|
+
]);
|
|
1353
|
+
var skillBadgeStyleSchema = import_zod2.z.enum([
|
|
1354
|
+
"flat",
|
|
1355
|
+
"flat-square",
|
|
1356
|
+
"for-the-badge",
|
|
1357
|
+
"plastic",
|
|
1358
|
+
"social"
|
|
1359
|
+
]);
|
|
1360
|
+
var skillBadgeResponseSchema = import_zod2.z.object({
|
|
1361
|
+
schemaVersion: import_zod2.z.number().int(),
|
|
1364
1362
|
label: import_zod2.z.string(),
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1363
|
+
message: import_zod2.z.string(),
|
|
1364
|
+
color: import_zod2.z.string(),
|
|
1365
|
+
style: skillBadgeStyleSchema.optional(),
|
|
1366
|
+
isError: import_zod2.z.boolean().optional(),
|
|
1367
|
+
cacheSeconds: import_zod2.z.number().int().optional()
|
|
1368
|
+
}).passthrough();
|
|
1369
|
+
var skillRegistryTagsResponseSchema = import_zod2.z.object({
|
|
1370
|
+
tags: import_zod2.z.array(import_zod2.z.string())
|
|
1371
|
+
}).passthrough();
|
|
1372
|
+
var skillRegistryCategoriesResponseSchema = import_zod2.z.object({
|
|
1373
|
+
categories: import_zod2.z.array(import_zod2.z.string())
|
|
1374
|
+
}).passthrough();
|
|
1375
|
+
var skillResolverManifestResponseSchema = import_zod2.z.record(jsonValueSchema);
|
|
1376
|
+
var skillRegistryQuoteFileBreakdownSchema = import_zod2.z.object({
|
|
1377
|
+
name: import_zod2.z.string(),
|
|
1378
|
+
mimeType: import_zod2.z.string(),
|
|
1379
|
+
estimatedCostHbar: import_zod2.z.number()
|
|
1380
|
+
}).passthrough();
|
|
1381
|
+
var skillRegistryQuoteResponseSchema = import_zod2.z.object({
|
|
1382
|
+
quoteId: import_zod2.z.string(),
|
|
1383
|
+
name: import_zod2.z.string(),
|
|
1384
|
+
version: import_zod2.z.string(),
|
|
1385
|
+
directoryTopicId: import_zod2.z.string(),
|
|
1386
|
+
estimatedCostHbar: import_zod2.z.number(),
|
|
1387
|
+
credits: import_zod2.z.number(),
|
|
1388
|
+
usdCents: import_zod2.z.number(),
|
|
1389
|
+
expiresAt: import_zod2.z.string(),
|
|
1390
|
+
files: import_zod2.z.array(skillRegistryQuoteFileBreakdownSchema)
|
|
1391
|
+
}).passthrough();
|
|
1392
|
+
var skillRegistryJobStatusSchema = import_zod2.z.union([
|
|
1393
|
+
import_zod2.z.literal("pending"),
|
|
1394
|
+
import_zod2.z.literal("in_progress"),
|
|
1395
|
+
import_zod2.z.literal("completed"),
|
|
1396
|
+
import_zod2.z.literal("failed")
|
|
1397
|
+
]);
|
|
1398
|
+
var skillRegistryPublishResponseSchema = import_zod2.z.object({
|
|
1399
|
+
jobId: import_zod2.z.string(),
|
|
1400
|
+
status: skillRegistryJobStatusSchema,
|
|
1401
|
+
credits: import_zod2.z.number().nullable().optional(),
|
|
1402
|
+
usdCents: import_zod2.z.number().nullable().optional(),
|
|
1403
|
+
quoteId: import_zod2.z.string().nullable().optional(),
|
|
1404
|
+
createdAt: import_zod2.z.string(),
|
|
1405
|
+
updatedAt: import_zod2.z.string(),
|
|
1406
|
+
network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")])
|
|
1368
1407
|
}).passthrough();
|
|
1369
|
-
var
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1408
|
+
var skillRegistryJobStatusResponseSchema = import_zod2.z.object({
|
|
1409
|
+
jobId: import_zod2.z.string(),
|
|
1410
|
+
status: skillRegistryJobStatusSchema,
|
|
1411
|
+
network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")]),
|
|
1412
|
+
name: import_zod2.z.string(),
|
|
1413
|
+
version: import_zod2.z.string(),
|
|
1414
|
+
directoryTopicId: import_zod2.z.string(),
|
|
1415
|
+
skillUid: import_zod2.z.number().int().nullable().optional(),
|
|
1416
|
+
directorySequenceNumber: import_zod2.z.number().int().nullable().optional(),
|
|
1417
|
+
versionRegistryTopicId: import_zod2.z.string().nullable().optional(),
|
|
1418
|
+
packageTopicId: import_zod2.z.string().nullable().optional(),
|
|
1419
|
+
manifestHrl: import_zod2.z.string().nullable().optional(),
|
|
1420
|
+
skillJsonHrl: import_zod2.z.string().nullable().optional(),
|
|
1421
|
+
iconHcs1: import_zod2.z.string().nullable().optional(),
|
|
1422
|
+
tags: import_zod2.z.array(import_zod2.z.string()).nullable().optional(),
|
|
1423
|
+
category: import_zod2.z.string().nullable().optional(),
|
|
1424
|
+
files: import_zod2.z.array(skillRegistryFileDescriptorSchema).nullable().optional(),
|
|
1425
|
+
quoteCredits: import_zod2.z.number().nullable().optional(),
|
|
1426
|
+
quoteUsdCents: import_zod2.z.number().nullable().optional(),
|
|
1427
|
+
safety: skillSafetySummarySchema.nullable().optional(),
|
|
1428
|
+
reservationId: import_zod2.z.string().nullable().optional(),
|
|
1429
|
+
totalCostHbar: import_zod2.z.number().nullable().optional(),
|
|
1430
|
+
totalCostCredits: import_zod2.z.number().nullable().optional(),
|
|
1431
|
+
failureReason: import_zod2.z.string().nullable().optional(),
|
|
1432
|
+
createdAt: import_zod2.z.string(),
|
|
1433
|
+
updatedAt: import_zod2.z.string()
|
|
1434
|
+
}).passthrough();
|
|
1435
|
+
var skillRegistryVersionItemSchema = import_zod2.z.object({
|
|
1436
|
+
jobId: import_zod2.z.string(),
|
|
1437
|
+
version: import_zod2.z.string(),
|
|
1438
|
+
createdAt: import_zod2.z.string(),
|
|
1439
|
+
verified: import_zod2.z.boolean().optional()
|
|
1440
|
+
}).passthrough();
|
|
1441
|
+
var skillRegistryVersionsResponseSchema = import_zod2.z.object({
|
|
1442
|
+
name: import_zod2.z.string(),
|
|
1443
|
+
items: import_zod2.z.array(skillRegistryVersionItemSchema)
|
|
1444
|
+
}).passthrough();
|
|
1445
|
+
var skillRegistryMineItemSchema = import_zod2.z.object({
|
|
1446
|
+
name: import_zod2.z.string(),
|
|
1447
|
+
latestVersion: import_zod2.z.string(),
|
|
1448
|
+
latestCreatedAt: import_zod2.z.string(),
|
|
1449
|
+
verified: import_zod2.z.boolean().optional(),
|
|
1450
|
+
iconHcs1: import_zod2.z.string().optional(),
|
|
1451
|
+
versions: import_zod2.z.array(import_zod2.z.string())
|
|
1452
|
+
}).passthrough();
|
|
1453
|
+
var skillRegistryMineResponseSchema = import_zod2.z.object({
|
|
1454
|
+
items: import_zod2.z.array(skillRegistryMineItemSchema)
|
|
1455
|
+
}).passthrough();
|
|
1456
|
+
var skillRegistryMyListResponseSchema = import_zod2.z.object({
|
|
1457
|
+
owned: skillRegistryMineResponseSchema,
|
|
1458
|
+
upvoted: skillRegistryListResponseSchema
|
|
1459
|
+
}).passthrough();
|
|
1460
|
+
var skillRegistryConfigResponseSchema = import_zod2.z.object({
|
|
1461
|
+
enabled: import_zod2.z.boolean(),
|
|
1462
|
+
directoryTopicId: import_zod2.z.string().nullable().optional(),
|
|
1463
|
+
maxFiles: import_zod2.z.number().int().nullable().optional(),
|
|
1464
|
+
maxTotalSizeBytes: import_zod2.z.number().int().nullable().optional(),
|
|
1465
|
+
allowedMimeTypes: import_zod2.z.array(import_zod2.z.string()).nullable().optional(),
|
|
1466
|
+
network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")]).nullable().optional(),
|
|
1467
|
+
publisher: import_zod2.z.object({
|
|
1468
|
+
cliPackageUrl: import_zod2.z.string(),
|
|
1469
|
+
cliCommand: import_zod2.z.string(),
|
|
1470
|
+
actionMarketplaceUrl: import_zod2.z.string(),
|
|
1471
|
+
repositoryUrl: import_zod2.z.string(),
|
|
1472
|
+
guideUrl: import_zod2.z.string().nullable().optional(),
|
|
1473
|
+
docsUrl: import_zod2.z.string().nullable().optional(),
|
|
1474
|
+
submitUrl: import_zod2.z.string().nullable().optional(),
|
|
1475
|
+
skillsIndexUrl: import_zod2.z.string().nullable().optional(),
|
|
1476
|
+
quickstartCommands: import_zod2.z.array(
|
|
1477
|
+
import_zod2.z.object({
|
|
1478
|
+
id: import_zod2.z.string(),
|
|
1479
|
+
label: import_zod2.z.string(),
|
|
1480
|
+
description: import_zod2.z.string(),
|
|
1481
|
+
command: import_zod2.z.string(),
|
|
1482
|
+
href: import_zod2.z.string().nullable().optional()
|
|
1483
|
+
}).passthrough()
|
|
1484
|
+
).optional().default([]),
|
|
1485
|
+
templatePresets: import_zod2.z.array(
|
|
1486
|
+
import_zod2.z.object({
|
|
1487
|
+
presetId: import_zod2.z.string(),
|
|
1488
|
+
label: import_zod2.z.string(),
|
|
1489
|
+
description: import_zod2.z.string(),
|
|
1490
|
+
recommendedFor: import_zod2.z.string(),
|
|
1491
|
+
command: import_zod2.z.string()
|
|
1492
|
+
}).passthrough()
|
|
1493
|
+
).optional().default([])
|
|
1494
|
+
}).nullable().optional()
|
|
1495
|
+
}).passthrough();
|
|
1496
|
+
var skillRegistryOwnershipResponseSchema = import_zod2.z.object({
|
|
1497
|
+
name: import_zod2.z.string(),
|
|
1498
|
+
exists: import_zod2.z.boolean(),
|
|
1499
|
+
isOwner: import_zod2.z.boolean()
|
|
1500
|
+
}).passthrough();
|
|
1501
|
+
var skillRegistryVoteStatusResponseSchema = import_zod2.z.object({
|
|
1502
|
+
name: import_zod2.z.string(),
|
|
1503
|
+
upvotes: import_zod2.z.number().int(),
|
|
1504
|
+
hasUpvoted: import_zod2.z.boolean()
|
|
1380
1505
|
}).passthrough();
|
|
1381
1506
|
var skillTrustTierSchema = import_zod2.z.enum([
|
|
1382
|
-
"unpublished",
|
|
1383
1507
|
"unclaimed",
|
|
1384
1508
|
"validated",
|
|
1385
1509
|
"published",
|
|
1386
1510
|
"verified",
|
|
1387
1511
|
"hardened"
|
|
1388
1512
|
]);
|
|
1389
|
-
var skillStatusDefaultVerificationSignals = {
|
|
1390
|
-
publisherBound: false,
|
|
1391
|
-
domainProof: false,
|
|
1392
|
-
verifiedDomain: false,
|
|
1393
|
-
previewValidated: false
|
|
1394
|
-
};
|
|
1395
|
-
var skillStatusDefaultProvenanceSignals = {
|
|
1396
|
-
repoCommitIntegrity: false,
|
|
1397
|
-
manifestIntegrity: false,
|
|
1398
|
-
canonicalRelease: false,
|
|
1399
|
-
previewAvailable: false,
|
|
1400
|
-
previewAuthoritative: false
|
|
1401
|
-
};
|
|
1402
|
-
var skillStatusChecksSchema = import_zod2.z.object({
|
|
1403
|
-
repoCommitIntegrity: import_zod2.z.boolean(),
|
|
1404
|
-
manifestIntegrity: import_zod2.z.boolean(),
|
|
1405
|
-
domainProof: import_zod2.z.boolean()
|
|
1406
|
-
}).passthrough();
|
|
1407
1513
|
var skillStatusNextStepSchema = import_zod2.z.object({
|
|
1408
1514
|
kind: import_zod2.z.enum([
|
|
1409
1515
|
"setup_validate",
|
|
@@ -1411,8 +1517,8 @@ var skillStatusNextStepSchema = import_zod2.z.object({
|
|
|
1411
1517
|
"verify_domain",
|
|
1412
1518
|
"harden_workflow",
|
|
1413
1519
|
"share_status"
|
|
1414
|
-
])
|
|
1415
|
-
priority: import_zod2.z.number().int()
|
|
1520
|
+
]),
|
|
1521
|
+
priority: import_zod2.z.number().int(),
|
|
1416
1522
|
id: import_zod2.z.string(),
|
|
1417
1523
|
label: import_zod2.z.string(),
|
|
1418
1524
|
description: import_zod2.z.string(),
|
|
@@ -1478,6 +1584,11 @@ var skillStatusPreviewMetadataSchema = import_zod2.z.object({
|
|
|
1478
1584
|
expiresAt: import_zod2.z.string(),
|
|
1479
1585
|
statusUrl: import_zod2.z.string()
|
|
1480
1586
|
}).passthrough();
|
|
1587
|
+
var skillStatusChecksSchema = import_zod2.z.object({
|
|
1588
|
+
repoCommitIntegrity: import_zod2.z.boolean(),
|
|
1589
|
+
manifestIntegrity: import_zod2.z.boolean(),
|
|
1590
|
+
domainProof: import_zod2.z.boolean()
|
|
1591
|
+
}).passthrough();
|
|
1481
1592
|
var skillStatusVerificationSignalsSchema = import_zod2.z.object({
|
|
1482
1593
|
publisherBound: import_zod2.z.boolean(),
|
|
1483
1594
|
domainProof: import_zod2.z.boolean(),
|
|
@@ -1491,20 +1602,6 @@ var skillStatusProvenanceSignalsSchema = import_zod2.z.object({
|
|
|
1491
1602
|
previewAvailable: import_zod2.z.boolean(),
|
|
1492
1603
|
previewAuthoritative: import_zod2.z.boolean()
|
|
1493
1604
|
}).passthrough();
|
|
1494
|
-
var skillBadgeMetricSchema = import_zod2.z.enum([
|
|
1495
|
-
"version",
|
|
1496
|
-
"version_verification",
|
|
1497
|
-
"status",
|
|
1498
|
-
"verification",
|
|
1499
|
-
"repo_commit",
|
|
1500
|
-
"manifest",
|
|
1501
|
-
"domain",
|
|
1502
|
-
"trust",
|
|
1503
|
-
"tier",
|
|
1504
|
-
"safety",
|
|
1505
|
-
"upvotes",
|
|
1506
|
-
"updated"
|
|
1507
|
-
]);
|
|
1508
1605
|
var skillStatusResponseSchema = import_zod2.z.object({
|
|
1509
1606
|
name: import_zod2.z.string(),
|
|
1510
1607
|
version: import_zod2.z.string().nullable(),
|
|
@@ -1514,16 +1611,44 @@ var skillStatusResponseSchema = import_zod2.z.object({
|
|
|
1514
1611
|
badgeMetric: skillBadgeMetricSchema,
|
|
1515
1612
|
checks: skillStatusChecksSchema,
|
|
1516
1613
|
nextSteps: import_zod2.z.array(skillStatusNextStepSchema),
|
|
1517
|
-
verificationSignals: skillStatusVerificationSignalsSchema
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
provenanceSignals: skillStatusProvenanceSignalsSchema.default(
|
|
1521
|
-
skillStatusDefaultProvenanceSignals
|
|
1522
|
-
),
|
|
1523
|
-
publisher: skillPublisherMetadataSchema.nullable().optional(),
|
|
1614
|
+
verificationSignals: skillStatusVerificationSignalsSchema,
|
|
1615
|
+
provenanceSignals: skillStatusProvenanceSignalsSchema,
|
|
1616
|
+
publisher: skillRegistryConfigResponseSchema.shape.publisher,
|
|
1524
1617
|
preview: skillStatusPreviewMetadataSchema.nullable().optional(),
|
|
1525
1618
|
statusUrl: import_zod2.z.string().nullable().optional()
|
|
1526
1619
|
}).passthrough();
|
|
1620
|
+
var skillQuotePreviewRangeSchema = import_zod2.z.object({
|
|
1621
|
+
min: import_zod2.z.number(),
|
|
1622
|
+
max: import_zod2.z.number()
|
|
1623
|
+
}).passthrough();
|
|
1624
|
+
var skillQuotePreviewResponseSchema = import_zod2.z.object({
|
|
1625
|
+
estimatedCredits: skillQuotePreviewRangeSchema,
|
|
1626
|
+
estimatedHbar: skillQuotePreviewRangeSchema,
|
|
1627
|
+
pricingVersion: import_zod2.z.string(),
|
|
1628
|
+
assumptions: import_zod2.z.array(import_zod2.z.string()),
|
|
1629
|
+
purchaseUrl: import_zod2.z.string().nullable(),
|
|
1630
|
+
publishUrl: import_zod2.z.string().nullable(),
|
|
1631
|
+
verificationUrl: import_zod2.z.string().nullable()
|
|
1632
|
+
}).passthrough();
|
|
1633
|
+
var skillConversionSignalsResponseSchema = import_zod2.z.object({
|
|
1634
|
+
repoUrl: import_zod2.z.string(),
|
|
1635
|
+
skillDir: import_zod2.z.string(),
|
|
1636
|
+
trustTier: skillTrustTierSchema,
|
|
1637
|
+
actionInstalled: import_zod2.z.boolean(),
|
|
1638
|
+
previewUploaded: import_zod2.z.boolean(),
|
|
1639
|
+
previewId: import_zod2.z.string().nullable(),
|
|
1640
|
+
lastValidateSuccessAt: import_zod2.z.string().nullable(),
|
|
1641
|
+
stalePreviewAgeDays: import_zod2.z.number().nullable(),
|
|
1642
|
+
published: import_zod2.z.boolean(),
|
|
1643
|
+
verified: import_zod2.z.boolean(),
|
|
1644
|
+
publishReady: import_zod2.z.boolean(),
|
|
1645
|
+
publishBlockedByMissingAuth: import_zod2.z.boolean(),
|
|
1646
|
+
statusUrl: import_zod2.z.string().nullable(),
|
|
1647
|
+
purchaseUrl: import_zod2.z.string().nullable(),
|
|
1648
|
+
publishUrl: import_zod2.z.string().nullable(),
|
|
1649
|
+
verificationUrl: import_zod2.z.string().nullable(),
|
|
1650
|
+
nextSteps: import_zod2.z.array(skillStatusNextStepSchema)
|
|
1651
|
+
}).passthrough();
|
|
1527
1652
|
var skillInstallArtifactDescriptorSchema = import_zod2.z.object({
|
|
1528
1653
|
url: import_zod2.z.string(),
|
|
1529
1654
|
pointer: import_zod2.z.string().nullable(),
|
|
@@ -1574,132 +1699,6 @@ var skillInstallResponseSchema = import_zod2.z.object({
|
|
|
1574
1699
|
var skillInstallCopyTelemetryResponseSchema = import_zod2.z.object({
|
|
1575
1700
|
accepted: import_zod2.z.boolean()
|
|
1576
1701
|
}).passthrough();
|
|
1577
|
-
var skillBadgeStyleSchema = import_zod2.z.enum([
|
|
1578
|
-
"flat",
|
|
1579
|
-
"flat-square",
|
|
1580
|
-
"for-the-badge",
|
|
1581
|
-
"plastic",
|
|
1582
|
-
"social"
|
|
1583
|
-
]);
|
|
1584
|
-
var skillBadgeResponseSchema = import_zod2.z.object({
|
|
1585
|
-
schemaVersion: import_zod2.z.number().int(),
|
|
1586
|
-
label: import_zod2.z.string(),
|
|
1587
|
-
message: import_zod2.z.string(),
|
|
1588
|
-
color: import_zod2.z.string(),
|
|
1589
|
-
style: skillBadgeStyleSchema.optional(),
|
|
1590
|
-
isError: import_zod2.z.boolean().optional(),
|
|
1591
|
-
cacheSeconds: import_zod2.z.number().int().optional()
|
|
1592
|
-
}).passthrough();
|
|
1593
|
-
var skillRegistryTagsResponseSchema = import_zod2.z.object({
|
|
1594
|
-
tags: import_zod2.z.array(import_zod2.z.string())
|
|
1595
|
-
}).passthrough();
|
|
1596
|
-
var skillRegistryCategoriesResponseSchema = import_zod2.z.object({
|
|
1597
|
-
categories: import_zod2.z.array(import_zod2.z.string())
|
|
1598
|
-
}).passthrough();
|
|
1599
|
-
var skillResolverManifestResponseSchema = import_zod2.z.record(jsonValueSchema);
|
|
1600
|
-
var skillRegistryQuoteFileBreakdownSchema = import_zod2.z.object({
|
|
1601
|
-
name: import_zod2.z.string(),
|
|
1602
|
-
mimeType: import_zod2.z.string(),
|
|
1603
|
-
estimatedCostHbar: import_zod2.z.number()
|
|
1604
|
-
}).passthrough();
|
|
1605
|
-
var skillRegistryQuoteResponseSchema = import_zod2.z.object({
|
|
1606
|
-
quoteId: import_zod2.z.string(),
|
|
1607
|
-
name: import_zod2.z.string(),
|
|
1608
|
-
version: import_zod2.z.string(),
|
|
1609
|
-
directoryTopicId: import_zod2.z.string(),
|
|
1610
|
-
estimatedCostHbar: import_zod2.z.number(),
|
|
1611
|
-
credits: import_zod2.z.number(),
|
|
1612
|
-
usdCents: import_zod2.z.number(),
|
|
1613
|
-
expiresAt: import_zod2.z.string(),
|
|
1614
|
-
files: import_zod2.z.array(skillRegistryQuoteFileBreakdownSchema)
|
|
1615
|
-
}).passthrough();
|
|
1616
|
-
var skillRegistryJobStatusSchema = import_zod2.z.union([
|
|
1617
|
-
import_zod2.z.literal("pending"),
|
|
1618
|
-
import_zod2.z.literal("in_progress"),
|
|
1619
|
-
import_zod2.z.literal("completed"),
|
|
1620
|
-
import_zod2.z.literal("failed")
|
|
1621
|
-
]);
|
|
1622
|
-
var skillRegistryPublishResponseSchema = import_zod2.z.object({
|
|
1623
|
-
jobId: import_zod2.z.string(),
|
|
1624
|
-
status: skillRegistryJobStatusSchema,
|
|
1625
|
-
credits: import_zod2.z.number().nullable().optional(),
|
|
1626
|
-
usdCents: import_zod2.z.number().nullable().optional(),
|
|
1627
|
-
quoteId: import_zod2.z.string().nullable().optional(),
|
|
1628
|
-
createdAt: import_zod2.z.string(),
|
|
1629
|
-
updatedAt: import_zod2.z.string(),
|
|
1630
|
-
network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")])
|
|
1631
|
-
}).passthrough();
|
|
1632
|
-
var skillRegistryJobStatusResponseSchema = import_zod2.z.object({
|
|
1633
|
-
jobId: import_zod2.z.string(),
|
|
1634
|
-
status: skillRegistryJobStatusSchema,
|
|
1635
|
-
network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")]),
|
|
1636
|
-
name: import_zod2.z.string(),
|
|
1637
|
-
version: import_zod2.z.string(),
|
|
1638
|
-
directoryTopicId: import_zod2.z.string(),
|
|
1639
|
-
skillUid: import_zod2.z.number().int().nullable().optional(),
|
|
1640
|
-
directorySequenceNumber: import_zod2.z.number().int().nullable().optional(),
|
|
1641
|
-
versionRegistryTopicId: import_zod2.z.string().nullable().optional(),
|
|
1642
|
-
packageTopicId: import_zod2.z.string().nullable().optional(),
|
|
1643
|
-
manifestHrl: import_zod2.z.string().nullable().optional(),
|
|
1644
|
-
skillJsonHrl: import_zod2.z.string().nullable().optional(),
|
|
1645
|
-
iconHcs1: import_zod2.z.string().nullable().optional(),
|
|
1646
|
-
tags: import_zod2.z.array(import_zod2.z.string()).nullable().optional(),
|
|
1647
|
-
category: import_zod2.z.string().nullable().optional(),
|
|
1648
|
-
files: import_zod2.z.array(skillRegistryFileDescriptorSchema).nullable().optional(),
|
|
1649
|
-
quoteCredits: import_zod2.z.number().nullable().optional(),
|
|
1650
|
-
quoteUsdCents: import_zod2.z.number().nullable().optional(),
|
|
1651
|
-
safety: skillSafetySummarySchema.nullable().optional(),
|
|
1652
|
-
reservationId: import_zod2.z.string().nullable().optional(),
|
|
1653
|
-
totalCostHbar: import_zod2.z.number().nullable().optional(),
|
|
1654
|
-
totalCostCredits: import_zod2.z.number().nullable().optional(),
|
|
1655
|
-
failureReason: import_zod2.z.string().nullable().optional(),
|
|
1656
|
-
createdAt: import_zod2.z.string(),
|
|
1657
|
-
updatedAt: import_zod2.z.string()
|
|
1658
|
-
}).passthrough();
|
|
1659
|
-
var skillRegistryVersionItemSchema = import_zod2.z.object({
|
|
1660
|
-
jobId: import_zod2.z.string(),
|
|
1661
|
-
version: import_zod2.z.string(),
|
|
1662
|
-
createdAt: import_zod2.z.string(),
|
|
1663
|
-
verified: import_zod2.z.boolean().optional()
|
|
1664
|
-
}).passthrough();
|
|
1665
|
-
var skillRegistryVersionsResponseSchema = import_zod2.z.object({
|
|
1666
|
-
name: import_zod2.z.string(),
|
|
1667
|
-
items: import_zod2.z.array(skillRegistryVersionItemSchema)
|
|
1668
|
-
}).passthrough();
|
|
1669
|
-
var skillRegistryMineItemSchema = import_zod2.z.object({
|
|
1670
|
-
name: import_zod2.z.string(),
|
|
1671
|
-
latestVersion: import_zod2.z.string(),
|
|
1672
|
-
latestCreatedAt: import_zod2.z.string(),
|
|
1673
|
-
verified: import_zod2.z.boolean().optional(),
|
|
1674
|
-
iconHcs1: import_zod2.z.string().optional(),
|
|
1675
|
-
versions: import_zod2.z.array(import_zod2.z.string())
|
|
1676
|
-
}).passthrough();
|
|
1677
|
-
var skillRegistryMineResponseSchema = import_zod2.z.object({
|
|
1678
|
-
items: import_zod2.z.array(skillRegistryMineItemSchema)
|
|
1679
|
-
}).passthrough();
|
|
1680
|
-
var skillRegistryMyListResponseSchema = import_zod2.z.object({
|
|
1681
|
-
owned: skillRegistryMineResponseSchema,
|
|
1682
|
-
upvoted: skillRegistryListResponseSchema
|
|
1683
|
-
}).passthrough();
|
|
1684
|
-
var skillRegistryConfigResponseSchema = import_zod2.z.object({
|
|
1685
|
-
enabled: import_zod2.z.boolean(),
|
|
1686
|
-
directoryTopicId: import_zod2.z.string().nullable().optional(),
|
|
1687
|
-
maxFiles: import_zod2.z.number().int().nullable().optional(),
|
|
1688
|
-
maxTotalSizeBytes: import_zod2.z.number().int().nullable().optional(),
|
|
1689
|
-
allowedMimeTypes: import_zod2.z.array(import_zod2.z.string()).nullable().optional(),
|
|
1690
|
-
network: import_zod2.z.union([import_zod2.z.literal("mainnet"), import_zod2.z.literal("testnet")]).nullable().optional(),
|
|
1691
|
-
publisher: skillPublisherMetadataSchema.nullable().optional()
|
|
1692
|
-
}).passthrough();
|
|
1693
|
-
var skillRegistryOwnershipResponseSchema = import_zod2.z.object({
|
|
1694
|
-
name: import_zod2.z.string(),
|
|
1695
|
-
exists: import_zod2.z.boolean(),
|
|
1696
|
-
isOwner: import_zod2.z.boolean()
|
|
1697
|
-
}).passthrough();
|
|
1698
|
-
var skillRegistryVoteStatusResponseSchema = import_zod2.z.object({
|
|
1699
|
-
name: import_zod2.z.string(),
|
|
1700
|
-
upvotes: import_zod2.z.number().int(),
|
|
1701
|
-
hasUpvoted: import_zod2.z.boolean()
|
|
1702
|
-
}).passthrough();
|
|
1703
1702
|
var skillVerificationTierSchema = import_zod2.z.enum(["basic", "express"]);
|
|
1704
1703
|
var skillVerificationStatusSchema = import_zod2.z.enum([
|
|
1705
1704
|
"pending",
|
|
@@ -4308,57 +4307,6 @@ async function skillsConfig(client) {
|
|
|
4308
4307
|
"skill registry config response"
|
|
4309
4308
|
);
|
|
4310
4309
|
}
|
|
4311
|
-
async function getSkillStatus(client, params) {
|
|
4312
|
-
const normalizedName = params.name.trim();
|
|
4313
|
-
if (!normalizedName) {
|
|
4314
|
-
throw new Error("name is required");
|
|
4315
|
-
}
|
|
4316
|
-
const query = new URLSearchParams();
|
|
4317
|
-
query.set("name", normalizedName);
|
|
4318
|
-
if (params.version?.trim()) {
|
|
4319
|
-
query.set("version", params.version.trim());
|
|
4320
|
-
}
|
|
4321
|
-
const raw = await client.requestJson(
|
|
4322
|
-
`/skills/status?${query.toString()}`,
|
|
4323
|
-
{
|
|
4324
|
-
method: "GET"
|
|
4325
|
-
}
|
|
4326
|
-
);
|
|
4327
|
-
return client.parseWithSchema(
|
|
4328
|
-
raw,
|
|
4329
|
-
skillStatusResponseSchema,
|
|
4330
|
-
"skill status response"
|
|
4331
|
-
);
|
|
4332
|
-
}
|
|
4333
|
-
function buildRepoPreviewQuery(params) {
|
|
4334
|
-
const repo = params.repo.trim();
|
|
4335
|
-
const skillDir = params.skillDir.trim();
|
|
4336
|
-
if (!repo) {
|
|
4337
|
-
throw new Error("repo is required");
|
|
4338
|
-
}
|
|
4339
|
-
if (!skillDir) {
|
|
4340
|
-
throw new Error("skillDir is required");
|
|
4341
|
-
}
|
|
4342
|
-
const query = new URLSearchParams();
|
|
4343
|
-
query.set("repo", repo);
|
|
4344
|
-
query.set("skillDir", skillDir);
|
|
4345
|
-
if (params.ref?.trim()) {
|
|
4346
|
-
query.set("ref", params.ref.trim());
|
|
4347
|
-
}
|
|
4348
|
-
return query.toString();
|
|
4349
|
-
}
|
|
4350
|
-
async function getSkillStatusByRepo(client, params) {
|
|
4351
|
-
const query = buildRepoPreviewQuery(params);
|
|
4352
|
-
const raw = await client.requestJson(
|
|
4353
|
-
`/skills/status/by-repo?${query}`,
|
|
4354
|
-
{ method: "GET" }
|
|
4355
|
-
);
|
|
4356
|
-
return client.parseWithSchema(
|
|
4357
|
-
raw,
|
|
4358
|
-
skillStatusResponseSchema,
|
|
4359
|
-
"skill status response"
|
|
4360
|
-
);
|
|
4361
|
-
}
|
|
4362
4310
|
async function listSkills(client, params = {}) {
|
|
4363
4311
|
const query = new URLSearchParams();
|
|
4364
4312
|
if (params.name) {
|
|
@@ -4528,6 +4476,18 @@ async function quoteSkillPublish(client, payload) {
|
|
|
4528
4476
|
"skill registry quote response"
|
|
4529
4477
|
);
|
|
4530
4478
|
}
|
|
4479
|
+
async function quoteSkillPublishPreview(client, payload) {
|
|
4480
|
+
const raw = await client.requestJson("/skills/quote-preview", {
|
|
4481
|
+
method: "POST",
|
|
4482
|
+
body: payload,
|
|
4483
|
+
headers: { "content-type": "application/json" }
|
|
4484
|
+
});
|
|
4485
|
+
return client.parseWithSchema(
|
|
4486
|
+
raw,
|
|
4487
|
+
skillQuotePreviewResponseSchema,
|
|
4488
|
+
"skill quote preview response"
|
|
4489
|
+
);
|
|
4490
|
+
}
|
|
4531
4491
|
async function publishSkill(client, payload) {
|
|
4532
4492
|
const raw = await client.requestJson("/skills/publish", {
|
|
4533
4493
|
method: "POST",
|
|
@@ -4692,6 +4652,76 @@ async function getSkillBadge(client, params) {
|
|
|
4692
4652
|
"skill badge response"
|
|
4693
4653
|
);
|
|
4694
4654
|
}
|
|
4655
|
+
async function getSkillStatus(client, params) {
|
|
4656
|
+
const normalizedName = params.name.trim();
|
|
4657
|
+
if (!normalizedName) {
|
|
4658
|
+
throw new Error("name is required");
|
|
4659
|
+
}
|
|
4660
|
+
const query = new URLSearchParams();
|
|
4661
|
+
query.set("name", normalizedName);
|
|
4662
|
+
if (params.version?.trim()) {
|
|
4663
|
+
query.set("version", params.version.trim());
|
|
4664
|
+
}
|
|
4665
|
+
const raw = await client.requestJson(
|
|
4666
|
+
`/skills/status?${query.toString()}`,
|
|
4667
|
+
{ method: "GET" }
|
|
4668
|
+
);
|
|
4669
|
+
return client.parseWithSchema(
|
|
4670
|
+
raw,
|
|
4671
|
+
skillStatusResponseSchema,
|
|
4672
|
+
"skill status response"
|
|
4673
|
+
);
|
|
4674
|
+
}
|
|
4675
|
+
async function getSkillStatusByRepo(client, params) {
|
|
4676
|
+
const repo = params.repo.trim();
|
|
4677
|
+
const skillDir = params.skillDir.trim();
|
|
4678
|
+
if (!repo) {
|
|
4679
|
+
throw new Error("repo is required");
|
|
4680
|
+
}
|
|
4681
|
+
if (!skillDir) {
|
|
4682
|
+
throw new Error("skillDir is required");
|
|
4683
|
+
}
|
|
4684
|
+
const query = new URLSearchParams();
|
|
4685
|
+
query.set("repo", repo);
|
|
4686
|
+
query.set("skillDir", skillDir);
|
|
4687
|
+
if (params.ref?.trim()) {
|
|
4688
|
+
query.set("ref", params.ref.trim());
|
|
4689
|
+
}
|
|
4690
|
+
const raw = await client.requestJson(
|
|
4691
|
+
`/skills/status/by-repo?${query.toString()}`,
|
|
4692
|
+
{ method: "GET" }
|
|
4693
|
+
);
|
|
4694
|
+
return client.parseWithSchema(
|
|
4695
|
+
raw,
|
|
4696
|
+
skillStatusResponseSchema,
|
|
4697
|
+
"skill status response"
|
|
4698
|
+
);
|
|
4699
|
+
}
|
|
4700
|
+
async function getSkillConversionSignalsByRepo(client, params) {
|
|
4701
|
+
const repo = params.repo.trim();
|
|
4702
|
+
const skillDir = params.skillDir.trim();
|
|
4703
|
+
if (!repo) {
|
|
4704
|
+
throw new Error("repo is required");
|
|
4705
|
+
}
|
|
4706
|
+
if (!skillDir) {
|
|
4707
|
+
throw new Error("skillDir is required");
|
|
4708
|
+
}
|
|
4709
|
+
const query = new URLSearchParams();
|
|
4710
|
+
query.set("repo", repo);
|
|
4711
|
+
query.set("skillDir", skillDir);
|
|
4712
|
+
if (params.ref?.trim()) {
|
|
4713
|
+
query.set("ref", params.ref.trim());
|
|
4714
|
+
}
|
|
4715
|
+
const raw = await client.requestJson(
|
|
4716
|
+
`/skills/conversion-signals/by-repo?${query.toString()}`,
|
|
4717
|
+
{ method: "GET" }
|
|
4718
|
+
);
|
|
4719
|
+
return client.parseWithSchema(
|
|
4720
|
+
raw,
|
|
4721
|
+
skillConversionSignalsResponseSchema,
|
|
4722
|
+
"skill conversion signals response"
|
|
4723
|
+
);
|
|
4724
|
+
}
|
|
4695
4725
|
async function uploadSkillPreviewFromGithubOidc(client, payload) {
|
|
4696
4726
|
const token = payload.token.trim();
|
|
4697
4727
|
if (!token) {
|
|
@@ -4735,9 +4765,22 @@ async function getSkillPreview(client, params) {
|
|
|
4735
4765
|
);
|
|
4736
4766
|
}
|
|
4737
4767
|
async function getSkillPreviewByRepo(client, params) {
|
|
4738
|
-
const
|
|
4768
|
+
const repo = params.repo.trim();
|
|
4769
|
+
const skillDir = params.skillDir.trim();
|
|
4770
|
+
if (!repo) {
|
|
4771
|
+
throw new Error("repo is required");
|
|
4772
|
+
}
|
|
4773
|
+
if (!skillDir) {
|
|
4774
|
+
throw new Error("skillDir is required");
|
|
4775
|
+
}
|
|
4776
|
+
const query = new URLSearchParams();
|
|
4777
|
+
query.set("repo", repo);
|
|
4778
|
+
query.set("skillDir", skillDir);
|
|
4779
|
+
if (params.ref?.trim()) {
|
|
4780
|
+
query.set("ref", params.ref.trim());
|
|
4781
|
+
}
|
|
4739
4782
|
const raw = await client.requestJson(
|
|
4740
|
-
`/skills/preview/by-repo?${query}`,
|
|
4783
|
+
`/skills/preview/by-repo?${query.toString()}`,
|
|
4741
4784
|
{ method: "GET" }
|
|
4742
4785
|
);
|
|
4743
4786
|
return client.parseWithSchema(
|
|
@@ -5314,15 +5357,9 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
|
|
|
5314
5357
|
async skillsConfig() {
|
|
5315
5358
|
return skillsConfig(this);
|
|
5316
5359
|
}
|
|
5317
|
-
async getSkillStatus(params) {
|
|
5318
|
-
return getSkillStatus(this, params);
|
|
5319
|
-
}
|
|
5320
5360
|
async listSkills(options) {
|
|
5321
5361
|
return listSkills(this, options);
|
|
5322
5362
|
}
|
|
5323
|
-
async getSkillSecurityBreakdown(params) {
|
|
5324
|
-
return getSkillSecurityBreakdown(this, params);
|
|
5325
|
-
}
|
|
5326
5363
|
async getSkillsCatalog(options) {
|
|
5327
5364
|
return getSkillsCatalog(this, options);
|
|
5328
5365
|
}
|
|
@@ -5338,6 +5375,9 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
|
|
|
5338
5375
|
async quoteSkillPublish(payload) {
|
|
5339
5376
|
return quoteSkillPublish(this, payload);
|
|
5340
5377
|
}
|
|
5378
|
+
async quoteSkillPublishPreview(payload) {
|
|
5379
|
+
return quoteSkillPublishPreview(this, payload);
|
|
5380
|
+
}
|
|
5341
5381
|
async publishSkill(payload) {
|
|
5342
5382
|
return publishSkill(this, payload);
|
|
5343
5383
|
}
|
|
@@ -5362,9 +5402,18 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
|
|
|
5362
5402
|
async getSkillBadge(params) {
|
|
5363
5403
|
return getSkillBadge(this, params);
|
|
5364
5404
|
}
|
|
5405
|
+
async getSkillStatus(params) {
|
|
5406
|
+
return getSkillStatus(this, params);
|
|
5407
|
+
}
|
|
5408
|
+
async getSkillSecurityBreakdown(params) {
|
|
5409
|
+
return getSkillSecurityBreakdown(this, params);
|
|
5410
|
+
}
|
|
5365
5411
|
async getSkillStatusByRepo(params) {
|
|
5366
5412
|
return getSkillStatusByRepo(this, params);
|
|
5367
5413
|
}
|
|
5414
|
+
async getSkillConversionSignalsByRepo(params) {
|
|
5415
|
+
return getSkillConversionSignalsByRepo(this, params);
|
|
5416
|
+
}
|
|
5368
5417
|
async uploadSkillPreviewFromGithubOidc(payload) {
|
|
5369
5418
|
return uploadSkillPreviewFromGithubOidc(this, payload);
|
|
5370
5419
|
}
|
|
@@ -5764,9 +5813,20 @@ var RegistryBrokerClient = class _RegistryBrokerClient {
|
|
|
5764
5813
|
}
|
|
5765
5814
|
return nodeCrypto;
|
|
5766
5815
|
}
|
|
5816
|
+
getSecureRandomBytes(size, feature) {
|
|
5817
|
+
const webCrypto = globalThis.crypto;
|
|
5818
|
+
if (webCrypto && typeof webCrypto.getRandomValues === "function") {
|
|
5819
|
+
const bytes = new Uint8Array(size);
|
|
5820
|
+
webCrypto.getRandomValues(bytes);
|
|
5821
|
+
return bytes;
|
|
5822
|
+
}
|
|
5823
|
+
return this.getNodeCrypto(feature).randomBytes(size);
|
|
5824
|
+
}
|
|
5767
5825
|
createEphemeralKeyPair() {
|
|
5768
|
-
const
|
|
5769
|
-
|
|
5826
|
+
const privateKeyBytes = this.getSecureRandomBytes(
|
|
5827
|
+
32,
|
|
5828
|
+
"generateEphemeralKeyPair"
|
|
5829
|
+
);
|
|
5770
5830
|
const publicKey = import_secp256k12.secp256k1.getPublicKey(privateKeyBytes, true);
|
|
5771
5831
|
return {
|
|
5772
5832
|
privateKey: import_buffer4.Buffer.from(privateKeyBytes).toString("hex"),
|