@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.
- package/dist/cjs/generated/createProviderSDK.cjs +10 -1
- package/dist/cjs/generated/createProviderSDK.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/manifest/v2beta3/service.cjs +85 -3
- package/dist/cjs/generated/protos/akash/manifest/v2beta3/service.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/provider/lease/v1/service.cjs +276 -0
- package/dist/cjs/generated/protos/akash/provider/lease/v1/service.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/provider/lease/v1/service_akash.cjs +10 -0
- package/dist/cjs/generated/protos/akash/provider/lease/v1/service_akash.cjs.map +2 -2
- package/dist/cjs/generated/protos/akash/provider/v1/status.cjs +19 -2
- package/dist/cjs/generated/protos/akash/provider/v1/status.cjs.map +2 -2
- package/dist/cjs/generated/protos/index.provider.akash.v1.cjs +3 -0
- package/dist/cjs/generated/protos/index.provider.akash.v1.cjs.map +2 -2
- package/dist/cjs/generated/protos/index.provider.akash.v2beta3.cjs +2 -1
- package/dist/cjs/generated/protos/index.provider.akash.v2beta3.cjs.map +2 -2
- package/dist/cjs/sdk/provider/auth/jwt/validateJwtPayload.cjs +5 -5
- package/dist/cjs/sdk/provider/auth/jwt/validateJwtPayload.cjs.map +2 -2
- package/dist/cjs/sdl/manifest/generateManifest.cjs +3 -0
- package/dist/cjs/sdl/manifest/generateManifest.cjs.map +2 -2
- package/dist/cjs/sdl/manifest/generateManifestVersion.cjs +1 -1
- package/dist/cjs/sdl/manifest/generateManifestVersion.cjs.map +2 -2
- package/dist/cjs/sdl/validateSDL/validateSDL.cjs +24 -1
- package/dist/cjs/sdl/validateSDL/validateSDL.cjs.map +2 -2
- package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs +67 -46
- package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs.map +2 -2
- package/dist/esm/{chunk-W25EJ3NI.js → chunk-MLIW7FIZ.js} +22 -3
- package/dist/esm/chunk-MLIW7FIZ.js.map +7 -0
- package/dist/esm/{chunk-2ZDOXCM3.js → chunk-P2FARPRM.js} +104 -56
- package/dist/esm/chunk-P2FARPRM.js.map +7 -0
- package/dist/esm/{chunk-HBXYMZWF.js → chunk-SQUBF6EZ.js} +279 -3
- package/dist/esm/chunk-SQUBF6EZ.js.map +7 -0
- package/dist/esm/{chunk-COR2HJ6D.js → chunk-UZXCPKLQ.js} +85 -3
- package/dist/esm/chunk-UZXCPKLQ.js.map +7 -0
- package/dist/esm/generated/protos/index.provider.akash.v1.js +9 -3
- package/dist/esm/generated/protos/index.provider.akash.v2beta3.js +5 -3
- package/dist/esm/index.js +14 -5
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/index.web.js +2 -2
- package/dist/esm/{service_akash-AAROYIZB.js → service_akash-BILCZWQI.js} +15 -3
- package/dist/esm/service_akash-BILCZWQI.js.map +7 -0
- package/dist/esm/{service_akash-5RIOE2CY.js → service_akash-LXXUUD6O.js} +3 -2
- package/dist/esm/{service_akash-5RIOE2CY.js.map → service_akash-LXXUUD6O.js.map} +1 -1
- package/dist/sdl-schema.yaml +5 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/generated/createProviderSDK.d.ts +14 -0
- package/dist/types/generated/protos/akash/manifest/v2beta3/service.d.ts +19 -0
- package/dist/types/generated/protos/akash/provider/lease/v1/service.d.ts +43 -0
- package/dist/types/generated/protos/akash/provider/lease/v1/service_akash.d.ts +9 -1
- package/dist/types/generated/protos/akash/provider/v1/status.d.ts +2 -0
- package/dist/types/generated/protos/index.provider.akash.v1.d.ts +1 -1
- package/dist/types/generated/protos/index.provider.akash.v2beta3.d.ts +1 -1
- package/dist/types/sdk/provider/auth/jwt/validateJwtPayload.d.ts +3 -3
- package/dist/types/sdl/validateSDL/validateSDLInput.d.ts +5 -0
- package/package.json +1 -1
- package/dist/esm/chunk-2ZDOXCM3.js.map +0 -7
- package/dist/esm/chunk-COR2HJ6D.js.map +0 -7
- package/dist/esm/chunk-HBXYMZWF.js.map +0 -7
- package/dist/esm/chunk-W25EJ3NI.js.map +0 -7
- package/dist/esm/service_akash-AAROYIZB.js.map +0 -7
|
@@ -5,8 +5,9 @@ import {
|
|
|
5
5
|
ServiceExpose,
|
|
6
6
|
ServiceExposeHTTPOptions,
|
|
7
7
|
ServiceParams,
|
|
8
|
-
StorageParams
|
|
9
|
-
|
|
8
|
+
StorageParams,
|
|
9
|
+
TEEParams
|
|
10
|
+
} from "./chunk-UZXCPKLQ.js";
|
|
10
11
|
import {
|
|
11
12
|
TxRaw
|
|
12
13
|
} from "./chunk-5KC6YYIY.js";
|
|
@@ -70,7 +71,7 @@ var require_ucs2length = __commonJS({
|
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
73
|
var validate = validate27;
|
|
73
|
-
var schema28 = { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "description": "Schema for Akash Stack Definition Language (SDL) YAML input files.\n\nNote: This schema validates structure only. Semantic validations (cross-references,\nunused endpoints, profile references, etc.) are performed at runtime by the Go parser.\nSee README.md for details.\n", "definitions": { "stringArrayOrNull": { "description": "String array or null value (used for command args and env vars)", "oneOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }] }, "portNumber": { "description": "Valid TCP/UDP port number (1-65535)", "type": "integer", "minimum": 1, "maximum": 65535 }, "httpErrorCode": { "description": "HTTP error codes for proxy retry logic", "enum": ["error", "timeout", "500", "502", "503", "504", "403", "404", "429", "off"], "type": "string" }, "priceCoin": { "description": "Price definition with amount and denomination", "additionalProperties": false, "properties": { "amount": { "oneOf": [{ "type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "Positive number as string" }, { "type": "number", "minimum": 0, "description": "Positive number" }] }, "denom": { "enum": ["uakt", "uact"], "type": "string" } }, "required": ["denom", "amount"], "type": "object" }, "storageRamClassMustNotBePersistent": { "description": "RAM storage class must not have persistent=true", "not": { "properties": { "class": { "const": "ram" }, "persistent": { "oneOf": [{ "const": true }, { "const": "true" }] } }, "required": ["class", "persistent"] } }, "storageNonRamClassRequiresPersistent": { "description": "Non-RAM storage classes (beta1, beta2, beta3, default) require persistent=true", "if": { "properties": { "class": { "enum": ["beta1", "beta2", "beta3", "default"] } }, "required": ["class"] }, "then": { "properties": { "persistent": { "oneOf": [{ "const": true }, { "const": "true" }] } }, "required": ["persistent"] } }, "storageAttributesValidation": { "description": "Storage attributes validation:\n1. RAM class must not be persistent\n2. Non-RAM classes (beta1, beta2, beta3, default) require persistent=true\n", "additionalProperties": false, "properties": { "class": { "type": "string" }, "persistent": { "oneOf": [{ "type": "boolean" }, { "type": "string" }] } }, "allOf": [{ "$ref": "#/definitions/storageRamClassMustNotBePersistent" }, { "$ref": "#/definitions/storageNonRamClassRequiresPersistent" }], "required": ["class", "persistent"], "type": "object" }, "storageVolume": { "description": "Storage volume definition with size and optional attributes", "additionalProperties": false, "properties": { "attributes": { "$ref": "#/definitions/storageAttributesValidation" }, "name": { "type": "string" }, "size": { "type": "string" } }, "required": ["size"], "type": "object" }, "absolutePath": { "description": "Absolute filesystem path starting with /", "type": "string", "minLength": 1, "pattern": "^/" }, "gpuUnitsGt0RequiresAttributes": { "description": "GPU units > 0 requires attributes to be present", "if": { "properties": { "units": { "oneOf": [{ "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "not": { "pattern": "^0+(\\.0+)?$" } }] } }, "required": ["units"] }, "then": { "required": ["attributes"] } }, "gpuAttributesRequireUnitsGt0": { "description": "GPU attributes present requires units > 0", "if": { "required": ["attributes"] }, "then": { "properties": { "units": { "oneOf": [{ "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "not": { "pattern": "^0+(\\.0+)?$" } }] } }, "required": ["units"] } }, "exposeToWithIpEnforcesGlobal": { "description": "Expose to with IP enforces global", "if": { "properties": { "ip": { "type": "string", "minLength": 1 } }, "required": ["ip"] }, "then": { "properties": { "global": { "const": true } }, "required": ["global"] } } }, "properties": { "deployment": { "additionalProperties": { "additionalProperties": { "additionalProperties": false, "properties": { "count": { "minimum": 1, "type": "integer" }, "profile": { "type": "string" } }, "required": ["profile", "count"], "type": "object" }, "type": "object" }, "type": "object" }, "endpoints": { "additionalProperties": false, "patternProperties": { "^[a-z]+[-_0-9a-z]+$": { "additionalProperties": false, "properties": { "kind": { "enum": ["ip"], "type": "string" } }, "required": ["kind"], "type": "object" } }, "type": "object" }, "include": { "description": "Optional list of files to include", "items": { "type": "string" }, "type": "array" }, "profiles": { "additionalProperties": false, "properties": { "compute": { "additionalProperties": { "additionalProperties": false, "properties": { "resources": { "additionalProperties": false, "properties": { "cpu": { "additionalProperties": false, "properties": { "attributes": { "type": "object" }, "units": { "oneOf": [{ "type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?[a-zA-Z]*$", "not": { "pattern": "^0+(\\.0+)?m?$" } }, { "type": "number", "exclusiveMinimum": 0 }] } }, "required": ["units"], "type": "object" }, "gpu": { "description": "GPU resource specification.\n- units defaults to 0 if omitted\n- Bidirectional validation: units > 0 requires attributes, and attributes require units > 0\n", "additionalProperties": false, "properties": { "attributes": { "additionalProperties": false, "properties": { "vendor": { "additionalProperties": false, "minProperties": 1, "properties": { "nvidia": { "oneOf": [{ "type": "array", "items": { "additionalProperties": false, "properties": { "interface": { "enum": ["pcie", "sxm"], "type": "string" }, "model": { "type": "string" }, "ram": { "type": "string" } }, "type": "object" } }, { "type": "null" }] } }, "type": "object" } }, "type": "object" }, "units": { "oneOf": [{ "type": "string" }, { "type": "number" }] } }, "allOf": [{ "$ref": "#/definitions/gpuUnitsGt0RequiresAttributes" }, { "$ref": "#/definitions/gpuAttributesRequireUnitsGt0" }], "type": "object" }, "memory": { "additionalProperties": false, "properties": { "size": { "type": "string" } }, "required": ["size"], "type": "object" }, "storage": { "oneOf": [{ "$ref": "#/definitions/storageVolume" }, { "items": { "$ref": "#/definitions/storageVolume" }, "type": "array" }] } }, "required": ["cpu", "memory", "storage"], "type": "object" } }, "required": ["resources"], "type": "object" }, "type": "object" }, "placement": { "additionalProperties": { "additionalProperties": false, "properties": { "attributes": { "type": "object" }, "pricing": { "additionalProperties": { "$ref": "#/definitions/priceCoin" }, "type": "object" }, "signedBy": { "additionalProperties": false, "properties": { "allOf": { "items": { "type": "string" }, "type": "array" }, "anyOf": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "required": ["pricing"], "type": "object" }, "type": "object" } }, "required": ["compute", "placement"], "type": "object" }, "services": { "additionalProperties": { "properties": { "args": { "$ref": "#/definitions/stringArrayOrNull" }, "command": { "$ref": "#/definitions/stringArrayOrNull" }, "credentials": { "additionalProperties": false, "properties": { "email": { "type": "string", "minLength": 5 }, "host": { "type": "string", "minLength": 1 }, "password": { "type": "string", "minLength": 6 }, "username": { "type": "string", "minLength": 1 } }, "required": ["host", "username", "password"], "type": "object" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "service": { "type": "string" } }, "type": "object" }, "type": "array" }, "env": { "$ref": "#/definitions/stringArrayOrNull" }, "expose": { "oneOf": [{ "type": "array", "items": { "additionalProperties": false, "properties": { "accept": { "items": { "type": "string" }, "type": "array" }, "as": { "$ref": "#/definitions/portNumber" }, "http_options": { "additionalProperties": false, "properties": { "max_body_size": { "type": "integer", "minimum": 0, "maximum": 104857600, "description": "Maximum body size in bytes (max 100 MB)" }, "next_cases": { "oneOf": [{ "type": "array", "items": { "$ref": "#/definitions/httpErrorCode" }, "contains": { "const": "off" }, "maxItems": 1, "minItems": 1 }, { "type": "array", "items": { "$ref": "#/definitions/httpErrorCode" }, "not": { "contains": { "const": "off" } } }] }, "next_timeout": { "type": "integer", "minimum": 0 }, "next_tries": { "type": "integer", "minimum": 0 }, "read_timeout": { "type": "integer", "minimum": 0, "maximum": 6e4, "description": "Read timeout in milliseconds (max 60 seconds)" }, "send_timeout": { "type": "integer", "minimum": 0, "maximum": 6e4, "description": "Send timeout in milliseconds (max 60 seconds)" } }, "type": "object" }, "port": { "$ref": "#/definitions/portNumber" }, "proto": { "enum": ["TCP", "UDP", "tcp", "udp"], "type": "string" }, "to": { "items": { "additionalProperties": false, "properties": { "global": { "type": "boolean" }, "ip": { "minLength": 1, "type": "string" }, "service": { "type": "string" } }, "allOf": [{ "$ref": "#/definitions/exposeToWithIpEnforcesGlobal" }], "type": "object" }, "type": "array" } }, "required": ["port"], "type": "object" } }, { "type": "null" }] }, "image": { "type": "string", "minLength": 1 }, "params": { "additionalProperties": false, "properties": { "storage": { "additionalProperties": { "additionalProperties": false, "properties": { "mount": { "$ref": "#/definitions/absolutePath" }, "readOnly": { "type": "boolean" } }, "type": "object" }, "type": "object" }, "permissions": { "additionalProperties": false, "properties": { "read": { "items": { "type": "string", "enum": ["deployment", "logs", "events"] }, "type": "array" } }, "type": "object" } }, "type": "object" } }, "required": ["image"], "type": "object", "additionalProperties": false }, "type": "object" }, "reclamation": { "description": "Deployment-level reclamation requirements (optional). When set, providers must offer a reclamation window meeting or exceeding the specified minimum to bid on this deployment.", "additionalProperties": false, "properties": { "min_window": { "type": "string", "pattern": "^[1-9][0-9]*(s|m|h)$", "description": 'Minimum reclamation window the tenant requires, as a whole number followed by a unit (s, m, or h). E.g. "1h", "24h", "720h".' } }, "required": ["min_window"], "type": "object" }, "version": { "description": "SDL version", "enum": ["2.0", "2.1"], "type": "string" } }, "required": ["version", "services", "profiles", "deployment"], "title": "Akash SDL Input Schema", "type": "object" };
|
|
74
|
+
var schema28 = { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "description": "Schema for Akash Stack Definition Language (SDL) YAML input files.\n\nNote: This schema validates structure only. Semantic validations (cross-references,\nunused endpoints, profile references, etc.) are performed at runtime by the Go parser.\nSee README.md for details.\n", "definitions": { "stringArrayOrNull": { "description": "String array or null value (used for command args and env vars)", "oneOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }] }, "portNumber": { "description": "Valid TCP/UDP port number (1-65535)", "type": "integer", "minimum": 1, "maximum": 65535 }, "httpErrorCode": { "description": "HTTP error codes for proxy retry logic", "enum": ["error", "timeout", "500", "502", "503", "504", "403", "404", "429", "off"], "type": "string" }, "priceCoin": { "description": "Price definition with amount and denomination", "additionalProperties": false, "properties": { "amount": { "oneOf": [{ "type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "Positive number as string" }, { "type": "number", "minimum": 0, "description": "Positive number" }] }, "denom": { "enum": ["uakt", "uact"], "type": "string" } }, "required": ["denom", "amount"], "type": "object" }, "storageRamClassMustNotBePersistent": { "description": "RAM storage class must not have persistent=true", "not": { "properties": { "class": { "const": "ram" }, "persistent": { "oneOf": [{ "const": true }, { "const": "true" }] } }, "required": ["class", "persistent"] } }, "storageNonRamClassRequiresPersistent": { "description": "Non-RAM storage classes (beta1, beta2, beta3, default) require persistent=true", "if": { "properties": { "class": { "enum": ["beta1", "beta2", "beta3", "default"] } }, "required": ["class"] }, "then": { "properties": { "persistent": { "oneOf": [{ "const": true }, { "const": "true" }] } }, "required": ["persistent"] } }, "storageAttributesValidation": { "description": "Storage attributes validation:\n1. RAM class must not be persistent\n2. Non-RAM classes (beta1, beta2, beta3, default) require persistent=true\n", "additionalProperties": false, "properties": { "class": { "type": "string" }, "persistent": { "oneOf": [{ "type": "boolean" }, { "type": "string" }] } }, "allOf": [{ "$ref": "#/definitions/storageRamClassMustNotBePersistent" }, { "$ref": "#/definitions/storageNonRamClassRequiresPersistent" }], "required": ["class", "persistent"], "type": "object" }, "storageVolume": { "description": "Storage volume definition with size and optional attributes", "additionalProperties": false, "properties": { "attributes": { "$ref": "#/definitions/storageAttributesValidation" }, "name": { "type": "string" }, "size": { "type": "string" } }, "required": ["size"], "type": "object" }, "absolutePath": { "description": "Absolute filesystem path starting with /", "type": "string", "minLength": 1, "pattern": "^/" }, "gpuUnitsGt0RequiresAttributes": { "description": "GPU units > 0 requires attributes to be present", "if": { "properties": { "units": { "oneOf": [{ "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "not": { "pattern": "^0+(\\.0+)?$" } }] } }, "required": ["units"] }, "then": { "required": ["attributes"] } }, "gpuAttributesRequireUnitsGt0": { "description": "GPU attributes present requires units > 0", "if": { "required": ["attributes"] }, "then": { "properties": { "units": { "oneOf": [{ "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "not": { "pattern": "^0+(\\.0+)?$" } }] } }, "required": ["units"] } }, "exposeToWithIpEnforcesGlobal": { "description": "Expose to with IP enforces global", "if": { "properties": { "ip": { "type": "string", "minLength": 1 } }, "required": ["ip"] }, "then": { "properties": { "global": { "const": true } }, "required": ["global"] } } }, "properties": { "deployment": { "additionalProperties": { "additionalProperties": { "additionalProperties": false, "properties": { "count": { "minimum": 1, "type": "integer" }, "profile": { "type": "string" } }, "required": ["profile", "count"], "type": "object" }, "type": "object" }, "type": "object" }, "endpoints": { "additionalProperties": false, "patternProperties": { "^[a-z]+[-_0-9a-z]+$": { "additionalProperties": false, "properties": { "kind": { "enum": ["ip"], "type": "string" } }, "required": ["kind"], "type": "object" } }, "type": "object" }, "include": { "description": "Optional list of files to include", "items": { "type": "string" }, "type": "array" }, "profiles": { "additionalProperties": false, "properties": { "compute": { "additionalProperties": { "additionalProperties": false, "properties": { "resources": { "additionalProperties": false, "properties": { "cpu": { "additionalProperties": false, "properties": { "attributes": { "type": "object" }, "units": { "oneOf": [{ "type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?[a-zA-Z]*$", "not": { "pattern": "^0+(\\.0+)?m?$" } }, { "type": "number", "exclusiveMinimum": 0 }] } }, "required": ["units"], "type": "object" }, "gpu": { "description": "GPU resource specification.\n- units defaults to 0 if omitted\n- Bidirectional validation: units > 0 requires attributes, and attributes require units > 0\n", "additionalProperties": false, "properties": { "attributes": { "additionalProperties": false, "properties": { "vendor": { "additionalProperties": false, "minProperties": 1, "properties": { "nvidia": { "oneOf": [{ "type": "array", "items": { "additionalProperties": false, "properties": { "interface": { "enum": ["pcie", "sxm"], "type": "string" }, "model": { "type": "string" }, "ram": { "type": "string" } }, "type": "object" } }, { "type": "null" }] } }, "type": "object" } }, "type": "object" }, "units": { "oneOf": [{ "type": "string" }, { "type": "number" }] } }, "allOf": [{ "$ref": "#/definitions/gpuUnitsGt0RequiresAttributes" }, { "$ref": "#/definitions/gpuAttributesRequireUnitsGt0" }], "type": "object" }, "memory": { "additionalProperties": false, "properties": { "size": { "type": "string" } }, "required": ["size"], "type": "object" }, "storage": { "oneOf": [{ "$ref": "#/definitions/storageVolume" }, { "items": { "$ref": "#/definitions/storageVolume" }, "type": "array" }] } }, "required": ["cpu", "memory", "storage"], "type": "object" } }, "required": ["resources"], "type": "object" }, "type": "object" }, "placement": { "additionalProperties": { "additionalProperties": false, "properties": { "attributes": { "type": "object" }, "pricing": { "additionalProperties": { "$ref": "#/definitions/priceCoin" }, "type": "object" }, "signedBy": { "additionalProperties": false, "properties": { "allOf": { "items": { "type": "string" }, "type": "array" }, "anyOf": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "required": ["pricing"], "type": "object" }, "type": "object" } }, "required": ["compute", "placement"], "type": "object" }, "services": { "additionalProperties": { "properties": { "args": { "$ref": "#/definitions/stringArrayOrNull" }, "command": { "$ref": "#/definitions/stringArrayOrNull" }, "credentials": { "additionalProperties": false, "properties": { "email": { "type": "string", "minLength": 5 }, "host": { "type": "string", "minLength": 1 }, "password": { "type": "string", "minLength": 6 }, "username": { "type": "string", "minLength": 1 } }, "required": ["host", "username", "password"], "type": "object" }, "dependencies": { "items": { "additionalProperties": false, "properties": { "service": { "type": "string" } }, "type": "object" }, "type": "array" }, "env": { "$ref": "#/definitions/stringArrayOrNull" }, "expose": { "oneOf": [{ "type": "array", "items": { "additionalProperties": false, "properties": { "accept": { "items": { "type": "string" }, "type": "array" }, "as": { "$ref": "#/definitions/portNumber" }, "http_options": { "additionalProperties": false, "properties": { "max_body_size": { "type": "integer", "minimum": 0, "maximum": 104857600, "description": "Maximum body size in bytes (max 100 MB)" }, "next_cases": { "oneOf": [{ "type": "array", "items": { "$ref": "#/definitions/httpErrorCode" }, "contains": { "const": "off" }, "maxItems": 1, "minItems": 1 }, { "type": "array", "items": { "$ref": "#/definitions/httpErrorCode" }, "not": { "contains": { "const": "off" } } }] }, "next_timeout": { "type": "integer", "minimum": 0 }, "next_tries": { "type": "integer", "minimum": 0 }, "read_timeout": { "type": "integer", "minimum": 0, "maximum": 6e4, "description": "Read timeout in milliseconds (max 60 seconds)" }, "send_timeout": { "type": "integer", "minimum": 0, "maximum": 6e4, "description": "Send timeout in milliseconds (max 60 seconds)" } }, "type": "object" }, "port": { "$ref": "#/definitions/portNumber" }, "proto": { "enum": ["TCP", "UDP", "tcp", "udp"], "type": "string" }, "to": { "items": { "additionalProperties": false, "properties": { "global": { "type": "boolean" }, "ip": { "minLength": 1, "type": "string" }, "service": { "type": "string" } }, "allOf": [{ "$ref": "#/definitions/exposeToWithIpEnforcesGlobal" }], "type": "object" }, "type": "array" } }, "required": ["port"], "type": "object" } }, { "type": "null" }] }, "image": { "type": "string", "minLength": 1 }, "params": { "additionalProperties": false, "properties": { "storage": { "additionalProperties": { "additionalProperties": false, "properties": { "mount": { "$ref": "#/definitions/absolutePath" }, "readOnly": { "type": "boolean" } }, "type": "object" }, "type": "object" }, "permissions": { "additionalProperties": false, "properties": { "read": { "items": { "type": "string", "enum": ["deployment", "logs", "events"] }, "type": "array" } }, "type": "object" }, "tee": { "type": "string", "enum": ["cpu", "cpu-gpu"] } }, "type": "object" } }, "required": ["image"], "type": "object", "additionalProperties": false }, "type": "object" }, "reclamation": { "description": "Deployment-level reclamation requirements (optional). When set, providers must offer a reclamation window meeting or exceeding the specified minimum to bid on this deployment.", "additionalProperties": false, "properties": { "min_window": { "type": "string", "pattern": "^[1-9][0-9]*(s|m|h)$", "description": 'Minimum reclamation window the tenant requires, as a whole number followed by a unit (s, m, or h). E.g. "1h", "24h", "720h".' } }, "required": ["min_window"], "type": "object" }, "version": { "description": "SDL version", "enum": ["2.0", "2.1"], "type": "string" } }, "required": ["version", "services", "profiles", "deployment"], "title": "Akash SDL Input Schema", "type": "object" };
|
|
74
75
|
var schema35 = { "description": "Price definition with amount and denomination", "additionalProperties": false, "properties": { "amount": { "oneOf": [{ "type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "Positive number as string" }, { "type": "number", "minimum": 0, "description": "Positive number" }] }, "denom": { "enum": ["uakt", "uact"], "type": "string" } }, "required": ["denom", "amount"], "type": "object" };
|
|
75
76
|
var schema40 = { "description": "HTTP error codes for proxy retry logic", "enum": ["error", "timeout", "500", "502", "503", "504", "403", "404", "429", "off"], "type": "string" };
|
|
76
77
|
var pattern4 = new RegExp("^[a-z]+[-_0-9a-z]+$", "u");
|
|
@@ -3224,7 +3225,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3224
3225
|
let data86 = data45.params;
|
|
3225
3226
|
if (data86 && typeof data86 == "object" && !Array.isArray(data86)) {
|
|
3226
3227
|
for (const key29 in data86) {
|
|
3227
|
-
if (!(key29 === "storage" || key29 === "permissions")) {
|
|
3228
|
+
if (!(key29 === "storage" || key29 === "permissions" || key29 === "tee")) {
|
|
3228
3229
|
const err204 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1") + "/params", schemaPath: "#/properties/services/additionalProperties/properties/params/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key29 }, message: "must NOT have additional properties" };
|
|
3229
3230
|
if (vErrors === null) {
|
|
3230
3231
|
vErrors = [err204];
|
|
@@ -3372,118 +3373,139 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3372
3373
|
errors++;
|
|
3373
3374
|
}
|
|
3374
3375
|
}
|
|
3376
|
+
if (data86.tee !== void 0) {
|
|
3377
|
+
let data94 = data86.tee;
|
|
3378
|
+
if (typeof data94 !== "string") {
|
|
3379
|
+
const err217 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1") + "/params/tee", schemaPath: "#/properties/services/additionalProperties/properties/params/properties/tee/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3380
|
+
if (vErrors === null) {
|
|
3381
|
+
vErrors = [err217];
|
|
3382
|
+
} else {
|
|
3383
|
+
vErrors.push(err217);
|
|
3384
|
+
}
|
|
3385
|
+
errors++;
|
|
3386
|
+
}
|
|
3387
|
+
if (!(data94 === "cpu" || data94 === "cpu-gpu")) {
|
|
3388
|
+
const err218 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1") + "/params/tee", schemaPath: "#/properties/services/additionalProperties/properties/params/properties/tee/enum", keyword: "enum", params: { allowedValues: schema28.properties.services.additionalProperties.properties.params.properties.tee.enum }, message: "must be equal to one of the allowed values" };
|
|
3389
|
+
if (vErrors === null) {
|
|
3390
|
+
vErrors = [err218];
|
|
3391
|
+
} else {
|
|
3392
|
+
vErrors.push(err218);
|
|
3393
|
+
}
|
|
3394
|
+
errors++;
|
|
3395
|
+
}
|
|
3396
|
+
}
|
|
3375
3397
|
} else {
|
|
3376
|
-
const
|
|
3398
|
+
const err219 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1") + "/params", schemaPath: "#/properties/services/additionalProperties/properties/params/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
3377
3399
|
if (vErrors === null) {
|
|
3378
|
-
vErrors = [
|
|
3400
|
+
vErrors = [err219];
|
|
3379
3401
|
} else {
|
|
3380
|
-
vErrors.push(
|
|
3402
|
+
vErrors.push(err219);
|
|
3381
3403
|
}
|
|
3382
3404
|
errors++;
|
|
3383
3405
|
}
|
|
3384
3406
|
}
|
|
3385
3407
|
} else {
|
|
3386
|
-
const
|
|
3408
|
+
const err220 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/services/additionalProperties/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
3387
3409
|
if (vErrors === null) {
|
|
3388
|
-
vErrors = [
|
|
3410
|
+
vErrors = [err220];
|
|
3389
3411
|
} else {
|
|
3390
|
-
vErrors.push(
|
|
3412
|
+
vErrors.push(err220);
|
|
3391
3413
|
}
|
|
3392
3414
|
errors++;
|
|
3393
3415
|
}
|
|
3394
3416
|
}
|
|
3395
3417
|
} else {
|
|
3396
|
-
const
|
|
3418
|
+
const err221 = { instancePath: instancePath + "/services", schemaPath: "#/properties/services/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
3397
3419
|
if (vErrors === null) {
|
|
3398
|
-
vErrors = [
|
|
3420
|
+
vErrors = [err221];
|
|
3399
3421
|
} else {
|
|
3400
|
-
vErrors.push(
|
|
3422
|
+
vErrors.push(err221);
|
|
3401
3423
|
}
|
|
3402
3424
|
errors++;
|
|
3403
3425
|
}
|
|
3404
3426
|
}
|
|
3405
3427
|
if (data.reclamation !== void 0) {
|
|
3406
|
-
let
|
|
3407
|
-
if (
|
|
3408
|
-
if (
|
|
3409
|
-
const
|
|
3428
|
+
let data95 = data.reclamation;
|
|
3429
|
+
if (data95 && typeof data95 == "object" && !Array.isArray(data95)) {
|
|
3430
|
+
if (data95.min_window === void 0) {
|
|
3431
|
+
const err222 = { instancePath: instancePath + "/reclamation", schemaPath: "#/properties/reclamation/required", keyword: "required", params: { missingProperty: "min_window" }, message: "must have required property 'min_window'" };
|
|
3410
3432
|
if (vErrors === null) {
|
|
3411
|
-
vErrors = [
|
|
3433
|
+
vErrors = [err222];
|
|
3412
3434
|
} else {
|
|
3413
|
-
vErrors.push(
|
|
3435
|
+
vErrors.push(err222);
|
|
3414
3436
|
}
|
|
3415
3437
|
errors++;
|
|
3416
3438
|
}
|
|
3417
|
-
for (const key33 in
|
|
3439
|
+
for (const key33 in data95) {
|
|
3418
3440
|
if (!(key33 === "min_window")) {
|
|
3419
|
-
const
|
|
3441
|
+
const err223 = { instancePath: instancePath + "/reclamation", schemaPath: "#/properties/reclamation/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key33 }, message: "must NOT have additional properties" };
|
|
3420
3442
|
if (vErrors === null) {
|
|
3421
|
-
vErrors = [
|
|
3443
|
+
vErrors = [err223];
|
|
3422
3444
|
} else {
|
|
3423
|
-
vErrors.push(
|
|
3445
|
+
vErrors.push(err223);
|
|
3424
3446
|
}
|
|
3425
3447
|
errors++;
|
|
3426
3448
|
}
|
|
3427
3449
|
}
|
|
3428
|
-
if (
|
|
3429
|
-
let
|
|
3430
|
-
if (typeof
|
|
3431
|
-
if (!pattern12.test(
|
|
3432
|
-
const
|
|
3450
|
+
if (data95.min_window !== void 0) {
|
|
3451
|
+
let data96 = data95.min_window;
|
|
3452
|
+
if (typeof data96 === "string") {
|
|
3453
|
+
if (!pattern12.test(data96)) {
|
|
3454
|
+
const err224 = { instancePath: instancePath + "/reclamation/min_window", schemaPath: "#/properties/reclamation/properties/min_window/pattern", keyword: "pattern", params: { pattern: "^[1-9][0-9]*(s|m|h)$" }, message: 'must match pattern "^[1-9][0-9]*(s|m|h)$"' };
|
|
3433
3455
|
if (vErrors === null) {
|
|
3434
|
-
vErrors = [
|
|
3456
|
+
vErrors = [err224];
|
|
3435
3457
|
} else {
|
|
3436
|
-
vErrors.push(
|
|
3458
|
+
vErrors.push(err224);
|
|
3437
3459
|
}
|
|
3438
3460
|
errors++;
|
|
3439
3461
|
}
|
|
3440
3462
|
} else {
|
|
3441
|
-
const
|
|
3463
|
+
const err225 = { instancePath: instancePath + "/reclamation/min_window", schemaPath: "#/properties/reclamation/properties/min_window/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3442
3464
|
if (vErrors === null) {
|
|
3443
|
-
vErrors = [
|
|
3465
|
+
vErrors = [err225];
|
|
3444
3466
|
} else {
|
|
3445
|
-
vErrors.push(
|
|
3467
|
+
vErrors.push(err225);
|
|
3446
3468
|
}
|
|
3447
3469
|
errors++;
|
|
3448
3470
|
}
|
|
3449
3471
|
}
|
|
3450
3472
|
} else {
|
|
3451
|
-
const
|
|
3473
|
+
const err226 = { instancePath: instancePath + "/reclamation", schemaPath: "#/properties/reclamation/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
3452
3474
|
if (vErrors === null) {
|
|
3453
|
-
vErrors = [
|
|
3475
|
+
vErrors = [err226];
|
|
3454
3476
|
} else {
|
|
3455
|
-
vErrors.push(
|
|
3477
|
+
vErrors.push(err226);
|
|
3456
3478
|
}
|
|
3457
3479
|
errors++;
|
|
3458
3480
|
}
|
|
3459
3481
|
}
|
|
3460
3482
|
if (data.version !== void 0) {
|
|
3461
|
-
let
|
|
3462
|
-
if (typeof
|
|
3463
|
-
const
|
|
3483
|
+
let data97 = data.version;
|
|
3484
|
+
if (typeof data97 !== "string") {
|
|
3485
|
+
const err227 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3464
3486
|
if (vErrors === null) {
|
|
3465
|
-
vErrors = [
|
|
3487
|
+
vErrors = [err227];
|
|
3466
3488
|
} else {
|
|
3467
|
-
vErrors.push(
|
|
3489
|
+
vErrors.push(err227);
|
|
3468
3490
|
}
|
|
3469
3491
|
errors++;
|
|
3470
3492
|
}
|
|
3471
|
-
if (!(
|
|
3472
|
-
const
|
|
3493
|
+
if (!(data97 === "2.0" || data97 === "2.1")) {
|
|
3494
|
+
const err228 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/enum", keyword: "enum", params: { allowedValues: schema28.properties.version.enum }, message: "must be equal to one of the allowed values" };
|
|
3473
3495
|
if (vErrors === null) {
|
|
3474
|
-
vErrors = [
|
|
3496
|
+
vErrors = [err228];
|
|
3475
3497
|
} else {
|
|
3476
|
-
vErrors.push(
|
|
3498
|
+
vErrors.push(err228);
|
|
3477
3499
|
}
|
|
3478
3500
|
errors++;
|
|
3479
3501
|
}
|
|
3480
3502
|
}
|
|
3481
3503
|
} else {
|
|
3482
|
-
const
|
|
3504
|
+
const err229 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
3483
3505
|
if (vErrors === null) {
|
|
3484
|
-
vErrors = [
|
|
3506
|
+
vErrors = [err229];
|
|
3485
3507
|
} else {
|
|
3486
|
-
vErrors.push(
|
|
3508
|
+
vErrors.push(err229);
|
|
3487
3509
|
}
|
|
3488
3510
|
errors++;
|
|
3489
3511
|
}
|
|
@@ -3636,7 +3658,7 @@ function validateSDL(sdl) {
|
|
|
3636
3658
|
const allErrors = schemaErrors.concat(errors);
|
|
3637
3659
|
return allErrors.length ? allErrors : void 0;
|
|
3638
3660
|
}
|
|
3639
|
-
var _endpointsUsed, _portsUsed, _sdl, _errors, _SDLValidator_instances, validateDeploymentWithRelations_fn, validateDeploymentRelations_fn, validateServiceStorages_fn, validateStorages_fn, validateGPU_fn, validateLeaseIP_fn, validateEndpoints_fn;
|
|
3661
|
+
var _endpointsUsed, _portsUsed, _sdl, _errors, _SDLValidator_instances, validateDeploymentWithRelations_fn, validateDeploymentRelations_fn, validateServiceStorages_fn, validateStorages_fn, validateGPU_fn, validateTEE_fn, validateLeaseIP_fn, validateEndpoints_fn;
|
|
3640
3662
|
var SDLValidator = class {
|
|
3641
3663
|
constructor(sdl) {
|
|
3642
3664
|
__privateAdd(this, _SDLValidator_instances);
|
|
@@ -3681,6 +3703,7 @@ validateDeploymentWithRelations_fn = function(serviceName) {
|
|
|
3681
3703
|
__privateMethod(this, _SDLValidator_instances, validateServiceStorages_fn).call(this, serviceName, deploymentName);
|
|
3682
3704
|
__privateMethod(this, _SDLValidator_instances, validateStorages_fn).call(this, serviceName, deploymentName);
|
|
3683
3705
|
__privateMethod(this, _SDLValidator_instances, validateGPU_fn).call(this, serviceName, deploymentName);
|
|
3706
|
+
__privateMethod(this, _SDLValidator_instances, validateTEE_fn).call(this, serviceName, deploymentName);
|
|
3684
3707
|
});
|
|
3685
3708
|
};
|
|
3686
3709
|
validateDeploymentRelations_fn = function(serviceName, deploymentName) {
|
|
@@ -3847,6 +3870,28 @@ validateGPU_fn = function(serviceName, deploymentName) {
|
|
|
3847
3870
|
});
|
|
3848
3871
|
}
|
|
3849
3872
|
};
|
|
3873
|
+
// Mirrors Go `validateTEEWithGPU` (go/sdl/tee.go): the `cpu-gpu` TEE type
|
|
3874
|
+
// requires GPU resources on the resolved compute profile. `cpu` (and absent)
|
|
3875
|
+
// need no GPU. Unsupported tee values are rejected structurally by the input
|
|
3876
|
+
// schema (`tee` enum in validateSDLInput.ts) before this runs.
|
|
3877
|
+
validateTEE_fn = function(serviceName, deploymentName) {
|
|
3878
|
+
const tee = __privateGet(this, _sdl).services?.[serviceName]?.params?.tee;
|
|
3879
|
+
if (tee !== "cpu-gpu") return;
|
|
3880
|
+
const profile = __privateGet(this, _sdl).deployment[serviceName]?.[deploymentName]?.profile;
|
|
3881
|
+
const gpu = __privateGet(this, _sdl).profiles?.compute?.[profile]?.resources.gpu;
|
|
3882
|
+
const hasGpu = gpu?.units !== void 0 && gpu.units !== 0;
|
|
3883
|
+
if (!hasGpu) {
|
|
3884
|
+
__privateGet(this, _errors).push({
|
|
3885
|
+
message: `Service "${serviceName}" tee type requires gpu resources.`,
|
|
3886
|
+
instancePath: `/services/${serviceName}/params/tee`,
|
|
3887
|
+
schemaPath: "#/properties/services/additionalProperties/properties/params/properties/tee",
|
|
3888
|
+
keyword: "required",
|
|
3889
|
+
params: {
|
|
3890
|
+
missingProperty: "gpu"
|
|
3891
|
+
}
|
|
3892
|
+
});
|
|
3893
|
+
}
|
|
3894
|
+
};
|
|
3850
3895
|
validateLeaseIP_fn = function(serviceName) {
|
|
3851
3896
|
__privateGet(this, _sdl).services?.[serviceName]?.expose?.forEach((expose, exposeIndex) => {
|
|
3852
3897
|
const proto = expose.proto?.toUpperCase() || "TCP";
|
|
@@ -4259,6 +4304,9 @@ function buildParams(service) {
|
|
|
4259
4304
|
if (service.params.permissions) {
|
|
4260
4305
|
result.permissions = service.params.permissions;
|
|
4261
4306
|
}
|
|
4307
|
+
if (service.params.tee) {
|
|
4308
|
+
result.tee = TEEParams.fromPartial({ type: service.params.tee, attestation: true });
|
|
4309
|
+
}
|
|
4262
4310
|
return result;
|
|
4263
4311
|
}
|
|
4264
4312
|
function buildManifestExpose(service, endpointSequenceNumbers) {
|
|
@@ -4289,7 +4337,7 @@ function buildManifestExpose(service, endpointSequenceNumbers) {
|
|
|
4289
4337
|
import { default as stableStringify } from "json-stable-stringify";
|
|
4290
4338
|
var decoder = new TextDecoder();
|
|
4291
4339
|
var encoder2 = new TextEncoder();
|
|
4292
|
-
var NULLABLE_MANIFEST_KEYS = /* @__PURE__ */ new Set(["command", "args", "env", "hosts"]);
|
|
4340
|
+
var NULLABLE_MANIFEST_KEYS = /* @__PURE__ */ new Set(["command", "args", "env", "hosts", "storage"]);
|
|
4293
4341
|
var OMITTED_MANIFEST_KEYS = /* @__PURE__ */ new Set(["kind", "attributes"]);
|
|
4294
4342
|
async function generateManifestVersion(manifest) {
|
|
4295
4343
|
const jsonStr = manifestToSortedJSON(manifest);
|
|
@@ -4627,10 +4675,10 @@ var require_ucs2length2 = __commonJS2({
|
|
|
4627
4675
|
}
|
|
4628
4676
|
});
|
|
4629
4677
|
var validate2 = validate10;
|
|
4630
|
-
var schema11 = { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://raw.githubusercontent.com/akash-network/chain-sdk/refs/heads/main/specs/jwt-schema.json", "title": "Akash JWT Schema", "description": "JSON Schema for JWT used in the Akash Provider API.", "type": "object", "additionalProperties": false, "required": ["iss", "iat", "exp", "nbf", "version", "leases"], "properties": { "iss": { "$ref": "#/definitions/akash-address", "description": "Akash address of the lease(s) owner, e.g., akash1abcd... (44 characters)" }, "iat": { "type": "integer", "minimum": 0, "description": "Token issuance timestamp as Unix time (seconds since 1970-01-01T00:00:00Z). Should be <= exp and >= nbf." }, "nbf": { "type": "integer", "minimum": 0, "description": "Not valid before timestamp as Unix time (seconds since 1970-01-01T00:00:00Z). Should be <= iat." }, "exp": { "type": "integer", "minimum": 0, "description": "Expiration timestamp as Unix time (seconds since 1970-01-01T00:00:00Z). Should be >= iat." }, "jti": { "type": "string", "minLength": 1, "description": "Unique identifier for the JWT, used to prevent token reuse." }, "version": { "type": "string", "enum": ["v1"], "description": "Version of the JWT specification (currently fixed at v1)." }, "leases": { "$ref": "#/definitions/leases" } }, "definitions": { "akash-address": { "type": "string", "pattern": "^akash1[a-z0-9]{38}$" }, "action-scope": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "enum": ["send-manifest", "get-manifest", "logs", "shell", "events", "status", "restart", "hostname-migrate", "ip-migrate"] } }, "leases": { "type": "object", "description": "Access level for the lease: 'full' for unrestricted access to all actions, 'scoped' for specific actions across all provider leases, 'granular' for provider-specific permissions.", "oneOf": [{ "$ref": "#/definitions/leases-full" }, { "$ref": "#/definitions/leases-scoped" }, { "$ref": "#/definitions/leases-granular" }] }, "leases-full": { "type": "object", "additionalProperties": false, "required": ["access"], "properties": { "access": { "const": "full", "description": "Unrestricted access to all actions on all leases." } } }, "leases-scoped": { "type": "object", "additionalProperties": false, "required": ["access", "scope"], "properties": { "access": { "const": "scoped", "description": "Specific actions across all provider leases." }, "scope": { "$ref": "#/definitions/action-scope", "description": "Global list of permitted actions across all owned leases (no duplicates)." } } }, "leases-granular": { "type": "object", "additionalProperties": false, "required": ["access", "permissions"], "properties": { "access": { "const": "granular", "description": "Provider-specific permissions." }, "permissions": { "type": "array", "description": "Defines provider-specific permissions. The provider address must be unique across all permissions entries.", "minItems": 1, "items": { "$ref": "#/definitions/lease-permission" } } } }, "lease-permission": { "type": "object", "description": "Provider-level access: 'full' for all actions, 'scoped' for specific actions across all provider leases, 'granular' for deployment-specific actions.", "oneOf": [{ "$ref": "#/definitions/lease-permission-full" }, { "$ref": "#/definitions/lease-permission-scoped" }, { "$ref": "#/definitions/lease-permission-granular" }] }, "lease-permission-full": { "type": "object", "additionalProperties": false, "required": ["provider", "access"], "properties": { "provider": { "$ref": "#/definitions/akash-address", "description": "Provider address, e.g., akash1xyz... (44 characters)." }, "access": { "const": "full", "description": "Full access to all actions on this provider's leases." } } }, "lease-permission-scoped": { "type": "object", "additionalProperties": false, "required": ["provider", "access", "scope"], "properties": { "provider": { "$ref": "#/definitions/akash-address", "description": "Provider address, e.g., akash1xyz... (44 characters)." }, "access": { "const": "scoped", "description": "Specific actions across all this provider's leases." }, "scope": { "$ref": "#/definitions/action-scope", "description": "Provider-level list of permitted actions (no duplicates)." } } }, "lease-permission-granular": { "type": "object", "additionalProperties": false, "required": ["provider", "access", "deployments"], "properties": { "provider": { "$ref": "#/definitions/akash-address", "description": "Provider address, e.g., akash1xyz... (44 characters)." }, "access": { "const": "granular", "description": "Deployment-specific actions." }, "deployments": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/lease-permission-deployment" } } } }, "lease-permission-deployment": { "type": "object", "additionalProperties": false, "required": ["dseq", "scope", "services"], "properties": { "dseq": { "type": "integer", "minimum": 1, "description": "Deployment sequence number." }, "scope": { "$ref": "#/definitions/action-scope", "description": "Deployment-level list of permitted actions (no duplicates)." }, "gseq": { "type": "integer", "minimum": 0, "description": "Group sequence number (requires dseq)." }, "oseq": { "type": "integer", "minimum": 0, "description": "Order sequence number (requires dseq and gseq)." }, "services": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 }, "description": "List of service names (requires dseq)." } }, "dependencies": { "oseq": ["gseq"] } } } };
|
|
4678
|
+
var schema11 = { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://raw.githubusercontent.com/akash-network/chain-sdk/refs/heads/main/specs/jwt-schema.json", "title": "Akash JWT Schema", "description": "JSON Schema for JWT used in the Akash Provider API.", "type": "object", "additionalProperties": false, "required": ["iss", "iat", "exp", "nbf", "version", "leases"], "properties": { "iss": { "$ref": "#/definitions/akash-address", "description": "Akash address of the lease(s) owner, e.g., akash1abcd... (44 characters)" }, "iat": { "type": "integer", "minimum": 0, "description": "Token issuance timestamp as Unix time (seconds since 1970-01-01T00:00:00Z). Should be <= exp and >= nbf." }, "nbf": { "type": "integer", "minimum": 0, "description": "Not valid before timestamp as Unix time (seconds since 1970-01-01T00:00:00Z). Should be <= iat." }, "exp": { "type": "integer", "minimum": 0, "description": "Expiration timestamp as Unix time (seconds since 1970-01-01T00:00:00Z). Should be >= iat." }, "jti": { "type": "string", "minLength": 1, "description": "Unique identifier for the JWT, used to prevent token reuse." }, "version": { "type": "string", "enum": ["v1"], "description": "Version of the JWT specification (currently fixed at v1)." }, "leases": { "$ref": "#/definitions/leases" } }, "definitions": { "akash-address": { "type": "string", "pattern": "^akash1[a-z0-9]{38}$" }, "action-scope": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "enum": ["send-manifest", "get-manifest", "logs", "shell", "events", "status", "restart", "hostname-migrate", "ip-migrate", "attestation"] } }, "leases": { "type": "object", "description": "Access level for the lease: 'full' for unrestricted access to all actions, 'scoped' for specific actions across all provider leases, 'granular' for provider-specific permissions.", "oneOf": [{ "$ref": "#/definitions/leases-full" }, { "$ref": "#/definitions/leases-scoped" }, { "$ref": "#/definitions/leases-granular" }] }, "leases-full": { "type": "object", "additionalProperties": false, "required": ["access"], "properties": { "access": { "const": "full", "description": "Unrestricted access to all actions on all leases." } } }, "leases-scoped": { "type": "object", "additionalProperties": false, "required": ["access", "scope"], "properties": { "access": { "const": "scoped", "description": "Specific actions across all provider leases." }, "scope": { "$ref": "#/definitions/action-scope", "description": "Global list of permitted actions across all owned leases (no duplicates)." } } }, "leases-granular": { "type": "object", "additionalProperties": false, "required": ["access", "permissions"], "properties": { "access": { "const": "granular", "description": "Provider-specific permissions." }, "permissions": { "type": "array", "description": "Defines provider-specific permissions. The provider address must be unique across all permissions entries.", "minItems": 1, "items": { "$ref": "#/definitions/lease-permission" } } } }, "lease-permission": { "type": "object", "description": "Provider-level access: 'full' for all actions, 'scoped' for specific actions across all provider leases, 'granular' for deployment-specific actions.", "oneOf": [{ "$ref": "#/definitions/lease-permission-full" }, { "$ref": "#/definitions/lease-permission-scoped" }, { "$ref": "#/definitions/lease-permission-granular" }] }, "lease-permission-full": { "type": "object", "additionalProperties": false, "required": ["provider", "access"], "properties": { "provider": { "$ref": "#/definitions/akash-address", "description": "Provider address, e.g., akash1xyz... (44 characters)." }, "access": { "const": "full", "description": "Full access to all actions on this provider's leases." } } }, "lease-permission-scoped": { "type": "object", "additionalProperties": false, "required": ["provider", "access", "scope"], "properties": { "provider": { "$ref": "#/definitions/akash-address", "description": "Provider address, e.g., akash1xyz... (44 characters)." }, "access": { "const": "scoped", "description": "Specific actions across all this provider's leases." }, "scope": { "$ref": "#/definitions/action-scope", "description": "Provider-level list of permitted actions (no duplicates)." } } }, "lease-permission-granular": { "type": "object", "additionalProperties": false, "required": ["provider", "access", "deployments"], "properties": { "provider": { "$ref": "#/definitions/akash-address", "description": "Provider address, e.g., akash1xyz... (44 characters)." }, "access": { "const": "granular", "description": "Deployment-specific actions." }, "deployments": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/lease-permission-deployment" } } } }, "lease-permission-deployment": { "type": "object", "additionalProperties": false, "required": ["dseq", "scope", "services"], "properties": { "dseq": { "type": "integer", "minimum": 1, "description": "Deployment sequence number." }, "scope": { "$ref": "#/definitions/action-scope", "description": "Deployment-level list of permitted actions (no duplicates)." }, "gseq": { "type": "integer", "minimum": 0, "description": "Group sequence number (requires dseq)." }, "oseq": { "type": "integer", "minimum": 0, "description": "Order sequence number (requires dseq and gseq)." }, "services": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 }, "description": "List of service names (requires dseq)." } }, "dependencies": { "oseq": ["gseq"] } } } };
|
|
4631
4679
|
var pattern0 = new RegExp("^akash1[a-z0-9]{38}$", "u");
|
|
4632
4680
|
var func22 = require_ucs2length2().default;
|
|
4633
|
-
var schema16 = { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "enum": ["send-manifest", "get-manifest", "logs", "shell", "events", "status", "restart", "hostname-migrate", "ip-migrate"] } };
|
|
4681
|
+
var schema16 = { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "enum": ["send-manifest", "get-manifest", "logs", "shell", "events", "status", "restart", "hostname-migrate", "ip-migrate", "attestation"] } };
|
|
4634
4682
|
function validate12(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
4635
4683
|
let vErrors = null;
|
|
4636
4684
|
let errors = 0;
|
|
@@ -4699,7 +4747,7 @@ function validate12(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4699
4747
|
}
|
|
4700
4748
|
errors++;
|
|
4701
4749
|
}
|
|
4702
|
-
if (!(data2 === "send-manifest" || data2 === "get-manifest" || data2 === "logs" || data2 === "shell" || data2 === "events" || data2 === "status" || data2 === "restart" || data2 === "hostname-migrate" || data2 === "ip-migrate")) {
|
|
4750
|
+
if (!(data2 === "send-manifest" || data2 === "get-manifest" || data2 === "logs" || data2 === "shell" || data2 === "events" || data2 === "status" || data2 === "restart" || data2 === "hostname-migrate" || data2 === "ip-migrate" || data2 === "attestation")) {
|
|
4703
4751
|
const err6 = { instancePath: instancePath + "/scope/" + i0, schemaPath: "#/definitions/action-scope/items/enum", keyword: "enum", params: { allowedValues: schema16.items.enum }, message: "must be equal to one of the allowed values" };
|
|
4704
4752
|
if (vErrors === null) {
|
|
4705
4753
|
vErrors = [err6];
|
|
@@ -4931,7 +4979,7 @@ function validate18(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4931
4979
|
}
|
|
4932
4980
|
errors++;
|
|
4933
4981
|
}
|
|
4934
|
-
if (!(data3 === "send-manifest" || data3 === "get-manifest" || data3 === "logs" || data3 === "shell" || data3 === "events" || data3 === "status" || data3 === "restart" || data3 === "hostname-migrate" || data3 === "ip-migrate")) {
|
|
4982
|
+
if (!(data3 === "send-manifest" || data3 === "get-manifest" || data3 === "logs" || data3 === "shell" || data3 === "events" || data3 === "status" || data3 === "restart" || data3 === "hostname-migrate" || data3 === "ip-migrate" || data3 === "attestation")) {
|
|
4935
4983
|
const err9 = { instancePath: instancePath + "/scope/" + i0, schemaPath: "#/definitions/action-scope/items/enum", keyword: "enum", params: { allowedValues: schema16.items.enum }, message: "must be equal to one of the allowed values" };
|
|
4936
4984
|
if (vErrors === null) {
|
|
4937
4985
|
vErrors = [err9];
|
|
@@ -5091,7 +5139,7 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5091
5139
|
}
|
|
5092
5140
|
errors++;
|
|
5093
5141
|
}
|
|
5094
|
-
if (!(data2 === "send-manifest" || data2 === "get-manifest" || data2 === "logs" || data2 === "shell" || data2 === "events" || data2 === "status" || data2 === "restart" || data2 === "hostname-migrate" || data2 === "ip-migrate")) {
|
|
5142
|
+
if (!(data2 === "send-manifest" || data2 === "get-manifest" || data2 === "logs" || data2 === "shell" || data2 === "events" || data2 === "status" || data2 === "restart" || data2 === "hostname-migrate" || data2 === "ip-migrate" || data2 === "attestation")) {
|
|
5095
5143
|
const err9 = { instancePath: instancePath + "/scope/" + i0, schemaPath: "#/definitions/action-scope/items/enum", keyword: "enum", params: { allowedValues: schema16.items.enum }, message: "must be equal to one of the allowed values" };
|
|
5096
5144
|
if (vErrors === null) {
|
|
5097
5145
|
vErrors = [err9];
|
|
@@ -9108,4 +9156,4 @@ export {
|
|
|
9108
9156
|
isRetryEnabled,
|
|
9109
9157
|
createTxTransport
|
|
9110
9158
|
};
|
|
9111
|
-
//# sourceMappingURL=chunk-
|
|
9159
|
+
//# sourceMappingURL=chunk-P2FARPRM.js.map
|