@akashnetwork/chain-sdk 1.0.0-alpha.33 → 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.
- package/dist/cjs/sdk/transport/grpc-gateway/createGrpcGatewayTransport.cjs +1 -1
- package/dist/cjs/sdk/transport/grpc-gateway/createGrpcGatewayTransport.cjs.map +2 -2
- package/dist/cjs/sdl/manifest/generateManifest.cjs +15 -0
- package/dist/cjs/sdl/manifest/generateManifest.cjs.map +2 -2
- package/dist/cjs/sdl/manifest/reclamationDuration.cjs +34 -0
- package/dist/cjs/sdl/manifest/reclamationDuration.cjs.map +7 -0
- package/dist/cjs/sdl/validateSDL/validateSDL.cjs +6 -0
- package/dist/cjs/sdl/validateSDL/validateSDL.cjs.map +2 -2
- package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs +4 -3
- package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs.map +2 -2
- package/dist/esm/{chunk-J7CMFG4J.js → chunk-2ZDOXCM3.js} +41 -4
- package/dist/esm/chunk-2ZDOXCM3.js.map +7 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.web.js +2 -2
- package/dist/esm/index.web.js.map +2 -2
- package/dist/sdl-schema.yaml +3 -3
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/sdl/manifest/generateManifest.d.ts +2 -0
- package/dist/types/sdl/manifest/reclamationDuration.d.ts +11 -0
- package/dist/types/sdl/validateSDL/validateSDLInput.d.ts +2 -2
- package/package.json +1 -1
- package/dist/esm/chunk-J7CMFG4J.js.map +0 -7
|
@@ -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
|
|
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[];
|