@phala/cloud 0.2.4 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/actions/apps/check_app_cvms_is_allowed.d.ts +164 -0
  2. package/dist/actions/apps/check_app_is_allowed.d.ts +109 -0
  3. package/dist/actions/apps/get_app_attestation.d.ts +963 -0
  4. package/dist/actions/apps/get_app_device_allowlist.d.ts +108 -0
  5. package/dist/actions/blockchains/abi/dstack_app.d.ts +131 -0
  6. package/dist/actions/blockchains/add_device.d.ts +62 -0
  7. package/dist/actions/blockchains/check_compose_hash_allowed.d.ts +43 -0
  8. package/dist/actions/blockchains/check_device_allowed.d.ts +44 -0
  9. package/dist/actions/blockchains/check_on_chain_prerequisites.d.ts +59 -0
  10. package/dist/actions/blockchains/get_allowed_devices.d.ts +65 -0
  11. package/dist/actions/blockchains/remove_device.d.ts +62 -0
  12. package/dist/actions/blockchains/set_allow_any_device.d.ts +62 -0
  13. package/dist/actions/cvms/check_cvm_is_allowed.d.ts +145 -0
  14. package/dist/actions/cvms/commit_cvm_provision.d.ts +19 -0
  15. package/dist/actions/cvms/commit_cvm_update.d.ts +100 -0
  16. package/dist/actions/cvms/confirm_cvm_patch.d.ts +92 -0
  17. package/dist/actions/cvms/get_cvm_attestation.d.ts +220 -0
  18. package/dist/actions/cvms/get_cvm_compose_file.d.ts +16 -0
  19. package/dist/actions/cvms/patch_cvm.d.ts +447 -0
  20. package/dist/actions/cvms/provision_cvm.d.ts +26 -1
  21. package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +26 -0
  22. package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +93 -0
  23. package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +194 -0
  24. package/dist/actions/cvms/replicate_cvm.d.ts +126 -0
  25. package/dist/actions/cvms/restart_cvm.d.ts +2 -2
  26. package/dist/actions/cvms/shutdown_cvm.d.ts +2 -2
  27. package/dist/actions/cvms/start_cvm.d.ts +2 -2
  28. package/dist/actions/cvms/stop_cvm.d.ts +2 -2
  29. package/dist/actions/index.d.ts +22 -1
  30. package/dist/actions/kms/get_kms_onchain_detail.d.ts +688 -0
  31. package/dist/actions/os_images/get_os_images.d.ts +217 -0
  32. package/dist/actions/workspaces/get_workspace.d.ts +2 -0
  33. package/dist/actions/workspaces/list_workspaces.d.ts +18 -0
  34. package/dist/client.d.ts +5 -0
  35. package/dist/create-client.d.ts +30 -0
  36. package/dist/index.js +1909 -365
  37. package/dist/index.mjs +1843 -363
  38. package/dist/types/app_compose.d.ts +5 -0
  39. package/dist/types/app_info_v20260121.d.ts +158 -6
  40. package/dist/types/cvm_info.d.ts +3 -3
  41. package/dist/types/cvm_info_v20260121.d.ts +82 -4
  42. package/dist/utils/error_codes.d.ts +48 -0
  43. package/dist/utils/errors.d.ts +9 -0
  44. package/dist/utils/index.d.ts +2 -1
  45. package/dist/utils/verify-webhook.d.ts +35 -0
  46. package/dist/webhook.d.ts +11 -0
  47. package/dist/webhook.js +68 -0
  48. package/dist/webhook.mjs +40 -0
  49. package/package.json +7 -2
@@ -78,6 +78,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
78
78
  public_logs: z.ZodOptional<z.ZodBoolean>;
79
79
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
80
80
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
81
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
81
82
  pre_launch_script: z.ZodOptional<z.ZodString>;
82
83
  env_pubkey: z.ZodOptional<z.ZodString>;
83
84
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -91,6 +92,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
91
92
  public_logs: z.ZodOptional<z.ZodBoolean>;
92
93
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
93
94
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
95
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
94
96
  pre_launch_script: z.ZodOptional<z.ZodString>;
95
97
  env_pubkey: z.ZodOptional<z.ZodString>;
96
98
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -104,6 +106,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
104
106
  public_logs: z.ZodOptional<z.ZodBoolean>;
105
107
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
106
108
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
109
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
107
110
  pre_launch_script: z.ZodOptional<z.ZodString>;
108
111
  env_pubkey: z.ZodOptional<z.ZodString>;
109
112
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -117,6 +120,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
117
120
  public_logs: z.ZodOptional<z.ZodBoolean>;
118
121
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
119
122
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
123
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
120
124
  pre_launch_script: z.ZodOptional<z.ZodString>;
121
125
  env_pubkey: z.ZodOptional<z.ZodString>;
122
126
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -130,6 +134,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
130
134
  public_logs: z.ZodOptional<z.ZodBoolean>;
131
135
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
132
136
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
137
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
133
138
  pre_launch_script: z.ZodOptional<z.ZodString>;
134
139
  env_pubkey: z.ZodOptional<z.ZodString>;
135
140
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -138,6 +143,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
138
143
  name?: string | undefined;
139
144
  public_sysinfo?: boolean | undefined;
140
145
  public_logs?: boolean | undefined;
146
+ storage_fs?: "ext4" | "zfs" | undefined;
141
147
  allowed_envs?: string[] | undefined;
142
148
  features?: string[] | undefined;
143
149
  manifest_version?: number | undefined;
@@ -161,6 +167,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
161
167
  public_logs: z.ZodOptional<z.ZodBoolean>;
162
168
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
163
169
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
170
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
164
171
  pre_launch_script: z.ZodOptional<z.ZodString>;
165
172
  env_pubkey: z.ZodOptional<z.ZodString>;
166
173
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -175,6 +182,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
175
182
  public_logs: z.ZodOptional<z.ZodBoolean>;
176
183
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
177
184
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
185
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
178
186
  pre_launch_script: z.ZodOptional<z.ZodString>;
179
187
  env_pubkey: z.ZodOptional<z.ZodString>;
180
188
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -188,6 +196,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
188
196
  public_logs: z.ZodOptional<z.ZodBoolean>;
189
197
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
190
198
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
199
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
191
200
  pre_launch_script: z.ZodOptional<z.ZodString>;
192
201
  env_pubkey: z.ZodOptional<z.ZodString>;
193
202
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -201,6 +210,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
201
210
  public_logs: z.ZodOptional<z.ZodBoolean>;
202
211
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
203
212
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
213
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
204
214
  pre_launch_script: z.ZodOptional<z.ZodString>;
205
215
  env_pubkey: z.ZodOptional<z.ZodString>;
206
216
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -214,6 +224,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
214
224
  public_logs: z.ZodOptional<z.ZodBoolean>;
215
225
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
216
226
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
227
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
217
228
  pre_launch_script: z.ZodOptional<z.ZodString>;
218
229
  env_pubkey: z.ZodOptional<z.ZodString>;
219
230
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -227,6 +238,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
227
238
  public_logs: z.ZodOptional<z.ZodBoolean>;
228
239
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
229
240
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
241
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
230
242
  pre_launch_script: z.ZodOptional<z.ZodString>;
231
243
  env_pubkey: z.ZodOptional<z.ZodString>;
232
244
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -235,6 +247,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
235
247
  name?: string | undefined;
236
248
  public_sysinfo?: boolean | undefined;
237
249
  public_logs?: boolean | undefined;
250
+ storage_fs?: "ext4" | "zfs" | undefined;
238
251
  allowed_envs?: string[] | undefined;
239
252
  features?: string[] | undefined;
240
253
  manifest_version?: number | undefined;
@@ -258,6 +271,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
258
271
  public_logs: z.ZodOptional<z.ZodBoolean>;
259
272
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
260
273
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
274
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
261
275
  pre_launch_script: z.ZodOptional<z.ZodString>;
262
276
  env_pubkey: z.ZodOptional<z.ZodString>;
263
277
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -292,6 +306,7 @@ declare const getCvmComposeFile: {
292
306
  name?: string | undefined;
293
307
  public_sysinfo?: boolean | undefined;
294
308
  public_logs?: boolean | undefined;
309
+ storage_fs?: "ext4" | "zfs" | undefined;
295
310
  allowed_envs?: string[] | undefined;
296
311
  features?: string[] | undefined;
297
312
  manifest_version?: number | undefined;
@@ -318,6 +333,7 @@ declare const getCvmComposeFile: {
318
333
  name?: string | undefined;
319
334
  public_sysinfo?: boolean | undefined;
320
335
  public_logs?: boolean | undefined;
336
+ storage_fs?: "ext4" | "zfs" | undefined;
321
337
  allowed_envs?: string[] | undefined;
322
338
  features?: string[] | undefined;
323
339
  manifest_version?: number | undefined;
@@ -0,0 +1,447 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Patch CVM (unified update)
4
+ *
5
+ * Applies partial updates to a CVM via the unified PATCH endpoint. Only fields
6
+ * present in the request are applied (true PATCH semantics).
7
+ *
8
+ * For contract-owned KMS (ETHEREUM/BASE), compose-hash-affecting changes trigger
9
+ * a two-phase flow: the first call returns `{ requiresOnChainHash: true, ... }`
10
+ * with the compose hash to register on-chain. After registration, call
11
+ * `confirmCvmPatch` with the compose hash and transaction hash.
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * import { createClient, patchCvm, confirmCvmPatch, addComposeHash } from '@phala/cloud'
16
+ *
17
+ * const client = createClient()
18
+ *
19
+ * // Simple update (non-on-chain KMS or non-compose-hash-affecting fields)
20
+ * const result = await patchCvm(client, {
21
+ * id: 'my-cvm',
22
+ * vcpu: 4,
23
+ * memory: 8192,
24
+ * })
25
+ * // result.requiresOnChainHash === false
26
+ * console.log(result.correlationId)
27
+ *
28
+ * // On-chain KMS compose update (two-phase)
29
+ * const result = await patchCvm(client, {
30
+ * id: 'my-cvm',
31
+ * docker_compose_file: newComposeYaml,
32
+ * })
33
+ *
34
+ * if (result.requiresOnChainHash) {
35
+ * const tx = await addComposeHash(client, {
36
+ * composeHash: result.composeHash,
37
+ * kmsContractAddress: result.kmsInfo.kms_contract_address,
38
+ * // ... wallet config
39
+ * })
40
+ * await confirmCvmPatch(client, {
41
+ * id: 'my-cvm',
42
+ * composeHash: result.composeHash,
43
+ * transactionHash: tx.transactionHash,
44
+ * })
45
+ * }
46
+ * ```
47
+ */
48
+ export declare const PatchCvmRequestSchema: z.ZodEffects<z.ZodObject<{
49
+ id: z.ZodOptional<z.ZodString>;
50
+ uuid: z.ZodOptional<z.ZodString>;
51
+ app_id: z.ZodOptional<z.ZodString>;
52
+ instance_id: z.ZodOptional<z.ZodString>;
53
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
54
+ } & {
55
+ docker_compose_file: z.ZodOptional<z.ZodString>;
56
+ pre_launch_script: z.ZodOptional<z.ZodString>;
57
+ allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
58
+ public_logs: z.ZodOptional<z.ZodBoolean>;
59
+ public_sysinfo: z.ZodOptional<z.ZodBoolean>;
60
+ public_tcbinfo: z.ZodOptional<z.ZodBoolean>;
61
+ encrypted_env: z.ZodOptional<z.ZodString>;
62
+ user_config: z.ZodOptional<z.ZodString>;
63
+ gpus: z.ZodOptional<z.ZodObject<{
64
+ count: z.ZodNumber;
65
+ product_name: z.ZodOptional<z.ZodString>;
66
+ }, "strip", z.ZodTypeAny, {
67
+ count: number;
68
+ product_name?: string | undefined;
69
+ }, {
70
+ count: number;
71
+ product_name?: string | undefined;
72
+ }>>;
73
+ vcpu: z.ZodOptional<z.ZodNumber>;
74
+ memory: z.ZodOptional<z.ZodNumber>;
75
+ disk_size: z.ZodOptional<z.ZodNumber>;
76
+ image: z.ZodOptional<z.ZodString>;
77
+ shutdown_timeout: z.ZodOptional<z.ZodNumber>;
78
+ allow_force_stop: z.ZodOptional<z.ZodBoolean>;
79
+ prepareOnly: z.ZodOptional<z.ZodBoolean>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ name?: string | undefined;
82
+ image?: string | undefined;
83
+ id?: string | undefined;
84
+ app_id?: string | undefined;
85
+ instance_id?: string | undefined;
86
+ vcpu?: number | undefined;
87
+ memory?: number | undefined;
88
+ disk_size?: number | undefined;
89
+ public_sysinfo?: boolean | undefined;
90
+ public_logs?: boolean | undefined;
91
+ gpus?: {
92
+ count: number;
93
+ product_name?: string | undefined;
94
+ } | undefined;
95
+ public_tcbinfo?: boolean | undefined;
96
+ uuid?: string | undefined;
97
+ allowed_envs?: string[] | undefined;
98
+ docker_compose_file?: string | undefined;
99
+ pre_launch_script?: string | undefined;
100
+ encrypted_env?: string | undefined;
101
+ user_config?: string | undefined;
102
+ shutdown_timeout?: number | undefined;
103
+ allow_force_stop?: boolean | undefined;
104
+ prepareOnly?: boolean | undefined;
105
+ }, {
106
+ name?: string | undefined;
107
+ image?: string | undefined;
108
+ id?: string | undefined;
109
+ app_id?: string | undefined;
110
+ instance_id?: string | undefined;
111
+ vcpu?: number | undefined;
112
+ memory?: number | undefined;
113
+ disk_size?: number | undefined;
114
+ public_sysinfo?: boolean | undefined;
115
+ public_logs?: boolean | undefined;
116
+ gpus?: {
117
+ count: number;
118
+ product_name?: string | undefined;
119
+ } | undefined;
120
+ public_tcbinfo?: boolean | undefined;
121
+ uuid?: string | undefined;
122
+ allowed_envs?: string[] | undefined;
123
+ docker_compose_file?: string | undefined;
124
+ pre_launch_script?: string | undefined;
125
+ encrypted_env?: string | undefined;
126
+ user_config?: string | undefined;
127
+ shutdown_timeout?: number | undefined;
128
+ allow_force_stop?: boolean | undefined;
129
+ prepareOnly?: boolean | undefined;
130
+ }>, any, any>;
131
+ export type PatchCvmRequest = z.input<typeof PatchCvmRequestSchema>;
132
+ declare const PatchCvmAcceptedSchema: z.ZodObject<{
133
+ requiresOnChainHash: z.ZodLiteral<false>;
134
+ correlationId: z.ZodString;
135
+ }, "strip", z.ZodTypeAny, {
136
+ requiresOnChainHash: false;
137
+ correlationId: string;
138
+ }, {
139
+ requiresOnChainHash: false;
140
+ correlationId: string;
141
+ }>;
142
+ declare const PatchCvmHashRequiredSchema: z.ZodObject<{
143
+ requiresOnChainHash: z.ZodLiteral<true>;
144
+ composeHash: z.ZodString;
145
+ appId: z.ZodString;
146
+ deviceId: z.ZodString;
147
+ kmsInfo: z.ZodEffects<z.ZodObject<{
148
+ id: z.ZodString;
149
+ slug: z.ZodNullable<z.ZodString>;
150
+ url: z.ZodString;
151
+ version: z.ZodString;
152
+ chain_id: z.ZodNullable<z.ZodNumber>;
153
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
154
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
155
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
156
+ id: z.ZodString;
157
+ slug: z.ZodNullable<z.ZodString>;
158
+ url: z.ZodString;
159
+ version: z.ZodString;
160
+ chain_id: z.ZodNullable<z.ZodNumber>;
161
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
162
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
163
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
164
+ id: z.ZodString;
165
+ slug: z.ZodNullable<z.ZodString>;
166
+ url: z.ZodString;
167
+ version: z.ZodString;
168
+ chain_id: z.ZodNullable<z.ZodNumber>;
169
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
170
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
171
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
172
+ id: z.ZodString;
173
+ slug: z.ZodNullable<z.ZodString>;
174
+ url: z.ZodString;
175
+ version: z.ZodString;
176
+ chain_id: z.ZodNullable<z.ZodNumber>;
177
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
178
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
179
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
180
+ id: z.ZodString;
181
+ slug: z.ZodNullable<z.ZodString>;
182
+ url: z.ZodString;
183
+ version: z.ZodString;
184
+ chain_id: z.ZodNullable<z.ZodNumber>;
185
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
186
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
187
+ }, z.ZodTypeAny, "passthrough">>;
188
+ commitToken: z.ZodOptional<z.ZodString>;
189
+ commitUrl: z.ZodOptional<z.ZodString>;
190
+ apiCommitUrl: z.ZodOptional<z.ZodString>;
191
+ onchainStatus: z.ZodOptional<z.ZodObject<{
192
+ compose_hash_allowed: z.ZodBoolean;
193
+ device_id_allowed: z.ZodBoolean;
194
+ is_allowed: z.ZodBoolean;
195
+ }, "strip", z.ZodTypeAny, {
196
+ compose_hash_allowed: boolean;
197
+ device_id_allowed: boolean;
198
+ is_allowed: boolean;
199
+ }, {
200
+ compose_hash_allowed: boolean;
201
+ device_id_allowed: boolean;
202
+ is_allowed: boolean;
203
+ }>>;
204
+ }, "strip", z.ZodTypeAny, {
205
+ deviceId: string;
206
+ composeHash: string;
207
+ appId: string;
208
+ requiresOnChainHash: true;
209
+ kmsInfo: {
210
+ version: string;
211
+ id: string;
212
+ slug: string | null;
213
+ url: string;
214
+ chain_id: number | null;
215
+ kms_contract_address: `0x${string}`;
216
+ gateway_app_id: `0x${string}`;
217
+ } & {
218
+ [k: string]: unknown;
219
+ };
220
+ commitToken?: string | undefined;
221
+ commitUrl?: string | undefined;
222
+ apiCommitUrl?: string | undefined;
223
+ onchainStatus?: {
224
+ compose_hash_allowed: boolean;
225
+ device_id_allowed: boolean;
226
+ is_allowed: boolean;
227
+ } | undefined;
228
+ }, {
229
+ deviceId: string;
230
+ composeHash: string;
231
+ appId: string;
232
+ requiresOnChainHash: true;
233
+ kmsInfo: {
234
+ version: string;
235
+ id: string;
236
+ slug: string | null;
237
+ url: string;
238
+ chain_id: number | null;
239
+ kms_contract_address: string | null;
240
+ gateway_app_id: string | null;
241
+ } & {
242
+ [k: string]: unknown;
243
+ };
244
+ commitToken?: string | undefined;
245
+ commitUrl?: string | undefined;
246
+ apiCommitUrl?: string | undefined;
247
+ onchainStatus?: {
248
+ compose_hash_allowed: boolean;
249
+ device_id_allowed: boolean;
250
+ is_allowed: boolean;
251
+ } | undefined;
252
+ }>;
253
+ export declare const PatchCvmResultSchema: z.ZodDiscriminatedUnion<"requiresOnChainHash", [z.ZodObject<{
254
+ requiresOnChainHash: z.ZodLiteral<false>;
255
+ correlationId: z.ZodString;
256
+ }, "strip", z.ZodTypeAny, {
257
+ requiresOnChainHash: false;
258
+ correlationId: string;
259
+ }, {
260
+ requiresOnChainHash: false;
261
+ correlationId: string;
262
+ }>, z.ZodObject<{
263
+ requiresOnChainHash: z.ZodLiteral<true>;
264
+ composeHash: z.ZodString;
265
+ appId: z.ZodString;
266
+ deviceId: z.ZodString;
267
+ kmsInfo: z.ZodEffects<z.ZodObject<{
268
+ id: z.ZodString;
269
+ slug: z.ZodNullable<z.ZodString>;
270
+ url: z.ZodString;
271
+ version: z.ZodString;
272
+ chain_id: z.ZodNullable<z.ZodNumber>;
273
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
274
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
275
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
276
+ id: z.ZodString;
277
+ slug: z.ZodNullable<z.ZodString>;
278
+ url: z.ZodString;
279
+ version: z.ZodString;
280
+ chain_id: z.ZodNullable<z.ZodNumber>;
281
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
282
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
283
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
284
+ id: z.ZodString;
285
+ slug: z.ZodNullable<z.ZodString>;
286
+ url: z.ZodString;
287
+ version: z.ZodString;
288
+ chain_id: z.ZodNullable<z.ZodNumber>;
289
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
290
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
291
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
292
+ id: z.ZodString;
293
+ slug: z.ZodNullable<z.ZodString>;
294
+ url: z.ZodString;
295
+ version: z.ZodString;
296
+ chain_id: z.ZodNullable<z.ZodNumber>;
297
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
298
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
299
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
300
+ id: z.ZodString;
301
+ slug: z.ZodNullable<z.ZodString>;
302
+ url: z.ZodString;
303
+ version: z.ZodString;
304
+ chain_id: z.ZodNullable<z.ZodNumber>;
305
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
306
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
307
+ }, z.ZodTypeAny, "passthrough">>;
308
+ commitToken: z.ZodOptional<z.ZodString>;
309
+ commitUrl: z.ZodOptional<z.ZodString>;
310
+ apiCommitUrl: z.ZodOptional<z.ZodString>;
311
+ onchainStatus: z.ZodOptional<z.ZodObject<{
312
+ compose_hash_allowed: z.ZodBoolean;
313
+ device_id_allowed: z.ZodBoolean;
314
+ is_allowed: z.ZodBoolean;
315
+ }, "strip", z.ZodTypeAny, {
316
+ compose_hash_allowed: boolean;
317
+ device_id_allowed: boolean;
318
+ is_allowed: boolean;
319
+ }, {
320
+ compose_hash_allowed: boolean;
321
+ device_id_allowed: boolean;
322
+ is_allowed: boolean;
323
+ }>>;
324
+ }, "strip", z.ZodTypeAny, {
325
+ deviceId: string;
326
+ composeHash: string;
327
+ appId: string;
328
+ requiresOnChainHash: true;
329
+ kmsInfo: {
330
+ version: string;
331
+ id: string;
332
+ slug: string | null;
333
+ url: string;
334
+ chain_id: number | null;
335
+ kms_contract_address: `0x${string}`;
336
+ gateway_app_id: `0x${string}`;
337
+ } & {
338
+ [k: string]: unknown;
339
+ };
340
+ commitToken?: string | undefined;
341
+ commitUrl?: string | undefined;
342
+ apiCommitUrl?: string | undefined;
343
+ onchainStatus?: {
344
+ compose_hash_allowed: boolean;
345
+ device_id_allowed: boolean;
346
+ is_allowed: boolean;
347
+ } | undefined;
348
+ }, {
349
+ deviceId: string;
350
+ composeHash: string;
351
+ appId: string;
352
+ requiresOnChainHash: true;
353
+ kmsInfo: {
354
+ version: string;
355
+ id: string;
356
+ slug: string | null;
357
+ url: string;
358
+ chain_id: number | null;
359
+ kms_contract_address: string | null;
360
+ gateway_app_id: string | null;
361
+ } & {
362
+ [k: string]: unknown;
363
+ };
364
+ commitToken?: string | undefined;
365
+ commitUrl?: string | undefined;
366
+ apiCommitUrl?: string | undefined;
367
+ onchainStatus?: {
368
+ compose_hash_allowed: boolean;
369
+ device_id_allowed: boolean;
370
+ is_allowed: boolean;
371
+ } | undefined;
372
+ }>]>;
373
+ export type PatchCvmResult = z.infer<typeof PatchCvmResultSchema>;
374
+ export type PatchCvmAccepted = z.infer<typeof PatchCvmAcceptedSchema>;
375
+ export type PatchCvmHashRequired = z.infer<typeof PatchCvmHashRequiredSchema>;
376
+ declare const patchCvm: {
377
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<{
378
+ requiresOnChainHash: false;
379
+ correlationId: string;
380
+ } | {
381
+ deviceId: string;
382
+ composeHash: string;
383
+ appId: string;
384
+ requiresOnChainHash: true;
385
+ kmsInfo: {
386
+ version: string;
387
+ id: string;
388
+ slug: string | null;
389
+ url: string;
390
+ chain_id: number | null;
391
+ kms_contract_address: `0x${string}`;
392
+ gateway_app_id: `0x${string}`;
393
+ } & {
394
+ [k: string]: unknown;
395
+ };
396
+ commitToken?: string | undefined;
397
+ commitUrl?: string | undefined;
398
+ apiCommitUrl?: string | undefined;
399
+ onchainStatus?: {
400
+ compose_hash_allowed: boolean;
401
+ device_id_allowed: boolean;
402
+ is_allowed: boolean;
403
+ } | undefined;
404
+ }>;
405
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
406
+ schema: T;
407
+ } | undefined): Promise<z.TypeOf<T>>;
408
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
409
+ schema: false;
410
+ } | undefined): Promise<unknown>;
411
+ }, safePatchCvm: {
412
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<import("../..").SafeResult<{
413
+ requiresOnChainHash: false;
414
+ correlationId: string;
415
+ } | {
416
+ deviceId: string;
417
+ composeHash: string;
418
+ appId: string;
419
+ requiresOnChainHash: true;
420
+ kmsInfo: {
421
+ version: string;
422
+ id: string;
423
+ slug: string | null;
424
+ url: string;
425
+ chain_id: number | null;
426
+ kms_contract_address: `0x${string}`;
427
+ gateway_app_id: `0x${string}`;
428
+ } & {
429
+ [k: string]: unknown;
430
+ };
431
+ commitToken?: string | undefined;
432
+ commitUrl?: string | undefined;
433
+ apiCommitUrl?: string | undefined;
434
+ onchainStatus?: {
435
+ compose_hash_allowed: boolean;
436
+ device_id_allowed: boolean;
437
+ is_allowed: boolean;
438
+ } | undefined;
439
+ }>>;
440
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
441
+ schema: T;
442
+ } | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
443
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
444
+ schema: false;
445
+ } | undefined): Promise<import("../..").SafeResult<unknown>>;
446
+ };
447
+ export { patchCvm, safePatchCvm };