tenjin-cli 0.1.0-alpha.15 → 0.1.0-alpha.16

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 (267) hide show
  1. package/NOTICE.md +54 -7
  2. package/README.md +41 -310
  3. package/dist/{_esm-N4KAVXQR.js → _esm-CE7KNONL.js} +9 -10
  4. package/dist/{ccip-ZGGWQN4X.js → ccip-7RMRLAGV.js} +4 -4
  5. package/dist/{ccip-RPPPKTJR.js → ccip-NLCSCHKI.js} +5 -5
  6. package/dist/chunk-25TJPVBF.js +353 -0
  7. package/dist/chunk-25TJPVBF.js.map +1 -0
  8. package/dist/chunk-2BKS2FVE.js +93 -0
  9. package/dist/chunk-2BKS2FVE.js.map +1 -0
  10. package/dist/chunk-2QYORQBF.js +55 -0
  11. package/dist/chunk-2QYORQBF.js.map +1 -0
  12. package/dist/{chunk-NIKXHWOL.js → chunk-2U5ZVEV3.js} +16 -16
  13. package/dist/chunk-2U5ZVEV3.js.map +1 -0
  14. package/dist/{chunk-HPJGOLTN.js → chunk-3AJS6LLN.js} +13 -8
  15. package/dist/chunk-3AJS6LLN.js.map +1 -0
  16. package/dist/{chunk-KINZ23CV.js → chunk-3AUDA53C.js} +4740 -23
  17. package/dist/chunk-3AUDA53C.js.map +1 -0
  18. package/dist/{chunk-MJZZTKCC.js → chunk-56MOAIP5.js} +5 -10
  19. package/dist/chunk-56MOAIP5.js.map +1 -0
  20. package/dist/{chunk-U5S527PP.js → chunk-5IEP5EGE.js} +3 -3
  21. package/dist/chunk-5X4SZ5BF.js +227 -0
  22. package/dist/chunk-5X4SZ5BF.js.map +1 -0
  23. package/dist/chunk-7WEQQJLG.js +68 -0
  24. package/dist/chunk-7WEQQJLG.js.map +1 -0
  25. package/dist/{chunk-7FK2UN2T.js → chunk-AWQPGIR6.js} +65 -67
  26. package/dist/{chunk-7FK2UN2T.js.map → chunk-AWQPGIR6.js.map} +1 -1
  27. package/dist/{chunk-ZFJJ3EXC.js → chunk-BBVUVBUO.js} +516 -185
  28. package/dist/chunk-BBVUVBUO.js.map +1 -0
  29. package/dist/{chunk-JBIKAAT3.js → chunk-BFFM2WFK.js} +8 -8
  30. package/dist/chunk-BFFM2WFK.js.map +1 -0
  31. package/dist/{chunk-KYQVEKP5.js → chunk-BPMWXTFX.js} +8 -8
  32. package/dist/chunk-DMZZLPZN.js +205 -0
  33. package/dist/chunk-DMZZLPZN.js.map +1 -0
  34. package/dist/{chunk-47PP7TAG.js → chunk-EGELTSPU.js} +1356 -1356
  35. package/dist/chunk-EGELTSPU.js.map +1 -0
  36. package/dist/chunk-GULLJQXA.js +698 -0
  37. package/dist/chunk-GULLJQXA.js.map +1 -0
  38. package/dist/{chunk-S5RYMCV6.js → chunk-HPWO4O6S.js} +3 -3
  39. package/dist/chunk-HVRC33OL.js +174 -0
  40. package/dist/chunk-HVRC33OL.js.map +1 -0
  41. package/dist/{chunk-W6R3HAAG.js → chunk-JRGFKVAZ.js} +2 -2
  42. package/dist/{chunk-XJN5WUKL.js → chunk-KG3D7FIF.js} +2 -2
  43. package/dist/chunk-L3PVMIYQ.js +10328 -0
  44. package/dist/chunk-L3PVMIYQ.js.map +1 -0
  45. package/dist/{chunk-QW2Q2KAH.js → chunk-LHHMV4GU.js} +2 -2
  46. package/dist/{chunk-ZOBNS7CX.js → chunk-MEFB5KHA.js} +4 -18
  47. package/dist/chunk-MEFB5KHA.js.map +1 -0
  48. package/dist/{chunk-M2O56UK7.js → chunk-N35E6CM2.js} +293 -163
  49. package/dist/chunk-N35E6CM2.js.map +1 -0
  50. package/dist/chunk-OCBHUHWB.js +69 -0
  51. package/dist/chunk-OCBHUHWB.js.map +1 -0
  52. package/dist/chunk-OIM4HLN6.js +1405 -0
  53. package/dist/chunk-OIM4HLN6.js.map +1 -0
  54. package/dist/{chunk-VYOJOX4Z.js → chunk-OJLYNM4Z.js} +54 -33
  55. package/dist/chunk-OJLYNM4Z.js.map +1 -0
  56. package/dist/{chunk-POJRB2AE.js → chunk-POUWHWID.js} +2 -2
  57. package/dist/chunk-PZEN5PHN.js +285 -0
  58. package/dist/chunk-PZEN5PHN.js.map +1 -0
  59. package/dist/chunk-SKAHDQH7.js +1785 -0
  60. package/dist/chunk-SKAHDQH7.js.map +1 -0
  61. package/dist/{chunk-KZAAWQNP.js → chunk-TTNESUPQ.js} +3 -3
  62. package/dist/chunk-U5DXNFJC.js +137 -0
  63. package/dist/chunk-U5DXNFJC.js.map +1 -0
  64. package/dist/chunk-USS336NF.js +165 -0
  65. package/dist/chunk-USS336NF.js.map +1 -0
  66. package/dist/{chunk-UO22YNY4.js → chunk-WH7OWT6G.js} +49 -1
  67. package/dist/chunk-WH7OWT6G.js.map +1 -0
  68. package/dist/chunk-WXC57XGG.js +29 -0
  69. package/dist/chunk-WXC57XGG.js.map +1 -0
  70. package/dist/{chunk-YLYINX2H.js → chunk-XZKD7DIF.js} +3 -3
  71. package/dist/{chunk-CPCX67TI.js → chunk-YEETV6IW.js} +1079 -1039
  72. package/dist/chunk-YEETV6IW.js.map +1 -0
  73. package/dist/{chunk-OLWTRUTS.js → chunk-YJHHCWM3.js} +35 -16
  74. package/dist/chunk-YJHHCWM3.js.map +1 -0
  75. package/dist/{cli-KKRKBU5T.js → cli-M3XCSOU6.js} +289 -374
  76. package/dist/cli-M3XCSOU6.js.map +1 -0
  77. package/dist/config-MXOX7XDR.js +41 -0
  78. package/dist/{dist-U4M6QCKE.js → dist-3LOO6M4U.js} +10 -10
  79. package/dist/doctor-LU4YIZWM.js +349 -0
  80. package/dist/doctor-LU4YIZWM.js.map +1 -0
  81. package/dist/{ethersCompat-Df4a6QIZ-WHYKB6HA.js → ethersCompat-Df4a6QIZ-THAVUGIJ.js} +5 -5
  82. package/dist/{chunk-KAJZHIQ4.js → fund-A54P2QFK.js} +80 -24
  83. package/dist/fund-A54P2QFK.js.map +1 -0
  84. package/dist/hook-command-U6KWPEDQ.js +377 -0
  85. package/dist/hook-command-U6KWPEDQ.js.map +1 -0
  86. package/dist/index.js +8 -3
  87. package/dist/index.js.map +1 -1
  88. package/dist/install-XUM2XSHW.js +53 -0
  89. package/dist/install-wallet-QIOFORTX.js +105 -0
  90. package/dist/install-wallet-QIOFORTX.js.map +1 -0
  91. package/dist/{run-XYTQ5TWQ.js → mcp-HJC2PLRV.js} +3727 -10670
  92. package/dist/mcp-HJC2PLRV.js.map +1 -0
  93. package/dist/paths-P2N4JTDZ.js +49 -0
  94. package/dist/pay-SBXZEPEP.js +37 -0
  95. package/dist/redact-46ZHF2NH.js +17 -0
  96. package/dist/{secp256k1-XRPVBC6V.js → secp256k1-ZZZT2CAX.js} +3 -3
  97. package/dist/{send-G746D7PQ.js → send-ASD2ZXJD.js} +28 -29
  98. package/dist/send-ASD2ZXJD.js.map +1 -0
  99. package/dist/{chunk-QZ6ROAJU.js → skill-placement-NFVHY6A3.js} +157 -11
  100. package/dist/skill-placement-NFVHY6A3.js.map +1 -0
  101. package/dist/status-T2SDB57A.js +63 -0
  102. package/dist/status-T2SDB57A.js.map +1 -0
  103. package/dist/status-line-CGPUSDMC.js +71 -0
  104. package/dist/status-line-CGPUSDMC.js.map +1 -0
  105. package/dist/status-line-wiring-BYPHTYZE.js +30 -0
  106. package/dist/tenjin-daemon.mjs +20060 -0
  107. package/dist/tenjin-shim.mjs +251 -0
  108. package/dist/tenjin-vitest-reporter.mjs +49 -0
  109. package/dist/uninstall-FKYZHAM3.js +144 -0
  110. package/dist/uninstall-FKYZHAM3.js.map +1 -0
  111. package/dist/{update-R76LHOZW.js → update-ANJ2AOTN.js} +133 -16
  112. package/dist/update-ANJ2AOTN.js.map +1 -0
  113. package/dist/{viemAdapter-By13KInL-TUQJBMHM.js → viemAdapter-By13KInL-X2VY6CY3.js} +5 -5
  114. package/dist/wallet-PWAHVKWW.js +31 -0
  115. package/dist/wallet-kdf-worker.mjs +980 -0
  116. package/docs/agent-permissions.md +65 -354
  117. package/docs/safety-model.md +16 -6
  118. package/package.json +8 -7
  119. package/LICENSE +0 -21
  120. package/dist/buy-VIRNSYGN.js +0 -47
  121. package/dist/chunk-2MYQN7HM.js +0 -247
  122. package/dist/chunk-2MYQN7HM.js.map +0 -1
  123. package/dist/chunk-2RF2GIJQ.js +0 -1188
  124. package/dist/chunk-2RF2GIJQ.js.map +0 -1
  125. package/dist/chunk-3GL2Z5QK.js +0 -57
  126. package/dist/chunk-3GL2Z5QK.js.map +0 -1
  127. package/dist/chunk-47PP7TAG.js.map +0 -1
  128. package/dist/chunk-4CQIDQOT.js +0 -167
  129. package/dist/chunk-4CQIDQOT.js.map +0 -1
  130. package/dist/chunk-4KG27W2S.js +0 -614
  131. package/dist/chunk-4KG27W2S.js.map +0 -1
  132. package/dist/chunk-5QQTYWEU.js +0 -199
  133. package/dist/chunk-5QQTYWEU.js.map +0 -1
  134. package/dist/chunk-65DTCCJ7.js +0 -21
  135. package/dist/chunk-65DTCCJ7.js.map +0 -1
  136. package/dist/chunk-A5DKHMUN.js +0 -173
  137. package/dist/chunk-A5DKHMUN.js.map +0 -1
  138. package/dist/chunk-B63XPWQ4.js +0 -246
  139. package/dist/chunk-B63XPWQ4.js.map +0 -1
  140. package/dist/chunk-CAR6FHK6.js +0 -105
  141. package/dist/chunk-CAR6FHK6.js.map +0 -1
  142. package/dist/chunk-CPCX67TI.js.map +0 -1
  143. package/dist/chunk-CQBVCYI2.js +0 -162
  144. package/dist/chunk-CQBVCYI2.js.map +0 -1
  145. package/dist/chunk-DBU5CXBV.js +0 -4731
  146. package/dist/chunk-DBU5CXBV.js.map +0 -1
  147. package/dist/chunk-DHJD77OW.js +0 -81
  148. package/dist/chunk-DHJD77OW.js.map +0 -1
  149. package/dist/chunk-EDZSNPE5.js +0 -35
  150. package/dist/chunk-EDZSNPE5.js.map +0 -1
  151. package/dist/chunk-EFWZPUTC.js +0 -65
  152. package/dist/chunk-EFWZPUTC.js.map +0 -1
  153. package/dist/chunk-EPFL6CTE.js +0 -448
  154. package/dist/chunk-EPFL6CTE.js.map +0 -1
  155. package/dist/chunk-GHLVXVZD.js +0 -142
  156. package/dist/chunk-GHLVXVZD.js.map +0 -1
  157. package/dist/chunk-H3SOOJ2I.js +0 -580
  158. package/dist/chunk-H3SOOJ2I.js.map +0 -1
  159. package/dist/chunk-HPJGOLTN.js.map +0 -1
  160. package/dist/chunk-HRGBS2PA.js +0 -203
  161. package/dist/chunk-HRGBS2PA.js.map +0 -1
  162. package/dist/chunk-ITUXPJIS.js +0 -314
  163. package/dist/chunk-ITUXPJIS.js.map +0 -1
  164. package/dist/chunk-JBIKAAT3.js.map +0 -1
  165. package/dist/chunk-KAJZHIQ4.js.map +0 -1
  166. package/dist/chunk-KINZ23CV.js.map +0 -1
  167. package/dist/chunk-LRYV3SK7.js +0 -235
  168. package/dist/chunk-LRYV3SK7.js.map +0 -1
  169. package/dist/chunk-M2O56UK7.js.map +0 -1
  170. package/dist/chunk-MJZZTKCC.js.map +0 -1
  171. package/dist/chunk-NIKXHWOL.js.map +0 -1
  172. package/dist/chunk-OKDRDT74.js +0 -209
  173. package/dist/chunk-OKDRDT74.js.map +0 -1
  174. package/dist/chunk-OKYSNAS3.js +0 -2144
  175. package/dist/chunk-OKYSNAS3.js.map +0 -1
  176. package/dist/chunk-OLWTRUTS.js.map +0 -1
  177. package/dist/chunk-QQ6ELLSA.js +0 -143
  178. package/dist/chunk-QQ6ELLSA.js.map +0 -1
  179. package/dist/chunk-QZ6ROAJU.js.map +0 -1
  180. package/dist/chunk-R7RSCBI7.js +0 -794
  181. package/dist/chunk-R7RSCBI7.js.map +0 -1
  182. package/dist/chunk-SGK2B724.js +0 -67
  183. package/dist/chunk-SGK2B724.js.map +0 -1
  184. package/dist/chunk-U6VPKMGC.js +0 -390
  185. package/dist/chunk-U6VPKMGC.js.map +0 -1
  186. package/dist/chunk-UHTVXQ2O.js +0 -140
  187. package/dist/chunk-UHTVXQ2O.js.map +0 -1
  188. package/dist/chunk-UO22YNY4.js.map +0 -1
  189. package/dist/chunk-US456VUI.js +0 -149
  190. package/dist/chunk-US456VUI.js.map +0 -1
  191. package/dist/chunk-V44J2MXV.js +0 -400
  192. package/dist/chunk-V44J2MXV.js.map +0 -1
  193. package/dist/chunk-VJQKL3YH.js +0 -216
  194. package/dist/chunk-VJQKL3YH.js.map +0 -1
  195. package/dist/chunk-VJSQSLBM.js +0 -1442
  196. package/dist/chunk-VJSQSLBM.js.map +0 -1
  197. package/dist/chunk-VYOJOX4Z.js.map +0 -1
  198. package/dist/chunk-WY2K35OL.js +0 -269
  199. package/dist/chunk-WY2K35OL.js.map +0 -1
  200. package/dist/chunk-ZFJJ3EXC.js.map +0 -1
  201. package/dist/chunk-ZOBNS7CX.js.map +0 -1
  202. package/dist/cli-KKRKBU5T.js.map +0 -1
  203. package/dist/config-JMRUNYE6.js +0 -37
  204. package/dist/discover-B5HF6SHM.js +0 -102
  205. package/dist/discover-B5HF6SHM.js.map +0 -1
  206. package/dist/doctor-ZBG7X66D.js +0 -32
  207. package/dist/edit-PZJIILQE.js +0 -40
  208. package/dist/fund-EUDH5KPA.js +0 -40
  209. package/dist/inspect-QC6WEQPN.js +0 -37
  210. package/dist/install-GNK2W3PI.js +0 -972
  211. package/dist/install-GNK2W3PI.js.map +0 -1
  212. package/dist/outcome-KSGWZHUS.js +0 -24
  213. package/dist/pay-BC4UICPA.js +0 -361
  214. package/dist/pay-BC4UICPA.js.map +0 -1
  215. package/dist/publish-LXWFDIKF.js +0 -42
  216. package/dist/read-JMNUQ56P.js +0 -160
  217. package/dist/read-JMNUQ56P.js.map +0 -1
  218. package/dist/run-XYTQ5TWQ.js.map +0 -1
  219. package/dist/search-TSQAB45E.js +0 -25
  220. package/dist/secp256k1-XRPVBC6V.js.map +0 -1
  221. package/dist/send-G746D7PQ.js.map +0 -1
  222. package/dist/session-JBKWMJ24.js +0 -89
  223. package/dist/session-JBKWMJ24.js.map +0 -1
  224. package/dist/skill-heal-WKD67SLJ.js +0 -92
  225. package/dist/skill-heal-WKD67SLJ.js.map +0 -1
  226. package/dist/skill-placement-RIU4AMC2.js +0 -20
  227. package/dist/skill-placement-RIU4AMC2.js.map +0 -1
  228. package/dist/uninstall-5E263VTS.js +0 -73
  229. package/dist/uninstall-5E263VTS.js.map +0 -1
  230. package/dist/update-R76LHOZW.js.map +0 -1
  231. package/dist/usdc-4VCDHFWX.js +0 -38
  232. package/dist/usdc-4VCDHFWX.js.map +0 -1
  233. package/dist/viemAdapter-By13KInL-TUQJBMHM.js.map +0 -1
  234. package/dist/wallet-TQ7D5EQ7.js +0 -41
  235. package/dist/wallet-TQ7D5EQ7.js.map +0 -1
  236. package/dist/wallet-ZAVXWLWP.js +0 -32
  237. package/dist/wallet-ZAVXWLWP.js.map +0 -1
  238. package/docs/command-reference.md +0 -303
  239. package/skills/tenjin/SKILL.md +0 -373
  240. package/skills/tenjin-pay/SKILL.md +0 -76
  241. package/skills/tenjin-publish/SKILL.md +0 -227
  242. package/skills/tenjin-publish/references/maintain.md +0 -39
  243. package/skills/tenjin-search/SKILL.md +0 -154
  244. package/skills/tenjin-search/references/permissions.md +0 -112
  245. /package/dist/{_esm-N4KAVXQR.js.map → _esm-CE7KNONL.js.map} +0 -0
  246. /package/dist/{buy-VIRNSYGN.js.map → ccip-7RMRLAGV.js.map} +0 -0
  247. /package/dist/{ccip-RPPPKTJR.js.map → ccip-NLCSCHKI.js.map} +0 -0
  248. /package/dist/{chunk-U5S527PP.js.map → chunk-5IEP5EGE.js.map} +0 -0
  249. /package/dist/{chunk-KYQVEKP5.js.map → chunk-BPMWXTFX.js.map} +0 -0
  250. /package/dist/{chunk-S5RYMCV6.js.map → chunk-HPWO4O6S.js.map} +0 -0
  251. /package/dist/{chunk-W6R3HAAG.js.map → chunk-JRGFKVAZ.js.map} +0 -0
  252. /package/dist/{chunk-XJN5WUKL.js.map → chunk-KG3D7FIF.js.map} +0 -0
  253. /package/dist/{chunk-QW2Q2KAH.js.map → chunk-LHHMV4GU.js.map} +0 -0
  254. /package/dist/{chunk-POJRB2AE.js.map → chunk-POUWHWID.js.map} +0 -0
  255. /package/dist/{chunk-KZAAWQNP.js.map → chunk-TTNESUPQ.js.map} +0 -0
  256. /package/dist/{chunk-YLYINX2H.js.map → chunk-XZKD7DIF.js.map} +0 -0
  257. /package/dist/{ccip-ZGGWQN4X.js.map → config-MXOX7XDR.js.map} +0 -0
  258. /package/dist/{dist-U4M6QCKE.js.map → dist-3LOO6M4U.js.map} +0 -0
  259. /package/dist/{config-JMRUNYE6.js.map → ethersCompat-Df4a6QIZ-THAVUGIJ.js.map} +0 -0
  260. /package/dist/{doctor-ZBG7X66D.js.map → install-XUM2XSHW.js.map} +0 -0
  261. /package/dist/{edit-PZJIILQE.js.map → paths-P2N4JTDZ.js.map} +0 -0
  262. /package/dist/{ethersCompat-Df4a6QIZ-WHYKB6HA.js.map → pay-SBXZEPEP.js.map} +0 -0
  263. /package/dist/{fund-EUDH5KPA.js.map → redact-46ZHF2NH.js.map} +0 -0
  264. /package/dist/{inspect-QC6WEQPN.js.map → secp256k1-ZZZT2CAX.js.map} +0 -0
  265. /package/dist/{outcome-KSGWZHUS.js.map → status-line-wiring-BYPHTYZE.js.map} +0 -0
  266. /package/dist/{publish-LXWFDIKF.js.map → viemAdapter-By13KInL-X2VY6CY3.js.map} +0 -0
  267. /package/dist/{search-TSQAB45E.js.map → wallet-PWAHVKWW.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
 
3
3
  // src/lib/prompt.ts
4
- import { createInterface } from "readline";
4
+ import { createInterface } from "node:readline";
5
5
  function promptYesNo(prompt, opts = {}) {
6
6
  const { defaultYes = false, input = process.stdin, output = process.stderr } = opts;
7
7
  return new Promise((resolve) => {
@@ -24,4 +24,4 @@ function promptYesNo(prompt, opts = {}) {
24
24
  export {
25
25
  promptYesNo
26
26
  };
27
- //# sourceMappingURL=chunk-QW2Q2KAH.js.map
27
+ //# sourceMappingURL=chunk-LHHMV4GU.js.map
@@ -1,22 +1,10 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
 
3
3
  // src/lib/lock.ts
4
- import { mkdirSync, rmSync } from "fs";
5
- import { writeFile } from "fs/promises";
6
- import { join } from "path";
4
+ import { mkdirSync, rmSync } from "node:fs";
5
+ import { writeFile } from "node:fs/promises";
6
+ import { join } from "node:path";
7
7
  var owned = /* @__PURE__ */ new Set();
8
- function ownsAnyLock() {
9
- return owned.size > 0;
10
- }
11
- function releaseOwnedLocks() {
12
- for (const path of owned) {
13
- try {
14
- rmSync(path, { recursive: true, force: true });
15
- } catch {
16
- }
17
- }
18
- owned.clear();
19
- }
20
8
  var DEFAULTS = { timeoutMs: 5e3, retryMs: 25 };
21
9
  var LockTimeoutError = class extends Error {
22
10
  lockPath;
@@ -65,9 +53,7 @@ function delay(ms) {
65
53
  }
66
54
 
67
55
  export {
68
- ownsAnyLock,
69
- releaseOwnedLocks,
70
56
  LockTimeoutError,
71
57
  withFileLock
72
58
  };
73
- //# sourceMappingURL=chunk-ZOBNS7CX.js.map
59
+ //# sourceMappingURL=chunk-MEFB5KHA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/lock.ts"],"sourcesContent":["import { mkdirSync, rmSync } from 'node:fs';\nimport { writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\n\n/**\n * Locks this process currently holds. Ownership starts the instant `mkdir`\n * succeeds and ends when the release has removed the directory, so there is no\n * window where a lock is on disk and unaccounted for. A removal that FAILS keeps\n * the lock owned: the directory is still on disk, no successor can claim the path\n * while it exists, and a signal-time release gets another attempt. The one place\n * ownership is dropped without a successful removal is `releaseOwnedLocks`, which\n * runs only as the process exits, where a claim held by a dying process helps\n * nobody.\n *\n * It exists because the default signal action terminates WITHOUT running\n * `finally`: without this, one Ctrl-C leaves a lock nothing will ever clean and\n * every later run of the same command times out on it.\n */\nconst owned = new Set<string>();\n\n/** Does this process hold any lock right now? */\nexport function ownsAnyLock(): boolean {\n return owned.size > 0;\n}\n\n/**\n * Synchronously attempt to release every lock this process holds. BEST EFFORT: a\n * path that refuses to be removed is left on disk and the next run's timeout names\n * it. Safe to call from a signal handler, and a no-op when this process holds\n * none, so a run merely QUEUED behind another cannot remove that other run's lock.\n */\nexport function releaseOwnedLocks(): void {\n for (const path of owned) {\n // NEVER throws. This runs inside a signal handler, and a throw there is an\n // uncaught exception: the process dies with code 1 and a stack trace instead\n // of the diagnostic and exit 130 the handler promises. One lock we could not\n // remove must not cost the report, or the exit code, or the other locks.\n try {\n rmSync(path, { recursive: true, force: true });\n } catch {\n // Left behind; the next run's timeout names the path.\n }\n }\n owned.clear();\n}\n\nexport interface FileLockOptions {\n /** Give up acquiring after this long (ms). */\n timeoutMs?: number;\n /** Poll interval between acquisition attempts (ms). */\n retryMs?: number;\n /**\n * Called when the lock could not be removed on release. The protected work\n * succeeded, so this is not a failure of the command; it is a leftover that will\n * block later runs, and the caller is the only one able to say so.\n */\n onReleaseError?: (lockPath: string, err: unknown) => void;\n}\n\nconst DEFAULTS = { timeoutMs: 5000, retryMs: 25 };\n\n/** Thrown when the lock cannot be acquired within `timeoutMs`. Carries the lock\n * path so a caller can surface the manual-recovery step in its own error contract. */\nexport class LockTimeoutError extends Error {\n readonly lockPath: string;\n constructor(lockPath: string, timeoutMs: number) {\n super(\n `Timed out waiting for lock at ${lockPath} after ${timeoutMs}ms; if no other tenjin process is running, remove that directory and retry.`,\n );\n this.name = 'LockTimeoutError';\n this.lockPath = lockPath;\n }\n}\n\n/**\n * Minimal cross-process mutex: the lock IS a directory, and mkdir is atomic, so a\n * second holder gets EEXIST and retries with backoff until `timeoutMs`, then\n * throws LockTimeoutError. There is deliberately NO auto-steal of a \"stale\" lock:\n * concurrent waiters each judging a lock stale could remove a fresh holder's\n * directory and lose its update. A crashed holder's lock is recovered by hand (the\n * timeout error names the path); the pid+acquiredAt meta exists only to make that\n * manual call diagnosable. Always released in the finally.\n *\n * NO LONGER MIRRORED IN THE HOOKS. The generated scripts used to reimplement\n * this protocol byte for byte — they run as standalone .mjs files outside the\n * CLI and cannot import this module, yet wrote the same searches.json, and two\n * writers of one file that disagree about the mutex have no mutex. That file is\n * gone (tenjin-agent#209): hook state is one SQLite database and WAL serializes\n * the writers, so nothing outside this module implements this protocol any more.\n */\nexport async function withFileLock<T>(\n lockPath: string,\n fn: () => Promise<T>,\n opts: FileLockOptions = {},\n): Promise<T> {\n const { timeoutMs, retryMs } = { ...DEFAULTS, ...opts };\n const metaPath = join(lockPath, 'meta');\n const deadline = Date.now() + timeoutMs;\n for (;;) {\n try {\n // SYNCHRONOUS, for the same reason the release is: `await mkdir` finishes the\n // syscall before the continuation records ownership, so between the two the\n // directory is on disk and unclaimed. A signal there exits without removing\n // it and, with no stale recovery, nothing ever will. mkdirSync and the add\n // are one uninterruptible step.\n mkdirSync(lockPath);\n owned.add(lockPath); // owned from here, released only in the finally below\n break; // acquired\n } catch (err) {\n if (!isEexist(err)) throw err;\n if (Date.now() >= deadline) throw new LockTimeoutError(lockPath, timeoutMs);\n await delay(retryMs);\n }\n }\n await writeFile(metaPath, JSON.stringify({ pid: process.pid, acquiredAt: Date.now() })).catch(\n () => undefined,\n );\n try {\n return await fn();\n } finally {\n // SYNCHRONOUS, and in this order, because both are load-bearing. A signal\n // handler cannot run between two synchronous statements, so there is no instant\n // where the lock is on disk but unclaimed (a signal would exit without removing\n // it, and with no stale recovery nothing ever would) nor one where it is\n // claimed after release (a signal would remove whatever SUCCESSOR had since\n // acquired the path). An `await` here reopens the first window: `rm` yields, the\n // handler runs, sees no ownership, and leaves the directory behind.\n //\n // With no stealing, nothing else ever removes or replaces this directory, so\n // the lock here is provably the one we created — the unconditional rm is sound.\n try {\n rmSync(lockPath, { recursive: true, force: true });\n owned.delete(lockPath);\n } catch (err) {\n // KEEP ownership when the removal fails: the successor-steal risk only\n // exists once the directory is gone and someone else can take the path, so a\n // removal that failed leaves it on disk and still ours, and a signal-time\n // release gets another attempt. That only helps while THIS process lives,\n // though; once it exits normally the leftover blocks every later run, so the\n // caller is told rather than left to discover it as a timeout.\n opts.onReleaseError?.(lockPath, err);\n }\n }\n}\n\nfunction isEexist(err: unknown): boolean {\n return typeof err === 'object' && err !== null && (err as { code?: unknown }).code === 'EEXIST';\n}\n\nfunction delay(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n"],"mappings":";;;AAAA,SAAS,WAAW,cAAc;AAClC,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAgBrB,IAAM,QAAQ,oBAAI,IAAY;AAyC9B,IAAM,WAAW,EAAE,WAAW,KAAM,SAAS,GAAG;AAIzC,IAAM,mBAAN,cAA+B,MAAM;AAAA,EACjC;AAAA,EACT,YAAY,UAAkB,WAAmB;AAC/C;AAAA,MACE,iCAAiC,QAAQ,UAAU,SAAS;AAAA,IAC9D;AACA,SAAK,OAAO;AACZ,SAAK,WAAW;AAAA,EAClB;AACF;AAkBA,eAAsB,aACpB,UACA,IACA,OAAwB,CAAC,GACb;AACZ,QAAM,EAAE,WAAW,QAAQ,IAAI,EAAE,GAAG,UAAU,GAAG,KAAK;AACtD,QAAM,WAAW,KAAK,UAAU,MAAM;AACtC,QAAM,WAAW,KAAK,IAAI,IAAI;AAC9B,aAAS;AACP,QAAI;AAMF,gBAAU,QAAQ;AAClB,YAAM,IAAI,QAAQ;AAClB;AAAA,IACF,SAAS,KAAK;AACZ,UAAI,CAAC,SAAS,GAAG,EAAG,OAAM;AAC1B,UAAI,KAAK,IAAI,KAAK,SAAU,OAAM,IAAI,iBAAiB,UAAU,SAAS;AAC1E,YAAM,MAAM,OAAO;AAAA,IACrB;AAAA,EACF;AACA,QAAM,UAAU,UAAU,KAAK,UAAU,EAAE,KAAK,QAAQ,KAAK,YAAY,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE;AAAA,IACtF,MAAM;AAAA,EACR;AACA,MAAI;AACF,WAAO,MAAM,GAAG;AAAA,EAClB,UAAE;AAWA,QAAI;AACF,aAAO,UAAU,EAAE,WAAW,MAAM,OAAO,KAAK,CAAC;AACjD,YAAM,OAAO,QAAQ;AAAA,IACvB,SAAS,KAAK;AAOZ,WAAK,iBAAiB,UAAU,GAAG;AAAA,IACrC;AAAA,EACF;AACF;AAEA,SAAS,SAAS,KAAuB;AACvC,SAAO,OAAO,QAAQ,YAAY,QAAQ,QAAS,IAA2B,SAAS;AACzF;AAEA,SAAS,MAAM,IAA2B;AACxC,SAAO,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,EAAE,CAAC;AACzD;","names":[]}
@@ -1,10 +1,9 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
  import {
3
+ HashMD,
4
+ secp256k1,
3
5
  sha256
4
- } from "./chunk-UHTVXQ2O.js";
5
- import {
6
- secp256k1
7
- } from "./chunk-W6R3HAAG.js";
6
+ } from "./chunk-JRGFKVAZ.js";
8
7
  import {
9
8
  BaseError,
10
9
  BytesSizeMismatchError,
@@ -24,7 +23,7 @@ import {
24
23
  createCursor,
25
24
  encodeAbiParameters,
26
25
  formatBlockParameter,
27
- from,
26
+ from2 as from,
28
27
  fromBytes,
29
28
  hexToBigInt,
30
29
  hexToBytes,
@@ -42,10 +41,118 @@ import {
42
41
  toBytes,
43
42
  toHex,
44
43
  trim
45
- } from "./chunk-47PP7TAG.js";
44
+ } from "./chunk-EGELTSPU.js";
46
45
  import {
47
46
  keccak_256
48
- } from "./chunk-XJN5WUKL.js";
47
+ } from "./chunk-KG3D7FIF.js";
48
+ import {
49
+ clean,
50
+ createHasher,
51
+ rotl
52
+ } from "./chunk-BPMWXTFX.js";
53
+
54
+ // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/actions/public/getTransactionCount.js
55
+ async function getTransactionCount(client, { address, blockHash, blockNumber, blockTag = "latest", requireCanonical }) {
56
+ const block = formatBlockParameter({
57
+ blockHash,
58
+ blockNumber,
59
+ blockTag,
60
+ requireCanonical
61
+ });
62
+ const count = await client.request({
63
+ method: "eth_getTransactionCount",
64
+ params: [address, block]
65
+ }, {
66
+ dedupe: typeof blockNumber === "bigint" || blockHash !== void 0
67
+ });
68
+ return hexToNumber(count);
69
+ }
70
+
71
+ // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/nonceManager.js
72
+ function createNonceManager(parameters) {
73
+ const { source } = parameters;
74
+ const deltaMap = /* @__PURE__ */ new Map();
75
+ const nonceMap = new LruMap(8192);
76
+ const promiseMap = /* @__PURE__ */ new Map();
77
+ const getKey = ({ address, chainId }) => `${address}.${chainId}`;
78
+ const resetCache = (key) => {
79
+ deltaMap.delete(key);
80
+ promiseMap.delete(key);
81
+ };
82
+ return {
83
+ async consume({ address, chainId, client }) {
84
+ const key = getKey({ address, chainId });
85
+ const promise = this.get({ address, chainId, client });
86
+ this.increment({ address, chainId });
87
+ const nonce = await promise;
88
+ await source.set({ address, chainId }, nonce);
89
+ nonceMap.set(key, nonce);
90
+ return nonce;
91
+ },
92
+ async increment({ address, chainId }) {
93
+ const key = getKey({ address, chainId });
94
+ const delta = deltaMap.get(key) ?? 0;
95
+ deltaMap.set(key, delta + 1);
96
+ },
97
+ async get({ address, chainId, client }) {
98
+ const key = getKey({ address, chainId });
99
+ let promise = promiseMap.get(key);
100
+ if (!promise) {
101
+ promise = (async () => {
102
+ try {
103
+ const nonce = await source.get({ address, chainId, client });
104
+ const previousNonce = nonceMap.get(key) ?? 0;
105
+ if (previousNonce > 0 && nonce <= previousNonce)
106
+ return previousNonce + 1;
107
+ nonceMap.delete(key);
108
+ return nonce;
109
+ } finally {
110
+ resetCache(key);
111
+ }
112
+ })();
113
+ promiseMap.set(key, promise);
114
+ }
115
+ const delta = deltaMap.get(key) ?? 0;
116
+ return delta + await promise;
117
+ },
118
+ reset({ address, chainId }) {
119
+ const key = getKey({ address, chainId });
120
+ nonceMap.delete(key);
121
+ resetCache(key);
122
+ }
123
+ };
124
+ }
125
+ function jsonRpc() {
126
+ return {
127
+ async get(parameters) {
128
+ const { address, client } = parameters;
129
+ return getTransactionCount(client, {
130
+ address,
131
+ blockTag: "pending"
132
+ });
133
+ },
134
+ set() {
135
+ }
136
+ };
137
+ }
138
+ var nonceManager = /* @__PURE__ */ createNonceManager({
139
+ source: jsonRpc()
140
+ });
141
+
142
+ // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/signature/serializeSignature.js
143
+ function serializeSignature({ r, s, to = "hex", v, yParity }) {
144
+ const yParity_ = (() => {
145
+ if (yParity === 0 || yParity === 1)
146
+ return yParity;
147
+ if (v && (v === 27n || v === 28n || v >= 35n))
148
+ return v % 2n === 0n ? 1 : 0;
149
+ throw new Error("Invalid `v` or `yParity` value");
150
+ })();
151
+ const signature = `0x${new secp256k1.Signature(hexToBigInt(r), hexToBigInt(s)).toCompactHex()}${yParity_ === 0 ? "1b" : "1c"}`;
152
+ if (to === "hex")
153
+ return signature;
154
+ return hexToBytes(signature);
155
+ }
49
156
 
50
157
  // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/encoding/toRlp.js
51
158
  function toRlp(bytes, to = "hex") {
@@ -142,6 +249,27 @@ function getSizeOfLength(length) {
142
249
  throw new BaseError("Length is too large.");
143
250
  }
144
251
 
252
+ // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/constants/strings.js
253
+ var presignMessagePrefix = "Ethereum Signed Message:\n";
254
+
255
+ // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js
256
+ function toPrefixedMessage(message_) {
257
+ const message = (() => {
258
+ if (typeof message_ === "string")
259
+ return stringToHex(message_);
260
+ if (typeof message_.raw === "string")
261
+ return message_.raw;
262
+ return bytesToHex(message_.raw);
263
+ })();
264
+ const prefix = stringToHex(`${presignMessagePrefix}${size(message)}`);
265
+ return concat([prefix, message]);
266
+ }
267
+
268
+ // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/signature/hashMessage.js
269
+ function hashMessage(message, to_) {
270
+ return keccak256(toPrefixedMessage(message), to_);
271
+ }
272
+
145
273
  // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/blob/blobsToCommitments.js
146
274
  function blobsToCommitments(parameters) {
147
275
  const { kzg } = parameters;
@@ -168,10 +296,13 @@ function blobsToProofs(parameters) {
168
296
  return to === "bytes" ? proofs : proofs.map((x) => bytesToHex(x));
169
297
  }
170
298
 
299
+ // node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js
300
+ var sha2562 = sha256;
301
+
171
302
  // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/hash/sha256.js
172
- function sha2562(value, to_) {
303
+ function sha2563(value, to_) {
173
304
  const to = to_ || "hex";
174
- const bytes = sha256(isHex(value, { strict: false }) ? toBytes(value) : value);
305
+ const bytes = sha2562(isHex(value, { strict: false }) ? toBytes(value) : value);
175
306
  if (to === "bytes")
176
307
  return bytes;
177
308
  return toHex(bytes);
@@ -181,7 +312,7 @@ function sha2562(value, to_) {
181
312
  function commitmentToVersionedHash(parameters) {
182
313
  const { commitment, version = 1 } = parameters;
183
314
  const to = parameters.to ?? (typeof commitment === "string" ? "hex" : "bytes");
184
- const versionedHash = sha2562(commitment, "bytes");
315
+ const versionedHash = sha2563(commitment, "bytes");
185
316
  versionedHash.set([version], 0);
186
317
  return to === "bytes" ? versionedHash : bytesToHex(versionedHash);
187
318
  }
@@ -298,25 +429,6 @@ function toBlobSidecars(parameters) {
298
429
  return sidecars;
299
430
  }
300
431
 
301
- // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/transaction/getTransactionType.js
302
- function getTransactionType(transaction) {
303
- if (transaction.type)
304
- return transaction.type;
305
- if (typeof transaction.authorizationList !== "undefined")
306
- return "eip7702";
307
- if (typeof transaction.blobs !== "undefined" || typeof transaction.blobVersionedHashes !== "undefined" || typeof transaction.maxFeePerBlobGas !== "undefined" || typeof transaction.sidecars !== "undefined")
308
- return "eip4844";
309
- if (typeof transaction.maxFeePerGas !== "undefined" || typeof transaction.maxPriorityFeePerGas !== "undefined") {
310
- return "eip1559";
311
- }
312
- if (typeof transaction.gasPrice !== "undefined") {
313
- if (typeof transaction.accessList !== "undefined")
314
- return "eip2930";
315
- return "legacy";
316
- }
317
- throw new InvalidSerializableTransactionError({ transaction });
318
- }
319
-
320
432
  // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/transaction/assertTransaction.js
321
433
  function assertTransactionEIP7702(transaction) {
322
434
  const { authorizationList } = transaction;
@@ -385,6 +497,25 @@ function assertTransactionLegacy(transaction) {
385
497
  throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });
386
498
  }
387
499
 
500
+ // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/transaction/getTransactionType.js
501
+ function getTransactionType(transaction) {
502
+ if (transaction.type)
503
+ return transaction.type;
504
+ if (typeof transaction.authorizationList !== "undefined")
505
+ return "eip7702";
506
+ if (typeof transaction.blobs !== "undefined" || typeof transaction.blobVersionedHashes !== "undefined" || typeof transaction.maxFeePerBlobGas !== "undefined" || typeof transaction.sidecars !== "undefined")
507
+ return "eip4844";
508
+ if (typeof transaction.maxFeePerGas !== "undefined" || typeof transaction.maxPriorityFeePerGas !== "undefined") {
509
+ return "eip1559";
510
+ }
511
+ if (typeof transaction.gasPrice !== "undefined") {
512
+ if (typeof transaction.accessList !== "undefined")
513
+ return "eip2930";
514
+ return "legacy";
515
+ }
516
+ throw new InvalidSerializableTransactionError({ transaction });
517
+ }
518
+
388
519
  // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/transaction/serializeAccessList.js
389
520
  function serializeAccessList(accessList) {
390
521
  if (!accessList || accessList.length === 0)
@@ -623,115 +754,6 @@ function toYParitySignatureArray(transaction, signature_) {
623
754
  return [yParity_, r === "0x00" ? "0x" : r, s === "0x00" ? "0x" : s];
624
755
  }
625
756
 
626
- // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/actions/public/getTransactionCount.js
627
- async function getTransactionCount(client, { address, blockHash, blockNumber, blockTag = "latest", requireCanonical }) {
628
- const block = formatBlockParameter({
629
- blockHash,
630
- blockNumber,
631
- blockTag,
632
- requireCanonical
633
- });
634
- const count = await client.request({
635
- method: "eth_getTransactionCount",
636
- params: [address, block]
637
- }, {
638
- dedupe: typeof blockNumber === "bigint" || blockHash !== void 0
639
- });
640
- return hexToNumber(count);
641
- }
642
-
643
- // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/nonceManager.js
644
- function createNonceManager(parameters) {
645
- const { source } = parameters;
646
- const deltaMap = /* @__PURE__ */ new Map();
647
- const nonceMap = new LruMap(8192);
648
- const promiseMap = /* @__PURE__ */ new Map();
649
- const getKey = ({ address, chainId }) => `${address}.${chainId}`;
650
- const resetCache = (key) => {
651
- deltaMap.delete(key);
652
- promiseMap.delete(key);
653
- };
654
- return {
655
- async consume({ address, chainId, client }) {
656
- const key = getKey({ address, chainId });
657
- const promise = this.get({ address, chainId, client });
658
- this.increment({ address, chainId });
659
- const nonce = await promise;
660
- await source.set({ address, chainId }, nonce);
661
- nonceMap.set(key, nonce);
662
- return nonce;
663
- },
664
- async increment({ address, chainId }) {
665
- const key = getKey({ address, chainId });
666
- const delta = deltaMap.get(key) ?? 0;
667
- deltaMap.set(key, delta + 1);
668
- },
669
- async get({ address, chainId, client }) {
670
- const key = getKey({ address, chainId });
671
- let promise = promiseMap.get(key);
672
- if (!promise) {
673
- promise = (async () => {
674
- try {
675
- const nonce = await source.get({ address, chainId, client });
676
- const previousNonce = nonceMap.get(key) ?? 0;
677
- if (previousNonce > 0 && nonce <= previousNonce)
678
- return previousNonce + 1;
679
- nonceMap.delete(key);
680
- return nonce;
681
- } finally {
682
- resetCache(key);
683
- }
684
- })();
685
- promiseMap.set(key, promise);
686
- }
687
- const delta = deltaMap.get(key) ?? 0;
688
- return delta + await promise;
689
- },
690
- reset({ address, chainId }) {
691
- const key = getKey({ address, chainId });
692
- nonceMap.delete(key);
693
- resetCache(key);
694
- }
695
- };
696
- }
697
- function jsonRpc() {
698
- return {
699
- async get(parameters) {
700
- const { address, client } = parameters;
701
- return getTransactionCount(client, {
702
- address,
703
- blockTag: "pending"
704
- });
705
- },
706
- set() {
707
- }
708
- };
709
- }
710
- var nonceManager = /* @__PURE__ */ createNonceManager({
711
- source: jsonRpc()
712
- });
713
-
714
- // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/constants/strings.js
715
- var presignMessagePrefix = "Ethereum Signed Message:\n";
716
-
717
- // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js
718
- function toPrefixedMessage(message_) {
719
- const message = (() => {
720
- if (typeof message_ === "string")
721
- return stringToHex(message_);
722
- if (typeof message_.raw === "string")
723
- return message_.raw;
724
- return bytesToHex(message_.raw);
725
- })();
726
- const prefix = stringToHex(`${presignMessagePrefix}${size(message)}`);
727
- return concat([prefix, message]);
728
- }
729
-
730
- // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/signature/hashMessage.js
731
- function hashMessage(message, to_) {
732
- return keccak256(toPrefixedMessage(message), to_);
733
- }
734
-
735
757
  // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/errors/typedData.js
736
758
  var InvalidDomainError = class extends BaseError {
737
759
  constructor({ domain }) {
@@ -965,27 +987,133 @@ function validateReference(type) {
965
987
  throw new InvalidStructTypeError({ type });
966
988
  }
967
989
 
968
- // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/signature/serializeSignature.js
969
- function serializeSignature({ r, s, to = "hex", v, yParity }) {
970
- const yParity_ = (() => {
971
- if (yParity === 0 || yParity === 1)
972
- return yParity;
973
- if (v && (v === 27n || v === 28n || v >= 35n))
974
- return v % 2n === 0n ? 1 : 0;
975
- throw new Error("Invalid `v` or `yParity` value");
976
- })();
977
- const signature = `0x${new secp256k1.Signature(hexToBigInt(r), hexToBigInt(s)).toCompactHex()}${yParity_ === 0 ? "1b" : "1c"}`;
978
- if (to === "hex")
979
- return signature;
980
- return hexToBytes(signature);
981
- }
982
-
983
990
  // node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js
984
991
  function publicKeyToAddress(publicKey) {
985
992
  const address = keccak256(`0x${publicKey.substring(4)}`).substring(26);
986
993
  return checksumAddress(`0x${address}`);
987
994
  }
988
995
 
996
+ // node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/legacy.js
997
+ var Rho160 = /* @__PURE__ */ Uint8Array.from([
998
+ 7,
999
+ 4,
1000
+ 13,
1001
+ 1,
1002
+ 10,
1003
+ 6,
1004
+ 15,
1005
+ 3,
1006
+ 12,
1007
+ 0,
1008
+ 9,
1009
+ 5,
1010
+ 2,
1011
+ 14,
1012
+ 11,
1013
+ 8
1014
+ ]);
1015
+ var Id160 = /* @__PURE__ */ (() => Uint8Array.from(new Array(16).fill(0).map((_, i) => i)))();
1016
+ var Pi160 = /* @__PURE__ */ (() => Id160.map((i) => (9 * i + 5) % 16))();
1017
+ var idxLR = /* @__PURE__ */ (() => {
1018
+ const L = [Id160];
1019
+ const R = [Pi160];
1020
+ const res = [L, R];
1021
+ for (let i = 0; i < 4; i++)
1022
+ for (let j of res)
1023
+ j.push(j[i].map((k) => Rho160[k]));
1024
+ return res;
1025
+ })();
1026
+ var idxL = /* @__PURE__ */ (() => idxLR[0])();
1027
+ var idxR = /* @__PURE__ */ (() => idxLR[1])();
1028
+ var shifts160 = /* @__PURE__ */ [
1029
+ [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],
1030
+ [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],
1031
+ [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
1032
+ [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
1033
+ [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]
1034
+ ].map((i) => Uint8Array.from(i));
1035
+ var shiftsL160 = /* @__PURE__ */ idxL.map((idx, i) => idx.map((j) => shifts160[i][j]));
1036
+ var shiftsR160 = /* @__PURE__ */ idxR.map((idx, i) => idx.map((j) => shifts160[i][j]));
1037
+ var Kl160 = /* @__PURE__ */ Uint32Array.from([
1038
+ 0,
1039
+ 1518500249,
1040
+ 1859775393,
1041
+ 2400959708,
1042
+ 2840853838
1043
+ ]);
1044
+ var Kr160 = /* @__PURE__ */ Uint32Array.from([
1045
+ 1352829926,
1046
+ 1548603684,
1047
+ 1836072691,
1048
+ 2053994217,
1049
+ 0
1050
+ ]);
1051
+ function ripemd_f(group, x, y, z) {
1052
+ if (group === 0)
1053
+ return x ^ y ^ z;
1054
+ if (group === 1)
1055
+ return x & y | ~x & z;
1056
+ if (group === 2)
1057
+ return (x | ~y) ^ z;
1058
+ if (group === 3)
1059
+ return x & z | y & ~z;
1060
+ return x ^ (y | ~z);
1061
+ }
1062
+ var BUF_160 = /* @__PURE__ */ new Uint32Array(16);
1063
+ var RIPEMD160 = class extends HashMD {
1064
+ constructor() {
1065
+ super(64, 20, 8, true);
1066
+ this.h0 = 1732584193 | 0;
1067
+ this.h1 = 4023233417 | 0;
1068
+ this.h2 = 2562383102 | 0;
1069
+ this.h3 = 271733878 | 0;
1070
+ this.h4 = 3285377520 | 0;
1071
+ }
1072
+ get() {
1073
+ const { h0, h1, h2, h3, h4 } = this;
1074
+ return [h0, h1, h2, h3, h4];
1075
+ }
1076
+ set(h0, h1, h2, h3, h4) {
1077
+ this.h0 = h0 | 0;
1078
+ this.h1 = h1 | 0;
1079
+ this.h2 = h2 | 0;
1080
+ this.h3 = h3 | 0;
1081
+ this.h4 = h4 | 0;
1082
+ }
1083
+ process(view, offset) {
1084
+ for (let i = 0; i < 16; i++, offset += 4)
1085
+ BUF_160[i] = view.getUint32(offset, true);
1086
+ let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;
1087
+ for (let group = 0; group < 5; group++) {
1088
+ const rGroup = 4 - group;
1089
+ const hbl = Kl160[group], hbr = Kr160[group];
1090
+ const rl = idxL[group], rr = idxR[group];
1091
+ const sl = shiftsL160[group], sr = shiftsR160[group];
1092
+ for (let i = 0; i < 16; i++) {
1093
+ const tl = rotl(al + ripemd_f(group, bl, cl, dl) + BUF_160[rl[i]] + hbl, sl[i]) + el | 0;
1094
+ al = el, el = dl, dl = rotl(cl, 10) | 0, cl = bl, bl = tl;
1095
+ }
1096
+ for (let i = 0; i < 16; i++) {
1097
+ const tr = rotl(ar + ripemd_f(rGroup, br, cr, dr) + BUF_160[rr[i]] + hbr, sr[i]) + er | 0;
1098
+ ar = er, er = dr, dr = rotl(cr, 10) | 0, cr = br, br = tr;
1099
+ }
1100
+ }
1101
+ this.set(this.h1 + cl + dr | 0, this.h2 + dl + er | 0, this.h3 + el + ar | 0, this.h4 + al + br | 0, this.h0 + bl + cr | 0);
1102
+ }
1103
+ roundClean() {
1104
+ clean(BUF_160);
1105
+ }
1106
+ destroy() {
1107
+ this.destroyed = true;
1108
+ clean(this.buffer);
1109
+ this.set(0, 0, 0, 0, 0);
1110
+ }
1111
+ };
1112
+ var ripemd160 = /* @__PURE__ */ createHasher(() => new RIPEMD160());
1113
+
1114
+ // node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/ripemd160.js
1115
+ var ripemd1602 = ripemd160;
1116
+
989
1117
  // node_modules/.pnpm/ox@0.14.30_typescript@6.0.3_zod@4.4.3/node_modules/ox/_esm/core/Hash.js
990
1118
  function keccak2562(value, options = {}) {
991
1119
  const { as = typeof value === "string" ? "Hex" : "Bytes" } = options;
@@ -1013,32 +1141,34 @@ function hashAuthorization(parameters) {
1013
1141
  }
1014
1142
 
1015
1143
  export {
1144
+ getTransactionCount,
1145
+ createNonceManager,
1146
+ nonceManager,
1147
+ serializeSignature,
1016
1148
  publicKeyToAddress,
1017
1149
  toRlp,
1018
1150
  bytesToRlp,
1019
1151
  hexToRlp,
1020
1152
  hashAuthorization,
1021
- getTransactionCount,
1153
+ presignMessagePrefix,
1154
+ toPrefixedMessage,
1155
+ hashMessage,
1022
1156
  blobsToCommitments,
1023
1157
  blobsToProofs,
1024
1158
  sha2562 as sha256,
1159
+ sha2563 as sha2562,
1025
1160
  commitmentToVersionedHash,
1026
1161
  commitmentsToVersionedHashes,
1027
1162
  toBlobs,
1028
1163
  toBlobSidecars,
1029
- getTransactionType,
1030
1164
  assertTransactionEIP7702,
1031
1165
  assertTransactionEIP4844,
1032
1166
  assertTransactionEIP1559,
1033
1167
  assertTransactionEIP2930,
1034
1168
  assertTransactionLegacy,
1169
+ getTransactionType,
1035
1170
  serializeAccessList,
1036
1171
  serializeTransaction,
1037
- createNonceManager,
1038
- nonceManager,
1039
- presignMessagePrefix,
1040
- toPrefixedMessage,
1041
- hashMessage,
1042
1172
  InvalidDomainError,
1043
1173
  InvalidPrimaryTypeError,
1044
1174
  InvalidStructTypeError,
@@ -1049,7 +1179,7 @@ export {
1049
1179
  hashTypedData,
1050
1180
  hashDomain,
1051
1181
  hashStruct,
1052
- keccak2562 as keccak256,
1053
- serializeSignature
1182
+ ripemd1602 as ripemd160,
1183
+ keccak2562 as keccak256
1054
1184
  };
1055
- //# sourceMappingURL=chunk-M2O56UK7.js.map
1185
+ //# sourceMappingURL=chunk-N35E6CM2.js.map