@phala/cloud 0.6.6 → 0.6.7-beta.1

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 (31) hide show
  1. package/README.md +19 -0
  2. package/dist/actions/apps/create_app_instance.d.ts +38 -0
  3. package/dist/actions/apps/get_app_pending_updates.d.ts +93 -0
  4. package/dist/actions/blockchains/remove_compose_hash.d.ts +77 -0
  5. package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +83 -11
  6. package/dist/actions/cvms/commit_cvm_provision.d.ts +191 -0
  7. package/dist/actions/cvms/commit_cvm_update.d.ts +77 -3
  8. package/dist/actions/cvms/confirm_cvm_patch.d.ts +80 -3
  9. package/dist/actions/cvms/cvm_draft.d.ts +1338 -0
  10. package/dist/actions/cvms/cvm_update_response.d.ts +154 -0
  11. package/dist/actions/cvms/get_cvm_init_scripts.d.ts +10 -16
  12. package/dist/actions/cvms/patch_cvm.d.ts +206 -62
  13. package/dist/actions/cvms/provision_cvm.d.ts +5 -7
  14. package/dist/actions/cvms/put_cvm_init_scripts.d.ts +49 -10
  15. package/dist/actions/cvms/update_cvm_envs.d.ts +129 -19
  16. package/dist/actions/cvms/update_docker_compose.d.ts +134 -20
  17. package/dist/actions/cvms/update_prelaunch_script.d.ts +134 -20
  18. package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +145 -15
  19. package/dist/actions/cvms/wait_for_cvm_finality.d.ts +153 -0
  20. package/dist/actions/index.d.ts +5 -1
  21. package/dist/actions/kms/get_app_env_encrypt_pubkey.d.ts +31 -7
  22. package/dist/create-client.d.ts +1267 -22
  23. package/dist/index.js +2540 -1784
  24. package/dist/index.mjs +2509 -1785
  25. package/dist/types/app_compose.d.ts +8 -6
  26. package/dist/types/cvm_finality.d.ts +134 -0
  27. package/dist/types/cvm_info.d.ts +266 -0
  28. package/dist/types/cvm_info_v20251028.d.ts +37 -0
  29. package/dist/types/cvm_info_v20260121.d.ts +111 -0
  30. package/dist/types/index.d.ts +1 -0
  31. package/package.json +1 -1
@@ -2,9 +2,10 @@ import { z } from "zod";
2
2
  /**
3
3
  * Commit CVM update (token-based, no auth required)
4
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.
5
+ * Submits a two-phase CVM update using a one-time commit token generated
6
+ * during a prepare-only request. The update may still be awaiting finality.
7
+ * The token enables multisig workflows where the signer is different from
8
+ * the original API caller.
8
9
  *
9
10
  * @example
10
11
  * ```typescript
@@ -46,6 +47,43 @@ export declare const CommitCvmUpdateRequestSchema: z.ZodObject<{
46
47
  export type CommitCvmUpdateRequest = z.input<typeof CommitCvmUpdateRequestSchema>;
47
48
  declare const CommitCvmUpdateResultSchema: z.ZodObject<{
48
49
  correlationId: z.ZodString;
50
+ finalityWait: z.ZodOptional<z.ZodObject<{
51
+ operation: z.ZodUnion<readonly [z.ZodEnum<{
52
+ create: "create";
53
+ update: "update";
54
+ }>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
55
+ correlation_id: z.ZodString;
56
+ phase: z.ZodUnion<readonly [z.ZodEnum<{
57
+ applying: "applying";
58
+ awaiting_finality: "awaiting_finality";
59
+ }>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
60
+ stage: z.ZodUnion<readonly [z.ZodEnum<{
61
+ finalized: "finalized";
62
+ safe: "safe";
63
+ submitted: "submitted";
64
+ }>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
65
+ stages: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
66
+ applying: "applying";
67
+ finalized: "finalized";
68
+ safe: "safe";
69
+ submitted: "submitted";
70
+ }>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>>>;
71
+ transaction: z.ZodNullable<z.ZodObject<{
72
+ hash: z.ZodString;
73
+ block_number: z.ZodNumber;
74
+ chain_id: z.ZodNumber;
75
+ }, z.core.$strip>>;
76
+ finality: z.ZodObject<{
77
+ block_tag: z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
78
+ finalized: "finalized";
79
+ latest: "latest";
80
+ safe: "safe";
81
+ }>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
82
+ policy_block_number: z.ZodNullable<z.ZodNumber>;
83
+ blocks_remaining: z.ZodNullable<z.ZodNumber>;
84
+ eta_seconds: z.ZodNullable<z.ZodNumber>;
85
+ }, z.core.$strip>;
86
+ }, z.core.$strip>>;
49
87
  status: z.ZodString;
50
88
  }, z.core.$strip>;
51
89
  export type CommitCvmUpdateResult = z.infer<typeof CommitCvmUpdateResultSchema>;
@@ -61,6 +99,24 @@ declare const commitCvmUpdate: {
61
99
  transactionHash: string;
62
100
  }): Promise<{
63
101
  correlationId: string;
102
+ finalityWait?: {
103
+ operation: "create" | "update" | (string & Record<never, never>);
104
+ correlation_id: string;
105
+ phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
106
+ stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
107
+ stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
108
+ transaction: {
109
+ hash: string;
110
+ block_number: number;
111
+ chain_id: number;
112
+ } | null;
113
+ finality: {
114
+ block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
115
+ policy_block_number: number | null;
116
+ blocks_remaining: number | null;
117
+ eta_seconds: number | null;
118
+ };
119
+ } | undefined;
64
120
  status: string;
65
121
  }>;
66
122
  <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
@@ -99,6 +155,24 @@ declare const commitCvmUpdate: {
99
155
  transactionHash: string;
100
156
  }): Promise<import("../..").SafeResult<{
101
157
  correlationId: string;
158
+ finalityWait?: {
159
+ operation: "create" | "update" | (string & Record<never, never>);
160
+ correlation_id: string;
161
+ phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
162
+ stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
163
+ stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
164
+ transaction: {
165
+ hash: string;
166
+ block_number: number;
167
+ chain_id: number;
168
+ } | null;
169
+ finality: {
170
+ block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
171
+ policy_block_number: number | null;
172
+ blocks_remaining: number | null;
173
+ eta_seconds: number | null;
174
+ };
175
+ } | undefined;
102
176
  status: string;
103
177
  }>>;
104
178
  <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
@@ -2,9 +2,10 @@ import { z } from "zod";
2
2
  /**
3
3
  * Confirm CVM patch (Phase 2 of on-chain KMS update)
4
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.
5
+ * Submits a two-phase CVM update by providing the compose hash and transaction
6
+ * hash proving on-chain registration. The update may still be awaiting finality.
7
+ * Call this after `patchCvm` returns `{ requiresOnChainHash: true }` and you
8
+ * have registered the compose hash on-chain.
8
9
  *
9
10
  * @example
10
11
  * ```typescript
@@ -45,6 +46,44 @@ export declare const ConfirmCvmPatchRequestSchema: z.ZodObject<{
45
46
  export type ConfirmCvmPatchRequest = z.input<typeof ConfirmCvmPatchRequestSchema>;
46
47
  declare const ConfirmCvmPatchResultSchema: z.ZodObject<{
47
48
  correlationId: z.ZodString;
49
+ status: z.ZodOptional<z.ZodString>;
50
+ finalityWait: z.ZodOptional<z.ZodObject<{
51
+ operation: z.ZodUnion<readonly [z.ZodEnum<{
52
+ create: "create";
53
+ update: "update";
54
+ }>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
55
+ correlation_id: z.ZodString;
56
+ phase: z.ZodUnion<readonly [z.ZodEnum<{
57
+ applying: "applying";
58
+ awaiting_finality: "awaiting_finality";
59
+ }>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
60
+ stage: z.ZodUnion<readonly [z.ZodEnum<{
61
+ finalized: "finalized";
62
+ safe: "safe";
63
+ submitted: "submitted";
64
+ }>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
65
+ stages: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
66
+ applying: "applying";
67
+ finalized: "finalized";
68
+ safe: "safe";
69
+ submitted: "submitted";
70
+ }>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>>>;
71
+ transaction: z.ZodNullable<z.ZodObject<{
72
+ hash: z.ZodString;
73
+ block_number: z.ZodNumber;
74
+ chain_id: z.ZodNumber;
75
+ }, z.core.$strip>>;
76
+ finality: z.ZodObject<{
77
+ block_tag: z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
78
+ finalized: "finalized";
79
+ latest: "latest";
80
+ safe: "safe";
81
+ }>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
82
+ policy_block_number: z.ZodNullable<z.ZodNumber>;
83
+ blocks_remaining: z.ZodNullable<z.ZodNumber>;
84
+ eta_seconds: z.ZodNullable<z.ZodNumber>;
85
+ }, z.core.$strip>;
86
+ }, z.core.$strip>>;
48
87
  }, z.core.$strip>;
49
88
  export type ConfirmCvmPatchResult = z.infer<typeof ConfirmCvmPatchResultSchema>;
50
89
  declare const confirmCvmPatch: {
@@ -58,6 +97,25 @@ declare const confirmCvmPatch: {
58
97
  transactionHash: string;
59
98
  }): Promise<{
60
99
  correlationId: string;
100
+ status?: string | undefined;
101
+ finalityWait?: {
102
+ operation: "create" | "update" | (string & Record<never, never>);
103
+ correlation_id: string;
104
+ phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
105
+ stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
106
+ stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
107
+ transaction: {
108
+ hash: string;
109
+ block_number: number;
110
+ chain_id: number;
111
+ } | null;
112
+ finality: {
113
+ block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
114
+ policy_block_number: number | null;
115
+ blocks_remaining: number | null;
116
+ eta_seconds: number | null;
117
+ };
118
+ } | undefined;
61
119
  }>;
62
120
  <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
63
121
  id?: string | undefined;
@@ -92,6 +150,25 @@ declare const confirmCvmPatch: {
92
150
  transactionHash: string;
93
151
  }): Promise<import("../..").SafeResult<{
94
152
  correlationId: string;
153
+ status?: string | undefined;
154
+ finalityWait?: {
155
+ operation: "create" | "update" | (string & Record<never, never>);
156
+ correlation_id: string;
157
+ phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
158
+ stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
159
+ stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
160
+ transaction: {
161
+ hash: string;
162
+ block_number: number;
163
+ chain_id: number;
164
+ } | null;
165
+ finality: {
166
+ block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
167
+ policy_block_number: number | null;
168
+ blocks_remaining: number | null;
169
+ eta_seconds: number | null;
170
+ };
171
+ } | undefined;
95
172
  }>>;
96
173
  <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
97
174
  id?: string | undefined;