@xyo-network/chain-sdk 5.0.3 → 5.1.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 (305) hide show
  1. package/dist/browser/index.d.ts +1 -0
  2. package/dist/browser/index.d.ts.map +1 -1
  3. package/dist/browser/index.mjs +1 -0
  4. package/dist/browser/index.mjs.map +2 -2
  5. package/dist/browser/modules/analyze/ChainHeadSelector.d.ts +40 -0
  6. package/dist/browser/modules/analyze/ChainHeadSelector.d.ts.map +1 -1
  7. package/dist/browser/modules/analyze/admission.d.ts +65 -0
  8. package/dist/browser/modules/analyze/admission.d.ts.map +1 -0
  9. package/dist/browser/modules/analyze/index.d.ts +1 -0
  10. package/dist/browser/modules/analyze/index.d.ts.map +1 -1
  11. package/dist/browser/modules/protocol/block/BuildBlockOptions.d.ts +8 -0
  12. package/dist/browser/modules/protocol/block/BuildBlockOptions.d.ts.map +1 -1
  13. package/dist/browser/modules/protocol/block/buildBlock.d.ts.map +1 -1
  14. package/dist/browser/modules/protocol/block/buildNextBlock.d.ts +2 -1
  15. package/dist/browser/modules/protocol/block/buildNextBlock.d.ts.map +1 -1
  16. package/dist/browser/modules/services/implementation/processPendingBlocks.d.ts +9 -1
  17. package/dist/browser/modules/services/implementation/processPendingBlocks.d.ts.map +1 -1
  18. package/dist/browser/modules/services/simple/block/runner/SimpleBlockRunner.d.ts +34 -1
  19. package/dist/browser/modules/services/simple/block/runner/SimpleBlockRunner.d.ts.map +1 -1
  20. package/dist/browser/modules/services/simple/block/runner/index.d.ts +1 -0
  21. package/dist/browser/modules/services/simple/block/runner/index.d.ts.map +1 -1
  22. package/dist/browser/modules/services/simple/block/runner/selectSupersededCandidate.d.ts +22 -0
  23. package/dist/browser/modules/services/simple/block/runner/selectSupersededCandidate.d.ts.map +1 -0
  24. package/dist/browser/modules/slashing/detect/DetectedOffense.d.ts +27 -0
  25. package/dist/browser/modules/slashing/detect/DetectedOffense.d.ts.map +1 -0
  26. package/dist/browser/modules/slashing/detect/candidatePairs.d.ts +44 -0
  27. package/dist/browser/modules/slashing/detect/candidatePairs.d.ts.map +1 -0
  28. package/dist/browser/modules/slashing/detect/index.d.ts +5 -0
  29. package/dist/browser/modules/slashing/detect/index.d.ts.map +1 -0
  30. package/dist/browser/modules/slashing/detect/offenseGate.d.ts +18 -0
  31. package/dist/browser/modules/slashing/detect/offenseGate.d.ts.map +1 -0
  32. package/dist/browser/modules/slashing/detect/suppression.d.ts +23 -0
  33. package/dist/browser/modules/slashing/detect/suppression.d.ts.map +1 -0
  34. package/dist/browser/modules/slashing/eligibility/evaluateProducerEligibility.d.ts +71 -0
  35. package/dist/browser/modules/slashing/eligibility/evaluateProducerEligibility.d.ts.map +1 -0
  36. package/dist/browser/modules/slashing/eligibility/index.d.ts +2 -0
  37. package/dist/browser/modules/slashing/eligibility/index.d.ts.map +1 -0
  38. package/dist/browser/modules/slashing/index/SlashIndexStore.d.ts +22 -0
  39. package/dist/browser/modules/slashing/index/SlashIndexStore.d.ts.map +1 -0
  40. package/dist/browser/modules/slashing/index/foldSlashIndex.d.ts +56 -0
  41. package/dist/browser/modules/slashing/index/foldSlashIndex.d.ts.map +1 -0
  42. package/dist/browser/modules/slashing/index/index.d.ts +3 -0
  43. package/dist/browser/modules/slashing/index/index.d.ts.map +1 -0
  44. package/dist/browser/modules/slashing/index.d.ts +6 -0
  45. package/dist/browser/modules/slashing/index.d.ts.map +1 -0
  46. package/dist/browser/modules/slashing/model/OffenseProcedure.d.ts +28 -0
  47. package/dist/browser/modules/slashing/model/OffenseProcedure.d.ts.map +1 -0
  48. package/dist/browser/modules/slashing/model/OffenseVerificationContext.d.ts +88 -0
  49. package/dist/browser/modules/slashing/model/OffenseVerificationContext.d.ts.map +1 -0
  50. package/dist/browser/modules/slashing/model/SlashHistoryReader.d.ts +34 -0
  51. package/dist/browser/modules/slashing/model/SlashHistoryReader.d.ts.map +1 -0
  52. package/dist/browser/modules/slashing/model/VerificationOutcome.d.ts +39 -0
  53. package/dist/browser/modules/slashing/model/VerificationOutcome.d.ts.map +1 -0
  54. package/dist/browser/modules/slashing/model/index.d.ts +6 -0
  55. package/dist/browser/modules/slashing/model/index.d.ts.map +1 -0
  56. package/dist/browser/modules/slashing/model/offenseKey.d.ts +42 -0
  57. package/dist/browser/modules/slashing/model/offenseKey.d.ts.map +1 -0
  58. package/dist/browser/modules/slashing/verify/index.d.ts +10 -0
  59. package/dist/browser/modules/slashing/verify/index.d.ts.map +1 -0
  60. package/dist/browser/modules/slashing/verify/preamble.d.ts +63 -0
  61. package/dist/browser/modules/slashing/verify/preamble.d.ts.map +1 -0
  62. package/dist/browser/modules/slashing/verify/verifyEquivocation.d.ts +19 -0
  63. package/dist/browser/modules/slashing/verify/verifyEquivocation.d.ts.map +1 -0
  64. package/dist/browser/modules/slashing/verify/verifyFalseAnchor.d.ts +15 -0
  65. package/dist/browser/modules/slashing/verify/verifyFalseAnchor.d.ts.map +1 -0
  66. package/dist/browser/modules/slashing/verify/verifyFalseAttestation.d.ts +22 -0
  67. package/dist/browser/modules/slashing/verify/verifyFalseAttestation.d.ts.map +1 -0
  68. package/dist/browser/modules/slashing/verify/verifyIneligibleProduction.d.ts +18 -0
  69. package/dist/browser/modules/slashing/verify/verifyIneligibleProduction.d.ts.map +1 -0
  70. package/dist/browser/modules/slashing/verify/verifyInvalidBlock.d.ts +18 -0
  71. package/dist/browser/modules/slashing/verify/verifyInvalidBlock.d.ts.map +1 -0
  72. package/dist/browser/modules/slashing/verify/verifyInvalidSlashRequest.d.ts +11 -0
  73. package/dist/browser/modules/slashing/verify/verifyInvalidSlashRequest.d.ts.map +1 -0
  74. package/dist/browser/modules/slashing/verify/verifyOffense.d.ts +29 -0
  75. package/dist/browser/modules/slashing/verify/verifyOffense.d.ts.map +1 -0
  76. package/dist/browser/modules/slashing/verify/verifyRewardOvermint.d.ts +23 -0
  77. package/dist/browser/modules/slashing/verify/verifyRewardOvermint.d.ts.map +1 -0
  78. package/dist/browser/modules/validation/elevatedPayload/lib/findElevatingTransaction.d.ts +14 -0
  79. package/dist/browser/modules/validation/elevatedPayload/lib/findElevatingTransaction.d.ts.map +1 -0
  80. package/dist/browser/modules/validation/elevatedPayload/lib/index.d.ts +2 -0
  81. package/dist/browser/modules/validation/elevatedPayload/lib/index.d.ts.map +1 -1
  82. package/dist/browser/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.d.ts +33 -0
  83. package/dist/browser/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.d.ts.map +1 -0
  84. package/dist/browser/modules/validation/elevatedPayload/payloads/index.d.ts +5 -0
  85. package/dist/browser/modules/validation/elevatedPayload/payloads/index.d.ts.map +1 -1
  86. package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.d.ts +14 -0
  87. package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.d.ts.map +1 -0
  88. package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.d.ts +10 -0
  89. package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.d.ts.map +1 -0
  90. package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts +10 -0
  91. package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts.map +1 -0
  92. package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.d.ts +10 -0
  93. package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.d.ts.map +1 -0
  94. package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.d.ts +14 -0
  95. package/dist/browser/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.d.ts.map +1 -0
  96. package/dist/browser/modules/validation/elevatedPayload/validatePayloadInBlock.d.ts.map +1 -1
  97. package/dist/browser/slashing.d.ts +2 -0
  98. package/dist/browser/slashing.d.ts.map +1 -0
  99. package/dist/neutral/analyze.mjs +85 -3
  100. package/dist/neutral/analyze.mjs.map +3 -3
  101. package/dist/neutral/index.d.ts +1 -0
  102. package/dist/neutral/index.d.ts.map +1 -1
  103. package/dist/neutral/index.mjs +1 -0
  104. package/dist/neutral/index.mjs.map +2 -2
  105. package/dist/neutral/modules/analyze/ChainHeadSelector.d.ts +40 -0
  106. package/dist/neutral/modules/analyze/ChainHeadSelector.d.ts.map +1 -1
  107. package/dist/neutral/modules/analyze/admission.d.ts +65 -0
  108. package/dist/neutral/modules/analyze/admission.d.ts.map +1 -0
  109. package/dist/neutral/modules/analyze/index.d.ts +1 -0
  110. package/dist/neutral/modules/analyze/index.d.ts.map +1 -1
  111. package/dist/neutral/modules/protocol/block/BuildBlockOptions.d.ts +8 -0
  112. package/dist/neutral/modules/protocol/block/BuildBlockOptions.d.ts.map +1 -1
  113. package/dist/neutral/modules/protocol/block/buildBlock.d.ts.map +1 -1
  114. package/dist/neutral/modules/protocol/block/buildNextBlock.d.ts +2 -1
  115. package/dist/neutral/modules/protocol/block/buildNextBlock.d.ts.map +1 -1
  116. package/dist/neutral/modules/services/implementation/processPendingBlocks.d.ts +9 -1
  117. package/dist/neutral/modules/services/implementation/processPendingBlocks.d.ts.map +1 -1
  118. package/dist/neutral/modules/services/simple/block/runner/SimpleBlockRunner.d.ts +34 -1
  119. package/dist/neutral/modules/services/simple/block/runner/SimpleBlockRunner.d.ts.map +1 -1
  120. package/dist/neutral/modules/services/simple/block/runner/index.d.ts +1 -0
  121. package/dist/neutral/modules/services/simple/block/runner/index.d.ts.map +1 -1
  122. package/dist/neutral/modules/services/simple/block/runner/selectSupersededCandidate.d.ts +22 -0
  123. package/dist/neutral/modules/services/simple/block/runner/selectSupersededCandidate.d.ts.map +1 -0
  124. package/dist/neutral/modules/slashing/detect/DetectedOffense.d.ts +27 -0
  125. package/dist/neutral/modules/slashing/detect/DetectedOffense.d.ts.map +1 -0
  126. package/dist/neutral/modules/slashing/detect/candidatePairs.d.ts +44 -0
  127. package/dist/neutral/modules/slashing/detect/candidatePairs.d.ts.map +1 -0
  128. package/dist/neutral/modules/slashing/detect/index.d.ts +5 -0
  129. package/dist/neutral/modules/slashing/detect/index.d.ts.map +1 -0
  130. package/dist/neutral/modules/slashing/detect/offenseGate.d.ts +18 -0
  131. package/dist/neutral/modules/slashing/detect/offenseGate.d.ts.map +1 -0
  132. package/dist/neutral/modules/slashing/detect/suppression.d.ts +23 -0
  133. package/dist/neutral/modules/slashing/detect/suppression.d.ts.map +1 -0
  134. package/dist/neutral/modules/slashing/eligibility/evaluateProducerEligibility.d.ts +71 -0
  135. package/dist/neutral/modules/slashing/eligibility/evaluateProducerEligibility.d.ts.map +1 -0
  136. package/dist/neutral/modules/slashing/eligibility/index.d.ts +2 -0
  137. package/dist/neutral/modules/slashing/eligibility/index.d.ts.map +1 -0
  138. package/dist/neutral/modules/slashing/index/SlashIndexStore.d.ts +22 -0
  139. package/dist/neutral/modules/slashing/index/SlashIndexStore.d.ts.map +1 -0
  140. package/dist/neutral/modules/slashing/index/foldSlashIndex.d.ts +56 -0
  141. package/dist/neutral/modules/slashing/index/foldSlashIndex.d.ts.map +1 -0
  142. package/dist/neutral/modules/slashing/index/index.d.ts +3 -0
  143. package/dist/neutral/modules/slashing/index/index.d.ts.map +1 -0
  144. package/dist/neutral/modules/slashing/index.d.ts +6 -0
  145. package/dist/neutral/modules/slashing/index.d.ts.map +1 -0
  146. package/dist/neutral/modules/slashing/model/OffenseProcedure.d.ts +28 -0
  147. package/dist/neutral/modules/slashing/model/OffenseProcedure.d.ts.map +1 -0
  148. package/dist/neutral/modules/slashing/model/OffenseVerificationContext.d.ts +88 -0
  149. package/dist/neutral/modules/slashing/model/OffenseVerificationContext.d.ts.map +1 -0
  150. package/dist/neutral/modules/slashing/model/SlashHistoryReader.d.ts +34 -0
  151. package/dist/neutral/modules/slashing/model/SlashHistoryReader.d.ts.map +1 -0
  152. package/dist/neutral/modules/slashing/model/VerificationOutcome.d.ts +39 -0
  153. package/dist/neutral/modules/slashing/model/VerificationOutcome.d.ts.map +1 -0
  154. package/dist/neutral/modules/slashing/model/index.d.ts +6 -0
  155. package/dist/neutral/modules/slashing/model/index.d.ts.map +1 -0
  156. package/dist/neutral/modules/slashing/model/offenseKey.d.ts +42 -0
  157. package/dist/neutral/modules/slashing/model/offenseKey.d.ts.map +1 -0
  158. package/dist/neutral/modules/slashing/verify/index.d.ts +10 -0
  159. package/dist/neutral/modules/slashing/verify/index.d.ts.map +1 -0
  160. package/dist/neutral/modules/slashing/verify/preamble.d.ts +63 -0
  161. package/dist/neutral/modules/slashing/verify/preamble.d.ts.map +1 -0
  162. package/dist/neutral/modules/slashing/verify/verifyEquivocation.d.ts +19 -0
  163. package/dist/neutral/modules/slashing/verify/verifyEquivocation.d.ts.map +1 -0
  164. package/dist/neutral/modules/slashing/verify/verifyFalseAnchor.d.ts +15 -0
  165. package/dist/neutral/modules/slashing/verify/verifyFalseAnchor.d.ts.map +1 -0
  166. package/dist/neutral/modules/slashing/verify/verifyFalseAttestation.d.ts +22 -0
  167. package/dist/neutral/modules/slashing/verify/verifyFalseAttestation.d.ts.map +1 -0
  168. package/dist/neutral/modules/slashing/verify/verifyIneligibleProduction.d.ts +18 -0
  169. package/dist/neutral/modules/slashing/verify/verifyIneligibleProduction.d.ts.map +1 -0
  170. package/dist/neutral/modules/slashing/verify/verifyInvalidBlock.d.ts +18 -0
  171. package/dist/neutral/modules/slashing/verify/verifyInvalidBlock.d.ts.map +1 -0
  172. package/dist/neutral/modules/slashing/verify/verifyInvalidSlashRequest.d.ts +11 -0
  173. package/dist/neutral/modules/slashing/verify/verifyInvalidSlashRequest.d.ts.map +1 -0
  174. package/dist/neutral/modules/slashing/verify/verifyOffense.d.ts +29 -0
  175. package/dist/neutral/modules/slashing/verify/verifyOffense.d.ts.map +1 -0
  176. package/dist/neutral/modules/slashing/verify/verifyRewardOvermint.d.ts +23 -0
  177. package/dist/neutral/modules/slashing/verify/verifyRewardOvermint.d.ts.map +1 -0
  178. package/dist/neutral/modules/validation/elevatedPayload/lib/findElevatingTransaction.d.ts +14 -0
  179. package/dist/neutral/modules/validation/elevatedPayload/lib/findElevatingTransaction.d.ts.map +1 -0
  180. package/dist/neutral/modules/validation/elevatedPayload/lib/index.d.ts +2 -0
  181. package/dist/neutral/modules/validation/elevatedPayload/lib/index.d.ts.map +1 -1
  182. package/dist/neutral/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.d.ts +33 -0
  183. package/dist/neutral/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.d.ts.map +1 -0
  184. package/dist/neutral/modules/validation/elevatedPayload/payloads/index.d.ts +5 -0
  185. package/dist/neutral/modules/validation/elevatedPayload/payloads/index.d.ts.map +1 -1
  186. package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.d.ts +14 -0
  187. package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.d.ts.map +1 -0
  188. package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.d.ts +10 -0
  189. package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.d.ts.map +1 -0
  190. package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts +10 -0
  191. package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts.map +1 -0
  192. package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.d.ts +10 -0
  193. package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.d.ts.map +1 -0
  194. package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.d.ts +14 -0
  195. package/dist/neutral/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.d.ts.map +1 -0
  196. package/dist/neutral/modules/validation/elevatedPayload/validatePayloadInBlock.d.ts.map +1 -1
  197. package/dist/neutral/protocol.mjs +8 -3
  198. package/dist/neutral/protocol.mjs.map +2 -2
  199. package/dist/neutral/services.mjs +77 -7
  200. package/dist/neutral/services.mjs.map +4 -4
  201. package/dist/neutral/slashing.d.ts +2 -0
  202. package/dist/neutral/slashing.d.ts.map +1 -0
  203. package/dist/neutral/slashing.mjs +824 -0
  204. package/dist/neutral/slashing.mjs.map +7 -0
  205. package/dist/neutral/validation.mjs +274 -43
  206. package/dist/neutral/validation.mjs.map +4 -4
  207. package/dist/node/index.d.ts +1 -0
  208. package/dist/node/index.d.ts.map +1 -1
  209. package/dist/node/index.mjs +1 -0
  210. package/dist/node/index.mjs.map +2 -2
  211. package/dist/node/modules/analyze/ChainHeadSelector.d.ts +40 -0
  212. package/dist/node/modules/analyze/ChainHeadSelector.d.ts.map +1 -1
  213. package/dist/node/modules/analyze/admission.d.ts +65 -0
  214. package/dist/node/modules/analyze/admission.d.ts.map +1 -0
  215. package/dist/node/modules/analyze/index.d.ts +1 -0
  216. package/dist/node/modules/analyze/index.d.ts.map +1 -1
  217. package/dist/node/modules/protocol/block/BuildBlockOptions.d.ts +8 -0
  218. package/dist/node/modules/protocol/block/BuildBlockOptions.d.ts.map +1 -1
  219. package/dist/node/modules/protocol/block/buildBlock.d.ts.map +1 -1
  220. package/dist/node/modules/protocol/block/buildNextBlock.d.ts +2 -1
  221. package/dist/node/modules/protocol/block/buildNextBlock.d.ts.map +1 -1
  222. package/dist/node/modules/services/implementation/processPendingBlocks.d.ts +9 -1
  223. package/dist/node/modules/services/implementation/processPendingBlocks.d.ts.map +1 -1
  224. package/dist/node/modules/services/simple/block/runner/SimpleBlockRunner.d.ts +34 -1
  225. package/dist/node/modules/services/simple/block/runner/SimpleBlockRunner.d.ts.map +1 -1
  226. package/dist/node/modules/services/simple/block/runner/index.d.ts +1 -0
  227. package/dist/node/modules/services/simple/block/runner/index.d.ts.map +1 -1
  228. package/dist/node/modules/services/simple/block/runner/selectSupersededCandidate.d.ts +22 -0
  229. package/dist/node/modules/services/simple/block/runner/selectSupersededCandidate.d.ts.map +1 -0
  230. package/dist/node/modules/slashing/detect/DetectedOffense.d.ts +27 -0
  231. package/dist/node/modules/slashing/detect/DetectedOffense.d.ts.map +1 -0
  232. package/dist/node/modules/slashing/detect/candidatePairs.d.ts +44 -0
  233. package/dist/node/modules/slashing/detect/candidatePairs.d.ts.map +1 -0
  234. package/dist/node/modules/slashing/detect/index.d.ts +5 -0
  235. package/dist/node/modules/slashing/detect/index.d.ts.map +1 -0
  236. package/dist/node/modules/slashing/detect/offenseGate.d.ts +18 -0
  237. package/dist/node/modules/slashing/detect/offenseGate.d.ts.map +1 -0
  238. package/dist/node/modules/slashing/detect/suppression.d.ts +23 -0
  239. package/dist/node/modules/slashing/detect/suppression.d.ts.map +1 -0
  240. package/dist/node/modules/slashing/eligibility/evaluateProducerEligibility.d.ts +71 -0
  241. package/dist/node/modules/slashing/eligibility/evaluateProducerEligibility.d.ts.map +1 -0
  242. package/dist/node/modules/slashing/eligibility/index.d.ts +2 -0
  243. package/dist/node/modules/slashing/eligibility/index.d.ts.map +1 -0
  244. package/dist/node/modules/slashing/index/SlashIndexStore.d.ts +22 -0
  245. package/dist/node/modules/slashing/index/SlashIndexStore.d.ts.map +1 -0
  246. package/dist/node/modules/slashing/index/foldSlashIndex.d.ts +56 -0
  247. package/dist/node/modules/slashing/index/foldSlashIndex.d.ts.map +1 -0
  248. package/dist/node/modules/slashing/index/index.d.ts +3 -0
  249. package/dist/node/modules/slashing/index/index.d.ts.map +1 -0
  250. package/dist/node/modules/slashing/index.d.ts +6 -0
  251. package/dist/node/modules/slashing/index.d.ts.map +1 -0
  252. package/dist/node/modules/slashing/model/OffenseProcedure.d.ts +28 -0
  253. package/dist/node/modules/slashing/model/OffenseProcedure.d.ts.map +1 -0
  254. package/dist/node/modules/slashing/model/OffenseVerificationContext.d.ts +88 -0
  255. package/dist/node/modules/slashing/model/OffenseVerificationContext.d.ts.map +1 -0
  256. package/dist/node/modules/slashing/model/SlashHistoryReader.d.ts +34 -0
  257. package/dist/node/modules/slashing/model/SlashHistoryReader.d.ts.map +1 -0
  258. package/dist/node/modules/slashing/model/VerificationOutcome.d.ts +39 -0
  259. package/dist/node/modules/slashing/model/VerificationOutcome.d.ts.map +1 -0
  260. package/dist/node/modules/slashing/model/index.d.ts +6 -0
  261. package/dist/node/modules/slashing/model/index.d.ts.map +1 -0
  262. package/dist/node/modules/slashing/model/offenseKey.d.ts +42 -0
  263. package/dist/node/modules/slashing/model/offenseKey.d.ts.map +1 -0
  264. package/dist/node/modules/slashing/verify/index.d.ts +10 -0
  265. package/dist/node/modules/slashing/verify/index.d.ts.map +1 -0
  266. package/dist/node/modules/slashing/verify/preamble.d.ts +63 -0
  267. package/dist/node/modules/slashing/verify/preamble.d.ts.map +1 -0
  268. package/dist/node/modules/slashing/verify/verifyEquivocation.d.ts +19 -0
  269. package/dist/node/modules/slashing/verify/verifyEquivocation.d.ts.map +1 -0
  270. package/dist/node/modules/slashing/verify/verifyFalseAnchor.d.ts +15 -0
  271. package/dist/node/modules/slashing/verify/verifyFalseAnchor.d.ts.map +1 -0
  272. package/dist/node/modules/slashing/verify/verifyFalseAttestation.d.ts +22 -0
  273. package/dist/node/modules/slashing/verify/verifyFalseAttestation.d.ts.map +1 -0
  274. package/dist/node/modules/slashing/verify/verifyIneligibleProduction.d.ts +18 -0
  275. package/dist/node/modules/slashing/verify/verifyIneligibleProduction.d.ts.map +1 -0
  276. package/dist/node/modules/slashing/verify/verifyInvalidBlock.d.ts +18 -0
  277. package/dist/node/modules/slashing/verify/verifyInvalidBlock.d.ts.map +1 -0
  278. package/dist/node/modules/slashing/verify/verifyInvalidSlashRequest.d.ts +11 -0
  279. package/dist/node/modules/slashing/verify/verifyInvalidSlashRequest.d.ts.map +1 -0
  280. package/dist/node/modules/slashing/verify/verifyOffense.d.ts +29 -0
  281. package/dist/node/modules/slashing/verify/verifyOffense.d.ts.map +1 -0
  282. package/dist/node/modules/slashing/verify/verifyRewardOvermint.d.ts +23 -0
  283. package/dist/node/modules/slashing/verify/verifyRewardOvermint.d.ts.map +1 -0
  284. package/dist/node/modules/validation/elevatedPayload/lib/findElevatingTransaction.d.ts +14 -0
  285. package/dist/node/modules/validation/elevatedPayload/lib/findElevatingTransaction.d.ts.map +1 -0
  286. package/dist/node/modules/validation/elevatedPayload/lib/index.d.ts +2 -0
  287. package/dist/node/modules/validation/elevatedPayload/lib/index.d.ts.map +1 -1
  288. package/dist/node/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.d.ts +33 -0
  289. package/dist/node/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.d.ts.map +1 -0
  290. package/dist/node/modules/validation/elevatedPayload/payloads/index.d.ts +5 -0
  291. package/dist/node/modules/validation/elevatedPayload/payloads/index.d.ts.map +1 -1
  292. package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.d.ts +14 -0
  293. package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.d.ts.map +1 -0
  294. package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.d.ts +10 -0
  295. package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.d.ts.map +1 -0
  296. package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts +10 -0
  297. package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.d.ts.map +1 -0
  298. package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.d.ts +10 -0
  299. package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.d.ts.map +1 -0
  300. package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.d.ts +14 -0
  301. package/dist/node/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.d.ts.map +1 -0
  302. package/dist/node/modules/validation/elevatedPayload/validatePayloadInBlock.d.ts.map +1 -1
  303. package/dist/node/slashing.d.ts +2 -0
  304. package/dist/node/slashing.d.ts.map +1 -0
  305. package/package.json +14 -8
@@ -0,0 +1,18 @@
1
+ import type { OffenseProcedure } from '../model/OffenseProcedure.js';
2
+ /**
3
+ * O5 — ineligible production: producing a block without the standing to produce it.
4
+ *
5
+ * The measurement point is recomputed from the two blocks' own signed anchors rather than taken
6
+ * from the report or from a live EVM head. That is what makes admission and after-the-fact
7
+ * verification ask the same question: a block that was admissible when it was produced must not
8
+ * become an offense later because stake moved in the meantime.
9
+ *
10
+ * Both halves of the predicate matter. Stake alone says an address *could* participate; the intent
11
+ * declaration is how it says it *is*. Seasoning is what stops standing being rented for a block.
12
+ *
13
+ * Everything here depends on external state — stake as it stood at an EVM height — so an
14
+ * unreadable snapshot is indeterminate. A verifier without that history has no opinion, and
15
+ * pretending otherwise would convict on the basis of not having looked.
16
+ */
17
+ export declare const verifyIneligibleProduction: OffenseProcedure;
18
+ //# sourceMappingURL=verifyIneligibleProduction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verifyIneligibleProduction.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/verifyIneligibleProduction.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,8BAA8B,CAAA;AAwCtF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,0BAA0B,EAAE,gBA+CxC,CAAA"}
@@ -0,0 +1,18 @@
1
+ import type { OffenseProcedure } from '../model/OffenseProcedure.js';
2
+ /**
3
+ * O2 — invalid block: finalizing a block that breaks the rules in force at its height.
4
+ *
5
+ * Only rules that reproduce identically on every node are replayed. Admission gates are excluded
6
+ * by construction: whether a candidate was admitted depends on what a particular node had in its
7
+ * pool at a particular moment, so re-running one later would convict a producer for someone
8
+ * else's timing.
9
+ *
10
+ * Nothing the reporter supplied is trusted as state. The parent and the balances come from this
11
+ * verifier's own canonical history, because a report that carried its own version of history
12
+ * could prove anything it liked.
13
+ *
14
+ * An unresolvable parent is indeterminate rather than a finding. A verifier that has pruned past
15
+ * the offense knows nothing about the block — that is a fact about the verifier.
16
+ */
17
+ export declare const verifyInvalidBlock: OffenseProcedure;
18
+ //# sourceMappingURL=verifyInvalidBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verifyInvalidBlock.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/verifyInvalidBlock.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,8BAA8B,CAAA;AAgDtF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,EAAE,gBA0ChC,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { OffenseCode } from '@xyo-network/xl1-sdk';
2
+ import type { OffenseProcedure } from '../model/OffenseProcedure.js';
3
+ /**
4
+ * Builds the invalid-slash-request procedure over a registry it resolves at call time.
5
+ *
6
+ * The registry is passed as a thunk rather than imported, because this procedure lives inside the
7
+ * same registry it needs. Deferring the lookup keeps that self-reference within one module instead
8
+ * of turning it into an import cycle between two.
9
+ */
10
+ export declare function createVerifyInvalidSlashRequest(resolve: () => Partial<Record<OffenseCode, OffenseProcedure>>): OffenseProcedure;
11
+ //# sourceMappingURL=verifyInvalidSlashRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verifyInvalidSlashRequest.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/verifyInvalidSlashRequest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,sBAAsB,CAAA;AAIrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAYpE;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,GAC5D,gBAAgB,CAkFlB"}
@@ -0,0 +1,29 @@
1
+ import type { OffenseCode, SlashRequest } from '@xyo-network/xl1-sdk';
2
+ import type { OffenseProcedure } from '../model/OffenseProcedure.js';
3
+ import type { OffenseVerificationContext } from '../model/OffenseVerificationContext.js';
4
+ import type { OffenseVerdict } from '../model/VerificationOutcome.js';
5
+ /**
6
+ * The procedure for each offense class.
7
+ *
8
+ * Exported as a map so a class can be verified in isolation by conformance tests, and so the
9
+ * invalid-slash-request procedure can recurse back through it to re-run the report it is
10
+ * complaining about.
11
+ */
12
+ export declare const offenseProcedures: Partial<Record<OffenseCode, OffenseProcedure>>;
13
+ /**
14
+ * Verifies one report, end to end.
15
+ *
16
+ * The shared preamble runs first for every class: cited artifacts are re-hashed and their
17
+ * signatures checked, then the offense is measured against the freshness window. Both are
18
+ * conditions no class can waive, so running them once here keeps a procedure from quietly
19
+ * skipping one.
20
+ *
21
+ * A class with no registered procedure is indeterminate rather than invalid. The register can
22
+ * activate a class this build does not implement, and refusing to conclude is the honest answer —
23
+ * concluding "not an offense" would let the gap read as an acquittal.
24
+ * @param ctx What the verifier may consult
25
+ * @param request The report being verified
26
+ * @returns The verdict, with its transcript
27
+ */
28
+ export declare function verifyOffense(ctx: OffenseVerificationContext, request: SlashRequest): Promise<OffenseVerdict>;
29
+ //# sourceMappingURL=verifyOffense.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verifyOffense.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/verifyOffense.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAWrE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAQ5E,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,0BAA0B,EAC/B,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,cAAc,CAAC,CAwBzB"}
@@ -0,0 +1,23 @@
1
+ import type { OffenseProcedure } from '../model/OffenseProcedure.js';
2
+ /**
3
+ * O3 — reward overmint: paying yourself more than the rules allowed.
4
+ *
5
+ * The allowance is recomputed from the register rather than read from the block, since a block
6
+ * that could state its own allowance could authorise anything. Where the allowance comes from
7
+ * depends on how the chain is configured — a fixed schedule, or the staking contract — and when
8
+ * it comes from the contract it is read at the parent's anchor rather than at a live head, so
9
+ * every verifier asks the contract the same question.
10
+ *
11
+ * Minting is counted only from the zero address. A producer moving its own balance around is
12
+ * spending money that already existed, which is nobody's business but its own.
13
+ *
14
+ * Under-minting is not an offense here. A producer that pays itself less than it could has taken
15
+ * nothing from anyone, and treating generosity as misconduct would be absurd.
16
+ *
17
+ * Only the zero-address mint clause is implemented. The specification's fee-rule and step-transfer
18
+ * clauses wait on the deterministic fee replay and the step-boundary reader; until they land,
19
+ * reports alleging those shapes resolve on the mint clause alone — never as a conviction the
20
+ * missing clauses would have had to establish.
21
+ */
22
+ export declare const verifyRewardOvermint: OffenseProcedure;
23
+ //# sourceMappingURL=verifyRewardOvermint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verifyRewardOvermint.d.ts","sourceRoot":"","sources":["../../../../../src/modules/slashing/verify/verifyRewardOvermint.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AA6BpE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,oBAAoB,EAAE,gBAuClC,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { Payload, WithHashMeta } from '@xyo-network/sdk';
2
+ import type { HydratedBlockWithHashMeta, TransactionBoundWitnessWithHashMeta } from '@xyo-network/xl1-sdk';
3
+ /**
4
+ * The transaction in this block that elevated the payload, when one did.
5
+ *
6
+ * A payload can also ride directly in the block, elevated by the block signer rather than by a
7
+ * transaction. Callers that need a signer to bind against must be able to tell the two apart,
8
+ * because those two paths attribute the payload to entirely different addresses.
9
+ * @param payload The payload being validated
10
+ * @param block The hydrated block carrying it
11
+ * @returns The elevating transaction, or undefined when the payload rode directly
12
+ */
13
+ export declare function findElevatingTransaction(payload: WithHashMeta<Payload>, [, payloads]: HydratedBlockWithHashMeta): TransactionBoundWitnessWithHashMeta | undefined;
14
+ //# sourceMappingURL=findElevatingTransaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findElevatingTransaction.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/lib/findElevatingTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC7D,OAAO,KAAK,EAAE,yBAAyB,EAAE,mCAAmC,EAAE,MAAM,sBAAsB,CAAA;AAG1G;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,EAC9B,CAAC,EAAE,QAAQ,CAAC,EAAE,yBAAyB,GACtC,mCAAmC,GAAG,SAAS,CAIjD"}
@@ -1,7 +1,9 @@
1
+ export * from './findElevatingTransaction.js';
1
2
  export * from './isElevatedFromBlock.js';
2
3
  export * from './validateElevatedFromBlock.js';
3
4
  export * from './validateElevatedFromTransaction.js';
4
5
  export * from './validateIncludedInBlock.js';
6
+ export * from './validateSlashPayloadInBlock.js';
5
7
  export * from './validateTransactionInBlock.js';
6
8
  export * from './validateTypedPayloadInBlock.js';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,sCAAsC,CAAA;AACpD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,sCAAsC,CAAA;AACpD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA"}
@@ -0,0 +1,33 @@
1
+ import type { IdentityFunction } from '@ariestools/sdk';
2
+ import type { Payload, XyoAddress } from '@xyo-network/sdk';
3
+ import type { HydratedBlockWithHashMeta, InBlockPayloadValidationFunctionContext, InBlockRuleParams, TransactionBoundWitnessWithHashMeta } from '@xyo-network/xl1-sdk';
4
+ /** What the shared slash-payload checks concluded, plus the rules the caller still needs. */
5
+ export interface SlashPayloadGateResult {
6
+ /** Reasons the payload is not admissible; empty when the shared checks passed. */
7
+ errors: Error[];
8
+ /** The rules in force at the carrying height, when they resolved. */
9
+ params?: InBlockRuleParams;
10
+ /** The transaction that elevated the payload, once binding has confirmed it. */
11
+ transaction?: TransactionBoundWitnessWithHashMeta;
12
+ }
13
+ /**
14
+ * The checks every slash payload shares: the activation gate, then signer binding.
15
+ *
16
+ * Every slash payload is transaction-elevation-only. A payload riding directly in the block would
17
+ * bind to the block signer instead of a transaction sender, and nothing in the design says what
18
+ * that would mean — so that path is refused rather than guessed at. Binding `from` to the
19
+ * elevating transaction's sender gets self-signing discipline transitively, since the transaction
20
+ * validator has already tied `tx.from` to a verified bound-witness signer.
21
+ *
22
+ * The resolved rules come back so a caller can ask its own questions of them without resolving
23
+ * the register a second time, and so the gate stays the only place that decides admissibility.
24
+ * @param context The validation context, which may carry no register at all
25
+ * @param payload The payload being validated
26
+ * @param block The hydrated block carrying it
27
+ * @param identityFunction Guard establishing the payload is the type expected
28
+ * @param fromOf Reads the address the payload claims to be from
29
+ * @param subject What is being gated, named for the error message
30
+ * @returns The shared verdict and the rules in force
31
+ */
32
+ export declare function validateSlashPayloadInBlock<T extends Payload>(context: InBlockPayloadValidationFunctionContext, payload: Payload, block: HydratedBlockWithHashMeta, identityFunction: IdentityFunction<T>, fromOf: (payload: T) => XyoAddress, subject: string): Promise<SlashPayloadGateResult>;
33
+ //# sourceMappingURL=validateSlashPayloadInBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateSlashPayloadInBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/lib/validateSlashPayloadInBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE3D,OAAO,KAAK,EACV,yBAAyB,EAAE,uCAAuC,EAAE,iBAAiB,EACrF,mCAAmC,EACpC,MAAM,sBAAsB,CAAA;AAK7B,6FAA6F;AAC7F,MAAM,WAAW,sBAAsB;IACrC,kFAAkF;IAClF,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,qEAAqE;IACrE,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,gFAAgF;IAChF,WAAW,CAAC,EAAE,mCAAmC,CAAA;CAClD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,2BAA2B,CAAC,CAAC,SAAS,OAAO,EACjE,OAAO,EAAE,uCAAuC,EAChD,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,yBAAyB,EAChC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACrC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,UAAU,EAClC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,sBAAsB,CAAC,CAqBjC"}
@@ -4,6 +4,11 @@ export * from './validateBridgeSourceObservationInBlock.js';
4
4
  export * from './validateChainStakeIntentInBlock.js';
5
5
  export * from './validateHashInBlock.js';
6
6
  export * from './validateSchemaInBlock.js';
7
+ export * from './validateSlashAdjudicationInBlock.js';
8
+ export * from './validateSlashChallengeInBlock.js';
9
+ export * from './validateSlashCommitInBlock.js';
10
+ export * from './validateSlashEvidenceInBlock.js';
11
+ export * from './validateSlashRequestInBlock.js';
7
12
  export * from './validateTimeInBlock.js';
8
13
  export * from './validateTransferInBlock.js';
9
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAA;AAChE,cAAc,kCAAkC,CAAA;AAChD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,sCAAsC,CAAA;AACpD,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAA;AAChE,cAAc,kCAAkC,CAAA;AAChD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,sCAAsC,CAAA;AACpD,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uCAAuC,CAAA;AACrD,cAAc,oCAAoC,CAAA;AAClD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,mCAAmC,CAAA;AACjD,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { InBlockPayloadValidationFunction } from '@xyo-network/xl1-sdk';
2
+ /**
3
+ * Validates a slash adjudication carried in a block.
4
+ *
5
+ * Only the arbiter named by the register may close a report, and that binding survives well past
6
+ * the point where reporting itself opens up — an adjudication from anyone else is not a minority
7
+ * opinion, it is a forged verdict.
8
+ *
9
+ * Whether a confirmed adjudication names its claimant is an arbiter duty checked when the
10
+ * adjudication is recomputed, not a question of block validity. A block carrying a sloppy but
11
+ * genuine verdict is still a valid block.
12
+ */
13
+ export declare const validateSlashAdjudicationInBlock: InBlockPayloadValidationFunction;
14
+ //# sourceMappingURL=validateSlashAdjudicationInBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateSlashAdjudicationInBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/validateSlashAdjudicationInBlock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAK5E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gCAAgC,EAAE,gCAyB9C,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { InBlockPayloadValidationFunction } from '@xyo-network/xl1-sdk';
2
+ /**
3
+ * Validates a slash challenge carried in a block.
4
+ *
5
+ * Anyone may challenge and no bond is required, because a challenge can only exculpate. A
6
+ * frivolous one fails to change the verdict and costs its filer the fee; there is no version of it
7
+ * that harms the accused, so there is nothing here to deter.
8
+ */
9
+ export declare const validateSlashChallengeInBlock: InBlockPayloadValidationFunction;
10
+ //# sourceMappingURL=validateSlashChallengeInBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateSlashChallengeInBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/validateSlashChallengeInBlock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAK5E;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,EAAE,gCAqB3C,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { InBlockPayloadValidationFunction } from '@xyo-network/xl1-sdk';
2
+ /**
3
+ * Validates a slash commitment carried in a block.
4
+ *
5
+ * A commitment reserves a report before its evidence is public, which is what stops a reporter's
6
+ * work from being lifted from the mempool and re-filed under someone else's name. The commitment
7
+ * itself is opaque here by design — checking what it hides is the reveal's job.
8
+ */
9
+ export declare const validateSlashCommitInBlock: InBlockPayloadValidationFunction;
10
+ //# sourceMappingURL=validateSlashCommitInBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateSlashCommitInBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/validateSlashCommitInBlock.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gCAAgC,EAEjC,MAAM,sBAAsB,CAAA;AAsC7B;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,EAAE,gCAwCxC,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { InBlockPayloadValidationFunction } from '@xyo-network/xl1-sdk';
2
+ /**
3
+ * Validates a slash evidence carried in a block.
4
+ *
5
+ * A container carries artifacts and asserts nothing about them, so past the activation gate and
6
+ * signer binding there is nothing left to check. No size ceiling is imposed: character storage is
7
+ * already priced by gas, so an oversized container costs its sender what it costs the chain.
8
+ */
9
+ export declare const validateSlashEvidenceInBlock: InBlockPayloadValidationFunction;
10
+ //# sourceMappingURL=validateSlashEvidenceInBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateSlashEvidenceInBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/validateSlashEvidenceInBlock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAK5E;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,EAAE,gCAqB1C,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { InBlockPayloadValidationFunction } from '@xyo-network/xl1-sdk';
2
+ /**
3
+ * Validates a slash request carried in a block.
4
+ *
5
+ * A request is a recordable transaction, not a verdict, so this checks that it is well-formed and
6
+ * that its evidence exists — never whether the accusation is true. An unverifiable request is
7
+ * still a valid request; deciding it is the arbiter's job.
8
+ *
9
+ * The reportable gate is asked of the height the offense happened at, not the height the report
10
+ * lands at. Comparing against the carrying height would make a rule retroactive and turn conduct
11
+ * that was legal when it occurred into an offense.
12
+ */
13
+ export declare const validateSlashRequestInBlock: InBlockPayloadValidationFunction;
14
+ //# sourceMappingURL=validateSlashRequestInBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateSlashRequestInBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/validation/elevatedPayload/payloads/validateSlashRequestInBlock.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gCAAgC,EAEjC,MAAM,sBAAsB,CAAA;AA8D7B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,EAAE,gCAqCzC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"validatePayloadInBlock.d.ts","sourceRoot":"","sources":["../../../../../src/modules/validation/elevatedPayload/validatePayloadInBlock.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAwB5E,eAAO,MAAM,sBAAsB,EAAE,gCAwBpC,CAAA"}
1
+ {"version":3,"file":"validatePayloadInBlock.d.ts","sourceRoot":"","sources":["../../../../../src/modules/validation/elevatedPayload/validatePayloadInBlock.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAiC5E,eAAO,MAAM,sBAAsB,EAAE,gCAwBpC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './modules/slashing/index.js';
2
+ //# sourceMappingURL=slashing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slashing.d.ts","sourceRoot":"","sources":["../../src/slashing.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAA"}
@@ -1,3 +1,14 @@
1
+ // src/modules/analyze/admission.ts
2
+ var AdmissionModes = ["allowlist", "shadow", "enforce"];
3
+ var AdmissionShadowPublishRunnerMoniker = "AdmissionShadowPublishRunner";
4
+ function isAdmissionShadowPublishRunner(value) {
5
+ return typeof value?.publish === "function";
6
+ }
7
+ function isDivergent(assessment) {
8
+ if (!assessment.eligibility.resolvable) return false;
9
+ return assessment.admittedByAllowList !== (assessment.eligibility.eligible === true);
10
+ }
11
+
1
12
  // src/modules/analyze/analyzeChain.ts
2
13
  import {
3
14
  assertEx,
@@ -165,12 +176,14 @@ import {
165
176
  getWindowedChain
166
177
  } from "@xyo-network/xl1-sdk";
167
178
  var ChainHeadSelector = class extends ChainFinalizer {
179
+ admission;
168
180
  allowedProducers;
169
181
  backoffMs;
170
182
  minCandidates;
171
183
  _timeSinceLastUncle = Date.now();
172
184
  constructor(params) {
173
185
  super(params);
186
+ this.admission = params.admission ?? "allowlist";
174
187
  this.allowedProducers = params.allowedProducers;
175
188
  this.backoffMs = params.backoffMs;
176
189
  this.minCandidates = params.minCandidates;
@@ -184,13 +197,78 @@ var ChainHeadSelector = class extends ChainFinalizer {
184
197
  async findBestHead() {
185
198
  return await spanRootAsync2("findBestHead", async () => {
186
199
  const allProposedBlocks = await this.mempoolViewer.pendingBlocks();
187
- const allowedProducers = this.allowedProducers;
188
- const proposedBlocks = isDefined2(allowedProducers) && allowedProducers.length > 0 ? allProposedBlocks.filter((pb) => allowedProducers.includes(toAddress2(pb[0].addresses[0]))) : allProposedBlocks;
200
+ const allowed = allProposedBlocks.filter((pb) => this.isAllowed(pb));
201
+ const proposedBlocks = await this.admit(allProposedBlocks, allowed);
189
202
  this.windowedFinalizedChain = await getWindowedChain(this.context, this.blockViewer, this.maxWindowSize, this.windowedFinalizedChain);
190
203
  const uncles = findUncles(this.context, this.windowedFinalizedChain, proposedBlocks);
191
204
  return findBestUncle(this.windowedFinalizedChain, uncles, { backoffMs: this.backoffMs, minCandidates: this.minCandidates }) ?? this.windowedFinalizedChain;
192
205
  }, this.context);
193
206
  }
207
+ /**
208
+ * Applies the configured admission posture.
209
+ *
210
+ * In `shadow` the allow-list still decides — participation is computed and published beside it,
211
+ * and changes nothing. That is the entire value of the posture: the network keeps behaving
212
+ * exactly as it did while everyone gets to see what the new rule would have done.
213
+ *
214
+ * In `enforce` participation gates, but only when it reached a conclusion. A candidate whose
215
+ * standing cannot be established is admitted, not rejected — otherwise a finalizer that lost
216
+ * its stake reader would quietly stop accepting anyone's blocks and stall the chain.
217
+ *
218
+ * Assessments publish in both postures. The audit trail must not disappear at the moment
219
+ * admission starts gating — enforce is when it matters most.
220
+ */
221
+ async admit(all, allowed) {
222
+ if (this.admission === "allowlist" || this.params.eligibility === void 0) return allowed;
223
+ const assessments = await this.assess(all);
224
+ await this.publishShadow(assessments);
225
+ if (this.admission === "shadow") return allowed;
226
+ const ineligible = new Set(assessments.filter((assessment) => assessment.eligibility.resolvable && assessment.eligibility.eligible !== true).map((assessment) => assessment.dataHash));
227
+ return allowed.filter((candidate) => !ineligible.has(candidate[0]._dataHash));
228
+ }
229
+ /**
230
+ * Runs both gates over every candidate.
231
+ *
232
+ * An evaluator that throws yields an unresolvable assessment rather than an exception: this
233
+ * sits on the head-selection path, and a flaky stake reader must never be able to stop the
234
+ * chain from finalizing.
235
+ */
236
+ async assess(all) {
237
+ const evaluate = this.params.eligibility;
238
+ if (evaluate === void 0) return [];
239
+ const evaluateSafely = async (candidate) => {
240
+ try {
241
+ return await evaluate(candidate);
242
+ } catch {
243
+ return { resolvable: false };
244
+ }
245
+ };
246
+ return await Promise.all(all.map(async (candidate) => ({
247
+ admittedByAllowList: this.isAllowed(candidate),
248
+ block: candidate[0].block,
249
+ dataHash: candidate[0]._dataHash,
250
+ eligibility: await evaluateSafely(candidate),
251
+ producer: candidate[0].addresses[0]
252
+ })));
253
+ }
254
+ /** Whether the configured allow-list admits a candidate. An empty list admits everyone. */
255
+ isAllowed(candidate) {
256
+ const allowedProducers = this.allowedProducers;
257
+ return isDefined2(allowedProducers) && allowedProducers.length > 0 ? allowedProducers.includes(toAddress2(candidate[0].addresses[0])) : true;
258
+ }
259
+ /** Publishes what the two gates concluded, swallowing failures. */
260
+ async publishShadow(assessments) {
261
+ const publish = this.params.publishAdmissionShadow;
262
+ if (publish === void 0 || assessments.length === 0) return;
263
+ try {
264
+ await publish({
265
+ assessments,
266
+ divergent: assessments.filter((assessment) => isDivergent(assessment)),
267
+ head: this.windowedFinalizedChain[0]?.[0]?.block ?? 0
268
+ });
269
+ } catch {
270
+ }
271
+ }
194
272
  };
195
273
 
196
274
  // src/modules/analyze/producer/ChainProducersAnalyzer.ts
@@ -364,6 +442,8 @@ var TransferAnalyzer = class {
364
442
  }
365
443
  };
366
444
  export {
445
+ AdmissionModes,
446
+ AdmissionShadowPublishRunnerMoniker,
367
447
  BalanceAnalyzer,
368
448
  ChainFinalizer,
369
449
  ChainHeadSelector,
@@ -375,9 +455,11 @@ export {
375
455
  ChainSummaryTransfersSchema,
376
456
  TransferAnalyzer,
377
457
  analyzeChain,
458
+ isAdmissionShadowPublishRunner,
378
459
  isChainSummaryBalances,
379
460
  isChainSummaryProducers,
380
461
  isChainSummaryStakeIntent,
381
- isChainSummaryTransfers
462
+ isChainSummaryTransfers,
463
+ isDivergent
382
464
  };
383
465
  //# sourceMappingURL=analyze.mjs.map