@agentsgot/agent-kit 0.0.0-stage → 1.0.0

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 (411) hide show
  1. package/ARCHITECTURE.md +5 -0
  2. package/README.md +13 -2
  3. package/dist/a2a.d.ts +35 -0
  4. package/dist/a2a.d.ts.map +1 -0
  5. package/dist/a2a.js +109 -0
  6. package/dist/a2a.js.map +1 -0
  7. package/dist/cli/binding.d.ts +24 -0
  8. package/dist/cli/binding.d.ts.map +1 -0
  9. package/dist/cli/binding.js +52 -0
  10. package/dist/cli/binding.js.map +1 -0
  11. package/dist/cli/commands.d.ts +18 -0
  12. package/dist/cli/commands.d.ts.map +1 -0
  13. package/dist/cli/commands.js +191 -0
  14. package/dist/cli/commands.js.map +1 -0
  15. package/dist/cli/context.d.ts +61 -0
  16. package/dist/cli/context.d.ts.map +1 -0
  17. package/dist/cli/context.js +147 -0
  18. package/dist/cli/context.js.map +1 -0
  19. package/dist/cli/doctor.d.ts +34 -0
  20. package/dist/cli/doctor.d.ts.map +1 -0
  21. package/dist/cli/doctor.js +109 -0
  22. package/dist/cli/doctor.js.map +1 -0
  23. package/dist/cli/home.d.ts +37 -0
  24. package/dist/cli/home.d.ts.map +1 -0
  25. package/dist/cli/home.js +77 -0
  26. package/dist/cli/home.js.map +1 -0
  27. package/dist/cli/index.d.ts +5 -0
  28. package/dist/cli/index.d.ts.map +1 -0
  29. package/dist/cli/index.js +120 -0
  30. package/dist/cli/index.js.map +1 -0
  31. package/dist/cli/install.d.ts +19 -0
  32. package/dist/cli/install.d.ts.map +1 -0
  33. package/dist/cli/install.js +64 -0
  34. package/dist/cli/install.js.map +1 -0
  35. package/dist/cli/keystore.d.ts +25 -0
  36. package/dist/cli/keystore.d.ts.map +1 -0
  37. package/dist/cli/keystore.js +57 -0
  38. package/dist/cli/keystore.js.map +1 -0
  39. package/dist/cli/mcp.d.ts +7 -0
  40. package/dist/cli/mcp.d.ts.map +1 -0
  41. package/dist/cli/mcp.js +28 -0
  42. package/dist/cli/mcp.js.map +1 -0
  43. package/dist/cli/prompt.d.ts +10 -0
  44. package/dist/cli/prompt.d.ts.map +1 -0
  45. package/dist/cli/prompt.js +71 -0
  46. package/dist/cli/prompt.js.map +1 -0
  47. package/dist/cli/reports.d.ts +42 -0
  48. package/dist/cli/reports.d.ts.map +1 -0
  49. package/dist/cli/reports.js +121 -0
  50. package/dist/cli/reports.js.map +1 -0
  51. package/dist/cli/run.d.ts +21 -0
  52. package/dist/cli/run.d.ts.map +1 -0
  53. package/dist/cli/run.js +125 -0
  54. package/dist/cli/run.js.map +1 -0
  55. package/dist/cli/wallet.d.ts +19 -0
  56. package/dist/cli/wallet.d.ts.map +1 -0
  57. package/dist/cli/wallet.js +58 -0
  58. package/dist/cli/wallet.js.map +1 -0
  59. package/dist/guides.d.ts +7 -0
  60. package/dist/guides.d.ts.map +1 -0
  61. package/dist/guides.js +94 -0
  62. package/dist/guides.js.map +1 -0
  63. package/dist/index.d.ts +20 -0
  64. package/dist/index.d.ts.map +1 -0
  65. package/dist/index.js +23 -0
  66. package/dist/index.js.map +1 -0
  67. package/dist/llm.d.ts +16 -0
  68. package/dist/llm.d.ts.map +1 -0
  69. package/dist/llm.js +30 -0
  70. package/dist/llm.js.map +1 -0
  71. package/dist/mcp/cli.d.ts +3 -0
  72. package/dist/mcp/cli.d.ts.map +1 -0
  73. package/dist/mcp/cli.js +6 -0
  74. package/dist/mcp/cli.js.map +1 -0
  75. package/dist/mcp/server.d.ts +38 -0
  76. package/dist/mcp/server.d.ts.map +1 -0
  77. package/dist/mcp/server.js +693 -0
  78. package/dist/mcp/server.js.map +1 -0
  79. package/dist/ports.d.ts +123 -0
  80. package/dist/ports.d.ts.map +1 -0
  81. package/dist/ports.js +134 -0
  82. package/dist/ports.js.map +1 -0
  83. package/dist/roles.d.ts +16 -0
  84. package/dist/roles.d.ts.map +1 -0
  85. package/dist/roles.js +49 -0
  86. package/dist/roles.js.map +1 -0
  87. package/dist/runner.d.ts +126 -0
  88. package/dist/runner.d.ts.map +1 -0
  89. package/dist/runner.js +292 -0
  90. package/dist/runner.js.map +1 -0
  91. package/dist/schedules.d.ts +34 -0
  92. package/dist/schedules.d.ts.map +1 -0
  93. package/dist/schedules.js +116 -0
  94. package/dist/schedules.js.map +1 -0
  95. package/dist/sdk/base64.d.ts +4 -0
  96. package/dist/sdk/base64.d.ts.map +1 -0
  97. package/dist/sdk/base64.js +15 -0
  98. package/dist/sdk/base64.js.map +1 -0
  99. package/dist/sdk/client.d.ts +198 -0
  100. package/dist/sdk/client.d.ts.map +1 -0
  101. package/dist/sdk/client.js +413 -0
  102. package/dist/sdk/client.js.map +1 -0
  103. package/dist/security.d.ts +10 -0
  104. package/dist/security.d.ts.map +1 -0
  105. package/dist/security.js +24 -0
  106. package/dist/security.js.map +1 -0
  107. package/dist/skills.d.ts +21 -0
  108. package/dist/skills.d.ts.map +1 -0
  109. package/dist/skills.js +93 -0
  110. package/dist/skills.js.map +1 -0
  111. package/dist/workers.d.ts +64 -0
  112. package/dist/workers.d.ts.map +1 -0
  113. package/dist/workers.js +127 -0
  114. package/dist/workers.js.map +1 -0
  115. package/dist/zip.d.ts +8 -0
  116. package/dist/zip.d.ts.map +1 -0
  117. package/dist/zip.js +80 -0
  118. package/dist/zip.js.map +1 -0
  119. package/docs/README.md +25 -0
  120. package/docs/architecture.md +18 -0
  121. package/docs/deployment.md +26 -0
  122. package/docs/reference/01-RULES.md +822 -0
  123. package/docs/reference/02-INTERFACES.md +487 -0
  124. package/docs/reference/03-STAKING-PENALTY-SPEC.md +739 -0
  125. package/docs/updates.md +61 -0
  126. package/docs/verification.md +72 -0
  127. package/package.json +87 -4
  128. package/skills/dist/agent-skills.json +68 -0
  129. package/skills/dist/arbitrator/SKILL.md +186 -0
  130. package/skills/dist/executor/SKILL.md +219 -0
  131. package/skills/dist/publisher/SKILL.md +172 -0
  132. package/skills/dist/tester/SKILL.md +198 -0
  133. package/vendor/shared/ARCHITECTURE.md +97 -0
  134. package/vendor/shared/README.md +5 -0
  135. package/vendor/shared/abi/index.js +2 -0
  136. package/vendor/shared/abi/index.ts +2 -0
  137. package/vendor/shared/abi/protocol/AgentRegistry.js +1623 -0
  138. package/vendor/shared/abi/protocol/AgentRegistry.json +1623 -0
  139. package/vendor/shared/abi/protocol/AgentRegistry.ts +1623 -0
  140. package/vendor/shared/abi/protocol/ArbitrationCaseProofVerifier.js +154 -0
  141. package/vendor/shared/abi/protocol/ArbitrationCaseProofVerifier.json +154 -0
  142. package/vendor/shared/abi/protocol/ArbitrationCaseProofVerifier.ts +154 -0
  143. package/vendor/shared/abi/protocol/ArbitrationCourt.js +1550 -0
  144. package/vendor/shared/abi/protocol/ArbitrationCourt.json +1550 -0
  145. package/vendor/shared/abi/protocol/ArbitrationCourt.ts +1550 -0
  146. package/vendor/shared/abi/protocol/ArbitrationPool.js +509 -0
  147. package/vendor/shared/abi/protocol/ArbitrationPool.json +509 -0
  148. package/vendor/shared/abi/protocol/ArbitrationPool.ts +509 -0
  149. package/vendor/shared/abi/protocol/ArbitrationProgressor.js +44 -0
  150. package/vendor/shared/abi/protocol/ArbitrationProgressor.json +44 -0
  151. package/vendor/shared/abi/protocol/ArbitrationProgressor.ts +44 -0
  152. package/vendor/shared/abi/protocol/ArbitrationSelection.js +1153 -0
  153. package/vendor/shared/abi/protocol/ArbitrationSelection.json +1153 -0
  154. package/vendor/shared/abi/protocol/ArbitrationSelection.ts +1153 -0
  155. package/vendor/shared/abi/protocol/ArbitrationSettlement.js +956 -0
  156. package/vendor/shared/abi/protocol/ArbitrationSettlement.json +956 -0
  157. package/vendor/shared/abi/protocol/ArbitrationSettlement.ts +956 -0
  158. package/vendor/shared/abi/protocol/ArbitrationStream.js +964 -0
  159. package/vendor/shared/abi/protocol/ArbitrationStream.json +964 -0
  160. package/vendor/shared/abi/protocol/ArbitrationStream.ts +964 -0
  161. package/vendor/shared/abi/protocol/EmissionController.js +1436 -0
  162. package/vendor/shared/abi/protocol/EmissionController.json +1436 -0
  163. package/vendor/shared/abi/protocol/EmissionController.ts +1436 -0
  164. package/vendor/shared/abi/protocol/HourlyAnchor.js +611 -0
  165. package/vendor/shared/abi/protocol/HourlyAnchor.json +611 -0
  166. package/vendor/shared/abi/protocol/HourlyAnchor.ts +611 -0
  167. package/vendor/shared/abi/protocol/IncentiveVault.js +480 -0
  168. package/vendor/shared/abi/protocol/IncentiveVault.json +480 -0
  169. package/vendor/shared/abi/protocol/IncentiveVault.ts +480 -0
  170. package/vendor/shared/abi/protocol/ParamRegistry.js +814 -0
  171. package/vendor/shared/abi/protocol/ParamRegistry.json +814 -0
  172. package/vendor/shared/abi/protocol/ParamRegistry.ts +814 -0
  173. package/vendor/shared/abi/protocol/PlatformTreasury.js +553 -0
  174. package/vendor/shared/abi/protocol/PlatformTreasury.json +553 -0
  175. package/vendor/shared/abi/protocol/PlatformTreasury.ts +553 -0
  176. package/vendor/shared/abi/protocol/ProtocolProof.js +1171 -0
  177. package/vendor/shared/abi/protocol/ProtocolProof.json +1171 -0
  178. package/vendor/shared/abi/protocol/ProtocolProof.ts +1171 -0
  179. package/vendor/shared/abi/protocol/PublisherStaking.js +1227 -0
  180. package/vendor/shared/abi/protocol/PublisherStaking.json +1227 -0
  181. package/vendor/shared/abi/protocol/PublisherStaking.ts +1227 -0
  182. package/vendor/shared/abi/protocol/RewardVesting.js +1027 -0
  183. package/vendor/shared/abi/protocol/RewardVesting.json +1027 -0
  184. package/vendor/shared/abi/protocol/RewardVesting.ts +1027 -0
  185. package/vendor/shared/abi/protocol/TaskEscrow.js +2219 -0
  186. package/vendor/shared/abi/protocol/TaskEscrow.json +2219 -0
  187. package/vendor/shared/abi/protocol/TaskEscrow.ts +2219 -0
  188. package/vendor/shared/abi/protocol/TesterAssignment.js +1375 -0
  189. package/vendor/shared/abi/protocol/TesterAssignment.json +1375 -0
  190. package/vendor/shared/abi/protocol/TesterAssignment.ts +1375 -0
  191. package/vendor/shared/abi/protocol/ValidatorStaking.js +1614 -0
  192. package/vendor/shared/abi/protocol/ValidatorStaking.json +1614 -0
  193. package/vendor/shared/abi/protocol/ValidatorStaking.ts +1614 -0
  194. package/vendor/shared/abi/protocol/index.js +19 -0
  195. package/vendor/shared/abi/protocol/index.ts +19 -0
  196. package/vendor/shared/abi/token/AGTToken.js +1018 -0
  197. package/vendor/shared/abi/token/AGTToken.json +1018 -0
  198. package/vendor/shared/abi/token/AGTToken.ts +1018 -0
  199. package/vendor/shared/abi/token/GenesisDistributor.js +242 -0
  200. package/vendor/shared/abi/token/GenesisDistributor.json +242 -0
  201. package/vendor/shared/abi/token/GenesisDistributor.ts +242 -0
  202. package/vendor/shared/abi/token/LPLocker.js +21 -0
  203. package/vendor/shared/abi/token/LPLocker.json +21 -0
  204. package/vendor/shared/abi/token/LPLocker.ts +21 -0
  205. package/vendor/shared/abi/token/LaunchLiquidity.js +335 -0
  206. package/vendor/shared/abi/token/LaunchLiquidity.json +335 -0
  207. package/vendor/shared/abi/token/LaunchLiquidity.ts +335 -0
  208. package/vendor/shared/abi/token/LiquidityAdder.js +228 -0
  209. package/vendor/shared/abi/token/LiquidityAdder.json +228 -0
  210. package/vendor/shared/abi/token/LiquidityAdder.ts +228 -0
  211. package/vendor/shared/abi/token/TaxDistributor.js +235 -0
  212. package/vendor/shared/abi/token/TaxDistributor.json +235 -0
  213. package/vendor/shared/abi/token/TaxDistributor.ts +235 -0
  214. package/vendor/shared/abi/token/TestFaucet.js +214 -0
  215. package/vendor/shared/abi/token/TestFaucet.json +214 -0
  216. package/vendor/shared/abi/token/TestFaucet.ts +214 -0
  217. package/vendor/shared/abi/token/index.js +7 -0
  218. package/vendor/shared/abi/token/index.ts +7 -0
  219. package/vendor/shared/dist/abi/index.d.ts +3 -0
  220. package/vendor/shared/dist/abi/index.d.ts.map +1 -0
  221. package/vendor/shared/dist/abi/index.js +3 -0
  222. package/vendor/shared/dist/abi/index.js.map +1 -0
  223. package/vendor/shared/dist/abi/protocol/AgentRegistry.d.ts +1249 -0
  224. package/vendor/shared/dist/abi/protocol/AgentRegistry.d.ts.map +1 -0
  225. package/vendor/shared/dist/abi/protocol/AgentRegistry.js +1624 -0
  226. package/vendor/shared/dist/abi/protocol/AgentRegistry.js.map +1 -0
  227. package/vendor/shared/dist/abi/protocol/ArbitrationCaseProofVerifier.d.ts +119 -0
  228. package/vendor/shared/dist/abi/protocol/ArbitrationCaseProofVerifier.d.ts.map +1 -0
  229. package/vendor/shared/dist/abi/protocol/ArbitrationCaseProofVerifier.js +155 -0
  230. package/vendor/shared/dist/abi/protocol/ArbitrationCaseProofVerifier.js.map +1 -0
  231. package/vendor/shared/dist/abi/protocol/ArbitrationCourt.d.ts +1205 -0
  232. package/vendor/shared/dist/abi/protocol/ArbitrationCourt.d.ts.map +1 -0
  233. package/vendor/shared/dist/abi/protocol/ArbitrationCourt.js +1551 -0
  234. package/vendor/shared/dist/abi/protocol/ArbitrationCourt.js.map +1 -0
  235. package/vendor/shared/dist/abi/protocol/ArbitrationPool.d.ts +391 -0
  236. package/vendor/shared/dist/abi/protocol/ArbitrationPool.d.ts.map +1 -0
  237. package/vendor/shared/dist/abi/protocol/ArbitrationPool.js +510 -0
  238. package/vendor/shared/dist/abi/protocol/ArbitrationPool.js.map +1 -0
  239. package/vendor/shared/dist/abi/protocol/ArbitrationProgressor.d.ts +34 -0
  240. package/vendor/shared/dist/abi/protocol/ArbitrationProgressor.d.ts.map +1 -0
  241. package/vendor/shared/dist/abi/protocol/ArbitrationProgressor.js +45 -0
  242. package/vendor/shared/dist/abi/protocol/ArbitrationProgressor.js.map +1 -0
  243. package/vendor/shared/dist/abi/protocol/ArbitrationSelection.d.ts +885 -0
  244. package/vendor/shared/dist/abi/protocol/ArbitrationSelection.d.ts.map +1 -0
  245. package/vendor/shared/dist/abi/protocol/ArbitrationSelection.js +1154 -0
  246. package/vendor/shared/dist/abi/protocol/ArbitrationSelection.js.map +1 -0
  247. package/vendor/shared/dist/abi/protocol/ArbitrationSettlement.d.ts +742 -0
  248. package/vendor/shared/dist/abi/protocol/ArbitrationSettlement.d.ts.map +1 -0
  249. package/vendor/shared/dist/abi/protocol/ArbitrationSettlement.js +957 -0
  250. package/vendor/shared/dist/abi/protocol/ArbitrationSettlement.js.map +1 -0
  251. package/vendor/shared/dist/abi/protocol/ArbitrationStream.d.ts +741 -0
  252. package/vendor/shared/dist/abi/protocol/ArbitrationStream.d.ts.map +1 -0
  253. package/vendor/shared/dist/abi/protocol/ArbitrationStream.js +965 -0
  254. package/vendor/shared/dist/abi/protocol/ArbitrationStream.js.map +1 -0
  255. package/vendor/shared/dist/abi/protocol/EmissionController.d.ts +1110 -0
  256. package/vendor/shared/dist/abi/protocol/EmissionController.d.ts.map +1 -0
  257. package/vendor/shared/dist/abi/protocol/EmissionController.js +1437 -0
  258. package/vendor/shared/dist/abi/protocol/EmissionController.js.map +1 -0
  259. package/vendor/shared/dist/abi/protocol/HourlyAnchor.d.ts +467 -0
  260. package/vendor/shared/dist/abi/protocol/HourlyAnchor.d.ts.map +1 -0
  261. package/vendor/shared/dist/abi/protocol/HourlyAnchor.js +612 -0
  262. package/vendor/shared/dist/abi/protocol/HourlyAnchor.js.map +1 -0
  263. package/vendor/shared/dist/abi/protocol/IncentiveVault.d.ts +369 -0
  264. package/vendor/shared/dist/abi/protocol/IncentiveVault.d.ts.map +1 -0
  265. package/vendor/shared/dist/abi/protocol/IncentiveVault.js +481 -0
  266. package/vendor/shared/dist/abi/protocol/IncentiveVault.js.map +1 -0
  267. package/vendor/shared/dist/abi/protocol/ParamRegistry.d.ts +628 -0
  268. package/vendor/shared/dist/abi/protocol/ParamRegistry.d.ts.map +1 -0
  269. package/vendor/shared/dist/abi/protocol/ParamRegistry.js +815 -0
  270. package/vendor/shared/dist/abi/protocol/ParamRegistry.js.map +1 -0
  271. package/vendor/shared/dist/abi/protocol/PlatformTreasury.d.ts +426 -0
  272. package/vendor/shared/dist/abi/protocol/PlatformTreasury.d.ts.map +1 -0
  273. package/vendor/shared/dist/abi/protocol/PlatformTreasury.js +554 -0
  274. package/vendor/shared/dist/abi/protocol/PlatformTreasury.js.map +1 -0
  275. package/vendor/shared/dist/abi/protocol/ProtocolProof.d.ts +903 -0
  276. package/vendor/shared/dist/abi/protocol/ProtocolProof.d.ts.map +1 -0
  277. package/vendor/shared/dist/abi/protocol/ProtocolProof.js +1172 -0
  278. package/vendor/shared/dist/abi/protocol/ProtocolProof.js.map +1 -0
  279. package/vendor/shared/dist/abi/protocol/PublisherStaking.d.ts +947 -0
  280. package/vendor/shared/dist/abi/protocol/PublisherStaking.d.ts.map +1 -0
  281. package/vendor/shared/dist/abi/protocol/PublisherStaking.js +1228 -0
  282. package/vendor/shared/dist/abi/protocol/PublisherStaking.js.map +1 -0
  283. package/vendor/shared/dist/abi/protocol/RewardVesting.d.ts +793 -0
  284. package/vendor/shared/dist/abi/protocol/RewardVesting.d.ts.map +1 -0
  285. package/vendor/shared/dist/abi/protocol/RewardVesting.js +1028 -0
  286. package/vendor/shared/dist/abi/protocol/RewardVesting.js.map +1 -0
  287. package/vendor/shared/dist/abi/protocol/TaskEscrow.d.ts +1725 -0
  288. package/vendor/shared/dist/abi/protocol/TaskEscrow.d.ts.map +1 -0
  289. package/vendor/shared/dist/abi/protocol/TaskEscrow.js +2220 -0
  290. package/vendor/shared/dist/abi/protocol/TaskEscrow.js.map +1 -0
  291. package/vendor/shared/dist/abi/protocol/TesterAssignment.d.ts +1058 -0
  292. package/vendor/shared/dist/abi/protocol/TesterAssignment.d.ts.map +1 -0
  293. package/vendor/shared/dist/abi/protocol/TesterAssignment.js +1376 -0
  294. package/vendor/shared/dist/abi/protocol/TesterAssignment.js.map +1 -0
  295. package/vendor/shared/dist/abi/protocol/ValidatorStaking.d.ts +1236 -0
  296. package/vendor/shared/dist/abi/protocol/ValidatorStaking.d.ts.map +1 -0
  297. package/vendor/shared/dist/abi/protocol/ValidatorStaking.js +1615 -0
  298. package/vendor/shared/dist/abi/protocol/ValidatorStaking.js.map +1 -0
  299. package/vendor/shared/dist/abi/protocol/index.d.ts +20 -0
  300. package/vendor/shared/dist/abi/protocol/index.d.ts.map +1 -0
  301. package/vendor/shared/dist/abi/protocol/index.js +20 -0
  302. package/vendor/shared/dist/abi/protocol/index.js.map +1 -0
  303. package/vendor/shared/dist/abi/token/AGTToken.d.ts +786 -0
  304. package/vendor/shared/dist/abi/token/AGTToken.d.ts.map +1 -0
  305. package/vendor/shared/dist/abi/token/AGTToken.js +1019 -0
  306. package/vendor/shared/dist/abi/token/AGTToken.js.map +1 -0
  307. package/vendor/shared/dist/abi/token/GenesisDistributor.d.ts +187 -0
  308. package/vendor/shared/dist/abi/token/GenesisDistributor.d.ts.map +1 -0
  309. package/vendor/shared/dist/abi/token/GenesisDistributor.js +243 -0
  310. package/vendor/shared/dist/abi/token/GenesisDistributor.js.map +1 -0
  311. package/vendor/shared/dist/abi/token/LPLocker.d.ts +16 -0
  312. package/vendor/shared/dist/abi/token/LPLocker.d.ts.map +1 -0
  313. package/vendor/shared/dist/abi/token/LPLocker.js +22 -0
  314. package/vendor/shared/dist/abi/token/LPLocker.js.map +1 -0
  315. package/vendor/shared/dist/abi/token/LaunchLiquidity.d.ts +260 -0
  316. package/vendor/shared/dist/abi/token/LaunchLiquidity.d.ts.map +1 -0
  317. package/vendor/shared/dist/abi/token/LaunchLiquidity.js +336 -0
  318. package/vendor/shared/dist/abi/token/LaunchLiquidity.js.map +1 -0
  319. package/vendor/shared/dist/abi/token/LiquidityAdder.d.ts +176 -0
  320. package/vendor/shared/dist/abi/token/LiquidityAdder.d.ts.map +1 -0
  321. package/vendor/shared/dist/abi/token/LiquidityAdder.js +229 -0
  322. package/vendor/shared/dist/abi/token/LiquidityAdder.js.map +1 -0
  323. package/vendor/shared/dist/abi/token/TaxDistributor.d.ts +182 -0
  324. package/vendor/shared/dist/abi/token/TaxDistributor.d.ts.map +1 -0
  325. package/vendor/shared/dist/abi/token/TaxDistributor.js +236 -0
  326. package/vendor/shared/dist/abi/token/TaxDistributor.js.map +1 -0
  327. package/vendor/shared/dist/abi/token/TestFaucet.d.ts +164 -0
  328. package/vendor/shared/dist/abi/token/TestFaucet.d.ts.map +1 -0
  329. package/vendor/shared/dist/abi/token/TestFaucet.js +215 -0
  330. package/vendor/shared/dist/abi/token/TestFaucet.js.map +1 -0
  331. package/vendor/shared/dist/abi/token/index.d.ts +8 -0
  332. package/vendor/shared/dist/abi/token/index.d.ts.map +1 -0
  333. package/vendor/shared/dist/abi/token/index.js +8 -0
  334. package/vendor/shared/dist/abi/token/index.js.map +1 -0
  335. package/vendor/shared/dist/emission-schedule.d.ts +51 -0
  336. package/vendor/shared/dist/emission-schedule.d.ts.map +1 -0
  337. package/vendor/shared/dist/emission-schedule.js +116 -0
  338. package/vendor/shared/dist/emission-schedule.js.map +1 -0
  339. package/vendor/shared/dist/index.d.ts +7 -0
  340. package/vendor/shared/dist/index.d.ts.map +1 -0
  341. package/vendor/shared/dist/index.js +7 -0
  342. package/vendor/shared/dist/index.js.map +1 -0
  343. package/vendor/shared/dist/params/index.d.ts +6 -0
  344. package/vendor/shared/dist/params/index.d.ts.map +1 -0
  345. package/vendor/shared/dist/params/index.js +84 -0
  346. package/vendor/shared/dist/params/index.js.map +1 -0
  347. package/vendor/shared/dist/protocol-proofs.d.ts +267 -0
  348. package/vendor/shared/dist/protocol-proofs.d.ts.map +1 -0
  349. package/vendor/shared/dist/protocol-proofs.js +205 -0
  350. package/vendor/shared/dist/protocol-proofs.js.map +1 -0
  351. package/vendor/shared/dist/rules/index.d.ts +204 -0
  352. package/vendor/shared/dist/rules/index.d.ts.map +1 -0
  353. package/vendor/shared/dist/rules/index.js +802 -0
  354. package/vendor/shared/dist/rules/index.js.map +1 -0
  355. package/vendor/shared/dist/rules/spec-content.d.ts +21 -0
  356. package/vendor/shared/dist/rules/spec-content.d.ts.map +1 -0
  357. package/vendor/shared/dist/rules/spec-content.js +90 -0
  358. package/vendor/shared/dist/rules/spec-content.js.map +1 -0
  359. package/vendor/shared/dist/rules/task-risk.d.ts +35 -0
  360. package/vendor/shared/dist/rules/task-risk.d.ts.map +1 -0
  361. package/vendor/shared/dist/rules/task-risk.js +438 -0
  362. package/vendor/shared/dist/rules/task-risk.js.map +1 -0
  363. package/vendor/shared/dist/schemas/domain.d.ts +195 -0
  364. package/vendor/shared/dist/schemas/domain.d.ts.map +1 -0
  365. package/vendor/shared/dist/schemas/domain.js +158 -0
  366. package/vendor/shared/dist/schemas/domain.js.map +1 -0
  367. package/vendor/shared/dist/schemas/draft.d.ts +730 -0
  368. package/vendor/shared/dist/schemas/draft.d.ts.map +1 -0
  369. package/vendor/shared/dist/schemas/draft.js +110 -0
  370. package/vendor/shared/dist/schemas/draft.js.map +1 -0
  371. package/vendor/shared/dist/schemas/enums.d.ts +130 -0
  372. package/vendor/shared/dist/schemas/enums.d.ts.map +1 -0
  373. package/vendor/shared/dist/schemas/enums.js +63 -0
  374. package/vendor/shared/dist/schemas/enums.js.map +1 -0
  375. package/vendor/shared/dist/schemas/index.d.ts +4 -0
  376. package/vendor/shared/dist/schemas/index.d.ts.map +1 -0
  377. package/vendor/shared/dist/schemas/index.js +4 -0
  378. package/vendor/shared/dist/schemas/index.js.map +1 -0
  379. package/vendor/shared/dist/units.d.ts +10 -0
  380. package/vendor/shared/dist/units.d.ts.map +1 -0
  381. package/vendor/shared/dist/units.js +44 -0
  382. package/vendor/shared/dist/units.js.map +1 -0
  383. package/vendor/shared/openapi.json +78754 -0
  384. package/vendor/shared/package.json +43 -0
  385. package/vendor/shared/params/params.json +152 -0
  386. package/vendor/shared/params/ranges.json +574 -0
  387. package/vendor/shared/src/emission-schedule.ts +151 -0
  388. package/vendor/shared/src/index.ts +6 -0
  389. package/vendor/shared/src/params/index.ts +139 -0
  390. package/vendor/shared/src/protocol-proofs.ts +235 -0
  391. package/vendor/shared/src/rules/index.ts +1081 -0
  392. package/vendor/shared/src/rules/spec-content.ts +120 -0
  393. package/vendor/shared/src/rules/task-risk.ts +550 -0
  394. package/vendor/shared/src/schemas/domain.ts +187 -0
  395. package/vendor/shared/src/schemas/draft.ts +141 -0
  396. package/vendor/shared/src/schemas/enums.ts +73 -0
  397. package/vendor/shared/src/schemas/index.ts +3 -0
  398. package/vendor/shared/src/units.ts +43 -0
  399. package/vendor/shared/test/emission-schedule.test.ts +115 -0
  400. package/vendor/shared/test/fixtures/emission-vectors.json +1055 -0
  401. package/vendor/shared/test/fixtures.ts +65 -0
  402. package/vendor/shared/test/params.test.ts +48 -0
  403. package/vendor/shared/test/properties.test.ts +136 -0
  404. package/vendor/shared/test/protocol-proofs.test.ts +88 -0
  405. package/vendor/shared/test/rules.test.ts +474 -0
  406. package/vendor/shared/test/schemas.test.ts +130 -0
  407. package/vendor/shared/test/task-risk.test.ts +489 -0
  408. package/vendor/shared/tsconfig.abi.json +11 -0
  409. package/vendor/shared/tsconfig.json +23 -0
  410. package/vendor/shared/types/api/index.d.ts +303 -0
  411. package/vendor/shared/vitest.config.ts +8 -0
@@ -0,0 +1,51 @@
1
+ /** Bit-exact continuous emission schedule matching EmissionController fixed-point math. */
2
+ export declare const WAD: bigint;
3
+ export declare const HOUR = 3600n;
4
+ export declare const BPS = 10000n;
5
+ export type Schedule = {
6
+ startTime: bigint;
7
+ initialBalance: bigint;
8
+ hourDecay18: bigint;
9
+ platformBps: bigint;
10
+ execBps: bigint;
11
+ testBps: bigint;
12
+ };
13
+ export type CumulativeShares = {
14
+ released: bigint;
15
+ platform: bigint;
16
+ exec: bigint;
17
+ test: bigint;
18
+ arb: bigint;
19
+ };
20
+ export type HourShares = {
21
+ emission: bigint;
22
+ platform: bigint;
23
+ exec: bigint;
24
+ test: bigint;
25
+ arb: bigint;
26
+ };
27
+ /** Floor(a * b / d), matching OpenZeppelin Math.mulDiv for non-overflowing inputs. */
28
+ export declare function mulDiv(a: bigint, b: bigint, d: bigint): bigint;
29
+ /** 2^(-1/n) via bounded Taylor expansion — matches EmissionController._pow2Neg. */
30
+ export declare function pow2Neg(n: bigint): bigint;
31
+ /** Hourly decay factor q = 2^(-1/(24H)). */
32
+ export declare function hourDecay18(halfLifeDays: bigint): bigint;
33
+ /** Exponentiation by squaring in WAD: x^k with floor after each multiply. */
34
+ export declare function powWad(x: bigint, k: bigint): bigint;
35
+ export declare function firstHour(schedule: Schedule): bigint;
36
+ /** Cumulative released amount R(t) at absolute unix time t. */
37
+ export declare function cumulativeReleased(schedule: Schedule, t: bigint): bigint;
38
+ export declare function cumulativeShares(schedule: Schedule, t: bigint): CumulativeShares;
39
+ /** Shares released during absolute hour `hourId` (activation hour is partial). */
40
+ export declare function hourShares(schedule: Schedule, hourId: bigint): HourShares;
41
+ /** Arbitration share emitted in [from, to) clipped to [startTime, …). */
42
+ export declare function arbitrationEmitted(schedule: Schedule, from: bigint, to: bigint): bigint;
43
+ export declare function buildSchedule(input: {
44
+ startTime: bigint;
45
+ initialBalance: bigint;
46
+ halfLifeDays: bigint;
47
+ platformBps: bigint;
48
+ execBps: bigint;
49
+ testBps: bigint;
50
+ }): Schedule;
51
+ //# sourceMappingURL=emission-schedule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emission-schedule.d.ts","sourceRoot":"","sources":["../src/emission-schedule.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAE3F,eAAO,MAAM,GAAG,QAAa,CAAC;AAC9B,eAAO,MAAM,IAAI,QAAQ,CAAC;AAC1B,eAAO,MAAM,GAAG,SAAU,CAAC;AAG3B,MAAM,MAAM,QAAQ,GAAG;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,M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Y,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,QAAQ,CASX"}
@@ -0,0 +1,116 @@
1
+ /** Bit-exact continuous emission schedule matching EmissionController fixed-point math. */
2
+ export const WAD = 10n ** 18n;
3
+ export const HOUR = 3600n;
4
+ export const BPS = 10000n;
5
+ const LN2_18 = 693147180559945309n;
6
+ /** Floor(a * b / d), matching OpenZeppelin Math.mulDiv for non-overflowing inputs. */
7
+ export function mulDiv(a, b, d) {
8
+ if (d === 0n)
9
+ throw new Error("mulDiv: division by zero");
10
+ return (a * b) / d;
11
+ }
12
+ /** 2^(-1/n) via bounded Taylor expansion — matches EmissionController._pow2Neg. */
13
+ export function pow2Neg(n) {
14
+ if (n === 0n)
15
+ throw new Error("pow2Neg: n must be > 0");
16
+ const x = mulDiv(LN2_18, WAD, n * WAD);
17
+ let term = WAD;
18
+ let sum = WAD;
19
+ for (let i = 1n; i <= 24n; i++) {
20
+ term = mulDiv(term, x, WAD) / i;
21
+ if ((i & 1n) === 1n)
22
+ sum -= term;
23
+ else
24
+ sum += term;
25
+ }
26
+ return sum;
27
+ }
28
+ /** Hourly decay factor q = 2^(-1/(24H)). */
29
+ export function hourDecay18(halfLifeDays) {
30
+ return pow2Neg(halfLifeDays * 24n);
31
+ }
32
+ /** Exponentiation by squaring in WAD: x^k with floor after each multiply. */
33
+ export function powWad(x, k) {
34
+ if (k === 0n)
35
+ return WAD;
36
+ let base = x;
37
+ let exp = k;
38
+ let result = WAD;
39
+ while (exp > 0n) {
40
+ if ((exp & 1n) === 1n)
41
+ result = mulDiv(result, base, WAD);
42
+ base = mulDiv(base, base, WAD);
43
+ exp >>= 1n;
44
+ }
45
+ return result;
46
+ }
47
+ export function firstHour(schedule) {
48
+ return schedule.startTime / HOUR;
49
+ }
50
+ function remain(schedule, k) {
51
+ return mulDiv(schedule.initialBalance, powWad(schedule.hourDecay18, k), WAD);
52
+ }
53
+ function rk(schedule, k) {
54
+ return schedule.initialBalance - remain(schedule, k);
55
+ }
56
+ /** Cumulative released amount R(t) at absolute unix time t. */
57
+ export function cumulativeReleased(schedule, t) {
58
+ if (t <= schedule.startTime)
59
+ return 0n;
60
+ const s = t - schedule.startTime;
61
+ const k = s / HOUR;
62
+ const r = s % HOUR;
63
+ const rk0 = rk(schedule, k);
64
+ if (r === 0n)
65
+ return rk0;
66
+ const rk1 = rk(schedule, k + 1n);
67
+ return rk0 + ((rk1 - rk0) * r) / HOUR;
68
+ }
69
+ export function cumulativeShares(schedule, t) {
70
+ const released = cumulativeReleased(schedule, t);
71
+ const platform = mulDiv(released, schedule.platformBps, BPS);
72
+ const exec = mulDiv(released, schedule.execBps, BPS);
73
+ const test = mulDiv(released, schedule.testBps, BPS);
74
+ const arb = released - platform - exec - test;
75
+ return { released, platform, exec, test, arb };
76
+ }
77
+ function sharesDelta(a, b) {
78
+ return {
79
+ emission: b.released - a.released,
80
+ platform: b.platform - a.platform,
81
+ exec: b.exec - a.exec,
82
+ test: b.test - a.test,
83
+ arb: b.arb - a.arb,
84
+ };
85
+ }
86
+ /** Shares released during absolute hour `hourId` (activation hour is partial). */
87
+ export function hourShares(schedule, hourId) {
88
+ const hourStart = hourId * HOUR;
89
+ const hourEnd = hourStart + HOUR;
90
+ const a = hourStart < schedule.startTime ? schedule.startTime : hourStart;
91
+ if (a >= hourEnd) {
92
+ return { emission: 0n, platform: 0n, exec: 0n, test: 0n, arb: 0n };
93
+ }
94
+ return sharesDelta(cumulativeShares(schedule, a), cumulativeShares(schedule, hourEnd));
95
+ }
96
+ /** Arbitration share emitted in [from, to) clipped to [startTime, …). */
97
+ export function arbitrationEmitted(schedule, from, to) {
98
+ if (to <= from)
99
+ return 0n;
100
+ const t1 = from < schedule.startTime ? schedule.startTime : from;
101
+ const t2 = to;
102
+ if (t2 <= t1)
103
+ return 0n;
104
+ return cumulativeShares(schedule, t2).arb - cumulativeShares(schedule, t1).arb;
105
+ }
106
+ export function buildSchedule(input) {
107
+ return {
108
+ startTime: input.startTime,
109
+ initialBalance: input.initialBalance,
110
+ hourDecay18: hourDecay18(input.halfLifeDays),
111
+ platformBps: input.platformBps,
112
+ execBps: input.execBps,
113
+ testBps: input.testBps,
114
+ };
115
+ }
116
+ //# sourceMappingURL=emission-schedule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emission-schedule.js","sourceRoot":"","sources":["../src/emission-schedule.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAE3F,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,CAAC;AAC9B,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,GAAG,GAAG,MAAO,CAAC;AAC3B,MAAM,MAAM,GAAG,mBAAwB,CAAC;AA2BxC,sFAAsF;AACtF,MAAM,UAAU,MAAM,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;IACpD,IAAI,CAAC,KAAK,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC1D,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,OAAO,CAAC,CAAS;IAC/B,IAAI,CAAC,KAAK,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACxD,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;IACvC,IAAI,IAAI,GAAG,GAAG,CAAC;IACf,IAAI,GAAG,GAAG,GAAG,CAAC;IACd,KAAK,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/B,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;QAChC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,EAAE,CAAC;IACd,IAAI,EAAE,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC;IACxB,OAAO,gBAAgB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,gBAAgB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC;AACjF,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAO7B;IACC,OAAO;QACL,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC;QAC5C,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "./emission-schedule.js";
2
+ export * from "./params/index.js";
3
+ export * from "./protocol-proofs.js";
4
+ export * from "./rules/index.js";
5
+ export * from "./schemas/index.js";
6
+ export * from "./units.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "./emission-schedule.js";
2
+ export * from "./params/index.js";
3
+ export * from "./protocol-proofs.js";
4
+ export * from "./rules/index.js";
5
+ export * from "./schemas/index.js";
6
+ export * from "./units.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ import rawDefaults from "../../params/params.json";
2
+ export type Params = typeof rawDefaults;
3
+ export type RuleParams = Params;
4
+ export declare const defaultParams: Params;
5
+ export declare function loadParams(overrides?: Partial<Params>): Params;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/params/index.ts"],"names":[],"mappings":"AAEA,OAAO,WAAW,MAAM,0BAA0B,CAAuB;AAGzE,MAAM,MAAM,MAAM,GAAG,OAAO,WAAW,CAAC;AACxC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAgIhC,eAAO,MAAM,aAAa,EAAE,MAAmD,CAAC;AAEhF,wBAAgB,UAAU,CAAC,SAAS,GAAE,OAAO,CAAC,MAAM,CAAM,GAAG,MAAM,CAElE"}
@@ -0,0 +1,84 @@
1
+ import { z } from "zod";
2
+ import rawDefaults from "../../params/params.json" with { type: "json" };
3
+ import rawRanges from "../../params/ranges.json" with { type: "json" };
4
+ const parameterRecordSchema = z.record(z.string(), z.number().finite().nullable());
5
+ const parameterKeys = Object.keys(rawDefaults);
6
+ const ranges = rawRanges;
7
+ function assertInvariant(condition, message) {
8
+ if (!condition)
9
+ throw new Error(`Invalid rule parameters: ${message}`);
10
+ }
11
+ function validateParams(candidate) {
12
+ const values = parameterRecordSchema.parse(candidate);
13
+ assertInvariant(Object.keys(values).length === parameterKeys.length, "parameter key count differs from params.json");
14
+ for (const key of parameterKeys) {
15
+ assertInvariant(Object.hasOwn(values, key), `missing ${key}`);
16
+ const value = values[key];
17
+ const range = ranges[key];
18
+ if (value === undefined || range === undefined)
19
+ throw new Error(`Invalid rule parameters: missing ${key}`);
20
+ if (value === null) {
21
+ assertInvariant(rawDefaults[key] === null, `${key} may not be null`);
22
+ continue;
23
+ }
24
+ if (range.min !== undefined)
25
+ assertInvariant(value >= range.min, `${key} is below ${range.min}`);
26
+ const maximum = range.maxKey === undefined ? range.max : values[range.maxKey];
27
+ if (maximum !== undefined && maximum !== null) {
28
+ assertInvariant(value <= maximum, `${key} is above ${maximum}`);
29
+ }
30
+ if (range.fixed === true)
31
+ assertInvariant(value === rawDefaults[key], `${key} is fixed`);
32
+ }
33
+ const get = (key) => {
34
+ const value = values[key];
35
+ if (value === null || value === undefined)
36
+ throw new Error(`Expected numeric parameter ${key}`);
37
+ return value;
38
+ };
39
+ assertInvariant(get("deductionExecBps") +
40
+ get("deductionTestBps") +
41
+ get("deductionRevBps") +
42
+ get("deductionPlatBps") ===
43
+ 10_000, "legacy deduction shares must total 10000 bps");
44
+ assertInvariant(get("emissionPlatformBps") +
45
+ get("emissionExecBps") +
46
+ get("emissionTestBps") +
47
+ get("emissionArbBps") ===
48
+ 10_000, "emission shares must total 10000 bps");
49
+ assertInvariant(get("vestingT0Bps") + get("vestingT1Bps") + (10_000 - get("vestingT0Bps") - get("vestingT1Bps")) ===
50
+ 10_000, "vesting shares must total 10000 bps");
51
+ assertInvariant(get("tradeTaxBurnShareBps") +
52
+ get("tradeTaxPlatformShareBps") +
53
+ get("tradeTaxLiquidityShareBps") ===
54
+ 10_000, "trade tax shares must total 10000 bps");
55
+ assertInvariant(get("caseFeeMajorityShareBps") + get("caseFeeWinnerShareBps") + get("caseFeePlatformShareBps") ===
56
+ 10_000, "case fee shares must total 10000 bps");
57
+ assertInvariant(get("overturnPlatformShareBps") + get("overturnRighteousShareBps") === 10_000, "overturn shares must total 10000 bps");
58
+ assertInvariant(get("testerMinStakeAgt") <= get("arbitratorMinStakeAgt") &&
59
+ get("arbitratorMinStakeAgt") <= get("validatorStakeAgt.voluntaryMax"), "role thresholds must satisfy tester <= arbitrator <= voluntary maximum");
60
+ assertInvariant(get("testerWeightCapAgt") >= get("testerMinStakeAgt") &&
61
+ get("arbitratorWeightCapAgt") >= get("arbitratorMinStakeAgt"), "weight caps must not be below their role thresholds");
62
+ assertInvariant(get("collusionReporterRewardBps") + get("collusionArbPoolShareBps") === 10_000, "collusion shares must total 10000 bps");
63
+ assertInvariant(get("tierDailyFee.T1") < get("tierDailyFee.T2") &&
64
+ get("tierDailyFee.T2") < get("tierDailyFee.T3") &&
65
+ get("tierDailyFee.T3") < get("tierDailyFee.T4") &&
66
+ get("tierDailyFee.T4") < get("tierDailyFee.T5"), "tier daily fees must be strictly increasing");
67
+ for (const tier of ["T1", "T2", "T3", "T4", "T5"]) {
68
+ assertInvariant(get(`tierDaysMin.${tier}`) <= get(`tierDaysMax.${tier}`), `tierDaysMin.${tier} must not exceed tierDaysMax.${tier}`);
69
+ }
70
+ assertInvariant(get("passingThresholdMin") <= get("passingThresholdDefault") &&
71
+ get("passingThresholdDefault") <= get("passingThresholdMax"), "passing threshold default must be within min–max range");
72
+ assertInvariant(get("junkThreshold") < get("passingThresholdMin"), "junk threshold must be below passing threshold min");
73
+ assertInvariant(get("participantsMin") <= get("participantsDefault") &&
74
+ get("participantsDefault") <= get("participantsWarning") &&
75
+ get("participantsWarning") <= get("participantsMax"), "participant limits must satisfy min <= default <= warning <= max");
76
+ // unrecoverableCostBps is deprecated in economic model v3 and retained for
77
+ // historical rule compatibility; computeTaskDailyEmission uses a fixed rho of 0.8.
78
+ return values;
79
+ }
80
+ export const defaultParams = Object.freeze(validateParams(rawDefaults));
81
+ export function loadParams(overrides = {}) {
82
+ return Object.freeze(validateParams({ ...rawDefaults, ...overrides }));
83
+ }
84
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/params/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,WAAW,MAAM,0BAA0B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACzE,OAAO,SAAS,MAAM,0BAA0B,CAAC,OAAO,IAAI,EAAE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ProofDomainSchema: z.ZodObject<{
4
+ name: z.ZodLiteral<"AgentGrid Protocol">;
5
+ version: z.ZodLiteral<"1">;
6
+ chainId: z.ZodNumber;
7
+ verifyingContract: z.ZodString;
8
+ }, z.core.$strip>;
9
+ export declare const ExecutorDeliverySchema: z.ZodObject<{
10
+ taskId: z.ZodString;
11
+ cidHash: z.ZodString;
12
+ }, z.core.$strip>;
13
+ export declare const TesterAssignmentSchema: z.ZodObject<{
14
+ taskId: z.ZodString;
15
+ executor: z.ZodString;
16
+ testersHash: z.ZodString;
17
+ seedCommitment: z.ZodString;
18
+ executorTier: z.ZodNumber;
19
+ nonce: z.ZodString;
20
+ deadline: z.ZodString;
21
+ }, z.core.$strip>;
22
+ export declare const TestReportProofSchema: z.ZodObject<{
23
+ taskId: z.ZodString;
24
+ cidHash: z.ZodString;
25
+ executor: z.ZodString;
26
+ conclusionsHash: z.ZodString;
27
+ approved: z.ZodBoolean;
28
+ signature: z.ZodOptional<z.ZodString>;
29
+ }, z.core.$strip>;
30
+ export declare const AssignmentVoucherSchema: z.ZodObject<{
31
+ taskId: z.ZodString;
32
+ executor: z.ZodString;
33
+ issuedAt: z.ZodString;
34
+ expiresAt: z.ZodString;
35
+ nonce: z.ZodString;
36
+ signature: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strip>;
38
+ export declare const PublisherProfileProofSchema: z.ZodObject<{
39
+ publisher: z.ZodString;
40
+ completedTasks: z.ZodNumber;
41
+ reputation: z.ZodNumber;
42
+ nonce: z.ZodString;
43
+ deadline: z.ZodString;
44
+ signature: z.ZodOptional<z.ZodString>;
45
+ }, z.core.$strip>;
46
+ export declare const TesterTimeoutProofSchema: z.ZodObject<{
47
+ taskId: z.ZodString;
48
+ tester: z.ZodString;
49
+ nonce: z.ZodString;
50
+ deadline: z.ZodString;
51
+ signature: z.ZodOptional<z.ZodString>;
52
+ }, z.core.$strip>;
53
+ export declare const ArbitrationCaseProofSchema: z.ZodObject<{
54
+ caseId: z.ZodString;
55
+ taskId: z.ZodString;
56
+ criteriaHash: z.ZodString;
57
+ evidenceHash: z.ZodString;
58
+ nonce: z.ZodString;
59
+ deadline: z.ZodString;
60
+ signature: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strip>;
62
+ export declare const CollusionReportProofSchema: z.ZodObject<{
63
+ juror: z.ZodString;
64
+ reporter: z.ZodString;
65
+ evidenceHash: z.ZodString;
66
+ nonce: z.ZodString;
67
+ deadline: z.ZodString;
68
+ signature: z.ZodOptional<z.ZodString>;
69
+ }, z.core.$strip>;
70
+ export declare const HourlyAnchorProofSchema: z.ZodObject<{
71
+ hourId: z.ZodString;
72
+ recordsRoot: z.ZodString;
73
+ poolSnapshotRoot: z.ZodString;
74
+ seatSnapshotRoot: z.ZodString;
75
+ nonce: z.ZodString;
76
+ deadline: z.ZodString;
77
+ signature: z.ZodOptional<z.ZodString>;
78
+ }, z.core.$strip>;
79
+ export declare const PROTOCOL_PROOF_TYPES: {
80
+ readonly ExecutorDelivery: readonly [{
81
+ readonly name: "taskId";
82
+ readonly type: "bytes32";
83
+ }, {
84
+ readonly name: "cidHash";
85
+ readonly type: "bytes32";
86
+ }];
87
+ readonly TesterAssignment: readonly [{
88
+ readonly name: "taskId";
89
+ readonly type: "bytes32";
90
+ }, {
91
+ readonly name: "executor";
92
+ readonly type: "address";
93
+ }, {
94
+ readonly name: "testersHash";
95
+ readonly type: "bytes32";
96
+ }, {
97
+ readonly name: "seedCommitment";
98
+ readonly type: "bytes32";
99
+ }, {
100
+ readonly name: "executorTier";
101
+ readonly type: "uint8";
102
+ }, {
103
+ readonly name: "nonce";
104
+ readonly type: "uint256";
105
+ }, {
106
+ readonly name: "deadline";
107
+ readonly type: "uint64";
108
+ }];
109
+ readonly TestReport: readonly [{
110
+ readonly name: "taskId";
111
+ readonly type: "bytes32";
112
+ }, {
113
+ readonly name: "cidHash";
114
+ readonly type: "bytes32";
115
+ }, {
116
+ readonly name: "executor";
117
+ readonly type: "address";
118
+ }, {
119
+ readonly name: "conclusionsHash";
120
+ readonly type: "bytes32";
121
+ }, {
122
+ readonly name: "approved";
123
+ readonly type: "bool";
124
+ }];
125
+ readonly AssignmentVoucher: readonly [{
126
+ readonly name: "taskId";
127
+ readonly type: "bytes32";
128
+ }, {
129
+ readonly name: "executor";
130
+ readonly type: "address";
131
+ }, {
132
+ readonly name: "issuedAt";
133
+ readonly type: "uint64";
134
+ }, {
135
+ readonly name: "expiresAt";
136
+ readonly type: "uint64";
137
+ }, {
138
+ readonly name: "nonce";
139
+ readonly type: "uint256";
140
+ }];
141
+ readonly PublisherProfile: readonly [{
142
+ readonly name: "publisher";
143
+ readonly type: "address";
144
+ }, {
145
+ readonly name: "completedTasks";
146
+ readonly type: "uint64";
147
+ }, {
148
+ readonly name: "reputation";
149
+ readonly type: "uint8";
150
+ }, {
151
+ readonly name: "nonce";
152
+ readonly type: "uint256";
153
+ }, {
154
+ readonly name: "deadline";
155
+ readonly type: "uint64";
156
+ }];
157
+ readonly TesterTimeout: readonly [{
158
+ readonly name: "taskId";
159
+ readonly type: "bytes32";
160
+ }, {
161
+ readonly name: "tester";
162
+ readonly type: "address";
163
+ }, {
164
+ readonly name: "nonce";
165
+ readonly type: "uint256";
166
+ }, {
167
+ readonly name: "deadline";
168
+ readonly type: "uint64";
169
+ }];
170
+ readonly ArbitrationCase: readonly [{
171
+ readonly name: "caseId";
172
+ readonly type: "bytes32";
173
+ }, {
174
+ readonly name: "taskId";
175
+ readonly type: "bytes32";
176
+ }, {
177
+ readonly name: "criteriaHash";
178
+ readonly type: "bytes32";
179
+ }, {
180
+ readonly name: "evidenceHash";
181
+ readonly type: "bytes32";
182
+ }, {
183
+ readonly name: "nonce";
184
+ readonly type: "uint256";
185
+ }, {
186
+ readonly name: "deadline";
187
+ readonly type: "uint64";
188
+ }];
189
+ readonly CollusionReport: readonly [{
190
+ readonly name: "juror";
191
+ readonly type: "address";
192
+ }, {
193
+ readonly name: "reporter";
194
+ readonly type: "address";
195
+ }, {
196
+ readonly name: "evidenceHash";
197
+ readonly type: "bytes32";
198
+ }, {
199
+ readonly name: "nonce";
200
+ readonly type: "uint256";
201
+ }, {
202
+ readonly name: "deadline";
203
+ readonly type: "uint64";
204
+ }];
205
+ readonly EmissionHours: readonly [{
206
+ readonly name: "fromHour";
207
+ readonly type: "uint64";
208
+ }, {
209
+ readonly name: "toHour";
210
+ readonly type: "uint64";
211
+ }, {
212
+ readonly name: "hoursHash";
213
+ readonly type: "bytes32";
214
+ }, {
215
+ readonly name: "nonce";
216
+ readonly type: "uint256";
217
+ }, {
218
+ readonly name: "deadline";
219
+ readonly type: "uint64";
220
+ }];
221
+ readonly Settlement: readonly [{
222
+ readonly name: "taskId";
223
+ readonly type: "bytes32";
224
+ }, {
225
+ readonly name: "resultsHash";
226
+ readonly type: "bytes32";
227
+ }, {
228
+ readonly name: "lockedTier";
229
+ readonly type: "uint8";
230
+ }, {
231
+ readonly name: "lockedAt";
232
+ readonly type: "uint64";
233
+ }, {
234
+ readonly name: "billedUntil";
235
+ readonly type: "uint64";
236
+ }, {
237
+ readonly name: "deductionAgt";
238
+ readonly type: "uint256";
239
+ }, {
240
+ readonly name: "executorPoolPi";
241
+ readonly type: "uint256";
242
+ }, {
243
+ readonly name: "hourId";
244
+ readonly type: "uint64";
245
+ }, {
246
+ readonly name: "nonce";
247
+ readonly type: "uint256";
248
+ }, {
249
+ readonly name: "deadline";
250
+ readonly type: "uint64";
251
+ }];
252
+ };
253
+ export declare function assertProtocolProofBounds(input: {
254
+ kind: "PUBLISHER_PROFILE";
255
+ completedTasks: number;
256
+ reputation: number;
257
+ } | {
258
+ kind: "ARBITRATION_CASE";
259
+ criterionCount: number;
260
+ excludedCount: number;
261
+ sourceCount: number;
262
+ weightBps: readonly number[];
263
+ }): void;
264
+ export declare function base32Lower(bytes: Uint8Array): string;
265
+ /** CIDv1 for a raw block using sha2-256, matching Kubo block/put with format=raw. */
266
+ export declare function rawCidV1(content: Uint8Array): Promise<string>;
267
+ //# sourceMappingURL=protocol-proof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