@phala/cloud 0.2.5 → 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.
@@ -0,0 +1,100 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Commit CVM update (token-based, no auth required)
4
+ *
5
+ * Completes a two-phase CVM update using a one-time commit token generated
6
+ * during a prepare-only PATCH request. This enables multisig workflows where
7
+ * the on-chain signer is different from the original API caller.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * import { createClient, patchCvm, commitCvmUpdate } from '@phala/cloud'
12
+ *
13
+ * const client = createClient()
14
+ *
15
+ * // Phase 1: prepare-only
16
+ * const result = await patchCvm(client, {
17
+ * id: 'my-cvm',
18
+ * docker_compose_file: newComposeYaml,
19
+ * prepareOnly: true,
20
+ * })
21
+ *
22
+ * if (result.requiresOnChainHash && result.commitToken) {
23
+ * // ... multisig approval happens externally ...
24
+ *
25
+ * // Phase 2: commit with token
26
+ * const committed = await commitCvmUpdate(client, {
27
+ * id: 'my-cvm',
28
+ * token: result.commitToken,
29
+ * composeHash: result.composeHash,
30
+ * transactionHash: '0x...',
31
+ * })
32
+ * console.log(`Update started: ${committed.correlationId}`)
33
+ * }
34
+ * ```
35
+ */
36
+ export declare const CommitCvmUpdateRequestSchema: z.ZodEffects<z.ZodObject<{
37
+ id: z.ZodOptional<z.ZodString>;
38
+ uuid: z.ZodOptional<z.ZodString>;
39
+ app_id: z.ZodOptional<z.ZodString>;
40
+ instance_id: z.ZodOptional<z.ZodString>;
41
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
42
+ } & {
43
+ token: z.ZodString;
44
+ composeHash: z.ZodString;
45
+ transactionHash: z.ZodString;
46
+ }, "strip", z.ZodTypeAny, {
47
+ composeHash: string;
48
+ transactionHash: string;
49
+ token: string;
50
+ name?: string | undefined;
51
+ id?: string | undefined;
52
+ app_id?: string | undefined;
53
+ instance_id?: string | undefined;
54
+ uuid?: string | undefined;
55
+ }, {
56
+ composeHash: string;
57
+ transactionHash: string;
58
+ token: string;
59
+ name?: string | undefined;
60
+ id?: string | undefined;
61
+ app_id?: string | undefined;
62
+ instance_id?: string | undefined;
63
+ uuid?: string | undefined;
64
+ }>, any, any>;
65
+ export type CommitCvmUpdateRequest = z.input<typeof CommitCvmUpdateRequestSchema>;
66
+ declare const CommitCvmUpdateResultSchema: z.ZodObject<{
67
+ correlationId: z.ZodString;
68
+ status: z.ZodString;
69
+ }, "strip", z.ZodTypeAny, {
70
+ status: string;
71
+ correlationId: string;
72
+ }, {
73
+ status: string;
74
+ correlationId: string;
75
+ }>;
76
+ export type CommitCvmUpdateResult = z.infer<typeof CommitCvmUpdateResultSchema>;
77
+ declare const commitCvmUpdate: {
78
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<{
79
+ status: string;
80
+ correlationId: string;
81
+ }>;
82
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
83
+ schema: T;
84
+ } | undefined): Promise<z.TypeOf<T>>;
85
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
86
+ schema: false;
87
+ } | undefined): Promise<unknown>;
88
+ }, safeCommitCvmUpdate: {
89
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<import("../..").SafeResult<{
90
+ status: string;
91
+ correlationId: string;
92
+ }>>;
93
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
94
+ schema: T;
95
+ } | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
96
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
97
+ schema: false;
98
+ } | undefined): Promise<import("../..").SafeResult<unknown>>;
99
+ };
100
+ export { commitCvmUpdate, safeCommitCvmUpdate };
@@ -0,0 +1,92 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Confirm CVM patch (Phase 2 of on-chain KMS update)
4
+ *
5
+ * Completes a two-phase CVM update by providing the compose hash and transaction
6
+ * hash proving on-chain registration. Call this after `patchCvm` returns
7
+ * `{ requiresOnChainHash: true }` and you have registered the compose hash on-chain.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * import { createClient, patchCvm, confirmCvmPatch, addComposeHash } from '@phala/cloud'
12
+ *
13
+ * const client = createClient()
14
+ *
15
+ * const result = await patchCvm(client, {
16
+ * id: 'my-cvm',
17
+ * docker_compose_file: newComposeYaml,
18
+ * })
19
+ *
20
+ * if (result.requiresOnChainHash) {
21
+ * const tx = await addComposeHash(client, {
22
+ * composeHash: result.composeHash,
23
+ * kmsContractAddress: result.kmsInfo.kms_contract_address,
24
+ * // ... wallet config
25
+ * })
26
+ *
27
+ * const confirmed = await confirmCvmPatch(client, {
28
+ * id: 'my-cvm',
29
+ * composeHash: result.composeHash,
30
+ * transactionHash: tx.transactionHash,
31
+ * })
32
+ * console.log(`Update started: ${confirmed.correlationId}`)
33
+ * }
34
+ * ```
35
+ */
36
+ export declare const ConfirmCvmPatchRequestSchema: z.ZodEffects<z.ZodObject<{
37
+ id: z.ZodOptional<z.ZodString>;
38
+ uuid: z.ZodOptional<z.ZodString>;
39
+ app_id: z.ZodOptional<z.ZodString>;
40
+ instance_id: z.ZodOptional<z.ZodString>;
41
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
42
+ } & {
43
+ composeHash: z.ZodString;
44
+ transactionHash: z.ZodString;
45
+ }, "strip", z.ZodTypeAny, {
46
+ composeHash: string;
47
+ transactionHash: string;
48
+ name?: string | undefined;
49
+ id?: string | undefined;
50
+ app_id?: string | undefined;
51
+ instance_id?: string | undefined;
52
+ uuid?: string | undefined;
53
+ }, {
54
+ composeHash: string;
55
+ transactionHash: string;
56
+ name?: string | undefined;
57
+ id?: string | undefined;
58
+ app_id?: string | undefined;
59
+ instance_id?: string | undefined;
60
+ uuid?: string | undefined;
61
+ }>, any, any>;
62
+ export type ConfirmCvmPatchRequest = z.input<typeof ConfirmCvmPatchRequestSchema>;
63
+ declare const ConfirmCvmPatchResultSchema: z.ZodObject<{
64
+ correlationId: z.ZodString;
65
+ }, "strip", z.ZodTypeAny, {
66
+ correlationId: string;
67
+ }, {
68
+ correlationId: string;
69
+ }>;
70
+ export type ConfirmCvmPatchResult = z.infer<typeof ConfirmCvmPatchResultSchema>;
71
+ declare const confirmCvmPatch: {
72
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<{
73
+ correlationId: string;
74
+ }>;
75
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
76
+ schema: T;
77
+ } | undefined): Promise<z.TypeOf<T>>;
78
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
79
+ schema: false;
80
+ } | undefined): Promise<unknown>;
81
+ }, safeConfirmCvmPatch: {
82
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<import("../..").SafeResult<{
83
+ correlationId: string;
84
+ }>>;
85
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
86
+ schema: T;
87
+ } | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
88
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
89
+ schema: false;
90
+ } | undefined): Promise<import("../..").SafeResult<unknown>>;
91
+ };
92
+ export { confirmCvmPatch, safeConfirmCvmPatch };
@@ -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 };