@akashnetwork/chain-sdk 1.0.0-alpha.21 → 1.0.0-alpha.23

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 (88) hide show
  1. package/README.md +42 -4
  2. package/dist/cjs/index.shared.cjs +1 -0
  3. package/dist/cjs/index.shared.cjs.map +2 -2
  4. package/dist/cjs/sdl/SDL/SDL.cjs +5 -3
  5. package/dist/cjs/sdl/SDL/SDL.cjs.map +2 -2
  6. package/dist/cjs/sdl/SDL/SdlValidationError.cjs.map +2 -2
  7. package/dist/cjs/sdl/index.cjs +6 -1
  8. package/dist/cjs/sdl/index.cjs.map +2 -2
  9. package/dist/cjs/sdl/manifest/generateManifest.cjs +241 -0
  10. package/dist/cjs/sdl/manifest/generateManifest.cjs.map +7 -0
  11. package/dist/cjs/sdl/manifest/generateManifestVersion.cjs +84 -0
  12. package/dist/cjs/sdl/manifest/generateManifestVersion.cjs.map +7 -0
  13. package/dist/cjs/sdl/manifest/manifestUtils.cjs +138 -0
  14. package/dist/cjs/sdl/manifest/manifestUtils.cjs.map +7 -0
  15. package/dist/cjs/sdl/types.cjs.map +1 -1
  16. package/dist/cjs/sdl/{SDL/utils.cjs.map → utils.cjs.map} +1 -1
  17. package/dist/cjs/sdl/{SDL/validateSDL → validateSDL}/validateSDL.cjs +20 -13
  18. package/dist/cjs/sdl/validateSDL/validateSDL.cjs.map +7 -0
  19. package/dist/cjs/sdl/{SDL/validateSDL → validateSDL}/validateSDLInput.cjs +84 -25
  20. package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs.map +7 -0
  21. package/dist/cjs/utils/yaml.cjs +44 -0
  22. package/dist/cjs/utils/yaml.cjs.map +7 -0
  23. package/dist/esm/chunk-2XL6OX6E.js +1 -0
  24. package/dist/esm/chunk-2XL6OX6E.js.map +7 -0
  25. package/dist/esm/{chunk-K3L3J5XB.js → chunk-4D3QNKFB.js} +3 -3
  26. package/dist/esm/{chunk-DUCGLLTN.js → chunk-5DCYIWCG.js} +100 -100
  27. package/dist/esm/{chunk-DUCGLLTN.js.map → chunk-5DCYIWCG.js.map} +4 -4
  28. package/dist/esm/{chunk-BGBAJIKV.js → chunk-5YECXI3P.js} +2 -2
  29. package/dist/esm/{chunk-MEXNRJE4.js → chunk-BYQF33C6.js} +2 -2
  30. package/dist/esm/{chunk-R5DUC7IU.js → chunk-C7UQYVYH.js} +2 -2
  31. package/dist/esm/{chunk-726NIMPF.js → chunk-JISXXX24.js} +2 -2
  32. package/dist/esm/{chunk-XPLMSDXV.js → chunk-QSKWS3TI.js} +553 -78
  33. package/dist/esm/chunk-QSKWS3TI.js.map +7 -0
  34. package/dist/esm/{chunk-EYW7M3KV.js → chunk-SA4SEZ6F.js} +2 -2
  35. package/dist/esm/{chunk-ST2QQ72E.js → chunk-VRE72ZD5.js} +2 -2
  36. package/dist/esm/{chunk-A5CS5ZKQ.js → chunk-XFCN5LRY.js} +2 -2
  37. package/dist/esm/chunk-Z5KZUB7X.js +364 -0
  38. package/dist/esm/chunk-Z5KZUB7X.js.map +7 -0
  39. package/dist/esm/generated/protos/index.akash.v1.js +6 -6
  40. package/dist/esm/generated/protos/index.akash.v1beta4.js +14 -349
  41. package/dist/esm/generated/protos/index.akash.v1beta4.js.map +4 -4
  42. package/dist/esm/generated/protos/index.akash.v1beta5.js +5 -5
  43. package/dist/esm/generated/protos/index.provider.akash.v1.js +3 -3
  44. package/dist/esm/generated/protos/index.provider.akash.v2beta3.js +3 -2
  45. package/dist/esm/index.js +30 -4
  46. package/dist/esm/index.js.map +1 -1
  47. package/dist/esm/index.web.js +29 -3
  48. package/dist/esm/index.web.js.map +1 -1
  49. package/dist/esm/{query_akash-XTPHUGJZ.js → query_akash-4CTLBKZR.js} +4 -4
  50. package/dist/esm/{query_akash-IXSQT2VJ.js → query_akash-DJ7LTLRE.js} +5 -5
  51. package/dist/esm/{service_akash-YMJ4ZYYX.js → service_akash-AZFAYT7H.js} +4 -4
  52. package/dist/esm/{service_akash-2EBLHFIP.js → service_akash-VMU3LNBA.js} +4 -4
  53. package/dist/esm/{service_akash-AYYJKBHS.js → service_akash-WRGOVR7I.js} +4 -4
  54. package/dist/sdl-schema.yaml +12 -1
  55. package/dist/tsconfig.build.tsbuildinfo +1 -1
  56. package/dist/types/index.shared.d.ts +1 -0
  57. package/dist/types/sdl/SDL/SDL.d.ts +2 -0
  58. package/dist/types/sdl/SDL/SdlValidationError.d.ts +3 -0
  59. package/dist/types/sdl/index.d.ts +5 -2
  60. package/dist/types/sdl/manifest/generateManifest.d.ts +18 -0
  61. package/dist/types/sdl/manifest/generateManifestVersion.d.ts +3 -0
  62. package/dist/types/sdl/manifest/manifestUtils.d.ts +27 -0
  63. package/dist/types/sdl/types.d.ts +60 -0
  64. package/dist/types/sdl/{SDL/validateSDL → validateSDL}/validateSDL.d.ts +2 -2
  65. package/dist/types/sdl/{SDL/validateSDL → validateSDL}/validateSDLInput.d.ts +16 -0
  66. package/dist/types/utils/yaml.d.ts +38 -0
  67. package/package.json +1 -1
  68. package/dist/cjs/sdl/SDL/validateSDL/validateSDL.cjs.map +0 -7
  69. package/dist/cjs/sdl/SDL/validateSDL/validateSDLInput.cjs.map +0 -7
  70. package/dist/cjs/test.cjs +0 -192
  71. package/dist/cjs/test.cjs.map +0 -7
  72. package/dist/esm/chunk-XPLMSDXV.js.map +0 -7
  73. package/dist/types/test.d.ts +0 -1
  74. /package/dist/cjs/sdl/{SDL/utils.cjs → utils.cjs} +0 -0
  75. /package/dist/esm/{chunk-K3L3J5XB.js.map → chunk-4D3QNKFB.js.map} +0 -0
  76. /package/dist/esm/{chunk-BGBAJIKV.js.map → chunk-5YECXI3P.js.map} +0 -0
  77. /package/dist/esm/{chunk-MEXNRJE4.js.map → chunk-BYQF33C6.js.map} +0 -0
  78. /package/dist/esm/{chunk-R5DUC7IU.js.map → chunk-C7UQYVYH.js.map} +0 -0
  79. /package/dist/esm/{chunk-726NIMPF.js.map → chunk-JISXXX24.js.map} +0 -0
  80. /package/dist/esm/{chunk-EYW7M3KV.js.map → chunk-SA4SEZ6F.js.map} +0 -0
  81. /package/dist/esm/{chunk-ST2QQ72E.js.map → chunk-VRE72ZD5.js.map} +0 -0
  82. /package/dist/esm/{chunk-A5CS5ZKQ.js.map → chunk-XFCN5LRY.js.map} +0 -0
  83. /package/dist/esm/{query_akash-XTPHUGJZ.js.map → query_akash-4CTLBKZR.js.map} +0 -0
  84. /package/dist/esm/{query_akash-IXSQT2VJ.js.map → query_akash-DJ7LTLRE.js.map} +0 -0
  85. /package/dist/esm/{service_akash-YMJ4ZYYX.js.map → service_akash-AZFAYT7H.js.map} +0 -0
  86. /package/dist/esm/{service_akash-2EBLHFIP.js.map → service_akash-VMU3LNBA.js.map} +0 -0
  87. /package/dist/esm/{service_akash-AYYJKBHS.js.map → service_akash-WRGOVR7I.js.map} +0 -0
  88. /package/dist/types/sdl/{SDL/utils.d.ts → utils.d.ts} +0 -0
@@ -1,2 +1,3 @@
1
1
  export * from "./sdl/index.ts";
2
2
  export * from "./network/index.ts";
3
+ export * from "./utils/yaml.ts";
@@ -5,6 +5,8 @@ type NetworkVersion = "beta2" | "beta3";
5
5
  * SDL (Stack Definition Language) parser and validator
6
6
  * Handles parsing and validation of Akash deployment manifests
7
7
  *
8
+ * @deprecated Use `generateManifest` instead.
9
+ *
8
10
  * @example
9
11
  * ```ts
10
12
  * import { SDL } from './SDL';
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @deprecated This class is deprecated and will be removed in future versions.
3
+ */
1
4
  export declare class SdlValidationError extends Error {
2
5
  /**
3
6
  * Asserts a condition and throws an `SdlValidationError` if the condition is false.
@@ -23,8 +23,11 @@
23
23
  * ```
24
24
  */
25
25
  export { SDL } from "./SDL/SDL.ts";
26
- export { validateSDL, validationSDLSchema } from "./SDL/validateSDL/validateSDL.ts";
27
- export type { SDLInput } from "./SDL/validateSDL/validateSDLInput.ts";
26
+ export { validateSDL, validationSDLSchema } from "./validateSDL/validateSDL.ts";
27
+ export type { SDLInput } from "./validateSDL/validateSDLInput.ts";
28
28
  export type { ValidationError } from "../utils/jsonSchemaValidation.ts";
29
29
  export * from "./types.ts";
30
30
  export { SdlValidationError } from "./SDL/SdlValidationError.ts";
31
+ export { generateManifest } from "./manifest/generateManifest.ts";
32
+ export type { Manifest, GenerateManifestResult } from "./manifest/generateManifest.ts";
33
+ export { generateManifestVersion, manifestToSortedJSON } from "./manifest/generateManifestVersion.ts";
@@ -0,0 +1,18 @@
1
+ import { GroupSpec } from "../../generated/protos/akash/deployment/v1beta4/groupspec.ts";
2
+ import { Group } from "../../generated/protos/akash/manifest/v2beta3/group.ts";
3
+ import type { NetworkId } from "../../network/types.ts";
4
+ import type { ValidationError } from "../../utils/jsonSchemaValidation.ts";
5
+ import type { SDLInput } from "../validateSDL/validateSDL.ts";
6
+ export interface BuildResult {
7
+ groups: Group[];
8
+ groupSpecs: GroupSpec[];
9
+ }
10
+ export type Manifest = BuildResult["groups"];
11
+ export type GenerateManifestResult = {
12
+ ok?: false;
13
+ value: ValidationError[];
14
+ } | {
15
+ ok: true;
16
+ value: BuildResult;
17
+ };
18
+ export declare function generateManifest(sdl: SDLInput, networkId?: NetworkId): GenerateManifestResult;
@@ -0,0 +1,3 @@
1
+ import type { Manifest } from "./generateManifest.ts";
2
+ export declare function generateManifestVersion(manifest: Manifest): Promise<Uint8Array>;
3
+ export declare function manifestToSortedJSON(manifest: Manifest): string;
@@ -0,0 +1,27 @@
1
+ import type { Attribute } from "../../generated/protos/index.akash.v1.ts";
2
+ import { Endpoint } from "../../generated/protos/index.akash.v1beta4.ts";
3
+ import { ServiceExposeHTTPOptions } from "../../generated/protos/index.provider.akash.v2beta3.ts";
4
+ import type { SDLInput } from "../validateSDL/validateSDL.ts";
5
+ import type { StorageAttributesValidation } from "../validateSDL/validateSDLInput.ts";
6
+ type SDLService = SDLInput["services"][string];
7
+ type SDLExpose = NonNullable<SDLService["expose"]>[number];
8
+ type SDLExposeTo = NonNullable<SDLExpose["to"]>[number];
9
+ type SDLHttpOptions = SDLExpose["http_options"];
10
+ type SDLCompute = SDLInput["profiles"]["compute"][string];
11
+ type SDLStorage = SDLCompute["resources"]["storage"];
12
+ type SDLStorageVolume = SDLStorage extends (infer T)[] ? T : SDLStorage;
13
+ type SDLGpuAttributes = NonNullable<NonNullable<SDLCompute["resources"]["gpu"]>["attributes"]>;
14
+ export type { SDLCompute, SDLExpose, SDLExposeTo, SDLGpuAttributes, SDLHttpOptions, SDLService, SDLStorage, SDLStorageVolume };
15
+ export declare function encodeResourceValue(value: number): Uint8Array;
16
+ export declare function computeEndpointSequenceNumbers(services: SDLInput["services"]): Record<string, number>;
17
+ export declare function isIngress(proto: string, global: boolean, externalPort: number, port: number): boolean;
18
+ export declare function transformGpuAttributes(attributes: SDLGpuAttributes): Attribute[];
19
+ export declare function buildHttpOptions(httpOptions?: SDLHttpOptions): ServiceExposeHTTPOptions;
20
+ export declare function buildStorageAttributes(attributes?: StorageAttributesValidation): Attribute[];
21
+ export declare function parseServiceProto(proto?: string): string;
22
+ export declare function buildServiceEndpoints(service: SDLService, endpointSequenceNumbers: Record<string, number>): Endpoint[];
23
+ export declare function parseCpuUnits(cpu: SDLCompute["resources"]["cpu"]): number;
24
+ export declare function parseMemoryBytes(memory: SDLCompute["resources"]["memory"]): number;
25
+ export declare function parseStorageBytes(size: string): number;
26
+ export declare function parseGpuUnits(gpu?: SDLCompute["resources"]["gpu"]): number;
27
+ export declare function buildResourceAttributes(attributes?: Record<string, unknown>): Attribute[] | undefined;
@@ -1,13 +1,20 @@
1
+ /**
2
+ * @deprecated will be removed in favor of `Manifest` type
3
+ */
1
4
  export type v2Manifest = v2Group[];
5
+ /** @deprecated Use `Manifest` type instead. */
2
6
  export type v3Manifest = v3Group[];
7
+ /** @deprecated Use `Manifest` type instead. */
3
8
  export type v3Group = {
4
9
  name: string;
5
10
  services: v3ManifestService[];
6
11
  };
12
+ /** @deprecated will be removed in favor of `Manifest` type. */
7
13
  export type v2Group = {
8
14
  Name: string;
9
15
  Services: v2ManifestService[];
10
16
  };
17
+ /** @deprecated will be removed in favor of `Manifest` type. */
11
18
  export type v2ManifestService = {
12
19
  Name: string;
13
20
  Image: string;
@@ -19,6 +26,7 @@ export type v2ManifestService = {
19
26
  Expose: v2ServiceExpose[];
20
27
  params?: v2ManifestServiceParams;
21
28
  };
29
+ /** @deprecated Use `Manifest` type instead. */
22
30
  export type v3ManifestService = {
23
31
  name: string;
24
32
  image: string;
@@ -31,6 +39,7 @@ export type v3ManifestService = {
31
39
  params?: v3ManifestServiceParams | null;
32
40
  credentials: v2ServiceImageCredentials | null;
33
41
  };
42
+ /** @deprecated will be removed in favor of `Manifest` type. */
34
43
  export type v2ServiceExposeHttpOptions = {
35
44
  MaxBodySize: number;
36
45
  ReadTimeout: number;
@@ -39,6 +48,7 @@ export type v2ServiceExposeHttpOptions = {
39
48
  NextTimeout: number;
40
49
  NextCases: string[];
41
50
  };
51
+ /** @deprecated Use `Manifest[number]['services'][number]['expose'][number]['httpOptions']` type instead. */
42
52
  export type v3ServiceExposeHttpOptions = {
43
53
  maxBodySize: number;
44
54
  readTimeout: number;
@@ -47,7 +57,9 @@ export type v3ServiceExposeHttpOptions = {
47
57
  nextTimeout: number;
48
58
  nextCases: string[];
49
59
  };
60
+ /** @deprecated will be removed in favor of `Manifest` type. */
50
61
  export type ResourceUnits = Record<string, any>;
62
+ /** @deprecated will be removed in favor of `Manifest` type. */
51
63
  export type v2ServiceExpose = {
52
64
  Port: number;
53
65
  ExternalPort: number;
@@ -59,6 +71,7 @@ export type v2ServiceExpose = {
59
71
  IP: string;
60
72
  EndpointSequenceNumber: number;
61
73
  };
74
+ /** @deprecated Use `Manifest[number]['services'][number]['expose'][number]` type instead. */
62
75
  export type v3ServiceExpose = {
63
76
  port: number;
64
77
  externalPort: number;
@@ -70,33 +83,47 @@ export type v3ServiceExpose = {
70
83
  ip: string;
71
84
  endpointSequenceNumber: number;
72
85
  };
86
+ type v2ServicePermissionsScope = "deployment" | "logs";
87
+ /** @deprecated will be removed in favor of `Manifest` type. */
88
+ export type v2ServicePermissions = {
89
+ read?: v2ServicePermissionsScope[];
90
+ };
91
+ /** @deprecated will be removed in favor of `Manifest` type. */
73
92
  export type v2ManifestServiceParams = {
74
93
  Storage: v2ServiceStorageParams[];
94
+ Permissions?: v2ServicePermissions;
75
95
  };
96
+ /** @deprecated Use `Manifest[number]['services'][number]['params']` type instead. */
76
97
  export type v3ManifestServiceParams = {
77
98
  storage: v2ServiceStorageParams[];
99
+ permissions?: v2ServicePermissions;
78
100
  };
101
+ /** @deprecated will be removed in favor of `Manifest` type */
79
102
  export type v2Sdl = {
80
103
  services: Record<string, v2Service>;
81
104
  profiles: v2Profiles;
82
105
  deployment: Record<string, v2Deployment>;
83
106
  endpoints: Record<string, v2Endpoint>;
84
107
  };
108
+ /** @deprecated Use `SDLInput` type instead. */
85
109
  export type v3Sdl = {
86
110
  services: Record<string, v2Service>;
87
111
  profiles: v3Profiles;
88
112
  deployment: Record<string, v2Deployment>;
89
113
  endpoints: Record<string, v2Endpoint>;
90
114
  };
115
+ /** @deprecated will be removed. */
91
116
  export type v2Endpoint = {
92
117
  kind: string;
93
118
  };
119
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
94
120
  export type v2ExposeTo = {
95
121
  service?: string;
96
122
  global?: boolean;
97
123
  http_options: v2HTTPOptions;
98
124
  ip: string;
99
125
  };
126
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
100
127
  export type v2HTTPOptions = {
101
128
  max_body_size: number;
102
129
  read_timeout: number;
@@ -105,9 +132,11 @@ export type v2HTTPOptions = {
105
132
  next_timeout: number;
106
133
  next_cases: string[];
107
134
  };
135
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
108
136
  export type v2Accept = {
109
137
  items?: string[];
110
138
  };
139
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
111
140
  export type v2Expose = {
112
141
  port: number;
113
142
  as: number;
@@ -116,23 +145,29 @@ export type v2Expose = {
116
145
  accept: v2Accept;
117
146
  http_options: v2HTTPOptions;
118
147
  };
148
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
119
149
  export type v2Dependency = {
120
150
  service: string;
121
151
  };
152
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
122
153
  export type v2ServiceStorageParams = {
123
154
  name: string;
124
155
  mount: string;
125
156
  readOnly: boolean;
126
157
  };
158
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
127
159
  export type v2ServiceParams = {
128
160
  storage?: Record<string, v2ServiceStorageParams>;
161
+ permissions?: v2ServicePermissions;
129
162
  };
163
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
130
164
  export type v2ServiceImageCredentials = {
131
165
  host: string;
132
166
  email?: string;
133
167
  username: string;
134
168
  password: string;
135
169
  };
170
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
136
171
  export type v2Service = {
137
172
  image: string;
138
173
  command: string[] | null;
@@ -143,20 +178,26 @@ export type v2Service = {
143
178
  params?: v2ServiceParams;
144
179
  credentials?: v2ServiceImageCredentials;
145
180
  };
181
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
146
182
  export type v2ServiceDeployment = {
147
183
  profile: string;
148
184
  count: number;
149
185
  };
186
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
150
187
  export type v2Deployment = Record<string, v2ServiceDeployment>;
188
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
151
189
  export type v2CPUAttributes = Record<string, any>;
190
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
152
191
  export type v2ResourceCPU = {
153
192
  units: number | string;
154
193
  attributes?: v2CPUAttributes;
155
194
  };
195
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
156
196
  export type v2ResourceMemory = {
157
197
  size: string;
158
198
  attributes?: Record<string, any>;
159
199
  };
200
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
160
201
  export type v3GPUAttributes = {
161
202
  vendor: {
162
203
  [vendor: string]: Array<{
@@ -166,22 +207,28 @@ export type v3GPUAttributes = {
166
207
  }>;
167
208
  };
168
209
  };
210
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
169
211
  export type v3ResourceGPU = {
170
212
  units: number | string;
171
213
  attributes?: v3GPUAttributes;
172
214
  };
215
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
173
216
  export type v2StorageAttributes = Record<string, any>;
217
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
174
218
  export type v2ResourceStorage = {
175
219
  name: string;
176
220
  size: string;
177
221
  attributes: v2StorageAttributes;
178
222
  };
223
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
179
224
  export type v2ResourceStorageArray = v2ResourceStorage[];
225
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
180
226
  export type v2ComputeResources = {
181
227
  cpu: v2ResourceCPU;
182
228
  memory: v2ResourceMemory;
183
229
  storage: v2ResourceStorageArray | v2ResourceStorage;
184
230
  };
231
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
185
232
  export type v3ComputeResources = {
186
233
  cpu: v2ResourceCPU;
187
234
  memory: v2ResourceMemory;
@@ -189,40 +236,51 @@ export type v3ComputeResources = {
189
236
  gpu: v3ResourceGPU;
190
237
  id: number;
191
238
  };
239
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
192
240
  export type v2ProfileCompute = {
193
241
  resources: v2ComputeResources;
194
242
  };
243
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
195
244
  export type v3ProfileCompute = {
196
245
  resources: v3ComputeResources;
197
246
  };
247
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
198
248
  export type v2PlacementAttributes = Attributes;
249
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
199
250
  export type v2Coin = {
200
251
  denom: string;
201
252
  value: number;
202
253
  amount: number;
203
254
  };
255
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
204
256
  export type v2PlacementPricing = Record<string, v2Coin>;
257
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
205
258
  export type SignedBy = {
206
259
  allOf: string[];
207
260
  anyOf: string[];
208
261
  };
262
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
209
263
  export type v2ProfilePlacement = {
210
264
  attributes: v2PlacementAttributes;
211
265
  signedBy: SignedBy;
212
266
  pricing: v2PlacementPricing;
213
267
  };
268
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
214
269
  export type v2Profiles = {
215
270
  compute: Record<string, v2ProfileCompute>;
216
271
  placement: Record<string, v2ProfilePlacement>;
217
272
  };
273
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
218
274
  export type v3Profiles = {
219
275
  compute: Record<string, v3ProfileCompute>;
220
276
  placement: Record<string, v2ProfilePlacement>;
221
277
  };
278
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
222
279
  export type Attribute = {
223
280
  key: string;
224
281
  value: string;
225
282
  };
283
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
226
284
  export type v3DeploymentGroup = {
227
285
  name: string;
228
286
  resources: Array<{
@@ -242,4 +300,6 @@ export type v3DeploymentGroup = {
242
300
  };
243
301
  };
244
302
  };
303
+ /** @deprecated will be removed in favor of `SDLInput` and `Manifest` types. */
245
304
  export type Attributes = Attribute[];
305
+ export {};
@@ -1,5 +1,5 @@
1
- import { type NetworkId } from "../../../network/index.ts";
2
- import type { ValidationError } from "../../../utils/jsonSchemaValidation.ts";
1
+ import { type NetworkId } from "../../network/index.ts";
2
+ import type { ValidationError } from "../../utils/jsonSchemaValidation.ts";
3
3
  import { schema as validationSDLSchema, type SDLInput } from "./validateSDLInput.ts";
4
4
  export type { SDLInput };
5
5
  export { validationSDLSchema };
@@ -144,6 +144,9 @@ export interface SDLInput {
144
144
  readOnly?: boolean;
145
145
  };
146
146
  };
147
+ permissions?: {
148
+ read?: ("deployment" | "logs")[];
149
+ };
147
150
  };
148
151
  };
149
152
  };
@@ -690,6 +693,19 @@ declare var schema: {
690
693
  };
691
694
  type: string;
692
695
  };
696
+ permissions: {
697
+ additionalProperties: boolean;
698
+ properties: {
699
+ read: {
700
+ items: {
701
+ type: string;
702
+ enum: string[];
703
+ };
704
+ type: string;
705
+ };
706
+ };
707
+ type: string;
708
+ };
693
709
  };
694
710
  type: string;
695
711
  };
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @example
3
+ * ```ts
4
+ * const version = "2.1";
5
+ * const expose = [{ port: 80, as: 80, to: [{ global: true }] }];
6
+ * const pricing = { web: { denom: "uakt", amount: 1000 } };
7
+ *
8
+ * const sdl: SDLInput = yaml`
9
+ * version: ${version}
10
+ * services:
11
+ * web:
12
+ * image: nginx
13
+ * expose: ${expose}
14
+ * profiles:
15
+ * compute:
16
+ * web:
17
+ * resources:
18
+ * cpu:
19
+ * units: 0.5
20
+ * memory:
21
+ * size: 512Mi
22
+ * storage:
23
+ * size: 1Gi
24
+ * placement:
25
+ * dcloud:
26
+ * pricing: ${pricing}
27
+ * deployment:
28
+ * web:
29
+ * dcloud:
30
+ * profile: web
31
+ * count: 1
32
+ * `;
33
+ * ```
34
+ */
35
+ export declare function yaml<T>(chunks: TemplateStringsArray, ...args: unknown[]): T;
36
+ export declare namespace yaml {
37
+ var template: <T>(template: string, vars?: Record<string, unknown>) => T;
38
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akashnetwork/chain-sdk",
3
- "version": "1.0.0-alpha.21",
3
+ "version": "1.0.0-alpha.23",
4
4
  "type": "module",
5
5
  "description": "Akash API TypeScript client",
6
6
  "keywords": [],
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/sdl/SDL/validateSDL/validateSDL.ts"],
4
- "sourcesContent": ["import { AKT_DENOM, type NetworkId, USDC_IBC_DENOMS } from \"../../../network/index.ts\";\nimport type { ErrorMessages, ValidationError, ValidationFunction } from \"../../../utils/jsonSchemaValidation.ts\";\nimport { dirname, getErrorLocation, humanizeErrors } from \"../../../utils/jsonSchemaValidation.ts\";\nimport { castArray, stringToBoolean } from \"../utils.ts\";\nimport { schema as validationSDLSchema, type SDLInput, validate as validateSDLInput } from \"./validateSDLInput.ts\";\n\nexport type { SDLInput };\nexport { validationSDLSchema };\n\nconst ERROR_MESSAGES: ErrorMessages = {\n \"#/definitions/storageAttributesValidation\"(error) {\n return `\"ram\" storage${getErrorLocation(dirname(error.instancePath))} cannot be persistent`;\n },\n \"#/definitions/exposeToWithIpEnforcesGlobal/then/properties/global/const\"() {\n return `If an IP is declared, the directive must be declared as global.`;\n },\n};\n\nexport function validateSDL(sdl: SDLInput, networkId: NetworkId): undefined | ValidationError[] {\n validateSDLInput(sdl);\n const schemaErrors = humanizeErrors((validateSDLInput as ValidationFunction).errors, validationSDLSchema, ERROR_MESSAGES);\n if (schemaErrors.length) return schemaErrors;\n\n const validator = new SDLValidator(sdl);\n const errors = validator.validate(networkId);\n\n const allErrors = schemaErrors.concat(errors);\n return allErrors.length ? allErrors : undefined;\n}\n\nclass SDLValidator {\n readonly #endpointsUsed = new Set<string>();\n readonly #portsUsed = new Map<string, string>();\n readonly #sdl: SDLInput;\n readonly #errors: ValidationError[] = [];\n\n constructor(sdl: SDLInput) {\n this.#sdl = sdl;\n }\n\n validate(networkId: NetworkId) {\n if (this.#sdl.services) {\n Object.keys(this.#sdl.services).forEach((serviceName) => {\n this.#validateDeploymentWithRelations(serviceName);\n this.#validateLeaseIP(serviceName);\n });\n }\n\n this.#validateDenom(networkId);\n this.#validateEndpoints();\n return this.#errors;\n }\n\n #validateDenom(networkId: NetworkId) {\n if (!this.#sdl.profiles?.placement) return;\n\n const usdcDenom = USDC_IBC_DENOMS[networkId];\n const denoms = Object.entries(this.#sdl.profiles.placement).map(([placementName, placement]) => {\n if (!placement.pricing) return [];\n return Object.entries(placement.pricing).map(([profile, pricing]) => ({\n path: `/profiles/placement/${placementName}/pricing/${profile}/denom`,\n denom: pricing.denom,\n }));\n }).flat();\n const invalidDenom = denoms.find(({ denom }) => denom !== AKT_DENOM && denom !== usdcDenom);\n if (invalidDenom) {\n this.#errors.push({\n message: `Invalid denom: \"${invalidDenom.denom}\" at path \"${invalidDenom.path}\". Only \"uakt\" and \"${usdcDenom}\" are supported.`,\n instancePath: invalidDenom.path,\n schemaPath: \"#/definitions/priceCoin/properties/denom\",\n keyword: \"pattern\",\n params: {\n pattern: \"^(uakt|ibc/.*)$\",\n },\n });\n }\n }\n\n #validateDeploymentWithRelations(serviceName: string) {\n const deployment = this.#sdl.deployment[serviceName];\n if (!deployment) {\n this.#errors.push({\n message: `Service \"${serviceName}\" is not defined at \"/deployment\" section.`,\n instancePath: `/deployment`,\n schemaPath: \"#/properties/deployment\",\n keyword: \"required\",\n params: {\n missingProperty: serviceName,\n },\n });\n return;\n }\n\n Object.keys(this.#sdl.deployment[serviceName]).forEach((deploymentName) => {\n this.#validateDeploymentRelations(serviceName, deploymentName);\n this.#validateServiceStorages(serviceName, deploymentName);\n this.#validateStorages(serviceName, deploymentName);\n this.#validateGPU(serviceName, deploymentName);\n });\n }\n\n #validateDeploymentRelations(serviceName: string, deploymentName: string) {\n const serviceDeployment = this.#sdl.deployment?.[serviceName]?.[deploymentName];\n const compute = this.#sdl.profiles?.compute?.[serviceDeployment?.profile];\n const infra = this.#sdl.profiles?.placement?.[deploymentName];\n\n if (!infra) {\n this.#errors.push({\n message: `The placement \"${deploymentName}\" is not defined in the \"placement\" section.`,\n instancePath: `/profiles/placement`,\n schemaPath: \"#/properties/profiles/properties/placement\",\n keyword: \"required\",\n params: {\n missingProperty: deploymentName,\n },\n });\n }\n\n if (infra && !infra.pricing?.[serviceDeployment?.profile]) {\n this.#errors.push({\n message: `The pricing for the \"${serviceDeployment?.profile}\" profile is not defined in the \"${deploymentName}\" placement.`,\n instancePath: `/profiles/placement/${deploymentName}/pricing`,\n schemaPath: \"#/properties/profiles/properties/placement/additionalProperties/properties/pricing\",\n keyword: \"required\",\n params: {\n missingProperty: serviceDeployment?.profile,\n },\n });\n }\n\n if (!compute) {\n this.#errors.push({\n message: `The compute requirements for the \"${serviceDeployment?.profile}\" profile are not defined in the \"compute\" section.`,\n instancePath: `/profiles/compute`,\n schemaPath: \"#/properties/profiles/properties/compute\",\n keyword: \"required\",\n params: {\n missingProperty: serviceDeployment?.profile,\n },\n });\n }\n }\n\n #validateServiceStorages(serviceName: string, deploymentName: string) {\n const service = this.#sdl.services?.[serviceName];\n const mounts: Record<string, string> = {};\n const serviceDeployment = this.#sdl.deployment[serviceName][deploymentName];\n const compute = this.#sdl.profiles?.compute?.[serviceDeployment.profile];\n const storages = castArray(compute?.resources.storage);\n\n if (!service?.params?.storage) {\n return;\n }\n\n Object.entries(service.params.storage).forEach(([storageName, storage]) => {\n if (!storage) {\n this.#errors.push({\n message: `Storage \"${storageName}\" is not configured.`,\n instancePath: `/services/${serviceName}/params/storage/${storageName}`,\n schemaPath: \"#/properties/services/additionalProperties/properties/params/properties/storage/additionalProperties\",\n keyword: \"required\",\n params: {\n missingProperty: storageName,\n },\n });\n return;\n }\n const storageNameExists = storages.some(({ name }) => name === storageName);\n if (!storageNameExists) {\n this.#errors.push({\n message: `Service \"${serviceName}\" references non-existing compute volume \"${storageName}\".`,\n instancePath: `/profiles/compute/${serviceDeployment.profile}/resources/storage`,\n schemaPath: \"#/properties/profiles/properties/compute/additionalProperties/properties/resources/properties/storage\",\n keyword: \"required\",\n params: {\n missingProperty: storageName,\n },\n });\n return;\n }\n\n const mount = String(storage.mount);\n const volumeName = mounts[mount];\n\n if (volumeName && !storage.mount) {\n this.#errors.push({\n message: \"Multiple root ephemeral storages are not allowed.\",\n instancePath: `/services/${serviceName}/params/storage/${storageName}`,\n schemaPath: \"#/properties/services/additionalProperties/properties/params/properties/storage\",\n keyword: \"uniqueItems\",\n params: {\n duplicate: volumeName,\n },\n });\n }\n if (volumeName && storage.mount) {\n this.#errors.push({\n message: `Mount \"${mount}\" already in use by volume \"${volumeName}\".`,\n instancePath: `/services/${serviceName}/params/storage/${storageName}/mount`,\n schemaPath: \"#/properties/services/additionalProperties/properties/params/properties/storage/additionalProperties/properties/mount\",\n keyword: \"uniqueItems\",\n params: {\n duplicate: mount,\n },\n });\n }\n\n mounts[mount] = storageName;\n });\n }\n\n #validateStorages(serviceName: string, deploymentName: string) {\n const service = this.#sdl.services?.[serviceName];\n const serviceDeployment = this.#sdl.deployment[serviceName][deploymentName];\n const compute = this.#sdl.profiles?.compute?.[serviceDeployment.profile];\n const storages = castArray(compute?.resources.storage);\n\n storages.forEach((storage) => {\n const persistent = stringToBoolean(storage.attributes?.persistent as string | boolean || false);\n\n if (persistent && !service?.params?.storage?.[storage.name || \"\"]?.mount) {\n this.#errors.push({\n message: `Persistent storage \"${storage.name || \"default\"}\" requires a mount path in /services/${serviceName}/params/storage/${storage.name || \"default\"}/mount.`,\n instancePath: `/services/${serviceName}/params/storage/${storage.name || \"default\"}`,\n schemaPath: \"#/properties/services/additionalProperties/properties/params/properties/storage/additionalProperties/properties/mount\",\n keyword: \"required\",\n params: {\n missingProperty: \"mount\",\n },\n });\n }\n });\n }\n\n #validateGPU(serviceName: string, deploymentName: string) {\n const deployment = this.#sdl.deployment[serviceName];\n const compute = this.#sdl.profiles?.compute?.[deployment[deploymentName]?.profile];\n const gpu = compute?.resources.gpu;\n if (!gpu) return;\n\n const hasUnits = gpu.units !== undefined && gpu.units !== 0;\n const hasAttributes = typeof gpu.attributes !== \"undefined\";\n const hasVendor = hasAttributes && typeof gpu.attributes?.vendor !== \"undefined\";\n\n const profile = deployment[deploymentName]?.profile;\n const gpuPath = `/profiles/compute/${profile}/resources/gpu`;\n\n if (!hasUnits && hasAttributes) {\n this.#errors.push({\n message: \"GPU must not have attributes if units is 0.\",\n instancePath: `${gpuPath}/attributes`,\n schemaPath: \"#/properties/profiles/properties/compute/additionalProperties/properties/resources/properties/gpu/properties/attributes\",\n keyword: \"additionalProperties\",\n params: {\n additionalProperty: \"attributes\",\n },\n });\n }\n if (hasUnits && !hasAttributes) {\n this.#errors.push({\n message: \"GPU must have attributes if units is not 0.\",\n instancePath: gpuPath,\n schemaPath: \"#/properties/profiles/properties/compute/additionalProperties/properties/resources/properties/gpu\",\n keyword: \"required\",\n params: {\n missingProperty: \"attributes\",\n },\n });\n }\n if (hasUnits && !hasVendor) {\n this.#errors.push({\n message: \"GPU must specify a vendor if units is not 0.\",\n instancePath: `${gpuPath}/attributes`,\n schemaPath: \"#/properties/profiles/properties/compute/additionalProperties/properties/resources/properties/gpu/properties/attributes/properties/vendor\",\n keyword: \"required\",\n params: {\n missingProperty: \"vendor\",\n },\n });\n }\n }\n\n #validateLeaseIP(serviceName: string) {\n this.#sdl.services?.[serviceName]?.expose?.forEach((expose, exposeIndex) => {\n const proto = expose.proto?.toUpperCase() || \"TCP\";\n\n expose.to?.forEach((to, toIndex) => {\n if (to.ip?.length) {\n const toPath = `/services/${serviceName}/expose/${exposeIndex}/to/${toIndex}`;\n\n if (!to.global) {\n this.#errors.push({\n message: `If an IP is declared, the directive must be declared as global.`,\n instancePath: `${toPath}/global`,\n schemaPath: \"#/definitions/exposeToWithIpEnforcesGlobal/then/properties/global/const\",\n keyword: \"const\",\n params: {\n allowedValue: true,\n },\n });\n }\n if (!this.#sdl.endpoints?.[to.ip]) {\n this.#errors.push({\n message: `Unknown endpoint \"${to.ip}\" for service \"${serviceName}\". Add it to the \"endpoints\" section.`,\n instancePath: `/endpoints/${to.ip}`,\n schemaPath: \"#/properties/endpoints\",\n keyword: \"required\",\n params: {\n missingProperty: to.ip,\n },\n });\n }\n\n this.#endpointsUsed.add(to.ip);\n\n const externalPort = expose.as ?? expose.port;\n const portKey = `${to.ip}-${externalPort}-${proto}`;\n const otherServiceName = this.#portsUsed.get(portKey);\n\n if (this.#portsUsed.has(portKey)) {\n this.#errors.push({\n message: `IP endpoint \"${to.ip}\" port ${externalPort} protocol ${proto} already in use by service \"${otherServiceName}\".`,\n instancePath: `${toPath}/ip`,\n schemaPath: \"#/properties/services/additionalProperties/properties/expose/items/properties/to/items\",\n keyword: \"uniqueItems\",\n params: {\n duplicate: portKey,\n },\n });\n }\n this.#portsUsed.set(portKey, serviceName);\n }\n });\n });\n }\n\n #validateEndpoints() {\n if (!this.#sdl.endpoints) return;\n\n Object.keys(this.#sdl.endpoints).forEach((endpoint) => {\n if (!this.#endpointsUsed.has(endpoint)) {\n this.#errors.push({\n message: `Endpoint \"${endpoint}\" declared but never used.`,\n instancePath: `/endpoints/${endpoint}`,\n schemaPath: \"#/properties/endpoints\",\n keyword: \"additionalProperties\",\n params: {\n additionalProperty: endpoint,\n },\n });\n }\n });\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,qDAAAA;AAAA;AAAA;AAAA,qBAA2D;AAE3D,kCAA0D;AAC1D,mBAA2C;AAC3C,8BAA2F;AAJ3F;AASA,MAAM,iBAAgC;AAAA,EACpC,4CAA4C,OAAO;AACjD,WAAO,oBAAgB,kDAAiB,qCAAQ,MAAM,YAAY,CAAC,CAAC;AAAA,EACtE;AAAA,EACA,4EAA4E;AAC1E,WAAO;AAAA,EACT;AACF;AAEO,SAAS,YAAY,KAAe,WAAqD;AAC9F,8BAAAC,UAAiB,GAAG;AACpB,QAAM,mBAAe,4CAAgB,wBAAAA,SAAwC,QAAQ,wBAAAC,QAAqB,cAAc;AACxH,MAAI,aAAa,OAAQ,QAAO;AAEhC,QAAM,YAAY,IAAI,aAAa,GAAG;AACtC,QAAM,SAAS,UAAU,SAAS,SAAS;AAE3C,QAAM,YAAY,aAAa,OAAO,MAAM;AAC5C,SAAO,UAAU,SAAS,YAAY;AACxC;AAEA,MAAM,aAAa;AAAA,EAMjB,YAAY,KAAe;AAN7B;AACE,uBAAS,gBAAiB,oBAAI,IAAY;AAC1C,uBAAS,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