@phala/cloud 0.3.0 → 0.4.0
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/actions/apps/get_app_attestation.d.ts +17 -7
- package/dist/actions/cvms/commit_cvm_provision.d.ts +6 -0
- package/dist/actions/cvms/get_cvm_compose_file.d.ts +156 -12
- package/dist/actions/cvms/get_cvm_list.d.ts +8 -10
- package/dist/actions/cvms/get_cvm_status_batch.d.ts +247 -24
- package/dist/actions/cvms/patch_cvm.d.ts +16 -0
- package/dist/actions/cvms/provision_cvm.d.ts +900 -51
- package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +215 -5
- package/dist/actions/cvms/update_cvm_envs.d.ts +16 -0
- package/dist/actions/cvms/update_cvm_resources.d.ts +24 -2
- package/dist/actions/cvms/update_cvm_visibility.d.ts +2 -0
- package/dist/actions/cvms/update_docker_compose.d.ts +31 -0
- package/dist/actions/cvms/update_prelaunch_script.d.ts +31 -0
- package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +16 -0
- package/dist/actions/get_available_nodes.d.ts +259 -0
- package/dist/actions/get_cvm_create_resources.d.ts +351 -0
- package/dist/actions/index.d.ts +6 -2
- package/dist/actions/kms/get_kms_contract.d.ts +59 -0
- package/dist/actions/kms/get_kms_list.d.ts +15 -0
- package/dist/actions/kms/get_kms_onchain_detail.d.ts +54 -0
- package/dist/actions/kms/list_kms_contract_nodes.d.ts +98 -0
- package/dist/actions/kms/list_kms_contracts.d.ts +152 -0
- package/dist/actions/workspaces/get_workspace.d.ts +4 -0
- package/dist/actions/workspaces/get_workspace_nodes.d.ts +161 -0
- package/dist/actions/workspaces/list_workspaces.d.ts +126 -0
- package/dist/client.d.ts +4 -1
- package/dist/create-client.d.ts +48 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1527 -1207
- package/dist/index.mjs +1452 -1151
- package/dist/types/app_compose.d.ts +50 -5
- package/dist/types/app_info_v20251028.d.ts +44 -0
- package/dist/types/app_info_v20260121.d.ts +2324 -0
- package/dist/types/client.d.ts +2 -2
- package/dist/types/cvm_info_v20251028.d.ts +23 -0
- package/dist/types/cvm_info_v20260121.d.ts +977 -0
- package/dist/types/kms_contract.d.ts +64 -0
- package/dist/types/kms_info.d.ts +8 -0
- package/dist/types/version-mappings.d.ts +6 -6
- package/dist/utils/error_codes.d.ts +1 -0
- package/dist/utils/errors.d.ts +30 -1
- package/dist/utils/get_compose_hash.d.ts +24 -0
- package/dist/utils/get_mr_config_id.d.ts +55 -0
- package/dist/utils/index.d.ts +3 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -80,6 +80,8 @@ __export(index_exports, {
|
|
|
80
80
|
CvmCreateResourceGraphV20260522Schema: () => CvmCreateResourceGraphV20260522Schema,
|
|
81
81
|
CvmDetailV20251028Schema: () => CvmDetailV20251028Schema,
|
|
82
82
|
CvmGatewayInfoV20260121Schema: () => CvmGatewayInfoV20260121Schema,
|
|
83
|
+
CvmGpuRentalOrderInfoV20260121Schema: () => CvmGpuRentalOrderInfoV20260121Schema,
|
|
84
|
+
CvmHourlyRateV20260121Schema: () => CvmHourlyRateV20260121Schema,
|
|
83
85
|
CvmIdBaseSchema: () => CvmIdBaseSchema,
|
|
84
86
|
CvmIdObjectSchema: () => CvmIdObjectSchema,
|
|
85
87
|
CvmIdSchema: () => CvmIdSchema,
|
|
@@ -98,6 +100,7 @@ __export(index_exports, {
|
|
|
98
100
|
CvmProgressInfoV20260121Schema: () => CvmProgressInfoV20260121Schema,
|
|
99
101
|
CvmRefSchema: () => CvmRefSchema,
|
|
100
102
|
CvmResourceInfoV20260121Schema: () => CvmResourceInfoV20260121Schema,
|
|
103
|
+
CvmResourceUsageSchema: () => CvmResourceUsageSchema,
|
|
101
104
|
CvmStateSchema: () => CvmStateSchema,
|
|
102
105
|
CvmStatusSchema: () => CvmStatusSchema,
|
|
103
106
|
CvmSystemInfoSchema: () => CvmSystemInfoSchema,
|
|
@@ -106,6 +109,7 @@ __export(index_exports, {
|
|
|
106
109
|
DeleteSshKeyRequestSchema: () => DeleteSshKeyRequestSchema,
|
|
107
110
|
DeployAppAuthRequestSchema: () => DeployAppAuthRequestSchema,
|
|
108
111
|
DeployAppAuthSchema: () => DeployAppAuthSchema,
|
|
112
|
+
DeviceIdEntrySchema: () => DeviceIdEntrySchema,
|
|
109
113
|
DstackAppFullResponseV20251028Schema: () => DstackAppFullResponseV20251028Schema,
|
|
110
114
|
DstackAppFullResponseV20260121Schema: () => DstackAppFullResponseV20260121Schema,
|
|
111
115
|
DstackAppFullResponseV20260522Schema: () => DstackAppFullResponseV20260522Schema,
|
|
@@ -144,6 +148,7 @@ __export(index_exports, {
|
|
|
144
148
|
GetCvmStatusBatchRequestSchema: () => GetCvmStatusBatchRequestSchema,
|
|
145
149
|
GetCvmStatusBatchResponseSchema: () => GetCvmStatusBatchResponseSchema,
|
|
146
150
|
GetCvmUserConfigRequestSchema: () => GetCvmUserConfigRequestSchema,
|
|
151
|
+
GetKmsContractRequestSchema: () => GetKmsContractRequestSchema,
|
|
147
152
|
GetKmsInfoRequestSchema: () => GetKmsInfoRequestSchema,
|
|
148
153
|
GetKmsListRequestSchema: () => GetKmsListRequestSchema,
|
|
149
154
|
GetKmsListSchema: () => GetKmsListSchema,
|
|
@@ -160,9 +165,15 @@ __export(index_exports, {
|
|
|
160
165
|
InstanceIdRefreshResultSchema: () => InstanceIdRefreshResultSchema,
|
|
161
166
|
InstanceTypeSchema: () => InstanceTypeSchema,
|
|
162
167
|
IsAllowedResultSchema: () => IsAllowedResultSchema,
|
|
168
|
+
KmsContractInfoSchema: () => KmsContractInfoSchema,
|
|
169
|
+
KmsContractNodeSchema: () => KmsContractNodeSchema,
|
|
163
170
|
KmsInfoSchema: () => KmsInfoSchema,
|
|
164
171
|
KmsTypeSchema: () => KmsTypeSchema,
|
|
165
172
|
ListFamilyInstanceTypesRequestSchema: () => ListFamilyInstanceTypesRequestSchema,
|
|
173
|
+
ListKmsContractNodesRequestSchema: () => ListKmsContractNodesRequestSchema,
|
|
174
|
+
ListKmsContractNodesSchema: () => ListKmsContractNodesSchema,
|
|
175
|
+
ListKmsContractsRequestSchema: () => ListKmsContractsRequestSchema,
|
|
176
|
+
ListKmsContractsSchema: () => ListKmsContractsSchema,
|
|
166
177
|
ListSshKeysResponseSchema: () => ListSshKeysResponseSchema,
|
|
167
178
|
ListWorkspacesSchema: () => ListWorkspacesSchema,
|
|
168
179
|
LooseAppComposeSchema: () => LooseAppComposeSchema,
|
|
@@ -281,6 +292,7 @@ __export(index_exports, {
|
|
|
281
292
|
extractNetworkClients: () => extractNetworkClients,
|
|
282
293
|
formatErrorMessage: () => formatErrorMessage,
|
|
283
294
|
formatStructuredError: () => formatStructuredError,
|
|
295
|
+
formatStructuredErrorDetailValue: () => formatStructuredErrorDetailValue,
|
|
284
296
|
formatValidationErrors: () => formatValidationErrors,
|
|
285
297
|
generateDefaultCvmName: () => generateDefaultCvmName,
|
|
286
298
|
generateFallbackHostname: () => generateFallbackHostname,
|
|
@@ -312,9 +324,12 @@ __export(index_exports, {
|
|
|
312
324
|
getCvmStatusBatch: () => getCvmStatusBatch,
|
|
313
325
|
getCvmUserConfig: () => getCvmUserConfig,
|
|
314
326
|
getErrorMessage: () => getErrorMessage,
|
|
327
|
+
getKmsContract: () => getKmsContract,
|
|
315
328
|
getKmsInfo: () => getKmsInfo,
|
|
316
329
|
getKmsList: () => getKmsList,
|
|
317
330
|
getKmsOnChainDetail: () => getKmsOnChainDetail,
|
|
331
|
+
getMrConfigId: () => getMrConfigId,
|
|
332
|
+
getMrConfigIdV1: () => getMrConfigIdV1,
|
|
318
333
|
getOsImages: () => getOsImages,
|
|
319
334
|
getPreLaunchScriptUpgradeStatus: () => getPreLaunchScriptUpgradeStatus,
|
|
320
335
|
getVMSchemaForVersion: () => getVMSchemaForVersion,
|
|
@@ -328,6 +343,8 @@ __export(index_exports, {
|
|
|
328
343
|
isValidHostname: () => isValidHostname,
|
|
329
344
|
listAllInstanceTypeFamilies: () => listAllInstanceTypeFamilies,
|
|
330
345
|
listFamilyInstanceTypes: () => listFamilyInstanceTypes,
|
|
346
|
+
listKmsContractNodes: () => listKmsContractNodes,
|
|
347
|
+
listKmsContracts: () => listKmsContracts,
|
|
331
348
|
listSshKeys: () => listSshKeys,
|
|
332
349
|
listWorkspaces: () => listWorkspaces,
|
|
333
350
|
nextAppIds: () => nextAppIds,
|
|
@@ -387,6 +404,7 @@ __export(index_exports, {
|
|
|
387
404
|
safeGetCvmStats: () => safeGetCvmStats,
|
|
388
405
|
safeGetCvmStatusBatch: () => safeGetCvmStatusBatch,
|
|
389
406
|
safeGetCvmUserConfig: () => safeGetCvmUserConfig,
|
|
407
|
+
safeGetKmsContract: () => safeGetKmsContract,
|
|
390
408
|
safeGetKmsInfo: () => safeGetKmsInfo,
|
|
391
409
|
safeGetKmsList: () => safeGetKmsList,
|
|
392
410
|
safeGetKmsOnChainDetail: () => safeGetKmsOnChainDetail,
|
|
@@ -398,6 +416,8 @@ __export(index_exports, {
|
|
|
398
416
|
safeImportGithubProfileSshKeys: () => safeImportGithubProfileSshKeys,
|
|
399
417
|
safeListAllInstanceTypeFamilies: () => safeListAllInstanceTypeFamilies,
|
|
400
418
|
safeListFamilyInstanceTypes: () => safeListFamilyInstanceTypes,
|
|
419
|
+
safeListKmsContractNodes: () => safeListKmsContractNodes,
|
|
420
|
+
safeListKmsContracts: () => safeListKmsContracts,
|
|
401
421
|
safeListSshKeys: () => safeListSshKeys,
|
|
402
422
|
safeListWorkspaces: () => safeListWorkspaces,
|
|
403
423
|
safeNextAppIds: () => safeNextAppIds,
|
|
@@ -440,6 +460,8 @@ __export(index_exports, {
|
|
|
440
460
|
validateComposePayloadSize: () => validateComposePayloadSize,
|
|
441
461
|
validateNetworkPrerequisites: () => validateNetworkPrerequisites,
|
|
442
462
|
verifyEnvEncryptPublicKey: () => import_verify_env_encrypt_public_key.verifyEnvEncryptPublicKey,
|
|
463
|
+
verifyEnvEncryptPublicKeyLegacy: () => import_verify_env_encrypt_public_key.verifyEnvEncryptPublicKeyLegacy,
|
|
464
|
+
verifyMrConfigId: () => verifyMrConfigId,
|
|
443
465
|
waitForTransactionReceipt: () => waitForTransactionReceipt,
|
|
444
466
|
watchCvmState: () => watchCvmState,
|
|
445
467
|
withComposeMethods: () => withComposeMethods
|
|
@@ -481,6 +503,13 @@ function extractRequestId(data) {
|
|
|
481
503
|
function extractRequestIdFromResponse(response) {
|
|
482
504
|
return response?.headers?.get("X-Request-ID") ?? void 0;
|
|
483
505
|
}
|
|
506
|
+
function extractRequestMethod(method) {
|
|
507
|
+
if (typeof method !== "string") {
|
|
508
|
+
return void 0;
|
|
509
|
+
}
|
|
510
|
+
const normalized = method.trim().toUpperCase();
|
|
511
|
+
return normalized.length > 0 ? normalized : void 0;
|
|
512
|
+
}
|
|
484
513
|
var PhalaCloudError = class extends Error {
|
|
485
514
|
constructor(message, data) {
|
|
486
515
|
super(message);
|
|
@@ -489,6 +518,9 @@ var PhalaCloudError = class extends Error {
|
|
|
489
518
|
this.statusText = data.statusText;
|
|
490
519
|
this.detail = data.detail;
|
|
491
520
|
this.requestId = data.requestId;
|
|
521
|
+
this.request = data.request;
|
|
522
|
+
this.requestMethod = data.requestMethod;
|
|
523
|
+
this.data = data.data;
|
|
492
524
|
this.code = data.code;
|
|
493
525
|
if (Error.captureStackTrace) {
|
|
494
526
|
Error.captureStackTrace(this, this.constructor);
|
|
@@ -502,12 +534,16 @@ var RequestError = class _RequestError extends PhalaCloudError {
|
|
|
502
534
|
statusText: options?.statusText ?? "Unknown Error",
|
|
503
535
|
detail: options?.detail || message,
|
|
504
536
|
requestId: options?.requestId,
|
|
537
|
+
request: options?.request,
|
|
538
|
+
requestMethod: options?.requestMethod,
|
|
539
|
+
data: options?.data,
|
|
505
540
|
code: options?.code
|
|
506
541
|
});
|
|
507
542
|
this.name = "RequestError";
|
|
508
543
|
this.isRequestError = true;
|
|
509
544
|
this.data = options?.data;
|
|
510
545
|
this.request = options?.request;
|
|
546
|
+
this.requestMethod = options?.requestMethod;
|
|
511
547
|
this.response = options?.response;
|
|
512
548
|
this.type = options?.type;
|
|
513
549
|
}
|
|
@@ -518,6 +554,7 @@ var RequestError = class _RequestError extends PhalaCloudError {
|
|
|
518
554
|
const bodyRequestId = extractRequestId(error.data);
|
|
519
555
|
const headerRequestId = extractRequestIdFromResponse(error.response);
|
|
520
556
|
const requestId = bodyRequestId ?? headerRequestId;
|
|
557
|
+
const requestMethod = extractRequestMethod(error.options?.method);
|
|
521
558
|
const parseResult = ApiErrorSchema.safeParse(error.data);
|
|
522
559
|
if (parseResult.success) {
|
|
523
560
|
const detail = parseResult.data.detail ?? (error.data && typeof error.data === "object" && "error_code" in error.data ? error.data : void 0);
|
|
@@ -526,6 +563,7 @@ var RequestError = class _RequestError extends PhalaCloudError {
|
|
|
526
563
|
statusText: error.statusText ?? void 0,
|
|
527
564
|
data: error.data,
|
|
528
565
|
request: error.request ?? void 0,
|
|
566
|
+
requestMethod,
|
|
529
567
|
response: error.response ?? void 0,
|
|
530
568
|
detail,
|
|
531
569
|
code: parseResult.data.code ?? void 0,
|
|
@@ -541,6 +579,7 @@ var RequestError = class _RequestError extends PhalaCloudError {
|
|
|
541
579
|
statusText: "Request Timeout",
|
|
542
580
|
data: error.data,
|
|
543
581
|
request: error.request ?? void 0,
|
|
582
|
+
requestMethod,
|
|
544
583
|
response: error.response ?? void 0,
|
|
545
584
|
detail: message,
|
|
546
585
|
code: "TIMEOUT",
|
|
@@ -552,6 +591,7 @@ var RequestError = class _RequestError extends PhalaCloudError {
|
|
|
552
591
|
statusText: error.statusText ?? void 0,
|
|
553
592
|
data: error.data,
|
|
554
593
|
request: error.request ?? void 0,
|
|
594
|
+
requestMethod,
|
|
555
595
|
response: error.response ?? void 0,
|
|
556
596
|
detail: error.data?.detail || error.message || "Unknown API error",
|
|
557
597
|
code: error.status?.toString() ?? void 0,
|
|
@@ -561,9 +601,10 @@ var RequestError = class _RequestError extends PhalaCloudError {
|
|
|
561
601
|
/**
|
|
562
602
|
* Create RequestError from generic Error
|
|
563
603
|
*/
|
|
564
|
-
static fromError(error, request) {
|
|
604
|
+
static fromError(error, request, requestMethod) {
|
|
565
605
|
return new _RequestError(error.message, {
|
|
566
606
|
request: request ?? void 0,
|
|
607
|
+
requestMethod: extractRequestMethod(requestMethod),
|
|
567
608
|
detail: error.message
|
|
568
609
|
});
|
|
569
610
|
}
|
|
@@ -682,6 +723,9 @@ function parseApiError(requestError) {
|
|
|
682
723
|
statusText,
|
|
683
724
|
detail,
|
|
684
725
|
requestId: structured.request_id ?? requestError.requestId,
|
|
726
|
+
request: requestError.request,
|
|
727
|
+
requestMethod: requestError.requestMethod,
|
|
728
|
+
data: requestError.data,
|
|
685
729
|
errorCode: structured.error_code,
|
|
686
730
|
structuredDetails: structured.details,
|
|
687
731
|
suggestions: structured.suggestions,
|
|
@@ -695,6 +739,9 @@ function parseApiError(requestError) {
|
|
|
695
739
|
statusText,
|
|
696
740
|
detail,
|
|
697
741
|
requestId: requestError.requestId,
|
|
742
|
+
request: requestError.request,
|
|
743
|
+
requestMethod: requestError.requestMethod,
|
|
744
|
+
data: requestError.data,
|
|
698
745
|
code: requestError.code
|
|
699
746
|
};
|
|
700
747
|
if (errorType === "validation" && Array.isArray(detail)) {
|
|
@@ -758,6 +805,16 @@ function getErrorMessage(error) {
|
|
|
758
805
|
}
|
|
759
806
|
return "Unknown error occurred";
|
|
760
807
|
}
|
|
808
|
+
function formatStructuredErrorDetailValue(value) {
|
|
809
|
+
if (value === null || value === void 0) return "";
|
|
810
|
+
if (typeof value === "string") return value;
|
|
811
|
+
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
812
|
+
try {
|
|
813
|
+
return JSON.stringify(value);
|
|
814
|
+
} catch {
|
|
815
|
+
return String(value);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
761
818
|
var ResourceError = class extends BusinessError {
|
|
762
819
|
constructor(message, data) {
|
|
763
820
|
super(message, data);
|
|
@@ -803,7 +860,7 @@ function formatStructuredError(error, options) {
|
|
|
803
860
|
if (d.message) {
|
|
804
861
|
parts.push(` - ${d.message}`);
|
|
805
862
|
} else if (d.field && d.value !== void 0) {
|
|
806
|
-
parts.push(` - ${d.field}: ${d.value}`);
|
|
863
|
+
parts.push(` - ${d.field}: ${formatStructuredErrorDetailValue(d.value)}`);
|
|
807
864
|
}
|
|
808
865
|
});
|
|
809
866
|
}
|
|
@@ -834,9 +891,10 @@ function isAppIdConflictError(error) {
|
|
|
834
891
|
var SUPPORTED_API_VERSIONS = [
|
|
835
892
|
"2025-10-28",
|
|
836
893
|
"2026-01-21",
|
|
837
|
-
"2026-05-22"
|
|
894
|
+
"2026-05-22",
|
|
895
|
+
"2026-06-23"
|
|
838
896
|
];
|
|
839
|
-
var DEFAULT_API_VERSION = "2026-
|
|
897
|
+
var DEFAULT_API_VERSION = "2026-06-23";
|
|
840
898
|
var logger = (0, import_debug.default)("phala::api-client");
|
|
841
899
|
function formatHeaders(headers) {
|
|
842
900
|
return Object.entries(headers).map(([key, value]) => ` -H "${key}: ${value}"`).join("\n");
|
|
@@ -1307,6 +1365,12 @@ async function safeGetCurrentUser(client, parameters) {
|
|
|
1307
1365
|
}
|
|
1308
1366
|
|
|
1309
1367
|
// src/actions/get_available_nodes.ts
|
|
1368
|
+
var import_zod7 = require("zod");
|
|
1369
|
+
|
|
1370
|
+
// src/types/cvm_info_v20260121.ts
|
|
1371
|
+
var import_zod6 = require("zod");
|
|
1372
|
+
|
|
1373
|
+
// src/types/cvm_info_v20251028.ts
|
|
1310
1374
|
var import_zod5 = require("zod");
|
|
1311
1375
|
|
|
1312
1376
|
// src/types/kms_info.ts
|
|
@@ -1328,7 +1392,8 @@ var KmsInfoBaseSchema = import_zod4.z.object({
|
|
|
1328
1392
|
version: import_zod4.z.string(),
|
|
1329
1393
|
chain_id: import_zod4.z.number().nullable(),
|
|
1330
1394
|
kms_contract_address: import_zod4.z.string().nullable().transform((val) => val),
|
|
1331
|
-
gateway_app_id: import_zod4.z.string().nullable().transform((val) => val)
|
|
1395
|
+
gateway_app_id: import_zod4.z.string().nullable().transform((val) => val),
|
|
1396
|
+
k256_pubkey: import_zod4.z.string().nullable().optional()
|
|
1332
1397
|
}).passthrough();
|
|
1333
1398
|
var KmsInfoSchema = KmsInfoBaseSchema.transform((data) => {
|
|
1334
1399
|
if (data.chain_id != null) {
|
|
@@ -1340,6 +1405,262 @@ var KmsInfoSchema = KmsInfoBaseSchema.transform((data) => {
|
|
|
1340
1405
|
return data;
|
|
1341
1406
|
});
|
|
1342
1407
|
|
|
1408
|
+
// src/types/cvm_info_v20251028.ts
|
|
1409
|
+
var TableIdSchema = import_zod5.z.union([import_zod5.z.number(), import_zod5.z.string()]);
|
|
1410
|
+
var VmInfoV20251028Schema = import_zod5.z.object({
|
|
1411
|
+
id: import_zod5.z.string(),
|
|
1412
|
+
name: import_zod5.z.string(),
|
|
1413
|
+
status: import_zod5.z.string(),
|
|
1414
|
+
uptime: import_zod5.z.string(),
|
|
1415
|
+
app_url: import_zod5.z.string().nullable(),
|
|
1416
|
+
app_id: import_zod5.z.string(),
|
|
1417
|
+
instance_id: import_zod5.z.string().nullable(),
|
|
1418
|
+
configuration: import_zod5.z.any().optional(),
|
|
1419
|
+
exited_at: import_zod5.z.string().nullable(),
|
|
1420
|
+
boot_progress: import_zod5.z.string().nullable(),
|
|
1421
|
+
boot_error: import_zod5.z.string().nullable(),
|
|
1422
|
+
shutdown_progress: import_zod5.z.string().nullable(),
|
|
1423
|
+
image_version: import_zod5.z.string().nullable()
|
|
1424
|
+
});
|
|
1425
|
+
var ManagedUserV20251028Schema = import_zod5.z.object({
|
|
1426
|
+
id: TableIdSchema,
|
|
1427
|
+
username: import_zod5.z.string()
|
|
1428
|
+
});
|
|
1429
|
+
var CvmNodeV20251028Schema = import_zod5.z.object({
|
|
1430
|
+
id: import_zod5.z.number(),
|
|
1431
|
+
name: import_zod5.z.string(),
|
|
1432
|
+
region_identifier: import_zod5.z.string().nullable().optional()
|
|
1433
|
+
});
|
|
1434
|
+
var MachineInfoV20251028Schema = import_zod5.z.object({
|
|
1435
|
+
vcpu: import_zod5.z.number(),
|
|
1436
|
+
memory: import_zod5.z.number(),
|
|
1437
|
+
disk_size: import_zod5.z.number(),
|
|
1438
|
+
gpu_count: import_zod5.z.number().default(0)
|
|
1439
|
+
});
|
|
1440
|
+
var CvmNetworkUrlsV20251028Schema = import_zod5.z.object({
|
|
1441
|
+
app: import_zod5.z.string(),
|
|
1442
|
+
instance: import_zod5.z.string()
|
|
1443
|
+
});
|
|
1444
|
+
var CvmInfoV20251028Schema = import_zod5.z.object({
|
|
1445
|
+
hosted: VmInfoV20251028Schema,
|
|
1446
|
+
name: import_zod5.z.string(),
|
|
1447
|
+
managed_user: ManagedUserV20251028Schema.nullable(),
|
|
1448
|
+
node: CvmNodeV20251028Schema.nullable(),
|
|
1449
|
+
listed: import_zod5.z.boolean().default(false),
|
|
1450
|
+
status: import_zod5.z.string(),
|
|
1451
|
+
in_progress: import_zod5.z.boolean().default(false),
|
|
1452
|
+
dapp_dashboard_url: import_zod5.z.string().nullable(),
|
|
1453
|
+
syslog_endpoint: import_zod5.z.string().nullable(),
|
|
1454
|
+
allow_upgrade: import_zod5.z.boolean().default(false),
|
|
1455
|
+
project_id: import_zod5.z.string().nullable(),
|
|
1456
|
+
project_type: import_zod5.z.string().nullable(),
|
|
1457
|
+
billing_period: import_zod5.z.string().nullable(),
|
|
1458
|
+
kms_info: KmsInfoSchema.nullable(),
|
|
1459
|
+
vcpu: import_zod5.z.number().nullable(),
|
|
1460
|
+
memory: import_zod5.z.number().nullable(),
|
|
1461
|
+
disk_size: import_zod5.z.number().nullable(),
|
|
1462
|
+
gateway_domain: import_zod5.z.string().nullable(),
|
|
1463
|
+
public_urls: import_zod5.z.array(CvmNetworkUrlsV20251028Schema),
|
|
1464
|
+
machine_info: MachineInfoV20251028Schema.nullable().optional(),
|
|
1465
|
+
updated_at: import_zod5.z.string().nullable().optional()
|
|
1466
|
+
});
|
|
1467
|
+
var CvmDetailV20251028Schema = import_zod5.z.object({
|
|
1468
|
+
id: TableIdSchema,
|
|
1469
|
+
name: import_zod5.z.string(),
|
|
1470
|
+
status: import_zod5.z.string(),
|
|
1471
|
+
in_progress: import_zod5.z.boolean().optional().default(false),
|
|
1472
|
+
teepod_id: import_zod5.z.number().nullable(),
|
|
1473
|
+
teepod: CvmNodeV20251028Schema.optional().nullable(),
|
|
1474
|
+
app_id: import_zod5.z.string(),
|
|
1475
|
+
vm_uuid: import_zod5.z.string().nullable(),
|
|
1476
|
+
instance_id: import_zod5.z.string().nullable(),
|
|
1477
|
+
vcpu: import_zod5.z.number(),
|
|
1478
|
+
memory: import_zod5.z.number(),
|
|
1479
|
+
disk_size: import_zod5.z.number(),
|
|
1480
|
+
base_image: import_zod5.z.string().nullable(),
|
|
1481
|
+
encrypted_env_pubkey: import_zod5.z.string().nullable(),
|
|
1482
|
+
listed: import_zod5.z.boolean().optional().default(false),
|
|
1483
|
+
project_id: import_zod5.z.string().optional().nullable(),
|
|
1484
|
+
project_type: import_zod5.z.string().optional().nullable(),
|
|
1485
|
+
instance_type: import_zod5.z.string().optional().nullable(),
|
|
1486
|
+
public_sysinfo: import_zod5.z.boolean().optional().default(false),
|
|
1487
|
+
public_logs: import_zod5.z.boolean().optional().default(false),
|
|
1488
|
+
dapp_dashboard_url: import_zod5.z.string().optional().nullable(),
|
|
1489
|
+
syslog_endpoint: import_zod5.z.string().optional().nullable(),
|
|
1490
|
+
kms_info: KmsInfoSchema.optional().nullable(),
|
|
1491
|
+
contract_address: import_zod5.z.string().optional().nullable(),
|
|
1492
|
+
deployer_address: import_zod5.z.string().optional().nullable(),
|
|
1493
|
+
scheduled_delete_at: import_zod5.z.string().optional().nullable(),
|
|
1494
|
+
public_urls: import_zod5.z.array(CvmNetworkUrlsV20251028Schema).optional().default([]),
|
|
1495
|
+
gateway_domain: import_zod5.z.string().optional().nullable(),
|
|
1496
|
+
machine_info: MachineInfoV20251028Schema.optional().nullable(),
|
|
1497
|
+
updated_at: import_zod5.z.string().optional().nullable()
|
|
1498
|
+
});
|
|
1499
|
+
var PaginatedCvmInfosV20251028Schema = import_zod5.z.object({
|
|
1500
|
+
items: import_zod5.z.array(CvmInfoV20251028Schema),
|
|
1501
|
+
total: import_zod5.z.number(),
|
|
1502
|
+
page: import_zod5.z.number(),
|
|
1503
|
+
page_size: import_zod5.z.number(),
|
|
1504
|
+
pages: import_zod5.z.number()
|
|
1505
|
+
});
|
|
1506
|
+
|
|
1507
|
+
// src/types/cvm_info_v20260121.ts
|
|
1508
|
+
var BillingPeriodSchema = import_zod6.z.enum(["skip", "hourly", "monthly"]);
|
|
1509
|
+
var KmsTypeSchema = import_zod6.z.enum(["phala", "ethereum", "base", "legacy"]);
|
|
1510
|
+
var UserRefSchema = import_zod6.z.object({
|
|
1511
|
+
object_type: import_zod6.z.literal("user"),
|
|
1512
|
+
id: import_zod6.z.string().nullable().optional(),
|
|
1513
|
+
username: import_zod6.z.string().nullable().optional(),
|
|
1514
|
+
avatar_url: import_zod6.z.string().nullable().optional()
|
|
1515
|
+
});
|
|
1516
|
+
var WorkspaceRefSchema = import_zod6.z.object({
|
|
1517
|
+
object_type: import_zod6.z.literal("workspace"),
|
|
1518
|
+
id: import_zod6.z.string(),
|
|
1519
|
+
name: import_zod6.z.string(),
|
|
1520
|
+
slug: import_zod6.z.string().nullable().optional(),
|
|
1521
|
+
avatar_url: import_zod6.z.string().nullable().optional()
|
|
1522
|
+
});
|
|
1523
|
+
var CvmResourceInfoV20260121Schema = import_zod6.z.object({
|
|
1524
|
+
instance_type: import_zod6.z.string().nullable().optional(),
|
|
1525
|
+
vcpu: import_zod6.z.number().int().nullable().optional(),
|
|
1526
|
+
memory_in_gb: import_zod6.z.number().nullable().optional(),
|
|
1527
|
+
disk_in_gb: import_zod6.z.number().int().nullable().optional(),
|
|
1528
|
+
gpus: import_zod6.z.number().int().nullable().optional(),
|
|
1529
|
+
compute_billing_price: import_zod6.z.string().nullable().optional(),
|
|
1530
|
+
billing_period: BillingPeriodSchema.nullable().optional()
|
|
1531
|
+
});
|
|
1532
|
+
var CvmHourlyRateV20260121Schema = import_zod6.z.object({
|
|
1533
|
+
total: import_zod6.z.string().nullable().optional(),
|
|
1534
|
+
compute: import_zod6.z.string().nullable().optional(),
|
|
1535
|
+
disk: import_zod6.z.string().nullable().optional()
|
|
1536
|
+
});
|
|
1537
|
+
var CvmGpuRentalOrderInfoV20260121Schema = import_zod6.z.object({
|
|
1538
|
+
order_id: import_zod6.z.string(),
|
|
1539
|
+
status: import_zod6.z.string(),
|
|
1540
|
+
pricing_plan: import_zod6.z.string().nullable().optional(),
|
|
1541
|
+
commitment_days: import_zod6.z.number().int().nullable().optional(),
|
|
1542
|
+
agreed_hourly_rate: import_zod6.z.string().nullable().optional(),
|
|
1543
|
+
hourly_billing_start_time: import_zod6.z.string().nullable().optional(),
|
|
1544
|
+
activated_at: import_zod6.z.string().nullable().optional(),
|
|
1545
|
+
completed_at: import_zod6.z.string().nullable().optional(),
|
|
1546
|
+
cancelled_at: import_zod6.z.string().nullable().optional(),
|
|
1547
|
+
decoupled_at: import_zod6.z.string().nullable().optional(),
|
|
1548
|
+
sku_code: import_zod6.z.string().nullable().optional(),
|
|
1549
|
+
sku_display_name: import_zod6.z.string().nullable().optional()
|
|
1550
|
+
});
|
|
1551
|
+
var CvmOsInfoV20260121Schema = import_zod6.z.object({
|
|
1552
|
+
name: import_zod6.z.string().nullable().optional(),
|
|
1553
|
+
version: import_zod6.z.string().nullable().optional(),
|
|
1554
|
+
is_dev: import_zod6.z.boolean().nullable().optional(),
|
|
1555
|
+
os_image_hash: import_zod6.z.string().nullable().optional()
|
|
1556
|
+
});
|
|
1557
|
+
var CvmKmsInfoV20260121BaseSchema = import_zod6.z.object({
|
|
1558
|
+
chain_id: import_zod6.z.number().int().nullable().optional(),
|
|
1559
|
+
dstack_kms_address: import_zod6.z.string().nullable().optional(),
|
|
1560
|
+
dstack_app_address: import_zod6.z.string().nullable().optional(),
|
|
1561
|
+
deployer_address: import_zod6.z.string().nullable().optional(),
|
|
1562
|
+
rpc_endpoint: import_zod6.z.string().nullable().optional(),
|
|
1563
|
+
encrypted_env_pubkey: import_zod6.z.string().nullable().optional()
|
|
1564
|
+
});
|
|
1565
|
+
var CvmKmsInfoV20260121Schema = CvmKmsInfoV20260121BaseSchema.transform((data) => {
|
|
1566
|
+
if (data.chain_id != null) {
|
|
1567
|
+
const chain = SUPPORTED_CHAINS[data.chain_id];
|
|
1568
|
+
if (chain) {
|
|
1569
|
+
return { ...data, chain };
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
return data;
|
|
1573
|
+
});
|
|
1574
|
+
var CvmProgressInfoV20260121Schema = import_zod6.z.object({
|
|
1575
|
+
target: import_zod6.z.string().nullable().optional(),
|
|
1576
|
+
started_at: import_zod6.z.string().nullable().optional(),
|
|
1577
|
+
correlation_id: import_zod6.z.string().nullable().optional()
|
|
1578
|
+
});
|
|
1579
|
+
var CvmGatewayInfoV20260121Schema = import_zod6.z.object({
|
|
1580
|
+
base_domain: import_zod6.z.string().nullable().optional(),
|
|
1581
|
+
cname: import_zod6.z.string().nullable().optional()
|
|
1582
|
+
});
|
|
1583
|
+
var CvmLogUrlsV20260121Schema = import_zod6.z.object({
|
|
1584
|
+
serial: import_zod6.z.string().nullable().optional(),
|
|
1585
|
+
stdout: import_zod6.z.string().nullable().optional(),
|
|
1586
|
+
stderr: import_zod6.z.string().nullable().optional(),
|
|
1587
|
+
container_log_base: import_zod6.z.string().nullable().optional()
|
|
1588
|
+
});
|
|
1589
|
+
var DeviceIdEntrySchema = import_zod6.z.object({
|
|
1590
|
+
device_id: import_zod6.z.string(),
|
|
1591
|
+
algorithm_version: import_zod6.z.string(),
|
|
1592
|
+
enabled: import_zod6.z.boolean()
|
|
1593
|
+
});
|
|
1594
|
+
var NodeRefSchema = import_zod6.z.object({
|
|
1595
|
+
object_type: import_zod6.z.literal("node"),
|
|
1596
|
+
id: import_zod6.z.number().int().nullable().optional(),
|
|
1597
|
+
name: import_zod6.z.string().nullable().optional(),
|
|
1598
|
+
region: import_zod6.z.string().nullable().optional(),
|
|
1599
|
+
// Deprecated: resolved single device_id. Use device_ids for the full matrix.
|
|
1600
|
+
device_id: import_zod6.z.string().nullable().optional(),
|
|
1601
|
+
device_ids: import_zod6.z.array(DeviceIdEntrySchema).default([]),
|
|
1602
|
+
ppid: import_zod6.z.string().nullable().optional(),
|
|
1603
|
+
status: import_zod6.z.string().nullable().optional(),
|
|
1604
|
+
version: import_zod6.z.string().nullable().optional()
|
|
1605
|
+
});
|
|
1606
|
+
var CvmNodeInfoV20260121Schema = NodeRefSchema;
|
|
1607
|
+
var CvmInfoV20260121Schema = import_zod6.z.object({
|
|
1608
|
+
id: import_zod6.z.string(),
|
|
1609
|
+
name: import_zod6.z.string(),
|
|
1610
|
+
app_id: import_zod6.z.string().nullable().optional(),
|
|
1611
|
+
vm_uuid: import_zod6.z.string().nullable().optional(),
|
|
1612
|
+
instance_id: import_zod6.z.string().nullable().optional(),
|
|
1613
|
+
resource: CvmResourceInfoV20260121Schema,
|
|
1614
|
+
node_info: NodeRefSchema.nullable().optional(),
|
|
1615
|
+
os: CvmOsInfoV20260121Schema.nullable().optional(),
|
|
1616
|
+
kms_type: KmsTypeSchema.nullable().optional(),
|
|
1617
|
+
kms_info: CvmKmsInfoV20260121Schema.nullable().optional(),
|
|
1618
|
+
status: import_zod6.z.string(),
|
|
1619
|
+
in_progress: import_zod6.z.boolean().optional().default(false),
|
|
1620
|
+
progress: CvmProgressInfoV20260121Schema.nullable().optional(),
|
|
1621
|
+
compose_hash: import_zod6.z.string().nullable().optional(),
|
|
1622
|
+
docker_compose_hash: import_zod6.z.string().nullable().optional(),
|
|
1623
|
+
pre_launch_script_hash: import_zod6.z.string().nullable().optional(),
|
|
1624
|
+
gateway: CvmGatewayInfoV20260121Schema,
|
|
1625
|
+
logs: CvmLogUrlsV20260121Schema.optional().default({}),
|
|
1626
|
+
services: import_zod6.z.array(import_zod6.z.record(import_zod6.z.any())).optional().default([]),
|
|
1627
|
+
endpoints: import_zod6.z.array(CvmNetworkUrlsV20251028Schema).nullable().optional(),
|
|
1628
|
+
public_logs: import_zod6.z.boolean().optional(),
|
|
1629
|
+
public_sysinfo: import_zod6.z.boolean().optional(),
|
|
1630
|
+
public_tcbinfo: import_zod6.z.boolean().optional(),
|
|
1631
|
+
gateway_enabled: import_zod6.z.boolean().optional(),
|
|
1632
|
+
secure_time: import_zod6.z.boolean().optional(),
|
|
1633
|
+
listed: import_zod6.z.boolean().optional().default(false),
|
|
1634
|
+
storage_fs: import_zod6.z.string().optional(),
|
|
1635
|
+
workspace: WorkspaceRefSchema.nullable().optional(),
|
|
1636
|
+
creator: UserRefSchema.nullable().optional(),
|
|
1637
|
+
created_at: import_zod6.z.string().nullable().optional(),
|
|
1638
|
+
deleted_at: import_zod6.z.string().nullable().optional(),
|
|
1639
|
+
project_type: import_zod6.z.string().nullable().optional(),
|
|
1640
|
+
hourly_rate: CvmHourlyRateV20260121Schema.nullable().optional(),
|
|
1641
|
+
billing_interval: import_zod6.z.string().nullable().optional(),
|
|
1642
|
+
gpu_rental_order: CvmGpuRentalOrderInfoV20260121Schema.nullable().optional()
|
|
1643
|
+
});
|
|
1644
|
+
var CvmInfoV20260522Schema = CvmInfoV20260121Schema.extend({
|
|
1645
|
+
id: import_zod6.z.string()
|
|
1646
|
+
});
|
|
1647
|
+
var CvmInfoDetailV20260121Schema = CvmInfoV20260121Schema.extend({
|
|
1648
|
+
compose_file: import_zod6.z.union([import_zod6.z.record(import_zod6.z.any()), import_zod6.z.string()]).nullable().optional()
|
|
1649
|
+
});
|
|
1650
|
+
var CvmInfoDetailV20260522Schema = CvmInfoV20260522Schema.extend({
|
|
1651
|
+
compose_file: import_zod6.z.union([import_zod6.z.record(import_zod6.z.any()), import_zod6.z.string()]).nullable().optional()
|
|
1652
|
+
});
|
|
1653
|
+
var PaginatedCvmInfosV20260121Schema = import_zod6.z.object({
|
|
1654
|
+
items: import_zod6.z.array(CvmInfoV20260121Schema),
|
|
1655
|
+
total: import_zod6.z.number(),
|
|
1656
|
+
page: import_zod6.z.number(),
|
|
1657
|
+
page_size: import_zod6.z.number(),
|
|
1658
|
+
pages: import_zod6.z.number()
|
|
1659
|
+
});
|
|
1660
|
+
var PaginatedCvmInfosV20260522Schema = PaginatedCvmInfosV20260121Schema.extend({
|
|
1661
|
+
items: import_zod6.z.array(CvmInfoV20260522Schema)
|
|
1662
|
+
});
|
|
1663
|
+
|
|
1343
1664
|
// src/utils/validate-parameters.ts
|
|
1344
1665
|
function validateActionParameters(parameters) {
|
|
1345
1666
|
if (parameters?.schema !== void 0 && parameters?.schema !== false) {
|
|
@@ -1487,43 +1808,44 @@ function defineAction(schema, fn) {
|
|
|
1487
1808
|
}
|
|
1488
1809
|
|
|
1489
1810
|
// src/actions/get_available_nodes.ts
|
|
1490
|
-
var AvailableOSImageSchema =
|
|
1491
|
-
name:
|
|
1492
|
-
is_dev:
|
|
1493
|
-
version:
|
|
1494
|
-
|
|
1495
|
-
|
|
1811
|
+
var AvailableOSImageSchema = import_zod7.z.object({
|
|
1812
|
+
name: import_zod7.z.string(),
|
|
1813
|
+
is_dev: import_zod7.z.boolean(),
|
|
1814
|
+
version: import_zod7.z.union([
|
|
1815
|
+
import_zod7.z.tuple([import_zod7.z.number(), import_zod7.z.number(), import_zod7.z.number()]),
|
|
1816
|
+
import_zod7.z.tuple([import_zod7.z.number(), import_zod7.z.number(), import_zod7.z.number(), import_zod7.z.number()])
|
|
1496
1817
|
]),
|
|
1497
|
-
os_image_hash:
|
|
1818
|
+
os_image_hash: import_zod7.z.string().nullable().optional()
|
|
1498
1819
|
}).passthrough();
|
|
1499
|
-
var TeepodCapacitySchema =
|
|
1500
|
-
teepod_id:
|
|
1501
|
-
name:
|
|
1502
|
-
listed:
|
|
1503
|
-
resource_score:
|
|
1504
|
-
remaining_vcpu:
|
|
1505
|
-
remaining_memory:
|
|
1506
|
-
remaining_cvm_slots:
|
|
1507
|
-
images:
|
|
1508
|
-
support_onchain_kms:
|
|
1509
|
-
fmspc:
|
|
1510
|
-
device_id:
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1820
|
+
var TeepodCapacitySchema = import_zod7.z.object({
|
|
1821
|
+
teepod_id: import_zod7.z.number(),
|
|
1822
|
+
name: import_zod7.z.string(),
|
|
1823
|
+
listed: import_zod7.z.boolean(),
|
|
1824
|
+
resource_score: import_zod7.z.number(),
|
|
1825
|
+
remaining_vcpu: import_zod7.z.number(),
|
|
1826
|
+
remaining_memory: import_zod7.z.number(),
|
|
1827
|
+
remaining_cvm_slots: import_zod7.z.number(),
|
|
1828
|
+
images: import_zod7.z.array(AvailableOSImageSchema),
|
|
1829
|
+
support_onchain_kms: import_zod7.z.boolean().optional(),
|
|
1830
|
+
fmspc: import_zod7.z.string().nullable().optional(),
|
|
1831
|
+
device_id: import_zod7.z.string().nullable().optional(),
|
|
1832
|
+
device_ids: import_zod7.z.array(DeviceIdEntrySchema).default([]),
|
|
1833
|
+
region_identifier: import_zod7.z.string().nullable().optional(),
|
|
1834
|
+
default_kms: import_zod7.z.string().nullable().optional(),
|
|
1835
|
+
kms_list: import_zod7.z.array(import_zod7.z.string()).default([])
|
|
1514
1836
|
}).passthrough();
|
|
1515
|
-
var ResourceThresholdSchema =
|
|
1516
|
-
max_instances:
|
|
1517
|
-
max_vcpu:
|
|
1518
|
-
max_memory:
|
|
1519
|
-
max_disk:
|
|
1837
|
+
var ResourceThresholdSchema = import_zod7.z.object({
|
|
1838
|
+
max_instances: import_zod7.z.number().nullable().optional(),
|
|
1839
|
+
max_vcpu: import_zod7.z.number().nullable().optional(),
|
|
1840
|
+
max_memory: import_zod7.z.number().nullable().optional(),
|
|
1841
|
+
max_disk: import_zod7.z.number().nullable().optional()
|
|
1520
1842
|
}).passthrough();
|
|
1521
|
-
var AvailableNodesSchema =
|
|
1522
|
-
tier:
|
|
1843
|
+
var AvailableNodesSchema = import_zod7.z.object({
|
|
1844
|
+
tier: import_zod7.z.string(),
|
|
1523
1845
|
// TeamTier is string enum
|
|
1524
1846
|
capacity: ResourceThresholdSchema,
|
|
1525
|
-
nodes:
|
|
1526
|
-
kms_list:
|
|
1847
|
+
nodes: import_zod7.z.array(TeepodCapacitySchema),
|
|
1848
|
+
kms_list: import_zod7.z.array(KmsInfoSchema)
|
|
1527
1849
|
}).passthrough();
|
|
1528
1850
|
var { action: getAvailableNodes, safeAction: safeGetAvailableNodes } = defineSimpleAction(
|
|
1529
1851
|
AvailableNodesSchema,
|
|
@@ -1533,42 +1855,42 @@ var { action: getAvailableNodes, safeAction: safeGetAvailableNodes } = defineSim
|
|
|
1533
1855
|
);
|
|
1534
1856
|
|
|
1535
1857
|
// src/actions/get_cvm_create_resources.ts
|
|
1536
|
-
var
|
|
1537
|
-
var ResourceIdV20260121Schema =
|
|
1538
|
-
var HashIdSchema =
|
|
1539
|
-
var GpuAvailabilitySchema =
|
|
1540
|
-
has_reserved_gpus:
|
|
1541
|
-
reserved_gpu_count:
|
|
1542
|
-
has_public_gpus:
|
|
1543
|
-
public_gpu_count:
|
|
1858
|
+
var import_zod8 = require("zod");
|
|
1859
|
+
var ResourceIdV20260121Schema = import_zod8.z.union([import_zod8.z.number(), import_zod8.z.string()]);
|
|
1860
|
+
var HashIdSchema = import_zod8.z.string();
|
|
1861
|
+
var GpuAvailabilitySchema = import_zod8.z.object({
|
|
1862
|
+
has_reserved_gpus: import_zod8.z.boolean(),
|
|
1863
|
+
reserved_gpu_count: import_zod8.z.number(),
|
|
1864
|
+
has_public_gpus: import_zod8.z.boolean(),
|
|
1865
|
+
public_gpu_count: import_zod8.z.number()
|
|
1544
1866
|
}).passthrough();
|
|
1545
|
-
var CvmCreateKmsResourceV20260121Schema =
|
|
1867
|
+
var CvmCreateKmsResourceV20260121Schema = import_zod8.z.object({
|
|
1546
1868
|
id: ResourceIdV20260121Schema,
|
|
1547
|
-
slug:
|
|
1548
|
-
url:
|
|
1549
|
-
version:
|
|
1550
|
-
kms_type:
|
|
1551
|
-
chain_id:
|
|
1869
|
+
slug: import_zod8.z.string().nullable().optional(),
|
|
1870
|
+
url: import_zod8.z.string(),
|
|
1871
|
+
version: import_zod8.z.string().nullable().optional(),
|
|
1872
|
+
kms_type: import_zod8.z.string(),
|
|
1873
|
+
chain_id: import_zod8.z.number().nullable().optional(),
|
|
1552
1874
|
kms_contract_id: ResourceIdV20260121Schema.nullable().optional(),
|
|
1553
|
-
kms_contract_address:
|
|
1554
|
-
gateway_app_id:
|
|
1555
|
-
supported_os_images:
|
|
1875
|
+
kms_contract_address: import_zod8.z.string().nullable().optional(),
|
|
1876
|
+
gateway_app_id: import_zod8.z.string().nullable().optional(),
|
|
1877
|
+
supported_os_images: import_zod8.z.array(import_zod8.z.string()).default([])
|
|
1556
1878
|
}).passthrough();
|
|
1557
|
-
var CvmCreateNodeKmsRelationV20260121Schema =
|
|
1558
|
-
teepod_id:
|
|
1879
|
+
var CvmCreateNodeKmsRelationV20260121Schema = import_zod8.z.object({
|
|
1880
|
+
teepod_id: import_zod8.z.number(),
|
|
1559
1881
|
kms_id: ResourceIdV20260121Schema,
|
|
1560
|
-
kms_type:
|
|
1882
|
+
kms_type: import_zod8.z.string(),
|
|
1561
1883
|
kms_contract_id: ResourceIdV20260121Schema.nullable().optional(),
|
|
1562
|
-
kms_contract_address:
|
|
1563
|
-
supported_os_images:
|
|
1884
|
+
kms_contract_address: import_zod8.z.string().nullable().optional(),
|
|
1885
|
+
supported_os_images: import_zod8.z.array(import_zod8.z.string()).default([])
|
|
1564
1886
|
}).passthrough();
|
|
1565
|
-
var CvmCreateGatewayResourceV20260121Schema =
|
|
1887
|
+
var CvmCreateGatewayResourceV20260121Schema = import_zod8.z.object({
|
|
1566
1888
|
id: ResourceIdV20260121Schema,
|
|
1567
|
-
teepod_id:
|
|
1889
|
+
teepod_id: import_zod8.z.number().nullable().optional(),
|
|
1568
1890
|
kms_contract_id: ResourceIdV20260121Schema,
|
|
1569
|
-
rpc_url:
|
|
1570
|
-
domain_suffix:
|
|
1571
|
-
enabled:
|
|
1891
|
+
rpc_url: import_zod8.z.string().nullable().optional(),
|
|
1892
|
+
domain_suffix: import_zod8.z.string().nullable().optional(),
|
|
1893
|
+
enabled: import_zod8.z.boolean()
|
|
1572
1894
|
}).passthrough();
|
|
1573
1895
|
var CvmCreateKmsResourceSchema = CvmCreateKmsResourceV20260121Schema.extend({
|
|
1574
1896
|
id: HashIdSchema,
|
|
@@ -1582,31 +1904,31 @@ var CvmCreateGatewayResourceSchema = CvmCreateGatewayResourceV20260121Schema.ext
|
|
|
1582
1904
|
id: HashIdSchema,
|
|
1583
1905
|
kms_contract_id: HashIdSchema
|
|
1584
1906
|
});
|
|
1585
|
-
var CvmCreateInstanceTypeResourceSchema =
|
|
1586
|
-
id:
|
|
1587
|
-
name:
|
|
1588
|
-
vcpu:
|
|
1589
|
-
memory_mb:
|
|
1590
|
-
default_disk_size_gb:
|
|
1591
|
-
requires_gpu:
|
|
1592
|
-
requires_gpu_count:
|
|
1593
|
-
family:
|
|
1594
|
-
display_order:
|
|
1907
|
+
var CvmCreateInstanceTypeResourceSchema = import_zod8.z.object({
|
|
1908
|
+
id: import_zod8.z.string(),
|
|
1909
|
+
name: import_zod8.z.string(),
|
|
1910
|
+
vcpu: import_zod8.z.number(),
|
|
1911
|
+
memory_mb: import_zod8.z.number(),
|
|
1912
|
+
default_disk_size_gb: import_zod8.z.number(),
|
|
1913
|
+
requires_gpu: import_zod8.z.boolean(),
|
|
1914
|
+
requires_gpu_count: import_zod8.z.number(),
|
|
1915
|
+
family: import_zod8.z.string().nullable().optional(),
|
|
1916
|
+
display_order: import_zod8.z.number().nullable().optional()
|
|
1595
1917
|
}).passthrough();
|
|
1596
|
-
var CvmCreateResourceGraphV20260121Schema =
|
|
1597
|
-
tier:
|
|
1918
|
+
var CvmCreateResourceGraphV20260121Schema = import_zod8.z.object({
|
|
1919
|
+
tier: import_zod8.z.string(),
|
|
1598
1920
|
capacity: ResourceThresholdSchema,
|
|
1599
|
-
nodes:
|
|
1600
|
-
kms_nodes:
|
|
1601
|
-
node_kms_relations:
|
|
1602
|
-
gateway_nodes:
|
|
1603
|
-
instance_types:
|
|
1921
|
+
nodes: import_zod8.z.array(TeepodCapacitySchema),
|
|
1922
|
+
kms_nodes: import_zod8.z.array(CvmCreateKmsResourceV20260121Schema),
|
|
1923
|
+
node_kms_relations: import_zod8.z.array(CvmCreateNodeKmsRelationV20260121Schema),
|
|
1924
|
+
gateway_nodes: import_zod8.z.array(CvmCreateGatewayResourceV20260121Schema),
|
|
1925
|
+
instance_types: import_zod8.z.array(CvmCreateInstanceTypeResourceSchema),
|
|
1604
1926
|
gpu_availability: GpuAvailabilitySchema
|
|
1605
1927
|
}).passthrough();
|
|
1606
1928
|
var CvmCreateResourceGraphV20260522Schema = CvmCreateResourceGraphV20260121Schema.extend({
|
|
1607
|
-
kms_nodes:
|
|
1608
|
-
node_kms_relations:
|
|
1609
|
-
gateway_nodes:
|
|
1929
|
+
kms_nodes: import_zod8.z.array(CvmCreateKmsResourceSchema),
|
|
1930
|
+
node_kms_relations: import_zod8.z.array(CvmCreateNodeKmsRelationSchema),
|
|
1931
|
+
gateway_nodes: import_zod8.z.array(CvmCreateGatewayResourceSchema)
|
|
1610
1932
|
});
|
|
1611
1933
|
var CvmCreateResourceGraphSchema = CvmCreateResourceGraphV20260522Schema;
|
|
1612
1934
|
function getSchemaForVersion2(version) {
|
|
@@ -1634,33 +1956,33 @@ async function safeGetCvmCreateResources(client, parameters) {
|
|
|
1634
1956
|
}
|
|
1635
1957
|
|
|
1636
1958
|
// src/actions/list-instance-types.ts
|
|
1637
|
-
var
|
|
1638
|
-
var InstanceTypeSchema =
|
|
1639
|
-
id:
|
|
1640
|
-
name:
|
|
1641
|
-
description:
|
|
1642
|
-
vcpu:
|
|
1643
|
-
memory_mb:
|
|
1644
|
-
hourly_rate:
|
|
1645
|
-
requires_gpu:
|
|
1646
|
-
default_disk_size_gb:
|
|
1647
|
-
family:
|
|
1959
|
+
var import_zod9 = require("zod");
|
|
1960
|
+
var InstanceTypeSchema = import_zod9.z.object({
|
|
1961
|
+
id: import_zod9.z.string(),
|
|
1962
|
+
name: import_zod9.z.string(),
|
|
1963
|
+
description: import_zod9.z.string(),
|
|
1964
|
+
vcpu: import_zod9.z.number(),
|
|
1965
|
+
memory_mb: import_zod9.z.number(),
|
|
1966
|
+
hourly_rate: import_zod9.z.string(),
|
|
1967
|
+
requires_gpu: import_zod9.z.boolean(),
|
|
1968
|
+
default_disk_size_gb: import_zod9.z.number().default(20),
|
|
1969
|
+
family: import_zod9.z.string().nullable()
|
|
1648
1970
|
}).passthrough();
|
|
1649
|
-
var FamilyGroupSchema =
|
|
1650
|
-
name:
|
|
1651
|
-
items:
|
|
1652
|
-
total:
|
|
1971
|
+
var FamilyGroupSchema = import_zod9.z.object({
|
|
1972
|
+
name: import_zod9.z.string(),
|
|
1973
|
+
items: import_zod9.z.array(InstanceTypeSchema),
|
|
1974
|
+
total: import_zod9.z.number()
|
|
1653
1975
|
}).strict();
|
|
1654
|
-
var AllFamiliesResponseSchema =
|
|
1655
|
-
result:
|
|
1976
|
+
var AllFamiliesResponseSchema = import_zod9.z.object({
|
|
1977
|
+
result: import_zod9.z.array(FamilyGroupSchema)
|
|
1656
1978
|
}).strict();
|
|
1657
|
-
var FamilyInstanceTypesResponseSchema =
|
|
1658
|
-
items:
|
|
1659
|
-
total:
|
|
1660
|
-
family:
|
|
1979
|
+
var FamilyInstanceTypesResponseSchema = import_zod9.z.object({
|
|
1980
|
+
items: import_zod9.z.array(InstanceTypeSchema),
|
|
1981
|
+
total: import_zod9.z.number(),
|
|
1982
|
+
family: import_zod9.z.string()
|
|
1661
1983
|
}).strict();
|
|
1662
|
-
var ListFamilyInstanceTypesRequestSchema =
|
|
1663
|
-
family:
|
|
1984
|
+
var ListFamilyInstanceTypesRequestSchema = import_zod9.z.object({
|
|
1985
|
+
family: import_zod9.z.string()
|
|
1664
1986
|
}).strict();
|
|
1665
1987
|
var { action: listAllInstanceTypeFamilies, safeAction: safeListAllInstanceTypeFamilies } = defineAction(
|
|
1666
1988
|
AllFamiliesResponseSchema,
|
|
@@ -1674,25 +1996,32 @@ var { action: listFamilyInstanceTypes, safeAction: safeListFamilyInstanceTypes }
|
|
|
1674
1996
|
});
|
|
1675
1997
|
|
|
1676
1998
|
// src/actions/workspaces/list_workspaces.ts
|
|
1677
|
-
var
|
|
1678
|
-
var WorkspaceResponseSchema =
|
|
1679
|
-
id:
|
|
1680
|
-
name:
|
|
1681
|
-
slug:
|
|
1682
|
-
avatar_url:
|
|
1683
|
-
tier:
|
|
1684
|
-
role:
|
|
1685
|
-
is_default:
|
|
1686
|
-
created_at:
|
|
1687
|
-
confidential_models_enabled:
|
|
1999
|
+
var import_zod10 = require("zod");
|
|
2000
|
+
var WorkspaceResponseSchema = import_zod10.z.object({
|
|
2001
|
+
id: import_zod10.z.string(),
|
|
2002
|
+
name: import_zod10.z.string(),
|
|
2003
|
+
slug: import_zod10.z.string().nullable(),
|
|
2004
|
+
avatar_url: import_zod10.z.string().nullable().optional(),
|
|
2005
|
+
tier: import_zod10.z.string(),
|
|
2006
|
+
role: import_zod10.z.string(),
|
|
2007
|
+
is_default: import_zod10.z.boolean(),
|
|
2008
|
+
created_at: import_zod10.z.string(),
|
|
2009
|
+
confidential_models_enabled: import_zod10.z.boolean().optional(),
|
|
2010
|
+
/**
|
|
2011
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
2012
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
2013
|
+
*/
|
|
2014
|
+
billing_status: import_zod10.z.enum(["active", "suspended", "abandoned"]).default("active"),
|
|
2015
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
2016
|
+
suspended_at: import_zod10.z.string().nullable().optional()
|
|
1688
2017
|
}).passthrough();
|
|
1689
|
-
var PaginationMetadataSchema =
|
|
1690
|
-
has_more:
|
|
1691
|
-
next_cursor:
|
|
1692
|
-
total:
|
|
2018
|
+
var PaginationMetadataSchema = import_zod10.z.object({
|
|
2019
|
+
has_more: import_zod10.z.boolean(),
|
|
2020
|
+
next_cursor: import_zod10.z.string().nullable(),
|
|
2021
|
+
total: import_zod10.z.number().nullable()
|
|
1693
2022
|
}).passthrough();
|
|
1694
|
-
var ListWorkspacesSchema =
|
|
1695
|
-
data:
|
|
2023
|
+
var ListWorkspacesSchema = import_zod10.z.object({
|
|
2024
|
+
data: import_zod10.z.array(WorkspaceResponseSchema),
|
|
1696
2025
|
pagination: PaginationMetadataSchema
|
|
1697
2026
|
}).passthrough();
|
|
1698
2027
|
var { action: listWorkspaces, safeAction: safeListWorkspaces } = defineAction(ListWorkspacesSchema, async (client, request) => {
|
|
@@ -1708,235 +2037,6 @@ var { action: getWorkspace, safeAction: safeGetWorkspace } = defineAction(Worksp
|
|
|
1708
2037
|
return await client.get(`/workspaces/${teamSlug}`);
|
|
1709
2038
|
});
|
|
1710
2039
|
|
|
1711
|
-
// src/types/cvm_info_v20251028.ts
|
|
1712
|
-
var import_zod9 = require("zod");
|
|
1713
|
-
var TableIdSchema = import_zod9.z.union([import_zod9.z.number(), import_zod9.z.string()]);
|
|
1714
|
-
var VmInfoV20251028Schema = import_zod9.z.object({
|
|
1715
|
-
id: import_zod9.z.string(),
|
|
1716
|
-
name: import_zod9.z.string(),
|
|
1717
|
-
status: import_zod9.z.string(),
|
|
1718
|
-
uptime: import_zod9.z.string(),
|
|
1719
|
-
app_url: import_zod9.z.string().nullable(),
|
|
1720
|
-
app_id: import_zod9.z.string(),
|
|
1721
|
-
instance_id: import_zod9.z.string().nullable(),
|
|
1722
|
-
configuration: import_zod9.z.any().optional(),
|
|
1723
|
-
exited_at: import_zod9.z.string().nullable(),
|
|
1724
|
-
boot_progress: import_zod9.z.string().nullable(),
|
|
1725
|
-
boot_error: import_zod9.z.string().nullable(),
|
|
1726
|
-
shutdown_progress: import_zod9.z.string().nullable(),
|
|
1727
|
-
image_version: import_zod9.z.string().nullable()
|
|
1728
|
-
});
|
|
1729
|
-
var ManagedUserV20251028Schema = import_zod9.z.object({
|
|
1730
|
-
id: TableIdSchema,
|
|
1731
|
-
username: import_zod9.z.string()
|
|
1732
|
-
});
|
|
1733
|
-
var CvmNodeV20251028Schema = import_zod9.z.object({
|
|
1734
|
-
id: import_zod9.z.number(),
|
|
1735
|
-
name: import_zod9.z.string(),
|
|
1736
|
-
region_identifier: import_zod9.z.string().nullable().optional()
|
|
1737
|
-
});
|
|
1738
|
-
var MachineInfoV20251028Schema = import_zod9.z.object({
|
|
1739
|
-
vcpu: import_zod9.z.number(),
|
|
1740
|
-
memory: import_zod9.z.number(),
|
|
1741
|
-
disk_size: import_zod9.z.number(),
|
|
1742
|
-
gpu_count: import_zod9.z.number().default(0)
|
|
1743
|
-
});
|
|
1744
|
-
var CvmNetworkUrlsV20251028Schema = import_zod9.z.object({
|
|
1745
|
-
app: import_zod9.z.string(),
|
|
1746
|
-
instance: import_zod9.z.string()
|
|
1747
|
-
});
|
|
1748
|
-
var CvmInfoV20251028Schema = import_zod9.z.object({
|
|
1749
|
-
hosted: VmInfoV20251028Schema,
|
|
1750
|
-
name: import_zod9.z.string(),
|
|
1751
|
-
managed_user: ManagedUserV20251028Schema.nullable(),
|
|
1752
|
-
node: CvmNodeV20251028Schema.nullable(),
|
|
1753
|
-
listed: import_zod9.z.boolean().default(false),
|
|
1754
|
-
status: import_zod9.z.string(),
|
|
1755
|
-
in_progress: import_zod9.z.boolean().default(false),
|
|
1756
|
-
dapp_dashboard_url: import_zod9.z.string().nullable(),
|
|
1757
|
-
syslog_endpoint: import_zod9.z.string().nullable(),
|
|
1758
|
-
allow_upgrade: import_zod9.z.boolean().default(false),
|
|
1759
|
-
project_id: import_zod9.z.string().nullable(),
|
|
1760
|
-
project_type: import_zod9.z.string().nullable(),
|
|
1761
|
-
billing_period: import_zod9.z.string().nullable(),
|
|
1762
|
-
kms_info: KmsInfoSchema.nullable(),
|
|
1763
|
-
vcpu: import_zod9.z.number().nullable(),
|
|
1764
|
-
memory: import_zod9.z.number().nullable(),
|
|
1765
|
-
disk_size: import_zod9.z.number().nullable(),
|
|
1766
|
-
gateway_domain: import_zod9.z.string().nullable(),
|
|
1767
|
-
public_urls: import_zod9.z.array(CvmNetworkUrlsV20251028Schema),
|
|
1768
|
-
machine_info: MachineInfoV20251028Schema.nullable().optional(),
|
|
1769
|
-
updated_at: import_zod9.z.string().nullable().optional()
|
|
1770
|
-
});
|
|
1771
|
-
var CvmDetailV20251028Schema = import_zod9.z.object({
|
|
1772
|
-
id: TableIdSchema,
|
|
1773
|
-
name: import_zod9.z.string(),
|
|
1774
|
-
status: import_zod9.z.string(),
|
|
1775
|
-
in_progress: import_zod9.z.boolean().optional().default(false),
|
|
1776
|
-
teepod_id: import_zod9.z.number().nullable(),
|
|
1777
|
-
teepod: CvmNodeV20251028Schema.optional().nullable(),
|
|
1778
|
-
app_id: import_zod9.z.string(),
|
|
1779
|
-
vm_uuid: import_zod9.z.string().nullable(),
|
|
1780
|
-
instance_id: import_zod9.z.string().nullable(),
|
|
1781
|
-
vcpu: import_zod9.z.number(),
|
|
1782
|
-
memory: import_zod9.z.number(),
|
|
1783
|
-
disk_size: import_zod9.z.number(),
|
|
1784
|
-
base_image: import_zod9.z.string().nullable(),
|
|
1785
|
-
encrypted_env_pubkey: import_zod9.z.string().nullable(),
|
|
1786
|
-
listed: import_zod9.z.boolean().optional().default(false),
|
|
1787
|
-
project_id: import_zod9.z.string().optional().nullable(),
|
|
1788
|
-
project_type: import_zod9.z.string().optional().nullable(),
|
|
1789
|
-
instance_type: import_zod9.z.string().optional().nullable(),
|
|
1790
|
-
public_sysinfo: import_zod9.z.boolean().optional().default(false),
|
|
1791
|
-
public_logs: import_zod9.z.boolean().optional().default(false),
|
|
1792
|
-
dapp_dashboard_url: import_zod9.z.string().optional().nullable(),
|
|
1793
|
-
syslog_endpoint: import_zod9.z.string().optional().nullable(),
|
|
1794
|
-
kms_info: KmsInfoSchema.optional().nullable(),
|
|
1795
|
-
contract_address: import_zod9.z.string().optional().nullable(),
|
|
1796
|
-
deployer_address: import_zod9.z.string().optional().nullable(),
|
|
1797
|
-
scheduled_delete_at: import_zod9.z.string().optional().nullable(),
|
|
1798
|
-
public_urls: import_zod9.z.array(CvmNetworkUrlsV20251028Schema).optional().default([]),
|
|
1799
|
-
gateway_domain: import_zod9.z.string().optional().nullable(),
|
|
1800
|
-
machine_info: MachineInfoV20251028Schema.optional().nullable(),
|
|
1801
|
-
updated_at: import_zod9.z.string().optional().nullable()
|
|
1802
|
-
});
|
|
1803
|
-
var PaginatedCvmInfosV20251028Schema = import_zod9.z.object({
|
|
1804
|
-
items: import_zod9.z.array(CvmInfoV20251028Schema),
|
|
1805
|
-
total: import_zod9.z.number(),
|
|
1806
|
-
page: import_zod9.z.number(),
|
|
1807
|
-
page_size: import_zod9.z.number(),
|
|
1808
|
-
pages: import_zod9.z.number()
|
|
1809
|
-
});
|
|
1810
|
-
|
|
1811
|
-
// src/types/cvm_info_v20260121.ts
|
|
1812
|
-
var import_zod10 = require("zod");
|
|
1813
|
-
var BillingPeriodSchema = import_zod10.z.enum(["skip", "hourly", "monthly"]);
|
|
1814
|
-
var KmsTypeSchema = import_zod10.z.enum(["phala", "ethereum", "base", "legacy"]);
|
|
1815
|
-
var UserRefSchema = import_zod10.z.object({
|
|
1816
|
-
object_type: import_zod10.z.literal("user"),
|
|
1817
|
-
id: import_zod10.z.string().nullable().optional(),
|
|
1818
|
-
username: import_zod10.z.string().nullable().optional(),
|
|
1819
|
-
avatar_url: import_zod10.z.string().nullable().optional()
|
|
1820
|
-
});
|
|
1821
|
-
var WorkspaceRefSchema = import_zod10.z.object({
|
|
1822
|
-
object_type: import_zod10.z.literal("workspace"),
|
|
1823
|
-
id: import_zod10.z.string(),
|
|
1824
|
-
name: import_zod10.z.string(),
|
|
1825
|
-
slug: import_zod10.z.string().nullable().optional(),
|
|
1826
|
-
avatar_url: import_zod10.z.string().nullable().optional()
|
|
1827
|
-
});
|
|
1828
|
-
var CvmResourceInfoV20260121Schema = import_zod10.z.object({
|
|
1829
|
-
instance_type: import_zod10.z.string().nullable().optional(),
|
|
1830
|
-
vcpu: import_zod10.z.number().int().nullable().optional(),
|
|
1831
|
-
memory_in_gb: import_zod10.z.number().nullable().optional(),
|
|
1832
|
-
disk_in_gb: import_zod10.z.number().int().nullable().optional(),
|
|
1833
|
-
gpus: import_zod10.z.number().int().nullable().optional(),
|
|
1834
|
-
compute_billing_price: import_zod10.z.string().nullable().optional(),
|
|
1835
|
-
billing_period: BillingPeriodSchema.nullable().optional()
|
|
1836
|
-
});
|
|
1837
|
-
var CvmOsInfoV20260121Schema = import_zod10.z.object({
|
|
1838
|
-
name: import_zod10.z.string().nullable().optional(),
|
|
1839
|
-
version: import_zod10.z.string().nullable().optional(),
|
|
1840
|
-
is_dev: import_zod10.z.boolean().nullable().optional(),
|
|
1841
|
-
os_image_hash: import_zod10.z.string().nullable().optional()
|
|
1842
|
-
});
|
|
1843
|
-
var CvmKmsInfoV20260121BaseSchema = import_zod10.z.object({
|
|
1844
|
-
chain_id: import_zod10.z.number().int().nullable().optional(),
|
|
1845
|
-
dstack_kms_address: import_zod10.z.string().nullable().optional(),
|
|
1846
|
-
dstack_app_address: import_zod10.z.string().nullable().optional(),
|
|
1847
|
-
deployer_address: import_zod10.z.string().nullable().optional(),
|
|
1848
|
-
rpc_endpoint: import_zod10.z.string().nullable().optional(),
|
|
1849
|
-
encrypted_env_pubkey: import_zod10.z.string().nullable().optional()
|
|
1850
|
-
});
|
|
1851
|
-
var CvmKmsInfoV20260121Schema = CvmKmsInfoV20260121BaseSchema.transform((data) => {
|
|
1852
|
-
if (data.chain_id != null) {
|
|
1853
|
-
const chain = SUPPORTED_CHAINS[data.chain_id];
|
|
1854
|
-
if (chain) {
|
|
1855
|
-
return { ...data, chain };
|
|
1856
|
-
}
|
|
1857
|
-
}
|
|
1858
|
-
return data;
|
|
1859
|
-
});
|
|
1860
|
-
var CvmProgressInfoV20260121Schema = import_zod10.z.object({
|
|
1861
|
-
target: import_zod10.z.string().nullable().optional(),
|
|
1862
|
-
started_at: import_zod10.z.string().nullable().optional(),
|
|
1863
|
-
correlation_id: import_zod10.z.string().nullable().optional()
|
|
1864
|
-
});
|
|
1865
|
-
var CvmGatewayInfoV20260121Schema = import_zod10.z.object({
|
|
1866
|
-
base_domain: import_zod10.z.string().nullable().optional(),
|
|
1867
|
-
cname: import_zod10.z.string().nullable().optional()
|
|
1868
|
-
});
|
|
1869
|
-
var CvmLogUrlsV20260121Schema = import_zod10.z.object({
|
|
1870
|
-
serial: import_zod10.z.string().nullable().optional(),
|
|
1871
|
-
stdout: import_zod10.z.string().nullable().optional(),
|
|
1872
|
-
stderr: import_zod10.z.string().nullable().optional(),
|
|
1873
|
-
container_log_base: import_zod10.z.string().nullable().optional()
|
|
1874
|
-
});
|
|
1875
|
-
var NodeRefSchema = import_zod10.z.object({
|
|
1876
|
-
object_type: import_zod10.z.literal("node"),
|
|
1877
|
-
id: import_zod10.z.number().int().nullable().optional(),
|
|
1878
|
-
name: import_zod10.z.string().nullable().optional(),
|
|
1879
|
-
region: import_zod10.z.string().nullable().optional(),
|
|
1880
|
-
device_id: import_zod10.z.string().nullable().optional(),
|
|
1881
|
-
ppid: import_zod10.z.string().nullable().optional(),
|
|
1882
|
-
status: import_zod10.z.string().nullable().optional(),
|
|
1883
|
-
version: import_zod10.z.string().nullable().optional()
|
|
1884
|
-
});
|
|
1885
|
-
var CvmNodeInfoV20260121Schema = NodeRefSchema;
|
|
1886
|
-
var CvmInfoV20260121Schema = import_zod10.z.object({
|
|
1887
|
-
id: import_zod10.z.string(),
|
|
1888
|
-
name: import_zod10.z.string(),
|
|
1889
|
-
app_id: import_zod10.z.string().nullable().optional(),
|
|
1890
|
-
vm_uuid: import_zod10.z.string().nullable().optional(),
|
|
1891
|
-
instance_id: import_zod10.z.string().nullable().optional(),
|
|
1892
|
-
resource: CvmResourceInfoV20260121Schema,
|
|
1893
|
-
node_info: NodeRefSchema.nullable().optional(),
|
|
1894
|
-
os: CvmOsInfoV20260121Schema.nullable().optional(),
|
|
1895
|
-
kms_type: KmsTypeSchema.nullable().optional(),
|
|
1896
|
-
kms_info: CvmKmsInfoV20260121Schema.nullable().optional(),
|
|
1897
|
-
status: import_zod10.z.string(),
|
|
1898
|
-
in_progress: import_zod10.z.boolean().optional().default(false),
|
|
1899
|
-
progress: CvmProgressInfoV20260121Schema.nullable().optional(),
|
|
1900
|
-
compose_hash: import_zod10.z.string().nullable().optional(),
|
|
1901
|
-
docker_compose_hash: import_zod10.z.string().nullable().optional(),
|
|
1902
|
-
pre_launch_script_hash: import_zod10.z.string().nullable().optional(),
|
|
1903
|
-
gateway: CvmGatewayInfoV20260121Schema,
|
|
1904
|
-
logs: CvmLogUrlsV20260121Schema.optional().default({}),
|
|
1905
|
-
services: import_zod10.z.array(import_zod10.z.record(import_zod10.z.any())).optional().default([]),
|
|
1906
|
-
endpoints: import_zod10.z.array(CvmNetworkUrlsV20251028Schema).nullable().optional(),
|
|
1907
|
-
public_logs: import_zod10.z.boolean().optional(),
|
|
1908
|
-
public_sysinfo: import_zod10.z.boolean().optional(),
|
|
1909
|
-
public_tcbinfo: import_zod10.z.boolean().optional(),
|
|
1910
|
-
gateway_enabled: import_zod10.z.boolean().optional(),
|
|
1911
|
-
secure_time: import_zod10.z.boolean().optional(),
|
|
1912
|
-
listed: import_zod10.z.boolean().optional().default(false),
|
|
1913
|
-
storage_fs: import_zod10.z.string().optional(),
|
|
1914
|
-
workspace: WorkspaceRefSchema.nullable().optional(),
|
|
1915
|
-
creator: UserRefSchema.nullable().optional(),
|
|
1916
|
-
created_at: import_zod10.z.string().nullable().optional(),
|
|
1917
|
-
deleted_at: import_zod10.z.string().nullable().optional(),
|
|
1918
|
-
project_type: import_zod10.z.string().nullable().optional()
|
|
1919
|
-
});
|
|
1920
|
-
var CvmInfoV20260522Schema = CvmInfoV20260121Schema.extend({
|
|
1921
|
-
id: import_zod10.z.string()
|
|
1922
|
-
});
|
|
1923
|
-
var CvmInfoDetailV20260121Schema = CvmInfoV20260121Schema.extend({
|
|
1924
|
-
compose_file: import_zod10.z.union([import_zod10.z.record(import_zod10.z.any()), import_zod10.z.string()]).nullable().optional()
|
|
1925
|
-
});
|
|
1926
|
-
var CvmInfoDetailV20260522Schema = CvmInfoV20260522Schema.extend({
|
|
1927
|
-
compose_file: import_zod10.z.union([import_zod10.z.record(import_zod10.z.any()), import_zod10.z.string()]).nullable().optional()
|
|
1928
|
-
});
|
|
1929
|
-
var PaginatedCvmInfosV20260121Schema = import_zod10.z.object({
|
|
1930
|
-
items: import_zod10.z.array(CvmInfoV20260121Schema),
|
|
1931
|
-
total: import_zod10.z.number(),
|
|
1932
|
-
page: import_zod10.z.number(),
|
|
1933
|
-
page_size: import_zod10.z.number(),
|
|
1934
|
-
pages: import_zod10.z.number()
|
|
1935
|
-
});
|
|
1936
|
-
var PaginatedCvmInfosV20260522Schema = PaginatedCvmInfosV20260121Schema.extend({
|
|
1937
|
-
items: import_zod10.z.array(CvmInfoV20260522Schema)
|
|
1938
|
-
});
|
|
1939
|
-
|
|
1940
2040
|
// src/types/cvm_id.ts
|
|
1941
2041
|
var import_zod11 = require("zod");
|
|
1942
2042
|
|
|
@@ -2087,9 +2187,8 @@ var import_zod12 = require("zod");
|
|
|
2087
2187
|
var GetCvmListRequestSchema = import_zod12.z.object({
|
|
2088
2188
|
page: import_zod12.z.number().int().min(1).optional(),
|
|
2089
2189
|
page_size: import_zod12.z.number().int().min(1).optional(),
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
user_id: import_zod12.z.string().optional()
|
|
2190
|
+
family: import_zod12.z.enum(["all", "cpu", "gpu"]).optional(),
|
|
2191
|
+
instance_types: import_zod12.z.array(import_zod12.z.string()).optional()
|
|
2093
2192
|
}).strict();
|
|
2094
2193
|
function getSchemaForVersion4(version) {
|
|
2095
2194
|
if (version === "2025-10-28") return PaginatedCvmInfosV20251028Schema;
|
|
@@ -2146,10 +2245,18 @@ var LooseAppComposeSchema = import_zod13.z.object({
|
|
|
2146
2245
|
features: import_zod13.z.array(import_zod13.z.string()).optional(),
|
|
2147
2246
|
name: import_zod13.z.string().optional(),
|
|
2148
2247
|
manifest_version: import_zod13.z.number().optional(),
|
|
2248
|
+
runner: import_zod13.z.string().optional(),
|
|
2149
2249
|
kms_enabled: import_zod13.z.boolean().optional(),
|
|
2250
|
+
gateway_enabled: import_zod13.z.boolean().optional(),
|
|
2251
|
+
tproxy_enabled: import_zod13.z.boolean().optional(),
|
|
2252
|
+
local_key_provider_enabled: import_zod13.z.boolean().optional(),
|
|
2253
|
+
key_provider: import_zod13.z.enum(["none", "kms", "local", "tpm"]).optional(),
|
|
2254
|
+
key_provider_id: import_zod13.z.string().optional(),
|
|
2150
2255
|
public_logs: import_zod13.z.boolean().optional(),
|
|
2151
2256
|
public_sysinfo: import_zod13.z.boolean().optional(),
|
|
2152
|
-
|
|
2257
|
+
public_tcbinfo: import_zod13.z.boolean().optional(),
|
|
2258
|
+
no_instance_id: import_zod13.z.boolean().optional(),
|
|
2259
|
+
secure_time: import_zod13.z.boolean().optional(),
|
|
2153
2260
|
port_policy: import_zod13.z.object({
|
|
2154
2261
|
ports: import_zod13.z.array(
|
|
2155
2262
|
import_zod13.z.object({
|
|
@@ -2160,6 +2267,7 @@ var LooseAppComposeSchema = import_zod13.z.object({
|
|
|
2160
2267
|
restrict_mode: import_zod13.z.boolean()
|
|
2161
2268
|
}).optional(),
|
|
2162
2269
|
storage_fs: import_zod13.z.enum(["ext4", "zfs"]).optional(),
|
|
2270
|
+
swap_size: import_zod13.z.string().optional(),
|
|
2163
2271
|
pre_launch_script: import_zod13.z.string().optional(),
|
|
2164
2272
|
env_pubkey: import_zod13.z.string().optional(),
|
|
2165
2273
|
salt: import_zod13.z.string().optional().nullable()
|
|
@@ -2180,7 +2288,9 @@ var ProvisionCvmSchema = import_zod14.z.object({
|
|
|
2180
2288
|
teepod_id: import_zod14.z.number().nullable().optional(),
|
|
2181
2289
|
// Will be transformed to node_id
|
|
2182
2290
|
node_id: import_zod14.z.number().nullable().optional(),
|
|
2183
|
-
|
|
2291
|
+
/** @deprecated Identifies a KMS node, not the on-chain KMS contract. Use kms_contract_id. */
|
|
2292
|
+
kms_id: import_zod14.z.string().nullable().optional(),
|
|
2293
|
+
kms_contract_id: import_zod14.z.union([import_zod14.z.string(), import_zod14.z.number()]).nullable().optional()
|
|
2184
2294
|
}).passthrough().transform((data) => {
|
|
2185
2295
|
if ("teepod_id" in data && data.teepod_id !== void 0) {
|
|
2186
2296
|
const { teepod_id, ...rest } = data;
|
|
@@ -2212,13 +2322,24 @@ var ProvisionCvmRequestSchema = import_zod14.z.object({
|
|
|
2212
2322
|
name: import_zod14.z.string().optional().default(""),
|
|
2213
2323
|
// optional with default empty string
|
|
2214
2324
|
kms_enabled: import_zod14.z.boolean().optional(),
|
|
2215
|
-
public_logs: import_zod14.z.boolean().optional(),
|
|
2216
|
-
public_sysinfo: import_zod14.z.boolean().optional(),
|
|
2217
2325
|
gateway_enabled: import_zod14.z.boolean().optional(),
|
|
2218
2326
|
// recommended
|
|
2219
2327
|
tproxy_enabled: import_zod14.z.boolean().optional(),
|
|
2220
2328
|
// deprecated, for compatibility
|
|
2221
|
-
|
|
2329
|
+
local_key_provider_enabled: import_zod14.z.boolean().optional(),
|
|
2330
|
+
key_provider: import_zod14.z.enum(["none", "kms", "local", "tpm"]).optional(),
|
|
2331
|
+
key_provider_id: import_zod14.z.string().optional(),
|
|
2332
|
+
public_logs: import_zod14.z.boolean().optional(),
|
|
2333
|
+
public_sysinfo: import_zod14.z.boolean().optional(),
|
|
2334
|
+
public_tcbinfo: import_zod14.z.boolean().optional(),
|
|
2335
|
+
no_instance_id: import_zod14.z.boolean().optional(),
|
|
2336
|
+
secure_time: import_zod14.z.boolean().optional(),
|
|
2337
|
+
storage_fs: import_zod14.z.enum(["ext4", "zfs"]).optional(),
|
|
2338
|
+
swap_size: import_zod14.z.string().optional(),
|
|
2339
|
+
port_policy: import_zod14.z.object({
|
|
2340
|
+
ports: import_zod14.z.array(import_zod14.z.object({ port: import_zod14.z.number(), pp: import_zod14.z.boolean() })),
|
|
2341
|
+
restrict_mode: import_zod14.z.boolean()
|
|
2342
|
+
}).optional()
|
|
2222
2343
|
}).passthrough().superRefine((data, ctx) => {
|
|
2223
2344
|
validateComposePayloadSize(data.docker_compose_file, data.pre_launch_script, ctx);
|
|
2224
2345
|
}),
|
|
@@ -2319,7 +2440,9 @@ var CommitCvmProvisionRequestSchema = import_zod15.z.object({
|
|
|
2319
2440
|
encrypted_env: import_zod15.z.string().optional().nullable(),
|
|
2320
2441
|
app_id: import_zod15.z.string(),
|
|
2321
2442
|
compose_hash: import_zod15.z.string(),
|
|
2443
|
+
/** @deprecated Identifies a KMS node, not the on-chain KMS contract. Use kms_contract_id. */
|
|
2322
2444
|
kms_id: import_zod15.z.string().optional(),
|
|
2445
|
+
kms_contract_id: import_zod15.z.union([import_zod15.z.string(), import_zod15.z.number()]).optional(),
|
|
2323
2446
|
contract_address: import_zod15.z.string().optional(),
|
|
2324
2447
|
deployer_address: import_zod15.z.string().optional(),
|
|
2325
2448
|
env_keys: import_zod15.z.array(import_zod15.z.string()).optional().nullable()
|
|
@@ -2441,7 +2564,8 @@ var ProvisionCvmComposeFileUpdateResultSchema = import_zod16.z.object({
|
|
|
2441
2564
|
device_id: import_zod16.z.string().nullable(),
|
|
2442
2565
|
compose_hash: import_zod16.z.string(),
|
|
2443
2566
|
kms_info: KmsInfoSchema.nullable().optional(),
|
|
2444
|
-
compose_hash_registered: import_zod16.z.boolean().optional().default(false)
|
|
2567
|
+
compose_hash_registered: import_zod16.z.boolean().optional().default(false),
|
|
2568
|
+
compose_unchanged: import_zod16.z.boolean().optional().default(false)
|
|
2445
2569
|
}).passthrough();
|
|
2446
2570
|
var { action: provisionCvmComposeFileUpdate, safeAction: safeProvisionCvmComposeFileUpdate } = defineAction(ProvisionCvmComposeFileUpdateResultSchema, async (client, request) => {
|
|
2447
2571
|
const validatedRequest = ProvisionCvmComposeFileUpdateRequestSchema.parse(request);
|
|
@@ -2605,9 +2729,14 @@ var UpdateDockerComposePreconditionRequiredSchema = import_zod19.z.object({
|
|
|
2605
2729
|
device_id: import_zod19.z.string(),
|
|
2606
2730
|
kms_info: KmsInfoSchema
|
|
2607
2731
|
});
|
|
2732
|
+
var UpdateDockerComposeNoChangeSchema = import_zod19.z.object({
|
|
2733
|
+
status: import_zod19.z.literal("no_change"),
|
|
2734
|
+
message: import_zod19.z.string()
|
|
2735
|
+
});
|
|
2608
2736
|
var UpdateDockerComposeResultSchema = import_zod19.z.union([
|
|
2609
2737
|
UpdateDockerComposeInProgressSchema,
|
|
2610
|
-
UpdateDockerComposePreconditionRequiredSchema
|
|
2738
|
+
UpdateDockerComposePreconditionRequiredSchema,
|
|
2739
|
+
UpdateDockerComposeNoChangeSchema
|
|
2611
2740
|
]);
|
|
2612
2741
|
var { action: updateDockerCompose, safeAction: safeUpdateDockerCompose } = defineAction(UpdateDockerComposeResultSchema, async (client, request) => {
|
|
2613
2742
|
const validatedRequest = UpdateDockerComposeRequestSchema.parse(request);
|
|
@@ -2689,9 +2818,14 @@ var UpdatePreLaunchScriptPreconditionRequiredSchema = import_zod20.z.object({
|
|
|
2689
2818
|
device_id: import_zod20.z.string(),
|
|
2690
2819
|
kms_info: KmsInfoSchema
|
|
2691
2820
|
});
|
|
2821
|
+
var UpdatePreLaunchScriptNoChangeSchema = import_zod20.z.object({
|
|
2822
|
+
status: import_zod20.z.literal("no_change"),
|
|
2823
|
+
message: import_zod20.z.string()
|
|
2824
|
+
});
|
|
2692
2825
|
var UpdatePreLaunchScriptResultSchema = import_zod20.z.union([
|
|
2693
2826
|
UpdatePreLaunchScriptInProgressSchema,
|
|
2694
|
-
UpdatePreLaunchScriptPreconditionRequiredSchema
|
|
2827
|
+
UpdatePreLaunchScriptPreconditionRequiredSchema,
|
|
2828
|
+
UpdatePreLaunchScriptNoChangeSchema
|
|
2695
2829
|
]);
|
|
2696
2830
|
var { action: updatePreLaunchScript, safeAction: safeUpdatePreLaunchScript } = defineAction(UpdatePreLaunchScriptResultSchema, async (client, request) => {
|
|
2697
2831
|
const validatedRequest = UpdatePreLaunchScriptRequestSchema.parse(request);
|
|
@@ -2853,7 +2987,9 @@ var GetKmsInfoRequestSchema = import_zod24.z.object({
|
|
|
2853
2987
|
});
|
|
2854
2988
|
var { action: getKmsInfo, safeAction: safeGetKmsInfo } = defineAction(KmsInfoSchema, async (client, request) => {
|
|
2855
2989
|
const validatedRequest = GetKmsInfoRequestSchema.parse(request);
|
|
2856
|
-
return await client.get(`/kms/${validatedRequest.kms_id}
|
|
2990
|
+
return await client.get(`/kms/${validatedRequest.kms_id}`, {
|
|
2991
|
+
headers: { "X-Phala-Version": "2026-05-22" }
|
|
2992
|
+
});
|
|
2857
2993
|
});
|
|
2858
2994
|
|
|
2859
2995
|
// src/actions/kms/get_kms_list.ts
|
|
@@ -2872,37 +3008,119 @@ var GetKmsListSchema = import_zod25.z.object({
|
|
|
2872
3008
|
}).strict();
|
|
2873
3009
|
var { action: getKmsList, safeAction: safeGetKmsList } = defineAction(GetKmsListSchema, async (client, request) => {
|
|
2874
3010
|
const validatedRequest = GetKmsListRequestSchema.parse(request ?? {});
|
|
2875
|
-
return await client.get("/kms", {
|
|
3011
|
+
return await client.get("/kms", {
|
|
3012
|
+
params: validatedRequest,
|
|
3013
|
+
headers: { "X-Phala-Version": "2026-05-22" }
|
|
3014
|
+
});
|
|
2876
3015
|
});
|
|
2877
3016
|
|
|
2878
|
-
// src/actions/kms/
|
|
3017
|
+
// src/actions/kms/list_kms_contracts.ts
|
|
3018
|
+
var import_zod27 = require("zod");
|
|
3019
|
+
|
|
3020
|
+
// src/types/kms_contract.ts
|
|
2879
3021
|
var import_zod26 = require("zod");
|
|
2880
|
-
var
|
|
2881
|
-
|
|
2882
|
-
|
|
3022
|
+
var KmsContractInfoSchema = import_zod26.z.object({
|
|
3023
|
+
id: import_zod26.z.string(),
|
|
3024
|
+
slug: import_zod26.z.string().nullable(),
|
|
3025
|
+
label: import_zod26.z.string().nullable(),
|
|
3026
|
+
contract_address: import_zod26.z.string(),
|
|
3027
|
+
chain_id: import_zod26.z.number(),
|
|
3028
|
+
k256_pubkey: import_zod26.z.string().nullable(),
|
|
3029
|
+
ca_pubkey: import_zod26.z.string().nullable(),
|
|
3030
|
+
node_count: import_zod26.z.number()
|
|
3031
|
+
}).passthrough();
|
|
3032
|
+
var KmsContractNodeSchema = import_zod26.z.object({
|
|
3033
|
+
id: import_zod26.z.string(),
|
|
3034
|
+
slug: import_zod26.z.string().nullable(),
|
|
3035
|
+
url: import_zod26.z.string(),
|
|
3036
|
+
version: import_zod26.z.string(),
|
|
3037
|
+
kms_type: import_zod26.z.string()
|
|
3038
|
+
}).passthrough();
|
|
3039
|
+
|
|
3040
|
+
// src/actions/kms/list_kms_contracts.ts
|
|
3041
|
+
var KMS_CONTRACT_API_VERSION = "2026-06-23";
|
|
3042
|
+
var ListKmsContractsRequestSchema = import_zod27.z.object({
|
|
3043
|
+
page: import_zod27.z.number().int().min(1).optional(),
|
|
3044
|
+
page_size: import_zod27.z.number().int().min(1).optional(),
|
|
3045
|
+
is_onchain: import_zod27.z.boolean().optional()
|
|
3046
|
+
}).strict();
|
|
3047
|
+
var ListKmsContractsSchema = import_zod27.z.object({
|
|
3048
|
+
items: import_zod27.z.array(KmsContractInfoSchema),
|
|
3049
|
+
total: import_zod27.z.number(),
|
|
3050
|
+
page: import_zod27.z.number(),
|
|
3051
|
+
page_size: import_zod27.z.number(),
|
|
3052
|
+
pages: import_zod27.z.number()
|
|
3053
|
+
}).strict();
|
|
3054
|
+
var { action: listKmsContracts, safeAction: safeListKmsContracts } = defineAction(ListKmsContractsSchema, async (client, request) => {
|
|
3055
|
+
const validatedRequest = ListKmsContractsRequestSchema.parse(request ?? {});
|
|
3056
|
+
return await client.get("/kms", {
|
|
3057
|
+
params: validatedRequest,
|
|
3058
|
+
headers: { "X-Phala-Version": KMS_CONTRACT_API_VERSION }
|
|
3059
|
+
});
|
|
3060
|
+
});
|
|
3061
|
+
|
|
3062
|
+
// src/actions/kms/get_kms_contract.ts
|
|
3063
|
+
var import_zod28 = require("zod");
|
|
3064
|
+
var KMS_CONTRACT_API_VERSION2 = "2026-06-23";
|
|
3065
|
+
var GetKmsContractRequestSchema = import_zod28.z.object({
|
|
3066
|
+
// Contract slug (documented). A kc_ hashed id also resolves.
|
|
3067
|
+
slug: import_zod28.z.string().min(1, "KMS contract slug is required")
|
|
3068
|
+
}).strict();
|
|
3069
|
+
var { action: getKmsContract, safeAction: safeGetKmsContract } = defineAction(KmsContractInfoSchema, async (client, payload) => {
|
|
3070
|
+
const { slug } = GetKmsContractRequestSchema.parse(payload);
|
|
3071
|
+
return await client.get(`/kms/${slug}`, {
|
|
3072
|
+
headers: { "X-Phala-Version": KMS_CONTRACT_API_VERSION2 }
|
|
3073
|
+
});
|
|
3074
|
+
});
|
|
3075
|
+
|
|
3076
|
+
// src/actions/kms/list_kms_contract_nodes.ts
|
|
3077
|
+
var import_zod29 = require("zod");
|
|
3078
|
+
var KMS_CONTRACT_API_VERSION3 = "2026-06-23";
|
|
3079
|
+
var ListKmsContractNodesRequestSchema = import_zod29.z.object({
|
|
3080
|
+
// Contract slug (documented). A kc_ hashed id also resolves.
|
|
3081
|
+
slug: import_zod29.z.string().min(1, "KMS contract slug is required")
|
|
3082
|
+
}).strict();
|
|
3083
|
+
var ListKmsContractNodesSchema = import_zod29.z.object({
|
|
3084
|
+
items: import_zod29.z.array(KmsContractNodeSchema),
|
|
3085
|
+
total: import_zod29.z.number()
|
|
3086
|
+
}).strict();
|
|
3087
|
+
var { action: listKmsContractNodes, safeAction: safeListKmsContractNodes } = defineAction(ListKmsContractNodesSchema, async (client, payload) => {
|
|
3088
|
+
const { slug } = ListKmsContractNodesRequestSchema.parse(payload);
|
|
3089
|
+
return await client.get(`/kms/${slug}/nodes`, {
|
|
3090
|
+
headers: { "X-Phala-Version": KMS_CONTRACT_API_VERSION3 }
|
|
3091
|
+
});
|
|
3092
|
+
});
|
|
3093
|
+
|
|
3094
|
+
// src/actions/kms/get_app_env_encrypt_pubkey.ts
|
|
3095
|
+
var import_zod30 = require("zod");
|
|
3096
|
+
var GetAppEnvEncryptPubKeyRequestSchema = import_zod30.z.object({
|
|
3097
|
+
kms: import_zod30.z.string().min(1, "KMS ID or slug is required"),
|
|
3098
|
+
app_id: import_zod30.z.string().refine(
|
|
2883
3099
|
(val) => val.length === 40 || val.startsWith("0x") && val.length === 42,
|
|
2884
3100
|
"App ID must be exactly 40 characters or 42 characters with 0x prefix"
|
|
2885
3101
|
)
|
|
2886
3102
|
}).strict();
|
|
2887
|
-
var GetAppEnvEncryptPubKeySchema =
|
|
2888
|
-
public_key:
|
|
2889
|
-
signature:
|
|
3103
|
+
var GetAppEnvEncryptPubKeySchema = import_zod30.z.object({
|
|
3104
|
+
public_key: import_zod30.z.string(),
|
|
3105
|
+
signature: import_zod30.z.string()
|
|
2890
3106
|
}).strict();
|
|
2891
3107
|
var { action: getAppEnvEncryptPubKey, safeAction: safeGetAppEnvEncryptPubKey } = defineAction(GetAppEnvEncryptPubKeySchema, async (client, payload) => {
|
|
2892
3108
|
const validatedRequest = GetAppEnvEncryptPubKeyRequestSchema.parse(payload);
|
|
2893
|
-
return await client.get(`/kms/${validatedRequest.kms}/pubkey/${validatedRequest.app_id}
|
|
3109
|
+
return await client.get(`/kms/${validatedRequest.kms}/pubkey/${validatedRequest.app_id}`, {
|
|
3110
|
+
headers: { "X-Phala-Version": "2026-05-22" }
|
|
3111
|
+
});
|
|
2894
3112
|
});
|
|
2895
3113
|
|
|
2896
3114
|
// src/actions/kms/next_app_ids.ts
|
|
2897
|
-
var
|
|
2898
|
-
var NextAppIdsRequestSchema =
|
|
2899
|
-
counts:
|
|
3115
|
+
var import_zod31 = require("zod");
|
|
3116
|
+
var NextAppIdsRequestSchema = import_zod31.z.object({
|
|
3117
|
+
counts: import_zod31.z.number().int().min(1).max(20).optional().default(1)
|
|
2900
3118
|
}).strict();
|
|
2901
|
-
var NextAppIdsSchema =
|
|
2902
|
-
app_ids:
|
|
2903
|
-
|
|
2904
|
-
app_id:
|
|
2905
|
-
nonce:
|
|
3119
|
+
var NextAppIdsSchema = import_zod31.z.object({
|
|
3120
|
+
app_ids: import_zod31.z.array(
|
|
3121
|
+
import_zod31.z.object({
|
|
3122
|
+
app_id: import_zod31.z.string(),
|
|
3123
|
+
nonce: import_zod31.z.number().int().min(0)
|
|
2906
3124
|
})
|
|
2907
3125
|
)
|
|
2908
3126
|
}).strict();
|
|
@@ -2914,41 +3132,41 @@ var { action: nextAppIds, safeAction: safeNextAppIds } = defineAction(NextAppIds
|
|
|
2914
3132
|
});
|
|
2915
3133
|
|
|
2916
3134
|
// src/types/cvm_info.ts
|
|
2917
|
-
var
|
|
2918
|
-
var VMBaseSchema =
|
|
2919
|
-
name:
|
|
2920
|
-
status:
|
|
2921
|
-
teepod_id:
|
|
2922
|
-
teepod:
|
|
2923
|
-
id:
|
|
2924
|
-
name:
|
|
2925
|
-
region_identifier:
|
|
3135
|
+
var import_zod32 = require("zod");
|
|
3136
|
+
var VMBaseSchema = import_zod32.z.object({
|
|
3137
|
+
name: import_zod32.z.string(),
|
|
3138
|
+
status: import_zod32.z.string(),
|
|
3139
|
+
teepod_id: import_zod32.z.number(),
|
|
3140
|
+
teepod: import_zod32.z.object({
|
|
3141
|
+
id: import_zod32.z.number(),
|
|
3142
|
+
name: import_zod32.z.string(),
|
|
3143
|
+
region_identifier: import_zod32.z.string().nullable().optional()
|
|
2926
3144
|
}).optional().nullable(),
|
|
2927
|
-
app_id:
|
|
2928
|
-
vm_uuid:
|
|
2929
|
-
instance_id:
|
|
2930
|
-
app_url:
|
|
2931
|
-
base_image:
|
|
2932
|
-
vcpu:
|
|
2933
|
-
memory:
|
|
2934
|
-
disk_size:
|
|
2935
|
-
manifest_version:
|
|
2936
|
-
version:
|
|
2937
|
-
runner:
|
|
2938
|
-
docker_compose_file:
|
|
2939
|
-
features:
|
|
2940
|
-
created_at:
|
|
2941
|
-
encrypted_env_pubkey:
|
|
3145
|
+
app_id: import_zod32.z.string(),
|
|
3146
|
+
vm_uuid: import_zod32.z.string().nullable(),
|
|
3147
|
+
instance_id: import_zod32.z.string().nullable(),
|
|
3148
|
+
app_url: import_zod32.z.string().optional().nullable(),
|
|
3149
|
+
base_image: import_zod32.z.string().optional().nullable(),
|
|
3150
|
+
vcpu: import_zod32.z.number(),
|
|
3151
|
+
memory: import_zod32.z.number(),
|
|
3152
|
+
disk_size: import_zod32.z.number(),
|
|
3153
|
+
manifest_version: import_zod32.z.number().optional().nullable(),
|
|
3154
|
+
version: import_zod32.z.string().optional().nullable(),
|
|
3155
|
+
runner: import_zod32.z.string().optional().nullable(),
|
|
3156
|
+
docker_compose_file: import_zod32.z.string().optional().nullable(),
|
|
3157
|
+
features: import_zod32.z.array(import_zod32.z.string()).optional().nullable(),
|
|
3158
|
+
created_at: import_zod32.z.string(),
|
|
3159
|
+
encrypted_env_pubkey: import_zod32.z.string().nullable()
|
|
2942
3160
|
});
|
|
2943
3161
|
var VMV20260121Schema = VMBaseSchema.extend({
|
|
2944
|
-
id:
|
|
2945
|
-
user_id:
|
|
3162
|
+
id: import_zod32.z.number(),
|
|
3163
|
+
user_id: import_zod32.z.number().optional().nullable()
|
|
2946
3164
|
});
|
|
2947
3165
|
var VMV20260522Schema = VMBaseSchema.extend({
|
|
2948
|
-
id:
|
|
2949
|
-
user_id:
|
|
3166
|
+
id: import_zod32.z.string(),
|
|
3167
|
+
user_id: import_zod32.z.string().optional().nullable()
|
|
2950
3168
|
});
|
|
2951
|
-
var VMAnySchema =
|
|
3169
|
+
var VMAnySchema = import_zod32.z.union([VMV20260121Schema, VMV20260522Schema]);
|
|
2952
3170
|
var VMSchema = VMV20260522Schema;
|
|
2953
3171
|
function getVMSchemaForVersion(version) {
|
|
2954
3172
|
if (version === "2026-01-21") return VMV20260121Schema;
|
|
@@ -3031,10 +3249,10 @@ async function safeShutdownCvm(client, request) {
|
|
|
3031
3249
|
}
|
|
3032
3250
|
|
|
3033
3251
|
// src/actions/cvms/restart_cvm.ts
|
|
3034
|
-
var
|
|
3252
|
+
var import_zod33 = require("zod");
|
|
3035
3253
|
var RestartCvmRequestSchema = refineCvmId(
|
|
3036
3254
|
CvmIdObjectSchema.extend({
|
|
3037
|
-
force:
|
|
3255
|
+
force: import_zod33.z.boolean().optional()
|
|
3038
3256
|
})
|
|
3039
3257
|
);
|
|
3040
3258
|
async function restartCvm(client, request) {
|
|
@@ -3063,10 +3281,10 @@ async function safeRestartCvm(client, request) {
|
|
|
3063
3281
|
}
|
|
3064
3282
|
|
|
3065
3283
|
// src/actions/cvms/delete_cvm.ts
|
|
3066
|
-
var
|
|
3284
|
+
var import_zod34 = require("zod");
|
|
3067
3285
|
var DeleteCvmRequestSchema = CvmIdSchema;
|
|
3068
3286
|
var { action: deleteCvm, safeAction: safeDeleteCvm } = defineAction(
|
|
3069
|
-
|
|
3287
|
+
import_zod34.z.void(),
|
|
3070
3288
|
async (client, request) => {
|
|
3071
3289
|
const { cvmId } = DeleteCvmRequestSchema.parse(request);
|
|
3072
3290
|
await client.delete(`/cvms/${cvmId}`);
|
|
@@ -3075,41 +3293,41 @@ var { action: deleteCvm, safeAction: safeDeleteCvm } = defineAction(
|
|
|
3075
3293
|
);
|
|
3076
3294
|
|
|
3077
3295
|
// src/actions/cvms/get_cvm_stats.ts
|
|
3078
|
-
var
|
|
3079
|
-
var DiskInfoSchema =
|
|
3080
|
-
name:
|
|
3081
|
-
mount_point:
|
|
3082
|
-
total_size:
|
|
3083
|
-
free_size:
|
|
3084
|
-
});
|
|
3085
|
-
var SystemInfoSchema =
|
|
3086
|
-
os_name:
|
|
3087
|
-
os_version:
|
|
3088
|
-
kernel_version:
|
|
3089
|
-
cpu_model:
|
|
3090
|
-
num_cpus:
|
|
3091
|
-
total_memory:
|
|
3092
|
-
available_memory:
|
|
3093
|
-
used_memory:
|
|
3094
|
-
free_memory:
|
|
3095
|
-
total_swap:
|
|
3096
|
-
used_swap:
|
|
3097
|
-
free_swap:
|
|
3098
|
-
uptime:
|
|
3099
|
-
loadavg_one:
|
|
3100
|
-
loadavg_five:
|
|
3101
|
-
loadavg_fifteen:
|
|
3102
|
-
disks:
|
|
3103
|
-
});
|
|
3104
|
-
var CvmSystemInfoSchema =
|
|
3105
|
-
is_online:
|
|
3106
|
-
is_public:
|
|
3107
|
-
error:
|
|
3296
|
+
var import_zod35 = require("zod");
|
|
3297
|
+
var DiskInfoSchema = import_zod35.z.object({
|
|
3298
|
+
name: import_zod35.z.string(),
|
|
3299
|
+
mount_point: import_zod35.z.string(),
|
|
3300
|
+
total_size: import_zod35.z.number(),
|
|
3301
|
+
free_size: import_zod35.z.number()
|
|
3302
|
+
});
|
|
3303
|
+
var SystemInfoSchema = import_zod35.z.object({
|
|
3304
|
+
os_name: import_zod35.z.string(),
|
|
3305
|
+
os_version: import_zod35.z.string(),
|
|
3306
|
+
kernel_version: import_zod35.z.string(),
|
|
3307
|
+
cpu_model: import_zod35.z.string(),
|
|
3308
|
+
num_cpus: import_zod35.z.number(),
|
|
3309
|
+
total_memory: import_zod35.z.number(),
|
|
3310
|
+
available_memory: import_zod35.z.number(),
|
|
3311
|
+
used_memory: import_zod35.z.number(),
|
|
3312
|
+
free_memory: import_zod35.z.number(),
|
|
3313
|
+
total_swap: import_zod35.z.number(),
|
|
3314
|
+
used_swap: import_zod35.z.number(),
|
|
3315
|
+
free_swap: import_zod35.z.number(),
|
|
3316
|
+
uptime: import_zod35.z.number(),
|
|
3317
|
+
loadavg_one: import_zod35.z.number(),
|
|
3318
|
+
loadavg_five: import_zod35.z.number(),
|
|
3319
|
+
loadavg_fifteen: import_zod35.z.number(),
|
|
3320
|
+
disks: import_zod35.z.array(DiskInfoSchema)
|
|
3321
|
+
});
|
|
3322
|
+
var CvmSystemInfoSchema = import_zod35.z.object({
|
|
3323
|
+
is_online: import_zod35.z.boolean(),
|
|
3324
|
+
is_public: import_zod35.z.boolean().default(false),
|
|
3325
|
+
error: import_zod35.z.string().nullable(),
|
|
3108
3326
|
sysinfo: SystemInfoSchema.nullable(),
|
|
3109
|
-
status:
|
|
3110
|
-
in_progress:
|
|
3111
|
-
boot_progress:
|
|
3112
|
-
boot_error:
|
|
3327
|
+
status: import_zod35.z.string().nullable(),
|
|
3328
|
+
in_progress: import_zod35.z.boolean().default(false),
|
|
3329
|
+
boot_progress: import_zod35.z.string().nullable(),
|
|
3330
|
+
boot_error: import_zod35.z.string().nullable()
|
|
3113
3331
|
});
|
|
3114
3332
|
var GetCvmStatsRequestSchema = CvmIdSchema;
|
|
3115
3333
|
var { action: getCvmStats, safeAction: safeGetCvmStats } = defineAction(CvmSystemInfoSchema, async (client, request) => {
|
|
@@ -3118,18 +3336,18 @@ var { action: getCvmStats, safeAction: safeGetCvmStats } = defineAction(CvmSyste
|
|
|
3118
3336
|
});
|
|
3119
3337
|
|
|
3120
3338
|
// src/actions/cvms/get_cvm_network.ts
|
|
3121
|
-
var
|
|
3122
|
-
var CvmNetworkUrlsSchema =
|
|
3123
|
-
app:
|
|
3124
|
-
instance:
|
|
3125
|
-
});
|
|
3126
|
-
var CvmNetworkSchema =
|
|
3127
|
-
is_online:
|
|
3128
|
-
is_public:
|
|
3129
|
-
error:
|
|
3130
|
-
internal_ip:
|
|
3131
|
-
latest_handshake:
|
|
3132
|
-
public_urls:
|
|
3339
|
+
var import_zod36 = require("zod");
|
|
3340
|
+
var CvmNetworkUrlsSchema = import_zod36.z.object({
|
|
3341
|
+
app: import_zod36.z.string(),
|
|
3342
|
+
instance: import_zod36.z.string()
|
|
3343
|
+
});
|
|
3344
|
+
var CvmNetworkSchema = import_zod36.z.object({
|
|
3345
|
+
is_online: import_zod36.z.boolean(),
|
|
3346
|
+
is_public: import_zod36.z.boolean().default(true),
|
|
3347
|
+
error: import_zod36.z.string().nullable(),
|
|
3348
|
+
internal_ip: import_zod36.z.string().nullable(),
|
|
3349
|
+
latest_handshake: import_zod36.z.string().nullable(),
|
|
3350
|
+
public_urls: import_zod36.z.array(CvmNetworkUrlsSchema).nullable()
|
|
3133
3351
|
});
|
|
3134
3352
|
var GetCvmNetworkRequestSchema = CvmIdSchema;
|
|
3135
3353
|
var { action: getCvmNetwork, safeAction: safeGetCvmNetwork } = defineAction(CvmNetworkSchema, async (client, request) => {
|
|
@@ -3138,36 +3356,36 @@ var { action: getCvmNetwork, safeAction: safeGetCvmNetwork } = defineAction(CvmN
|
|
|
3138
3356
|
});
|
|
3139
3357
|
|
|
3140
3358
|
// src/actions/cvms/get_cvm_docker_compose.ts
|
|
3141
|
-
var
|
|
3359
|
+
var import_zod37 = require("zod");
|
|
3142
3360
|
var GetCvmDockerComposeRequestSchema = CvmIdSchema;
|
|
3143
|
-
var { action: getCvmDockerCompose, safeAction: safeGetCvmDockerCompose } = defineAction(
|
|
3361
|
+
var { action: getCvmDockerCompose, safeAction: safeGetCvmDockerCompose } = defineAction(import_zod37.z.string(), async (client, request) => {
|
|
3144
3362
|
const { cvmId } = GetCvmDockerComposeRequestSchema.parse(request);
|
|
3145
3363
|
return await client.get(`/cvms/${cvmId}/docker-compose.yml`);
|
|
3146
3364
|
});
|
|
3147
3365
|
|
|
3148
3366
|
// src/actions/cvms/get_cvm_containers_stats.ts
|
|
3149
|
-
var
|
|
3150
|
-
var ContainerInfoSchema =
|
|
3151
|
-
id:
|
|
3152
|
-
names:
|
|
3153
|
-
image:
|
|
3154
|
-
image_id:
|
|
3155
|
-
command:
|
|
3156
|
-
created:
|
|
3157
|
-
state:
|
|
3158
|
-
status:
|
|
3159
|
-
log_endpoint:
|
|
3160
|
-
});
|
|
3161
|
-
var CvmContainersStatsSchema =
|
|
3162
|
-
is_online:
|
|
3163
|
-
is_public:
|
|
3164
|
-
error:
|
|
3165
|
-
docker_compose_file:
|
|
3166
|
-
manifest_version:
|
|
3167
|
-
version:
|
|
3168
|
-
runner:
|
|
3169
|
-
features:
|
|
3170
|
-
containers:
|
|
3367
|
+
var import_zod38 = require("zod");
|
|
3368
|
+
var ContainerInfoSchema = import_zod38.z.object({
|
|
3369
|
+
id: import_zod38.z.string(),
|
|
3370
|
+
names: import_zod38.z.array(import_zod38.z.string()),
|
|
3371
|
+
image: import_zod38.z.string(),
|
|
3372
|
+
image_id: import_zod38.z.string(),
|
|
3373
|
+
command: import_zod38.z.string().nullable().optional(),
|
|
3374
|
+
created: import_zod38.z.number(),
|
|
3375
|
+
state: import_zod38.z.string(),
|
|
3376
|
+
status: import_zod38.z.string(),
|
|
3377
|
+
log_endpoint: import_zod38.z.string().nullable()
|
|
3378
|
+
});
|
|
3379
|
+
var CvmContainersStatsSchema = import_zod38.z.object({
|
|
3380
|
+
is_online: import_zod38.z.boolean(),
|
|
3381
|
+
is_public: import_zod38.z.boolean().default(true),
|
|
3382
|
+
error: import_zod38.z.string().nullable(),
|
|
3383
|
+
docker_compose_file: import_zod38.z.string().nullable(),
|
|
3384
|
+
manifest_version: import_zod38.z.number().nullable(),
|
|
3385
|
+
version: import_zod38.z.string().nullable(),
|
|
3386
|
+
runner: import_zod38.z.string().nullable(),
|
|
3387
|
+
features: import_zod38.z.array(import_zod38.z.string()).nullable(),
|
|
3388
|
+
containers: import_zod38.z.array(ContainerInfoSchema).nullable()
|
|
3171
3389
|
});
|
|
3172
3390
|
var GetCvmContainersStatsRequestSchema = CvmIdSchema;
|
|
3173
3391
|
var { action: getCvmContainersStats, safeAction: safeGetCvmContainersStats } = defineAction(CvmContainersStatsSchema, async (client, request) => {
|
|
@@ -3176,62 +3394,62 @@ var { action: getCvmContainersStats, safeAction: safeGetCvmContainersStats } = d
|
|
|
3176
3394
|
});
|
|
3177
3395
|
|
|
3178
3396
|
// src/actions/cvms/get_cvm_attestation.ts
|
|
3179
|
-
var
|
|
3180
|
-
var CertificateSubjectSchema =
|
|
3181
|
-
common_name:
|
|
3182
|
-
organization:
|
|
3183
|
-
country:
|
|
3184
|
-
state:
|
|
3185
|
-
locality:
|
|
3186
|
-
});
|
|
3187
|
-
var CertificateIssuerSchema =
|
|
3188
|
-
common_name:
|
|
3189
|
-
organization:
|
|
3190
|
-
country:
|
|
3191
|
-
});
|
|
3192
|
-
var CertificateSchema =
|
|
3397
|
+
var import_zod39 = require("zod");
|
|
3398
|
+
var CertificateSubjectSchema = import_zod39.z.object({
|
|
3399
|
+
common_name: import_zod39.z.string().nullable(),
|
|
3400
|
+
organization: import_zod39.z.string().nullable(),
|
|
3401
|
+
country: import_zod39.z.string().nullable(),
|
|
3402
|
+
state: import_zod39.z.string().nullable(),
|
|
3403
|
+
locality: import_zod39.z.string().nullable()
|
|
3404
|
+
});
|
|
3405
|
+
var CertificateIssuerSchema = import_zod39.z.object({
|
|
3406
|
+
common_name: import_zod39.z.string().nullable(),
|
|
3407
|
+
organization: import_zod39.z.string().nullable(),
|
|
3408
|
+
country: import_zod39.z.string().nullable()
|
|
3409
|
+
});
|
|
3410
|
+
var CertificateSchema = import_zod39.z.object({
|
|
3193
3411
|
subject: CertificateSubjectSchema,
|
|
3194
3412
|
issuer: CertificateIssuerSchema,
|
|
3195
|
-
serial_number:
|
|
3196
|
-
not_before:
|
|
3413
|
+
serial_number: import_zod39.z.string(),
|
|
3414
|
+
not_before: import_zod39.z.string(),
|
|
3197
3415
|
// datetime serialized as ISO string
|
|
3198
|
-
not_after:
|
|
3416
|
+
not_after: import_zod39.z.string(),
|
|
3199
3417
|
// datetime serialized as ISO string
|
|
3200
|
-
version:
|
|
3201
|
-
fingerprint:
|
|
3202
|
-
signature_algorithm:
|
|
3203
|
-
sans:
|
|
3204
|
-
is_ca:
|
|
3205
|
-
position_in_chain:
|
|
3206
|
-
quote:
|
|
3207
|
-
app_id:
|
|
3208
|
-
cert_usage:
|
|
3209
|
-
});
|
|
3210
|
-
var EventLogSchema =
|
|
3211
|
-
imr:
|
|
3212
|
-
event_type:
|
|
3213
|
-
digest:
|
|
3214
|
-
event:
|
|
3215
|
-
event_payload:
|
|
3216
|
-
});
|
|
3217
|
-
var TcbInfoSchema =
|
|
3218
|
-
mrtd:
|
|
3219
|
-
rootfs_hash:
|
|
3220
|
-
rtmr0:
|
|
3221
|
-
rtmr1:
|
|
3222
|
-
rtmr2:
|
|
3223
|
-
rtmr3:
|
|
3224
|
-
event_log:
|
|
3225
|
-
app_compose:
|
|
3226
|
-
});
|
|
3227
|
-
var CvmAttestationSchema =
|
|
3228
|
-
name:
|
|
3229
|
-
is_online:
|
|
3230
|
-
is_public:
|
|
3231
|
-
error:
|
|
3232
|
-
app_certificates:
|
|
3418
|
+
version: import_zod39.z.string(),
|
|
3419
|
+
fingerprint: import_zod39.z.string(),
|
|
3420
|
+
signature_algorithm: import_zod39.z.string(),
|
|
3421
|
+
sans: import_zod39.z.array(import_zod39.z.string()).nullable(),
|
|
3422
|
+
is_ca: import_zod39.z.boolean(),
|
|
3423
|
+
position_in_chain: import_zod39.z.number().nullable(),
|
|
3424
|
+
quote: import_zod39.z.string().nullable(),
|
|
3425
|
+
app_id: import_zod39.z.string().nullable().optional(),
|
|
3426
|
+
cert_usage: import_zod39.z.string().nullable().optional()
|
|
3427
|
+
});
|
|
3428
|
+
var EventLogSchema = import_zod39.z.object({
|
|
3429
|
+
imr: import_zod39.z.number(),
|
|
3430
|
+
event_type: import_zod39.z.number(),
|
|
3431
|
+
digest: import_zod39.z.string(),
|
|
3432
|
+
event: import_zod39.z.string(),
|
|
3433
|
+
event_payload: import_zod39.z.string()
|
|
3434
|
+
});
|
|
3435
|
+
var TcbInfoSchema = import_zod39.z.object({
|
|
3436
|
+
mrtd: import_zod39.z.string(),
|
|
3437
|
+
rootfs_hash: import_zod39.z.string().nullable().optional(),
|
|
3438
|
+
rtmr0: import_zod39.z.string(),
|
|
3439
|
+
rtmr1: import_zod39.z.string(),
|
|
3440
|
+
rtmr2: import_zod39.z.string(),
|
|
3441
|
+
rtmr3: import_zod39.z.string(),
|
|
3442
|
+
event_log: import_zod39.z.array(EventLogSchema),
|
|
3443
|
+
app_compose: import_zod39.z.string()
|
|
3444
|
+
});
|
|
3445
|
+
var CvmAttestationSchema = import_zod39.z.object({
|
|
3446
|
+
name: import_zod39.z.string().nullable(),
|
|
3447
|
+
is_online: import_zod39.z.boolean(),
|
|
3448
|
+
is_public: import_zod39.z.boolean().default(true),
|
|
3449
|
+
error: import_zod39.z.string().nullable(),
|
|
3450
|
+
app_certificates: import_zod39.z.array(CertificateSchema).nullable(),
|
|
3233
3451
|
tcb_info: TcbInfoSchema.nullable(),
|
|
3234
|
-
compose_file:
|
|
3452
|
+
compose_file: import_zod39.z.string().nullable()
|
|
3235
3453
|
});
|
|
3236
3454
|
var GetCvmAttestationRequestSchema = CvmIdSchema;
|
|
3237
3455
|
var { action: getCvmAttestation, safeAction: safeGetCvmAttestation } = defineAction(CvmAttestationSchema, async (client, request) => {
|
|
@@ -3240,31 +3458,35 @@ var { action: getCvmAttestation, safeAction: safeGetCvmAttestation } = defineAct
|
|
|
3240
3458
|
});
|
|
3241
3459
|
|
|
3242
3460
|
// src/actions/cvms/update_cvm_resources.ts
|
|
3243
|
-
var
|
|
3461
|
+
var import_zod40 = require("zod");
|
|
3244
3462
|
var UpdateCvmResourcesRequestSchema = refineCvmId(
|
|
3245
3463
|
CvmIdObjectSchema.extend({
|
|
3246
|
-
vcpu:
|
|
3247
|
-
memory:
|
|
3248
|
-
disk_size:
|
|
3249
|
-
instance_type:
|
|
3250
|
-
allow_restart:
|
|
3464
|
+
vcpu: import_zod40.z.number().optional(),
|
|
3465
|
+
memory: import_zod40.z.number().optional(),
|
|
3466
|
+
disk_size: import_zod40.z.number().optional(),
|
|
3467
|
+
instance_type: import_zod40.z.string().optional(),
|
|
3468
|
+
allow_restart: import_zod40.z.boolean().optional()
|
|
3251
3469
|
})
|
|
3252
3470
|
);
|
|
3253
|
-
var
|
|
3471
|
+
var UpdateCvmResourcesResponseSchema = import_zod40.z.object({
|
|
3472
|
+
message: import_zod40.z.string(),
|
|
3473
|
+
correlation_id: import_zod40.z.string(),
|
|
3474
|
+
status: import_zod40.z.string()
|
|
3475
|
+
});
|
|
3476
|
+
var { action: updateCvmResources, safeAction: safeUpdateCvmResources } = defineAction(UpdateCvmResourcesResponseSchema, async (client, request) => {
|
|
3254
3477
|
const parsed = UpdateCvmResourcesRequestSchema.parse(request);
|
|
3255
3478
|
const { cvmId } = CvmIdSchema.parse(parsed);
|
|
3256
3479
|
const { ...body } = parsed;
|
|
3257
|
-
await client.patch(`/cvms/${cvmId}
|
|
3258
|
-
return void 0;
|
|
3480
|
+
return await client.patch(`/cvms/${cvmId}`, body);
|
|
3259
3481
|
});
|
|
3260
3482
|
|
|
3261
3483
|
// src/actions/cvms/update_cvm_visibility.ts
|
|
3262
|
-
var
|
|
3484
|
+
var import_zod41 = require("zod");
|
|
3263
3485
|
var UpdateCvmVisibilityRequestSchema = refineCvmId(
|
|
3264
3486
|
CvmIdObjectSchema.extend({
|
|
3265
|
-
public_sysinfo:
|
|
3266
|
-
public_logs:
|
|
3267
|
-
public_tcbinfo:
|
|
3487
|
+
public_sysinfo: import_zod41.z.boolean(),
|
|
3488
|
+
public_logs: import_zod41.z.boolean(),
|
|
3489
|
+
public_tcbinfo: import_zod41.z.boolean().optional()
|
|
3268
3490
|
})
|
|
3269
3491
|
);
|
|
3270
3492
|
var { action: updateCvmVisibility, safeAction: safeUpdateCvmVisibility } = defineAction(CvmDetailV20251028Schema, async (client, request) => {
|
|
@@ -3279,21 +3501,21 @@ var { action: updateCvmVisibility, safeAction: safeUpdateCvmVisibility } = defin
|
|
|
3279
3501
|
});
|
|
3280
3502
|
|
|
3281
3503
|
// src/actions/cvms/get_available_os_images.ts
|
|
3282
|
-
var
|
|
3283
|
-
var OSImageVariantSchema =
|
|
3284
|
-
name:
|
|
3285
|
-
os_image_hash:
|
|
3286
|
-
is_current:
|
|
3287
|
-
});
|
|
3288
|
-
var AvailableOSImageSchema3 =
|
|
3289
|
-
version:
|
|
3290
|
-
|
|
3291
|
-
|
|
3504
|
+
var import_zod42 = require("zod");
|
|
3505
|
+
var OSImageVariantSchema = import_zod42.z.object({
|
|
3506
|
+
name: import_zod42.z.string(),
|
|
3507
|
+
os_image_hash: import_zod42.z.string().nullable(),
|
|
3508
|
+
is_current: import_zod42.z.boolean()
|
|
3509
|
+
});
|
|
3510
|
+
var AvailableOSImageSchema3 = import_zod42.z.object({
|
|
3511
|
+
version: import_zod42.z.union([
|
|
3512
|
+
import_zod42.z.tuple([import_zod42.z.number(), import_zod42.z.number(), import_zod42.z.number(), import_zod42.z.number()]),
|
|
3513
|
+
import_zod42.z.tuple([import_zod42.z.number(), import_zod42.z.number(), import_zod42.z.number()])
|
|
3292
3514
|
]),
|
|
3293
3515
|
prod: OSImageVariantSchema.nullable(),
|
|
3294
3516
|
dev: OSImageVariantSchema.nullable()
|
|
3295
3517
|
});
|
|
3296
|
-
var GetAvailableOSImagesResponseSchema =
|
|
3518
|
+
var GetAvailableOSImagesResponseSchema = import_zod42.z.array(AvailableOSImageSchema3);
|
|
3297
3519
|
var GetAvailableOSImagesRequestSchema = CvmIdSchema;
|
|
3298
3520
|
var { action: getAvailableOsImages, safeAction: safeGetAvailableOsImages } = defineAction(GetAvailableOSImagesResponseSchema, async (client, request) => {
|
|
3299
3521
|
const { cvmId } = GetAvailableOSImagesRequestSchema.parse(request);
|
|
@@ -3301,13 +3523,13 @@ var { action: getAvailableOsImages, safeAction: safeGetAvailableOsImages } = def
|
|
|
3301
3523
|
});
|
|
3302
3524
|
|
|
3303
3525
|
// src/actions/cvms/update_os_image.ts
|
|
3304
|
-
var
|
|
3526
|
+
var import_zod43 = require("zod");
|
|
3305
3527
|
var UpdateOsImageRequestSchema = refineCvmId(
|
|
3306
3528
|
CvmIdObjectSchema.extend({
|
|
3307
|
-
os_image_name:
|
|
3529
|
+
os_image_name: import_zod43.z.string().min(1, "OS image name is required")
|
|
3308
3530
|
})
|
|
3309
3531
|
);
|
|
3310
|
-
var { action: updateOsImage, safeAction: safeUpdateOsImage } = defineAction(
|
|
3532
|
+
var { action: updateOsImage, safeAction: safeUpdateOsImage } = defineAction(import_zod43.z.void(), async (client, request) => {
|
|
3311
3533
|
const parsed = UpdateOsImageRequestSchema.parse(request);
|
|
3312
3534
|
const { cvmId } = CvmIdSchema.parse(parsed);
|
|
3313
3535
|
const { os_image_name } = parsed;
|
|
@@ -3316,17 +3538,17 @@ var { action: updateOsImage, safeAction: safeUpdateOsImage } = defineAction(impo
|
|
|
3316
3538
|
});
|
|
3317
3539
|
|
|
3318
3540
|
// src/actions/cvms/get_cvm_state.ts
|
|
3319
|
-
var
|
|
3320
|
-
var CvmStateSchema =
|
|
3321
|
-
id:
|
|
3322
|
-
instance_id:
|
|
3323
|
-
name:
|
|
3324
|
-
status:
|
|
3325
|
-
uptime:
|
|
3326
|
-
exited_at:
|
|
3327
|
-
boot_progress:
|
|
3328
|
-
boot_error:
|
|
3329
|
-
shutdown_progress:
|
|
3541
|
+
var import_zod44 = require("zod");
|
|
3542
|
+
var CvmStateSchema = import_zod44.z.object({
|
|
3543
|
+
id: import_zod44.z.string().optional(),
|
|
3544
|
+
instance_id: import_zod44.z.string().optional(),
|
|
3545
|
+
name: import_zod44.z.string(),
|
|
3546
|
+
status: import_zod44.z.string(),
|
|
3547
|
+
uptime: import_zod44.z.string().optional(),
|
|
3548
|
+
exited_at: import_zod44.z.string().optional(),
|
|
3549
|
+
boot_progress: import_zod44.z.string().optional(),
|
|
3550
|
+
boot_error: import_zod44.z.string().optional(),
|
|
3551
|
+
shutdown_progress: import_zod44.z.string().optional()
|
|
3330
3552
|
});
|
|
3331
3553
|
var GetCvmStateRequestSchema = CvmIdSchema;
|
|
3332
3554
|
var { action: getCvmState, safeAction: safeGetCvmState } = defineAction(CvmStateSchema, async (client, request) => {
|
|
@@ -3335,21 +3557,21 @@ var { action: getCvmState, safeAction: safeGetCvmState } = defineAction(CvmState
|
|
|
3335
3557
|
});
|
|
3336
3558
|
|
|
3337
3559
|
// src/actions/ssh_keys/list_ssh_keys.ts
|
|
3338
|
-
var
|
|
3339
|
-
var SshKeySchema =
|
|
3340
|
-
id:
|
|
3341
|
-
user_id:
|
|
3342
|
-
name:
|
|
3343
|
-
public_key:
|
|
3344
|
-
fingerprint:
|
|
3345
|
-
key_type:
|
|
3346
|
-
source:
|
|
3347
|
-
key_metadata:
|
|
3348
|
-
last_synced_at:
|
|
3349
|
-
created_at:
|
|
3350
|
-
updated_at:
|
|
3351
|
-
});
|
|
3352
|
-
var ListSshKeysResponseSchema =
|
|
3560
|
+
var import_zod45 = require("zod");
|
|
3561
|
+
var SshKeySchema = import_zod45.z.object({
|
|
3562
|
+
id: import_zod45.z.string(),
|
|
3563
|
+
user_id: import_zod45.z.string(),
|
|
3564
|
+
name: import_zod45.z.string(),
|
|
3565
|
+
public_key: import_zod45.z.string(),
|
|
3566
|
+
fingerprint: import_zod45.z.string(),
|
|
3567
|
+
key_type: import_zod45.z.string(),
|
|
3568
|
+
source: import_zod45.z.string(),
|
|
3569
|
+
key_metadata: import_zod45.z.record(import_zod45.z.unknown()).nullable().optional(),
|
|
3570
|
+
last_synced_at: import_zod45.z.string().nullable().optional(),
|
|
3571
|
+
created_at: import_zod45.z.string(),
|
|
3572
|
+
updated_at: import_zod45.z.string()
|
|
3573
|
+
});
|
|
3574
|
+
var ListSshKeysResponseSchema = import_zod45.z.array(SshKeySchema);
|
|
3353
3575
|
async function listSshKeys(client) {
|
|
3354
3576
|
const response = await client.get("/user/ssh-keys");
|
|
3355
3577
|
return ListSshKeysResponseSchema.parse(response);
|
|
@@ -3373,15 +3595,15 @@ async function safeListSshKeys(client) {
|
|
|
3373
3595
|
}
|
|
3374
3596
|
|
|
3375
3597
|
// src/actions/ssh_keys/import_github_profile.ts
|
|
3376
|
-
var
|
|
3377
|
-
var ImportGithubProfileRequestSchema =
|
|
3378
|
-
github_username:
|
|
3598
|
+
var import_zod46 = require("zod");
|
|
3599
|
+
var ImportGithubProfileRequestSchema = import_zod46.z.object({
|
|
3600
|
+
github_username: import_zod46.z.string().min(1)
|
|
3379
3601
|
});
|
|
3380
|
-
var ImportGithubProfileResponseSchema =
|
|
3381
|
-
github_username:
|
|
3382
|
-
keys_added:
|
|
3383
|
-
keys_skipped:
|
|
3384
|
-
errors:
|
|
3602
|
+
var ImportGithubProfileResponseSchema = import_zod46.z.object({
|
|
3603
|
+
github_username: import_zod46.z.string(),
|
|
3604
|
+
keys_added: import_zod46.z.number().int(),
|
|
3605
|
+
keys_skipped: import_zod46.z.number().int(),
|
|
3606
|
+
errors: import_zod46.z.array(import_zod46.z.string()).default([])
|
|
3385
3607
|
});
|
|
3386
3608
|
var { action: importGithubProfileSshKeys, safeAction: safeImportGithubProfileSshKeys } = defineAction(
|
|
3387
3609
|
ImportGithubProfileResponseSchema,
|
|
@@ -3392,10 +3614,10 @@ var { action: importGithubProfileSshKeys, safeAction: safeImportGithubProfileSsh
|
|
|
3392
3614
|
);
|
|
3393
3615
|
|
|
3394
3616
|
// src/actions/ssh_keys/create_ssh_key.ts
|
|
3395
|
-
var
|
|
3396
|
-
var CreateSshKeyRequestSchema =
|
|
3397
|
-
name:
|
|
3398
|
-
public_key:
|
|
3617
|
+
var import_zod47 = require("zod");
|
|
3618
|
+
var CreateSshKeyRequestSchema = import_zod47.z.object({
|
|
3619
|
+
name: import_zod47.z.string().min(1),
|
|
3620
|
+
public_key: import_zod47.z.string().min(1)
|
|
3399
3621
|
});
|
|
3400
3622
|
var { action: createSshKey, safeAction: safeCreateSshKey } = defineAction(SshKeySchema, async (client, request) => {
|
|
3401
3623
|
const { name, public_key } = CreateSshKeyRequestSchema.parse(request);
|
|
@@ -3403,24 +3625,24 @@ var { action: createSshKey, safeAction: safeCreateSshKey } = defineAction(SshKey
|
|
|
3403
3625
|
});
|
|
3404
3626
|
|
|
3405
3627
|
// src/actions/ssh_keys/delete_ssh_key.ts
|
|
3406
|
-
var
|
|
3407
|
-
var DeleteSshKeyRequestSchema =
|
|
3408
|
-
keyId:
|
|
3628
|
+
var import_zod48 = require("zod");
|
|
3629
|
+
var DeleteSshKeyRequestSchema = import_zod48.z.object({
|
|
3630
|
+
keyId: import_zod48.z.string().min(1)
|
|
3409
3631
|
});
|
|
3410
|
-
var { action: deleteSshKey, safeAction: safeDeleteSshKey } = defineAction(
|
|
3632
|
+
var { action: deleteSshKey, safeAction: safeDeleteSshKey } = defineAction(import_zod48.z.void(), async (client, request) => {
|
|
3411
3633
|
const { keyId } = DeleteSshKeyRequestSchema.parse(request);
|
|
3412
3634
|
await client.delete(`/user/ssh-keys/${keyId}`);
|
|
3413
3635
|
return void 0;
|
|
3414
3636
|
});
|
|
3415
3637
|
|
|
3416
3638
|
// src/actions/ssh_keys/sync_github_ssh_keys.ts
|
|
3417
|
-
var
|
|
3418
|
-
var SyncGithubSshKeysResponseSchema =
|
|
3419
|
-
synced_count:
|
|
3420
|
-
keys_added:
|
|
3421
|
-
keys_updated:
|
|
3422
|
-
keys_removed:
|
|
3423
|
-
errors:
|
|
3639
|
+
var import_zod49 = require("zod");
|
|
3640
|
+
var SyncGithubSshKeysResponseSchema = import_zod49.z.object({
|
|
3641
|
+
synced_count: import_zod49.z.number().int(),
|
|
3642
|
+
keys_added: import_zod49.z.number().int(),
|
|
3643
|
+
keys_updated: import_zod49.z.number().int(),
|
|
3644
|
+
keys_removed: import_zod49.z.number().int(),
|
|
3645
|
+
errors: import_zod49.z.array(import_zod49.z.string()).default([])
|
|
3424
3646
|
});
|
|
3425
3647
|
var { action: syncGithubSshKeys, safeAction: safeSyncGithubSshKeys } = defineSimpleAction(
|
|
3426
3648
|
SyncGithubSshKeysResponseSchema,
|
|
@@ -3430,26 +3652,26 @@ var { action: syncGithubSshKeys, safeAction: safeSyncGithubSshKeys } = defineSim
|
|
|
3430
3652
|
);
|
|
3431
3653
|
|
|
3432
3654
|
// src/actions/os_images/get_os_images.ts
|
|
3433
|
-
var
|
|
3434
|
-
var OSImagePublicSchema =
|
|
3435
|
-
name:
|
|
3436
|
-
slug:
|
|
3437
|
-
version:
|
|
3438
|
-
os_image_hash:
|
|
3439
|
-
is_dev:
|
|
3440
|
-
requires_gpu:
|
|
3655
|
+
var import_zod50 = require("zod");
|
|
3656
|
+
var OSImagePublicSchema = import_zod50.z.object({
|
|
3657
|
+
name: import_zod50.z.string(),
|
|
3658
|
+
slug: import_zod50.z.string(),
|
|
3659
|
+
version: import_zod50.z.string(),
|
|
3660
|
+
os_image_hash: import_zod50.z.string().nullable(),
|
|
3661
|
+
is_dev: import_zod50.z.boolean(),
|
|
3662
|
+
requires_gpu: import_zod50.z.boolean()
|
|
3441
3663
|
}).passthrough();
|
|
3442
|
-
var GetOsImagesRequestSchema =
|
|
3443
|
-
page:
|
|
3444
|
-
page_size:
|
|
3445
|
-
is_dev:
|
|
3664
|
+
var GetOsImagesRequestSchema = import_zod50.z.object({
|
|
3665
|
+
page: import_zod50.z.number().int().min(1).optional(),
|
|
3666
|
+
page_size: import_zod50.z.number().int().min(1).optional(),
|
|
3667
|
+
is_dev: import_zod50.z.boolean().optional()
|
|
3446
3668
|
}).strict();
|
|
3447
|
-
var GetOsImagesResponseSchema =
|
|
3448
|
-
items:
|
|
3449
|
-
total:
|
|
3450
|
-
page:
|
|
3451
|
-
page_size:
|
|
3452
|
-
pages:
|
|
3669
|
+
var GetOsImagesResponseSchema = import_zod50.z.object({
|
|
3670
|
+
items: import_zod50.z.array(OSImagePublicSchema),
|
|
3671
|
+
total: import_zod50.z.number(),
|
|
3672
|
+
page: import_zod50.z.number(),
|
|
3673
|
+
page_size: import_zod50.z.number(),
|
|
3674
|
+
pages: import_zod50.z.number()
|
|
3453
3675
|
}).passthrough();
|
|
3454
3676
|
var { action: getOsImages, safeAction: safeGetOsImages } = defineAction(GetOsImagesResponseSchema, async (client, request) => {
|
|
3455
3677
|
const validatedRequest = GetOsImagesRequestSchema.parse(request ?? {});
|
|
@@ -3457,32 +3679,35 @@ var { action: getOsImages, safeAction: safeGetOsImages } = defineAction(GetOsIma
|
|
|
3457
3679
|
});
|
|
3458
3680
|
|
|
3459
3681
|
// src/actions/kms/get_kms_onchain_detail.ts
|
|
3460
|
-
var
|
|
3461
|
-
var OnChainDeviceSchema =
|
|
3462
|
-
device_id:
|
|
3463
|
-
node_name:
|
|
3464
|
-
on_chain_allowed:
|
|
3682
|
+
var import_zod51 = require("zod");
|
|
3683
|
+
var OnChainDeviceSchema = import_zod51.z.object({
|
|
3684
|
+
device_id: import_zod51.z.string(),
|
|
3685
|
+
node_name: import_zod51.z.string().nullable().optional(),
|
|
3686
|
+
on_chain_allowed: import_zod51.z.boolean().nullable()
|
|
3465
3687
|
}).passthrough();
|
|
3466
|
-
var OnChainOsImageSchema =
|
|
3467
|
-
name:
|
|
3468
|
-
version:
|
|
3469
|
-
os_image_hash:
|
|
3470
|
-
on_chain_allowed:
|
|
3688
|
+
var OnChainOsImageSchema = import_zod51.z.object({
|
|
3689
|
+
name: import_zod51.z.string(),
|
|
3690
|
+
version: import_zod51.z.string(),
|
|
3691
|
+
os_image_hash: import_zod51.z.string().nullable(),
|
|
3692
|
+
on_chain_allowed: import_zod51.z.boolean().nullable()
|
|
3471
3693
|
}).passthrough();
|
|
3472
|
-
var OnChainKmsContractSchema =
|
|
3473
|
-
contract_address:
|
|
3474
|
-
chain_id:
|
|
3475
|
-
chain_name:
|
|
3476
|
-
|
|
3477
|
-
|
|
3694
|
+
var OnChainKmsContractSchema = import_zod51.z.object({
|
|
3695
|
+
contract_address: import_zod51.z.string(),
|
|
3696
|
+
chain_id: import_zod51.z.number(),
|
|
3697
|
+
chain_name: import_zod51.z.string(),
|
|
3698
|
+
k256_pubkey: import_zod51.z.string().nullable().optional(),
|
|
3699
|
+
ca_pubkey: import_zod51.z.string().nullable().optional(),
|
|
3700
|
+
gateway_contract_address: import_zod51.z.string().nullable().optional(),
|
|
3701
|
+
devices: import_zod51.z.array(OnChainDeviceSchema),
|
|
3702
|
+
os_images: import_zod51.z.array(OnChainOsImageSchema)
|
|
3478
3703
|
}).passthrough();
|
|
3479
|
-
var GetKmsOnChainDetailResponseSchema =
|
|
3480
|
-
chain_name:
|
|
3481
|
-
chain_id:
|
|
3482
|
-
contracts:
|
|
3704
|
+
var GetKmsOnChainDetailResponseSchema = import_zod51.z.object({
|
|
3705
|
+
chain_name: import_zod51.z.string(),
|
|
3706
|
+
chain_id: import_zod51.z.number(),
|
|
3707
|
+
contracts: import_zod51.z.array(OnChainKmsContractSchema)
|
|
3483
3708
|
}).passthrough();
|
|
3484
|
-
var GetKmsOnChainDetailRequestSchema =
|
|
3485
|
-
chain:
|
|
3709
|
+
var GetKmsOnChainDetailRequestSchema = import_zod51.z.object({
|
|
3710
|
+
chain: import_zod51.z.string()
|
|
3486
3711
|
}).strict();
|
|
3487
3712
|
var { action: getKmsOnChainDetail, safeAction: safeGetKmsOnChainDetail } = defineAction(GetKmsOnChainDetailResponseSchema, async (client, request) => {
|
|
3488
3713
|
const { chain } = GetKmsOnChainDetailRequestSchema.parse(request);
|
|
@@ -3565,6 +3790,12 @@ function createClient2(config = {}) {
|
|
|
3565
3790
|
safeGetKmsInfo,
|
|
3566
3791
|
getKmsList,
|
|
3567
3792
|
safeGetKmsList,
|
|
3793
|
+
listKmsContracts,
|
|
3794
|
+
safeListKmsContracts,
|
|
3795
|
+
getKmsContract,
|
|
3796
|
+
safeGetKmsContract,
|
|
3797
|
+
listKmsContractNodes,
|
|
3798
|
+
safeListKmsContractNodes,
|
|
3568
3799
|
getAppEnvEncryptPubKey,
|
|
3569
3800
|
safeGetAppEnvEncryptPubKey,
|
|
3570
3801
|
nextAppIds,
|
|
@@ -3590,152 +3821,197 @@ function createClient2(config = {}) {
|
|
|
3590
3821
|
}
|
|
3591
3822
|
|
|
3592
3823
|
// src/types/app_info_v20251028.ts
|
|
3593
|
-
var
|
|
3594
|
-
var CvmBasicInfoV20251028Schema =
|
|
3595
|
-
vm_uuid:
|
|
3596
|
-
app_id:
|
|
3597
|
-
name:
|
|
3598
|
-
status:
|
|
3599
|
-
vcpu:
|
|
3600
|
-
memory:
|
|
3601
|
-
disk_size:
|
|
3602
|
-
teepod_id:
|
|
3603
|
-
teepod_name:
|
|
3604
|
-
region_identifier:
|
|
3605
|
-
kms_type:
|
|
3606
|
-
instance_type:
|
|
3607
|
-
listed:
|
|
3608
|
-
base_image:
|
|
3609
|
-
kms_slug:
|
|
3610
|
-
|
|
3611
|
-
|
|
3824
|
+
var import_zod52 = require("zod");
|
|
3825
|
+
var CvmBasicInfoV20251028Schema = import_zod52.z.object({
|
|
3826
|
+
vm_uuid: import_zod52.z.string().nullable(),
|
|
3827
|
+
app_id: import_zod52.z.string(),
|
|
3828
|
+
name: import_zod52.z.string().default(""),
|
|
3829
|
+
status: import_zod52.z.string(),
|
|
3830
|
+
vcpu: import_zod52.z.number().int(),
|
|
3831
|
+
memory: import_zod52.z.number().int(),
|
|
3832
|
+
disk_size: import_zod52.z.number().int(),
|
|
3833
|
+
teepod_id: import_zod52.z.number().int(),
|
|
3834
|
+
teepod_name: import_zod52.z.string(),
|
|
3835
|
+
region_identifier: import_zod52.z.string().nullable().optional(),
|
|
3836
|
+
kms_type: import_zod52.z.string().nullable().optional(),
|
|
3837
|
+
instance_type: import_zod52.z.string().nullable().optional(),
|
|
3838
|
+
listed: import_zod52.z.boolean().nullable().optional(),
|
|
3839
|
+
base_image: import_zod52.z.string().nullable().optional(),
|
|
3840
|
+
kms_slug: import_zod52.z.string().nullable().optional(),
|
|
3841
|
+
/** @deprecated Identifies a KMS node, not the on-chain KMS contract. Use kms_contract_id. */
|
|
3842
|
+
kms_id: import_zod52.z.string().nullable().optional(),
|
|
3843
|
+
kms_contract_id: import_zod52.z.string().nullable().optional(),
|
|
3844
|
+
instance_id: import_zod52.z.string().nullable().optional(),
|
|
3612
3845
|
machine_info: MachineInfoV20251028Schema.nullable().optional(),
|
|
3613
|
-
updated_at:
|
|
3614
|
-
});
|
|
3615
|
-
var AppProfileSchema =
|
|
3616
|
-
display_name:
|
|
3617
|
-
avatar_url:
|
|
3618
|
-
description:
|
|
3619
|
-
custom_domain:
|
|
3620
|
-
});
|
|
3621
|
-
var DstackAppFullResponseV20251028Schema =
|
|
3622
|
-
id:
|
|
3623
|
-
name:
|
|
3624
|
-
app_id:
|
|
3625
|
-
app_provision_type:
|
|
3626
|
-
app_icon_url:
|
|
3627
|
-
created_at:
|
|
3628
|
-
kms_type:
|
|
3846
|
+
updated_at: import_zod52.z.string().nullable().optional()
|
|
3847
|
+
});
|
|
3848
|
+
var AppProfileSchema = import_zod52.z.object({
|
|
3849
|
+
display_name: import_zod52.z.string().nullable().optional(),
|
|
3850
|
+
avatar_url: import_zod52.z.string().nullable().optional(),
|
|
3851
|
+
description: import_zod52.z.string().nullable().optional(),
|
|
3852
|
+
custom_domain: import_zod52.z.string().nullable().optional()
|
|
3853
|
+
});
|
|
3854
|
+
var DstackAppFullResponseV20251028Schema = import_zod52.z.object({
|
|
3855
|
+
id: import_zod52.z.string(),
|
|
3856
|
+
name: import_zod52.z.string(),
|
|
3857
|
+
app_id: import_zod52.z.string(),
|
|
3858
|
+
app_provision_type: import_zod52.z.string().nullable().optional(),
|
|
3859
|
+
app_icon_url: import_zod52.z.string().nullable().optional(),
|
|
3860
|
+
created_at: import_zod52.z.string(),
|
|
3861
|
+
kms_type: import_zod52.z.string(),
|
|
3629
3862
|
profile: AppProfileSchema.nullable().optional(),
|
|
3630
3863
|
current_cvm: CvmBasicInfoV20251028Schema.nullable().optional(),
|
|
3631
|
-
cvms:
|
|
3632
|
-
cvm_count:
|
|
3864
|
+
cvms: import_zod52.z.array(CvmBasicInfoV20251028Schema).default([]),
|
|
3865
|
+
cvm_count: import_zod52.z.number().int().default(0)
|
|
3633
3866
|
});
|
|
3634
3867
|
var DstackAppWithCvmResponseV20251028Schema = DstackAppFullResponseV20251028Schema;
|
|
3635
|
-
var DstackAppListResponseV20251028Schema =
|
|
3636
|
-
dstack_apps:
|
|
3637
|
-
page:
|
|
3638
|
-
page_size:
|
|
3639
|
-
total:
|
|
3640
|
-
total_pages:
|
|
3868
|
+
var DstackAppListResponseV20251028Schema = import_zod52.z.object({
|
|
3869
|
+
dstack_apps: import_zod52.z.array(DstackAppWithCvmResponseV20251028Schema),
|
|
3870
|
+
page: import_zod52.z.number().int(),
|
|
3871
|
+
page_size: import_zod52.z.number().int(),
|
|
3872
|
+
total: import_zod52.z.number().int(),
|
|
3873
|
+
total_pages: import_zod52.z.number().int()
|
|
3641
3874
|
});
|
|
3642
3875
|
|
|
3643
3876
|
// src/types/app_info_v20260121.ts
|
|
3644
|
-
var
|
|
3645
|
-
var DstackAppFullResponseV20260121Schema =
|
|
3646
|
-
id:
|
|
3647
|
-
name:
|
|
3648
|
-
app_id:
|
|
3649
|
-
app_provision_type:
|
|
3650
|
-
app_icon_url:
|
|
3651
|
-
created_at:
|
|
3652
|
-
kms_type:
|
|
3653
|
-
profile:
|
|
3654
|
-
display_name:
|
|
3655
|
-
avatar_url:
|
|
3656
|
-
description:
|
|
3657
|
-
custom_domain:
|
|
3877
|
+
var import_zod53 = require("zod");
|
|
3878
|
+
var DstackAppFullResponseV20260121Schema = import_zod53.z.object({
|
|
3879
|
+
id: import_zod53.z.string(),
|
|
3880
|
+
name: import_zod53.z.string(),
|
|
3881
|
+
app_id: import_zod53.z.string(),
|
|
3882
|
+
app_provision_type: import_zod53.z.string().nullable().optional(),
|
|
3883
|
+
app_icon_url: import_zod53.z.string().nullable().optional(),
|
|
3884
|
+
created_at: import_zod53.z.string(),
|
|
3885
|
+
kms_type: import_zod53.z.string(),
|
|
3886
|
+
profile: import_zod53.z.object({
|
|
3887
|
+
display_name: import_zod53.z.string().nullable().optional(),
|
|
3888
|
+
avatar_url: import_zod53.z.string().nullable().optional(),
|
|
3889
|
+
description: import_zod53.z.string().nullable().optional(),
|
|
3890
|
+
custom_domain: import_zod53.z.string().nullable().optional()
|
|
3658
3891
|
}).nullable().optional(),
|
|
3659
3892
|
current_cvm: CvmInfoV20260121Schema.nullable().optional(),
|
|
3660
|
-
cvms:
|
|
3661
|
-
cvm_count:
|
|
3893
|
+
cvms: import_zod53.z.array(CvmInfoV20260121Schema).default([]),
|
|
3894
|
+
cvm_count: import_zod53.z.number().int().default(0)
|
|
3662
3895
|
});
|
|
3663
3896
|
var DstackAppFullResponseV20260522Schema = DstackAppFullResponseV20260121Schema.extend({
|
|
3664
3897
|
current_cvm: CvmInfoV20260522Schema.nullable().optional(),
|
|
3665
|
-
cvms:
|
|
3898
|
+
cvms: import_zod53.z.array(CvmInfoV20260522Schema).default([])
|
|
3666
3899
|
});
|
|
3667
3900
|
var DstackAppWithCvmResponseV20260121Schema = DstackAppFullResponseV20260121Schema;
|
|
3668
3901
|
var DstackAppWithCvmResponseV20260522Schema = DstackAppFullResponseV20260522Schema;
|
|
3669
|
-
var DstackAppListResponseV20260121Schema =
|
|
3670
|
-
dstack_apps:
|
|
3671
|
-
page:
|
|
3672
|
-
page_size:
|
|
3673
|
-
total:
|
|
3674
|
-
total_pages:
|
|
3902
|
+
var DstackAppListResponseV20260121Schema = import_zod53.z.object({
|
|
3903
|
+
dstack_apps: import_zod53.z.array(DstackAppWithCvmResponseV20260121Schema),
|
|
3904
|
+
page: import_zod53.z.number().int(),
|
|
3905
|
+
page_size: import_zod53.z.number().int(),
|
|
3906
|
+
total: import_zod53.z.number().int(),
|
|
3907
|
+
total_pages: import_zod53.z.number().int()
|
|
3675
3908
|
});
|
|
3676
3909
|
var DstackAppListResponseV20260522Schema = DstackAppListResponseV20260121Schema.extend({
|
|
3677
|
-
dstack_apps:
|
|
3910
|
+
dstack_apps: import_zod53.z.array(DstackAppWithCvmResponseV20260522Schema)
|
|
3678
3911
|
});
|
|
3679
3912
|
|
|
3680
3913
|
// src/types/app_revision.ts
|
|
3681
|
-
var
|
|
3682
|
-
var CvmRefSchema =
|
|
3683
|
-
object_type:
|
|
3684
|
-
id:
|
|
3685
|
-
name:
|
|
3686
|
-
app_id:
|
|
3687
|
-
vm_uuid:
|
|
3688
|
-
});
|
|
3689
|
-
var AppRevisionResponseSchema =
|
|
3690
|
-
revision_id:
|
|
3691
|
-
app_id:
|
|
3692
|
-
vm_uuid:
|
|
3693
|
-
compose_hash:
|
|
3694
|
-
created_at:
|
|
3695
|
-
trace_id:
|
|
3696
|
-
operation_type:
|
|
3914
|
+
var import_zod54 = require("zod");
|
|
3915
|
+
var CvmRefSchema = import_zod54.z.object({
|
|
3916
|
+
object_type: import_zod54.z.literal("cvm"),
|
|
3917
|
+
id: import_zod54.z.string().nullable().optional(),
|
|
3918
|
+
name: import_zod54.z.string().nullable().optional(),
|
|
3919
|
+
app_id: import_zod54.z.string().nullable().optional(),
|
|
3920
|
+
vm_uuid: import_zod54.z.string().nullable().optional()
|
|
3921
|
+
});
|
|
3922
|
+
var AppRevisionResponseSchema = import_zod54.z.object({
|
|
3923
|
+
revision_id: import_zod54.z.string(),
|
|
3924
|
+
app_id: import_zod54.z.string(),
|
|
3925
|
+
vm_uuid: import_zod54.z.string(),
|
|
3926
|
+
compose_hash: import_zod54.z.string(),
|
|
3927
|
+
created_at: import_zod54.z.string(),
|
|
3928
|
+
trace_id: import_zod54.z.string().nullable().optional(),
|
|
3929
|
+
operation_type: import_zod54.z.string(),
|
|
3697
3930
|
triggered_by: UserRefSchema.nullable().optional(),
|
|
3698
3931
|
cvm: CvmRefSchema.nullable().optional(),
|
|
3699
3932
|
workspace: WorkspaceRefSchema.nullable().optional()
|
|
3700
3933
|
});
|
|
3701
|
-
var AppRevisionDetailResponseSchema =
|
|
3702
|
-
revision_id:
|
|
3703
|
-
app_id:
|
|
3704
|
-
vm_uuid:
|
|
3705
|
-
compose_hash:
|
|
3706
|
-
compose_file:
|
|
3707
|
-
encrypted_env:
|
|
3708
|
-
user_config:
|
|
3709
|
-
created_at:
|
|
3710
|
-
trace_id:
|
|
3711
|
-
operation_type:
|
|
3934
|
+
var AppRevisionDetailResponseSchema = import_zod54.z.object({
|
|
3935
|
+
revision_id: import_zod54.z.string(),
|
|
3936
|
+
app_id: import_zod54.z.string(),
|
|
3937
|
+
vm_uuid: import_zod54.z.string(),
|
|
3938
|
+
compose_hash: import_zod54.z.string(),
|
|
3939
|
+
compose_file: import_zod54.z.union([import_zod54.z.record(import_zod54.z.any()), import_zod54.z.string()]).nullable().optional(),
|
|
3940
|
+
encrypted_env: import_zod54.z.string(),
|
|
3941
|
+
user_config: import_zod54.z.string(),
|
|
3942
|
+
created_at: import_zod54.z.string(),
|
|
3943
|
+
trace_id: import_zod54.z.string().nullable().optional(),
|
|
3944
|
+
operation_type: import_zod54.z.string(),
|
|
3712
3945
|
triggered_by: UserRefSchema.nullable().optional(),
|
|
3713
3946
|
cvm: CvmRefSchema.nullable().optional(),
|
|
3714
3947
|
workspace: WorkspaceRefSchema.nullable().optional()
|
|
3715
3948
|
});
|
|
3716
|
-
var AppRevisionsResponseSchema =
|
|
3717
|
-
revisions:
|
|
3718
|
-
total:
|
|
3719
|
-
page:
|
|
3720
|
-
page_size:
|
|
3721
|
-
total_pages:
|
|
3949
|
+
var AppRevisionsResponseSchema = import_zod54.z.object({
|
|
3950
|
+
revisions: import_zod54.z.array(AppRevisionResponseSchema),
|
|
3951
|
+
total: import_zod54.z.number().int(),
|
|
3952
|
+
page: import_zod54.z.number().int(),
|
|
3953
|
+
page_size: import_zod54.z.number().int(),
|
|
3954
|
+
total_pages: import_zod54.z.number().int()
|
|
3722
3955
|
});
|
|
3723
3956
|
|
|
3724
3957
|
// src/actions/blockchains/deploy_app_auth.ts
|
|
3725
|
-
var
|
|
3726
|
-
var
|
|
3958
|
+
var import_zod55 = require("zod");
|
|
3959
|
+
var import_viem4 = require("viem");
|
|
3727
3960
|
var import_accounts2 = require("viem/accounts");
|
|
3728
3961
|
|
|
3729
3962
|
// src/utils/index.ts
|
|
3730
3963
|
var import_encrypt_env_vars = require("@phala/dstack-sdk/encrypt-env-vars");
|
|
3731
3964
|
|
|
3732
|
-
// src/utils/
|
|
3965
|
+
// src/utils/get_mr_config_id.ts
|
|
3733
3966
|
var import_viem = require("viem");
|
|
3967
|
+
var MR_CONFIG_ID_LENGTH = 48;
|
|
3968
|
+
var KEY_PROVIDER_BYTE = {
|
|
3969
|
+
none: 0,
|
|
3970
|
+
local: 1,
|
|
3971
|
+
kms: 2,
|
|
3972
|
+
tpm: 3
|
|
3973
|
+
};
|
|
3974
|
+
function getMrConfigIdV1(composeHash) {
|
|
3975
|
+
const result = new Uint8Array(MR_CONFIG_ID_LENGTH);
|
|
3976
|
+
result[0] = 1;
|
|
3977
|
+
result.set((0, import_viem.toBytes)(composeHash), 1);
|
|
3978
|
+
return (0, import_viem.toHex)(result);
|
|
3979
|
+
}
|
|
3980
|
+
function getMrConfigId(input) {
|
|
3981
|
+
const composeHashBytes = (0, import_viem.toBytes)(input.compose_hash);
|
|
3982
|
+
const appIdBytes = (0, import_viem.toBytes)(input.app_id);
|
|
3983
|
+
const kpByte = KEY_PROVIDER_BYTE[input.key_provider_type];
|
|
3984
|
+
const kpIdBytes = input.key_provider_id === "0x" ? new Uint8Array(0) : (0, import_viem.toBytes)(input.key_provider_id);
|
|
3985
|
+
const payload = new Uint8Array(
|
|
3986
|
+
composeHashBytes.length + appIdBytes.length + 1 + kpIdBytes.length
|
|
3987
|
+
);
|
|
3988
|
+
let offset = 0;
|
|
3989
|
+
payload.set(composeHashBytes, offset);
|
|
3990
|
+
offset += composeHashBytes.length;
|
|
3991
|
+
payload.set(appIdBytes, offset);
|
|
3992
|
+
offset += appIdBytes.length;
|
|
3993
|
+
payload[offset] = kpByte;
|
|
3994
|
+
offset += 1;
|
|
3995
|
+
payload.set(kpIdBytes, offset);
|
|
3996
|
+
const hash = (0, import_viem.keccak256)(payload);
|
|
3997
|
+
const hashBytes = (0, import_viem.toBytes)(hash);
|
|
3998
|
+
const result = new Uint8Array(MR_CONFIG_ID_LENGTH);
|
|
3999
|
+
result[0] = 2;
|
|
4000
|
+
result.set(hashBytes, 1);
|
|
4001
|
+
return (0, import_viem.toHex)(result);
|
|
4002
|
+
}
|
|
4003
|
+
function verifyMrConfigId(mrConfigId, input) {
|
|
4004
|
+
const expected = getMrConfigId(input);
|
|
4005
|
+
return expected.toLowerCase() === mrConfigId.toLowerCase();
|
|
4006
|
+
}
|
|
4007
|
+
|
|
4008
|
+
// src/utils/as-hex.ts
|
|
4009
|
+
var import_viem2 = require("viem");
|
|
3734
4010
|
function asHex(value) {
|
|
3735
4011
|
if (typeof value === "string") {
|
|
3736
|
-
if (value.startsWith("0x") && (0,
|
|
4012
|
+
if (value.startsWith("0x") && (0, import_viem2.isHex)(value)) {
|
|
3737
4013
|
return value;
|
|
3738
|
-
} else if ((0,
|
|
4014
|
+
} else if ((0, import_viem2.isHex)(`0x${value}`)) {
|
|
3739
4015
|
return `0x${value}`;
|
|
3740
4016
|
}
|
|
3741
4017
|
}
|
|
@@ -3784,7 +4060,8 @@ var ErrorCodes = {
|
|
|
3784
4060
|
TOKEN_LIMIT_EXCEEDED: "ERR-05-001",
|
|
3785
4061
|
TOKEN_RATE_LIMIT: "ERR-05-002",
|
|
3786
4062
|
// Module 06: Auth
|
|
3787
|
-
OAUTH_EMAIL_INVALID: "ERR-06-001"
|
|
4063
|
+
OAUTH_EMAIL_INVALID: "ERR-06-001",
|
|
4064
|
+
PERMISSION_DENIED: "ERR-06-006"
|
|
3788
4065
|
};
|
|
3789
4066
|
|
|
3790
4067
|
// src/utils/network.ts
|
|
@@ -4244,7 +4521,7 @@ async function estimateTransactionGas(clients, transaction, options = {}) {
|
|
|
4244
4521
|
}
|
|
4245
4522
|
|
|
4246
4523
|
// src/utils/client-factories.ts
|
|
4247
|
-
var
|
|
4524
|
+
var import_viem3 = require("viem");
|
|
4248
4525
|
var import_accounts = require("viem/accounts");
|
|
4249
4526
|
function isBrowser() {
|
|
4250
4527
|
return typeof window !== "undefined" && typeof window.ethereum !== "undefined";
|
|
@@ -4257,14 +4534,14 @@ function getEthereumProvider() {
|
|
|
4257
4534
|
function createClientsFromPrivateKey(chain, privateKey, rpcUrl) {
|
|
4258
4535
|
try {
|
|
4259
4536
|
const account = (0, import_accounts.privateKeyToAccount)(privateKey);
|
|
4260
|
-
const publicClient = (0,
|
|
4537
|
+
const publicClient = (0, import_viem3.createPublicClient)({
|
|
4261
4538
|
chain,
|
|
4262
|
-
transport: (0,
|
|
4539
|
+
transport: (0, import_viem3.http)(rpcUrl || chain.rpcUrls.default.http[0])
|
|
4263
4540
|
});
|
|
4264
|
-
const walletClient = (0,
|
|
4541
|
+
const walletClient = (0, import_viem3.createWalletClient)({
|
|
4265
4542
|
account,
|
|
4266
4543
|
chain,
|
|
4267
|
-
transport: (0,
|
|
4544
|
+
transport: (0, import_viem3.http)(rpcUrl || chain.rpcUrls.default.http[0])
|
|
4268
4545
|
});
|
|
4269
4546
|
return createNetworkClients(publicClient, walletClient, account.address, chain.id);
|
|
4270
4547
|
} catch (error) {
|
|
@@ -4302,14 +4579,14 @@ async function createClientsFromBrowser(chain, rpcUrl) {
|
|
|
4302
4579
|
if (currentChainId !== chain.id) {
|
|
4303
4580
|
await switchToNetwork(provider, chain.id);
|
|
4304
4581
|
}
|
|
4305
|
-
const publicClient = (0,
|
|
4582
|
+
const publicClient = (0, import_viem3.createPublicClient)({
|
|
4306
4583
|
chain,
|
|
4307
|
-
transport: (0,
|
|
4584
|
+
transport: (0, import_viem3.http)(rpcUrl || chain.rpcUrls.default.http[0])
|
|
4308
4585
|
});
|
|
4309
|
-
const walletClient = (0,
|
|
4586
|
+
const walletClient = (0, import_viem3.createWalletClient)({
|
|
4310
4587
|
account: address,
|
|
4311
4588
|
chain,
|
|
4312
|
-
transport: (0,
|
|
4589
|
+
transport: (0, import_viem3.custom)(provider)
|
|
4313
4590
|
});
|
|
4314
4591
|
return createNetworkClients(publicClient, walletClient, address, chain.id);
|
|
4315
4592
|
} catch (error) {
|
|
@@ -4417,25 +4694,25 @@ var kmsAuthAbi = [
|
|
|
4417
4694
|
anonymous: false
|
|
4418
4695
|
}
|
|
4419
4696
|
];
|
|
4420
|
-
var DeployAppAuthRequestBaseSchema =
|
|
4697
|
+
var DeployAppAuthRequestBaseSchema = import_zod55.z.object({
|
|
4421
4698
|
// Chain configuration (conditionally required)
|
|
4422
|
-
chain:
|
|
4423
|
-
rpcUrl:
|
|
4699
|
+
chain: import_zod55.z.unknown().optional(),
|
|
4700
|
+
rpcUrl: import_zod55.z.string().optional(),
|
|
4424
4701
|
// Contract configuration (required)
|
|
4425
|
-
kmsContractAddress:
|
|
4702
|
+
kmsContractAddress: import_zod55.z.string(),
|
|
4426
4703
|
// Authentication mode: either privateKey OR walletClient (required, mutually exclusive)
|
|
4427
|
-
privateKey:
|
|
4428
|
-
walletClient:
|
|
4704
|
+
privateKey: import_zod55.z.string().optional(),
|
|
4705
|
+
walletClient: import_zod55.z.unknown().optional(),
|
|
4429
4706
|
// Public client (optional, will create default if not provided)
|
|
4430
|
-
publicClient:
|
|
4707
|
+
publicClient: import_zod55.z.unknown().optional(),
|
|
4431
4708
|
// App configuration (optional)
|
|
4432
|
-
allowAnyDevice:
|
|
4433
|
-
deviceId:
|
|
4434
|
-
composeHash:
|
|
4435
|
-
disableUpgrades:
|
|
4709
|
+
allowAnyDevice: import_zod55.z.boolean().optional().default(false),
|
|
4710
|
+
deviceId: import_zod55.z.string().optional().default("0000000000000000000000000000000000000000000000000000000000000000"),
|
|
4711
|
+
composeHash: import_zod55.z.string().optional().default("0000000000000000000000000000000000000000000000000000000000000000"),
|
|
4712
|
+
disableUpgrades: import_zod55.z.boolean().optional().default(false),
|
|
4436
4713
|
// Validation configuration (optional)
|
|
4437
|
-
skipPrerequisiteChecks:
|
|
4438
|
-
minBalance:
|
|
4714
|
+
skipPrerequisiteChecks: import_zod55.z.boolean().optional().default(false),
|
|
4715
|
+
minBalance: import_zod55.z.string().optional()
|
|
4439
4716
|
// ETH amount as string, e.g., "0.01"
|
|
4440
4717
|
}).passthrough();
|
|
4441
4718
|
var DeployAppAuthRequestSchema = DeployAppAuthRequestBaseSchema.refine(
|
|
@@ -4463,17 +4740,17 @@ var DeployAppAuthRequestSchema = DeployAppAuthRequestBaseSchema.refine(
|
|
|
4463
4740
|
path: ["chain"]
|
|
4464
4741
|
}
|
|
4465
4742
|
);
|
|
4466
|
-
var DeployAppAuthSchema =
|
|
4467
|
-
appId:
|
|
4468
|
-
appAuthAddress:
|
|
4469
|
-
deployer:
|
|
4470
|
-
transactionHash:
|
|
4471
|
-
blockNumber:
|
|
4472
|
-
gasUsed:
|
|
4743
|
+
var DeployAppAuthSchema = import_zod55.z.object({
|
|
4744
|
+
appId: import_zod55.z.string(),
|
|
4745
|
+
appAuthAddress: import_zod55.z.string(),
|
|
4746
|
+
deployer: import_zod55.z.string(),
|
|
4747
|
+
transactionHash: import_zod55.z.string(),
|
|
4748
|
+
blockNumber: import_zod55.z.bigint().optional(),
|
|
4749
|
+
gasUsed: import_zod55.z.bigint().optional()
|
|
4473
4750
|
}).passthrough();
|
|
4474
4751
|
function parseDeploymentResult(receipt, deployer, kmsContractAddress) {
|
|
4475
4752
|
try {
|
|
4476
|
-
const logs = (0,
|
|
4753
|
+
const logs = (0, import_viem4.parseEventLogs)({
|
|
4477
4754
|
abi: kmsAuthAbi,
|
|
4478
4755
|
eventName: "AppDeployedViaFactory",
|
|
4479
4756
|
logs: receipt.logs,
|
|
@@ -4551,18 +4828,18 @@ async function deployAppAuth(request, parameters) {
|
|
|
4551
4828
|
if (!chain) {
|
|
4552
4829
|
throw new Error("Chain required for publicClient");
|
|
4553
4830
|
}
|
|
4554
|
-
publicClient = (0,
|
|
4831
|
+
publicClient = (0, import_viem4.createPublicClient)({
|
|
4555
4832
|
chain,
|
|
4556
|
-
transport: (0,
|
|
4833
|
+
transport: (0, import_viem4.http)(rpcUrl)
|
|
4557
4834
|
});
|
|
4558
4835
|
}
|
|
4559
4836
|
if (!chain) {
|
|
4560
4837
|
throw new Error("Chain required for walletClient");
|
|
4561
4838
|
}
|
|
4562
|
-
walletClient = (0,
|
|
4839
|
+
walletClient = (0, import_viem4.createWalletClient)({
|
|
4563
4840
|
account,
|
|
4564
4841
|
chain,
|
|
4565
|
-
transport: (0,
|
|
4842
|
+
transport: (0, import_viem4.http)(rpcUrl)
|
|
4566
4843
|
});
|
|
4567
4844
|
deployerAddress = account.address;
|
|
4568
4845
|
chainId = chain.id;
|
|
@@ -4580,9 +4857,9 @@ async function deployAppAuth(request, parameters) {
|
|
|
4580
4857
|
if (!chain) {
|
|
4581
4858
|
throw new Error("Chain required for publicClient");
|
|
4582
4859
|
}
|
|
4583
|
-
publicClient = (0,
|
|
4860
|
+
publicClient = (0, import_viem4.createPublicClient)({
|
|
4584
4861
|
chain,
|
|
4585
|
-
transport: (0,
|
|
4862
|
+
transport: (0, import_viem4.http)(rpcUrl)
|
|
4586
4863
|
});
|
|
4587
4864
|
}
|
|
4588
4865
|
if (!walletClient.account?.address) {
|
|
@@ -4618,7 +4895,7 @@ async function deployAppAuth(request, parameters) {
|
|
|
4618
4895
|
if (!skipPrerequisiteChecks) {
|
|
4619
4896
|
const requirements = {
|
|
4620
4897
|
targetChainId: chainId,
|
|
4621
|
-
minBalance: minBalance ? (0,
|
|
4898
|
+
minBalance: minBalance ? (0, import_viem4.parseEther)(minBalance) : (0, import_viem4.parseEther)("0.001")
|
|
4622
4899
|
// Default 0.001 ETH
|
|
4623
4900
|
};
|
|
4624
4901
|
const validation = await validateNetworkPrerequisites(networkClients, requirements);
|
|
@@ -4715,8 +4992,8 @@ async function safeDeployAppAuth(request, parameters) {
|
|
|
4715
4992
|
}
|
|
4716
4993
|
|
|
4717
4994
|
// src/actions/blockchains/add_compose_hash.ts
|
|
4718
|
-
var
|
|
4719
|
-
var
|
|
4995
|
+
var import_zod56 = require("zod");
|
|
4996
|
+
var import_viem5 = require("viem");
|
|
4720
4997
|
var import_accounts3 = require("viem/accounts");
|
|
4721
4998
|
var appAuthAbi = [
|
|
4722
4999
|
{
|
|
@@ -4733,29 +5010,29 @@ var appAuthAbi = [
|
|
|
4733
5010
|
anonymous: false
|
|
4734
5011
|
}
|
|
4735
5012
|
];
|
|
4736
|
-
var AddComposeHashRequestSchema =
|
|
5013
|
+
var AddComposeHashRequestSchema = import_zod56.z.object({
|
|
4737
5014
|
// Chain configuration (conditionally required)
|
|
4738
|
-
chain:
|
|
4739
|
-
rpcUrl:
|
|
4740
|
-
appId:
|
|
4741
|
-
composeHash:
|
|
5015
|
+
chain: import_zod56.z.unknown().optional(),
|
|
5016
|
+
rpcUrl: import_zod56.z.string().optional(),
|
|
5017
|
+
appId: import_zod56.z.string(),
|
|
5018
|
+
composeHash: import_zod56.z.string(),
|
|
4742
5019
|
// Authentication mode: either privateKey OR walletClient (required, mutually exclusive)
|
|
4743
|
-
privateKey:
|
|
4744
|
-
walletClient:
|
|
5020
|
+
privateKey: import_zod56.z.string().optional(),
|
|
5021
|
+
walletClient: import_zod56.z.unknown().optional(),
|
|
4745
5022
|
// Public client (optional, will create default if not provided)
|
|
4746
|
-
publicClient:
|
|
5023
|
+
publicClient: import_zod56.z.unknown().optional(),
|
|
4747
5024
|
// Validation configuration (optional)
|
|
4748
|
-
skipPrerequisiteChecks:
|
|
4749
|
-
minBalance:
|
|
5025
|
+
skipPrerequisiteChecks: import_zod56.z.boolean().optional().default(false),
|
|
5026
|
+
minBalance: import_zod56.z.string().optional(),
|
|
4750
5027
|
// ETH amount as string, e.g., "0.01"
|
|
4751
5028
|
// Transaction control options
|
|
4752
|
-
timeout:
|
|
4753
|
-
retryOptions:
|
|
4754
|
-
signal:
|
|
5029
|
+
timeout: import_zod56.z.number().optional().default(12e4),
|
|
5030
|
+
retryOptions: import_zod56.z.unknown().optional(),
|
|
5031
|
+
signal: import_zod56.z.unknown().optional(),
|
|
4755
5032
|
// Progress callbacks
|
|
4756
|
-
onTransactionStateChange:
|
|
4757
|
-
onTransactionSubmitted:
|
|
4758
|
-
onTransactionConfirmed:
|
|
5033
|
+
onTransactionStateChange: import_zod56.z.function().optional(),
|
|
5034
|
+
onTransactionSubmitted: import_zod56.z.function().optional(),
|
|
5035
|
+
onTransactionConfirmed: import_zod56.z.function().optional()
|
|
4759
5036
|
}).passthrough().refine(
|
|
4760
5037
|
(data) => {
|
|
4761
5038
|
const hasPrivateKey = !!data.privateKey;
|
|
@@ -4779,17 +5056,17 @@ var AddComposeHashRequestSchema = import_zod52.z.object({
|
|
|
4779
5056
|
path: ["chain"]
|
|
4780
5057
|
}
|
|
4781
5058
|
);
|
|
4782
|
-
var AddComposeHashSchema =
|
|
4783
|
-
composeHash:
|
|
4784
|
-
appId:
|
|
4785
|
-
transactionHash:
|
|
4786
|
-
blockNumber:
|
|
4787
|
-
gasUsed:
|
|
5059
|
+
var AddComposeHashSchema = import_zod56.z.object({
|
|
5060
|
+
composeHash: import_zod56.z.string(),
|
|
5061
|
+
appId: import_zod56.z.string(),
|
|
5062
|
+
transactionHash: import_zod56.z.string(),
|
|
5063
|
+
blockNumber: import_zod56.z.bigint().optional(),
|
|
5064
|
+
gasUsed: import_zod56.z.bigint().optional()
|
|
4788
5065
|
}).passthrough();
|
|
4789
5066
|
function parseComposeHashResult(receipt, composeHash, appAuthAddress, appId) {
|
|
4790
5067
|
console.log(receipt.logs);
|
|
4791
5068
|
try {
|
|
4792
|
-
const logs = (0,
|
|
5069
|
+
const logs = (0, import_viem5.parseEventLogs)({
|
|
4793
5070
|
abi: appAuthAbi,
|
|
4794
5071
|
eventName: "ComposeHashAdded",
|
|
4795
5072
|
logs: receipt.logs,
|
|
@@ -4853,13 +5130,13 @@ async function addComposeHash(request, parameters) {
|
|
|
4853
5130
|
publicClient = providedPublicClient;
|
|
4854
5131
|
} else {
|
|
4855
5132
|
if (!chain) throw new Error("Chain required when creating publicClient");
|
|
4856
|
-
publicClient = (0,
|
|
5133
|
+
publicClient = (0, import_viem5.createPublicClient)({ chain, transport: (0, import_viem5.http)(rpcUrl) });
|
|
4857
5134
|
}
|
|
4858
5135
|
if (!chain) throw new Error("Chain required when creating walletClient");
|
|
4859
|
-
walletClient = (0,
|
|
5136
|
+
walletClient = (0, import_viem5.createWalletClient)({
|
|
4860
5137
|
account,
|
|
4861
5138
|
chain,
|
|
4862
|
-
transport: (0,
|
|
5139
|
+
transport: (0, import_viem5.http)(rpcUrl)
|
|
4863
5140
|
});
|
|
4864
5141
|
address = account.address;
|
|
4865
5142
|
chainId = chain.id;
|
|
@@ -4869,7 +5146,7 @@ async function addComposeHash(request, parameters) {
|
|
|
4869
5146
|
publicClient = providedPublicClient;
|
|
4870
5147
|
} else {
|
|
4871
5148
|
if (!chain) throw new Error("Chain required when creating publicClient");
|
|
4872
|
-
publicClient = (0,
|
|
5149
|
+
publicClient = (0, import_viem5.createPublicClient)({ chain, transport: (0, import_viem5.http)(rpcUrl) });
|
|
4873
5150
|
}
|
|
4874
5151
|
if (!walletClient.account?.address) {
|
|
4875
5152
|
throw new Error("WalletClient must have an account with address");
|
|
@@ -4898,7 +5175,7 @@ async function addComposeHash(request, parameters) {
|
|
|
4898
5175
|
if (!skipPrerequisiteChecks) {
|
|
4899
5176
|
const requirements = {
|
|
4900
5177
|
targetChainId: chainId,
|
|
4901
|
-
minBalance: minBalance ? (0,
|
|
5178
|
+
minBalance: minBalance ? (0, import_viem5.parseEther)(minBalance) : (0, import_viem5.parseEther)("0.001")
|
|
4902
5179
|
};
|
|
4903
5180
|
const validation = await validateNetworkPrerequisites(networkClients, requirements);
|
|
4904
5181
|
if (!validation.networkValid) {
|
|
@@ -4994,8 +5271,8 @@ async function safeAddComposeHash(request, parameters) {
|
|
|
4994
5271
|
}
|
|
4995
5272
|
|
|
4996
5273
|
// src/actions/blockchains/add_device.ts
|
|
4997
|
-
var
|
|
4998
|
-
var
|
|
5274
|
+
var import_zod57 = require("zod");
|
|
5275
|
+
var import_viem6 = require("viem");
|
|
4999
5276
|
var import_accounts4 = require("viem/accounts");
|
|
5000
5277
|
|
|
5001
5278
|
// src/actions/blockchains/abi/dstack_app.ts
|
|
@@ -5084,22 +5361,22 @@ var dstackAppAbi = [
|
|
|
5084
5361
|
];
|
|
5085
5362
|
|
|
5086
5363
|
// src/actions/blockchains/add_device.ts
|
|
5087
|
-
var AddDeviceRequestSchema =
|
|
5088
|
-
chain:
|
|
5089
|
-
rpcUrl:
|
|
5090
|
-
appAddress:
|
|
5091
|
-
deviceId:
|
|
5092
|
-
privateKey:
|
|
5093
|
-
walletClient:
|
|
5094
|
-
publicClient:
|
|
5095
|
-
skipPrerequisiteChecks:
|
|
5096
|
-
minBalance:
|
|
5097
|
-
timeout:
|
|
5098
|
-
retryOptions:
|
|
5099
|
-
signal:
|
|
5100
|
-
onTransactionStateChange:
|
|
5101
|
-
onTransactionSubmitted:
|
|
5102
|
-
onTransactionConfirmed:
|
|
5364
|
+
var AddDeviceRequestSchema = import_zod57.z.object({
|
|
5365
|
+
chain: import_zod57.z.unknown().optional(),
|
|
5366
|
+
rpcUrl: import_zod57.z.string().optional(),
|
|
5367
|
+
appAddress: import_zod57.z.string(),
|
|
5368
|
+
deviceId: import_zod57.z.string(),
|
|
5369
|
+
privateKey: import_zod57.z.string().optional(),
|
|
5370
|
+
walletClient: import_zod57.z.unknown().optional(),
|
|
5371
|
+
publicClient: import_zod57.z.unknown().optional(),
|
|
5372
|
+
skipPrerequisiteChecks: import_zod57.z.boolean().optional().default(false),
|
|
5373
|
+
minBalance: import_zod57.z.string().optional(),
|
|
5374
|
+
timeout: import_zod57.z.number().optional().default(12e4),
|
|
5375
|
+
retryOptions: import_zod57.z.unknown().optional(),
|
|
5376
|
+
signal: import_zod57.z.unknown().optional(),
|
|
5377
|
+
onTransactionStateChange: import_zod57.z.function().optional(),
|
|
5378
|
+
onTransactionSubmitted: import_zod57.z.function().optional(),
|
|
5379
|
+
onTransactionConfirmed: import_zod57.z.function().optional()
|
|
5103
5380
|
}).passthrough().refine((data) => !!data.privateKey !== !!data.walletClient, {
|
|
5104
5381
|
message: "Either 'privateKey' or 'walletClient' must be provided, but not both",
|
|
5105
5382
|
path: ["privateKey", "walletClient"]
|
|
@@ -5113,12 +5390,12 @@ var AddDeviceRequestSchema = import_zod53.z.object({
|
|
|
5113
5390
|
path: ["chain"]
|
|
5114
5391
|
}
|
|
5115
5392
|
);
|
|
5116
|
-
var AddDeviceSchema =
|
|
5117
|
-
appAddress:
|
|
5118
|
-
deviceId:
|
|
5119
|
-
transactionHash:
|
|
5120
|
-
blockNumber:
|
|
5121
|
-
gasUsed:
|
|
5393
|
+
var AddDeviceSchema = import_zod57.z.object({
|
|
5394
|
+
appAddress: import_zod57.z.string(),
|
|
5395
|
+
deviceId: import_zod57.z.string(),
|
|
5396
|
+
transactionHash: import_zod57.z.string(),
|
|
5397
|
+
blockNumber: import_zod57.z.bigint().optional(),
|
|
5398
|
+
gasUsed: import_zod57.z.bigint().optional()
|
|
5122
5399
|
}).passthrough();
|
|
5123
5400
|
async function addDevice(request, parameters) {
|
|
5124
5401
|
const validatedRequest = AddDeviceRequestSchema.parse(request);
|
|
@@ -5147,9 +5424,9 @@ async function addDevice(request, parameters) {
|
|
|
5147
5424
|
let chainId;
|
|
5148
5425
|
if (privateKey) {
|
|
5149
5426
|
const account = (0, import_accounts4.privateKeyToAccount)(privateKey);
|
|
5150
|
-
const transport = (0,
|
|
5151
|
-
publicClient = providedPublicClient ? providedPublicClient : (0,
|
|
5152
|
-
walletClient = (0,
|
|
5427
|
+
const transport = (0, import_viem6.http)(rpcUrl, { timeout });
|
|
5428
|
+
publicClient = providedPublicClient ? providedPublicClient : (0, import_viem6.createPublicClient)({ chain, transport });
|
|
5429
|
+
walletClient = (0, import_viem6.createWalletClient)({
|
|
5153
5430
|
account,
|
|
5154
5431
|
chain,
|
|
5155
5432
|
transport
|
|
@@ -5158,9 +5435,9 @@ async function addDevice(request, parameters) {
|
|
|
5158
5435
|
chainId = chain.id;
|
|
5159
5436
|
} else if (providedWalletClient) {
|
|
5160
5437
|
walletClient = providedWalletClient;
|
|
5161
|
-
publicClient = providedPublicClient ? providedPublicClient : (0,
|
|
5438
|
+
publicClient = providedPublicClient ? providedPublicClient : (0, import_viem6.createPublicClient)({
|
|
5162
5439
|
chain,
|
|
5163
|
-
transport: (0,
|
|
5440
|
+
transport: (0, import_viem6.http)(rpcUrl, { timeout })
|
|
5164
5441
|
});
|
|
5165
5442
|
if (!walletClient.account?.address) {
|
|
5166
5443
|
throw new Error("WalletClient must have an account with address");
|
|
@@ -5184,7 +5461,7 @@ async function addDevice(request, parameters) {
|
|
|
5184
5461
|
if (!skipPrerequisiteChecks) {
|
|
5185
5462
|
const requirements = {
|
|
5186
5463
|
targetChainId: chainId,
|
|
5187
|
-
minBalance: minBalance ? (0,
|
|
5464
|
+
minBalance: minBalance ? (0, import_viem6.parseEther)(minBalance) : (0, import_viem6.parseEther)("0.001")
|
|
5188
5465
|
};
|
|
5189
5466
|
const validation = await validateNetworkPrerequisites(networkClients, requirements);
|
|
5190
5467
|
if (!validation.networkValid) {
|
|
@@ -5266,25 +5543,25 @@ async function safeAddDevice(request, parameters) {
|
|
|
5266
5543
|
}
|
|
5267
5544
|
|
|
5268
5545
|
// src/actions/blockchains/remove_device.ts
|
|
5269
|
-
var
|
|
5270
|
-
var
|
|
5546
|
+
var import_zod58 = require("zod");
|
|
5547
|
+
var import_viem7 = require("viem");
|
|
5271
5548
|
var import_accounts5 = require("viem/accounts");
|
|
5272
|
-
var RemoveDeviceRequestSchema =
|
|
5273
|
-
chain:
|
|
5274
|
-
rpcUrl:
|
|
5275
|
-
appAddress:
|
|
5276
|
-
deviceId:
|
|
5277
|
-
privateKey:
|
|
5278
|
-
walletClient:
|
|
5279
|
-
publicClient:
|
|
5280
|
-
skipPrerequisiteChecks:
|
|
5281
|
-
minBalance:
|
|
5282
|
-
timeout:
|
|
5283
|
-
retryOptions:
|
|
5284
|
-
signal:
|
|
5285
|
-
onTransactionStateChange:
|
|
5286
|
-
onTransactionSubmitted:
|
|
5287
|
-
onTransactionConfirmed:
|
|
5549
|
+
var RemoveDeviceRequestSchema = import_zod58.z.object({
|
|
5550
|
+
chain: import_zod58.z.unknown().optional(),
|
|
5551
|
+
rpcUrl: import_zod58.z.string().optional(),
|
|
5552
|
+
appAddress: import_zod58.z.string(),
|
|
5553
|
+
deviceId: import_zod58.z.string(),
|
|
5554
|
+
privateKey: import_zod58.z.string().optional(),
|
|
5555
|
+
walletClient: import_zod58.z.unknown().optional(),
|
|
5556
|
+
publicClient: import_zod58.z.unknown().optional(),
|
|
5557
|
+
skipPrerequisiteChecks: import_zod58.z.boolean().optional().default(false),
|
|
5558
|
+
minBalance: import_zod58.z.string().optional(),
|
|
5559
|
+
timeout: import_zod58.z.number().optional().default(12e4),
|
|
5560
|
+
retryOptions: import_zod58.z.unknown().optional(),
|
|
5561
|
+
signal: import_zod58.z.unknown().optional(),
|
|
5562
|
+
onTransactionStateChange: import_zod58.z.function().optional(),
|
|
5563
|
+
onTransactionSubmitted: import_zod58.z.function().optional(),
|
|
5564
|
+
onTransactionConfirmed: import_zod58.z.function().optional()
|
|
5288
5565
|
}).passthrough().refine((data) => !!data.privateKey !== !!data.walletClient, {
|
|
5289
5566
|
message: "Either 'privateKey' or 'walletClient' must be provided, but not both",
|
|
5290
5567
|
path: ["privateKey", "walletClient"]
|
|
@@ -5298,12 +5575,12 @@ var RemoveDeviceRequestSchema = import_zod54.z.object({
|
|
|
5298
5575
|
path: ["chain"]
|
|
5299
5576
|
}
|
|
5300
5577
|
);
|
|
5301
|
-
var RemoveDeviceSchema =
|
|
5302
|
-
appAddress:
|
|
5303
|
-
deviceId:
|
|
5304
|
-
transactionHash:
|
|
5305
|
-
blockNumber:
|
|
5306
|
-
gasUsed:
|
|
5578
|
+
var RemoveDeviceSchema = import_zod58.z.object({
|
|
5579
|
+
appAddress: import_zod58.z.string(),
|
|
5580
|
+
deviceId: import_zod58.z.string(),
|
|
5581
|
+
transactionHash: import_zod58.z.string(),
|
|
5582
|
+
blockNumber: import_zod58.z.bigint().optional(),
|
|
5583
|
+
gasUsed: import_zod58.z.bigint().optional()
|
|
5307
5584
|
}).passthrough();
|
|
5308
5585
|
async function removeDevice(request, parameters) {
|
|
5309
5586
|
const validatedRequest = RemoveDeviceRequestSchema.parse(request);
|
|
@@ -5332,9 +5609,9 @@ async function removeDevice(request, parameters) {
|
|
|
5332
5609
|
let chainId;
|
|
5333
5610
|
if (privateKey) {
|
|
5334
5611
|
const account = (0, import_accounts5.privateKeyToAccount)(privateKey);
|
|
5335
|
-
const transport = (0,
|
|
5336
|
-
publicClient = providedPublicClient ? providedPublicClient : (0,
|
|
5337
|
-
walletClient = (0,
|
|
5612
|
+
const transport = (0, import_viem7.http)(rpcUrl, { timeout });
|
|
5613
|
+
publicClient = providedPublicClient ? providedPublicClient : (0, import_viem7.createPublicClient)({ chain, transport });
|
|
5614
|
+
walletClient = (0, import_viem7.createWalletClient)({
|
|
5338
5615
|
account,
|
|
5339
5616
|
chain,
|
|
5340
5617
|
transport
|
|
@@ -5343,9 +5620,9 @@ async function removeDevice(request, parameters) {
|
|
|
5343
5620
|
chainId = chain.id;
|
|
5344
5621
|
} else if (providedWalletClient) {
|
|
5345
5622
|
walletClient = providedWalletClient;
|
|
5346
|
-
publicClient = providedPublicClient ? providedPublicClient : (0,
|
|
5623
|
+
publicClient = providedPublicClient ? providedPublicClient : (0, import_viem7.createPublicClient)({
|
|
5347
5624
|
chain,
|
|
5348
|
-
transport: (0,
|
|
5625
|
+
transport: (0, import_viem7.http)(rpcUrl, { timeout })
|
|
5349
5626
|
});
|
|
5350
5627
|
if (!walletClient.account?.address) {
|
|
5351
5628
|
throw new Error("WalletClient must have an account with address");
|
|
@@ -5369,7 +5646,7 @@ async function removeDevice(request, parameters) {
|
|
|
5369
5646
|
if (!skipPrerequisiteChecks) {
|
|
5370
5647
|
const requirements = {
|
|
5371
5648
|
targetChainId: chainId,
|
|
5372
|
-
minBalance: minBalance ? (0,
|
|
5649
|
+
minBalance: minBalance ? (0, import_viem7.parseEther)(minBalance) : (0, import_viem7.parseEther)("0.001")
|
|
5373
5650
|
};
|
|
5374
5651
|
const validation = await validateNetworkPrerequisites(networkClients, requirements);
|
|
5375
5652
|
if (!validation.networkValid) {
|
|
@@ -5441,25 +5718,25 @@ async function safeRemoveDevice(request, parameters) {
|
|
|
5441
5718
|
}
|
|
5442
5719
|
|
|
5443
5720
|
// src/actions/blockchains/set_allow_any_device.ts
|
|
5444
|
-
var
|
|
5445
|
-
var
|
|
5721
|
+
var import_zod59 = require("zod");
|
|
5722
|
+
var import_viem8 = require("viem");
|
|
5446
5723
|
var import_accounts6 = require("viem/accounts");
|
|
5447
|
-
var SetAllowAnyDeviceRequestSchema =
|
|
5448
|
-
chain:
|
|
5449
|
-
rpcUrl:
|
|
5450
|
-
appAddress:
|
|
5451
|
-
allow:
|
|
5452
|
-
privateKey:
|
|
5453
|
-
walletClient:
|
|
5454
|
-
publicClient:
|
|
5455
|
-
skipPrerequisiteChecks:
|
|
5456
|
-
minBalance:
|
|
5457
|
-
timeout:
|
|
5458
|
-
retryOptions:
|
|
5459
|
-
signal:
|
|
5460
|
-
onTransactionStateChange:
|
|
5461
|
-
onTransactionSubmitted:
|
|
5462
|
-
onTransactionConfirmed:
|
|
5724
|
+
var SetAllowAnyDeviceRequestSchema = import_zod59.z.object({
|
|
5725
|
+
chain: import_zod59.z.unknown().optional(),
|
|
5726
|
+
rpcUrl: import_zod59.z.string().optional(),
|
|
5727
|
+
appAddress: import_zod59.z.string(),
|
|
5728
|
+
allow: import_zod59.z.boolean(),
|
|
5729
|
+
privateKey: import_zod59.z.string().optional(),
|
|
5730
|
+
walletClient: import_zod59.z.unknown().optional(),
|
|
5731
|
+
publicClient: import_zod59.z.unknown().optional(),
|
|
5732
|
+
skipPrerequisiteChecks: import_zod59.z.boolean().optional().default(false),
|
|
5733
|
+
minBalance: import_zod59.z.string().optional(),
|
|
5734
|
+
timeout: import_zod59.z.number().optional().default(12e4),
|
|
5735
|
+
retryOptions: import_zod59.z.unknown().optional(),
|
|
5736
|
+
signal: import_zod59.z.unknown().optional(),
|
|
5737
|
+
onTransactionStateChange: import_zod59.z.function().optional(),
|
|
5738
|
+
onTransactionSubmitted: import_zod59.z.function().optional(),
|
|
5739
|
+
onTransactionConfirmed: import_zod59.z.function().optional()
|
|
5463
5740
|
}).passthrough().refine((data) => !!data.privateKey !== !!data.walletClient, {
|
|
5464
5741
|
message: "Either 'privateKey' or 'walletClient' must be provided, but not both",
|
|
5465
5742
|
path: ["privateKey", "walletClient"]
|
|
@@ -5473,12 +5750,12 @@ var SetAllowAnyDeviceRequestSchema = import_zod55.z.object({
|
|
|
5473
5750
|
path: ["chain"]
|
|
5474
5751
|
}
|
|
5475
5752
|
);
|
|
5476
|
-
var SetAllowAnyDeviceSchema =
|
|
5477
|
-
appAddress:
|
|
5478
|
-
allow:
|
|
5479
|
-
transactionHash:
|
|
5480
|
-
blockNumber:
|
|
5481
|
-
gasUsed:
|
|
5753
|
+
var SetAllowAnyDeviceSchema = import_zod59.z.object({
|
|
5754
|
+
appAddress: import_zod59.z.string(),
|
|
5755
|
+
allow: import_zod59.z.boolean(),
|
|
5756
|
+
transactionHash: import_zod59.z.string(),
|
|
5757
|
+
blockNumber: import_zod59.z.bigint().optional(),
|
|
5758
|
+
gasUsed: import_zod59.z.bigint().optional()
|
|
5482
5759
|
}).passthrough();
|
|
5483
5760
|
async function setAllowAnyDevice(request, parameters) {
|
|
5484
5761
|
const validatedRequest = SetAllowAnyDeviceRequestSchema.parse(request);
|
|
@@ -5506,9 +5783,9 @@ async function setAllowAnyDevice(request, parameters) {
|
|
|
5506
5783
|
let chainId;
|
|
5507
5784
|
if (privateKey) {
|
|
5508
5785
|
const account = (0, import_accounts6.privateKeyToAccount)(privateKey);
|
|
5509
|
-
const transport = (0,
|
|
5510
|
-
publicClient = providedPublicClient ? providedPublicClient : (0,
|
|
5511
|
-
walletClient = (0,
|
|
5786
|
+
const transport = (0, import_viem8.http)(rpcUrl, { timeout });
|
|
5787
|
+
publicClient = providedPublicClient ? providedPublicClient : (0, import_viem8.createPublicClient)({ chain, transport });
|
|
5788
|
+
walletClient = (0, import_viem8.createWalletClient)({
|
|
5512
5789
|
account,
|
|
5513
5790
|
chain,
|
|
5514
5791
|
transport
|
|
@@ -5517,9 +5794,9 @@ async function setAllowAnyDevice(request, parameters) {
|
|
|
5517
5794
|
chainId = chain.id;
|
|
5518
5795
|
} else if (providedWalletClient) {
|
|
5519
5796
|
walletClient = providedWalletClient;
|
|
5520
|
-
publicClient = providedPublicClient ? providedPublicClient : (0,
|
|
5797
|
+
publicClient = providedPublicClient ? providedPublicClient : (0, import_viem8.createPublicClient)({
|
|
5521
5798
|
chain,
|
|
5522
|
-
transport: (0,
|
|
5799
|
+
transport: (0, import_viem8.http)(rpcUrl, { timeout })
|
|
5523
5800
|
});
|
|
5524
5801
|
if (!walletClient.account?.address) {
|
|
5525
5802
|
throw new Error("WalletClient must have an account with address");
|
|
@@ -5543,7 +5820,7 @@ async function setAllowAnyDevice(request, parameters) {
|
|
|
5543
5820
|
if (!skipPrerequisiteChecks) {
|
|
5544
5821
|
const requirements = {
|
|
5545
5822
|
targetChainId: chainId,
|
|
5546
|
-
minBalance: minBalance ? (0,
|
|
5823
|
+
minBalance: minBalance ? (0, import_viem8.parseEther)(minBalance) : (0, import_viem8.parseEther)("0.001")
|
|
5547
5824
|
};
|
|
5548
5825
|
const validation = await validateNetworkPrerequisites(networkClients, requirements);
|
|
5549
5826
|
if (!validation.networkValid) {
|
|
@@ -5615,20 +5892,20 @@ async function safeSetAllowAnyDevice(request, parameters) {
|
|
|
5615
5892
|
}
|
|
5616
5893
|
|
|
5617
5894
|
// src/actions/blockchains/get_allowed_devices.ts
|
|
5618
|
-
var
|
|
5619
|
-
var
|
|
5620
|
-
var GetAllowedDevicesSchema =
|
|
5621
|
-
appAddress:
|
|
5622
|
-
owner:
|
|
5623
|
-
allowAnyDevice:
|
|
5624
|
-
devices:
|
|
5895
|
+
var import_zod60 = require("zod");
|
|
5896
|
+
var import_viem9 = require("viem");
|
|
5897
|
+
var GetAllowedDevicesSchema = import_zod60.z.object({
|
|
5898
|
+
appAddress: import_zod60.z.string(),
|
|
5899
|
+
owner: import_zod60.z.string(),
|
|
5900
|
+
allowAnyDevice: import_zod60.z.boolean(),
|
|
5901
|
+
devices: import_zod60.z.array(import_zod60.z.string())
|
|
5625
5902
|
});
|
|
5626
5903
|
async function getAllowedDevices(request) {
|
|
5627
5904
|
const { chain, rpcUrl, appAddress, deviceIds, publicClient: providedPublicClient } = request;
|
|
5628
5905
|
const contractAddress = appAddress.startsWith("0x") ? appAddress : `0x${appAddress}`;
|
|
5629
5906
|
const publicClient = providedPublicClient ? providedPublicClient : (() => {
|
|
5630
5907
|
if (!chain) throw new Error("Chain is required when publicClient is not provided");
|
|
5631
|
-
return (0,
|
|
5908
|
+
return (0, import_viem9.createPublicClient)({ chain, transport: (0, import_viem9.http)(rpcUrl) });
|
|
5632
5909
|
})();
|
|
5633
5910
|
const [allowAnyDevice, owner] = await Promise.all([
|
|
5634
5911
|
publicClient.readContract({
|
|
@@ -5687,14 +5964,14 @@ async function safeGetAllowedDevices(request) {
|
|
|
5687
5964
|
}
|
|
5688
5965
|
|
|
5689
5966
|
// src/actions/blockchains/check_device_allowed.ts
|
|
5690
|
-
var
|
|
5967
|
+
var import_viem10 = require("viem");
|
|
5691
5968
|
async function checkDeviceAllowed(request) {
|
|
5692
5969
|
const { chain, rpcUrl, appAddress, deviceId, publicClient: providedPublicClient } = request;
|
|
5693
5970
|
const contractAddress = appAddress.startsWith("0x") ? appAddress : `0x${appAddress}`;
|
|
5694
5971
|
const deviceIdHex = asHex(deviceId);
|
|
5695
5972
|
const publicClient = providedPublicClient ? providedPublicClient : (() => {
|
|
5696
5973
|
if (!chain) throw new Error("Chain is required when publicClient is not provided");
|
|
5697
|
-
return (0,
|
|
5974
|
+
return (0, import_viem10.createPublicClient)({ chain, transport: (0, import_viem10.http)(rpcUrl) });
|
|
5698
5975
|
})();
|
|
5699
5976
|
const allowAny = await publicClient.readContract({
|
|
5700
5977
|
address: contractAddress,
|
|
@@ -5724,14 +6001,14 @@ async function safeCheckDeviceAllowed(request) {
|
|
|
5724
6001
|
}
|
|
5725
6002
|
|
|
5726
6003
|
// src/actions/blockchains/check_compose_hash_allowed.ts
|
|
5727
|
-
var
|
|
6004
|
+
var import_viem11 = require("viem");
|
|
5728
6005
|
async function checkComposeHashAllowed(request) {
|
|
5729
6006
|
const { chain, rpcUrl, appAddress, composeHash, publicClient: providedPublicClient } = request;
|
|
5730
6007
|
const contractAddress = appAddress.startsWith("0x") ? appAddress : `0x${appAddress}`;
|
|
5731
6008
|
const composeHashHex = asHex(composeHash);
|
|
5732
6009
|
const publicClient = providedPublicClient ? providedPublicClient : (() => {
|
|
5733
6010
|
if (!chain) throw new Error("Chain is required when publicClient is not provided");
|
|
5734
|
-
return (0,
|
|
6011
|
+
return (0, import_viem11.createPublicClient)({ chain, transport: (0, import_viem11.http)(rpcUrl) });
|
|
5735
6012
|
})();
|
|
5736
6013
|
const allowed = await publicClient.readContract({
|
|
5737
6014
|
address: contractAddress,
|
|
@@ -5755,7 +6032,7 @@ async function safeCheckComposeHashAllowed(request) {
|
|
|
5755
6032
|
}
|
|
5756
6033
|
|
|
5757
6034
|
// src/actions/blockchains/check_on_chain_prerequisites.ts
|
|
5758
|
-
var
|
|
6035
|
+
var import_viem12 = require("viem");
|
|
5759
6036
|
async function checkOnChainPrerequisites(request) {
|
|
5760
6037
|
const {
|
|
5761
6038
|
chain,
|
|
@@ -5770,7 +6047,7 @@ async function checkOnChainPrerequisites(request) {
|
|
|
5770
6047
|
const composeHashHex = asHex(composeHash);
|
|
5771
6048
|
const publicClient = providedPublicClient ? providedPublicClient : (() => {
|
|
5772
6049
|
if (!chain) throw new Error("Chain is required when publicClient is not provided");
|
|
5773
|
-
return (0,
|
|
6050
|
+
return (0, import_viem12.createPublicClient)({ chain, transport: (0, import_viem12.http)(rpcUrl) });
|
|
5774
6051
|
})();
|
|
5775
6052
|
const calls = [
|
|
5776
6053
|
{
|
|
@@ -5815,15 +6092,15 @@ async function safeCheckOnChainPrerequisites(request) {
|
|
|
5815
6092
|
}
|
|
5816
6093
|
|
|
5817
6094
|
// src/actions/workspaces/get_workspace_nodes.ts
|
|
5818
|
-
var
|
|
6095
|
+
var import_zod61 = require("zod");
|
|
5819
6096
|
var NodeRefSchema2 = NodeRefSchema;
|
|
5820
6097
|
var NodeInfoSchema = NodeRefSchema2;
|
|
5821
|
-
var GetWorkspaceNodesSchema =
|
|
5822
|
-
items:
|
|
5823
|
-
total:
|
|
5824
|
-
page:
|
|
5825
|
-
page_size:
|
|
5826
|
-
pages:
|
|
6098
|
+
var GetWorkspaceNodesSchema = import_zod61.z.object({
|
|
6099
|
+
items: import_zod61.z.array(NodeRefSchema2),
|
|
6100
|
+
total: import_zod61.z.number(),
|
|
6101
|
+
page: import_zod61.z.number(),
|
|
6102
|
+
page_size: import_zod61.z.number(),
|
|
6103
|
+
pages: import_zod61.z.number()
|
|
5827
6104
|
}).passthrough();
|
|
5828
6105
|
var { action: getWorkspaceNodes, safeAction: safeGetWorkspaceNodes } = defineAction(GetWorkspaceNodesSchema, async (client, request) => {
|
|
5829
6106
|
const { teamSlug, page, pageSize } = request;
|
|
@@ -5835,39 +6112,39 @@ var { action: getWorkspaceNodes, safeAction: safeGetWorkspaceNodes } = defineAct
|
|
|
5835
6112
|
});
|
|
5836
6113
|
|
|
5837
6114
|
// src/actions/workspaces/get_workspace_quotas.ts
|
|
5838
|
-
var
|
|
5839
|
-
var QuotaMetricSchema =
|
|
5840
|
-
limit:
|
|
5841
|
-
remaining:
|
|
6115
|
+
var import_zod62 = require("zod");
|
|
6116
|
+
var QuotaMetricSchema = import_zod62.z.object({
|
|
6117
|
+
limit: import_zod62.z.number(),
|
|
6118
|
+
remaining: import_zod62.z.number()
|
|
5842
6119
|
}).passthrough();
|
|
5843
|
-
var WorkspaceQuotasSchema =
|
|
6120
|
+
var WorkspaceQuotasSchema = import_zod62.z.object({
|
|
5844
6121
|
vm_slots: QuotaMetricSchema,
|
|
5845
6122
|
vcpu: QuotaMetricSchema,
|
|
5846
6123
|
memory_mb: QuotaMetricSchema,
|
|
5847
6124
|
disk_gb: QuotaMetricSchema
|
|
5848
6125
|
}).passthrough();
|
|
5849
|
-
var WorkspaceReservedGpuQuotaSchema =
|
|
6126
|
+
var WorkspaceReservedGpuQuotaSchema = import_zod62.z.object({
|
|
5850
6127
|
gpus: QuotaMetricSchema,
|
|
5851
|
-
in_use:
|
|
5852
|
-
misconfigured:
|
|
6128
|
+
in_use: import_zod62.z.number(),
|
|
6129
|
+
misconfigured: import_zod62.z.number()
|
|
5853
6130
|
}).passthrough();
|
|
5854
|
-
var GetWorkspaceQuotasSchema =
|
|
5855
|
-
team_slug:
|
|
5856
|
-
tier:
|
|
6131
|
+
var GetWorkspaceQuotasSchema = import_zod62.z.object({
|
|
6132
|
+
team_slug: import_zod62.z.string(),
|
|
6133
|
+
tier: import_zod62.z.string(),
|
|
5857
6134
|
quotas: WorkspaceQuotasSchema,
|
|
5858
6135
|
reserved_nodes: QuotaMetricSchema,
|
|
5859
6136
|
reserved_gpu: WorkspaceReservedGpuQuotaSchema,
|
|
5860
|
-
as_of:
|
|
6137
|
+
as_of: import_zod62.z.string()
|
|
5861
6138
|
}).passthrough();
|
|
5862
6139
|
var { action: getWorkspaceQuotas, safeAction: safeGetWorkspaceQuotas } = defineAction(GetWorkspaceQuotasSchema, async (client, request) => {
|
|
5863
6140
|
return await client.get(`/workspaces/${request.teamSlug}/quotas`);
|
|
5864
6141
|
});
|
|
5865
6142
|
|
|
5866
6143
|
// src/actions/cvms/replicate_cvm.ts
|
|
5867
|
-
var
|
|
6144
|
+
var import_zod63 = require("zod");
|
|
5868
6145
|
var ReplicateCvmRequestSchema = refineCvmId(
|
|
5869
6146
|
CvmIdObjectSchema.extend({
|
|
5870
|
-
node_id:
|
|
6147
|
+
node_id: import_zod63.z.number().optional()
|
|
5871
6148
|
})
|
|
5872
6149
|
);
|
|
5873
6150
|
async function replicateCvm(client, request) {
|
|
@@ -5896,13 +6173,13 @@ async function safeReplicateCvm(client, request) {
|
|
|
5896
6173
|
}
|
|
5897
6174
|
|
|
5898
6175
|
// src/actions/cvms/watch_cvm_state.ts
|
|
5899
|
-
var
|
|
5900
|
-
var WatchCvmStateParamsSchema =
|
|
5901
|
-
target:
|
|
5902
|
-
interval:
|
|
5903
|
-
timeout:
|
|
5904
|
-
maxRetries:
|
|
5905
|
-
retryDelay:
|
|
6176
|
+
var import_zod64 = require("zod");
|
|
6177
|
+
var WatchCvmStateParamsSchema = import_zod64.z.object({
|
|
6178
|
+
target: import_zod64.z.string().describe("Target status to wait for (e.g., 'running', 'stopped')"),
|
|
6179
|
+
interval: import_zod64.z.number().min(5).max(30).default(5).describe("Polling interval in seconds"),
|
|
6180
|
+
timeout: import_zod64.z.number().min(10).max(600).default(300).describe("Timeout per attempt in seconds"),
|
|
6181
|
+
maxRetries: import_zod64.z.number().min(0).default(Number.POSITIVE_INFINITY).describe("Maximum number of retry attempts (Infinity for unlimited)"),
|
|
6182
|
+
retryDelay: import_zod64.z.number().min(0).default(5e3).describe("Delay between retries in milliseconds")
|
|
5906
6183
|
});
|
|
5907
6184
|
var WatchCvmStateRequestSchema = WatchCvmStateParamsSchema;
|
|
5908
6185
|
var WatchAbortedError = class extends Error {
|
|
@@ -6090,57 +6367,57 @@ function sleep(ms, signal) {
|
|
|
6090
6367
|
}
|
|
6091
6368
|
|
|
6092
6369
|
// src/actions/cvms/patch_cvm.ts
|
|
6093
|
-
var
|
|
6370
|
+
var import_zod65 = require("zod");
|
|
6094
6371
|
var PatchCvmRequestSchema = refineCvmId(
|
|
6095
6372
|
CvmIdObjectSchema.extend({
|
|
6096
6373
|
// Compose-hash-affecting fields
|
|
6097
|
-
docker_compose_file:
|
|
6098
|
-
pre_launch_script:
|
|
6099
|
-
allowed_envs:
|
|
6374
|
+
docker_compose_file: import_zod65.z.string().optional(),
|
|
6375
|
+
pre_launch_script: import_zod65.z.string().optional(),
|
|
6376
|
+
allowed_envs: import_zod65.z.array(import_zod65.z.string()).optional(),
|
|
6100
6377
|
// Visibility
|
|
6101
|
-
public_logs:
|
|
6102
|
-
public_sysinfo:
|
|
6103
|
-
public_tcbinfo:
|
|
6378
|
+
public_logs: import_zod65.z.boolean().optional(),
|
|
6379
|
+
public_sysinfo: import_zod65.z.boolean().optional(),
|
|
6380
|
+
public_tcbinfo: import_zod65.z.boolean().optional(),
|
|
6104
6381
|
// Non-compose-hash config
|
|
6105
|
-
encrypted_env:
|
|
6106
|
-
user_config:
|
|
6107
|
-
gpus:
|
|
6108
|
-
count:
|
|
6109
|
-
product_name:
|
|
6382
|
+
encrypted_env: import_zod65.z.string().optional(),
|
|
6383
|
+
user_config: import_zod65.z.string().optional(),
|
|
6384
|
+
gpus: import_zod65.z.object({
|
|
6385
|
+
count: import_zod65.z.number(),
|
|
6386
|
+
product_name: import_zod65.z.string().optional()
|
|
6110
6387
|
}).optional(),
|
|
6111
6388
|
// Resources
|
|
6112
|
-
vcpu:
|
|
6113
|
-
memory:
|
|
6114
|
-
disk_size:
|
|
6389
|
+
vcpu: import_zod65.z.number().optional(),
|
|
6390
|
+
memory: import_zod65.z.number().optional(),
|
|
6391
|
+
disk_size: import_zod65.z.number().optional(),
|
|
6115
6392
|
// OS image
|
|
6116
|
-
image:
|
|
6393
|
+
image: import_zod65.z.string().optional(),
|
|
6117
6394
|
// Shutdown behavior
|
|
6118
|
-
shutdown_timeout:
|
|
6119
|
-
allow_force_stop:
|
|
6395
|
+
shutdown_timeout: import_zod65.z.number().optional(),
|
|
6396
|
+
allow_force_stop: import_zod65.z.boolean().optional(),
|
|
6120
6397
|
// Prepare-only mode (for multisig workflows)
|
|
6121
|
-
prepareOnly:
|
|
6398
|
+
prepareOnly: import_zod65.z.boolean().optional()
|
|
6122
6399
|
})
|
|
6123
6400
|
);
|
|
6124
|
-
var PatchCvmAcceptedSchema =
|
|
6125
|
-
requiresOnChainHash:
|
|
6126
|
-
correlationId:
|
|
6127
|
-
});
|
|
6128
|
-
var PatchCvmHashRequiredSchema =
|
|
6129
|
-
requiresOnChainHash:
|
|
6130
|
-
composeHash:
|
|
6131
|
-
appId:
|
|
6132
|
-
deviceId:
|
|
6401
|
+
var PatchCvmAcceptedSchema = import_zod65.z.object({
|
|
6402
|
+
requiresOnChainHash: import_zod65.z.literal(false),
|
|
6403
|
+
correlationId: import_zod65.z.string()
|
|
6404
|
+
});
|
|
6405
|
+
var PatchCvmHashRequiredSchema = import_zod65.z.object({
|
|
6406
|
+
requiresOnChainHash: import_zod65.z.literal(true),
|
|
6407
|
+
composeHash: import_zod65.z.string(),
|
|
6408
|
+
appId: import_zod65.z.string(),
|
|
6409
|
+
deviceId: import_zod65.z.string(),
|
|
6133
6410
|
kmsInfo: KmsInfoSchema,
|
|
6134
|
-
commitToken:
|
|
6135
|
-
commitUrl:
|
|
6136
|
-
apiCommitUrl:
|
|
6137
|
-
onchainStatus:
|
|
6138
|
-
compose_hash_allowed:
|
|
6139
|
-
device_id_allowed:
|
|
6140
|
-
is_allowed:
|
|
6411
|
+
commitToken: import_zod65.z.string().optional(),
|
|
6412
|
+
commitUrl: import_zod65.z.string().optional(),
|
|
6413
|
+
apiCommitUrl: import_zod65.z.string().optional(),
|
|
6414
|
+
onchainStatus: import_zod65.z.object({
|
|
6415
|
+
compose_hash_allowed: import_zod65.z.boolean(),
|
|
6416
|
+
device_id_allowed: import_zod65.z.boolean(),
|
|
6417
|
+
is_allowed: import_zod65.z.boolean()
|
|
6141
6418
|
}).optional()
|
|
6142
6419
|
});
|
|
6143
|
-
var PatchCvmResultSchema =
|
|
6420
|
+
var PatchCvmResultSchema = import_zod65.z.discriminatedUnion("requiresOnChainHash", [
|
|
6144
6421
|
PatchCvmAcceptedSchema,
|
|
6145
6422
|
PatchCvmHashRequiredSchema
|
|
6146
6423
|
]);
|
|
@@ -6189,15 +6466,15 @@ var { action: patchCvm, safeAction: safePatchCvm } = defineAction(PatchCvmResult
|
|
|
6189
6466
|
});
|
|
6190
6467
|
|
|
6191
6468
|
// src/actions/cvms/confirm_cvm_patch.ts
|
|
6192
|
-
var
|
|
6469
|
+
var import_zod66 = require("zod");
|
|
6193
6470
|
var ConfirmCvmPatchRequestSchema = refineCvmId(
|
|
6194
6471
|
CvmIdObjectSchema.extend({
|
|
6195
|
-
composeHash:
|
|
6196
|
-
transactionHash:
|
|
6472
|
+
composeHash: import_zod66.z.string().describe("Compose hash from patchCvm Phase 1 response"),
|
|
6473
|
+
transactionHash: import_zod66.z.string().describe("Transaction hash proving on-chain registration")
|
|
6197
6474
|
})
|
|
6198
6475
|
);
|
|
6199
|
-
var ConfirmCvmPatchResultSchema =
|
|
6200
|
-
correlationId:
|
|
6476
|
+
var ConfirmCvmPatchResultSchema = import_zod66.z.object({
|
|
6477
|
+
correlationId: import_zod66.z.string()
|
|
6201
6478
|
});
|
|
6202
6479
|
var { action: confirmCvmPatch, safeAction: safeConfirmCvmPatch } = defineAction(ConfirmCvmPatchResultSchema, async (client, request) => {
|
|
6203
6480
|
const parsed = ConfirmCvmPatchRequestSchema.parse(request);
|
|
@@ -6218,17 +6495,17 @@ var { action: confirmCvmPatch, safeAction: safeConfirmCvmPatch } = defineAction(
|
|
|
6218
6495
|
});
|
|
6219
6496
|
|
|
6220
6497
|
// src/actions/cvms/commit_cvm_update.ts
|
|
6221
|
-
var
|
|
6498
|
+
var import_zod67 = require("zod");
|
|
6222
6499
|
var CommitCvmUpdateRequestSchema = refineCvmId(
|
|
6223
6500
|
CvmIdObjectSchema.extend({
|
|
6224
|
-
token:
|
|
6225
|
-
composeHash:
|
|
6226
|
-
transactionHash:
|
|
6501
|
+
token: import_zod67.z.string().describe("One-time commit token from prepare-only flow"),
|
|
6502
|
+
composeHash: import_zod67.z.string().describe("Compose hash from Phase 1 response"),
|
|
6503
|
+
transactionHash: import_zod67.z.string().describe("Transaction hash proving on-chain registration")
|
|
6227
6504
|
})
|
|
6228
6505
|
);
|
|
6229
|
-
var CommitCvmUpdateResultSchema =
|
|
6230
|
-
correlationId:
|
|
6231
|
-
status:
|
|
6506
|
+
var CommitCvmUpdateResultSchema = import_zod67.z.object({
|
|
6507
|
+
correlationId: import_zod67.z.string(),
|
|
6508
|
+
status: import_zod67.z.string()
|
|
6232
6509
|
});
|
|
6233
6510
|
var { action: commitCvmUpdate, safeAction: safeCommitCvmUpdate } = defineAction(CommitCvmUpdateResultSchema, async (client, request) => {
|
|
6234
6511
|
const parsed = CommitCvmUpdateRequestSchema.parse(request);
|
|
@@ -6245,31 +6522,31 @@ var { action: commitCvmUpdate, safeAction: safeCommitCvmUpdate } = defineAction(
|
|
|
6245
6522
|
});
|
|
6246
6523
|
|
|
6247
6524
|
// src/actions/cvms/refresh_cvm_instance_id.ts
|
|
6248
|
-
var
|
|
6249
|
-
var InstanceIdRefreshResultBaseSchema =
|
|
6250
|
-
identifier:
|
|
6251
|
-
status:
|
|
6252
|
-
old_instance_id:
|
|
6253
|
-
new_instance_id:
|
|
6254
|
-
source:
|
|
6255
|
-
verified_with_gateway:
|
|
6256
|
-
reason:
|
|
6525
|
+
var import_zod68 = require("zod");
|
|
6526
|
+
var InstanceIdRefreshResultBaseSchema = import_zod68.z.object({
|
|
6527
|
+
identifier: import_zod68.z.string(),
|
|
6528
|
+
status: import_zod68.z.enum(["updated", "unchanged", "skipped", "conflict", "error"]),
|
|
6529
|
+
old_instance_id: import_zod68.z.string().nullable().optional(),
|
|
6530
|
+
new_instance_id: import_zod68.z.string().nullable().optional(),
|
|
6531
|
+
source: import_zod68.z.enum(["teepod_state", "teepod_info", "gateway", "none"]),
|
|
6532
|
+
verified_with_gateway: import_zod68.z.boolean(),
|
|
6533
|
+
reason: import_zod68.z.string().nullable().optional()
|
|
6257
6534
|
});
|
|
6258
6535
|
var InstanceIdRefreshResultV20260121Schema = InstanceIdRefreshResultBaseSchema.extend({
|
|
6259
|
-
cvm_id:
|
|
6536
|
+
cvm_id: import_zod68.z.number().nullable()
|
|
6260
6537
|
});
|
|
6261
6538
|
var InstanceIdRefreshResultV20260522Schema = InstanceIdRefreshResultBaseSchema.extend({
|
|
6262
|
-
cvm_id:
|
|
6539
|
+
cvm_id: import_zod68.z.string().nullable()
|
|
6263
6540
|
});
|
|
6264
|
-
var InstanceIdRefreshResultAnySchema =
|
|
6541
|
+
var InstanceIdRefreshResultAnySchema = import_zod68.z.union([
|
|
6265
6542
|
InstanceIdRefreshResultV20260121Schema,
|
|
6266
6543
|
InstanceIdRefreshResultV20260522Schema
|
|
6267
6544
|
]);
|
|
6268
6545
|
var InstanceIdRefreshResultSchema = InstanceIdRefreshResultV20260522Schema;
|
|
6269
6546
|
var RefreshCvmInstanceIdRequestSchema = refineCvmId(
|
|
6270
6547
|
CvmIdObjectSchema.extend({
|
|
6271
|
-
overwrite:
|
|
6272
|
-
dry_run:
|
|
6548
|
+
overwrite: import_zod68.z.boolean().optional(),
|
|
6549
|
+
dry_run: import_zod68.z.boolean().optional()
|
|
6273
6550
|
})
|
|
6274
6551
|
);
|
|
6275
6552
|
function getSchemaForVersion6(version) {
|
|
@@ -6304,33 +6581,33 @@ async function safeRefreshCvmInstanceId(client, request) {
|
|
|
6304
6581
|
}
|
|
6305
6582
|
|
|
6306
6583
|
// src/actions/cvms/refresh_cvm_instance_ids.ts
|
|
6307
|
-
var
|
|
6308
|
-
var RefreshCvmInstanceIdsRequestSchema =
|
|
6309
|
-
cvm_ids:
|
|
6310
|
-
running_only:
|
|
6311
|
-
missing_only:
|
|
6312
|
-
overwrite:
|
|
6313
|
-
limit:
|
|
6314
|
-
dry_run:
|
|
6584
|
+
var import_zod69 = require("zod");
|
|
6585
|
+
var RefreshCvmInstanceIdsRequestSchema = import_zod69.z.object({
|
|
6586
|
+
cvm_ids: import_zod69.z.array(import_zod69.z.string()).optional(),
|
|
6587
|
+
running_only: import_zod69.z.boolean().optional(),
|
|
6588
|
+
missing_only: import_zod69.z.boolean().optional(),
|
|
6589
|
+
overwrite: import_zod69.z.boolean().optional(),
|
|
6590
|
+
limit: import_zod69.z.number().int().min(1).max(500).optional(),
|
|
6591
|
+
dry_run: import_zod69.z.boolean().optional()
|
|
6315
6592
|
}).strict();
|
|
6316
|
-
var RefreshCvmInstanceIdsResponseBaseSchema =
|
|
6317
|
-
total:
|
|
6318
|
-
scanned:
|
|
6319
|
-
updated:
|
|
6320
|
-
unchanged:
|
|
6321
|
-
skipped:
|
|
6322
|
-
conflicts:
|
|
6323
|
-
errors:
|
|
6593
|
+
var RefreshCvmInstanceIdsResponseBaseSchema = import_zod69.z.object({
|
|
6594
|
+
total: import_zod69.z.number().int(),
|
|
6595
|
+
scanned: import_zod69.z.number().int(),
|
|
6596
|
+
updated: import_zod69.z.number().int(),
|
|
6597
|
+
unchanged: import_zod69.z.number().int(),
|
|
6598
|
+
skipped: import_zod69.z.number().int(),
|
|
6599
|
+
conflicts: import_zod69.z.number().int(),
|
|
6600
|
+
errors: import_zod69.z.number().int()
|
|
6324
6601
|
});
|
|
6325
6602
|
var RefreshCvmInstanceIdsResponseV20260121Schema = RefreshCvmInstanceIdsResponseBaseSchema.extend({
|
|
6326
|
-
items:
|
|
6603
|
+
items: import_zod69.z.array(InstanceIdRefreshResultV20260121Schema)
|
|
6327
6604
|
});
|
|
6328
6605
|
var RefreshCvmInstanceIdsResponseV20260522Schema = RefreshCvmInstanceIdsResponseBaseSchema.extend({
|
|
6329
|
-
items:
|
|
6606
|
+
items: import_zod69.z.array(InstanceIdRefreshResultV20260522Schema)
|
|
6330
6607
|
});
|
|
6331
6608
|
var RefreshCvmInstanceIdsResponseAnySchema = RefreshCvmInstanceIdsResponseBaseSchema.extend({
|
|
6332
|
-
items:
|
|
6333
|
-
|
|
6609
|
+
items: import_zod69.z.array(
|
|
6610
|
+
import_zod69.z.union([InstanceIdRefreshResultV20260121Schema, InstanceIdRefreshResultV20260522Schema])
|
|
6334
6611
|
)
|
|
6335
6612
|
});
|
|
6336
6613
|
var RefreshCvmInstanceIdsResponseSchema = RefreshCvmInstanceIdsResponseV20260522Schema;
|
|
@@ -6364,21 +6641,41 @@ async function safeRefreshCvmInstanceIds(client, request) {
|
|
|
6364
6641
|
}
|
|
6365
6642
|
|
|
6366
6643
|
// src/actions/cvms/get_cvm_status_batch.ts
|
|
6367
|
-
var
|
|
6368
|
-
var
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6644
|
+
var import_zod70 = require("zod");
|
|
6645
|
+
var CvmResourceUsageSchema = import_zod70.z.object({
|
|
6646
|
+
cpu_percent: import_zod70.z.number().nullable().optional(),
|
|
6647
|
+
memory_used_bytes: import_zod70.z.number().nullable().optional(),
|
|
6648
|
+
memory_total_bytes: import_zod70.z.number().nullable().optional(),
|
|
6649
|
+
disk_used_bytes: import_zod70.z.number().nullable().optional(),
|
|
6650
|
+
disk_total_bytes: import_zod70.z.number().nullable().optional(),
|
|
6651
|
+
egress_bytes: import_zod70.z.number().nullable().optional()
|
|
6652
|
+
});
|
|
6653
|
+
var CvmStatusSchema = import_zod70.z.object({
|
|
6654
|
+
vm_uuid: import_zod70.z.string(),
|
|
6655
|
+
status: import_zod70.z.string(),
|
|
6656
|
+
uptime: import_zod70.z.string().nullable().optional(),
|
|
6657
|
+
in_progress: import_zod70.z.boolean(),
|
|
6658
|
+
boot_progress: import_zod70.z.string().nullable().optional(),
|
|
6659
|
+
boot_error: import_zod70.z.string().nullable().optional(),
|
|
6660
|
+
shutdown_progress: import_zod70.z.string().nullable().optional(),
|
|
6661
|
+
events: import_zod70.z.array(
|
|
6662
|
+
import_zod70.z.object({
|
|
6663
|
+
event: import_zod70.z.string(),
|
|
6664
|
+
body: import_zod70.z.string(),
|
|
6665
|
+
timestamp: import_zod70.z.number()
|
|
6666
|
+
})
|
|
6667
|
+
).default([]),
|
|
6668
|
+
operation: import_zod70.z.object({
|
|
6669
|
+
type: import_zod70.z.string().nullable().optional(),
|
|
6670
|
+
phase: import_zod70.z.string().nullable().optional(),
|
|
6671
|
+
started_at: import_zod70.z.string().nullable().optional(),
|
|
6672
|
+
correlation_id: import_zod70.z.string().nullable().optional()
|
|
6673
|
+
}).nullable().optional(),
|
|
6674
|
+
resource_usage: CvmResourceUsageSchema.nullable().optional()
|
|
6675
|
+
});
|
|
6676
|
+
var GetCvmStatusBatchResponseSchema = import_zod70.z.record(import_zod70.z.string(), CvmStatusSchema);
|
|
6677
|
+
var GetCvmStatusBatchRequestSchema = import_zod70.z.object({
|
|
6678
|
+
vmUuids: import_zod70.z.array(import_zod70.z.string())
|
|
6382
6679
|
});
|
|
6383
6680
|
var { action: getCvmStatusBatch, safeAction: safeGetCvmStatusBatch } = defineAction(GetCvmStatusBatchResponseSchema, async (client, request) => {
|
|
6384
6681
|
const { vmUuids } = GetCvmStatusBatchRequestSchema.parse(request);
|
|
@@ -6386,11 +6683,11 @@ var { action: getCvmStatusBatch, safeAction: safeGetCvmStatusBatch } = defineAct
|
|
|
6386
6683
|
});
|
|
6387
6684
|
|
|
6388
6685
|
// src/actions/cvms/get_cvm_user_config.ts
|
|
6389
|
-
var
|
|
6390
|
-
var CvmUserConfigSchema =
|
|
6391
|
-
hostname:
|
|
6392
|
-
ssh_authorized_keys:
|
|
6393
|
-
default_gateway_domain:
|
|
6686
|
+
var import_zod71 = require("zod");
|
|
6687
|
+
var CvmUserConfigSchema = import_zod71.z.object({
|
|
6688
|
+
hostname: import_zod71.z.string().nullable().optional(),
|
|
6689
|
+
ssh_authorized_keys: import_zod71.z.array(import_zod71.z.string()).default([]),
|
|
6690
|
+
default_gateway_domain: import_zod71.z.string().nullable().optional()
|
|
6394
6691
|
});
|
|
6395
6692
|
var GetCvmUserConfigRequestSchema = CvmIdSchema;
|
|
6396
6693
|
var { action: getCvmUserConfig, safeAction: safeGetCvmUserConfig } = defineAction(CvmUserConfigSchema, async (client, request) => {
|
|
@@ -6399,33 +6696,33 @@ var { action: getCvmUserConfig, safeAction: safeGetCvmUserConfig } = defineActio
|
|
|
6399
6696
|
});
|
|
6400
6697
|
|
|
6401
6698
|
// src/actions/cvms/check_cvm_is_allowed.ts
|
|
6402
|
-
var
|
|
6403
|
-
var IsAllowedResultBaseSchema =
|
|
6404
|
-
app_contract_address:
|
|
6405
|
-
compose_hash:
|
|
6406
|
-
device_id:
|
|
6407
|
-
compose_hash_allowed:
|
|
6408
|
-
allow_any_device:
|
|
6409
|
-
device_id_allowed:
|
|
6410
|
-
is_allowed:
|
|
6411
|
-
error:
|
|
6699
|
+
var import_zod72 = require("zod");
|
|
6700
|
+
var IsAllowedResultBaseSchema = import_zod72.z.object({
|
|
6701
|
+
app_contract_address: import_zod72.z.string(),
|
|
6702
|
+
compose_hash: import_zod72.z.string(),
|
|
6703
|
+
device_id: import_zod72.z.string(),
|
|
6704
|
+
compose_hash_allowed: import_zod72.z.boolean(),
|
|
6705
|
+
allow_any_device: import_zod72.z.boolean(),
|
|
6706
|
+
device_id_allowed: import_zod72.z.boolean().nullable().optional(),
|
|
6707
|
+
is_allowed: import_zod72.z.boolean(),
|
|
6708
|
+
error: import_zod72.z.string().nullable().optional()
|
|
6412
6709
|
});
|
|
6413
6710
|
var IsAllowedResultV20260121Schema = IsAllowedResultBaseSchema.extend({
|
|
6414
|
-
cvm_id:
|
|
6711
|
+
cvm_id: import_zod72.z.number().optional()
|
|
6415
6712
|
});
|
|
6416
6713
|
var IsAllowedResultV20260522Schema = IsAllowedResultBaseSchema.extend({
|
|
6417
|
-
cvm_id:
|
|
6714
|
+
cvm_id: import_zod72.z.string().optional()
|
|
6418
6715
|
});
|
|
6419
|
-
var IsAllowedResultAnySchema =
|
|
6716
|
+
var IsAllowedResultAnySchema = import_zod72.z.union([
|
|
6420
6717
|
IsAllowedResultV20260121Schema,
|
|
6421
6718
|
IsAllowedResultV20260522Schema
|
|
6422
6719
|
]);
|
|
6423
6720
|
var IsAllowedResultSchema = IsAllowedResultV20260522Schema;
|
|
6424
|
-
var CheckCvmIsAllowedInputSchema =
|
|
6425
|
-
cvmId:
|
|
6426
|
-
compose_hash:
|
|
6427
|
-
node_id:
|
|
6428
|
-
device_id:
|
|
6721
|
+
var CheckCvmIsAllowedInputSchema = import_zod72.z.object({
|
|
6722
|
+
cvmId: import_zod72.z.string().min(1),
|
|
6723
|
+
compose_hash: import_zod72.z.string().optional(),
|
|
6724
|
+
node_id: import_zod72.z.number().optional(),
|
|
6725
|
+
device_id: import_zod72.z.string().optional()
|
|
6429
6726
|
});
|
|
6430
6727
|
var CheckCvmIsAllowedRequestSchema = CheckCvmIsAllowedInputSchema;
|
|
6431
6728
|
function getSchemaForVersion8(version) {
|
|
@@ -6456,13 +6753,13 @@ async function safeCheckCvmIsAllowed(client, request) {
|
|
|
6456
6753
|
}
|
|
6457
6754
|
|
|
6458
6755
|
// src/actions/apps/check_app_is_allowed.ts
|
|
6459
|
-
var
|
|
6460
|
-
var CheckAppIsAllowedRequestSchema =
|
|
6461
|
-
appId:
|
|
6462
|
-
compose_hash:
|
|
6463
|
-
node_id:
|
|
6464
|
-
device_id:
|
|
6465
|
-
chain_id:
|
|
6756
|
+
var import_zod73 = require("zod");
|
|
6757
|
+
var CheckAppIsAllowedRequestSchema = import_zod73.z.object({
|
|
6758
|
+
appId: import_zod73.z.string().min(1),
|
|
6759
|
+
compose_hash: import_zod73.z.string(),
|
|
6760
|
+
node_id: import_zod73.z.number().optional(),
|
|
6761
|
+
device_id: import_zod73.z.string().optional(),
|
|
6762
|
+
chain_id: import_zod73.z.number().optional()
|
|
6466
6763
|
});
|
|
6467
6764
|
var { action: checkAppIsAllowed, safeAction: safeCheckAppIsAllowed } = defineAction(IsAllowedResultSchema, async (client, request) => {
|
|
6468
6765
|
const { appId, ...body } = CheckAppIsAllowedRequestSchema.parse(request);
|
|
@@ -6470,29 +6767,29 @@ var { action: checkAppIsAllowed, safeAction: safeCheckAppIsAllowed } = defineAct
|
|
|
6470
6767
|
});
|
|
6471
6768
|
|
|
6472
6769
|
// src/actions/apps/check_app_cvms_is_allowed.ts
|
|
6473
|
-
var
|
|
6474
|
-
var AppCvmsBatchIsAllowedResponseBaseSchema =
|
|
6475
|
-
is_onchain:
|
|
6476
|
-
total:
|
|
6477
|
-
allowed_count:
|
|
6478
|
-
denied_count:
|
|
6479
|
-
error_count:
|
|
6770
|
+
var import_zod74 = require("zod");
|
|
6771
|
+
var AppCvmsBatchIsAllowedResponseBaseSchema = import_zod74.z.object({
|
|
6772
|
+
is_onchain: import_zod74.z.boolean(),
|
|
6773
|
+
total: import_zod74.z.number().default(0),
|
|
6774
|
+
allowed_count: import_zod74.z.number().default(0),
|
|
6775
|
+
denied_count: import_zod74.z.number().default(0),
|
|
6776
|
+
error_count: import_zod74.z.number().default(0)
|
|
6480
6777
|
});
|
|
6481
6778
|
var AppCvmsBatchIsAllowedResponseV20260121Schema = AppCvmsBatchIsAllowedResponseBaseSchema.extend({
|
|
6482
|
-
results:
|
|
6483
|
-
skipped_cvm_ids:
|
|
6779
|
+
results: import_zod74.z.array(IsAllowedResultV20260121Schema.extend({ cvm_id: import_zod74.z.number() })).default([]),
|
|
6780
|
+
skipped_cvm_ids: import_zod74.z.array(import_zod74.z.number()).default([])
|
|
6484
6781
|
});
|
|
6485
6782
|
var AppCvmsBatchIsAllowedResponseV20260522Schema = AppCvmsBatchIsAllowedResponseBaseSchema.extend({
|
|
6486
|
-
results:
|
|
6487
|
-
skipped_cvm_ids:
|
|
6783
|
+
results: import_zod74.z.array(IsAllowedResultV20260522Schema.extend({ cvm_id: import_zod74.z.string() })).default([]),
|
|
6784
|
+
skipped_cvm_ids: import_zod74.z.array(import_zod74.z.string()).default([])
|
|
6488
6785
|
});
|
|
6489
|
-
var AppCvmsBatchIsAllowedResponseAnySchema =
|
|
6786
|
+
var AppCvmsBatchIsAllowedResponseAnySchema = import_zod74.z.union([
|
|
6490
6787
|
AppCvmsBatchIsAllowedResponseV20260121Schema,
|
|
6491
6788
|
AppCvmsBatchIsAllowedResponseV20260522Schema
|
|
6492
6789
|
]);
|
|
6493
6790
|
var AppCvmsBatchIsAllowedResponseSchema = AppCvmsBatchIsAllowedResponseV20260522Schema;
|
|
6494
|
-
var CheckAppCvmsIsAllowedRequestSchema =
|
|
6495
|
-
appId:
|
|
6791
|
+
var CheckAppCvmsIsAllowedRequestSchema = import_zod74.z.object({
|
|
6792
|
+
appId: import_zod74.z.string().min(1)
|
|
6496
6793
|
});
|
|
6497
6794
|
function getSchemaForVersion9(version) {
|
|
6498
6795
|
if (version === "2026-01-21") return AppCvmsBatchIsAllowedResponseV20260121Schema;
|
|
@@ -6524,19 +6821,19 @@ async function safeCheckAppCvmsIsAllowed(client, request) {
|
|
|
6524
6821
|
}
|
|
6525
6822
|
|
|
6526
6823
|
// src/actions/apps/get_app_list.ts
|
|
6527
|
-
var
|
|
6528
|
-
var GetAppListRequestSchema =
|
|
6529
|
-
page:
|
|
6530
|
-
page_size:
|
|
6531
|
-
search:
|
|
6532
|
-
status:
|
|
6533
|
-
listed:
|
|
6534
|
-
base_image:
|
|
6535
|
-
instance_type:
|
|
6536
|
-
kms_slug:
|
|
6537
|
-
kms_type:
|
|
6538
|
-
node:
|
|
6539
|
-
region:
|
|
6824
|
+
var import_zod75 = require("zod");
|
|
6825
|
+
var GetAppListRequestSchema = import_zod75.z.object({
|
|
6826
|
+
page: import_zod75.z.number().int().min(1).optional(),
|
|
6827
|
+
page_size: import_zod75.z.number().int().min(1).max(100).optional(),
|
|
6828
|
+
search: import_zod75.z.string().optional(),
|
|
6829
|
+
status: import_zod75.z.array(import_zod75.z.string()).optional(),
|
|
6830
|
+
listed: import_zod75.z.boolean().optional(),
|
|
6831
|
+
base_image: import_zod75.z.string().optional(),
|
|
6832
|
+
instance_type: import_zod75.z.string().optional(),
|
|
6833
|
+
kms_slug: import_zod75.z.string().optional(),
|
|
6834
|
+
kms_type: import_zod75.z.string().optional(),
|
|
6835
|
+
node: import_zod75.z.string().optional(),
|
|
6836
|
+
region: import_zod75.z.string().optional()
|
|
6540
6837
|
}).strict();
|
|
6541
6838
|
function getSchemaForVersion10(version) {
|
|
6542
6839
|
if (version === "2025-10-28") return DstackAppListResponseV20251028Schema;
|
|
@@ -6568,9 +6865,9 @@ async function safeGetAppList(client, request) {
|
|
|
6568
6865
|
}
|
|
6569
6866
|
|
|
6570
6867
|
// src/actions/apps/get_app_info.ts
|
|
6571
|
-
var
|
|
6572
|
-
var GetAppInfoRequestSchema =
|
|
6573
|
-
appId:
|
|
6868
|
+
var import_zod76 = require("zod");
|
|
6869
|
+
var GetAppInfoRequestSchema = import_zod76.z.object({
|
|
6870
|
+
appId: import_zod76.z.string().min(1)
|
|
6574
6871
|
}).strict();
|
|
6575
6872
|
function getSchemaForVersion11(version) {
|
|
6576
6873
|
if (version === "2025-10-28") return DstackAppWithCvmResponseV20251028Schema;
|
|
@@ -6602,14 +6899,14 @@ async function safeGetAppInfo(client, request) {
|
|
|
6602
6899
|
}
|
|
6603
6900
|
|
|
6604
6901
|
// src/actions/apps/get_app_cvms.ts
|
|
6605
|
-
var
|
|
6606
|
-
var GetAppCvmsRequestSchema =
|
|
6607
|
-
appId:
|
|
6902
|
+
var import_zod77 = require("zod");
|
|
6903
|
+
var GetAppCvmsRequestSchema = import_zod77.z.object({
|
|
6904
|
+
appId: import_zod77.z.string().min(1)
|
|
6608
6905
|
}).strict();
|
|
6609
6906
|
function getSchemaForVersion12(version) {
|
|
6610
|
-
if (version === "2025-10-28") return
|
|
6611
|
-
if (version === "2026-01-21") return
|
|
6612
|
-
return
|
|
6907
|
+
if (version === "2025-10-28") return import_zod77.z.array(CvmInfoV20251028Schema);
|
|
6908
|
+
if (version === "2026-01-21") return import_zod77.z.array(CvmInfoV20260121Schema);
|
|
6909
|
+
return import_zod77.z.array(CvmInfoV20260522Schema);
|
|
6613
6910
|
}
|
|
6614
6911
|
async function getAppCvms(client, request) {
|
|
6615
6912
|
const { appId } = GetAppCvmsRequestSchema.parse(request);
|
|
@@ -6636,17 +6933,17 @@ async function safeGetAppCvms(client, request) {
|
|
|
6636
6933
|
}
|
|
6637
6934
|
|
|
6638
6935
|
// src/actions/apps/create_app_instance.ts
|
|
6639
|
-
var
|
|
6640
|
-
var CreateAppInstanceRequestSchema =
|
|
6641
|
-
appId:
|
|
6642
|
-
name:
|
|
6643
|
-
node_id:
|
|
6644
|
-
docker_compose_file:
|
|
6645
|
-
pre_launch_script:
|
|
6646
|
-
encrypted_env:
|
|
6647
|
-
compose_hash:
|
|
6648
|
-
token:
|
|
6649
|
-
transaction_hash:
|
|
6936
|
+
var import_zod78 = require("zod");
|
|
6937
|
+
var CreateAppInstanceRequestSchema = import_zod78.z.object({
|
|
6938
|
+
appId: import_zod78.z.string().min(1),
|
|
6939
|
+
name: import_zod78.z.string().optional(),
|
|
6940
|
+
node_id: import_zod78.z.number().optional(),
|
|
6941
|
+
docker_compose_file: import_zod78.z.string().optional(),
|
|
6942
|
+
pre_launch_script: import_zod78.z.string().optional(),
|
|
6943
|
+
encrypted_env: import_zod78.z.string().optional(),
|
|
6944
|
+
compose_hash: import_zod78.z.string().optional(),
|
|
6945
|
+
token: import_zod78.z.string().optional(),
|
|
6946
|
+
transaction_hash: import_zod78.z.string().optional()
|
|
6650
6947
|
}).strict();
|
|
6651
6948
|
var { action: createAppInstance, safeAction: safeCreateAppInstance } = defineAction(VMSchema, async (client, request) => {
|
|
6652
6949
|
const parsed = CreateAppInstanceRequestSchema.parse(request);
|
|
@@ -6655,36 +6952,36 @@ var { action: createAppInstance, safeAction: safeCreateAppInstance } = defineAct
|
|
|
6655
6952
|
});
|
|
6656
6953
|
|
|
6657
6954
|
// src/actions/apps/get_app_device_allowlist.ts
|
|
6658
|
-
var
|
|
6659
|
-
var DeviceAllowlistItemBaseSchema =
|
|
6660
|
-
device_id:
|
|
6661
|
-
node_name:
|
|
6662
|
-
allowed_onchain:
|
|
6663
|
-
status:
|
|
6955
|
+
var import_zod79 = require("zod");
|
|
6956
|
+
var DeviceAllowlistItemBaseSchema = import_zod79.z.object({
|
|
6957
|
+
device_id: import_zod79.z.string(),
|
|
6958
|
+
node_name: import_zod79.z.string().nullable(),
|
|
6959
|
+
allowed_onchain: import_zod79.z.boolean(),
|
|
6960
|
+
status: import_zod79.z.string()
|
|
6664
6961
|
});
|
|
6665
6962
|
var DeviceAllowlistItemV20260121Schema = DeviceAllowlistItemBaseSchema.extend({
|
|
6666
|
-
cvm_ids:
|
|
6963
|
+
cvm_ids: import_zod79.z.array(import_zod79.z.number())
|
|
6667
6964
|
});
|
|
6668
6965
|
var DeviceAllowlistItemV20260522Schema = DeviceAllowlistItemBaseSchema.extend({
|
|
6669
|
-
cvm_ids:
|
|
6966
|
+
cvm_ids: import_zod79.z.array(import_zod79.z.string())
|
|
6670
6967
|
});
|
|
6671
|
-
var DeviceAllowlistResponseBaseSchema =
|
|
6672
|
-
is_onchain_kms:
|
|
6673
|
-
allow_any_device:
|
|
6674
|
-
chain_id:
|
|
6675
|
-
app_contract_address:
|
|
6968
|
+
var DeviceAllowlistResponseBaseSchema = import_zod79.z.object({
|
|
6969
|
+
is_onchain_kms: import_zod79.z.boolean(),
|
|
6970
|
+
allow_any_device: import_zod79.z.boolean().nullable().optional(),
|
|
6971
|
+
chain_id: import_zod79.z.number().nullable().optional(),
|
|
6972
|
+
app_contract_address: import_zod79.z.string().nullable().optional()
|
|
6676
6973
|
});
|
|
6677
6974
|
var DeviceAllowlistResponseV20260121Schema = DeviceAllowlistResponseBaseSchema.extend({
|
|
6678
|
-
devices:
|
|
6975
|
+
devices: import_zod79.z.array(DeviceAllowlistItemV20260121Schema).optional().default([])
|
|
6679
6976
|
});
|
|
6680
6977
|
var DeviceAllowlistResponseV20260522Schema = DeviceAllowlistResponseBaseSchema.extend({
|
|
6681
|
-
devices:
|
|
6978
|
+
devices: import_zod79.z.array(DeviceAllowlistItemV20260522Schema).optional().default([])
|
|
6682
6979
|
});
|
|
6683
|
-
var DeviceAllowlistItemAnySchema =
|
|
6980
|
+
var DeviceAllowlistItemAnySchema = import_zod79.z.union([
|
|
6684
6981
|
DeviceAllowlistItemV20260121Schema,
|
|
6685
6982
|
DeviceAllowlistItemV20260522Schema
|
|
6686
6983
|
]);
|
|
6687
|
-
var DeviceAllowlistResponseAnySchema =
|
|
6984
|
+
var DeviceAllowlistResponseAnySchema = import_zod79.z.union([
|
|
6688
6985
|
DeviceAllowlistResponseV20260121Schema,
|
|
6689
6986
|
DeviceAllowlistResponseV20260522Schema
|
|
6690
6987
|
]);
|
|
@@ -6692,8 +6989,8 @@ function getSchemaForVersion13(version) {
|
|
|
6692
6989
|
if (version === "2026-01-21") return DeviceAllowlistResponseV20260121Schema;
|
|
6693
6990
|
return DeviceAllowlistResponseV20260522Schema;
|
|
6694
6991
|
}
|
|
6695
|
-
var GetAppDeviceAllowlistRequestSchema =
|
|
6696
|
-
appId:
|
|
6992
|
+
var GetAppDeviceAllowlistRequestSchema = import_zod79.z.object({
|
|
6993
|
+
appId: import_zod79.z.string().min(1)
|
|
6697
6994
|
}).strict();
|
|
6698
6995
|
async function getAppDeviceAllowlist(client, request) {
|
|
6699
6996
|
const { appId } = GetAppDeviceAllowlistRequestSchema.parse(request);
|
|
@@ -6721,11 +7018,11 @@ async function safeGetAppDeviceAllowlist(client, request) {
|
|
|
6721
7018
|
}
|
|
6722
7019
|
|
|
6723
7020
|
// src/actions/apps/get_app_revisions.ts
|
|
6724
|
-
var
|
|
6725
|
-
var GetAppRevisionsRequestSchema =
|
|
6726
|
-
appId:
|
|
6727
|
-
page:
|
|
6728
|
-
page_size:
|
|
7021
|
+
var import_zod80 = require("zod");
|
|
7022
|
+
var GetAppRevisionsRequestSchema = import_zod80.z.object({
|
|
7023
|
+
appId: import_zod80.z.string().min(1),
|
|
7024
|
+
page: import_zod80.z.number().int().min(1).optional(),
|
|
7025
|
+
page_size: import_zod80.z.number().int().min(1).max(1e3).optional()
|
|
6729
7026
|
}).strict();
|
|
6730
7027
|
async function getAppRevisions(client, request) {
|
|
6731
7028
|
const { appId, ...params } = GetAppRevisionsRequestSchema.parse(request);
|
|
@@ -6751,11 +7048,11 @@ async function safeGetAppRevisions(client, request) {
|
|
|
6751
7048
|
}
|
|
6752
7049
|
|
|
6753
7050
|
// src/actions/apps/get_app_revision_detail.ts
|
|
6754
|
-
var
|
|
6755
|
-
var GetAppRevisionDetailRequestSchema =
|
|
6756
|
-
appId:
|
|
6757
|
-
revisionId:
|
|
6758
|
-
rawComposeFile:
|
|
7051
|
+
var import_zod81 = require("zod");
|
|
7052
|
+
var GetAppRevisionDetailRequestSchema = import_zod81.z.object({
|
|
7053
|
+
appId: import_zod81.z.string().min(1),
|
|
7054
|
+
revisionId: import_zod81.z.string().min(1),
|
|
7055
|
+
rawComposeFile: import_zod81.z.boolean().optional()
|
|
6759
7056
|
}).strict();
|
|
6760
7057
|
async function getAppRevisionDetail(client, request) {
|
|
6761
7058
|
const { appId, revisionId, rawComposeFile } = GetAppRevisionDetailRequestSchema.parse(request);
|
|
@@ -6782,15 +7079,15 @@ async function safeGetAppRevisionDetail(client, request) {
|
|
|
6782
7079
|
}
|
|
6783
7080
|
|
|
6784
7081
|
// src/actions/apps/get_app_filter_options.ts
|
|
6785
|
-
var
|
|
6786
|
-
var AppFilterOptionsSchema =
|
|
6787
|
-
statuses:
|
|
6788
|
-
image_versions:
|
|
6789
|
-
instance_types:
|
|
6790
|
-
kms_slugs:
|
|
6791
|
-
kms_types:
|
|
6792
|
-
regions:
|
|
6793
|
-
nodes:
|
|
7082
|
+
var import_zod82 = require("zod");
|
|
7083
|
+
var AppFilterOptionsSchema = import_zod82.z.object({
|
|
7084
|
+
statuses: import_zod82.z.array(import_zod82.z.string()),
|
|
7085
|
+
image_versions: import_zod82.z.array(import_zod82.z.string()),
|
|
7086
|
+
instance_types: import_zod82.z.array(import_zod82.z.string()),
|
|
7087
|
+
kms_slugs: import_zod82.z.array(import_zod82.z.string()),
|
|
7088
|
+
kms_types: import_zod82.z.array(import_zod82.z.string()),
|
|
7089
|
+
regions: import_zod82.z.array(import_zod82.z.string()),
|
|
7090
|
+
nodes: import_zod82.z.array(import_zod82.z.string())
|
|
6794
7091
|
});
|
|
6795
7092
|
async function getAppFilterOptions(client) {
|
|
6796
7093
|
const response = await client.get("/apps/filter-options");
|
|
@@ -6815,52 +7112,53 @@ async function safeGetAppFilterOptions(client) {
|
|
|
6815
7112
|
}
|
|
6816
7113
|
|
|
6817
7114
|
// src/actions/apps/get_app_attestation.ts
|
|
6818
|
-
var
|
|
6819
|
-
var KmsInfoSchema2 =
|
|
6820
|
-
contract_address:
|
|
6821
|
-
chain_id:
|
|
6822
|
-
version:
|
|
6823
|
-
url:
|
|
6824
|
-
gateway_app_id:
|
|
6825
|
-
gateway_app_url:
|
|
6826
|
-
kms_type:
|
|
6827
|
-
});
|
|
6828
|
-
var GuestAgentInfoSchema =
|
|
6829
|
-
app_id:
|
|
6830
|
-
instance_id:
|
|
6831
|
-
app_name:
|
|
6832
|
-
device_id:
|
|
7115
|
+
var import_zod83 = require("zod");
|
|
7116
|
+
var KmsInfoSchema2 = import_zod83.z.object({
|
|
7117
|
+
contract_address: import_zod83.z.string(),
|
|
7118
|
+
chain_id: import_zod83.z.number().nullable(),
|
|
7119
|
+
version: import_zod83.z.string(),
|
|
7120
|
+
url: import_zod83.z.string(),
|
|
7121
|
+
gateway_app_id: import_zod83.z.string().nullable(),
|
|
7122
|
+
gateway_app_url: import_zod83.z.string(),
|
|
7123
|
+
kms_type: import_zod83.z.string()
|
|
7124
|
+
});
|
|
7125
|
+
var GuestAgentInfoSchema = import_zod83.z.object({
|
|
7126
|
+
app_id: import_zod83.z.string().optional(),
|
|
7127
|
+
instance_id: import_zod83.z.string().optional(),
|
|
7128
|
+
app_name: import_zod83.z.string().optional(),
|
|
7129
|
+
device_id: import_zod83.z.string().optional()
|
|
6833
7130
|
}).passthrough().nullable();
|
|
6834
|
-
var AppAttestationInstanceSchema =
|
|
6835
|
-
vm_uuid:
|
|
6836
|
-
name:
|
|
6837
|
-
instance_id:
|
|
6838
|
-
status:
|
|
6839
|
-
image_version:
|
|
6840
|
-
quote:
|
|
6841
|
-
ppid:
|
|
6842
|
-
ppid_sha256:
|
|
6843
|
-
device_id:
|
|
6844
|
-
fmspc:
|
|
6845
|
-
tee_tcb_svn:
|
|
6846
|
-
|
|
6847
|
-
|
|
7131
|
+
var AppAttestationInstanceSchema = import_zod83.z.object({
|
|
7132
|
+
vm_uuid: import_zod83.z.string().nullable().optional(),
|
|
7133
|
+
name: import_zod83.z.string().optional(),
|
|
7134
|
+
instance_id: import_zod83.z.string().nullable().optional(),
|
|
7135
|
+
status: import_zod83.z.string().optional(),
|
|
7136
|
+
image_version: import_zod83.z.string().nullable().optional(),
|
|
7137
|
+
quote: import_zod83.z.string().nullable().optional(),
|
|
7138
|
+
ppid: import_zod83.z.string().optional(),
|
|
7139
|
+
ppid_sha256: import_zod83.z.string().nullable().optional(),
|
|
7140
|
+
device_id: import_zod83.z.string().optional(),
|
|
7141
|
+
fmspc: import_zod83.z.string().nullable().optional(),
|
|
7142
|
+
tee_tcb_svn: import_zod83.z.string().nullable().optional(),
|
|
7143
|
+
mr_config_id: import_zod83.z.string().nullable().optional(),
|
|
7144
|
+
cpusvn: import_zod83.z.string().nullable().optional(),
|
|
7145
|
+
pcesvn: import_zod83.z.number().nullable().optional(),
|
|
6848
7146
|
tcb_info: TcbInfoSchema.nullable().optional(),
|
|
6849
|
-
app_certificates:
|
|
6850
|
-
compose_file:
|
|
6851
|
-
error:
|
|
7147
|
+
app_certificates: import_zod83.z.array(CertificateSchema).nullable().optional(),
|
|
7148
|
+
compose_file: import_zod83.z.string().nullable().optional(),
|
|
7149
|
+
error: import_zod83.z.string().nullable().optional()
|
|
6852
7150
|
});
|
|
6853
|
-
var AppAttestationResponseSchema =
|
|
6854
|
-
app_id:
|
|
6855
|
-
contract_address:
|
|
7151
|
+
var AppAttestationResponseSchema = import_zod83.z.object({
|
|
7152
|
+
app_id: import_zod83.z.string(),
|
|
7153
|
+
contract_address: import_zod83.z.string(),
|
|
6856
7154
|
kms_info: KmsInfoSchema2,
|
|
6857
|
-
instances:
|
|
7155
|
+
instances: import_zod83.z.array(AppAttestationInstanceSchema),
|
|
6858
7156
|
kms_guest_agent_info: GuestAgentInfoSchema,
|
|
6859
7157
|
gateway_guest_agent_info: GuestAgentInfoSchema,
|
|
6860
|
-
qemu_version:
|
|
7158
|
+
qemu_version: import_zod83.z.string().nullable()
|
|
6861
7159
|
});
|
|
6862
|
-
var GetAppAttestationRequestSchema =
|
|
6863
|
-
appId:
|
|
7160
|
+
var GetAppAttestationRequestSchema = import_zod83.z.object({
|
|
7161
|
+
appId: import_zod83.z.string().min(1)
|
|
6864
7162
|
}).strict();
|
|
6865
7163
|
var { action: getAppAttestation, safeAction: safeGetAppAttestation } = defineAction(AppAttestationResponseSchema, async (client, request) => {
|
|
6866
7164
|
const { appId } = GetAppAttestationRequestSchema.parse(request);
|
|
@@ -6954,6 +7252,8 @@ var import_verify_env_encrypt_public_key = require("@phala/dstack-sdk/verify-env
|
|
|
6954
7252
|
CvmCreateResourceGraphV20260522Schema,
|
|
6955
7253
|
CvmDetailV20251028Schema,
|
|
6956
7254
|
CvmGatewayInfoV20260121Schema,
|
|
7255
|
+
CvmGpuRentalOrderInfoV20260121Schema,
|
|
7256
|
+
CvmHourlyRateV20260121Schema,
|
|
6957
7257
|
CvmIdBaseSchema,
|
|
6958
7258
|
CvmIdObjectSchema,
|
|
6959
7259
|
CvmIdSchema,
|
|
@@ -6972,6 +7272,7 @@ var import_verify_env_encrypt_public_key = require("@phala/dstack-sdk/verify-env
|
|
|
6972
7272
|
CvmProgressInfoV20260121Schema,
|
|
6973
7273
|
CvmRefSchema,
|
|
6974
7274
|
CvmResourceInfoV20260121Schema,
|
|
7275
|
+
CvmResourceUsageSchema,
|
|
6975
7276
|
CvmStateSchema,
|
|
6976
7277
|
CvmStatusSchema,
|
|
6977
7278
|
CvmSystemInfoSchema,
|
|
@@ -6980,6 +7281,7 @@ var import_verify_env_encrypt_public_key = require("@phala/dstack-sdk/verify-env
|
|
|
6980
7281
|
DeleteSshKeyRequestSchema,
|
|
6981
7282
|
DeployAppAuthRequestSchema,
|
|
6982
7283
|
DeployAppAuthSchema,
|
|
7284
|
+
DeviceIdEntrySchema,
|
|
6983
7285
|
DstackAppFullResponseV20251028Schema,
|
|
6984
7286
|
DstackAppFullResponseV20260121Schema,
|
|
6985
7287
|
DstackAppFullResponseV20260522Schema,
|
|
@@ -7018,6 +7320,7 @@ var import_verify_env_encrypt_public_key = require("@phala/dstack-sdk/verify-env
|
|
|
7018
7320
|
GetCvmStatusBatchRequestSchema,
|
|
7019
7321
|
GetCvmStatusBatchResponseSchema,
|
|
7020
7322
|
GetCvmUserConfigRequestSchema,
|
|
7323
|
+
GetKmsContractRequestSchema,
|
|
7021
7324
|
GetKmsInfoRequestSchema,
|
|
7022
7325
|
GetKmsListRequestSchema,
|
|
7023
7326
|
GetKmsListSchema,
|
|
@@ -7034,9 +7337,15 @@ var import_verify_env_encrypt_public_key = require("@phala/dstack-sdk/verify-env
|
|
|
7034
7337
|
InstanceIdRefreshResultSchema,
|
|
7035
7338
|
InstanceTypeSchema,
|
|
7036
7339
|
IsAllowedResultSchema,
|
|
7340
|
+
KmsContractInfoSchema,
|
|
7341
|
+
KmsContractNodeSchema,
|
|
7037
7342
|
KmsInfoSchema,
|
|
7038
7343
|
KmsTypeSchema,
|
|
7039
7344
|
ListFamilyInstanceTypesRequestSchema,
|
|
7345
|
+
ListKmsContractNodesRequestSchema,
|
|
7346
|
+
ListKmsContractNodesSchema,
|
|
7347
|
+
ListKmsContractsRequestSchema,
|
|
7348
|
+
ListKmsContractsSchema,
|
|
7040
7349
|
ListSshKeysResponseSchema,
|
|
7041
7350
|
ListWorkspacesSchema,
|
|
7042
7351
|
LooseAppComposeSchema,
|
|
@@ -7155,6 +7464,7 @@ var import_verify_env_encrypt_public_key = require("@phala/dstack-sdk/verify-env
|
|
|
7155
7464
|
extractNetworkClients,
|
|
7156
7465
|
formatErrorMessage,
|
|
7157
7466
|
formatStructuredError,
|
|
7467
|
+
formatStructuredErrorDetailValue,
|
|
7158
7468
|
formatValidationErrors,
|
|
7159
7469
|
generateDefaultCvmName,
|
|
7160
7470
|
generateFallbackHostname,
|
|
@@ -7186,9 +7496,12 @@ var import_verify_env_encrypt_public_key = require("@phala/dstack-sdk/verify-env
|
|
|
7186
7496
|
getCvmStatusBatch,
|
|
7187
7497
|
getCvmUserConfig,
|
|
7188
7498
|
getErrorMessage,
|
|
7499
|
+
getKmsContract,
|
|
7189
7500
|
getKmsInfo,
|
|
7190
7501
|
getKmsList,
|
|
7191
7502
|
getKmsOnChainDetail,
|
|
7503
|
+
getMrConfigId,
|
|
7504
|
+
getMrConfigIdV1,
|
|
7192
7505
|
getOsImages,
|
|
7193
7506
|
getPreLaunchScriptUpgradeStatus,
|
|
7194
7507
|
getVMSchemaForVersion,
|
|
@@ -7202,6 +7515,8 @@ var import_verify_env_encrypt_public_key = require("@phala/dstack-sdk/verify-env
|
|
|
7202
7515
|
isValidHostname,
|
|
7203
7516
|
listAllInstanceTypeFamilies,
|
|
7204
7517
|
listFamilyInstanceTypes,
|
|
7518
|
+
listKmsContractNodes,
|
|
7519
|
+
listKmsContracts,
|
|
7205
7520
|
listSshKeys,
|
|
7206
7521
|
listWorkspaces,
|
|
7207
7522
|
nextAppIds,
|
|
@@ -7261,6 +7576,7 @@ var import_verify_env_encrypt_public_key = require("@phala/dstack-sdk/verify-env
|
|
|
7261
7576
|
safeGetCvmStats,
|
|
7262
7577
|
safeGetCvmStatusBatch,
|
|
7263
7578
|
safeGetCvmUserConfig,
|
|
7579
|
+
safeGetKmsContract,
|
|
7264
7580
|
safeGetKmsInfo,
|
|
7265
7581
|
safeGetKmsList,
|
|
7266
7582
|
safeGetKmsOnChainDetail,
|
|
@@ -7272,6 +7588,8 @@ var import_verify_env_encrypt_public_key = require("@phala/dstack-sdk/verify-env
|
|
|
7272
7588
|
safeImportGithubProfileSshKeys,
|
|
7273
7589
|
safeListAllInstanceTypeFamilies,
|
|
7274
7590
|
safeListFamilyInstanceTypes,
|
|
7591
|
+
safeListKmsContractNodes,
|
|
7592
|
+
safeListKmsContracts,
|
|
7275
7593
|
safeListSshKeys,
|
|
7276
7594
|
safeListWorkspaces,
|
|
7277
7595
|
safeNextAppIds,
|
|
@@ -7314,6 +7632,8 @@ var import_verify_env_encrypt_public_key = require("@phala/dstack-sdk/verify-env
|
|
|
7314
7632
|
validateComposePayloadSize,
|
|
7315
7633
|
validateNetworkPrerequisites,
|
|
7316
7634
|
verifyEnvEncryptPublicKey,
|
|
7635
|
+
verifyEnvEncryptPublicKeyLegacy,
|
|
7636
|
+
verifyMrConfigId,
|
|
7317
7637
|
waitForTransactionReceipt,
|
|
7318
7638
|
watchCvmState,
|
|
7319
7639
|
withComposeMethods
|