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

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/dist/cjs/generated/protos/akash/provider/v1/status.cjs +18 -2
  2. package/dist/cjs/generated/protos/akash/provider/v1/status.cjs.map +2 -2
  3. package/dist/cjs/sdk/transport/grpc-gateway/createGrpcGatewayTransport.cjs +1 -1
  4. package/dist/cjs/sdk/transport/grpc-gateway/createGrpcGatewayTransport.cjs.map +2 -2
  5. package/dist/cjs/sdl/manifest/generateManifest.cjs +15 -0
  6. package/dist/cjs/sdl/manifest/generateManifest.cjs.map +2 -2
  7. package/dist/cjs/sdl/manifest/reclamationDuration.cjs +34 -0
  8. package/dist/cjs/sdl/manifest/reclamationDuration.cjs.map +7 -0
  9. package/dist/cjs/sdl/validateSDL/validateSDL.cjs +6 -0
  10. package/dist/cjs/sdl/validateSDL/validateSDL.cjs.map +2 -2
  11. package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs +4 -3
  12. package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs.map +2 -2
  13. package/dist/esm/{chunk-J7CMFG4J.js → chunk-2ZDOXCM3.js} +41 -4
  14. package/dist/esm/chunk-2ZDOXCM3.js.map +7 -0
  15. package/dist/esm/{chunk-O2WAGGGG.js → chunk-W25EJ3NI.js} +20 -4
  16. package/dist/esm/chunk-W25EJ3NI.js.map +7 -0
  17. package/dist/esm/generated/protos/index.provider.akash.v1.js +1 -1
  18. package/dist/esm/index.js +2 -2
  19. package/dist/esm/index.web.js +2 -2
  20. package/dist/esm/index.web.js.map +2 -2
  21. package/dist/esm/{service_akash-TF3PEAMD.js → service_akash-5RIOE2CY.js} +2 -2
  22. package/dist/sdl-schema.yaml +3 -3
  23. package/dist/tsconfig.build.tsbuildinfo +1 -1
  24. package/dist/types/generated/protos/akash/provider/v1/status.d.ts +2 -0
  25. package/dist/types/sdl/manifest/generateManifest.d.ts +2 -0
  26. package/dist/types/sdl/manifest/reclamationDuration.d.ts +11 -0
  27. package/dist/types/sdl/validateSDL/validateSDLInput.d.ts +2 -2
  28. package/package.json +1 -1
  29. package/dist/esm/chunk-J7CMFG4J.js.map +0 -7
  30. package/dist/esm/chunk-O2WAGGGG.js.map +0 -7
  31. /package/dist/esm/{service_akash-TF3PEAMD.js.map → service_akash-5RIOE2CY.js.map} +0 -0
@@ -1,6 +1,7 @@
1
1
  import type { MessageFns } from "../../../../../encoding/typeEncodingHelpers.ts";
2
2
  import { Quantity } from "../../../k8s.io/apimachinery/pkg/api/resource/generated.ts";
3
3
  import { Cluster } from "../../inventory/v1/cluster.ts";
4
+ import { ResourcePair } from "../../inventory/v1/resourcepair.ts";
4
5
  /** ResourceMetrics */
5
6
  export interface ResourcesMetric {
6
7
  cpu: Quantity | undefined;
@@ -33,6 +34,7 @@ export interface Reservations {
33
34
  export interface Inventory {
34
35
  cluster: Cluster | undefined;
35
36
  reservations: Reservations | undefined;
37
+ leasedIp: ResourcePair | undefined;
36
38
  }
37
39
  /** ClusterStatus */
38
40
  export interface ClusterStatus {
@@ -1,3 +1,4 @@
1
+ import { DeploymentReclamation } from "../../generated/protos/akash/deployment/v1/deployment.ts";
1
2
  import { GroupSpec } from "../../generated/protos/akash/deployment/v1beta4/groupspec.ts";
2
3
  import { Group } from "../../generated/protos/akash/manifest/v2beta3/group.ts";
3
4
  import type { ValidationError } from "../../utils/jsonSchemaValidation.ts";
@@ -5,6 +6,7 @@ import type { SDLInput } from "../validateSDL/validateSDL.ts";
5
6
  export interface GenerateManifestOkResult {
6
7
  groups: Group[];
7
8
  groupSpecs: GroupSpec[];
9
+ reclamation?: DeploymentReclamation;
8
10
  }
9
11
  export type Manifest = GenerateManifestOkResult["groups"];
10
12
  export type GenerateManifestResult = {
@@ -0,0 +1,11 @@
1
+ import { Duration } from "../../generated/protos/google/protobuf/duration.ts";
2
+ /**
3
+ * Converts a reclamation `min_window` into a proto `Duration`. The SDL schema
4
+ * pattern (`^[1-9][0-9]*(s|m|h)$`) has already guaranteed the format (and `> 0`)
5
+ * before this runs, so on the request hot path we split off the trailing unit
6
+ * and parse the amount directly instead of re-running a regex. The cheap
7
+ * unit/integer/positivity guards stay only to reject obviously-invalid direct
8
+ * calls. Whole-unit windows are an exact second count, so `nanos` is always 0
9
+ * and the BigInt product never loses precision.
10
+ */
11
+ export declare function minWindowToDuration(value: string): Duration;
@@ -165,7 +165,7 @@ export interface SDLInput {
165
165
  */
166
166
  reclamation?: {
167
167
  /**
168
- * Minimum reclamation window duration the tenant requires. Go duration format (e.g. "1h", "24h", "720h").
168
+ * Minimum reclamation window the tenant requires, as a whole number followed by a unit (s, m, or h). E.g. "1h", "24h", "720h".
169
169
  */
170
170
  min_window: string;
171
171
  };
@@ -822,8 +822,8 @@ declare var schema: {
822
822
  properties: {
823
823
  min_window: {
824
824
  type: string;
825
+ pattern: string;
825
826
  description: string;
826
- minLength: number;
827
827
  };
828
828
  };
829
829
  required: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akashnetwork/chain-sdk",
3
- "version": "1.0.0-alpha.32",
3
+ "version": "1.0.0-alpha.34",
4
4
  "type": "module",
5
5
  "description": "Akash API TypeScript client",
6
6
  "keywords": [],