@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
@@ -0,0 +1,145 @@
1
+ import { z } from "zod";
2
+ export declare const IsAllowedResultSchema: z.ZodObject<{
3
+ cvm_id: z.ZodOptional<z.ZodNumber>;
4
+ app_contract_address: z.ZodString;
5
+ compose_hash: z.ZodString;
6
+ device_id: z.ZodString;
7
+ compose_hash_allowed: z.ZodBoolean;
8
+ allow_any_device: z.ZodBoolean;
9
+ device_id_allowed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10
+ is_allowed: z.ZodBoolean;
11
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ device_id: string;
14
+ compose_hash: string;
15
+ compose_hash_allowed: boolean;
16
+ is_allowed: boolean;
17
+ app_contract_address: string;
18
+ allow_any_device: boolean;
19
+ error?: string | null | undefined;
20
+ device_id_allowed?: boolean | null | undefined;
21
+ cvm_id?: number | undefined;
22
+ }, {
23
+ device_id: string;
24
+ compose_hash: string;
25
+ compose_hash_allowed: boolean;
26
+ is_allowed: boolean;
27
+ app_contract_address: string;
28
+ allow_any_device: boolean;
29
+ error?: string | null | undefined;
30
+ device_id_allowed?: boolean | null | undefined;
31
+ cvm_id?: number | undefined;
32
+ }>;
33
+ export type IsAllowedResult = z.infer<typeof IsAllowedResultSchema>;
34
+ declare const CheckCvmIsAllowedInputSchema: z.ZodObject<{
35
+ cvmId: z.ZodString;
36
+ compose_hash: z.ZodOptional<z.ZodString>;
37
+ node_id: z.ZodOptional<z.ZodNumber>;
38
+ device_id: z.ZodOptional<z.ZodString>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ cvmId: string;
41
+ device_id?: string | undefined;
42
+ compose_hash?: string | undefined;
43
+ node_id?: number | undefined;
44
+ }, {
45
+ cvmId: string;
46
+ device_id?: string | undefined;
47
+ compose_hash?: string | undefined;
48
+ node_id?: number | undefined;
49
+ }>;
50
+ export declare const CheckCvmIsAllowedRequestSchema: z.ZodObject<{
51
+ cvmId: z.ZodString;
52
+ compose_hash: z.ZodOptional<z.ZodString>;
53
+ node_id: z.ZodOptional<z.ZodNumber>;
54
+ device_id: z.ZodOptional<z.ZodString>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ cvmId: string;
57
+ device_id?: string | undefined;
58
+ compose_hash?: string | undefined;
59
+ node_id?: number | undefined;
60
+ }, {
61
+ cvmId: string;
62
+ device_id?: string | undefined;
63
+ compose_hash?: string | undefined;
64
+ node_id?: number | undefined;
65
+ }>;
66
+ export type CheckCvmIsAllowedRequest = z.infer<typeof CheckCvmIsAllowedInputSchema>;
67
+ /**
68
+ * Check if a CVM deployment is allowed by its on-chain DStack App contract.
69
+ *
70
+ * @param client - The API client
71
+ * @param request - Request parameters
72
+ * @param request.cvmId - CVM identifier
73
+ * @param request.compose_hash - Optional compose hash override
74
+ * @param request.node_id - Optional node ID override (resolves device_id)
75
+ * @param request.device_id - Optional device ID override
76
+ * @returns On-chain allowance check result
77
+ */
78
+ declare const checkCvmIsAllowed: {
79
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
80
+ cvmId: string;
81
+ device_id?: string | undefined;
82
+ compose_hash?: string | undefined;
83
+ node_id?: number | undefined;
84
+ }): Promise<{
85
+ device_id: string;
86
+ compose_hash: string;
87
+ compose_hash_allowed: boolean;
88
+ is_allowed: boolean;
89
+ app_contract_address: string;
90
+ allow_any_device: boolean;
91
+ error?: string | null | undefined;
92
+ device_id_allowed?: boolean | null | undefined;
93
+ cvm_id?: number | undefined;
94
+ }>;
95
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
96
+ cvmId: string;
97
+ device_id?: string | undefined;
98
+ compose_hash?: string | undefined;
99
+ node_id?: number | undefined;
100
+ }, parameters: {
101
+ schema: T;
102
+ }): Promise<z.TypeOf<T>>;
103
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
104
+ cvmId: string;
105
+ device_id?: string | undefined;
106
+ compose_hash?: string | undefined;
107
+ node_id?: number | undefined;
108
+ }, parameters: {
109
+ schema: false;
110
+ }): Promise<unknown>;
111
+ }, safeCheckCvmIsAllowed: {
112
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
113
+ cvmId: string;
114
+ device_id?: string | undefined;
115
+ compose_hash?: string | undefined;
116
+ node_id?: number | undefined;
117
+ }): Promise<import("../..").SafeResult<{
118
+ device_id: string;
119
+ compose_hash: string;
120
+ compose_hash_allowed: boolean;
121
+ is_allowed: boolean;
122
+ app_contract_address: string;
123
+ allow_any_device: boolean;
124
+ error?: string | null | undefined;
125
+ device_id_allowed?: boolean | null | undefined;
126
+ cvm_id?: number | undefined;
127
+ }>>;
128
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
129
+ cvmId: string;
130
+ device_id?: string | undefined;
131
+ compose_hash?: string | undefined;
132
+ node_id?: number | undefined;
133
+ }, parameters: {
134
+ schema: T;
135
+ }): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
136
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
137
+ cvmId: string;
138
+ device_id?: string | undefined;
139
+ compose_hash?: string | undefined;
140
+ node_id?: number | undefined;
141
+ }, parameters: {
142
+ schema: false;
143
+ }): Promise<import("../..").SafeResult<unknown>>;
144
+ };
145
+ export { checkCvmIsAllowed, safeCheckCvmIsAllowed };
@@ -84,6 +84,25 @@ import { type Client } from "../../client";
84
84
  * - **contract_address**: On-chain KMS contract address (required for ETHEREUM/BASE KMS)
85
85
  * - **deployer_address**: Deployer address for on-chain verification (required for ETHEREUM/BASE KMS)
86
86
  *
87
+ * ## Idempotency
88
+ *
89
+ * This endpoint is idempotent: submitting the same `app_id` + `compose_hash`
90
+ * again returns the existing CVM (safe retry after network timeout). A different
91
+ * `compose_hash` for the same `app_id` throws a `ResourceError` with error code
92
+ * `ERR-03-007` (`CVM_APP_ID_CONFLICT`, HTTP 409).
93
+ *
94
+ * ```typescript
95
+ * import { isAppIdConflictError } from '@phala/cloud'
96
+ *
97
+ * try {
98
+ * const cvm = await commitCvmProvision(client, payload)
99
+ * } catch (error) {
100
+ * if (isAppIdConflictError(error)) {
101
+ * // app_id already used with a different compose_hash
102
+ * }
103
+ * }
104
+ * ```
105
+ *
87
106
  * ## Schema Parameter
88
107
  *
89
108
  * - **Type:** `ZodSchema | false`
@@ -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 };
@@ -1,5 +1,225 @@
1
1
  import { z } from "zod";
2
2
  import { type CvmIdInput } from "../../types/cvm_id";
3
+ /**
4
+ * Get CVM attestation and TEE security information
5
+ *
6
+ * This action retrieves detailed attestation information including
7
+ * certificates, TCB info, and measurement values for a CVM instance.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * import { createClient, getCvmAttestation } from '@phala/cloud'
12
+ *
13
+ * const client = createClient();
14
+ * const attestation = await getCvmAttestation(client, { id: 'my-cvm-id' });
15
+ * console.log(attestation.tcb_info?.mrtd);
16
+ * ```
17
+ */
18
+ export declare const CertificateSubjectSchema: z.ZodObject<{
19
+ common_name: z.ZodNullable<z.ZodString>;
20
+ organization: z.ZodNullable<z.ZodString>;
21
+ country: z.ZodNullable<z.ZodString>;
22
+ state: z.ZodNullable<z.ZodString>;
23
+ locality: z.ZodNullable<z.ZodString>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ state: string | null;
26
+ common_name: string | null;
27
+ organization: string | null;
28
+ country: string | null;
29
+ locality: string | null;
30
+ }, {
31
+ state: string | null;
32
+ common_name: string | null;
33
+ organization: string | null;
34
+ country: string | null;
35
+ locality: string | null;
36
+ }>;
37
+ export declare const CertificateIssuerSchema: z.ZodObject<{
38
+ common_name: z.ZodNullable<z.ZodString>;
39
+ organization: z.ZodNullable<z.ZodString>;
40
+ country: z.ZodNullable<z.ZodString>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ common_name: string | null;
43
+ organization: string | null;
44
+ country: string | null;
45
+ }, {
46
+ common_name: string | null;
47
+ organization: string | null;
48
+ country: string | null;
49
+ }>;
50
+ export declare const CertificateSchema: z.ZodObject<{
51
+ subject: z.ZodObject<{
52
+ common_name: z.ZodNullable<z.ZodString>;
53
+ organization: z.ZodNullable<z.ZodString>;
54
+ country: z.ZodNullable<z.ZodString>;
55
+ state: z.ZodNullable<z.ZodString>;
56
+ locality: z.ZodNullable<z.ZodString>;
57
+ }, "strip", z.ZodTypeAny, {
58
+ state: string | null;
59
+ common_name: string | null;
60
+ organization: string | null;
61
+ country: string | null;
62
+ locality: string | null;
63
+ }, {
64
+ state: string | null;
65
+ common_name: string | null;
66
+ organization: string | null;
67
+ country: string | null;
68
+ locality: string | null;
69
+ }>;
70
+ issuer: z.ZodObject<{
71
+ common_name: z.ZodNullable<z.ZodString>;
72
+ organization: z.ZodNullable<z.ZodString>;
73
+ country: z.ZodNullable<z.ZodString>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ common_name: string | null;
76
+ organization: string | null;
77
+ country: string | null;
78
+ }, {
79
+ common_name: string | null;
80
+ organization: string | null;
81
+ country: string | null;
82
+ }>;
83
+ serial_number: z.ZodString;
84
+ not_before: z.ZodString;
85
+ not_after: z.ZodString;
86
+ version: z.ZodString;
87
+ fingerprint: z.ZodString;
88
+ signature_algorithm: z.ZodString;
89
+ sans: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
90
+ is_ca: z.ZodBoolean;
91
+ position_in_chain: z.ZodNullable<z.ZodNumber>;
92
+ quote: z.ZodNullable<z.ZodString>;
93
+ app_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
+ cert_usage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
+ }, "strip", z.ZodTypeAny, {
96
+ version: string;
97
+ subject: {
98
+ state: string | null;
99
+ common_name: string | null;
100
+ organization: string | null;
101
+ country: string | null;
102
+ locality: string | null;
103
+ };
104
+ issuer: {
105
+ common_name: string | null;
106
+ organization: string | null;
107
+ country: string | null;
108
+ };
109
+ serial_number: string;
110
+ not_before: string;
111
+ not_after: string;
112
+ fingerprint: string;
113
+ signature_algorithm: string;
114
+ sans: string[] | null;
115
+ is_ca: boolean;
116
+ position_in_chain: number | null;
117
+ quote: string | null;
118
+ app_id?: string | null | undefined;
119
+ cert_usage?: string | null | undefined;
120
+ }, {
121
+ version: string;
122
+ subject: {
123
+ state: string | null;
124
+ common_name: string | null;
125
+ organization: string | null;
126
+ country: string | null;
127
+ locality: string | null;
128
+ };
129
+ issuer: {
130
+ common_name: string | null;
131
+ organization: string | null;
132
+ country: string | null;
133
+ };
134
+ serial_number: string;
135
+ not_before: string;
136
+ not_after: string;
137
+ fingerprint: string;
138
+ signature_algorithm: string;
139
+ sans: string[] | null;
140
+ is_ca: boolean;
141
+ position_in_chain: number | null;
142
+ quote: string | null;
143
+ app_id?: string | null | undefined;
144
+ cert_usage?: string | null | undefined;
145
+ }>;
146
+ export declare const EventLogSchema: z.ZodObject<{
147
+ imr: z.ZodNumber;
148
+ event_type: z.ZodNumber;
149
+ digest: z.ZodString;
150
+ event: z.ZodString;
151
+ event_payload: z.ZodString;
152
+ }, "strip", z.ZodTypeAny, {
153
+ imr: number;
154
+ event_type: number;
155
+ digest: string;
156
+ event: string;
157
+ event_payload: string;
158
+ }, {
159
+ imr: number;
160
+ event_type: number;
161
+ digest: string;
162
+ event: string;
163
+ event_payload: string;
164
+ }>;
165
+ export declare const TcbInfoSchema: z.ZodObject<{
166
+ mrtd: z.ZodString;
167
+ rootfs_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
168
+ rtmr0: z.ZodString;
169
+ rtmr1: z.ZodString;
170
+ rtmr2: z.ZodString;
171
+ rtmr3: z.ZodString;
172
+ event_log: z.ZodArray<z.ZodObject<{
173
+ imr: z.ZodNumber;
174
+ event_type: z.ZodNumber;
175
+ digest: z.ZodString;
176
+ event: z.ZodString;
177
+ event_payload: z.ZodString;
178
+ }, "strip", z.ZodTypeAny, {
179
+ imr: number;
180
+ event_type: number;
181
+ digest: string;
182
+ event: string;
183
+ event_payload: string;
184
+ }, {
185
+ imr: number;
186
+ event_type: number;
187
+ digest: string;
188
+ event: string;
189
+ event_payload: string;
190
+ }>, "many">;
191
+ app_compose: z.ZodString;
192
+ }, "strip", z.ZodTypeAny, {
193
+ app_compose: string;
194
+ mrtd: string;
195
+ rtmr0: string;
196
+ rtmr1: string;
197
+ rtmr2: string;
198
+ rtmr3: string;
199
+ event_log: {
200
+ imr: number;
201
+ event_type: number;
202
+ digest: string;
203
+ event: string;
204
+ event_payload: string;
205
+ }[];
206
+ rootfs_hash?: string | null | undefined;
207
+ }, {
208
+ app_compose: string;
209
+ mrtd: string;
210
+ rtmr0: string;
211
+ rtmr1: string;
212
+ rtmr2: string;
213
+ rtmr3: string;
214
+ event_log: {
215
+ imr: number;
216
+ event_type: number;
217
+ digest: string;
218
+ event: string;
219
+ event_payload: string;
220
+ }[];
221
+ rootfs_hash?: string | null | undefined;
222
+ }>;
3
223
  export declare const CvmAttestationSchema: z.ZodObject<{
4
224
  name: z.ZodNullable<z.ZodString>;
5
225
  is_online: z.ZodBoolean;