@akashnetwork/chain-sdk 1.0.0-alpha.30 → 1.0.0-alpha.31

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 (163) hide show
  1. package/dist/cjs/bla.cjs +7 -0
  2. package/dist/cjs/bla.cjs.map +7 -0
  3. package/dist/cjs/generated/createNodeSDK.cjs +95 -76
  4. package/dist/cjs/generated/createNodeSDK.cjs.map +2 -2
  5. package/dist/cjs/generated/protos/akash/bme/v1/params.cjs +18 -2
  6. package/dist/cjs/generated/protos/akash/bme/v1/params.cjs.map +2 -2
  7. package/dist/cjs/generated/protos/akash/bme/v1/types.cjs +65 -2
  8. package/dist/cjs/generated/protos/akash/bme/v1/types.cjs.map +2 -2
  9. package/dist/cjs/generated/protos/akash/deployment/v1/deployment.cjs +68 -2
  10. package/dist/cjs/generated/protos/akash/deployment/v1/deployment.cjs.map +2 -2
  11. package/dist/cjs/generated/protos/akash/deployment/v1beta4/deploymentmsg.cjs +17 -2
  12. package/dist/cjs/generated/protos/akash/deployment/v1beta4/deploymentmsg.cjs.map +2 -2
  13. package/dist/cjs/generated/protos/akash/discovery/v1/akash.cjs +64 -2
  14. package/dist/cjs/generated/protos/akash/discovery/v1/akash.cjs.map +2 -2
  15. package/dist/cjs/generated/protos/akash/discovery/v1/client_info.cjs +150 -1
  16. package/dist/cjs/generated/protos/akash/discovery/v1/client_info.cjs.map +2 -2
  17. package/dist/cjs/generated/protos/akash/discovery/v1/service.cjs +115 -0
  18. package/dist/cjs/generated/protos/akash/discovery/v1/service.cjs.map +7 -0
  19. package/dist/cjs/generated/protos/akash/discovery/v1/service_akash.cjs +39 -0
  20. package/dist/cjs/generated/protos/akash/discovery/v1/service_akash.cjs.map +7 -0
  21. package/dist/cjs/generated/protos/akash/market/v1/event.cjs +93 -0
  22. package/dist/cjs/generated/protos/akash/market/v1/event.cjs.map +3 -3
  23. package/dist/cjs/generated/protos/akash/market/v1/lease.cjs +32 -2
  24. package/dist/cjs/generated/protos/akash/market/v1/lease.cjs.map +2 -2
  25. package/dist/cjs/generated/protos/akash/market/v1/reclamation.cjs +138 -0
  26. package/dist/cjs/generated/protos/akash/market/v1/reclamation.cjs.map +7 -0
  27. package/dist/cjs/generated/protos/akash/market/v1beta5/bid.cjs +25 -2
  28. package/dist/cjs/generated/protos/akash/market/v1beta5/bid.cjs.map +2 -2
  29. package/dist/cjs/generated/protos/akash/market/v1beta5/bidmsg.cjs +18 -2
  30. package/dist/cjs/generated/protos/akash/market/v1beta5/bidmsg.cjs.map +2 -2
  31. package/dist/cjs/generated/protos/akash/market/v1beta5/leasemsg.cjs +103 -0
  32. package/dist/cjs/generated/protos/akash/market/v1beta5/leasemsg.cjs.map +2 -2
  33. package/dist/cjs/generated/protos/akash/market/v1beta5/order.cjs +18 -2
  34. package/dist/cjs/generated/protos/akash/market/v1beta5/order.cjs.map +2 -2
  35. package/dist/cjs/generated/protos/akash/market/v1beta5/params.cjs +39 -2
  36. package/dist/cjs/generated/protos/akash/market/v1beta5/params.cjs.map +2 -2
  37. package/dist/cjs/generated/protos/akash/market/v1beta5/service_akash.cjs +8 -0
  38. package/dist/cjs/generated/protos/akash/market/v1beta5/service_akash.cjs.map +2 -2
  39. package/dist/cjs/generated/protos/index.akash.v1.cjs +9 -0
  40. package/dist/cjs/generated/protos/index.akash.v1.cjs.map +2 -2
  41. package/dist/cjs/generated/protos/index.akash.v1beta5.cjs +2 -0
  42. package/dist/cjs/generated/protos/index.akash.v1beta5.cjs.map +2 -2
  43. package/dist/cjs/network/config.cjs +3 -7
  44. package/dist/cjs/network/config.cjs.map +2 -2
  45. package/dist/cjs/sdk/provider/auth/jwt/types.cjs.map +1 -1
  46. package/dist/cjs/sdk/provider/auth/jwt/validateJwtPayload.cjs +1058 -1259
  47. package/dist/cjs/sdk/provider/auth/jwt/validateJwtPayload.cjs.map +2 -2
  48. package/dist/cjs/sdl/index.cjs +0 -4
  49. package/dist/cjs/sdl/index.cjs.map +2 -2
  50. package/dist/cjs/sdl/manifest/generateManifest.cjs +2 -3
  51. package/dist/cjs/sdl/manifest/generateManifest.cjs.map +2 -2
  52. package/dist/cjs/sdl/validateSDL/validateSDL.cjs +4 -36
  53. package/dist/cjs/sdl/validateSDL/validateSDL.cjs.map +2 -2
  54. package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs +49 -50
  55. package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs.map +2 -2
  56. package/dist/cjs/test.cjs +2 -0
  57. package/dist/cjs/test.cjs.map +7 -0
  58. package/dist/esm/{chunk-JAPXWQ3D.js → chunk-7XWZXYD2.js} +2 -2
  59. package/dist/esm/{chunk-5RTSSO7K.js → chunk-B7H4H62Z.js} +3 -3
  60. package/dist/esm/chunk-E4KEMLL4.js +413 -0
  61. package/dist/esm/chunk-E4KEMLL4.js.map +7 -0
  62. package/dist/esm/{chunk-H5WUFEMM.js → chunk-EG6EVQGI.js} +23 -5
  63. package/dist/esm/chunk-EG6EVQGI.js.map +7 -0
  64. package/dist/esm/{chunk-5YIS3XNX.js → chunk-EXKSXOV2.js} +2 -2
  65. package/dist/esm/{chunk-TXQ2BR6G.js → chunk-IFAXXMON.js} +126 -5
  66. package/dist/esm/chunk-IFAXXMON.js.map +7 -0
  67. package/dist/esm/chunk-IMR6WS6F.js +93 -0
  68. package/dist/esm/chunk-IMR6WS6F.js.map +7 -0
  69. package/dist/esm/{chunk-LKYHOABO.js → chunk-IPOIF4A2.js} +170 -37
  70. package/dist/esm/chunk-IPOIF4A2.js.map +7 -0
  71. package/dist/esm/{chunk-PFJG3V3A.js → chunk-ITPLCNJB.js} +84 -5
  72. package/dist/esm/chunk-ITPLCNJB.js.map +7 -0
  73. package/dist/esm/{chunk-YSOG5YCI.js → chunk-KM336UKV.js} +1203 -2125
  74. package/dist/esm/chunk-KM336UKV.js.map +7 -0
  75. package/dist/esm/{chunk-KFWTFROT.js → chunk-M5SAGBGR.js} +42 -3
  76. package/dist/esm/chunk-M5SAGBGR.js.map +7 -0
  77. package/dist/esm/{chunk-OHAEKHAC.js → chunk-NPGGO3JN.js} +37 -55
  78. package/dist/esm/chunk-NPGGO3JN.js.map +7 -0
  79. package/dist/esm/{chunk-HDAINZXA.js → chunk-RKOP2GYL.js} +50 -7
  80. package/dist/esm/chunk-RKOP2GYL.js.map +7 -0
  81. package/dist/esm/{chunk-VZZ4GN23.js → chunk-T5PKT4I6.js} +6 -4
  82. package/dist/esm/{chunk-VZZ4GN23.js.map → chunk-T5PKT4I6.js.map} +1 -1
  83. package/dist/esm/{chunk-B4MMOAAO.js → chunk-WI3EWXXI.js} +2 -2
  84. package/dist/esm/generated/protos/index.akash.v1.js +180 -182
  85. package/dist/esm/generated/protos/index.akash.v1.js.map +4 -4
  86. package/dist/esm/generated/protos/index.akash.v1beta1.js +7 -7
  87. package/dist/esm/generated/protos/index.akash.v1beta4.js +6 -4
  88. package/dist/esm/generated/protos/index.akash.v1beta5.js +10 -4
  89. package/dist/esm/generated/protos/index.akash.v1beta5.js.map +1 -1
  90. package/dist/esm/generated/protos/index.akash.v2.js +6 -6
  91. package/dist/esm/generated/protos/index.provider.akash.v1.js +16 -15
  92. package/dist/esm/index.js +10 -12
  93. package/dist/esm/index.web.js +9 -11
  94. package/dist/esm/{query_akash-3UBRLLRZ.js → query_akash-3IY2DKPB.js} +3 -3
  95. package/dist/esm/{query_akash-CKZRI7R6.js → query_akash-OKZLG4MG.js} +5 -3
  96. package/dist/esm/{query_akash-CKZRI7R6.js.map → query_akash-OKZLG4MG.js.map} +1 -1
  97. package/dist/esm/{query_akash-3LAHGVQJ.js → query_akash-ZITEPCYB.js} +6 -4
  98. package/dist/esm/{query_akash-3LAHGVQJ.js.map → query_akash-ZITEPCYB.js.map} +1 -1
  99. package/dist/esm/{service_akash-UFTUJDPM.js → service_akash-2CH5FJ4J.js} +3 -3
  100. package/dist/esm/{service_akash-5JSE44LJ.js → service_akash-BLDT6YCO.js} +5 -3
  101. package/dist/esm/{service_akash-5JSE44LJ.js.map → service_akash-BLDT6YCO.js.map} +1 -1
  102. package/dist/esm/{service_akash-QEN5EQUY.js → service_akash-DZETPXWM.js} +15 -4
  103. package/dist/esm/service_akash-DZETPXWM.js.map +7 -0
  104. package/dist/esm/service_akash-K7FWCKUQ.js +25 -0
  105. package/dist/esm/service_akash-K7FWCKUQ.js.map +7 -0
  106. package/dist/esm/{service_akash-FI6WXDZP.js → service_akash-VOFSDZEK.js} +4 -3
  107. package/dist/esm/{service_akash-FI6WXDZP.js.map → service_akash-VOFSDZEK.js.map} +1 -1
  108. package/dist/sdl-schema.yaml +1 -1
  109. package/dist/tsconfig.build.tsbuildinfo +1 -1
  110. package/dist/types/bla.d.ts +1 -0
  111. package/dist/types/generated/createNodeSDK.d.ts +30 -0
  112. package/dist/types/generated/protos/akash/bme/v1/params.d.ts +5 -0
  113. package/dist/types/generated/protos/akash/bme/v1/types.d.ts +19 -1
  114. package/dist/types/generated/protos/akash/deployment/v1/deployment.d.ts +15 -0
  115. package/dist/types/generated/protos/akash/deployment/v1beta4/deploymentmsg.d.ts +6 -1
  116. package/dist/types/generated/protos/akash/discovery/v1/akash.d.ts +16 -2
  117. package/dist/types/generated/protos/akash/discovery/v1/client_info.d.ts +18 -0
  118. package/dist/types/generated/protos/akash/discovery/v1/service.d.ts +12 -0
  119. package/dist/types/generated/protos/akash/discovery/v1/service_akash.d.ts +13 -0
  120. package/dist/types/generated/protos/akash/market/v1/event.d.ts +11 -0
  121. package/dist/types/generated/protos/akash/market/v1/lease.d.ts +8 -0
  122. package/dist/types/generated/protos/akash/market/v1/reclamation.d.ts +22 -0
  123. package/dist/types/generated/protos/akash/market/v1beta5/bid.d.ts +3 -0
  124. package/dist/types/generated/protos/akash/market/v1beta5/bidmsg.d.ts +7 -0
  125. package/dist/types/generated/protos/akash/market/v1beta5/leasemsg.d.ts +12 -0
  126. package/dist/types/generated/protos/akash/market/v1beta5/order.d.ts +6 -0
  127. package/dist/types/generated/protos/akash/market/v1beta5/params.d.ts +5 -0
  128. package/dist/types/generated/protos/akash/market/v1beta5/service_akash.d.ts +7 -1
  129. package/dist/types/generated/protos/index.akash.v1.d.ts +5 -3
  130. package/dist/types/generated/protos/index.akash.v1beta5.d.ts +1 -1
  131. package/dist/types/network/config.d.ts +4 -5
  132. package/dist/types/sdk/chain/createChainNodeSDK.d.ts +6 -0
  133. package/dist/types/sdk/chain/createChainNodeWebSDK.d.ts +6 -0
  134. package/dist/types/sdk/chain/helpers.d.ts +1 -1
  135. package/dist/types/sdk/provider/auth/jwt/types.d.ts +4 -58
  136. package/dist/types/sdk/provider/auth/jwt/validateJwtPayload.d.ts +273 -225
  137. package/dist/types/sdl/index.d.ts +0 -2
  138. package/dist/types/sdl/manifest/generateManifest.d.ts +1 -2
  139. package/dist/types/sdl/validateSDL/validateSDL.d.ts +2 -3
  140. package/dist/types/sdl/validateSDL/validateSDLInput.d.ts +5 -5
  141. package/dist/types/test.d.ts +1 -0
  142. package/package.json +13 -15
  143. package/dist/cjs/sdl/SDL/SDL.cjs +0 -718
  144. package/dist/cjs/sdl/SDL/SDL.cjs.map +0 -7
  145. package/dist/cjs/sdl/SDL/SdlValidationError.cjs +0 -46
  146. package/dist/cjs/sdl/SDL/SdlValidationError.cjs.map +0 -7
  147. package/dist/esm/chunk-H5WUFEMM.js.map +0 -7
  148. package/dist/esm/chunk-HDAINZXA.js.map +0 -7
  149. package/dist/esm/chunk-KFWTFROT.js.map +0 -7
  150. package/dist/esm/chunk-LKYHOABO.js.map +0 -7
  151. package/dist/esm/chunk-OHAEKHAC.js.map +0 -7
  152. package/dist/esm/chunk-PFJG3V3A.js.map +0 -7
  153. package/dist/esm/chunk-TXQ2BR6G.js.map +0 -7
  154. package/dist/esm/chunk-YSOG5YCI.js.map +0 -7
  155. package/dist/esm/service_akash-QEN5EQUY.js.map +0 -7
  156. package/dist/types/sdl/SDL/SDL.d.ts +0 -439
  157. package/dist/types/sdl/SDL/SdlValidationError.d.ts +0 -18
  158. /package/dist/esm/{chunk-JAPXWQ3D.js.map → chunk-7XWZXYD2.js.map} +0 -0
  159. /package/dist/esm/{chunk-5RTSSO7K.js.map → chunk-B7H4H62Z.js.map} +0 -0
  160. /package/dist/esm/{chunk-5YIS3XNX.js.map → chunk-EXKSXOV2.js.map} +0 -0
  161. /package/dist/esm/{chunk-B4MMOAAO.js.map → chunk-WI3EWXXI.js.map} +0 -0
  162. /package/dist/esm/{query_akash-3UBRLLRZ.js.map → query_akash-3IY2DKPB.js.map} +0 -0
  163. /package/dist/esm/{service_akash-UFTUJDPM.js.map → service_akash-2CH5FJ4J.js.map} +0 -0
@@ -34,17 +34,6 @@ import {
34
34
  __publicField
35
35
  } from "./chunk-35BIJBXD.js";
36
36
 
37
- // src/network/config.ts
38
- var MAINNET_ID = "mainnet";
39
- var SANDBOX_ID = "sandbox";
40
- var TESTNET_ID = "testnet";
41
- var USDC_IBC_DENOMS = {
42
- [MAINNET_ID]: "ibc/170C677610AC31DF0904FFE09CD3B5C657492170E7E52372E48756B71E56F2F1",
43
- [SANDBOX_ID]: "ibc/12C6A0C374171B595A0A9E18B83FA09D295FB1F2D8C6DAA3AC28683471752D84",
44
- [TESTNET_ID]: ""
45
- };
46
- var AKT_DENOM = "uakt";
47
-
48
37
  // src/sdl/validateSDL/validateSDLInput.ts
49
38
  var __getOwnPropNames = Object.getOwnPropertyNames;
50
39
  var __commonJS = (cb, mod) => function __require() {
@@ -74,17 +63,17 @@ var require_ucs2length = __commonJS({
74
63
  ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
75
64
  }
76
65
  });
77
- var validate = validate11;
78
- var schema12 = { "$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": { "pattern": "^(uakt|uact|ibc/.*)$", "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" }, "version": { "description": "SDL version", "enum": ["2.0", "2.1"], "type": "string" } }, "required": ["version", "services", "profiles", "deployment"], "title": "Akash SDL Input Schema", "type": "object" };
79
- var schema24 = { "description": "HTTP error codes for proxy retry logic", "enum": ["error", "timeout", "500", "502", "503", "504", "403", "404", "429", "off"], "type": "string" };
80
- var pattern2 = new RegExp("^[a-z]+[-_0-9a-z]+$", "u");
81
- var pattern4 = new RegExp("^0+(\\.0+)?m?$", "u");
82
- var pattern5 = new RegExp("^[0-9]+(\\.[0-9]+)?[a-zA-Z]*$", "u");
83
- var pattern6 = new RegExp("^0+(\\.0+)?$", "u");
84
- var pattern8 = new RegExp("^[0-9]+(\\.[0-9]+)?$", "u");
85
- var pattern9 = new RegExp("^(uakt|uact|ibc/.*)$", "u");
86
- var pattern10 = new RegExp("^/", "u");
87
- function validate13(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
66
+ var validate = validate27;
67
+ 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" }, "version": { "description": "SDL version", "enum": ["2.0", "2.1"], "type": "string" } }, "required": ["version", "services", "profiles", "deployment"], "title": "Akash SDL Input Schema", "type": "object" };
68
+ 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" };
69
+ var schema40 = { "description": "HTTP error codes for proxy retry logic", "enum": ["error", "timeout", "500", "502", "503", "504", "403", "404", "429", "off"], "type": "string" };
70
+ var pattern4 = new RegExp("^[a-z]+[-_0-9a-z]+$", "u");
71
+ var pattern6 = new RegExp("^0+(\\.0+)?m?$", "u");
72
+ var pattern7 = new RegExp("^[0-9]+(\\.[0-9]+)?[a-zA-Z]*$", "u");
73
+ var pattern8 = new RegExp("^0+(\\.0+)?$", "u");
74
+ var pattern10 = new RegExp("^[0-9]+(\\.[0-9]+)?$", "u");
75
+ var pattern11 = new RegExp("^/", "u");
76
+ function validate29(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
88
77
  let vErrors = null;
89
78
  let errors = 0;
90
79
  const _errs3 = errors;
@@ -431,10 +420,10 @@ function validate13(data, { instancePath = "", parentData, parentDataProperty, r
431
420
  }
432
421
  errors++;
433
422
  }
434
- validate13.errors = vErrors;
423
+ validate29.errors = vErrors;
435
424
  return errors === 0;
436
425
  }
437
- function validate12(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
426
+ function validate28(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
438
427
  let vErrors = null;
439
428
  let errors = 0;
440
429
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -459,8 +448,8 @@ function validate12(data, { instancePath = "", parentData, parentDataProperty, r
459
448
  }
460
449
  }
461
450
  if (data.attributes !== void 0) {
462
- if (!validate13(data.attributes, { instancePath: instancePath + "/attributes", parentData: data, parentDataProperty: "attributes", rootData })) {
463
- vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
451
+ if (!validate29(data.attributes, { instancePath: instancePath + "/attributes", parentData: data, parentDataProperty: "attributes", rootData })) {
452
+ vErrors = vErrors === null ? validate29.errors : vErrors.concat(validate29.errors);
464
453
  errors = vErrors.length;
465
454
  }
466
455
  }
@@ -495,11 +484,11 @@ function validate12(data, { instancePath = "", parentData, parentDataProperty, r
495
484
  }
496
485
  errors++;
497
486
  }
498
- validate12.errors = vErrors;
487
+ validate28.errors = vErrors;
499
488
  return errors === 0;
500
489
  }
501
490
  var func2 = require_ucs2length().default;
502
- function validate11(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
491
+ function validate27(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
503
492
  let vErrors = null;
504
493
  let errors = 0;
505
494
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -656,7 +645,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
656
645
  let data5 = data.endpoints;
657
646
  if (data5 && typeof data5 == "object" && !Array.isArray(data5)) {
658
647
  for (const key4 in data5) {
659
- if (!pattern2.test(key4)) {
648
+ if (!pattern4.test(key4)) {
660
649
  const err14 = { instancePath: instancePath + "/endpoints", schemaPath: "#/properties/endpoints/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" };
661
650
  if (vErrors === null) {
662
651
  vErrors = [err14];
@@ -667,7 +656,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
667
656
  }
668
657
  }
669
658
  for (const key5 in data5) {
670
- if (pattern2.test(key5)) {
659
+ if (pattern4.test(key5)) {
671
660
  let data6 = data5[key5];
672
661
  if (data6 && typeof data6 == "object" && !Array.isArray(data6)) {
673
662
  if (data6.kind === void 0) {
@@ -702,7 +691,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
702
691
  errors++;
703
692
  }
704
693
  if (!(data7 === "ip")) {
705
- const err18 = { instancePath: instancePath + "/endpoints/" + key5.replace(/~/g, "~0").replace(/\//g, "~1") + "/kind", schemaPath: "#/properties/endpoints/patternProperties/%5E%5Ba-z%5D%2B%5B-_0-9a-z%5D%2B%24/properties/kind/enum", keyword: "enum", params: { allowedValues: schema12.properties.endpoints.patternProperties["^[a-z]+[-_0-9a-z]+$"].properties.kind.enum }, message: "must be equal to one of the allowed values" };
694
+ const err18 = { instancePath: instancePath + "/endpoints/" + key5.replace(/~/g, "~0").replace(/\//g, "~1") + "/kind", schemaPath: "#/properties/endpoints/patternProperties/%5E%5Ba-z%5D%2B%5B-_0-9a-z%5D%2B%24/properties/kind/enum", keyword: "enum", params: { allowedValues: schema28.properties.endpoints.patternProperties["^[a-z]+[-_0-9a-z]+$"].properties.kind.enum }, message: "must be equal to one of the allowed values" };
706
695
  if (vErrors === null) {
707
696
  vErrors = [err18];
708
697
  } else {
@@ -900,7 +889,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
900
889
  const _errs48 = errors;
901
890
  const _errs49 = errors;
902
891
  if (typeof data16 === "string") {
903
- if (!pattern4.test(data16)) {
892
+ if (!pattern6.test(data16)) {
904
893
  const err35 = {};
905
894
  if (vErrors === null) {
906
895
  vErrors = [err35];
@@ -930,7 +919,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
930
919
  }
931
920
  }
932
921
  if (typeof data16 === "string") {
933
- if (!pattern5.test(data16)) {
922
+ if (!pattern7.test(data16)) {
934
923
  const err37 = { instancePath: instancePath + "/profiles/compute/" + key8.replace(/~/g, "~0").replace(/\//g, "~1") + "/resources/cpu/units", schemaPath: "#/properties/profiles/properties/compute/additionalProperties/properties/resources/properties/cpu/properties/units/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.[0-9]+)?[a-zA-Z]*$" }, message: 'must match pattern "^[0-9]+(\\.[0-9]+)?[a-zA-Z]*$"' };
935
924
  if (vErrors === null) {
936
925
  vErrors = [err37];
@@ -1073,7 +1062,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
1073
1062
  const _errs64 = errors;
1074
1063
  const _errs65 = errors;
1075
1064
  if (typeof data18 === "string") {
1076
- if (!pattern6.test(data18)) {
1065
+ if (!pattern8.test(data18)) {
1077
1066
  const err47 = {};
1078
1067
  if (vErrors === null) {
1079
1068
  vErrors = [err47];
@@ -1246,7 +1235,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
1246
1235
  const _errs78 = errors;
1247
1236
  const _errs79 = errors;
1248
1237
  if (typeof data19 === "string") {
1249
- if (!pattern6.test(data19)) {
1238
+ if (!pattern8.test(data19)) {
1250
1239
  const err57 = {};
1251
1240
  if (vErrors === null) {
1252
1241
  vErrors = [err57];
@@ -1400,7 +1389,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
1400
1389
  errors++;
1401
1390
  }
1402
1391
  if (!(data24 === "pcie" || data24 === "sxm")) {
1403
- const err67 = { instancePath: instancePath + "/profiles/compute/" + key8.replace(/~/g, "~0").replace(/\//g, "~1") + "/resources/gpu/attributes/vendor/nvidia/" + i1 + "/interface", schemaPath: "#/properties/profiles/properties/compute/additionalProperties/properties/resources/properties/gpu/properties/attributes/properties/vendor/properties/nvidia/oneOf/0/items/properties/interface/enum", keyword: "enum", params: { allowedValues: schema12.properties.profiles.properties.compute.additionalProperties.properties.resources.properties.gpu.properties.attributes.properties.vendor.properties.nvidia.oneOf[0].items.properties.interface.enum }, message: "must be equal to one of the allowed values" };
1392
+ const err67 = { instancePath: instancePath + "/profiles/compute/" + key8.replace(/~/g, "~0").replace(/\//g, "~1") + "/resources/gpu/attributes/vendor/nvidia/" + i1 + "/interface", schemaPath: "#/properties/profiles/properties/compute/additionalProperties/properties/resources/properties/gpu/properties/attributes/properties/vendor/properties/nvidia/oneOf/0/items/properties/interface/enum", keyword: "enum", params: { allowedValues: schema28.properties.profiles.properties.compute.additionalProperties.properties.resources.properties.gpu.properties.attributes.properties.vendor.properties.nvidia.oneOf[0].items.properties.interface.enum }, message: "must be equal to one of the allowed values" };
1404
1393
  if (vErrors === null) {
1405
1394
  vErrors = [err67];
1406
1395
  } else {
@@ -1633,8 +1622,8 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
1633
1622
  let valid35 = false;
1634
1623
  let passing5 = null;
1635
1624
  const _errs115 = errors;
1636
- if (!validate12(data30, { instancePath: instancePath + "/profiles/compute/" + key8.replace(/~/g, "~0").replace(/\//g, "~1") + "/resources/storage", parentData: data13, parentDataProperty: "storage", rootData })) {
1637
- vErrors = vErrors === null ? validate12.errors : vErrors.concat(validate12.errors);
1625
+ if (!validate28(data30, { instancePath: instancePath + "/profiles/compute/" + key8.replace(/~/g, "~0").replace(/\//g, "~1") + "/resources/storage", parentData: data13, parentDataProperty: "storage", rootData })) {
1626
+ vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);
1638
1627
  errors = vErrors.length;
1639
1628
  }
1640
1629
  var _valid7 = _errs115 === errors;
@@ -1646,8 +1635,8 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
1646
1635
  if (Array.isArray(data30)) {
1647
1636
  const len2 = data30.length;
1648
1637
  for (let i2 = 0; i2 < len2; i2++) {
1649
- if (!validate12(data30[i2], { instancePath: instancePath + "/profiles/compute/" + key8.replace(/~/g, "~0").replace(/\//g, "~1") + "/resources/storage/" + i2, parentData: data30, parentDataProperty: i2, rootData })) {
1650
- vErrors = vErrors === null ? validate12.errors : vErrors.concat(validate12.errors);
1638
+ if (!validate28(data30[i2], { instancePath: instancePath + "/profiles/compute/" + key8.replace(/~/g, "~0").replace(/\//g, "~1") + "/resources/storage/" + i2, parentData: data30, parentDataProperty: i2, rootData })) {
1639
+ vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);
1651
1640
  errors = vErrors.length;
1652
1641
  }
1653
1642
  }
@@ -1799,7 +1788,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
1799
1788
  let passing6 = null;
1800
1789
  const _errs136 = errors;
1801
1790
  if (typeof data37 === "string") {
1802
- if (!pattern8.test(data37)) {
1791
+ if (!pattern10.test(data37)) {
1803
1792
  const err95 = { instancePath: instancePath + "/profiles/placement/" + key17.replace(/~/g, "~0").replace(/\//g, "~1") + "/pricing/" + key19.replace(/~/g, "~0").replace(/\//g, "~1") + "/amount", schemaPath: "#/definitions/priceCoin/properties/amount/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.[0-9]+)?$" }, message: 'must match pattern "^[0-9]+(\\.[0-9]+)?$"' };
1804
1793
  if (vErrors === null) {
1805
1794
  vErrors = [err95];
@@ -1873,18 +1862,17 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
1873
1862
  }
1874
1863
  if (data36.denom !== void 0) {
1875
1864
  let data38 = data36.denom;
1876
- if (typeof data38 === "string") {
1877
- if (!pattern9.test(data38)) {
1878
- const err100 = { instancePath: instancePath + "/profiles/placement/" + key17.replace(/~/g, "~0").replace(/\//g, "~1") + "/pricing/" + key19.replace(/~/g, "~0").replace(/\//g, "~1") + "/denom", schemaPath: "#/definitions/priceCoin/properties/denom/pattern", keyword: "pattern", params: { pattern: "^(uakt|uact|ibc/.*)$" }, message: 'must match pattern "^(uakt|uact|ibc/.*)$"' };
1879
- if (vErrors === null) {
1880
- vErrors = [err100];
1881
- } else {
1882
- vErrors.push(err100);
1883
- }
1884
- errors++;
1865
+ if (typeof data38 !== "string") {
1866
+ const err100 = { instancePath: instancePath + "/profiles/placement/" + key17.replace(/~/g, "~0").replace(/\//g, "~1") + "/pricing/" + key19.replace(/~/g, "~0").replace(/\//g, "~1") + "/denom", schemaPath: "#/definitions/priceCoin/properties/denom/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1867
+ if (vErrors === null) {
1868
+ vErrors = [err100];
1869
+ } else {
1870
+ vErrors.push(err100);
1885
1871
  }
1886
- } else {
1887
- const err101 = { instancePath: instancePath + "/profiles/placement/" + key17.replace(/~/g, "~0").replace(/\//g, "~1") + "/pricing/" + key19.replace(/~/g, "~0").replace(/\//g, "~1") + "/denom", schemaPath: "#/definitions/priceCoin/properties/denom/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1872
+ errors++;
1873
+ }
1874
+ if (!(data38 === "uakt" || data38 === "uact")) {
1875
+ const err101 = { instancePath: instancePath + "/profiles/placement/" + key17.replace(/~/g, "~0").replace(/\//g, "~1") + "/pricing/" + key19.replace(/~/g, "~0").replace(/\//g, "~1") + "/denom", schemaPath: "#/definitions/priceCoin/properties/denom/enum", keyword: "enum", params: { allowedValues: schema35.properties.denom.enum }, message: "must be equal to one of the allowed values" };
1888
1876
  if (vErrors === null) {
1889
1877
  vErrors = [err101];
1890
1878
  } else {
@@ -2619,7 +2607,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
2619
2607
  errors++;
2620
2608
  }
2621
2609
  if (!(data68 === "error" || data68 === "timeout" || data68 === "500" || data68 === "502" || data68 === "503" || data68 === "504" || data68 === "403" || data68 === "404" || data68 === "429" || data68 === "off")) {
2622
- const err158 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1") + "/expose/" + i9 + "/http_options/next_cases/" + i11, schemaPath: "#/definitions/httpErrorCode/enum", keyword: "enum", params: { allowedValues: schema24.enum }, message: "must be equal to one of the allowed values" };
2610
+ const err158 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1") + "/expose/" + i9 + "/http_options/next_cases/" + i11, schemaPath: "#/definitions/httpErrorCode/enum", keyword: "enum", params: { allowedValues: schema40.enum }, message: "must be equal to one of the allowed values" };
2623
2611
  if (vErrors === null) {
2624
2612
  vErrors = [err158];
2625
2613
  } else {
@@ -2752,7 +2740,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
2752
2740
  errors++;
2753
2741
  }
2754
2742
  if (!(data71 === "error" || data71 === "timeout" || data71 === "500" || data71 === "502" || data71 === "503" || data71 === "504" || data71 === "403" || data71 === "404" || data71 === "429" || data71 === "off")) {
2755
- const err166 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1") + "/expose/" + i9 + "/http_options/next_cases/" + i14, schemaPath: "#/definitions/httpErrorCode/enum", keyword: "enum", params: { allowedValues: schema24.enum }, message: "must be equal to one of the allowed values" };
2743
+ const err166 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1") + "/expose/" + i9 + "/http_options/next_cases/" + i14, schemaPath: "#/definitions/httpErrorCode/enum", keyword: "enum", params: { allowedValues: schema40.enum }, message: "must be equal to one of the allowed values" };
2756
2744
  if (vErrors === null) {
2757
2745
  vErrors = [err166];
2758
2746
  } else {
@@ -2963,7 +2951,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
2963
2951
  errors++;
2964
2952
  }
2965
2953
  if (!(data77 === "TCP" || data77 === "UDP" || data77 === "tcp" || data77 === "udp")) {
2966
- const err184 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1") + "/expose/" + i9 + "/proto", schemaPath: "#/properties/services/additionalProperties/properties/expose/oneOf/0/items/properties/proto/enum", keyword: "enum", params: { allowedValues: schema12.properties.services.additionalProperties.properties.expose.oneOf[0].items.properties.proto.enum }, message: "must be equal to one of the allowed values" };
2954
+ const err184 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1") + "/expose/" + i9 + "/proto", schemaPath: "#/properties/services/additionalProperties/properties/expose/oneOf/0/items/properties/proto/enum", keyword: "enum", params: { allowedValues: schema28.properties.services.additionalProperties.properties.expose.oneOf[0].items.properties.proto.enum }, message: "must be equal to one of the allowed values" };
2967
2955
  if (vErrors === null) {
2968
2956
  vErrors = [err184];
2969
2957
  } else {
@@ -3268,7 +3256,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
3268
3256
  }
3269
3257
  errors++;
3270
3258
  }
3271
- if (!pattern10.test(data89)) {
3259
+ if (!pattern11.test(data89)) {
3272
3260
  const err207 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1") + "/params/storage/" + key30.replace(/~/g, "~0").replace(/\//g, "~1") + "/mount", schemaPath: "#/definitions/absolutePath/pattern", keyword: "pattern", params: { pattern: "^/" }, message: 'must match pattern "^/"' };
3273
3261
  if (vErrors === null) {
3274
3262
  vErrors = [err207];
@@ -3348,7 +3336,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
3348
3336
  errors++;
3349
3337
  }
3350
3338
  if (!(data93 === "deployment" || data93 === "logs" || data93 === "events")) {
3351
- const err214 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1") + "/params/permissions/read/" + i16, schemaPath: "#/properties/services/additionalProperties/properties/params/properties/permissions/properties/read/items/enum", keyword: "enum", params: { allowedValues: schema12.properties.services.additionalProperties.properties.params.properties.permissions.properties.read.items.enum }, message: "must be equal to one of the allowed values" };
3339
+ const err214 = { instancePath: instancePath + "/services/" + key22.replace(/~/g, "~0").replace(/\//g, "~1") + "/params/permissions/read/" + i16, schemaPath: "#/properties/services/additionalProperties/properties/params/properties/permissions/properties/read/items/enum", keyword: "enum", params: { allowedValues: schema28.properties.services.additionalProperties.properties.params.properties.permissions.properties.read.items.enum }, message: "must be equal to one of the allowed values" };
3352
3340
  if (vErrors === null) {
3353
3341
  vErrors = [err214];
3354
3342
  } else {
@@ -3419,7 +3407,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
3419
3407
  errors++;
3420
3408
  }
3421
3409
  if (!(data94 === "2.0" || data94 === "2.1")) {
3422
- const err221 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/enum", keyword: "enum", params: { allowedValues: schema12.properties.version.enum }, message: "must be equal to one of the allowed values" };
3410
+ const err221 = { 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" };
3423
3411
  if (vErrors === null) {
3424
3412
  vErrors = [err221];
3425
3413
  } else {
@@ -3437,10 +3425,10 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
3437
3425
  }
3438
3426
  errors++;
3439
3427
  }
3440
- validate11.errors = vErrors;
3428
+ validate27.errors = vErrors;
3441
3429
  return errors === 0;
3442
3430
  }
3443
- var schema = schema12;
3431
+ var schema = schema28;
3444
3432
 
3445
3433
  // src/utils/jsonSchemaValidation.ts
3446
3434
  var DEFINITIONS_PREFIX = "#/definitions/";
@@ -3571,16 +3559,16 @@ var ERROR_MESSAGES = {
3571
3559
  return `If an IP is declared, the directive must be declared as global.`;
3572
3560
  }
3573
3561
  };
3574
- function validateSDL(sdl, networkId) {
3562
+ function validateSDL(sdl) {
3575
3563
  validate(sdl);
3576
3564
  const schemaErrors = humanizeErrors(validate.errors, schema, ERROR_MESSAGES);
3577
3565
  if (schemaErrors.length) return schemaErrors;
3578
3566
  const validator = new SDLValidator(sdl);
3579
- const errors = validator.validate(networkId);
3567
+ const errors = validator.validate();
3580
3568
  const allErrors = schemaErrors.concat(errors);
3581
3569
  return allErrors.length ? allErrors : void 0;
3582
3570
  }
3583
- var _endpointsUsed, _portsUsed, _sdl, _errors, _SDLValidator_instances, validateDenom_fn, findInvalidUsdcDenom_fn, validateDeploymentWithRelations_fn, validateDeploymentRelations_fn, validateServiceStorages_fn, validateStorages_fn, validateGPU_fn, validateLeaseIP_fn, validateEndpoints_fn;
3571
+ var _endpointsUsed, _portsUsed, _sdl, _errors, _SDLValidator_instances, validateDeploymentWithRelations_fn, validateDeploymentRelations_fn, validateServiceStorages_fn, validateStorages_fn, validateGPU_fn, validateLeaseIP_fn, validateEndpoints_fn;
3584
3572
  var SDLValidator = class {
3585
3573
  constructor(sdl) {
3586
3574
  __privateAdd(this, _SDLValidator_instances);
@@ -3590,14 +3578,13 @@ var SDLValidator = class {
3590
3578
  __privateAdd(this, _errors, []);
3591
3579
  __privateSet(this, _sdl, sdl);
3592
3580
  }
3593
- validate(networkId) {
3581
+ validate() {
3594
3582
  if (__privateGet(this, _sdl).services) {
3595
3583
  Object.keys(__privateGet(this, _sdl).services).forEach((serviceName) => {
3596
3584
  __privateMethod(this, _SDLValidator_instances, validateDeploymentWithRelations_fn).call(this, serviceName);
3597
3585
  __privateMethod(this, _SDLValidator_instances, validateLeaseIP_fn).call(this, serviceName);
3598
3586
  });
3599
3587
  }
3600
- __privateMethod(this, _SDLValidator_instances, validateDenom_fn).call(this, networkId);
3601
3588
  __privateMethod(this, _SDLValidator_instances, validateEndpoints_fn).call(this);
3602
3589
  return __privateGet(this, _errors);
3603
3590
  }
@@ -3607,36 +3594,6 @@ _portsUsed = new WeakMap();
3607
3594
  _sdl = new WeakMap();
3608
3595
  _errors = new WeakMap();
3609
3596
  _SDLValidator_instances = new WeakSet();
3610
- validateDenom_fn = function(networkId) {
3611
- if (!__privateGet(this, _sdl).profiles?.placement) return;
3612
- const usdcDenom = USDC_IBC_DENOMS[networkId];
3613
- const invalidDenom = __privateMethod(this, _SDLValidator_instances, findInvalidUsdcDenom_fn).call(this, usdcDenom);
3614
- if (invalidDenom) {
3615
- __privateGet(this, _errors).push({
3616
- message: `Invalid format: "denom" at "${invalidDenom.path}" does not match pattern "^(uakt|uact|${usdcDenom})$"`,
3617
- instancePath: invalidDenom.path,
3618
- schemaPath: "#/definitions/priceCoin/properties/denom",
3619
- keyword: "pattern",
3620
- params: {
3621
- pattern: "^(uakt|uact|ibc/.*)$"
3622
- }
3623
- });
3624
- }
3625
- };
3626
- findInvalidUsdcDenom_fn = function(usdcDenom) {
3627
- for (const [placementName, placement] of Object.entries(__privateGet(this, _sdl).profiles.placement)) {
3628
- if (!placement.pricing) continue;
3629
- for (const [profile, pricing] of Object.entries(placement.pricing)) {
3630
- if (pricing.denom.startsWith("ibc/") && pricing.denom !== usdcDenom) {
3631
- return {
3632
- path: `/profiles/placement/${placementName}/pricing/${profile}/denom`,
3633
- denom: pricing.denom
3634
- };
3635
- }
3636
- }
3637
- }
3638
- return null;
3639
- };
3640
3597
  validateDeploymentWithRelations_fn = function(serviceName) {
3641
3598
  const deployment = __privateGet(this, _sdl).deployment[serviceName];
3642
3599
  if (!deployment) {
@@ -3887,34 +3844,6 @@ validateEndpoints_fn = function() {
3887
3844
  });
3888
3845
  };
3889
3846
 
3890
- // src/sdl/SDL/SdlValidationError.ts
3891
- var SdlValidationError = class _SdlValidationError extends Error {
3892
- /**
3893
- * Asserts a condition and throws an `SdlValidationError` if the condition is false.
3894
- * @param condition - The condition to assert.
3895
- * @param message - The error message to throw if the assertion fails.
3896
- * @example
3897
- * SdlValidationError.assert(someCondition, "Condition failed");
3898
- */
3899
- static assert(condition, message) {
3900
- if (!condition) {
3901
- throw new _SdlValidationError(message);
3902
- }
3903
- }
3904
- /**
3905
- * Creates an instance of `SdlValidationError`.
3906
- * @param message - The error message.
3907
- */
3908
- constructor(message) {
3909
- super(message);
3910
- this.name = "SdlValidationError";
3911
- }
3912
- };
3913
-
3914
- // src/sdl/SDL/SDL.ts
3915
- import YAML from "js-yaml";
3916
- import { default as stableStringify } from "json-stable-stringify";
3917
-
3918
3847
  // src/sdl/sizes.ts
3919
3848
  var prefixes = "kmgtpe".split("");
3920
3849
  function convertResourceString(resourceStr) {
@@ -3950,680 +3879,6 @@ function parseCpuResourceString(size) {
3950
3879
  throw new Error(`Invalid size string: ${size}`);
3951
3880
  }
3952
3881
 
3953
- // src/sdl/SDL/SDL.ts
3954
- var Endpoint_SHARED_HTTP = 0;
3955
- var Endpoint_RANDOM_PORT = 1;
3956
- var Endpoint_LEASED_IP = 2;
3957
- function isArray(obj) {
3958
- return Array.isArray(obj);
3959
- }
3960
- function isString(str) {
3961
- return typeof str === "string";
3962
- }
3963
- var _SDL_instances, escapeHtml_fn;
3964
- var _SDL = class _SDL {
3965
- constructor(data, version = "beta2", networkId = MAINNET_ID) {
3966
- this.data = data;
3967
- this.version = version;
3968
- __privateAdd(this, _SDL_instances);
3969
- const errors = validateSDL(data, networkId);
3970
- if (errors) throw new SdlValidationError(errors[0].message);
3971
- }
3972
- /**
3973
- * Creates an SDL instance from a YAML string.
3974
- *
3975
- * @param {string} yaml - The YAML string containing the SDL definition.
3976
- * @param {NetworkVersion} [version="beta3"] - The SDL version (beta2 or beta3).
3977
- * @param {NetworkId} [networkId=MAINNET_ID] - The network ID to validate against.
3978
- * @returns {SDL} An instance of the SDL class.
3979
- *
3980
- * @example
3981
- * ```ts
3982
- * const yaml = `
3983
- * version: "2.0"
3984
- * services:
3985
- * web:
3986
- * image: nginx
3987
- * expose:
3988
- * - port: 80
3989
- * as: 80
3990
- * to:
3991
- * - global: true
3992
- * `;
3993
- * const sdl = SDL.fromString(yaml);
3994
- * ```
3995
- */
3996
- static fromString(yaml2, version = "beta3", networkId = MAINNET_ID) {
3997
- const data = YAML.load(yaml2);
3998
- return new _SDL(data, version, networkId);
3999
- }
4000
- services() {
4001
- if (this.data) {
4002
- return this.data.services;
4003
- }
4004
- return {};
4005
- }
4006
- deployments() {
4007
- if (this.data) {
4008
- return this.data.deployment;
4009
- }
4010
- return {};
4011
- }
4012
- profiles() {
4013
- if (this.data) {
4014
- return this.data.profiles;
4015
- }
4016
- return {};
4017
- }
4018
- placements() {
4019
- const { placement } = this.data.profiles;
4020
- return placement || {};
4021
- }
4022
- serviceNames() {
4023
- const names = this.data ? Object.keys(this.data.services) : [];
4024
- return names;
4025
- }
4026
- deploymentsByPlacement(placement) {
4027
- const deployments = this.data ? this.data.deployment : [];
4028
- return Object.entries(deployments).filter(({ 1: deployment }) => Object.prototype.hasOwnProperty.call(deployment, placement));
4029
- }
4030
- resourceUnit(val, asString) {
4031
- return asString ? { val: `${convertResourceString(val)}` } : { val: convertResourceString(val) };
4032
- }
4033
- resourceValue(value, asString) {
4034
- if (value === null) {
4035
- return value;
4036
- }
4037
- const strVal = value.toString();
4038
- const encoder3 = new TextEncoder();
4039
- return asString ? strVal : encoder3.encode(strVal);
4040
- }
4041
- serviceResourceCpu(resource) {
4042
- const units = isString(resource.units) ? convertCpuResourceString(resource.units) : resource.units * 1e3;
4043
- return resource.attributes ? {
4044
- units: { val: `${units}` },
4045
- attributes: this.serviceResourceAttributes(resource.attributes)
4046
- } : {
4047
- units: { val: `${units}` }
4048
- };
4049
- }
4050
- serviceResourceMemory(resource, asString) {
4051
- const key = asString ? "quantity" : "size";
4052
- return resource.attributes ? {
4053
- [key]: this.resourceUnit(resource.size, asString),
4054
- attributes: this.serviceResourceAttributes(resource.attributes)
4055
- } : {
4056
- [key]: this.resourceUnit(resource.size, asString)
4057
- };
4058
- }
4059
- serviceResourceStorage(resource, asString) {
4060
- const key = asString ? "quantity" : "size";
4061
- const storage = isArray(resource) ? resource : [resource];
4062
- return storage.map(
4063
- (storage2) => storage2.attributes ? {
4064
- name: storage2.name || "default",
4065
- [key]: this.resourceUnit(storage2.size, asString),
4066
- attributes: this.serviceResourceStorageAttributes(storage2.attributes)
4067
- } : {
4068
- name: storage2.name || "default",
4069
- [key]: this.resourceUnit(storage2.size, asString)
4070
- }
4071
- );
4072
- }
4073
- serviceResourceAttributes(attributes) {
4074
- return attributes && Object.keys(attributes).sort().map((key) => ({ key, value: attributes[key].toString() }));
4075
- }
4076
- serviceResourceStorageAttributes(attributes) {
4077
- if (!attributes) return void 0;
4078
- const pairs = Object.keys(attributes).map((key) => ({ key, value: attributes[key].toString() }));
4079
- if (attributes.class === "ram" && !("persistent" in attributes)) {
4080
- pairs.push({ key: "persistent", value: "false" });
4081
- }
4082
- pairs.sort((a, b) => a.key.localeCompare(b.key));
4083
- return pairs;
4084
- }
4085
- serviceResourceGpu(resource, asString) {
4086
- const value = resource?.units || 0;
4087
- const numVal = isString(value) ? Buffer.from(value, "ascii") : value;
4088
- const strVal = !isString(value) ? value.toString() : value;
4089
- return resource?.attributes ? {
4090
- units: asString ? { val: strVal } : { val: numVal },
4091
- attributes: this.transformGpuAttributes(resource?.attributes)
4092
- } : {
4093
- units: asString ? { val: strVal } : { val: numVal }
4094
- };
4095
- }
4096
- v2ServiceResourceEndpoints(service) {
4097
- const endpointSequenceNumbers = this.computeEndpointSequenceNumbers(this.data);
4098
- const endpoints = service.expose.flatMap(
4099
- (expose) => expose.to ? expose.to.filter((to) => to.global && to.ip?.length > 0).map((to) => ({
4100
- kind: Endpoint_LEASED_IP,
4101
- sequence_number: endpointSequenceNumbers[to.ip] || 0
4102
- })) : []
4103
- );
4104
- return endpoints.length > 0 ? endpoints : null;
4105
- }
4106
- v3ServiceResourceEndpoints(service) {
4107
- const endpointSequenceNumbers = this.computeEndpointSequenceNumbers(this.data);
4108
- const endpoints = service.expose.flatMap(
4109
- (expose) => expose.to ? expose.to.filter((to) => to.global).flatMap((to) => {
4110
- const exposeSpec = {
4111
- port: expose.port,
4112
- externalPort: expose.as || 0,
4113
- proto: this.parseServiceProto(expose.proto),
4114
- global: !!to.global
4115
- };
4116
- const kind = this.exposeShouldBeIngress(exposeSpec) ? Endpoint_SHARED_HTTP : Endpoint_RANDOM_PORT;
4117
- const defaultEp = kind !== 0 ? { kind, sequence_number: 0 } : { sequence_number: 0 };
4118
- const leasedEp = to.ip?.length > 0 ? {
4119
- kind: Endpoint_LEASED_IP,
4120
- sequence_number: endpointSequenceNumbers[to.ip] || 0
4121
- } : void 0;
4122
- return leasedEp ? [defaultEp, leasedEp] : [defaultEp];
4123
- }) : []
4124
- );
4125
- return endpoints;
4126
- }
4127
- serviceResourcesBeta2(profile, service, asString = false) {
4128
- return {
4129
- cpu: this.serviceResourceCpu(profile.resources.cpu),
4130
- memory: this.serviceResourceMemory(profile.resources.memory, asString),
4131
- storage: this.serviceResourceStorage(profile.resources.storage, asString),
4132
- endpoints: this.v2ServiceResourceEndpoints(service)
4133
- };
4134
- }
4135
- serviceResourcesBeta3(id, profile, service, asString = false) {
4136
- return {
4137
- id,
4138
- cpu: this.serviceResourceCpu(profile.resources.cpu),
4139
- memory: this.serviceResourceMemory(profile.resources.memory, asString),
4140
- storage: this.serviceResourceStorage(profile.resources.storage, asString),
4141
- gpu: this.serviceResourceGpu(profile.resources.gpu, asString),
4142
- endpoints: this.v3ServiceResourceEndpoints(service)
4143
- };
4144
- }
4145
- /**
4146
- * Parses the service protocol.
4147
- *
4148
- * @param proto - The protocol string (e.g., "TCP", "UDP").
4149
- * @returns The parsed protocol.
4150
- * @throws Will throw an error if the protocol is unsupported.
4151
- *
4152
- * @example
4153
- * ```ts
4154
- * const protocol = SDL.parseServiceProto("TCP");
4155
- * // protocol is "TCP"
4156
- * ```
4157
- */
4158
- parseServiceProto(proto) {
4159
- const raw = proto?.toUpperCase() || "TCP";
4160
- if (raw === "TCP" || raw === "UDP") return raw;
4161
- throw new SdlValidationError(`Unsupported service protocol: "${proto}". Supported protocols are "TCP" and "UDP".`);
4162
- }
4163
- manifestExposeService(to) {
4164
- return to.service || "";
4165
- }
4166
- manifestExposeGlobal(to) {
4167
- return to.global || false;
4168
- }
4169
- manifestExposeHosts(expose) {
4170
- return expose.accept || null;
4171
- }
4172
- v2HttpOptions(http_options) {
4173
- const defaults = {
4174
- MaxBodySize: 1048576,
4175
- ReadTimeout: 6e4,
4176
- SendTimeout: 6e4,
4177
- NextTries: 3,
4178
- NextTimeout: 0,
4179
- NextCases: ["error", "timeout"]
4180
- };
4181
- if (!http_options) {
4182
- return { ...defaults };
4183
- }
4184
- return {
4185
- MaxBodySize: http_options.max_body_size || defaults.MaxBodySize,
4186
- ReadTimeout: http_options.read_timeout || defaults.ReadTimeout,
4187
- SendTimeout: http_options.send_timeout || defaults.SendTimeout,
4188
- NextTries: http_options.next_tries || defaults.NextTries,
4189
- NextTimeout: http_options.next_timeout || defaults.NextTimeout,
4190
- NextCases: http_options.next_cases || defaults.NextCases
4191
- };
4192
- }
4193
- v3HttpOptions(http_options) {
4194
- const defaults = {
4195
- maxBodySize: 1048576,
4196
- readTimeout: 6e4,
4197
- sendTimeout: 6e4,
4198
- nextTries: 3,
4199
- nextTimeout: 0,
4200
- nextCases: ["error", "timeout"]
4201
- };
4202
- if (!http_options) {
4203
- return { ...defaults };
4204
- }
4205
- return {
4206
- maxBodySize: http_options.max_body_size || defaults.maxBodySize,
4207
- readTimeout: http_options.read_timeout || defaults.readTimeout,
4208
- sendTimeout: http_options.send_timeout || defaults.sendTimeout,
4209
- nextTries: http_options.next_tries || defaults.nextTries,
4210
- nextTimeout: http_options.next_timeout || defaults.nextTimeout,
4211
- nextCases: http_options.next_cases || defaults.nextCases
4212
- };
4213
- }
4214
- v2ManifestExposeHttpOptions(expose) {
4215
- return this.v2HttpOptions(expose.http_options);
4216
- }
4217
- v3ManifestExposeHttpOptions(expose) {
4218
- return this.v3HttpOptions(expose.http_options);
4219
- }
4220
- v2ManifestExpose(service) {
4221
- const endpointSequenceNumbers = this.computeEndpointSequenceNumbers(this.data);
4222
- return service.expose.flatMap(
4223
- (expose) => expose.to ? expose.to.map((to) => ({
4224
- Port: expose.port,
4225
- ExternalPort: expose.as || 0,
4226
- Proto: this.parseServiceProto(expose.proto),
4227
- Service: this.manifestExposeService(to),
4228
- Global: this.manifestExposeGlobal(to),
4229
- Hosts: this.manifestExposeHosts(expose),
4230
- HTTPOptions: this.v2ManifestExposeHttpOptions(expose),
4231
- IP: to.ip || "",
4232
- EndpointSequenceNumber: endpointSequenceNumbers[to.ip] || 0
4233
- })) : []
4234
- );
4235
- }
4236
- v3ManifestExpose(service) {
4237
- const endpointSequenceNumbers = this.computeEndpointSequenceNumbers(this.data);
4238
- return service.expose.flatMap(
4239
- (expose) => expose.to ? expose.to.map((to) => ({
4240
- port: expose.port,
4241
- externalPort: expose.as || 0,
4242
- proto: this.parseServiceProto(expose.proto),
4243
- service: this.manifestExposeService(to),
4244
- global: this.manifestExposeGlobal(to),
4245
- hosts: this.manifestExposeHosts(expose),
4246
- httpOptions: this.v3ManifestExposeHttpOptions(expose),
4247
- ip: to.ip || "",
4248
- endpointSequenceNumber: endpointSequenceNumbers[to.ip] || 0
4249
- })) : []
4250
- ).sort((a, b) => {
4251
- if (a.service != b.service) return a.service.localeCompare(b.service);
4252
- if (a.port != b.port) return a.port - b.port;
4253
- if (a.proto != b.proto) return a.proto.localeCompare(b.proto);
4254
- if (a.global != b.global) return a.global ? -1 : 1;
4255
- return 0;
4256
- });
4257
- }
4258
- v2ManifestServiceParams(params) {
4259
- return {
4260
- Storage: Object.keys(params?.storage ?? {}).map((name) => {
4261
- if (!params?.storage) throw new Error("Storage is undefined");
4262
- return {
4263
- name,
4264
- mount: params.storage[name].mount,
4265
- readOnly: params.storage[name].readOnly || false
4266
- };
4267
- }),
4268
- ...params?.permissions ? { Permissions: params.permissions } : {}
4269
- };
4270
- }
4271
- v3ManifestServiceParams(params) {
4272
- if (params === void 0 || Object.keys(params).length === 0) {
4273
- return null;
4274
- }
4275
- const res = {
4276
- storage: params.storage && Object.keys(params.storage).length > 0 ? Object.keys(params.storage).map((name) => ({
4277
- name,
4278
- mount: params.storage[name]?.mount,
4279
- readOnly: params.storage[name]?.readOnly || false
4280
- })) : null
4281
- };
4282
- if (params.permissions) {
4283
- res.permissions = params.permissions;
4284
- }
4285
- return res;
4286
- }
4287
- v2ManifestService(placement, name, asString) {
4288
- const service = this.data.services[name];
4289
- const deployment = this.data.deployment[name];
4290
- const profile = this.data.profiles.compute[deployment[placement].profile];
4291
- const manifestService = {
4292
- Name: name,
4293
- Image: service.image,
4294
- Command: service.command || null,
4295
- Args: service.args || null,
4296
- Env: service.env || null,
4297
- Resources: this.serviceResourcesBeta2(profile, service, asString),
4298
- Count: deployment[placement].count,
4299
- Expose: this.v2ManifestExpose(service)
4300
- };
4301
- if (service.params) {
4302
- manifestService.params = this.v2ManifestServiceParams(service.params);
4303
- }
4304
- return manifestService;
4305
- }
4306
- v3ManifestService(id, placement, name, asString) {
4307
- const service = this.data.services[name];
4308
- const deployment = this.data.deployment[name];
4309
- const profile = this.data.profiles.compute[deployment[placement].profile];
4310
- const credentials = service.credentials || null;
4311
- if (credentials && !credentials.email) {
4312
- credentials.email = "";
4313
- }
4314
- const manifestService = {
4315
- name,
4316
- image: service.image,
4317
- command: service.command || null,
4318
- args: service.args || null,
4319
- env: service.env || null,
4320
- resources: this.serviceResourcesBeta3(id, profile, service, asString),
4321
- count: deployment[placement].count,
4322
- expose: this.v3ManifestExpose(service),
4323
- params: this.v3ManifestServiceParams(service.params),
4324
- credentials
4325
- };
4326
- if (!manifestService.params) {
4327
- delete manifestService.params;
4328
- }
4329
- return manifestService;
4330
- }
4331
- v2Manifest(asString = false) {
4332
- return Object.keys(this.placements()).map((name) => ({
4333
- Name: name,
4334
- Services: this.deploymentsByPlacement(name).map(([service]) => this.v2ManifestService(name, service, asString))
4335
- }));
4336
- }
4337
- v3Manifest(asString = false) {
4338
- const groups = this.v3Groups();
4339
- const serviceId = (pIdx, sIdx) => groups[pIdx].resources[sIdx].resource.id;
4340
- return Object.keys(this.placements()).map((name, pIdx) => ({
4341
- name,
4342
- services: this.deploymentsByPlacement(name).sort(([a], [b]) => a.localeCompare(b)).map(([service], idx) => this.v3ManifestService(serviceId(pIdx, idx), name, service, asString))
4343
- }));
4344
- }
4345
- manifest(asString = false) {
4346
- return this.version === "beta2" ? this.v2Manifest(asString) : this.v3Manifest(asString);
4347
- }
4348
- /**
4349
- * Computes the endpoint sequence numbers for the given SDL.
4350
- *
4351
- * @param sdl - The SDL data.
4352
- * @returns An object mapping IPs to their sequence numbers.
4353
- *
4354
- * @example
4355
- * ```ts
4356
- * const sequenceNumbers = sdl.computeEndpointSequenceNumbers(sdlData);
4357
- * // sequenceNumbers might be { "192.168.1.1": 1, "192.168.1.2": 2 }
4358
- * ```
4359
- */
4360
- computeEndpointSequenceNumbers(sdl) {
4361
- return Object.fromEntries(
4362
- Object.values(sdl.services).flatMap(
4363
- (service) => service.expose?.flatMap(
4364
- (expose) => expose.to ? expose.to.filter((to) => to.global && to.ip?.length > 0).map((to) => to.ip).sort().map((ip, index) => [ip, index + 1]) : []
4365
- ) ?? []
4366
- )
4367
- );
4368
- }
4369
- resourceUnitCpu(computeResources, asString) {
4370
- const attributes = computeResources.cpu.attributes;
4371
- const cpu = isString(computeResources.cpu.units) ? convertCpuResourceString(computeResources.cpu.units) : computeResources.cpu.units * 1e3;
4372
- return {
4373
- units: { val: this.resourceValue(cpu, asString) },
4374
- attributes: attributes && Object.entries(attributes).sort(([k0], [k1]) => k0.localeCompare(k1)).map(([key, value]) => ({
4375
- key,
4376
- value: value.toString()
4377
- }))
4378
- };
4379
- }
4380
- resourceUnitMemory(computeResources, asString) {
4381
- const attributes = computeResources.memory.attributes;
4382
- return {
4383
- quantity: {
4384
- val: this.resourceValue(convertResourceString(computeResources.memory.size), asString)
4385
- },
4386
- attributes: attributes && Object.entries(attributes).sort(([k0], [k1]) => k0.localeCompare(k1)).map(([key, value]) => ({
4387
- key,
4388
- value: value.toString()
4389
- }))
4390
- };
4391
- }
4392
- resourceUnitStorage(computeResources, asString) {
4393
- const storages = isArray(computeResources.storage) ? computeResources.storage : [computeResources.storage];
4394
- return storages.map((storage) => ({
4395
- name: storage.name || "default",
4396
- quantity: {
4397
- val: this.resourceValue(convertResourceString(storage.size), asString)
4398
- },
4399
- attributes: this.serviceResourceStorageAttributes(storage.attributes)
4400
- }));
4401
- }
4402
- transformGpuAttributes(attributes) {
4403
- return Object.entries(attributes.vendor).flatMap(
4404
- ([vendor, models]) => models ? models.map((model) => {
4405
- let key = `vendor/${vendor}/model/${model.model}`;
4406
- if (model.ram) {
4407
- key += `/ram/${model.ram}`;
4408
- }
4409
- if (model.interface) {
4410
- key += `/interface/${model.interface}`;
4411
- }
4412
- return {
4413
- key,
4414
- value: "true"
4415
- };
4416
- }) : [
4417
- {
4418
- key: `vendor/${vendor}/model/*`,
4419
- value: "true"
4420
- }
4421
- ]
4422
- );
4423
- }
4424
- resourceUnitGpu(computeResources, asString) {
4425
- const attributes = computeResources.gpu?.attributes;
4426
- const units = computeResources.gpu?.units || "0";
4427
- const gpu = isString(units) ? parseInt(units) : units;
4428
- return {
4429
- units: { val: this.resourceValue(gpu, asString) },
4430
- attributes: attributes && this.transformGpuAttributes(attributes)
4431
- };
4432
- }
4433
- groupResourceUnits(resource, asString) {
4434
- if (!resource) return {};
4435
- const units = {
4436
- endpoints: null
4437
- };
4438
- if (resource.cpu) {
4439
- units.cpu = this.resourceUnitCpu(resource, asString);
4440
- }
4441
- if (resource.memory) {
4442
- units.memory = this.resourceUnitMemory(resource, asString);
4443
- }
4444
- if (resource.storage) {
4445
- units.storage = this.resourceUnitStorage(resource, asString);
4446
- }
4447
- if (this.version === "beta3") {
4448
- units.gpu = this.resourceUnitGpu(resource, asString);
4449
- }
4450
- return units;
4451
- }
4452
- exposeShouldBeIngress(expose) {
4453
- const externalPort = expose.externalPort === 0 ? expose.port : expose.externalPort;
4454
- return expose.global && expose.proto === "TCP" && externalPort === 80;
4455
- }
4456
- groups() {
4457
- return this.version === "beta2" ? this.v2Groups() : this.v3Groups();
4458
- }
4459
- v3Groups() {
4460
- const groups = /* @__PURE__ */ new Map();
4461
- const services = Object.entries(this.data.services).sort(([a], [b]) => a.localeCompare(b));
4462
- for (const [svcName, service] of services) {
4463
- for (const [placementName, svcdepl] of Object.entries(this.data.deployment[svcName])) {
4464
- const compute = this.data.profiles.compute[svcdepl.profile];
4465
- const infra = this.data.profiles.placement[placementName];
4466
- const pricing = infra.pricing[svcdepl.profile];
4467
- const price = {
4468
- ...pricing,
4469
- amount: pricing.amount?.toString()
4470
- };
4471
- let group = groups.get(placementName);
4472
- if (!group) {
4473
- const attributes = infra.attributes ? Object.entries(infra.attributes).map(([key, value]) => ({
4474
- key,
4475
- value
4476
- })) : [];
4477
- attributes.sort((a, b) => a.key.localeCompare(b.key));
4478
- group = {
4479
- dgroup: {
4480
- name: placementName,
4481
- resources: [],
4482
- requirements: {
4483
- attributes,
4484
- signedBy: {
4485
- allOf: infra.signedBy?.allOf || [],
4486
- anyOf: infra.signedBy?.anyOf || []
4487
- }
4488
- }
4489
- },
4490
- boundComputes: {}
4491
- };
4492
- groups.set(placementName, group);
4493
- }
4494
- if (!group.boundComputes[placementName]) {
4495
- group.boundComputes[placementName] = {};
4496
- }
4497
- const location = group.boundComputes[placementName][svcdepl.profile];
4498
- if (!location) {
4499
- const res = this.groupResourceUnits(compute.resources, false);
4500
- res.endpoints = this.v3ServiceResourceEndpoints(service);
4501
- const resID = group.dgroup.resources.length > 0 ? group.dgroup.resources.length + 1 : 1;
4502
- res.id = resID;
4503
- group.dgroup.resources.push({
4504
- resource: res,
4505
- price,
4506
- count: svcdepl.count
4507
- });
4508
- group.boundComputes[placementName][svcdepl.profile] = group.dgroup.resources.length - 1;
4509
- } else {
4510
- const endpoints = this.v3ServiceResourceEndpoints(service);
4511
- group.dgroup.resources[location].count += svcdepl.count;
4512
- group.dgroup.resources[location].endpoints += endpoints;
4513
- group.dgroup.resources[location].endpoints.sort();
4514
- }
4515
- }
4516
- }
4517
- const names = [...groups.keys()].sort();
4518
- return names.map((name) => groups.get(name)).map((group) => group ? group.dgroup : {});
4519
- }
4520
- v2Groups() {
4521
- const yamlJson = this.data;
4522
- const ipEndpointNames = this.computeEndpointSequenceNumbers(yamlJson);
4523
- const groups = {};
4524
- Object.keys(yamlJson.services).forEach((svcName) => {
4525
- const svc = yamlJson.services[svcName];
4526
- const depl = yamlJson.deployment[svcName];
4527
- Object.keys(depl).forEach((placementName) => {
4528
- const svcdepl = depl[placementName];
4529
- const compute = yamlJson.profiles.compute[svcdepl.profile];
4530
- const infra = yamlJson.profiles.placement[placementName];
4531
- const pricing = infra.pricing[svcdepl.profile];
4532
- const price = {
4533
- ...pricing,
4534
- amount: pricing.amount.toString()
4535
- };
4536
- let group = groups[placementName];
4537
- if (!group) {
4538
- group = {
4539
- name: placementName,
4540
- requirements: {
4541
- attributes: infra.attributes ? Object.entries(infra.attributes).map(([key, value]) => ({
4542
- key,
4543
- value
4544
- })) : [],
4545
- signedBy: {
4546
- allOf: infra.signedBy?.allOf || [],
4547
- anyOf: infra.signedBy?.anyOf || []
4548
- }
4549
- },
4550
- resources: []
4551
- };
4552
- if (group.requirements.attributes) {
4553
- group.requirements.attributes = group.requirements.attributes.sort((a, b) => a.key < b.key);
4554
- }
4555
- groups[group.name] = group;
4556
- }
4557
- const resources = {
4558
- resources: this.groupResourceUnits(compute.resources, false),
4559
- // Changed resources => unit
4560
- price,
4561
- count: svcdepl.count
4562
- };
4563
- const endpoints = [];
4564
- svc?.expose?.forEach((expose) => {
4565
- expose?.to?.filter((to) => to.global).forEach((to) => {
4566
- const exposeSpec = {
4567
- port: expose.port,
4568
- externalPort: expose.as || 0,
4569
- proto: this.parseServiceProto(expose.proto),
4570
- global: !!to.global
4571
- };
4572
- if (to.ip?.length > 0) {
4573
- const seqNo = ipEndpointNames[to.ip];
4574
- endpoints.push({
4575
- kind: Endpoint_LEASED_IP,
4576
- sequence_number: seqNo
4577
- });
4578
- }
4579
- const kind = this.exposeShouldBeIngress(exposeSpec) ? Endpoint_SHARED_HTTP : Endpoint_RANDOM_PORT;
4580
- endpoints.push({ kind, sequence_number: 0 });
4581
- });
4582
- });
4583
- resources.resources.endpoints = endpoints;
4584
- group.resources.push(resources);
4585
- });
4586
- });
4587
- return Object.keys(groups).sort((a, b) => a < b ? 1 : 0).map((name) => groups[name]);
4588
- }
4589
- manifestSortedJSON() {
4590
- const manifest = this.manifest(true);
4591
- let jsonStr = JSON.stringify(manifest);
4592
- if (jsonStr) {
4593
- jsonStr = jsonStr.replaceAll('"quantity":{"val', '"size":{"val');
4594
- }
4595
- return __privateMethod(this, _SDL_instances, escapeHtml_fn).call(this, stableStringify(JSON.parse(jsonStr)) || "");
4596
- }
4597
- async manifestVersion() {
4598
- const jsonStr = this.manifestSortedJSON();
4599
- const enc = new TextEncoder();
4600
- const sortedBytes = enc.encode(jsonStr);
4601
- const sum = await crypto.subtle.digest("SHA-256", sortedBytes);
4602
- return new Uint8Array(sum);
4603
- }
4604
- manifestSorted() {
4605
- const sorted = this.manifestSortedJSON();
4606
- return JSON.parse(sorted);
4607
- }
4608
- };
4609
- _SDL_instances = new WeakSet();
4610
- /**
4611
- * Escapes HTML characters in a string.
4612
- *
4613
- * @param raw - The raw string to escape.
4614
- * @returns The escaped string.
4615
- *
4616
- * @example
4617
- * ```ts
4618
- * const escaped = sdl.escapeHtml("<div>Hello</div>");
4619
- * // escaped is "\\u003cdiv\\u003eHello\\u003c/div\\u003e"
4620
- * ```
4621
- */
4622
- escapeHtml_fn = function(raw) {
4623
- return raw.replace(/</g, "\\u003c").replace(/>/g, "\\u003e").replace(/&/g, "\\u0026");
4624
- };
4625
- var SDL = _SDL;
4626
-
4627
3882
  // src/sdl/manifest/manifestUtils.ts
4628
3883
  var encoder = new TextEncoder();
4629
3884
  function encodeResourceValue(value) {
@@ -4733,8 +3988,8 @@ function buildResourceAttributes(attributes) {
4733
3988
  }
4734
3989
 
4735
3990
  // src/sdl/manifest/generateManifest.ts
4736
- function generateManifest(sdl, networkId = MAINNET_ID) {
4737
- const errors = validateSDL(sdl, networkId);
3991
+ function generateManifest(sdl) {
3992
+ const errors = validateSDL(sdl);
4738
3993
  if (errors) return { ok: false, value: errors };
4739
3994
  const endpointSequenceNumbers = computeEndpointSequenceNumbers(sdl.services);
4740
3995
  const groupsMap = /* @__PURE__ */ new Map();
@@ -4939,7 +4194,7 @@ function buildManifestExpose(service, endpointSequenceNumbers) {
4939
4194
  }
4940
4195
 
4941
4196
  // src/sdl/manifest/generateManifestVersion.ts
4942
- import { default as stableStringify2 } from "json-stable-stringify";
4197
+ import { default as stableStringify } from "json-stable-stringify";
4943
4198
  var decoder = new TextDecoder();
4944
4199
  var encoder2 = new TextEncoder();
4945
4200
  var NULLABLE_MANIFEST_KEYS = /* @__PURE__ */ new Set(["command", "args", "env", "hosts"]);
@@ -4951,7 +4206,7 @@ async function generateManifestVersion(manifest) {
4951
4206
  return new Uint8Array(sum);
4952
4207
  }
4953
4208
  function manifestToSortedJSON(manifest) {
4954
- const json = stableStringify2(manifest, { replacer: manifestReplacer }) || "";
4209
+ const json = stableStringify(manifest, { replacer: manifestReplacer }) || "";
4955
4210
  return escapeHtml(renameFields(json));
4956
4211
  }
4957
4212
  function manifestReplacer(key, value) {
@@ -4989,6 +4244,13 @@ function escapeHtml(raw) {
4989
4244
  return raw.replace(HTML_SPECIAL_CHARS_REGEX, (ch) => htmlEscapes[ch]);
4990
4245
  }
4991
4246
 
4247
+ // src/network/config.ts
4248
+ var MAINNET_ID = "mainnet";
4249
+ var SANDBOX_ID = "sandbox";
4250
+ var TESTNET_ID = "testnet";
4251
+ var AKT_DENOM = "uakt";
4252
+ var ACT_DENOM = "uact";
4253
+
4992
4254
  // src/utils/yaml.ts
4993
4255
  import { load } from "js-yaml";
4994
4256
  function yaml(chunks, ...args) {
@@ -5273,1446 +4535,1245 @@ var require_ucs2length2 = __commonJS2({
5273
4535
  }
5274
4536
  });
5275
4537
  var validate2 = validate10;
5276
- 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": { "type": "string", "pattern": "^akash1[a-z0-9]{38}$", "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": { "type": "object", "additionalProperties": false, "required": ["access"], "properties": { "access": { "type": "string", "enum": ["full", "granular", "scoped"], "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." }, "scope": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "enum": ["send-manifest", "get-manifest", "logs", "shell", "events", "status", "restart", "hostname-migrate", "ip-migrate"] }, "description": "Global list of permitted actions across all owned leases (no duplicates). Required when access is 'scoped'." }, "permissions": { "type": "array", "description": "Required if leases.access is 'granular'; defines provider-specific permissions. The provider address must be unique across all permissions entries.", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["provider", "access"], "properties": { "provider": { "type": "string", "pattern": "^akash1[a-z0-9]{38}$", "description": "Provider address, e.g., akash1xyz... (44 characters)." }, "access": { "type": "string", "enum": ["full", "scoped", "granular"], "description": "Provider-level access: 'full' for all actions, 'scoped' for specific actions across all provider leases, 'granular' for deployment-specific actions." }, "scope": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "enum": ["send-manifest", "get-manifest", "logs", "shell", "events", "status", "restart", "hostname-migrate", "ip-migrate"] }, "description": "Provider-level list of permitted actions for 'scoped' access (no duplicates)." }, "deployments": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["dseq", "scope", "services"], "properties": { "dseq": { "type": "integer", "minimum": 1, "description": "Deployment sequence number." }, "scope": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "enum": ["send-manifest", "get-manifest", "logs", "shell", "events", "status", "restart", "hostname-migrate", "ip-migrate"] }, "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": { "gseq": ["dseq"], "oseq": ["dseq", "gseq"], "services": ["dseq"] } } } }, "allOf": [{ "if": { "properties": { "access": { "const": "scoped" } } }, "then": { "required": ["scope"], "properties": { "scope": { "minItems": 1 }, "deployments": false } } }, { "if": { "properties": { "access": { "const": "granular" } } }, "then": { "required": ["deployments"], "properties": { "scope": false } } }, { "if": { "properties": { "access": { "const": "full" } } }, "then": { "properties": { "scope": false, "deployments": false } } }] } } }, "allOf": [{ "if": { "properties": { "access": { "const": "full" } } }, "then": { "properties": { "permissions": false, "scope": false } } }, { "if": { "properties": { "access": { "const": "scoped" } } }, "then": { "required": ["scope"], "properties": { "scope": { "minItems": 1 }, "permissions": false } } }, { "if": { "properties": { "access": { "const": "granular" } }, "required": ["access"] }, "then": { "required": ["permissions"], "properties": { "scope": false } } }] } }, "allOf": [{ "if": { "properties": { "leases": { "properties": { "access": { "const": "granular" } }, "required": ["access"] } }, "required": ["leases"] }, "then": { "properties": { "leases": { "required": ["permissions"], "properties": { "scope": false } } } } }, { "if": { "properties": { "leases": { "properties": { "permissions": { "type": "array", "minItems": 1 } }, "required": ["permissions"] } }, "required": ["leases"] }, "then": { "properties": { "leases": { "properties": { "access": { "const": "granular" } }, "required": ["access"] } } } }] };
4538
+ 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"] } } } };
5277
4539
  var pattern0 = new RegExp("^akash1[a-z0-9]{38}$", "u");
5278
4540
  var func22 = require_ucs2length2().default;
5279
- function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5280
- ;
4541
+ 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"] } };
4542
+ function validate12(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5281
4543
  let vErrors = null;
5282
4544
  let errors = 0;
5283
- const _errs2 = errors;
5284
- let valid1 = true;
5285
- const _errs3 = errors;
5286
4545
  if (data && typeof data == "object" && !Array.isArray(data)) {
5287
- let missing0;
5288
- if (data.leases === void 0 && (missing0 = "leases")) {
5289
- const err0 = {};
4546
+ if (data.access === void 0) {
4547
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
5290
4548
  if (vErrors === null) {
5291
4549
  vErrors = [err0];
5292
4550
  } else {
5293
4551
  vErrors.push(err0);
5294
4552
  }
5295
4553
  errors++;
5296
- } else {
5297
- if (data.leases !== void 0) {
5298
- let data0 = data.leases;
5299
- if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
5300
- let missing1;
5301
- if (data0.access === void 0 && (missing1 = "access")) {
5302
- const err1 = {};
5303
- if (vErrors === null) {
5304
- vErrors = [err1];
5305
- } else {
5306
- vErrors.push(err1);
5307
- }
5308
- errors++;
5309
- } else {
5310
- if (data0.access !== void 0) {
5311
- if ("granular" !== data0.access) {
5312
- const err2 = {};
5313
- if (vErrors === null) {
5314
- vErrors = [err2];
5315
- } else {
5316
- vErrors.push(err2);
5317
- }
5318
- errors++;
5319
- }
5320
- }
5321
- }
4554
+ }
4555
+ if (data.scope === void 0) {
4556
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "scope" }, message: "must have required property 'scope'" };
4557
+ if (vErrors === null) {
4558
+ vErrors = [err1];
4559
+ } else {
4560
+ vErrors.push(err1);
4561
+ }
4562
+ errors++;
4563
+ }
4564
+ for (const key0 in data) {
4565
+ if (!(key0 === "access" || key0 === "scope")) {
4566
+ const err2 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
4567
+ if (vErrors === null) {
4568
+ vErrors = [err2];
4569
+ } else {
4570
+ vErrors.push(err2);
5322
4571
  }
4572
+ errors++;
5323
4573
  }
5324
4574
  }
5325
- }
5326
- var _valid0 = _errs3 === errors;
5327
- errors = _errs2;
5328
- if (vErrors !== null) {
5329
- if (_errs2) {
5330
- vErrors.length = _errs2;
5331
- } else {
5332
- vErrors = null;
4575
+ if (data.access !== void 0) {
4576
+ if ("scoped" !== data.access) {
4577
+ const err3 = { instancePath: instancePath + "/access", schemaPath: "#/properties/access/const", keyword: "const", params: { allowedValue: "scoped" }, message: "must be equal to constant" };
4578
+ if (vErrors === null) {
4579
+ vErrors = [err3];
4580
+ } else {
4581
+ vErrors.push(err3);
4582
+ }
4583
+ errors++;
4584
+ }
5333
4585
  }
5334
- }
5335
- if (_valid0) {
5336
- const _errs6 = errors;
5337
- if (data && typeof data == "object" && !Array.isArray(data)) {
5338
- if (data.leases !== void 0) {
5339
- let data2 = data.leases;
5340
- if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
5341
- if (data2.permissions === void 0) {
5342
- const err3 = { instancePath: instancePath + "/leases", schemaPath: "#/allOf/0/then/properties/leases/required", keyword: "required", params: { missingProperty: "permissions" }, message: "must have required property 'permissions'" };
4586
+ if (data.scope !== void 0) {
4587
+ let data1 = data.scope;
4588
+ if (Array.isArray(data1)) {
4589
+ if (data1.length < 1) {
4590
+ const err4 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
4591
+ if (vErrors === null) {
4592
+ vErrors = [err4];
4593
+ } else {
4594
+ vErrors.push(err4);
4595
+ }
4596
+ errors++;
4597
+ }
4598
+ const len0 = data1.length;
4599
+ for (let i0 = 0; i0 < len0; i0++) {
4600
+ let data2 = data1[i0];
4601
+ if (typeof data2 !== "string") {
4602
+ const err5 = { instancePath: instancePath + "/scope/" + i0, schemaPath: "#/definitions/action-scope/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5343
4603
  if (vErrors === null) {
5344
- vErrors = [err3];
4604
+ vErrors = [err5];
5345
4605
  } else {
5346
- vErrors.push(err3);
4606
+ vErrors.push(err5);
5347
4607
  }
5348
4608
  errors++;
5349
4609
  }
5350
- if (data2.scope !== void 0) {
5351
- const err4 = { instancePath: instancePath + "/leases/scope", schemaPath: "#/allOf/0/then/properties/leases/properties/scope/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
4610
+ if (!(data2 === "send-manifest" || data2 === "get-manifest" || data2 === "logs" || data2 === "shell" || data2 === "events" || data2 === "status" || data2 === "restart" || data2 === "hostname-migrate" || data2 === "ip-migrate")) {
4611
+ 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" };
5352
4612
  if (vErrors === null) {
5353
- vErrors = [err4];
4613
+ vErrors = [err6];
5354
4614
  } else {
5355
- vErrors.push(err4);
4615
+ vErrors.push(err6);
5356
4616
  }
5357
4617
  errors++;
5358
4618
  }
5359
4619
  }
5360
- }
5361
- }
5362
- var _valid0 = _errs6 === errors;
5363
- valid1 = _valid0;
5364
- }
5365
- if (!valid1) {
5366
- const err5 = { instancePath, schemaPath: "#/allOf/0/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
5367
- if (vErrors === null) {
5368
- vErrors = [err5];
5369
- } else {
5370
- vErrors.push(err5);
5371
- }
5372
- errors++;
5373
- }
5374
- const _errs9 = errors;
5375
- let valid6 = true;
5376
- const _errs10 = errors;
5377
- if (data && typeof data == "object" && !Array.isArray(data)) {
5378
- let missing2;
5379
- if (data.leases === void 0 && (missing2 = "leases")) {
5380
- const err6 = {};
5381
- if (vErrors === null) {
5382
- vErrors = [err6];
5383
- } else {
5384
- vErrors.push(err6);
5385
- }
5386
- errors++;
5387
- } else {
5388
- if (data.leases !== void 0) {
5389
- let data4 = data.leases;
5390
- if (data4 && typeof data4 == "object" && !Array.isArray(data4)) {
5391
- let missing3;
5392
- if (data4.permissions === void 0 && (missing3 = "permissions")) {
5393
- const err7 = {};
5394
- if (vErrors === null) {
5395
- vErrors = [err7];
5396
- } else {
5397
- vErrors.push(err7);
5398
- }
5399
- errors++;
5400
- } else {
5401
- if (data4.permissions !== void 0) {
5402
- let data5 = data4.permissions;
5403
- const _errs12 = errors;
5404
- if (errors === _errs12) {
5405
- if (Array.isArray(data5)) {
5406
- if (data5.length < 1) {
5407
- const err8 = {};
5408
- if (vErrors === null) {
5409
- vErrors = [err8];
5410
- } else {
5411
- vErrors.push(err8);
5412
- }
5413
- errors++;
5414
- }
5415
- } else {
5416
- const err9 = {};
5417
- if (vErrors === null) {
5418
- vErrors = [err9];
5419
- } else {
5420
- vErrors.push(err9);
5421
- }
5422
- errors++;
5423
- }
5424
- }
5425
- }
5426
- }
5427
- }
5428
- }
5429
- }
5430
- }
5431
- var _valid1 = _errs10 === errors;
5432
- errors = _errs9;
5433
- if (vErrors !== null) {
5434
- if (_errs9) {
5435
- vErrors.length = _errs9;
5436
- } else {
5437
- vErrors = null;
5438
- }
5439
- }
5440
- if (_valid1) {
5441
- const _errs14 = errors;
5442
- if (data && typeof data == "object" && !Array.isArray(data)) {
5443
- if (data.leases !== void 0) {
5444
- let data6 = data.leases;
5445
- if (data6 && typeof data6 == "object" && !Array.isArray(data6)) {
5446
- if (data6.access === void 0) {
5447
- const err10 = { instancePath: instancePath + "/leases", schemaPath: "#/allOf/1/then/properties/leases/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
5448
- if (vErrors === null) {
5449
- vErrors = [err10];
5450
- } else {
5451
- vErrors.push(err10);
4620
+ let i1 = data1.length;
4621
+ let j0;
4622
+ if (i1 > 1) {
4623
+ const indices0 = {};
4624
+ for (; i1--; ) {
4625
+ let item0 = data1[i1];
4626
+ if (typeof item0 !== "string") {
4627
+ continue;
5452
4628
  }
5453
- errors++;
5454
- }
5455
- if (data6.access !== void 0) {
5456
- if ("granular" !== data6.access) {
5457
- const err11 = { instancePath: instancePath + "/leases/access", schemaPath: "#/allOf/1/then/properties/leases/properties/access/const", keyword: "const", params: { allowedValue: "granular" }, message: "must be equal to constant" };
4629
+ if (typeof indices0[item0] == "number") {
4630
+ j0 = indices0[item0];
4631
+ const err7 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" };
5458
4632
  if (vErrors === null) {
5459
- vErrors = [err11];
4633
+ vErrors = [err7];
5460
4634
  } else {
5461
- vErrors.push(err11);
4635
+ vErrors.push(err7);
5462
4636
  }
5463
4637
  errors++;
4638
+ break;
5464
4639
  }
4640
+ indices0[item0] = i1;
5465
4641
  }
5466
4642
  }
4643
+ } else {
4644
+ const err8 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/type", keyword: "type", params: { type: "array" }, message: "must be array" };
4645
+ if (vErrors === null) {
4646
+ vErrors = [err8];
4647
+ } else {
4648
+ vErrors.push(err8);
4649
+ }
4650
+ errors++;
5467
4651
  }
5468
4652
  }
5469
- var _valid1 = _errs14 === errors;
5470
- valid6 = _valid1;
5471
- }
5472
- if (!valid6) {
5473
- const err12 = { instancePath, schemaPath: "#/allOf/1/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
4653
+ } else {
4654
+ const err9 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5474
4655
  if (vErrors === null) {
5475
- vErrors = [err12];
4656
+ vErrors = [err9];
5476
4657
  } else {
5477
- vErrors.push(err12);
4658
+ vErrors.push(err9);
5478
4659
  }
5479
4660
  errors++;
5480
4661
  }
4662
+ validate12.errors = vErrors;
4663
+ return errors === 0;
4664
+ }
4665
+ function validate16(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
4666
+ let vErrors = null;
4667
+ let errors = 0;
5481
4668
  if (data && typeof data == "object" && !Array.isArray(data)) {
5482
- if (data.iss === void 0) {
5483
- const err13 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "iss" }, message: "must have required property 'iss'" };
4669
+ if (data.provider === void 0) {
4670
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "provider" }, message: "must have required property 'provider'" };
5484
4671
  if (vErrors === null) {
5485
- vErrors = [err13];
4672
+ vErrors = [err0];
5486
4673
  } else {
5487
- vErrors.push(err13);
4674
+ vErrors.push(err0);
5488
4675
  }
5489
4676
  errors++;
5490
4677
  }
5491
- if (data.iat === void 0) {
5492
- const err14 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "iat" }, message: "must have required property 'iat'" };
4678
+ if (data.access === void 0) {
4679
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
5493
4680
  if (vErrors === null) {
5494
- vErrors = [err14];
4681
+ vErrors = [err1];
5495
4682
  } else {
5496
- vErrors.push(err14);
4683
+ vErrors.push(err1);
5497
4684
  }
5498
4685
  errors++;
5499
4686
  }
5500
- if (data.exp === void 0) {
5501
- const err15 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "exp" }, message: "must have required property 'exp'" };
5502
- if (vErrors === null) {
5503
- vErrors = [err15];
4687
+ for (const key0 in data) {
4688
+ if (!(key0 === "provider" || key0 === "access")) {
4689
+ const err2 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
4690
+ if (vErrors === null) {
4691
+ vErrors = [err2];
4692
+ } else {
4693
+ vErrors.push(err2);
4694
+ }
4695
+ errors++;
4696
+ }
4697
+ }
4698
+ if (data.provider !== void 0) {
4699
+ let data0 = data.provider;
4700
+ if (typeof data0 === "string") {
4701
+ if (!pattern0.test(data0)) {
4702
+ const err3 = { instancePath: instancePath + "/provider", schemaPath: "#/definitions/akash-address/pattern", keyword: "pattern", params: { pattern: "^akash1[a-z0-9]{38}$" }, message: 'must match pattern "^akash1[a-z0-9]{38}$"' };
4703
+ if (vErrors === null) {
4704
+ vErrors = [err3];
4705
+ } else {
4706
+ vErrors.push(err3);
4707
+ }
4708
+ errors++;
4709
+ }
5504
4710
  } else {
5505
- vErrors.push(err15);
4711
+ const err4 = { instancePath: instancePath + "/provider", schemaPath: "#/definitions/akash-address/type", keyword: "type", params: { type: "string" }, message: "must be string" };
4712
+ if (vErrors === null) {
4713
+ vErrors = [err4];
4714
+ } else {
4715
+ vErrors.push(err4);
4716
+ }
4717
+ errors++;
5506
4718
  }
5507
- errors++;
5508
4719
  }
5509
- if (data.nbf === void 0) {
5510
- const err16 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "nbf" }, message: "must have required property 'nbf'" };
4720
+ if (data.access !== void 0) {
4721
+ if ("full" !== data.access) {
4722
+ const err5 = { instancePath: instancePath + "/access", schemaPath: "#/properties/access/const", keyword: "const", params: { allowedValue: "full" }, message: "must be equal to constant" };
4723
+ if (vErrors === null) {
4724
+ vErrors = [err5];
4725
+ } else {
4726
+ vErrors.push(err5);
4727
+ }
4728
+ errors++;
4729
+ }
4730
+ }
4731
+ } else {
4732
+ const err6 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
4733
+ if (vErrors === null) {
4734
+ vErrors = [err6];
4735
+ } else {
4736
+ vErrors.push(err6);
4737
+ }
4738
+ errors++;
4739
+ }
4740
+ validate16.errors = vErrors;
4741
+ return errors === 0;
4742
+ }
4743
+ function validate18(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
4744
+ let vErrors = null;
4745
+ let errors = 0;
4746
+ if (data && typeof data == "object" && !Array.isArray(data)) {
4747
+ if (data.provider === void 0) {
4748
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "provider" }, message: "must have required property 'provider'" };
5511
4749
  if (vErrors === null) {
5512
- vErrors = [err16];
4750
+ vErrors = [err0];
5513
4751
  } else {
5514
- vErrors.push(err16);
4752
+ vErrors.push(err0);
5515
4753
  }
5516
4754
  errors++;
5517
4755
  }
5518
- if (data.version === void 0) {
5519
- const err17 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "version" }, message: "must have required property 'version'" };
4756
+ if (data.access === void 0) {
4757
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
5520
4758
  if (vErrors === null) {
5521
- vErrors = [err17];
4759
+ vErrors = [err1];
5522
4760
  } else {
5523
- vErrors.push(err17);
4761
+ vErrors.push(err1);
5524
4762
  }
5525
4763
  errors++;
5526
4764
  }
5527
- if (data.leases === void 0) {
5528
- const err18 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "leases" }, message: "must have required property 'leases'" };
4765
+ if (data.scope === void 0) {
4766
+ const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "scope" }, message: "must have required property 'scope'" };
5529
4767
  if (vErrors === null) {
5530
- vErrors = [err18];
4768
+ vErrors = [err2];
5531
4769
  } else {
5532
- vErrors.push(err18);
4770
+ vErrors.push(err2);
5533
4771
  }
5534
4772
  errors++;
5535
4773
  }
5536
4774
  for (const key0 in data) {
5537
- if (!(key0 === "iss" || key0 === "iat" || key0 === "nbf" || key0 === "exp" || key0 === "jti" || key0 === "version" || key0 === "leases")) {
5538
- const err19 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
4775
+ if (!(key0 === "provider" || key0 === "access" || key0 === "scope")) {
4776
+ const err3 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
5539
4777
  if (vErrors === null) {
5540
- vErrors = [err19];
4778
+ vErrors = [err3];
5541
4779
  } else {
5542
- vErrors.push(err19);
4780
+ vErrors.push(err3);
5543
4781
  }
5544
4782
  errors++;
5545
4783
  }
5546
4784
  }
5547
- if (data.iss !== void 0) {
5548
- let data8 = data.iss;
5549
- if (typeof data8 === "string") {
5550
- if (!pattern0.test(data8)) {
5551
- const err20 = { instancePath: instancePath + "/iss", schemaPath: "#/properties/iss/pattern", keyword: "pattern", params: { pattern: "^akash1[a-z0-9]{38}$" }, message: 'must match pattern "^akash1[a-z0-9]{38}$"' };
4785
+ if (data.provider !== void 0) {
4786
+ let data0 = data.provider;
4787
+ if (typeof data0 === "string") {
4788
+ if (!pattern0.test(data0)) {
4789
+ const err4 = { instancePath: instancePath + "/provider", schemaPath: "#/definitions/akash-address/pattern", keyword: "pattern", params: { pattern: "^akash1[a-z0-9]{38}$" }, message: 'must match pattern "^akash1[a-z0-9]{38}$"' };
5552
4790
  if (vErrors === null) {
5553
- vErrors = [err20];
4791
+ vErrors = [err4];
5554
4792
  } else {
5555
- vErrors.push(err20);
4793
+ vErrors.push(err4);
5556
4794
  }
5557
4795
  errors++;
5558
4796
  }
5559
4797
  } else {
5560
- const err21 = { instancePath: instancePath + "/iss", schemaPath: "#/properties/iss/type", keyword: "type", params: { type: "string" }, message: "must be string" };
4798
+ const err5 = { instancePath: instancePath + "/provider", schemaPath: "#/definitions/akash-address/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5561
4799
  if (vErrors === null) {
5562
- vErrors = [err21];
4800
+ vErrors = [err5];
5563
4801
  } else {
5564
- vErrors.push(err21);
4802
+ vErrors.push(err5);
5565
4803
  }
5566
4804
  errors++;
5567
4805
  }
5568
4806
  }
5569
- if (data.iat !== void 0) {
5570
- let data9 = data.iat;
5571
- if (!(typeof data9 == "number" && (!(data9 % 1) && !isNaN(data9)))) {
5572
- const err22 = { instancePath: instancePath + "/iat", schemaPath: "#/properties/iat/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
4807
+ if (data.access !== void 0) {
4808
+ if ("scoped" !== data.access) {
4809
+ const err6 = { instancePath: instancePath + "/access", schemaPath: "#/properties/access/const", keyword: "const", params: { allowedValue: "scoped" }, message: "must be equal to constant" };
5573
4810
  if (vErrors === null) {
5574
- vErrors = [err22];
4811
+ vErrors = [err6];
5575
4812
  } else {
5576
- vErrors.push(err22);
4813
+ vErrors.push(err6);
5577
4814
  }
5578
4815
  errors++;
5579
4816
  }
5580
- if (typeof data9 == "number") {
5581
- if (data9 < 0 || isNaN(data9)) {
5582
- const err23 = { instancePath: instancePath + "/iat", schemaPath: "#/properties/iat/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
4817
+ }
4818
+ if (data.scope !== void 0) {
4819
+ let data2 = data.scope;
4820
+ if (Array.isArray(data2)) {
4821
+ if (data2.length < 1) {
4822
+ const err7 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
5583
4823
  if (vErrors === null) {
5584
- vErrors = [err23];
4824
+ vErrors = [err7];
5585
4825
  } else {
5586
- vErrors.push(err23);
4826
+ vErrors.push(err7);
5587
4827
  }
5588
4828
  errors++;
5589
4829
  }
4830
+ const len0 = data2.length;
4831
+ for (let i0 = 0; i0 < len0; i0++) {
4832
+ let data3 = data2[i0];
4833
+ if (typeof data3 !== "string") {
4834
+ const err8 = { instancePath: instancePath + "/scope/" + i0, schemaPath: "#/definitions/action-scope/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
4835
+ if (vErrors === null) {
4836
+ vErrors = [err8];
4837
+ } else {
4838
+ vErrors.push(err8);
4839
+ }
4840
+ errors++;
4841
+ }
4842
+ if (!(data3 === "send-manifest" || data3 === "get-manifest" || data3 === "logs" || data3 === "shell" || data3 === "events" || data3 === "status" || data3 === "restart" || data3 === "hostname-migrate" || data3 === "ip-migrate")) {
4843
+ 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" };
4844
+ if (vErrors === null) {
4845
+ vErrors = [err9];
4846
+ } else {
4847
+ vErrors.push(err9);
4848
+ }
4849
+ errors++;
4850
+ }
4851
+ }
4852
+ let i1 = data2.length;
4853
+ let j0;
4854
+ if (i1 > 1) {
4855
+ const indices0 = {};
4856
+ for (; i1--; ) {
4857
+ let item0 = data2[i1];
4858
+ if (typeof item0 !== "string") {
4859
+ continue;
4860
+ }
4861
+ if (typeof indices0[item0] == "number") {
4862
+ j0 = indices0[item0];
4863
+ const err10 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" };
4864
+ if (vErrors === null) {
4865
+ vErrors = [err10];
4866
+ } else {
4867
+ vErrors.push(err10);
4868
+ }
4869
+ errors++;
4870
+ break;
4871
+ }
4872
+ indices0[item0] = i1;
4873
+ }
4874
+ }
4875
+ } else {
4876
+ const err11 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/type", keyword: "type", params: { type: "array" }, message: "must be array" };
4877
+ if (vErrors === null) {
4878
+ vErrors = [err11];
4879
+ } else {
4880
+ vErrors.push(err11);
4881
+ }
4882
+ errors++;
5590
4883
  }
5591
4884
  }
5592
- if (data.nbf !== void 0) {
5593
- let data10 = data.nbf;
5594
- if (!(typeof data10 == "number" && (!(data10 % 1) && !isNaN(data10)))) {
5595
- const err24 = { instancePath: instancePath + "/nbf", schemaPath: "#/properties/nbf/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
4885
+ } else {
4886
+ const err12 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
4887
+ if (vErrors === null) {
4888
+ vErrors = [err12];
4889
+ } else {
4890
+ vErrors.push(err12);
4891
+ }
4892
+ errors++;
4893
+ }
4894
+ validate18.errors = vErrors;
4895
+ return errors === 0;
4896
+ }
4897
+ function validate21(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
4898
+ let vErrors = null;
4899
+ let errors = 0;
4900
+ if (data && typeof data == "object" && !Array.isArray(data)) {
4901
+ if (data.dseq === void 0) {
4902
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "dseq" }, message: "must have required property 'dseq'" };
4903
+ if (vErrors === null) {
4904
+ vErrors = [err0];
4905
+ } else {
4906
+ vErrors.push(err0);
4907
+ }
4908
+ errors++;
4909
+ }
4910
+ if (data.scope === void 0) {
4911
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "scope" }, message: "must have required property 'scope'" };
4912
+ if (vErrors === null) {
4913
+ vErrors = [err1];
4914
+ } else {
4915
+ vErrors.push(err1);
4916
+ }
4917
+ errors++;
4918
+ }
4919
+ if (data.services === void 0) {
4920
+ const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "services" }, message: "must have required property 'services'" };
4921
+ if (vErrors === null) {
4922
+ vErrors = [err2];
4923
+ } else {
4924
+ vErrors.push(err2);
4925
+ }
4926
+ errors++;
4927
+ }
4928
+ for (const key0 in data) {
4929
+ if (!(key0 === "dseq" || key0 === "scope" || key0 === "gseq" || key0 === "oseq" || key0 === "services")) {
4930
+ const err3 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
5596
4931
  if (vErrors === null) {
5597
- vErrors = [err24];
4932
+ vErrors = [err3];
5598
4933
  } else {
5599
- vErrors.push(err24);
4934
+ vErrors.push(err3);
5600
4935
  }
5601
4936
  errors++;
5602
4937
  }
5603
- if (typeof data10 == "number") {
5604
- if (data10 < 0 || isNaN(data10)) {
5605
- const err25 = { instancePath: instancePath + "/nbf", schemaPath: "#/properties/nbf/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
5606
- if (vErrors === null) {
5607
- vErrors = [err25];
5608
- } else {
5609
- vErrors.push(err25);
5610
- }
5611
- errors++;
4938
+ }
4939
+ if (data.oseq !== void 0) {
4940
+ if (data.gseq === void 0) {
4941
+ const err4 = { instancePath, schemaPath: "#/dependencies", keyword: "dependencies", params: {
4942
+ property: "oseq",
4943
+ missingProperty: "gseq",
4944
+ depsCount: 1,
4945
+ deps: "gseq"
4946
+ }, message: "must have property gseq when property oseq is present" };
4947
+ if (vErrors === null) {
4948
+ vErrors = [err4];
4949
+ } else {
4950
+ vErrors.push(err4);
5612
4951
  }
4952
+ errors++;
5613
4953
  }
5614
4954
  }
5615
- if (data.exp !== void 0) {
5616
- let data11 = data.exp;
5617
- if (!(typeof data11 == "number" && (!(data11 % 1) && !isNaN(data11)))) {
5618
- const err26 = { instancePath: instancePath + "/exp", schemaPath: "#/properties/exp/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
4955
+ if (data.dseq !== void 0) {
4956
+ let data0 = data.dseq;
4957
+ if (!(typeof data0 == "number" && (!(data0 % 1) && !isNaN(data0)))) {
4958
+ const err5 = { instancePath: instancePath + "/dseq", schemaPath: "#/properties/dseq/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
5619
4959
  if (vErrors === null) {
5620
- vErrors = [err26];
4960
+ vErrors = [err5];
5621
4961
  } else {
5622
- vErrors.push(err26);
4962
+ vErrors.push(err5);
5623
4963
  }
5624
4964
  errors++;
5625
4965
  }
5626
- if (typeof data11 == "number") {
5627
- if (data11 < 0 || isNaN(data11)) {
5628
- const err27 = { instancePath: instancePath + "/exp", schemaPath: "#/properties/exp/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
4966
+ if (typeof data0 == "number") {
4967
+ if (data0 < 1 || isNaN(data0)) {
4968
+ const err6 = { instancePath: instancePath + "/dseq", schemaPath: "#/properties/dseq/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
5629
4969
  if (vErrors === null) {
5630
- vErrors = [err27];
4970
+ vErrors = [err6];
5631
4971
  } else {
5632
- vErrors.push(err27);
4972
+ vErrors.push(err6);
5633
4973
  }
5634
4974
  errors++;
5635
4975
  }
5636
4976
  }
5637
4977
  }
5638
- if (data.jti !== void 0) {
5639
- let data12 = data.jti;
5640
- if (typeof data12 === "string") {
5641
- if (func22(data12) < 1) {
5642
- const err28 = { instancePath: instancePath + "/jti", schemaPath: "#/properties/jti/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
4978
+ if (data.scope !== void 0) {
4979
+ let data1 = data.scope;
4980
+ if (Array.isArray(data1)) {
4981
+ if (data1.length < 1) {
4982
+ const err7 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
5643
4983
  if (vErrors === null) {
5644
- vErrors = [err28];
4984
+ vErrors = [err7];
5645
4985
  } else {
5646
- vErrors.push(err28);
4986
+ vErrors.push(err7);
5647
4987
  }
5648
4988
  errors++;
5649
4989
  }
4990
+ const len0 = data1.length;
4991
+ for (let i0 = 0; i0 < len0; i0++) {
4992
+ let data2 = data1[i0];
4993
+ if (typeof data2 !== "string") {
4994
+ const err8 = { instancePath: instancePath + "/scope/" + i0, schemaPath: "#/definitions/action-scope/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
4995
+ if (vErrors === null) {
4996
+ vErrors = [err8];
4997
+ } else {
4998
+ vErrors.push(err8);
4999
+ }
5000
+ errors++;
5001
+ }
5002
+ if (!(data2 === "send-manifest" || data2 === "get-manifest" || data2 === "logs" || data2 === "shell" || data2 === "events" || data2 === "status" || data2 === "restart" || data2 === "hostname-migrate" || data2 === "ip-migrate")) {
5003
+ 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" };
5004
+ if (vErrors === null) {
5005
+ vErrors = [err9];
5006
+ } else {
5007
+ vErrors.push(err9);
5008
+ }
5009
+ errors++;
5010
+ }
5011
+ }
5012
+ let i1 = data1.length;
5013
+ let j0;
5014
+ if (i1 > 1) {
5015
+ const indices0 = {};
5016
+ for (; i1--; ) {
5017
+ let item0 = data1[i1];
5018
+ if (typeof item0 !== "string") {
5019
+ continue;
5020
+ }
5021
+ if (typeof indices0[item0] == "number") {
5022
+ j0 = indices0[item0];
5023
+ const err10 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" };
5024
+ if (vErrors === null) {
5025
+ vErrors = [err10];
5026
+ } else {
5027
+ vErrors.push(err10);
5028
+ }
5029
+ errors++;
5030
+ break;
5031
+ }
5032
+ indices0[item0] = i1;
5033
+ }
5034
+ }
5650
5035
  } else {
5651
- const err29 = { instancePath: instancePath + "/jti", schemaPath: "#/properties/jti/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5036
+ const err11 = { instancePath: instancePath + "/scope", schemaPath: "#/definitions/action-scope/type", keyword: "type", params: { type: "array" }, message: "must be array" };
5652
5037
  if (vErrors === null) {
5653
- vErrors = [err29];
5038
+ vErrors = [err11];
5654
5039
  } else {
5655
- vErrors.push(err29);
5040
+ vErrors.push(err11);
5656
5041
  }
5657
5042
  errors++;
5658
5043
  }
5659
5044
  }
5660
- if (data.version !== void 0) {
5661
- let data13 = data.version;
5662
- if (typeof data13 !== "string") {
5663
- const err30 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5045
+ if (data.gseq !== void 0) {
5046
+ let data3 = data.gseq;
5047
+ if (!(typeof data3 == "number" && (!(data3 % 1) && !isNaN(data3)))) {
5048
+ const err12 = { instancePath: instancePath + "/gseq", schemaPath: "#/properties/gseq/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
5664
5049
  if (vErrors === null) {
5665
- vErrors = [err30];
5050
+ vErrors = [err12];
5666
5051
  } else {
5667
- vErrors.push(err30);
5052
+ vErrors.push(err12);
5668
5053
  }
5669
5054
  errors++;
5670
5055
  }
5671
- if (!(data13 === "v1")) {
5672
- const err31 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/enum", keyword: "enum", params: { allowedValues: schema11.properties.version.enum }, message: "must be equal to one of the allowed values" };
5056
+ if (typeof data3 == "number") {
5057
+ if (data3 < 0 || isNaN(data3)) {
5058
+ const err13 = { instancePath: instancePath + "/gseq", schemaPath: "#/properties/gseq/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
5059
+ if (vErrors === null) {
5060
+ vErrors = [err13];
5061
+ } else {
5062
+ vErrors.push(err13);
5063
+ }
5064
+ errors++;
5065
+ }
5066
+ }
5067
+ }
5068
+ if (data.oseq !== void 0) {
5069
+ let data4 = data.oseq;
5070
+ if (!(typeof data4 == "number" && (!(data4 % 1) && !isNaN(data4)))) {
5071
+ const err14 = { instancePath: instancePath + "/oseq", schemaPath: "#/properties/oseq/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
5673
5072
  if (vErrors === null) {
5674
- vErrors = [err31];
5073
+ vErrors = [err14];
5675
5074
  } else {
5676
- vErrors.push(err31);
5075
+ vErrors.push(err14);
5677
5076
  }
5678
5077
  errors++;
5679
5078
  }
5680
- }
5681
- if (data.leases !== void 0) {
5682
- let data14 = data.leases;
5683
- const _errs33 = errors;
5684
- let valid13 = true;
5685
- const _errs34 = errors;
5686
- if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
5687
- if (data14.access !== void 0) {
5688
- if ("full" !== data14.access) {
5689
- const err32 = {};
5690
- if (vErrors === null) {
5691
- vErrors = [err32];
5692
- } else {
5693
- vErrors.push(err32);
5694
- }
5695
- errors++;
5079
+ if (typeof data4 == "number") {
5080
+ if (data4 < 0 || isNaN(data4)) {
5081
+ const err15 = { instancePath: instancePath + "/oseq", schemaPath: "#/properties/oseq/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
5082
+ if (vErrors === null) {
5083
+ vErrors = [err15];
5084
+ } else {
5085
+ vErrors.push(err15);
5696
5086
  }
5087
+ errors++;
5697
5088
  }
5698
5089
  }
5699
- var _valid2 = _errs34 === errors;
5700
- errors = _errs33;
5701
- if (vErrors !== null) {
5702
- if (_errs33) {
5703
- vErrors.length = _errs33;
5704
- } else {
5705
- vErrors = null;
5090
+ }
5091
+ if (data.services !== void 0) {
5092
+ let data5 = data.services;
5093
+ if (Array.isArray(data5)) {
5094
+ if (data5.length < 1) {
5095
+ const err16 = { instancePath: instancePath + "/services", schemaPath: "#/properties/services/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
5096
+ if (vErrors === null) {
5097
+ vErrors = [err16];
5098
+ } else {
5099
+ vErrors.push(err16);
5100
+ }
5101
+ errors++;
5706
5102
  }
5707
- }
5708
- if (_valid2) {
5709
- const _errs36 = errors;
5710
- if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
5711
- if (data14.permissions !== void 0) {
5712
- const err33 = { instancePath: instancePath + "/leases/permissions", schemaPath: "#/properties/leases/allOf/0/then/properties/permissions/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
5103
+ const len1 = data5.length;
5104
+ for (let i2 = 0; i2 < len1; i2++) {
5105
+ let data6 = data5[i2];
5106
+ if (typeof data6 === "string") {
5107
+ if (func22(data6) < 1) {
5108
+ const err17 = { instancePath: instancePath + "/services/" + i2, schemaPath: "#/properties/services/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
5109
+ if (vErrors === null) {
5110
+ vErrors = [err17];
5111
+ } else {
5112
+ vErrors.push(err17);
5113
+ }
5114
+ errors++;
5115
+ }
5116
+ } else {
5117
+ const err18 = { instancePath: instancePath + "/services/" + i2, schemaPath: "#/properties/services/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5713
5118
  if (vErrors === null) {
5714
- vErrors = [err33];
5119
+ vErrors = [err18];
5715
5120
  } else {
5716
- vErrors.push(err33);
5121
+ vErrors.push(err18);
5717
5122
  }
5718
5123
  errors++;
5719
5124
  }
5720
- if (data14.scope !== void 0) {
5721
- const err34 = { instancePath: instancePath + "/leases/scope", schemaPath: "#/properties/leases/allOf/0/then/properties/scope/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
5722
- if (vErrors === null) {
5723
- vErrors = [err34];
5724
- } else {
5725
- vErrors.push(err34);
5125
+ }
5126
+ let i3 = data5.length;
5127
+ let j1;
5128
+ if (i3 > 1) {
5129
+ const indices1 = {};
5130
+ for (; i3--; ) {
5131
+ let item1 = data5[i3];
5132
+ if (typeof item1 !== "string") {
5133
+ continue;
5726
5134
  }
5727
- errors++;
5135
+ if (typeof indices1[item1] == "number") {
5136
+ j1 = indices1[item1];
5137
+ const err19 = { instancePath: instancePath + "/services", schemaPath: "#/properties/services/uniqueItems", keyword: "uniqueItems", params: { i: i3, j: j1 }, message: "must NOT have duplicate items (items ## " + j1 + " and " + i3 + " are identical)" };
5138
+ if (vErrors === null) {
5139
+ vErrors = [err19];
5140
+ } else {
5141
+ vErrors.push(err19);
5142
+ }
5143
+ errors++;
5144
+ break;
5145
+ }
5146
+ indices1[item1] = i3;
5728
5147
  }
5729
5148
  }
5730
- var _valid2 = _errs36 === errors;
5731
- valid13 = _valid2;
5732
- }
5733
- if (!valid13) {
5734
- const err35 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/allOf/0/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
5149
+ } else {
5150
+ const err20 = { instancePath: instancePath + "/services", schemaPath: "#/properties/services/type", keyword: "type", params: { type: "array" }, message: "must be array" };
5735
5151
  if (vErrors === null) {
5736
- vErrors = [err35];
5152
+ vErrors = [err20];
5737
5153
  } else {
5738
- vErrors.push(err35);
5154
+ vErrors.push(err20);
5739
5155
  }
5740
5156
  errors++;
5741
5157
  }
5742
- const _errs38 = errors;
5743
- let valid16 = true;
5744
- const _errs39 = errors;
5745
- if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
5746
- if (data14.access !== void 0) {
5747
- if ("scoped" !== data14.access) {
5748
- const err36 = {};
5749
- if (vErrors === null) {
5750
- vErrors = [err36];
5751
- } else {
5752
- vErrors.push(err36);
5753
- }
5754
- errors++;
5755
- }
5756
- }
5158
+ }
5159
+ } else {
5160
+ const err21 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5161
+ if (vErrors === null) {
5162
+ vErrors = [err21];
5163
+ } else {
5164
+ vErrors.push(err21);
5165
+ }
5166
+ errors++;
5167
+ }
5168
+ validate21.errors = vErrors;
5169
+ return errors === 0;
5170
+ }
5171
+ function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5172
+ let vErrors = null;
5173
+ let errors = 0;
5174
+ if (data && typeof data == "object" && !Array.isArray(data)) {
5175
+ if (data.provider === void 0) {
5176
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "provider" }, message: "must have required property 'provider'" };
5177
+ if (vErrors === null) {
5178
+ vErrors = [err0];
5179
+ } else {
5180
+ vErrors.push(err0);
5181
+ }
5182
+ errors++;
5183
+ }
5184
+ if (data.access === void 0) {
5185
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
5186
+ if (vErrors === null) {
5187
+ vErrors = [err1];
5188
+ } else {
5189
+ vErrors.push(err1);
5190
+ }
5191
+ errors++;
5192
+ }
5193
+ if (data.deployments === void 0) {
5194
+ const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "deployments" }, message: "must have required property 'deployments'" };
5195
+ if (vErrors === null) {
5196
+ vErrors = [err2];
5197
+ } else {
5198
+ vErrors.push(err2);
5757
5199
  }
5758
- var _valid3 = _errs39 === errors;
5759
- errors = _errs38;
5760
- if (vErrors !== null) {
5761
- if (_errs38) {
5762
- vErrors.length = _errs38;
5200
+ errors++;
5201
+ }
5202
+ for (const key0 in data) {
5203
+ if (!(key0 === "provider" || key0 === "access" || key0 === "deployments")) {
5204
+ const err3 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
5205
+ if (vErrors === null) {
5206
+ vErrors = [err3];
5763
5207
  } else {
5764
- vErrors = null;
5208
+ vErrors.push(err3);
5765
5209
  }
5210
+ errors++;
5766
5211
  }
5767
- if (_valid3) {
5768
- const _errs41 = errors;
5769
- if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
5770
- if (data14.scope === void 0) {
5771
- const err37 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/allOf/1/then/required", keyword: "required", params: { missingProperty: "scope" }, message: "must have required property 'scope'" };
5772
- if (vErrors === null) {
5773
- vErrors = [err37];
5774
- } else {
5775
- vErrors.push(err37);
5776
- }
5777
- errors++;
5778
- }
5779
- if (data14.scope !== void 0) {
5780
- let data19 = data14.scope;
5781
- if (Array.isArray(data19)) {
5782
- if (data19.length < 1) {
5783
- const err38 = { instancePath: instancePath + "/leases/scope", schemaPath: "#/properties/leases/allOf/1/then/properties/scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
5784
- if (vErrors === null) {
5785
- vErrors = [err38];
5786
- } else {
5787
- vErrors.push(err38);
5788
- }
5789
- errors++;
5790
- }
5791
- }
5792
- }
5793
- if (data14.permissions !== void 0) {
5794
- const err39 = { instancePath: instancePath + "/leases/permissions", schemaPath: "#/properties/leases/allOf/1/then/properties/permissions/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
5795
- if (vErrors === null) {
5796
- vErrors = [err39];
5797
- } else {
5798
- vErrors.push(err39);
5799
- }
5800
- errors++;
5212
+ }
5213
+ if (data.provider !== void 0) {
5214
+ let data0 = data.provider;
5215
+ if (typeof data0 === "string") {
5216
+ if (!pattern0.test(data0)) {
5217
+ const err4 = { instancePath: instancePath + "/provider", schemaPath: "#/definitions/akash-address/pattern", keyword: "pattern", params: { pattern: "^akash1[a-z0-9]{38}$" }, message: 'must match pattern "^akash1[a-z0-9]{38}$"' };
5218
+ if (vErrors === null) {
5219
+ vErrors = [err4];
5220
+ } else {
5221
+ vErrors.push(err4);
5801
5222
  }
5223
+ errors++;
5224
+ }
5225
+ } else {
5226
+ const err5 = { instancePath: instancePath + "/provider", schemaPath: "#/definitions/akash-address/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5227
+ if (vErrors === null) {
5228
+ vErrors = [err5];
5229
+ } else {
5230
+ vErrors.push(err5);
5802
5231
  }
5803
- var _valid3 = _errs41 === errors;
5804
- valid16 = _valid3;
5232
+ errors++;
5805
5233
  }
5806
- if (!valid16) {
5807
- const err40 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/allOf/1/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
5234
+ }
5235
+ if (data.access !== void 0) {
5236
+ if ("granular" !== data.access) {
5237
+ const err6 = { instancePath: instancePath + "/access", schemaPath: "#/properties/access/const", keyword: "const", params: { allowedValue: "granular" }, message: "must be equal to constant" };
5808
5238
  if (vErrors === null) {
5809
- vErrors = [err40];
5239
+ vErrors = [err6];
5810
5240
  } else {
5811
- vErrors.push(err40);
5241
+ vErrors.push(err6);
5812
5242
  }
5813
5243
  errors++;
5814
5244
  }
5815
- const _errs44 = errors;
5816
- let valid19 = true;
5817
- const _errs45 = errors;
5818
- if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
5819
- let missing4;
5820
- if (data14.access === void 0 && (missing4 = "access")) {
5821
- const err41 = {};
5245
+ }
5246
+ if (data.deployments !== void 0) {
5247
+ let data2 = data.deployments;
5248
+ if (Array.isArray(data2)) {
5249
+ if (data2.length < 1) {
5250
+ const err7 = { instancePath: instancePath + "/deployments", schemaPath: "#/properties/deployments/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
5822
5251
  if (vErrors === null) {
5823
- vErrors = [err41];
5252
+ vErrors = [err7];
5824
5253
  } else {
5825
- vErrors.push(err41);
5254
+ vErrors.push(err7);
5826
5255
  }
5827
5256
  errors++;
5828
- } else {
5829
- if (data14.access !== void 0) {
5830
- if ("granular" !== data14.access) {
5831
- const err42 = {};
5832
- if (vErrors === null) {
5833
- vErrors = [err42];
5834
- } else {
5835
- vErrors.push(err42);
5836
- }
5837
- errors++;
5838
- }
5257
+ }
5258
+ const len0 = data2.length;
5259
+ for (let i0 = 0; i0 < len0; i0++) {
5260
+ if (!validate21(data2[i0], { instancePath: instancePath + "/deployments/" + i0, parentData: data2, parentDataProperty: i0, rootData })) {
5261
+ vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);
5262
+ errors = vErrors.length;
5839
5263
  }
5840
5264
  }
5841
- }
5842
- var _valid4 = _errs45 === errors;
5843
- errors = _errs44;
5844
- if (vErrors !== null) {
5845
- if (_errs44) {
5846
- vErrors.length = _errs44;
5265
+ } else {
5266
+ const err8 = { instancePath: instancePath + "/deployments", schemaPath: "#/properties/deployments/type", keyword: "type", params: { type: "array" }, message: "must be array" };
5267
+ if (vErrors === null) {
5268
+ vErrors = [err8];
5847
5269
  } else {
5848
- vErrors = null;
5270
+ vErrors.push(err8);
5849
5271
  }
5272
+ errors++;
5850
5273
  }
5851
- if (_valid4) {
5852
- const _errs47 = errors;
5853
- if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
5854
- if (data14.permissions === void 0) {
5855
- const err43 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/allOf/2/then/required", keyword: "required", params: { missingProperty: "permissions" }, message: "must have required property 'permissions'" };
5856
- if (vErrors === null) {
5857
- vErrors = [err43];
5858
- } else {
5859
- vErrors.push(err43);
5860
- }
5861
- errors++;
5862
- }
5863
- if (data14.scope !== void 0) {
5864
- const err44 = { instancePath: instancePath + "/leases/scope", schemaPath: "#/properties/leases/allOf/2/then/properties/scope/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
5865
- if (vErrors === null) {
5866
- vErrors = [err44];
5867
- } else {
5868
- vErrors.push(err44);
5869
- }
5870
- errors++;
5871
- }
5274
+ }
5275
+ } else {
5276
+ const err9 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5277
+ if (vErrors === null) {
5278
+ vErrors = [err9];
5279
+ } else {
5280
+ vErrors.push(err9);
5281
+ }
5282
+ errors++;
5283
+ }
5284
+ validate20.errors = vErrors;
5285
+ return errors === 0;
5286
+ }
5287
+ function validate15(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5288
+ let vErrors = null;
5289
+ let errors = 0;
5290
+ if (!(data && typeof data == "object" && !Array.isArray(data))) {
5291
+ const err0 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5292
+ if (vErrors === null) {
5293
+ vErrors = [err0];
5294
+ } else {
5295
+ vErrors.push(err0);
5296
+ }
5297
+ errors++;
5298
+ }
5299
+ const _errs1 = errors;
5300
+ let valid0 = false;
5301
+ let passing0 = null;
5302
+ const _errs2 = errors;
5303
+ if (!validate16(data, { instancePath, parentData, parentDataProperty, rootData })) {
5304
+ vErrors = vErrors === null ? validate16.errors : vErrors.concat(validate16.errors);
5305
+ errors = vErrors.length;
5306
+ }
5307
+ var _valid0 = _errs2 === errors;
5308
+ if (_valid0) {
5309
+ valid0 = true;
5310
+ passing0 = 0;
5311
+ }
5312
+ const _errs3 = errors;
5313
+ if (!validate18(data, { instancePath, parentData, parentDataProperty, rootData })) {
5314
+ vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);
5315
+ errors = vErrors.length;
5316
+ }
5317
+ var _valid0 = _errs3 === errors;
5318
+ if (_valid0 && valid0) {
5319
+ valid0 = false;
5320
+ passing0 = [passing0, 1];
5321
+ } else {
5322
+ if (_valid0) {
5323
+ valid0 = true;
5324
+ passing0 = 1;
5325
+ }
5326
+ const _errs4 = errors;
5327
+ if (!validate20(data, { instancePath, parentData, parentDataProperty, rootData })) {
5328
+ vErrors = vErrors === null ? validate20.errors : vErrors.concat(validate20.errors);
5329
+ errors = vErrors.length;
5330
+ }
5331
+ var _valid0 = _errs4 === errors;
5332
+ if (_valid0 && valid0) {
5333
+ valid0 = false;
5334
+ passing0 = [passing0, 2];
5335
+ } else {
5336
+ if (_valid0) {
5337
+ valid0 = true;
5338
+ passing0 = 2;
5339
+ }
5340
+ }
5341
+ }
5342
+ if (!valid0) {
5343
+ const err1 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
5344
+ if (vErrors === null) {
5345
+ vErrors = [err1];
5346
+ } else {
5347
+ vErrors.push(err1);
5348
+ }
5349
+ errors++;
5350
+ } else {
5351
+ errors = _errs1;
5352
+ if (vErrors !== null) {
5353
+ if (_errs1) {
5354
+ vErrors.length = _errs1;
5355
+ } else {
5356
+ vErrors = null;
5357
+ }
5358
+ }
5359
+ }
5360
+ validate15.errors = vErrors;
5361
+ return errors === 0;
5362
+ }
5363
+ function validate14(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5364
+ let vErrors = null;
5365
+ let errors = 0;
5366
+ if (data && typeof data == "object" && !Array.isArray(data)) {
5367
+ if (data.access === void 0) {
5368
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
5369
+ if (vErrors === null) {
5370
+ vErrors = [err0];
5371
+ } else {
5372
+ vErrors.push(err0);
5373
+ }
5374
+ errors++;
5375
+ }
5376
+ if (data.permissions === void 0) {
5377
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "permissions" }, message: "must have required property 'permissions'" };
5378
+ if (vErrors === null) {
5379
+ vErrors = [err1];
5380
+ } else {
5381
+ vErrors.push(err1);
5382
+ }
5383
+ errors++;
5384
+ }
5385
+ for (const key0 in data) {
5386
+ if (!(key0 === "access" || key0 === "permissions")) {
5387
+ const err2 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
5388
+ if (vErrors === null) {
5389
+ vErrors = [err2];
5390
+ } else {
5391
+ vErrors.push(err2);
5872
5392
  }
5873
- var _valid4 = _errs47 === errors;
5874
- valid19 = _valid4;
5393
+ errors++;
5875
5394
  }
5876
- if (!valid19) {
5877
- const err45 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/allOf/2/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
5395
+ }
5396
+ if (data.access !== void 0) {
5397
+ if ("granular" !== data.access) {
5398
+ const err3 = { instancePath: instancePath + "/access", schemaPath: "#/properties/access/const", keyword: "const", params: { allowedValue: "granular" }, message: "must be equal to constant" };
5878
5399
  if (vErrors === null) {
5879
- vErrors = [err45];
5400
+ vErrors = [err3];
5880
5401
  } else {
5881
- vErrors.push(err45);
5402
+ vErrors.push(err3);
5882
5403
  }
5883
5404
  errors++;
5884
5405
  }
5885
- if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
5886
- if (data14.access === void 0) {
5887
- const err46 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
5406
+ }
5407
+ if (data.permissions !== void 0) {
5408
+ let data1 = data.permissions;
5409
+ if (Array.isArray(data1)) {
5410
+ if (data1.length < 1) {
5411
+ const err4 = { instancePath: instancePath + "/permissions", schemaPath: "#/properties/permissions/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
5888
5412
  if (vErrors === null) {
5889
- vErrors = [err46];
5413
+ vErrors = [err4];
5890
5414
  } else {
5891
- vErrors.push(err46);
5415
+ vErrors.push(err4);
5892
5416
  }
5893
5417
  errors++;
5894
5418
  }
5895
- for (const key1 in data14) {
5896
- if (!(key1 === "access" || key1 === "scope" || key1 === "permissions")) {
5897
- const err47 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
5898
- if (vErrors === null) {
5899
- vErrors = [err47];
5900
- } else {
5901
- vErrors.push(err47);
5902
- }
5903
- errors++;
5904
- }
5905
- }
5906
- if (data14.access !== void 0) {
5907
- let data23 = data14.access;
5908
- if (typeof data23 !== "string") {
5909
- const err48 = { instancePath: instancePath + "/leases/access", schemaPath: "#/properties/leases/properties/access/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5910
- if (vErrors === null) {
5911
- vErrors = [err48];
5912
- } else {
5913
- vErrors.push(err48);
5914
- }
5915
- errors++;
5916
- }
5917
- if (!(data23 === "full" || data23 === "granular" || data23 === "scoped")) {
5918
- const err49 = { instancePath: instancePath + "/leases/access", schemaPath: "#/properties/leases/properties/access/enum", keyword: "enum", params: { allowedValues: schema11.properties.leases.properties.access.enum }, message: "must be equal to one of the allowed values" };
5919
- if (vErrors === null) {
5920
- vErrors = [err49];
5921
- } else {
5922
- vErrors.push(err49);
5923
- }
5924
- errors++;
5419
+ const len0 = data1.length;
5420
+ for (let i0 = 0; i0 < len0; i0++) {
5421
+ if (!validate15(data1[i0], { instancePath: instancePath + "/permissions/" + i0, parentData: data1, parentDataProperty: i0, rootData })) {
5422
+ vErrors = vErrors === null ? validate15.errors : vErrors.concat(validate15.errors);
5423
+ errors = vErrors.length;
5925
5424
  }
5926
5425
  }
5927
- if (data14.scope !== void 0) {
5928
- let data24 = data14.scope;
5929
- if (Array.isArray(data24)) {
5930
- if (data24.length < 1) {
5931
- const err50 = { instancePath: instancePath + "/leases/scope", schemaPath: "#/properties/leases/properties/scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
5932
- if (vErrors === null) {
5933
- vErrors = [err50];
5934
- } else {
5935
- vErrors.push(err50);
5936
- }
5937
- errors++;
5938
- }
5939
- const len0 = data24.length;
5940
- for (let i0 = 0; i0 < len0; i0++) {
5941
- let data25 = data24[i0];
5942
- if (typeof data25 !== "string") {
5943
- const err51 = { instancePath: instancePath + "/leases/scope/" + i0, schemaPath: "#/properties/leases/properties/scope/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5944
- if (vErrors === null) {
5945
- vErrors = [err51];
5946
- } else {
5947
- vErrors.push(err51);
5948
- }
5949
- errors++;
5950
- }
5951
- if (!(data25 === "send-manifest" || data25 === "get-manifest" || data25 === "logs" || data25 === "shell" || data25 === "events" || data25 === "status" || data25 === "restart" || data25 === "hostname-migrate" || data25 === "ip-migrate")) {
5952
- const err52 = { instancePath: instancePath + "/leases/scope/" + i0, schemaPath: "#/properties/leases/properties/scope/items/enum", keyword: "enum", params: { allowedValues: schema11.properties.leases.properties.scope.items.enum }, message: "must be equal to one of the allowed values" };
5953
- if (vErrors === null) {
5954
- vErrors = [err52];
5955
- } else {
5956
- vErrors.push(err52);
5957
- }
5958
- errors++;
5959
- }
5960
- }
5961
- let i1 = data24.length;
5962
- let j0;
5963
- if (i1 > 1) {
5964
- const indices0 = {};
5965
- for (; i1--; ) {
5966
- let item0 = data24[i1];
5967
- if (typeof item0 !== "string") {
5968
- continue;
5969
- }
5970
- if (typeof indices0[item0] == "number") {
5971
- j0 = indices0[item0];
5972
- const err53 = { instancePath: instancePath + "/leases/scope", schemaPath: "#/properties/leases/properties/scope/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" };
5973
- if (vErrors === null) {
5974
- vErrors = [err53];
5975
- } else {
5976
- vErrors.push(err53);
5977
- }
5978
- errors++;
5979
- break;
5980
- }
5981
- indices0[item0] = i1;
5982
- }
5983
- }
5984
- } else {
5985
- const err54 = { instancePath: instancePath + "/leases/scope", schemaPath: "#/properties/leases/properties/scope/type", keyword: "type", params: { type: "array" }, message: "must be array" };
5986
- if (vErrors === null) {
5987
- vErrors = [err54];
5988
- } else {
5989
- vErrors.push(err54);
5990
- }
5991
- errors++;
5992
- }
5426
+ } else {
5427
+ const err5 = { instancePath: instancePath + "/permissions", schemaPath: "#/properties/permissions/type", keyword: "type", params: { type: "array" }, message: "must be array" };
5428
+ if (vErrors === null) {
5429
+ vErrors = [err5];
5430
+ } else {
5431
+ vErrors.push(err5);
5993
5432
  }
5994
- if (data14.permissions !== void 0) {
5995
- let data26 = data14.permissions;
5996
- if (Array.isArray(data26)) {
5997
- if (data26.length < 1) {
5998
- const err55 = { instancePath: instancePath + "/leases/permissions", schemaPath: "#/properties/leases/properties/permissions/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
5999
- if (vErrors === null) {
6000
- vErrors = [err55];
6001
- } else {
6002
- vErrors.push(err55);
6003
- }
6004
- errors++;
6005
- }
6006
- const len1 = data26.length;
6007
- for (let i2 = 0; i2 < len1; i2++) {
6008
- let data27 = data26[i2];
6009
- const _errs60 = errors;
6010
- let valid29 = true;
6011
- const _errs61 = errors;
6012
- if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
6013
- if (data27.access !== void 0) {
6014
- if ("scoped" !== data27.access) {
6015
- const err56 = {};
6016
- if (vErrors === null) {
6017
- vErrors = [err56];
6018
- } else {
6019
- vErrors.push(err56);
6020
- }
6021
- errors++;
6022
- }
6023
- }
6024
- }
6025
- var _valid5 = _errs61 === errors;
6026
- errors = _errs60;
6027
- if (vErrors !== null) {
6028
- if (_errs60) {
6029
- vErrors.length = _errs60;
6030
- } else {
6031
- vErrors = null;
6032
- }
6033
- }
6034
- if (_valid5) {
6035
- const _errs63 = errors;
6036
- if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
6037
- if (data27.scope === void 0) {
6038
- const err57 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/allOf/0/then/required", keyword: "required", params: { missingProperty: "scope" }, message: "must have required property 'scope'" };
6039
- if (vErrors === null) {
6040
- vErrors = [err57];
6041
- } else {
6042
- vErrors.push(err57);
6043
- }
6044
- errors++;
6045
- }
6046
- if (data27.scope !== void 0) {
6047
- let data29 = data27.scope;
6048
- if (Array.isArray(data29)) {
6049
- if (data29.length < 1) {
6050
- const err58 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/allOf/0/then/properties/scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
6051
- if (vErrors === null) {
6052
- vErrors = [err58];
6053
- } else {
6054
- vErrors.push(err58);
6055
- }
6056
- errors++;
6057
- }
6058
- }
6059
- }
6060
- if (data27.deployments !== void 0) {
6061
- const err59 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments", schemaPath: "#/properties/leases/properties/permissions/items/allOf/0/then/properties/deployments/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
6062
- if (vErrors === null) {
6063
- vErrors = [err59];
6064
- } else {
6065
- vErrors.push(err59);
6066
- }
6067
- errors++;
6068
- }
6069
- }
6070
- var _valid5 = _errs63 === errors;
6071
- valid29 = _valid5;
6072
- }
6073
- if (!valid29) {
6074
- const err60 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/allOf/0/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
6075
- if (vErrors === null) {
6076
- vErrors = [err60];
6077
- } else {
6078
- vErrors.push(err60);
6079
- }
6080
- errors++;
6081
- }
6082
- const _errs66 = errors;
6083
- let valid32 = true;
6084
- const _errs67 = errors;
6085
- if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
6086
- if (data27.access !== void 0) {
6087
- if ("granular" !== data27.access) {
6088
- const err61 = {};
6089
- if (vErrors === null) {
6090
- vErrors = [err61];
6091
- } else {
6092
- vErrors.push(err61);
6093
- }
6094
- errors++;
6095
- }
6096
- }
6097
- }
6098
- var _valid6 = _errs67 === errors;
6099
- errors = _errs66;
6100
- if (vErrors !== null) {
6101
- if (_errs66) {
6102
- vErrors.length = _errs66;
6103
- } else {
6104
- vErrors = null;
6105
- }
6106
- }
6107
- if (_valid6) {
6108
- const _errs69 = errors;
6109
- if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
6110
- if (data27.deployments === void 0) {
6111
- const err62 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/allOf/1/then/required", keyword: "required", params: { missingProperty: "deployments" }, message: "must have required property 'deployments'" };
6112
- if (vErrors === null) {
6113
- vErrors = [err62];
6114
- } else {
6115
- vErrors.push(err62);
6116
- }
6117
- errors++;
6118
- }
6119
- if (data27.scope !== void 0) {
6120
- const err63 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/allOf/1/then/properties/scope/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
6121
- if (vErrors === null) {
6122
- vErrors = [err63];
6123
- } else {
6124
- vErrors.push(err63);
6125
- }
6126
- errors++;
6127
- }
6128
- }
6129
- var _valid6 = _errs69 === errors;
6130
- valid32 = _valid6;
6131
- }
6132
- if (!valid32) {
6133
- const err64 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/allOf/1/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
6134
- if (vErrors === null) {
6135
- vErrors = [err64];
6136
- } else {
6137
- vErrors.push(err64);
6138
- }
6139
- errors++;
6140
- }
6141
- const _errs71 = errors;
6142
- let valid35 = true;
6143
- const _errs72 = errors;
6144
- if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
6145
- if (data27.access !== void 0) {
6146
- if ("full" !== data27.access) {
6147
- const err65 = {};
6148
- if (vErrors === null) {
6149
- vErrors = [err65];
6150
- } else {
6151
- vErrors.push(err65);
6152
- }
6153
- errors++;
6154
- }
6155
- }
6156
- }
6157
- var _valid7 = _errs72 === errors;
6158
- errors = _errs71;
6159
- if (vErrors !== null) {
6160
- if (_errs71) {
6161
- vErrors.length = _errs71;
6162
- } else {
6163
- vErrors = null;
6164
- }
6165
- }
6166
- if (_valid7) {
6167
- const _errs74 = errors;
6168
- if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
6169
- if (data27.scope !== void 0) {
6170
- const err66 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/allOf/2/then/properties/scope/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
6171
- if (vErrors === null) {
6172
- vErrors = [err66];
6173
- } else {
6174
- vErrors.push(err66);
6175
- }
6176
- errors++;
6177
- }
6178
- if (data27.deployments !== void 0) {
6179
- const err67 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments", schemaPath: "#/properties/leases/properties/permissions/items/allOf/2/then/properties/deployments/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" };
6180
- if (vErrors === null) {
6181
- vErrors = [err67];
6182
- } else {
6183
- vErrors.push(err67);
6184
- }
6185
- errors++;
6186
- }
6187
- }
6188
- var _valid7 = _errs74 === errors;
6189
- valid35 = _valid7;
6190
- }
6191
- if (!valid35) {
6192
- const err68 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/allOf/2/if", keyword: "if", params: { failingKeyword: "then" }, message: 'must match "then" schema' };
6193
- if (vErrors === null) {
6194
- vErrors = [err68];
6195
- } else {
6196
- vErrors.push(err68);
6197
- }
6198
- errors++;
6199
- }
6200
- if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
6201
- if (data27.provider === void 0) {
6202
- const err69 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/required", keyword: "required", params: { missingProperty: "provider" }, message: "must have required property 'provider'" };
6203
- if (vErrors === null) {
6204
- vErrors = [err69];
6205
- } else {
6206
- vErrors.push(err69);
6207
- }
6208
- errors++;
6209
- }
6210
- if (data27.access === void 0) {
6211
- const err70 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
6212
- if (vErrors === null) {
6213
- vErrors = [err70];
6214
- } else {
6215
- vErrors.push(err70);
6216
- }
6217
- errors++;
6218
- }
6219
- for (const key2 in data27) {
6220
- if (!(key2 === "provider" || key2 === "access" || key2 === "scope" || key2 === "deployments")) {
6221
- const err71 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
6222
- if (vErrors === null) {
6223
- vErrors = [err71];
6224
- } else {
6225
- vErrors.push(err71);
6226
- }
6227
- errors++;
6228
- }
6229
- }
6230
- if (data27.provider !== void 0) {
6231
- let data36 = data27.provider;
6232
- if (typeof data36 === "string") {
6233
- if (!pattern0.test(data36)) {
6234
- const err72 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/provider", schemaPath: "#/properties/leases/properties/permissions/items/properties/provider/pattern", keyword: "pattern", params: { pattern: "^akash1[a-z0-9]{38}$" }, message: 'must match pattern "^akash1[a-z0-9]{38}$"' };
6235
- if (vErrors === null) {
6236
- vErrors = [err72];
6237
- } else {
6238
- vErrors.push(err72);
6239
- }
6240
- errors++;
6241
- }
6242
- } else {
6243
- const err73 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/provider", schemaPath: "#/properties/leases/properties/permissions/items/properties/provider/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6244
- if (vErrors === null) {
6245
- vErrors = [err73];
6246
- } else {
6247
- vErrors.push(err73);
6248
- }
6249
- errors++;
6250
- }
6251
- }
6252
- if (data27.access !== void 0) {
6253
- let data37 = data27.access;
6254
- if (typeof data37 !== "string") {
6255
- const err74 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/access", schemaPath: "#/properties/leases/properties/permissions/items/properties/access/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6256
- if (vErrors === null) {
6257
- vErrors = [err74];
6258
- } else {
6259
- vErrors.push(err74);
6260
- }
6261
- errors++;
6262
- }
6263
- if (!(data37 === "full" || data37 === "scoped" || data37 === "granular")) {
6264
- const err75 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/access", schemaPath: "#/properties/leases/properties/permissions/items/properties/access/enum", keyword: "enum", params: { allowedValues: schema11.properties.leases.properties.permissions.items.properties.access.enum }, message: "must be equal to one of the allowed values" };
6265
- if (vErrors === null) {
6266
- vErrors = [err75];
6267
- } else {
6268
- vErrors.push(err75);
6269
- }
6270
- errors++;
6271
- }
6272
- }
6273
- if (data27.scope !== void 0) {
6274
- let data38 = data27.scope;
6275
- if (Array.isArray(data38)) {
6276
- if (data38.length < 1) {
6277
- const err76 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/properties/scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
6278
- if (vErrors === null) {
6279
- vErrors = [err76];
6280
- } else {
6281
- vErrors.push(err76);
6282
- }
6283
- errors++;
6284
- }
6285
- const len2 = data38.length;
6286
- for (let i3 = 0; i3 < len2; i3++) {
6287
- let data39 = data38[i3];
6288
- if (typeof data39 !== "string") {
6289
- const err77 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope/" + i3, schemaPath: "#/properties/leases/properties/permissions/items/properties/scope/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6290
- if (vErrors === null) {
6291
- vErrors = [err77];
6292
- } else {
6293
- vErrors.push(err77);
6294
- }
6295
- errors++;
6296
- }
6297
- if (!(data39 === "send-manifest" || data39 === "get-manifest" || data39 === "logs" || data39 === "shell" || data39 === "events" || data39 === "status" || data39 === "restart" || data39 === "hostname-migrate" || data39 === "ip-migrate")) {
6298
- const err78 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope/" + i3, schemaPath: "#/properties/leases/properties/permissions/items/properties/scope/items/enum", keyword: "enum", params: { allowedValues: schema11.properties.leases.properties.permissions.items.properties.scope.items.enum }, message: "must be equal to one of the allowed values" };
6299
- if (vErrors === null) {
6300
- vErrors = [err78];
6301
- } else {
6302
- vErrors.push(err78);
6303
- }
6304
- errors++;
6305
- }
6306
- }
6307
- let i4 = data38.length;
6308
- let j1;
6309
- if (i4 > 1) {
6310
- const indices1 = {};
6311
- for (; i4--; ) {
6312
- let item1 = data38[i4];
6313
- if (typeof item1 !== "string") {
6314
- continue;
6315
- }
6316
- if (typeof indices1[item1] == "number") {
6317
- j1 = indices1[item1];
6318
- const err79 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/properties/scope/uniqueItems", keyword: "uniqueItems", params: { i: i4, j: j1 }, message: "must NOT have duplicate items (items ## " + j1 + " and " + i4 + " are identical)" };
6319
- if (vErrors === null) {
6320
- vErrors = [err79];
6321
- } else {
6322
- vErrors.push(err79);
6323
- }
6324
- errors++;
6325
- break;
6326
- }
6327
- indices1[item1] = i4;
6328
- }
6329
- }
6330
- } else {
6331
- const err80 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/properties/scope/type", keyword: "type", params: { type: "array" }, message: "must be array" };
6332
- if (vErrors === null) {
6333
- vErrors = [err80];
6334
- } else {
6335
- vErrors.push(err80);
6336
- }
6337
- errors++;
6338
- }
6339
- }
6340
- if (data27.deployments !== void 0) {
6341
- let data40 = data27.deployments;
6342
- if (Array.isArray(data40)) {
6343
- if (data40.length < 1) {
6344
- const err81 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
6345
- if (vErrors === null) {
6346
- vErrors = [err81];
6347
- } else {
6348
- vErrors.push(err81);
6349
- }
6350
- errors++;
6351
- }
6352
- const len3 = data40.length;
6353
- for (let i5 = 0; i5 < len3; i5++) {
6354
- let data41 = data40[i5];
6355
- if (data41 && typeof data41 == "object" && !Array.isArray(data41)) {
6356
- if (data41.dseq === void 0) {
6357
- const err82 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/required", keyword: "required", params: { missingProperty: "dseq" }, message: "must have required property 'dseq'" };
6358
- if (vErrors === null) {
6359
- vErrors = [err82];
6360
- } else {
6361
- vErrors.push(err82);
6362
- }
6363
- errors++;
6364
- }
6365
- if (data41.scope === void 0) {
6366
- const err83 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/required", keyword: "required", params: { missingProperty: "scope" }, message: "must have required property 'scope'" };
6367
- if (vErrors === null) {
6368
- vErrors = [err83];
6369
- } else {
6370
- vErrors.push(err83);
6371
- }
6372
- errors++;
6373
- }
6374
- if (data41.services === void 0) {
6375
- const err84 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/required", keyword: "required", params: { missingProperty: "services" }, message: "must have required property 'services'" };
6376
- if (vErrors === null) {
6377
- vErrors = [err84];
6378
- } else {
6379
- vErrors.push(err84);
6380
- }
6381
- errors++;
6382
- }
6383
- for (const key3 in data41) {
6384
- if (!(key3 === "dseq" || key3 === "scope" || key3 === "gseq" || key3 === "oseq" || key3 === "services")) {
6385
- const err85 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
6386
- if (vErrors === null) {
6387
- vErrors = [err85];
6388
- } else {
6389
- vErrors.push(err85);
6390
- }
6391
- errors++;
6392
- }
6393
- }
6394
- if (data41.gseq !== void 0) {
6395
- if (data41.dseq === void 0) {
6396
- const err86 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/dependencies", keyword: "dependencies", params: {
6397
- property: "gseq",
6398
- missingProperty: "dseq",
6399
- depsCount: 1,
6400
- deps: "dseq"
6401
- }, message: "must have property dseq when property gseq is present" };
6402
- if (vErrors === null) {
6403
- vErrors = [err86];
6404
- } else {
6405
- vErrors.push(err86);
6406
- }
6407
- errors++;
6408
- }
6409
- }
6410
- if (data41.oseq !== void 0) {
6411
- if (data41.dseq === void 0) {
6412
- const err87 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/dependencies", keyword: "dependencies", params: {
6413
- property: "oseq",
6414
- missingProperty: "dseq",
6415
- depsCount: 2,
6416
- deps: "dseq, gseq"
6417
- }, message: "must have properties dseq, gseq when property oseq is present" };
6418
- if (vErrors === null) {
6419
- vErrors = [err87];
6420
- } else {
6421
- vErrors.push(err87);
6422
- }
6423
- errors++;
6424
- }
6425
- if (data41.gseq === void 0) {
6426
- const err88 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/dependencies", keyword: "dependencies", params: {
6427
- property: "oseq",
6428
- missingProperty: "gseq",
6429
- depsCount: 2,
6430
- deps: "dseq, gseq"
6431
- }, message: "must have properties dseq, gseq when property oseq is present" };
6432
- if (vErrors === null) {
6433
- vErrors = [err88];
6434
- } else {
6435
- vErrors.push(err88);
6436
- }
6437
- errors++;
6438
- }
6439
- }
6440
- if (data41.services !== void 0) {
6441
- if (data41.dseq === void 0) {
6442
- const err89 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/dependencies", keyword: "dependencies", params: {
6443
- property: "services",
6444
- missingProperty: "dseq",
6445
- depsCount: 1,
6446
- deps: "dseq"
6447
- }, message: "must have property dseq when property services is present" };
6448
- if (vErrors === null) {
6449
- vErrors = [err89];
6450
- } else {
6451
- vErrors.push(err89);
6452
- }
6453
- errors++;
6454
- }
6455
- }
6456
- if (data41.dseq !== void 0) {
6457
- let data42 = data41.dseq;
6458
- if (!(typeof data42 == "number" && (!(data42 % 1) && !isNaN(data42)))) {
6459
- const err90 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/dseq", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/dseq/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
6460
- if (vErrors === null) {
6461
- vErrors = [err90];
6462
- } else {
6463
- vErrors.push(err90);
6464
- }
6465
- errors++;
6466
- }
6467
- if (typeof data42 == "number") {
6468
- if (data42 < 1 || isNaN(data42)) {
6469
- const err91 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/dseq", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/dseq/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
6470
- if (vErrors === null) {
6471
- vErrors = [err91];
6472
- } else {
6473
- vErrors.push(err91);
6474
- }
6475
- errors++;
6476
- }
6477
- }
6478
- }
6479
- if (data41.scope !== void 0) {
6480
- let data43 = data41.scope;
6481
- if (Array.isArray(data43)) {
6482
- if (data43.length < 1) {
6483
- const err92 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/scope/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
6484
- if (vErrors === null) {
6485
- vErrors = [err92];
6486
- } else {
6487
- vErrors.push(err92);
6488
- }
6489
- errors++;
6490
- }
6491
- const len4 = data43.length;
6492
- for (let i6 = 0; i6 < len4; i6++) {
6493
- let data44 = data43[i6];
6494
- if (typeof data44 !== "string") {
6495
- const err93 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/scope/" + i6, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/scope/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6496
- if (vErrors === null) {
6497
- vErrors = [err93];
6498
- } else {
6499
- vErrors.push(err93);
6500
- }
6501
- errors++;
6502
- }
6503
- if (!(data44 === "send-manifest" || data44 === "get-manifest" || data44 === "logs" || data44 === "shell" || data44 === "events" || data44 === "status" || data44 === "restart" || data44 === "hostname-migrate" || data44 === "ip-migrate")) {
6504
- const err94 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/scope/" + i6, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/scope/items/enum", keyword: "enum", params: { allowedValues: schema11.properties.leases.properties.permissions.items.properties.deployments.items.properties.scope.items.enum }, message: "must be equal to one of the allowed values" };
6505
- if (vErrors === null) {
6506
- vErrors = [err94];
6507
- } else {
6508
- vErrors.push(err94);
6509
- }
6510
- errors++;
6511
- }
6512
- }
6513
- let i7 = data43.length;
6514
- let j2;
6515
- if (i7 > 1) {
6516
- const indices2 = {};
6517
- for (; i7--; ) {
6518
- let item2 = data43[i7];
6519
- if (typeof item2 !== "string") {
6520
- continue;
6521
- }
6522
- if (typeof indices2[item2] == "number") {
6523
- j2 = indices2[item2];
6524
- const err95 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/scope/uniqueItems", keyword: "uniqueItems", params: { i: i7, j: j2 }, message: "must NOT have duplicate items (items ## " + j2 + " and " + i7 + " are identical)" };
6525
- if (vErrors === null) {
6526
- vErrors = [err95];
6527
- } else {
6528
- vErrors.push(err95);
6529
- }
6530
- errors++;
6531
- break;
6532
- }
6533
- indices2[item2] = i7;
6534
- }
6535
- }
6536
- } else {
6537
- const err96 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/scope", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/scope/type", keyword: "type", params: { type: "array" }, message: "must be array" };
6538
- if (vErrors === null) {
6539
- vErrors = [err96];
6540
- } else {
6541
- vErrors.push(err96);
6542
- }
6543
- errors++;
6544
- }
6545
- }
6546
- if (data41.gseq !== void 0) {
6547
- let data45 = data41.gseq;
6548
- if (!(typeof data45 == "number" && (!(data45 % 1) && !isNaN(data45)))) {
6549
- const err97 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/gseq", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/gseq/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
6550
- if (vErrors === null) {
6551
- vErrors = [err97];
6552
- } else {
6553
- vErrors.push(err97);
6554
- }
6555
- errors++;
6556
- }
6557
- if (typeof data45 == "number") {
6558
- if (data45 < 0 || isNaN(data45)) {
6559
- const err98 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/gseq", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/gseq/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
6560
- if (vErrors === null) {
6561
- vErrors = [err98];
6562
- } else {
6563
- vErrors.push(err98);
6564
- }
6565
- errors++;
6566
- }
6567
- }
6568
- }
6569
- if (data41.oseq !== void 0) {
6570
- let data46 = data41.oseq;
6571
- if (!(typeof data46 == "number" && (!(data46 % 1) && !isNaN(data46)))) {
6572
- const err99 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/oseq", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/oseq/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
6573
- if (vErrors === null) {
6574
- vErrors = [err99];
6575
- } else {
6576
- vErrors.push(err99);
6577
- }
6578
- errors++;
6579
- }
6580
- if (typeof data46 == "number") {
6581
- if (data46 < 0 || isNaN(data46)) {
6582
- const err100 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/oseq", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/oseq/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
6583
- if (vErrors === null) {
6584
- vErrors = [err100];
6585
- } else {
6586
- vErrors.push(err100);
6587
- }
6588
- errors++;
6589
- }
6590
- }
6591
- }
6592
- if (data41.services !== void 0) {
6593
- let data47 = data41.services;
6594
- if (Array.isArray(data47)) {
6595
- if (data47.length < 1) {
6596
- const err101 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/services", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/services/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
6597
- if (vErrors === null) {
6598
- vErrors = [err101];
6599
- } else {
6600
- vErrors.push(err101);
6601
- }
6602
- errors++;
6603
- }
6604
- const len5 = data47.length;
6605
- for (let i8 = 0; i8 < len5; i8++) {
6606
- let data48 = data47[i8];
6607
- if (typeof data48 === "string") {
6608
- if (func22(data48) < 1) {
6609
- const err102 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/services/" + i8, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/services/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
6610
- if (vErrors === null) {
6611
- vErrors = [err102];
6612
- } else {
6613
- vErrors.push(err102);
6614
- }
6615
- errors++;
6616
- }
6617
- } else {
6618
- const err103 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/services/" + i8, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/services/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6619
- if (vErrors === null) {
6620
- vErrors = [err103];
6621
- } else {
6622
- vErrors.push(err103);
6623
- }
6624
- errors++;
6625
- }
6626
- }
6627
- let i9 = data47.length;
6628
- let j3;
6629
- if (i9 > 1) {
6630
- const indices3 = {};
6631
- for (; i9--; ) {
6632
- let item3 = data47[i9];
6633
- if (typeof item3 !== "string") {
6634
- continue;
6635
- }
6636
- if (typeof indices3[item3] == "number") {
6637
- j3 = indices3[item3];
6638
- const err104 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/services", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/services/uniqueItems", keyword: "uniqueItems", params: { i: i9, j: j3 }, message: "must NOT have duplicate items (items ## " + j3 + " and " + i9 + " are identical)" };
6639
- if (vErrors === null) {
6640
- vErrors = [err104];
6641
- } else {
6642
- vErrors.push(err104);
6643
- }
6644
- errors++;
6645
- break;
6646
- }
6647
- indices3[item3] = i9;
6648
- }
6649
- }
6650
- } else {
6651
- const err105 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5 + "/services", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/properties/services/type", keyword: "type", params: { type: "array" }, message: "must be array" };
6652
- if (vErrors === null) {
6653
- vErrors = [err105];
6654
- } else {
6655
- vErrors.push(err105);
6656
- }
6657
- errors++;
6658
- }
6659
- }
6660
- } else {
6661
- const err106 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments/" + i5, schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
6662
- if (vErrors === null) {
6663
- vErrors = [err106];
6664
- } else {
6665
- vErrors.push(err106);
6666
- }
6667
- errors++;
6668
- }
6669
- }
6670
- } else {
6671
- const err107 = { instancePath: instancePath + "/leases/permissions/" + i2 + "/deployments", schemaPath: "#/properties/leases/properties/permissions/items/properties/deployments/type", keyword: "type", params: { type: "array" }, message: "must be array" };
6672
- if (vErrors === null) {
6673
- vErrors = [err107];
6674
- } else {
6675
- vErrors.push(err107);
6676
- }
6677
- errors++;
6678
- }
6679
- }
6680
- } else {
6681
- const err108 = { instancePath: instancePath + "/leases/permissions/" + i2, schemaPath: "#/properties/leases/properties/permissions/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
6682
- if (vErrors === null) {
6683
- vErrors = [err108];
6684
- } else {
6685
- vErrors.push(err108);
6686
- }
6687
- errors++;
6688
- }
6689
- }
5433
+ errors++;
5434
+ }
5435
+ }
5436
+ } else {
5437
+ const err6 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5438
+ if (vErrors === null) {
5439
+ vErrors = [err6];
5440
+ } else {
5441
+ vErrors.push(err6);
5442
+ }
5443
+ errors++;
5444
+ }
5445
+ validate14.errors = vErrors;
5446
+ return errors === 0;
5447
+ }
5448
+ function validate11(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5449
+ let vErrors = null;
5450
+ let errors = 0;
5451
+ if (!(data && typeof data == "object" && !Array.isArray(data))) {
5452
+ const err0 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5453
+ if (vErrors === null) {
5454
+ vErrors = [err0];
5455
+ } else {
5456
+ vErrors.push(err0);
5457
+ }
5458
+ errors++;
5459
+ }
5460
+ const _errs1 = errors;
5461
+ let valid0 = false;
5462
+ let passing0 = null;
5463
+ const _errs2 = errors;
5464
+ if (data && typeof data == "object" && !Array.isArray(data)) {
5465
+ if (data.access === void 0) {
5466
+ const err1 = { instancePath, schemaPath: "#/definitions/leases-full/required", keyword: "required", params: { missingProperty: "access" }, message: "must have required property 'access'" };
5467
+ if (vErrors === null) {
5468
+ vErrors = [err1];
5469
+ } else {
5470
+ vErrors.push(err1);
5471
+ }
5472
+ errors++;
5473
+ }
5474
+ for (const key0 in data) {
5475
+ if (!(key0 === "access")) {
5476
+ const err2 = { instancePath, schemaPath: "#/definitions/leases-full/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
5477
+ if (vErrors === null) {
5478
+ vErrors = [err2];
5479
+ } else {
5480
+ vErrors.push(err2);
5481
+ }
5482
+ errors++;
5483
+ }
5484
+ }
5485
+ if (data.access !== void 0) {
5486
+ if ("full" !== data.access) {
5487
+ const err3 = { instancePath: instancePath + "/access", schemaPath: "#/definitions/leases-full/properties/access/const", keyword: "const", params: { allowedValue: "full" }, message: "must be equal to constant" };
5488
+ if (vErrors === null) {
5489
+ vErrors = [err3];
5490
+ } else {
5491
+ vErrors.push(err3);
5492
+ }
5493
+ errors++;
5494
+ }
5495
+ }
5496
+ } else {
5497
+ const err4 = { instancePath, schemaPath: "#/definitions/leases-full/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5498
+ if (vErrors === null) {
5499
+ vErrors = [err4];
5500
+ } else {
5501
+ vErrors.push(err4);
5502
+ }
5503
+ errors++;
5504
+ }
5505
+ var _valid0 = _errs2 === errors;
5506
+ if (_valid0) {
5507
+ valid0 = true;
5508
+ passing0 = 0;
5509
+ }
5510
+ const _errs7 = errors;
5511
+ if (!validate12(data, { instancePath, parentData, parentDataProperty, rootData })) {
5512
+ vErrors = vErrors === null ? validate12.errors : vErrors.concat(validate12.errors);
5513
+ errors = vErrors.length;
5514
+ }
5515
+ var _valid0 = _errs7 === errors;
5516
+ if (_valid0 && valid0) {
5517
+ valid0 = false;
5518
+ passing0 = [passing0, 1];
5519
+ } else {
5520
+ if (_valid0) {
5521
+ valid0 = true;
5522
+ passing0 = 1;
5523
+ }
5524
+ const _errs8 = errors;
5525
+ if (!validate14(data, { instancePath, parentData, parentDataProperty, rootData })) {
5526
+ vErrors = vErrors === null ? validate14.errors : vErrors.concat(validate14.errors);
5527
+ errors = vErrors.length;
5528
+ }
5529
+ var _valid0 = _errs8 === errors;
5530
+ if (_valid0 && valid0) {
5531
+ valid0 = false;
5532
+ passing0 = [passing0, 2];
5533
+ } else {
5534
+ if (_valid0) {
5535
+ valid0 = true;
5536
+ passing0 = 2;
5537
+ }
5538
+ }
5539
+ }
5540
+ if (!valid0) {
5541
+ const err5 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
5542
+ if (vErrors === null) {
5543
+ vErrors = [err5];
5544
+ } else {
5545
+ vErrors.push(err5);
5546
+ }
5547
+ errors++;
5548
+ } else {
5549
+ errors = _errs1;
5550
+ if (vErrors !== null) {
5551
+ if (_errs1) {
5552
+ vErrors.length = _errs1;
5553
+ } else {
5554
+ vErrors = null;
5555
+ }
5556
+ }
5557
+ }
5558
+ validate11.errors = vErrors;
5559
+ return errors === 0;
5560
+ }
5561
+ function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5562
+ ;
5563
+ let vErrors = null;
5564
+ let errors = 0;
5565
+ if (data && typeof data == "object" && !Array.isArray(data)) {
5566
+ if (data.iss === void 0) {
5567
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "iss" }, message: "must have required property 'iss'" };
5568
+ if (vErrors === null) {
5569
+ vErrors = [err0];
5570
+ } else {
5571
+ vErrors.push(err0);
5572
+ }
5573
+ errors++;
5574
+ }
5575
+ if (data.iat === void 0) {
5576
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "iat" }, message: "must have required property 'iat'" };
5577
+ if (vErrors === null) {
5578
+ vErrors = [err1];
5579
+ } else {
5580
+ vErrors.push(err1);
5581
+ }
5582
+ errors++;
5583
+ }
5584
+ if (data.exp === void 0) {
5585
+ const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "exp" }, message: "must have required property 'exp'" };
5586
+ if (vErrors === null) {
5587
+ vErrors = [err2];
5588
+ } else {
5589
+ vErrors.push(err2);
5590
+ }
5591
+ errors++;
5592
+ }
5593
+ if (data.nbf === void 0) {
5594
+ const err3 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "nbf" }, message: "must have required property 'nbf'" };
5595
+ if (vErrors === null) {
5596
+ vErrors = [err3];
5597
+ } else {
5598
+ vErrors.push(err3);
5599
+ }
5600
+ errors++;
5601
+ }
5602
+ if (data.version === void 0) {
5603
+ const err4 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "version" }, message: "must have required property 'version'" };
5604
+ if (vErrors === null) {
5605
+ vErrors = [err4];
5606
+ } else {
5607
+ vErrors.push(err4);
5608
+ }
5609
+ errors++;
5610
+ }
5611
+ if (data.leases === void 0) {
5612
+ const err5 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "leases" }, message: "must have required property 'leases'" };
5613
+ if (vErrors === null) {
5614
+ vErrors = [err5];
5615
+ } else {
5616
+ vErrors.push(err5);
5617
+ }
5618
+ errors++;
5619
+ }
5620
+ for (const key0 in data) {
5621
+ if (!(key0 === "iss" || key0 === "iat" || key0 === "nbf" || key0 === "exp" || key0 === "jti" || key0 === "version" || key0 === "leases")) {
5622
+ const err6 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
5623
+ if (vErrors === null) {
5624
+ vErrors = [err6];
5625
+ } else {
5626
+ vErrors.push(err6);
5627
+ }
5628
+ errors++;
5629
+ }
5630
+ }
5631
+ if (data.iss !== void 0) {
5632
+ let data0 = data.iss;
5633
+ if (typeof data0 === "string") {
5634
+ if (!pattern0.test(data0)) {
5635
+ const err7 = { instancePath: instancePath + "/iss", schemaPath: "#/definitions/akash-address/pattern", keyword: "pattern", params: { pattern: "^akash1[a-z0-9]{38}$" }, message: 'must match pattern "^akash1[a-z0-9]{38}$"' };
5636
+ if (vErrors === null) {
5637
+ vErrors = [err7];
6690
5638
  } else {
6691
- const err109 = { instancePath: instancePath + "/leases/permissions", schemaPath: "#/properties/leases/properties/permissions/type", keyword: "type", params: { type: "array" }, message: "must be array" };
6692
- if (vErrors === null) {
6693
- vErrors = [err109];
6694
- } else {
6695
- vErrors.push(err109);
6696
- }
6697
- errors++;
5639
+ vErrors.push(err7);
5640
+ }
5641
+ errors++;
5642
+ }
5643
+ } else {
5644
+ const err8 = { instancePath: instancePath + "/iss", schemaPath: "#/definitions/akash-address/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5645
+ if (vErrors === null) {
5646
+ vErrors = [err8];
5647
+ } else {
5648
+ vErrors.push(err8);
5649
+ }
5650
+ errors++;
5651
+ }
5652
+ }
5653
+ if (data.iat !== void 0) {
5654
+ let data1 = data.iat;
5655
+ if (!(typeof data1 == "number" && (!(data1 % 1) && !isNaN(data1)))) {
5656
+ const err9 = { instancePath: instancePath + "/iat", schemaPath: "#/properties/iat/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
5657
+ if (vErrors === null) {
5658
+ vErrors = [err9];
5659
+ } else {
5660
+ vErrors.push(err9);
5661
+ }
5662
+ errors++;
5663
+ }
5664
+ if (typeof data1 == "number") {
5665
+ if (data1 < 0 || isNaN(data1)) {
5666
+ const err10 = { instancePath: instancePath + "/iat", schemaPath: "#/properties/iat/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
5667
+ if (vErrors === null) {
5668
+ vErrors = [err10];
5669
+ } else {
5670
+ vErrors.push(err10);
5671
+ }
5672
+ errors++;
5673
+ }
5674
+ }
5675
+ }
5676
+ if (data.nbf !== void 0) {
5677
+ let data2 = data.nbf;
5678
+ if (!(typeof data2 == "number" && (!(data2 % 1) && !isNaN(data2)))) {
5679
+ const err11 = { instancePath: instancePath + "/nbf", schemaPath: "#/properties/nbf/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
5680
+ if (vErrors === null) {
5681
+ vErrors = [err11];
5682
+ } else {
5683
+ vErrors.push(err11);
5684
+ }
5685
+ errors++;
5686
+ }
5687
+ if (typeof data2 == "number") {
5688
+ if (data2 < 0 || isNaN(data2)) {
5689
+ const err12 = { instancePath: instancePath + "/nbf", schemaPath: "#/properties/nbf/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
5690
+ if (vErrors === null) {
5691
+ vErrors = [err12];
5692
+ } else {
5693
+ vErrors.push(err12);
5694
+ }
5695
+ errors++;
5696
+ }
5697
+ }
5698
+ }
5699
+ if (data.exp !== void 0) {
5700
+ let data3 = data.exp;
5701
+ if (!(typeof data3 == "number" && (!(data3 % 1) && !isNaN(data3)))) {
5702
+ const err13 = { instancePath: instancePath + "/exp", schemaPath: "#/properties/exp/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
5703
+ if (vErrors === null) {
5704
+ vErrors = [err13];
5705
+ } else {
5706
+ vErrors.push(err13);
5707
+ }
5708
+ errors++;
5709
+ }
5710
+ if (typeof data3 == "number") {
5711
+ if (data3 < 0 || isNaN(data3)) {
5712
+ const err14 = { instancePath: instancePath + "/exp", schemaPath: "#/properties/exp/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
5713
+ if (vErrors === null) {
5714
+ vErrors = [err14];
5715
+ } else {
5716
+ vErrors.push(err14);
5717
+ }
5718
+ errors++;
5719
+ }
5720
+ }
5721
+ }
5722
+ if (data.jti !== void 0) {
5723
+ let data4 = data.jti;
5724
+ if (typeof data4 === "string") {
5725
+ if (func22(data4) < 1) {
5726
+ const err15 = { instancePath: instancePath + "/jti", schemaPath: "#/properties/jti/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
5727
+ if (vErrors === null) {
5728
+ vErrors = [err15];
5729
+ } else {
5730
+ vErrors.push(err15);
6698
5731
  }
5732
+ errors++;
6699
5733
  }
6700
5734
  } else {
6701
- const err110 = { instancePath: instancePath + "/leases", schemaPath: "#/properties/leases/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5735
+ const err16 = { instancePath: instancePath + "/jti", schemaPath: "#/properties/jti/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5736
+ if (vErrors === null) {
5737
+ vErrors = [err16];
5738
+ } else {
5739
+ vErrors.push(err16);
5740
+ }
5741
+ errors++;
5742
+ }
5743
+ }
5744
+ if (data.version !== void 0) {
5745
+ let data5 = data.version;
5746
+ if (typeof data5 !== "string") {
5747
+ const err17 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5748
+ if (vErrors === null) {
5749
+ vErrors = [err17];
5750
+ } else {
5751
+ vErrors.push(err17);
5752
+ }
5753
+ errors++;
5754
+ }
5755
+ if (!(data5 === "v1")) {
5756
+ const err18 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/enum", keyword: "enum", params: { allowedValues: schema11.properties.version.enum }, message: "must be equal to one of the allowed values" };
6702
5757
  if (vErrors === null) {
6703
- vErrors = [err110];
5758
+ vErrors = [err18];
6704
5759
  } else {
6705
- vErrors.push(err110);
5760
+ vErrors.push(err18);
6706
5761
  }
6707
5762
  errors++;
6708
5763
  }
6709
5764
  }
5765
+ if (data.leases !== void 0) {
5766
+ if (!validate11(data.leases, { instancePath: instancePath + "/leases", parentData: data, parentDataProperty: "leases", rootData })) {
5767
+ vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);
5768
+ errors = vErrors.length;
5769
+ }
5770
+ }
6710
5771
  } else {
6711
- const err111 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5772
+ const err19 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
6712
5773
  if (vErrors === null) {
6713
- vErrors = [err111];
5774
+ vErrors = [err19];
6714
5775
  } else {
6715
- vErrors.push(err111);
5776
+ vErrors.push(err19);
6716
5777
  }
6717
5778
  errors++;
6718
5779
  }
@@ -6848,7 +5909,7 @@ var JwtValidator = class {
6848
5909
  };
6849
5910
 
6850
5911
  // src/sdk/provider/auth/jwt/jwt-token.ts
6851
- import { default as stableStringify3 } from "json-stable-stringify";
5912
+ import { default as stableStringify2 } from "json-stable-stringify";
6852
5913
 
6853
5914
  // src/sdk/provider/auth/jwt/wallet-utils.ts
6854
5915
  function createOfflineDataSigner(wallet) {
@@ -6923,8 +5984,8 @@ var JwtTokenManager = class {
6923
5984
  if (!validationResult.isValid) {
6924
5985
  throw new Error(`Invalid payload: ${validationResult.errors?.join(", ")}`);
6925
5986
  }
6926
- const header = base64UrlEncode(stableStringify3({ alg: this.signer.algorithm || "ES256KADR36", typ: "JWT" }));
6927
- const stringPayload = base64UrlEncode(stableStringify3(inputPayload));
5987
+ const header = base64UrlEncode(stableStringify2({ alg: this.signer.algorithm || "ES256KADR36", typ: "JWT" }));
5988
+ const stringPayload = base64UrlEncode(stableStringify2(inputPayload));
6928
5989
  const { signature } = await this.signer.signArbitrary(options.iss, `${header}.${stringPayload}`);
6929
5990
  const token = `${header}.${stringPayload}.${toBase64Url(signature)}`;
6930
5991
  return token;
@@ -9114,18 +8175,19 @@ function createSDK(queryTransport, txTransport) {
9114
8175
  var serviceLoader2 = createServiceLoader([
9115
8176
  () => import("./query_akash-ZPJ6T5NI.js").then((m) => m.Query),
9116
8177
  () => import("./service_akash-EJTYKJTM.js").then((m) => m.Msg),
9117
- () => import("./query_akash-3UBRLLRZ.js").then((m) => m.Query),
9118
- () => import("./service_akash-UFTUJDPM.js").then((m) => m.Msg),
8178
+ () => import("./query_akash-3IY2DKPB.js").then((m) => m.Query),
8179
+ () => import("./service_akash-2CH5FJ4J.js").then((m) => m.Msg),
9119
8180
  () => import("./query_akash-LWCKZPHL.js").then((m) => m.Query),
9120
8181
  () => import("./service_akash-5O4BYIF2.js").then((m) => m.Msg),
9121
- () => import("./query_akash-CKZRI7R6.js").then((m) => m.Query),
9122
- () => import("./service_akash-5JSE44LJ.js").then((m) => m.Msg),
8182
+ () => import("./query_akash-OKZLG4MG.js").then((m) => m.Query),
8183
+ () => import("./service_akash-BLDT6YCO.js").then((m) => m.Msg),
8184
+ () => import("./service_akash-K7FWCKUQ.js").then((m) => m.Discovery),
9123
8185
  () => import("./query_akash-GYTMDAAY.js").then((m) => m.Query),
9124
8186
  () => import("./query_akash-KKNAAUKF.js").then((m) => m.Query),
9125
8187
  () => import("./query_akash-FU3ACWAO.js").then((m) => m.Query),
9126
8188
  () => import("./service_akash-KKV7TGYK.js").then((m) => m.Msg),
9127
- () => import("./query_akash-3LAHGVQJ.js").then((m) => m.Query),
9128
- () => import("./service_akash-QEN5EQUY.js").then((m) => m.Msg),
8189
+ () => import("./query_akash-ZITEPCYB.js").then((m) => m.Query),
8190
+ () => import("./service_akash-DZETPXWM.js").then((m) => m.Msg),
9129
8191
  () => import("./query_akash-UVZZQTKV.js").then((m) => m.Query),
9130
8192
  () => import("./service_akash-DSFYKCTK.js").then((m) => m.Msg),
9131
8193
  () => import("./query_akash-QW7MA3NO.js").then((m) => m.Query),
@@ -9373,6 +8435,17 @@ function createSDK2(queryTransport, txTransport) {
9373
8435
  }, { path: [7, "updateParams"], serviceLoader: serviceLoader2 })
9374
8436
  }
9375
8437
  },
8438
+ discovery: {
8439
+ v1: {
8440
+ /**
8441
+ * getInfo returns the node's supported API versions and metadata.
8442
+ */
8443
+ getInfo: withMetadata(async function getInfo(input = {}, options) {
8444
+ const service = await serviceLoader2.loadAt(8);
8445
+ return getClient(service).getInfo(input, options);
8446
+ }, { path: [8, "getInfo"], serviceLoader: serviceLoader2 })
8447
+ }
8448
+ },
9376
8449
  downtimedetector: {
9377
8450
  v1beta1: {
9378
8451
  /**
@@ -9380,9 +8453,9 @@ function createSDK2(queryTransport, txTransport) {
9380
8453
  * since experiencing downtime of a given length
9381
8454
  */
9382
8455
  getRecoveredSinceDowntimeOfLength: withMetadata(async function getRecoveredSinceDowntimeOfLength(input, options) {
9383
- const service = await serviceLoader2.loadAt(8);
8456
+ const service = await serviceLoader2.loadAt(9);
9384
8457
  return getClient(service).recoveredSinceDowntimeOfLength(input, options);
9385
- }, { path: [8, "recoveredSinceDowntimeOfLength"], serviceLoader: serviceLoader2 })
8458
+ }, { path: [9, "recoveredSinceDowntimeOfLength"], serviceLoader: serviceLoader2 })
9386
8459
  }
9387
8460
  },
9388
8461
  epochs: {
@@ -9391,16 +8464,16 @@ function createSDK2(queryTransport, txTransport) {
9391
8464
  * getEpochInfos provide running epochInfos
9392
8465
  */
9393
8466
  getEpochInfos: withMetadata(async function getEpochInfos(input = {}, options) {
9394
- const service = await serviceLoader2.loadAt(9);
8467
+ const service = await serviceLoader2.loadAt(10);
9395
8468
  return getClient(service).epochInfos(input, options);
9396
- }, { path: [9, "epochInfos"], serviceLoader: serviceLoader2 }),
8469
+ }, { path: [10, "epochInfos"], serviceLoader: serviceLoader2 }),
9397
8470
  /**
9398
8471
  * getCurrentEpoch provide current epoch of specified identifier
9399
8472
  */
9400
8473
  getCurrentEpoch: withMetadata(async function getCurrentEpoch(input, options) {
9401
- const service = await serviceLoader2.loadAt(9);
8474
+ const service = await serviceLoader2.loadAt(10);
9402
8475
  return getClient(service).currentEpoch(input, options);
9403
- }, { path: [9, "currentEpoch"], serviceLoader: serviceLoader2 })
8476
+ }, { path: [10, "currentEpoch"], serviceLoader: serviceLoader2 })
9404
8477
  }
9405
8478
  },
9406
8479
  escrow: {
@@ -9409,23 +8482,23 @@ function createSDK2(queryTransport, txTransport) {
9409
8482
  * getAccounts queries all accounts.
9410
8483
  */
9411
8484
  getAccounts: withMetadata(async function getAccounts(input, options) {
9412
- const service = await serviceLoader2.loadAt(10);
8485
+ const service = await serviceLoader2.loadAt(11);
9413
8486
  return getClient(service).accounts(input, options);
9414
- }, { path: [10, "accounts"], serviceLoader: serviceLoader2 }),
8487
+ }, { path: [11, "accounts"], serviceLoader: serviceLoader2 }),
9415
8488
  /**
9416
8489
  * getPayments queries all payments.
9417
8490
  */
9418
8491
  getPayments: withMetadata(async function getPayments(input, options) {
9419
- const service = await serviceLoader2.loadAt(10);
8492
+ const service = await serviceLoader2.loadAt(11);
9420
8493
  return getClient(service).payments(input, options);
9421
- }, { path: [10, "payments"], serviceLoader: serviceLoader2 }),
8494
+ }, { path: [11, "payments"], serviceLoader: serviceLoader2 }),
9422
8495
  /**
9423
8496
  * accountDeposit deposits more funds into the escrow account.
9424
8497
  */
9425
8498
  accountDeposit: withMetadata(async function accountDeposit(input, options) {
9426
- const service = await serviceLoader2.loadAt(11);
8499
+ const service = await serviceLoader2.loadAt(12);
9427
8500
  return getMsgClient(service).accountDeposit(input, options);
9428
- }, { path: [11, "accountDeposit"], serviceLoader: serviceLoader2 })
8501
+ }, { path: [12, "accountDeposit"], serviceLoader: serviceLoader2 })
9429
8502
  }
9430
8503
  },
9431
8504
  market: {
@@ -9434,86 +8507,93 @@ function createSDK2(queryTransport, txTransport) {
9434
8507
  * getOrders queries orders with filters.
9435
8508
  */
9436
8509
  getOrders: withMetadata(async function getOrders(input, options) {
9437
- const service = await serviceLoader2.loadAt(12);
8510
+ const service = await serviceLoader2.loadAt(13);
9438
8511
  return getClient(service).orders(input, options);
9439
- }, { path: [12, "orders"], serviceLoader: serviceLoader2 }),
8512
+ }, { path: [13, "orders"], serviceLoader: serviceLoader2 }),
9440
8513
  /**
9441
8514
  * getOrder queries order details.
9442
8515
  */
9443
8516
  getOrder: withMetadata(async function getOrder(input, options) {
9444
- const service = await serviceLoader2.loadAt(12);
8517
+ const service = await serviceLoader2.loadAt(13);
9445
8518
  return getClient(service).order(input, options);
9446
- }, { path: [12, "order"], serviceLoader: serviceLoader2 }),
8519
+ }, { path: [13, "order"], serviceLoader: serviceLoader2 }),
9447
8520
  /**
9448
8521
  * getBids queries bids with filters.
9449
8522
  */
9450
8523
  getBids: withMetadata(async function getBids(input, options) {
9451
- const service = await serviceLoader2.loadAt(12);
8524
+ const service = await serviceLoader2.loadAt(13);
9452
8525
  return getClient(service).bids(input, options);
9453
- }, { path: [12, "bids"], serviceLoader: serviceLoader2 }),
8526
+ }, { path: [13, "bids"], serviceLoader: serviceLoader2 }),
9454
8527
  /**
9455
8528
  * getBid queries bid details.
9456
8529
  */
9457
8530
  getBid: withMetadata(async function getBid(input, options) {
9458
- const service = await serviceLoader2.loadAt(12);
8531
+ const service = await serviceLoader2.loadAt(13);
9459
8532
  return getClient(service).bid(input, options);
9460
- }, { path: [12, "bid"], serviceLoader: serviceLoader2 }),
8533
+ }, { path: [13, "bid"], serviceLoader: serviceLoader2 }),
9461
8534
  /**
9462
8535
  * getLeases queries leases with filters.
9463
8536
  */
9464
8537
  getLeases: withMetadata(async function getLeases(input, options) {
9465
- const service = await serviceLoader2.loadAt(12);
8538
+ const service = await serviceLoader2.loadAt(13);
9466
8539
  return getClient(service).leases(input, options);
9467
- }, { path: [12, "leases"], serviceLoader: serviceLoader2 }),
8540
+ }, { path: [13, "leases"], serviceLoader: serviceLoader2 }),
9468
8541
  /**
9469
8542
  * getLease queries lease details.
9470
8543
  */
9471
8544
  getLease: withMetadata(async function getLease(input, options) {
9472
- const service = await serviceLoader2.loadAt(12);
8545
+ const service = await serviceLoader2.loadAt(13);
9473
8546
  return getClient(service).lease(input, options);
9474
- }, { path: [12, "lease"], serviceLoader: serviceLoader2 }),
8547
+ }, { path: [13, "lease"], serviceLoader: serviceLoader2 }),
9475
8548
  /**
9476
8549
  * getParams returns the total set of market parameters.
9477
8550
  */
9478
8551
  getParams: withMetadata(async function getParams(input = {}, options) {
9479
- const service = await serviceLoader2.loadAt(12);
8552
+ const service = await serviceLoader2.loadAt(13);
9480
8553
  return getClient(service).params(input, options);
9481
- }, { path: [12, "params"], serviceLoader: serviceLoader2 }),
8554
+ }, { path: [13, "params"], serviceLoader: serviceLoader2 }),
9482
8555
  /**
9483
8556
  * createBid defines a method to create a bid given proper inputs.
9484
8557
  */
9485
8558
  createBid: withMetadata(async function createBid(input, options) {
9486
- const service = await serviceLoader2.loadAt(13);
8559
+ const service = await serviceLoader2.loadAt(14);
9487
8560
  return getMsgClient(service).createBid(input, options);
9488
- }, { path: [13, "createBid"], serviceLoader: serviceLoader2 }),
8561
+ }, { path: [14, "createBid"], serviceLoader: serviceLoader2 }),
9489
8562
  /**
9490
8563
  * closeBid defines a method to close a bid given proper inputs.
9491
8564
  */
9492
8565
  closeBid: withMetadata(async function closeBid(input, options) {
9493
- const service = await serviceLoader2.loadAt(13);
8566
+ const service = await serviceLoader2.loadAt(14);
9494
8567
  return getMsgClient(service).closeBid(input, options);
9495
- }, { path: [13, "closeBid"], serviceLoader: serviceLoader2 }),
8568
+ }, { path: [14, "closeBid"], serviceLoader: serviceLoader2 }),
9496
8569
  /**
9497
8570
  * withdrawLease withdraws accrued funds from the lease payment
9498
8571
  */
9499
8572
  withdrawLease: withMetadata(async function withdrawLease(input, options) {
9500
- const service = await serviceLoader2.loadAt(13);
8573
+ const service = await serviceLoader2.loadAt(14);
9501
8574
  return getMsgClient(service).withdrawLease(input, options);
9502
- }, { path: [13, "withdrawLease"], serviceLoader: serviceLoader2 }),
8575
+ }, { path: [14, "withdrawLease"], serviceLoader: serviceLoader2 }),
9503
8576
  /**
9504
8577
  * createLease creates a new lease
9505
8578
  */
9506
8579
  createLease: withMetadata(async function createLease(input, options) {
9507
- const service = await serviceLoader2.loadAt(13);
8580
+ const service = await serviceLoader2.loadAt(14);
9508
8581
  return getMsgClient(service).createLease(input, options);
9509
- }, { path: [13, "createLease"], serviceLoader: serviceLoader2 }),
8582
+ }, { path: [14, "createLease"], serviceLoader: serviceLoader2 }),
9510
8583
  /**
9511
8584
  * closeLease defines a method to close an order given proper inputs.
9512
8585
  */
9513
8586
  closeLease: withMetadata(async function closeLease(input, options) {
9514
- const service = await serviceLoader2.loadAt(13);
8587
+ const service = await serviceLoader2.loadAt(14);
9515
8588
  return getMsgClient(service).closeLease(input, options);
9516
- }, { path: [13, "closeLease"], serviceLoader: serviceLoader2 }),
8589
+ }, { path: [14, "closeLease"], serviceLoader: serviceLoader2 }),
8590
+ /**
8591
+ * leaseStartReclaim initiates the reclamation window on an active lease.
8592
+ */
8593
+ leaseStartReclaim: withMetadata(async function leaseStartReclaim(input, options) {
8594
+ const service = await serviceLoader2.loadAt(14);
8595
+ return getMsgClient(service).leaseStartReclaim(input, options);
8596
+ }, { path: [14, "leaseStartReclaim"], serviceLoader: serviceLoader2 }),
9517
8597
  /**
9518
8598
  * updateParams defines a governance operation for updating the x/market module
9519
8599
  * parameters. The authority is hard-coded to the x/gov module account.
@@ -9521,9 +8601,9 @@ function createSDK2(queryTransport, txTransport) {
9521
8601
  * Since: akash v1.0.0
9522
8602
  */
9523
8603
  updateParams: withMetadata(async function updateParams(input, options) {
9524
- const service = await serviceLoader2.loadAt(13);
8604
+ const service = await serviceLoader2.loadAt(14);
9525
8605
  return getMsgClient(service).updateParams(input, options);
9526
- }, { path: [13, "updateParams"], serviceLoader: serviceLoader2 })
8606
+ }, { path: [14, "updateParams"], serviceLoader: serviceLoader2 })
9527
8607
  }
9528
8608
  },
9529
8609
  oracle: {
@@ -9532,30 +8612,30 @@ function createSDK2(queryTransport, txTransport) {
9532
8612
  * getPrices query prices for specific denom
9533
8613
  */
9534
8614
  getPrices: withMetadata(async function getPrices(input, options) {
9535
- const service = await serviceLoader2.loadAt(14);
8615
+ const service = await serviceLoader2.loadAt(15);
9536
8616
  return getClient(service).prices(input, options);
9537
- }, { path: [14, "prices"], serviceLoader: serviceLoader2 }),
8617
+ }, { path: [15, "prices"], serviceLoader: serviceLoader2 }),
9538
8618
  /**
9539
8619
  * getParams returns the total set of oracle parameters.
9540
8620
  */
9541
8621
  getParams: withMetadata(async function getParams(input = {}, options) {
9542
- const service = await serviceLoader2.loadAt(14);
8622
+ const service = await serviceLoader2.loadAt(15);
9543
8623
  return getClient(service).params(input, options);
9544
- }, { path: [14, "params"], serviceLoader: serviceLoader2 }),
8624
+ }, { path: [15, "params"], serviceLoader: serviceLoader2 }),
9545
8625
  /**
9546
8626
  * getAggregatedPrice queries the aggregated price for a given denom.
9547
8627
  */
9548
8628
  getAggregatedPrice: withMetadata(async function getAggregatedPrice(input, options) {
9549
- const service = await serviceLoader2.loadAt(14);
8629
+ const service = await serviceLoader2.loadAt(15);
9550
8630
  return getClient(service).aggregatedPrice(input, options);
9551
- }, { path: [14, "aggregatedPrice"], serviceLoader: serviceLoader2 }),
8631
+ }, { path: [15, "aggregatedPrice"], serviceLoader: serviceLoader2 }),
9552
8632
  /**
9553
8633
  * addPriceEntry adds a new price entry for a denomination from an authorized source
9554
8634
  */
9555
8635
  addPriceEntry: withMetadata(async function addPriceEntry(input, options) {
9556
- const service = await serviceLoader2.loadAt(15);
8636
+ const service = await serviceLoader2.loadAt(16);
9557
8637
  return getMsgClient(service).addPriceEntry(input, options);
9558
- }, { path: [15, "addPriceEntry"], serviceLoader: serviceLoader2 }),
8638
+ }, { path: [16, "addPriceEntry"], serviceLoader: serviceLoader2 }),
9559
8639
  /**
9560
8640
  * updateParams defines a governance operation for updating the x/wasm module
9561
8641
  * parameters. The authority is hard-coded to the x/gov module account.
@@ -9563,39 +8643,39 @@ function createSDK2(queryTransport, txTransport) {
9563
8643
  * Since: akash v2.0.0
9564
8644
  */
9565
8645
  updateParams: withMetadata(async function updateParams(input, options) {
9566
- const service = await serviceLoader2.loadAt(15);
8646
+ const service = await serviceLoader2.loadAt(16);
9567
8647
  return getMsgClient(service).updateParams(input, options);
9568
- }, { path: [15, "updateParams"], serviceLoader: serviceLoader2 })
8648
+ }, { path: [16, "updateParams"], serviceLoader: serviceLoader2 })
9569
8649
  },
9570
8650
  v2: {
9571
8651
  /**
9572
8652
  * getPrices query prices for specific denom
9573
8653
  */
9574
8654
  getPrices: withMetadata(async function getPrices(input, options) {
9575
- const service = await serviceLoader2.loadAt(16);
8655
+ const service = await serviceLoader2.loadAt(17);
9576
8656
  return getClient(service).prices(input, options);
9577
- }, { path: [16, "prices"], serviceLoader: serviceLoader2 }),
8657
+ }, { path: [17, "prices"], serviceLoader: serviceLoader2 }),
9578
8658
  /**
9579
8659
  * getParams returns the total set of oracle parameters.
9580
8660
  */
9581
8661
  getParams: withMetadata(async function getParams(input = {}, options) {
9582
- const service = await serviceLoader2.loadAt(16);
8662
+ const service = await serviceLoader2.loadAt(17);
9583
8663
  return getClient(service).params(input, options);
9584
- }, { path: [16, "params"], serviceLoader: serviceLoader2 }),
8664
+ }, { path: [17, "params"], serviceLoader: serviceLoader2 }),
9585
8665
  /**
9586
8666
  * getAggregatedPrice queries the aggregated price for a given denom.
9587
8667
  */
9588
8668
  getAggregatedPrice: withMetadata(async function getAggregatedPrice(input, options) {
9589
- const service = await serviceLoader2.loadAt(16);
8669
+ const service = await serviceLoader2.loadAt(17);
9590
8670
  return getClient(service).aggregatedPrice(input, options);
9591
- }, { path: [16, "aggregatedPrice"], serviceLoader: serviceLoader2 }),
8671
+ }, { path: [17, "aggregatedPrice"], serviceLoader: serviceLoader2 }),
9592
8672
  /**
9593
8673
  * addPriceEntry adds a new price entry for a denomination from an authorized source
9594
8674
  */
9595
8675
  addPriceEntry: withMetadata(async function addPriceEntry(input, options) {
9596
- const service = await serviceLoader2.loadAt(17);
8676
+ const service = await serviceLoader2.loadAt(18);
9597
8677
  return getMsgClient(service).addPriceEntry(input, options);
9598
- }, { path: [17, "addPriceEntry"], serviceLoader: serviceLoader2 }),
8678
+ }, { path: [18, "addPriceEntry"], serviceLoader: serviceLoader2 }),
9599
8679
  /**
9600
8680
  * updateParams defines a governance operation for updating the x/oracle module
9601
8681
  * parameters. The authority is hard-coded to the x/gov module account.
@@ -9603,9 +8683,9 @@ function createSDK2(queryTransport, txTransport) {
9603
8683
  * Since: akash v2.0.0
9604
8684
  */
9605
8685
  updateParams: withMetadata(async function updateParams(input, options) {
9606
- const service = await serviceLoader2.loadAt(17);
8686
+ const service = await serviceLoader2.loadAt(18);
9607
8687
  return getMsgClient(service).updateParams(input, options);
9608
- }, { path: [17, "updateParams"], serviceLoader: serviceLoader2 })
8688
+ }, { path: [18, "updateParams"], serviceLoader: serviceLoader2 })
9609
8689
  }
9610
8690
  },
9611
8691
  provider: {
@@ -9614,37 +8694,37 @@ function createSDK2(queryTransport, txTransport) {
9614
8694
  * getProviders queries providers
9615
8695
  */
9616
8696
  getProviders: withMetadata(async function getProviders(input, options) {
9617
- const service = await serviceLoader2.loadAt(18);
8697
+ const service = await serviceLoader2.loadAt(19);
9618
8698
  return getClient(service).providers(input, options);
9619
- }, { path: [18, "providers"], serviceLoader: serviceLoader2 }),
8699
+ }, { path: [19, "providers"], serviceLoader: serviceLoader2 }),
9620
8700
  /**
9621
8701
  * getProvider queries provider details
9622
8702
  */
9623
8703
  getProvider: withMetadata(async function getProvider(input, options) {
9624
- const service = await serviceLoader2.loadAt(18);
8704
+ const service = await serviceLoader2.loadAt(19);
9625
8705
  return getClient(service).provider(input, options);
9626
- }, { path: [18, "provider"], serviceLoader: serviceLoader2 }),
8706
+ }, { path: [19, "provider"], serviceLoader: serviceLoader2 }),
9627
8707
  /**
9628
8708
  * createProvider defines a method that creates a provider given the proper inputs.
9629
8709
  */
9630
8710
  createProvider: withMetadata(async function createProvider(input, options) {
9631
- const service = await serviceLoader2.loadAt(19);
8711
+ const service = await serviceLoader2.loadAt(20);
9632
8712
  return getMsgClient(service).createProvider(input, options);
9633
- }, { path: [19, "createProvider"], serviceLoader: serviceLoader2 }),
8713
+ }, { path: [20, "createProvider"], serviceLoader: serviceLoader2 }),
9634
8714
  /**
9635
8715
  * updateProvider defines a method that updates a provider given the proper inputs.
9636
8716
  */
9637
8717
  updateProvider: withMetadata(async function updateProvider(input, options) {
9638
- const service = await serviceLoader2.loadAt(19);
8718
+ const service = await serviceLoader2.loadAt(20);
9639
8719
  return getMsgClient(service).updateProvider(input, options);
9640
- }, { path: [19, "updateProvider"], serviceLoader: serviceLoader2 }),
8720
+ }, { path: [20, "updateProvider"], serviceLoader: serviceLoader2 }),
9641
8721
  /**
9642
8722
  * deleteProvider defines a method that deletes a provider given the proper inputs.
9643
8723
  */
9644
8724
  deleteProvider: withMetadata(async function deleteProvider(input, options) {
9645
- const service = await serviceLoader2.loadAt(19);
8725
+ const service = await serviceLoader2.loadAt(20);
9646
8726
  return getMsgClient(service).deleteProvider(input, options);
9647
- }, { path: [19, "deleteProvider"], serviceLoader: serviceLoader2 })
8727
+ }, { path: [20, "deleteProvider"], serviceLoader: serviceLoader2 })
9648
8728
  }
9649
8729
  },
9650
8730
  take: {
@@ -9653,9 +8733,9 @@ function createSDK2(queryTransport, txTransport) {
9653
8733
  * getParams returns the total set of take parameters.
9654
8734
  */
9655
8735
  getParams: withMetadata(async function getParams(input = {}, options) {
9656
- const service = await serviceLoader2.loadAt(20);
8736
+ const service = await serviceLoader2.loadAt(21);
9657
8737
  return getClient(service).params(input, options);
9658
- }, { path: [20, "params"], serviceLoader: serviceLoader2 }),
8738
+ }, { path: [21, "params"], serviceLoader: serviceLoader2 }),
9659
8739
  /**
9660
8740
  * updateParams defines a governance operation for updating the x/market module
9661
8741
  * parameters. The authority is hard-coded to the x/gov module account.
@@ -9663,9 +8743,9 @@ function createSDK2(queryTransport, txTransport) {
9663
8743
  * Since: akash v1.0.0
9664
8744
  */
9665
8745
  updateParams: withMetadata(async function updateParams(input, options) {
9666
- const service = await serviceLoader2.loadAt(21);
8746
+ const service = await serviceLoader2.loadAt(22);
9667
8747
  return getMsgClient(service).updateParams(input, options);
9668
- }, { path: [21, "updateParams"], serviceLoader: serviceLoader2 })
8748
+ }, { path: [22, "updateParams"], serviceLoader: serviceLoader2 })
9669
8749
  }
9670
8750
  },
9671
8751
  wasm: {
@@ -9674,9 +8754,9 @@ function createSDK2(queryTransport, txTransport) {
9674
8754
  * getParams returns the total set of wasm parameters.
9675
8755
  */
9676
8756
  getParams: withMetadata(async function getParams(input = {}, options) {
9677
- const service = await serviceLoader2.loadAt(22);
8757
+ const service = await serviceLoader2.loadAt(23);
9678
8758
  return getClient(service).params(input, options);
9679
- }, { path: [22, "params"], serviceLoader: serviceLoader2 }),
8759
+ }, { path: [23, "params"], serviceLoader: serviceLoader2 }),
9680
8760
  /**
9681
8761
  * updateParams defines a governance operation for updating the x/wasm module
9682
8762
  * parameters. The authority is hard-coded to the x/gov module account.
@@ -9684,9 +8764,9 @@ function createSDK2(queryTransport, txTransport) {
9684
8764
  * Since: akash v2.0.0
9685
8765
  */
9686
8766
  updateParams: withMetadata(async function updateParams(input, options) {
9687
- const service = await serviceLoader2.loadAt(23);
8767
+ const service = await serviceLoader2.loadAt(24);
9688
8768
  return getMsgClient(service).updateParams(input, options);
9689
- }, { path: [23, "updateParams"], serviceLoader: serviceLoader2 })
8769
+ }, { path: [24, "updateParams"], serviceLoader: serviceLoader2 })
9690
8770
  }
9691
8771
  }
9692
8772
  }
@@ -9892,18 +8972,16 @@ function createMethodUrl(baseUrl, method) {
9892
8972
  }
9893
8973
 
9894
8974
  export {
9895
- MAINNET_ID,
9896
- SANDBOX_ID,
9897
- TESTNET_ID,
9898
- USDC_IBC_DENOMS,
9899
- AKT_DENOM,
9900
8975
  schema,
9901
8976
  validateSDL,
9902
- SdlValidationError,
9903
- SDL,
9904
8977
  generateManifest,
9905
8978
  generateManifestVersion,
9906
8979
  manifestToSortedJSON,
8980
+ MAINNET_ID,
8981
+ SANDBOX_ID,
8982
+ TESTNET_ID,
8983
+ AKT_DENOM,
8984
+ ACT_DENOM,
9907
8985
  yaml,
9908
8986
  TransportErrorCode,
9909
8987
  TransportError,
@@ -9931,4 +9009,4 @@ export {
9931
9009
  isRetryEnabled,
9932
9010
  createTxTransport
9933
9011
  };
9934
- //# sourceMappingURL=chunk-YSOG5YCI.js.map
9012
+ //# sourceMappingURL=chunk-KM336UKV.js.map