@akashnetwork/chain-sdk 1.0.0-alpha.34 → 1.0.0-alpha.36

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 (58) hide show
  1. package/dist/cjs/generated/createProviderSDK.cjs +10 -1
  2. package/dist/cjs/generated/createProviderSDK.cjs.map +2 -2
  3. package/dist/cjs/generated/protos/akash/manifest/v2beta3/service.cjs +85 -3
  4. package/dist/cjs/generated/protos/akash/manifest/v2beta3/service.cjs.map +2 -2
  5. package/dist/cjs/generated/protos/akash/provider/lease/v1/service.cjs +276 -0
  6. package/dist/cjs/generated/protos/akash/provider/lease/v1/service.cjs.map +2 -2
  7. package/dist/cjs/generated/protos/akash/provider/lease/v1/service_akash.cjs +10 -0
  8. package/dist/cjs/generated/protos/akash/provider/lease/v1/service_akash.cjs.map +2 -2
  9. package/dist/cjs/generated/protos/akash/provider/v1/status.cjs +19 -2
  10. package/dist/cjs/generated/protos/akash/provider/v1/status.cjs.map +2 -2
  11. package/dist/cjs/generated/protos/index.provider.akash.v1.cjs +3 -0
  12. package/dist/cjs/generated/protos/index.provider.akash.v1.cjs.map +2 -2
  13. package/dist/cjs/generated/protos/index.provider.akash.v2beta3.cjs +2 -1
  14. package/dist/cjs/generated/protos/index.provider.akash.v2beta3.cjs.map +2 -2
  15. package/dist/cjs/sdk/provider/auth/jwt/validateJwtPayload.cjs +5 -5
  16. package/dist/cjs/sdk/provider/auth/jwt/validateJwtPayload.cjs.map +2 -2
  17. package/dist/cjs/sdl/manifest/generateManifest.cjs +3 -0
  18. package/dist/cjs/sdl/manifest/generateManifest.cjs.map +2 -2
  19. package/dist/cjs/sdl/manifest/generateManifestVersion.cjs +1 -1
  20. package/dist/cjs/sdl/manifest/generateManifestVersion.cjs.map +2 -2
  21. package/dist/cjs/sdl/validateSDL/validateSDL.cjs +24 -1
  22. package/dist/cjs/sdl/validateSDL/validateSDL.cjs.map +2 -2
  23. package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs +67 -46
  24. package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs.map +2 -2
  25. package/dist/esm/{chunk-W25EJ3NI.js → chunk-MLIW7FIZ.js} +22 -3
  26. package/dist/esm/chunk-MLIW7FIZ.js.map +7 -0
  27. package/dist/esm/{chunk-2ZDOXCM3.js → chunk-P2FARPRM.js} +104 -56
  28. package/dist/esm/chunk-P2FARPRM.js.map +7 -0
  29. package/dist/esm/{chunk-HBXYMZWF.js → chunk-SQUBF6EZ.js} +279 -3
  30. package/dist/esm/chunk-SQUBF6EZ.js.map +7 -0
  31. package/dist/esm/{chunk-COR2HJ6D.js → chunk-UZXCPKLQ.js} +85 -3
  32. package/dist/esm/chunk-UZXCPKLQ.js.map +7 -0
  33. package/dist/esm/generated/protos/index.provider.akash.v1.js +9 -3
  34. package/dist/esm/generated/protos/index.provider.akash.v2beta3.js +5 -3
  35. package/dist/esm/index.js +14 -5
  36. package/dist/esm/index.js.map +2 -2
  37. package/dist/esm/index.web.js +2 -2
  38. package/dist/esm/{service_akash-AAROYIZB.js → service_akash-BILCZWQI.js} +15 -3
  39. package/dist/esm/service_akash-BILCZWQI.js.map +7 -0
  40. package/dist/esm/{service_akash-5RIOE2CY.js → service_akash-LXXUUD6O.js} +3 -2
  41. package/dist/esm/{service_akash-5RIOE2CY.js.map → service_akash-LXXUUD6O.js.map} +1 -1
  42. package/dist/sdl-schema.yaml +5 -0
  43. package/dist/tsconfig.build.tsbuildinfo +1 -1
  44. package/dist/types/generated/createProviderSDK.d.ts +14 -0
  45. package/dist/types/generated/protos/akash/manifest/v2beta3/service.d.ts +19 -0
  46. package/dist/types/generated/protos/akash/provider/lease/v1/service.d.ts +43 -0
  47. package/dist/types/generated/protos/akash/provider/lease/v1/service_akash.d.ts +9 -1
  48. package/dist/types/generated/protos/akash/provider/v1/status.d.ts +2 -0
  49. package/dist/types/generated/protos/index.provider.akash.v1.d.ts +1 -1
  50. package/dist/types/generated/protos/index.provider.akash.v2beta3.d.ts +1 -1
  51. package/dist/types/sdk/provider/auth/jwt/validateJwtPayload.d.ts +3 -3
  52. package/dist/types/sdl/validateSDL/validateSDLInput.d.ts +5 -0
  53. package/package.json +1 -1
  54. package/dist/esm/chunk-2ZDOXCM3.js.map +0 -7
  55. package/dist/esm/chunk-COR2HJ6D.js.map +0 -7
  56. package/dist/esm/chunk-HBXYMZWF.js.map +0 -7
  57. package/dist/esm/chunk-W25EJ3NI.js.map +0 -7
  58. package/dist/esm/service_akash-AAROYIZB.js.map +0 -7
@@ -74,6 +74,14 @@ export declare const serviceLoader: import("../sdk/client/createServiceLoader.ts
74
74
  readonly output: import("../encoding/typeEncodingHelpers.ts").MessageFns<akash_provider_lease_v1_service.ServiceLogsResponse, "akash.provider.lease.v1.ServiceLogsResponse">;
75
75
  readonly parent: /*elided*/ any;
76
76
  };
77
+ readonly attestationQuote: {
78
+ readonly name: "AttestationQuote";
79
+ readonly httpMethod: "post";
80
+ readonly httpPath: "/v1/lease/attestation/quote";
81
+ readonly input: import("../encoding/typeEncodingHelpers.ts").MessageFns<akash_provider_lease_v1_service.AttestationQuoteRequest, "akash.provider.lease.v1.AttestationQuoteRequest">;
82
+ readonly output: import("../encoding/typeEncodingHelpers.ts").MessageFns<akash_provider_lease_v1_service.AttestationQuoteResponse, "akash.provider.lease.v1.AttestationQuoteResponse">;
83
+ readonly parent: /*elided*/ any;
84
+ };
77
85
  };
78
86
  }>, () => Promise<{
79
87
  readonly typeName: "akash.provider.v1.ProviderRPC";
@@ -147,6 +155,12 @@ export declare function createSDK(transport: Transport): {
147
155
  * streamServiceLogs
148
156
  */
149
157
  streamServiceLogs: (input: DeepPartial<akash_provider_lease_v1_service.ServiceLogsRequest>, options?: CallOptions) => Promise<AsyncIterable<akash_provider_lease_v1_service.ServiceLogsResponse>>;
158
+ /**
159
+ * attestationQuote requests hardware-signed attestation evidence from the
160
+ * confidential compute sidecar. The provider forwards the tenant's nonce
161
+ * to the sidecar and returns the hardware-signed quote verbatim.
162
+ */
163
+ attestationQuote: (input: DeepPartial<akash_provider_lease_v1_service.AttestationQuoteRequest>, options?: CallOptions) => Promise<akash_provider_lease_v1_service.AttestationQuoteResponse>;
150
164
  };
151
165
  };
152
166
  v1: {
@@ -15,11 +15,29 @@ export interface StorageParams {
15
15
  export interface ServicePermissions {
16
16
  read: string[];
17
17
  }
18
+ /**
19
+ * TEEParams configures Trusted Execution Environment for the service.
20
+ * The type field selects the TEE capability and the provider resolves the
21
+ * runtime class based on its detected platform (TDX or SNP).
22
+ * The attestation field controls whether the provider injects an attestation sidecar.
23
+ */
24
+ export interface TEEParams {
25
+ /** type is the TEE capability: cpu, cpu-gpu */
26
+ type: string;
27
+ /**
28
+ * attestation controls whether the provider injects an attestation sidecar.
29
+ * IMPORTANT: proto3 bool defaults to false, but the intended default is true.
30
+ * All producers MUST set this field explicitly. The Go SDL builder enforces
31
+ * this; non-Go clients must set attestation=true when sidecar injection is desired.
32
+ */
33
+ attestation: boolean;
34
+ }
18
35
  /** ServiceParams */
19
36
  export interface ServiceParams {
20
37
  storage: StorageParams[];
21
38
  credentials: ImageCredentials | undefined;
22
39
  permissions: ServicePermissions | undefined;
40
+ tee: TEEParams | undefined;
23
41
  }
24
42
  /** Credentials to fetch image from registry */
25
43
  export interface ImageCredentials {
@@ -43,6 +61,7 @@ export interface Service {
43
61
  }
44
62
  export declare const StorageParams: MessageFns<StorageParams, "akash.manifest.v2beta3.StorageParams">;
45
63
  export declare const ServicePermissions: MessageFns<ServicePermissions, "akash.manifest.v2beta3.ServicePermissions">;
64
+ export declare const TEEParams: MessageFns<TEEParams, "akash.manifest.v2beta3.TEEParams">;
46
65
  export declare const ServiceParams: MessageFns<ServiceParams, "akash.manifest.v2beta3.ServiceParams">;
47
66
  export declare const ImageCredentials: MessageFns<ImageCredentials, "akash.manifest.v2beta3.ImageCredentials">;
48
67
  export declare const Service: MessageFns<Service, "akash.manifest.v2beta3.Service">;
@@ -70,6 +70,46 @@ export interface ServiceStatusRequest {
70
70
  export interface ServiceStatusResponse {
71
71
  services: ServiceStatus[];
72
72
  }
73
+ /**
74
+ * AttestationQuoteRequest is the request body for the AttestationQuote RPC method.
75
+ * The tenant generates a nonce and sends it; the provider forwards it verbatim
76
+ * to the attestation sidecar inside the confidential compute pod.
77
+ */
78
+ export interface AttestationQuoteRequest {
79
+ leaseId: LeaseID | undefined;
80
+ /** Base64-encoded 64-byte nonce generated by the tenant. */
81
+ nonce: string;
82
+ /**
83
+ * When true, report_data is computed as SHA-512(tls_pubkey || nonce)[:64]
84
+ * to bind the attestation to the TLS channel.
85
+ */
86
+ bindTls: boolean;
87
+ }
88
+ /** AttestationGPUReport holds attestation evidence for a single GPU device. */
89
+ export interface AttestationGPUReport {
90
+ deviceIndex: number;
91
+ /** Base64-encoded hardware-signed GPU attestation report. */
92
+ report: string;
93
+ }
94
+ /**
95
+ * AttestationQuoteResponse is the response from the AttestationQuote RPC method.
96
+ * Contains raw hardware-signed attestation evidence from the TEE sidecar.
97
+ * The provider never inspects or modifies any field.
98
+ */
99
+ export interface AttestationQuoteResponse {
100
+ /** Base64-encoded CPU attestation report (SNP ~1184 bytes, TDX ~5243 bytes). */
101
+ report: string;
102
+ /** Base64-encoded certificate chain (may be empty). */
103
+ certChain: string;
104
+ /** TEE platform identifier: "snp", "tdx", "snp-gpu", "tdx-gpu". */
105
+ teePlatform: string;
106
+ /** Base64-encoded auxiliary blob (typically empty). */
107
+ auxblob: string;
108
+ /** Per-device GPU attestation reports for all CC-capable GPUs. */
109
+ gpuReports: AttestationGPUReport[];
110
+ /** Whether report_data was computed with TLS channel binding. */
111
+ tlsBound: boolean;
112
+ }
73
113
  export declare const LeaseServiceStatus: MessageFns<LeaseServiceStatus, "akash.provider.lease.v1.LeaseServiceStatus">;
74
114
  export declare const LeaseIPStatus: MessageFns<LeaseIPStatus, "akash.provider.lease.v1.LeaseIPStatus">;
75
115
  export declare const ForwarderPortStatus: MessageFns<ForwarderPortStatus, "akash.provider.lease.v1.ForwarderPortStatus">;
@@ -82,3 +122,6 @@ export declare const ServiceLogsResponse: MessageFns<ServiceLogsResponse, "akash
82
122
  export declare const ShellRequest: MessageFns<ShellRequest, "akash.provider.lease.v1.ShellRequest">;
83
123
  export declare const ServiceStatusRequest: MessageFns<ServiceStatusRequest, "akash.provider.lease.v1.ServiceStatusRequest">;
84
124
  export declare const ServiceStatusResponse: MessageFns<ServiceStatusResponse, "akash.provider.lease.v1.ServiceStatusResponse">;
125
+ export declare const AttestationQuoteRequest: MessageFns<AttestationQuoteRequest, "akash.provider.lease.v1.AttestationQuoteRequest">;
126
+ export declare const AttestationGPUReport: MessageFns<AttestationGPUReport, "akash.provider.lease.v1.AttestationGPUReport">;
127
+ export declare const AttestationQuoteResponse: MessageFns<AttestationQuoteResponse, "akash.provider.lease.v1.AttestationQuoteResponse">;
@@ -1,4 +1,4 @@
1
- import { SendManifestRequest, SendManifestResponse, ServiceLogsRequest, ServiceLogsResponse, ServiceStatusRequest, ServiceStatusResponse } from "./service.ts";
1
+ import { AttestationQuoteRequest, AttestationQuoteResponse, SendManifestRequest, SendManifestResponse, ServiceLogsRequest, ServiceLogsResponse, ServiceStatusRequest, ServiceStatusResponse } from "./service.ts";
2
2
  export declare const LeaseRPC: {
3
3
  readonly typeName: "akash.provider.lease.v1.LeaseRPC";
4
4
  readonly methods: {
@@ -34,5 +34,13 @@ export declare const LeaseRPC: {
34
34
  readonly output: import("../../../../../../encoding/typeEncodingHelpers.ts").MessageFns<ServiceLogsResponse, "akash.provider.lease.v1.ServiceLogsResponse">;
35
35
  readonly parent: /*elided*/ any;
36
36
  };
37
+ readonly attestationQuote: {
38
+ readonly name: "AttestationQuote";
39
+ readonly httpMethod: "post";
40
+ readonly httpPath: "/v1/lease/attestation/quote";
41
+ readonly input: import("../../../../../../encoding/typeEncodingHelpers.ts").MessageFns<AttestationQuoteRequest, "akash.provider.lease.v1.AttestationQuoteRequest">;
42
+ readonly output: import("../../../../../../encoding/typeEncodingHelpers.ts").MessageFns<AttestationQuoteResponse, "akash.provider.lease.v1.AttestationQuoteResponse">;
43
+ readonly parent: /*elided*/ any;
44
+ };
37
45
  };
38
46
  };
@@ -1,4 +1,5 @@
1
1
  import type { MessageFns } from "../../../../../encoding/typeEncodingHelpers.ts";
2
+ import { Duration } from "../../../google/protobuf/duration.ts";
2
3
  import { Quantity } from "../../../k8s.io/apimachinery/pkg/api/resource/generated.ts";
3
4
  import { Cluster } from "../../inventory/v1/cluster.ts";
4
5
  import { ResourcePair } from "../../inventory/v1/resourcepair.ts";
@@ -57,6 +58,7 @@ export interface Status {
57
58
  manifest: ManifestStatus | undefined;
58
59
  publicHostnames: string[];
59
60
  timestamp: Date | undefined;
61
+ reclamationWindow: Duration | undefined;
60
62
  }
61
63
  export declare const ResourcesMetric: MessageFns<ResourcesMetric, "akash.provider.v1.ResourcesMetric">;
62
64
  export declare const ResourcesMetric_StorageEntry: MessageFns<ResourcesMetric_StorageEntry, "akash.provider.v1.ResourcesMetric.StorageEntry">;
@@ -6,6 +6,6 @@ export { NodeResources } from "./akash/inventory/v1/resources.ts";
6
6
  export { NodeCapabilities, Node } from "./akash/inventory/v1/node.ts";
7
7
  export { StorageInfo, Storage } from "./akash/inventory/v1/storage.ts";
8
8
  export { Cluster } from "./akash/inventory/v1/cluster.ts";
9
- export { LeaseServiceStatus, LeaseIPStatus, ForwarderPortStatus, ServiceStatus, SendManifestRequest, SendManifestResponse, ServiceLogsRequest, ServiceLogs, ServiceLogsResponse, ShellRequest, ServiceStatusRequest, ServiceStatusResponse } from "./akash/provider/lease/v1/service.ts";
9
+ export { LeaseServiceStatus, LeaseIPStatus, ForwarderPortStatus, ServiceStatus, SendManifestRequest, SendManifestResponse, ServiceLogsRequest, ServiceLogs, ServiceLogsResponse, ShellRequest, ServiceStatusRequest, ServiceStatusResponse, AttestationQuoteRequest, AttestationGPUReport, AttestationQuoteResponse } from "./akash/provider/lease/v1/service.ts";
10
10
  export { ResourcesMetric, Leases, ReservationsMetric, Reservations, Inventory, ClusterStatus, BidEngineStatus, ManifestStatus, Status } from "./akash/provider/v1/status.ts";
11
11
  export { BidScreeningRequest, BidScreeningResponse } from "./akash/provider/v1/validation.ts";
@@ -1,4 +1,4 @@
1
1
  export { ServiceExposeHTTPOptions } from "./akash/manifest/v2beta3/httpoptions.ts";
2
2
  export { ServiceExpose } from "./akash/manifest/v2beta3/serviceexpose.ts";
3
- export { StorageParams, ServicePermissions, ServiceParams, ImageCredentials, Service } from "./akash/manifest/v2beta3/service.ts";
3
+ export { StorageParams, ServicePermissions, TEEParams, ServiceParams, ImageCredentials, Service } from "./akash/manifest/v2beta3/service.ts";
4
4
  export { Group } from "./akash/manifest/v2beta3/group.ts";
@@ -7,7 +7,7 @@ export type Leases = LeasesFull | LeasesScoped | LeasesGranular;
7
7
  *
8
8
  * @minItems 1
9
9
  */
10
- export type ActionScope = ("send-manifest" | "get-manifest" | "logs" | "shell" | "events" | "status" | "restart" | "hostname-migrate" | "ip-migrate")[];
10
+ export type ActionScope = ("send-manifest" | "get-manifest" | "logs" | "shell" | "events" | "status" | "restart" | "hostname-migrate" | "ip-migrate" | "attestation")[];
11
11
  /**
12
12
  * Provider-level access: 'full' for all actions, 'scoped' for specific actions across all provider leases, 'granular' for deployment-specific actions.
13
13
  */
@@ -17,13 +17,13 @@ export type LeasePermission = LeasePermissionFull | LeasePermissionScoped | Leas
17
17
  *
18
18
  * @minItems 1
19
19
  */
20
- export type ActionScope1 = ("send-manifest" | "get-manifest" | "logs" | "shell" | "events" | "status" | "restart" | "hostname-migrate" | "ip-migrate")[];
20
+ export type ActionScope1 = ("send-manifest" | "get-manifest" | "logs" | "shell" | "events" | "status" | "restart" | "hostname-migrate" | "ip-migrate" | "attestation")[];
21
21
  /**
22
22
  * Deployment-level list of permitted actions (no duplicates).
23
23
  *
24
24
  * @minItems 1
25
25
  */
26
- export type ActionScope2 = ("send-manifest" | "get-manifest" | "logs" | "shell" | "events" | "status" | "restart" | "hostname-migrate" | "ip-migrate")[];
26
+ export type ActionScope2 = ("send-manifest" | "get-manifest" | "logs" | "shell" | "events" | "status" | "restart" | "hostname-migrate" | "ip-migrate" | "attestation")[];
27
27
  /**
28
28
  * JSON Schema for JWT used in the Akash Provider API.
29
29
  */
@@ -157,6 +157,7 @@ export interface SDLInput {
157
157
  permissions?: {
158
158
  read?: ("deployment" | "logs" | "events")[];
159
159
  };
160
+ tee?: "cpu" | "cpu-gpu";
160
161
  };
161
162
  };
162
163
  };
@@ -806,6 +807,10 @@ declare var schema: {
806
807
  };
807
808
  type: string;
808
809
  };
810
+ tee: {
811
+ type: string;
812
+ enum: string[];
813
+ };
809
814
  };
810
815
  type: string;
811
816
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akashnetwork/chain-sdk",
3
- "version": "1.0.0-alpha.34",
3
+ "version": "1.0.0-alpha.36",
4
4
  "type": "module",
5
5
  "description": "Akash API TypeScript client",
6
6
  "keywords": [],