@gardenfi/utils 2.5.3-beta.1 → 2.5.3-beta.2

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 (459) hide show
  1. package/dist/index10.cjs +1 -1
  2. package/dist/index10.js +4 -4
  3. package/dist/index100.cjs +1 -1
  4. package/dist/index100.js +13 -7
  5. package/dist/index101.cjs +1 -1
  6. package/dist/index101.js +3 -12
  7. package/dist/index102.cjs +1 -1
  8. package/dist/index102.js +26 -18
  9. package/dist/index103.cjs +2 -1
  10. package/dist/index103.js +19 -22
  11. package/dist/index104.cjs +1 -1
  12. package/dist/index104.js +9 -21
  13. package/dist/index105.cjs +1 -1
  14. package/dist/index105.js +8 -51
  15. package/dist/index106.cjs +1 -1
  16. package/dist/index106.js +10 -11
  17. package/dist/index107.cjs +1 -1
  18. package/dist/index107.js +11 -161
  19. package/dist/index108.cjs +1 -1
  20. package/dist/index108.js +13 -21
  21. package/dist/index109.cjs +1 -1
  22. package/dist/index109.js +14 -127
  23. package/dist/index110.cjs +1 -1
  24. package/dist/index110.js +4 -38
  25. package/dist/index111.cjs +1 -1
  26. package/dist/index111.js +6 -6
  27. package/dist/index112.cjs +1 -1
  28. package/dist/index112.js +16 -25
  29. package/dist/index113.cjs +1 -1
  30. package/dist/index113.js +13 -55
  31. package/dist/index114.cjs +1 -1
  32. package/dist/index114.js +6 -45
  33. package/dist/index115.cjs +1 -1
  34. package/dist/index115.js +7 -191
  35. package/dist/index116.cjs +1 -1
  36. package/dist/index116.js +22 -4
  37. package/dist/index117.cjs +1 -1
  38. package/dist/index117.js +7 -64
  39. package/dist/index118.cjs +1 -1
  40. package/dist/index118.js +22 -3
  41. package/dist/index119.cjs +1 -1
  42. package/dist/index119.js +16 -19
  43. package/dist/index120.cjs +1 -1
  44. package/dist/index120.js +39 -15
  45. package/dist/index121.cjs +1 -1
  46. package/dist/index121.js +21 -23
  47. package/dist/index122.cjs +1 -1
  48. package/dist/index122.js +80 -11
  49. package/dist/index123.cjs +1 -1
  50. package/dist/index123.js +11 -18
  51. package/dist/index124.cjs +1 -1
  52. package/dist/index124.js +55 -31
  53. package/dist/index125.cjs +1 -1
  54. package/dist/index125.js +14 -3
  55. package/dist/index126.cjs +1 -1
  56. package/dist/index126.js +8 -18
  57. package/dist/index127.cjs +1 -1
  58. package/dist/index127.js +20 -27
  59. package/dist/index128.cjs +1 -1
  60. package/dist/index128.js +6 -36
  61. package/dist/index129.cjs +1 -1
  62. package/dist/index129.js +35 -8
  63. package/dist/index130.cjs +1 -1
  64. package/dist/index130.js +32 -10
  65. package/dist/index131.cjs +1 -1
  66. package/dist/index131.js +8 -24
  67. package/dist/index132.cjs +1 -1
  68. package/dist/index132.js +50 -28
  69. package/dist/index133.cjs +1 -1
  70. package/dist/index133.js +19 -65
  71. package/dist/index134.cjs +1 -1
  72. package/dist/index134.js +106 -9
  73. package/dist/index135.cjs +1 -1
  74. package/dist/index135.js +66 -21
  75. package/dist/index136.cjs +1 -1
  76. package/dist/index136.js +9 -24
  77. package/dist/index137.cjs +1 -1
  78. package/dist/index137.js +71 -24
  79. package/dist/index138.cjs +2 -1
  80. package/dist/index138.js +3 -4
  81. package/dist/index139.cjs +1 -1
  82. package/dist/index139.js +9 -15
  83. package/dist/index140.cjs +1 -1
  84. package/dist/index140.js +11 -101
  85. package/dist/index141.cjs +1 -1
  86. package/dist/index141.js +4 -80
  87. package/dist/index142.cjs +1 -1
  88. package/dist/index142.js +12 -5
  89. package/dist/index143.cjs +1 -1
  90. package/dist/index143.js +2 -7
  91. package/dist/index144.cjs +1 -1
  92. package/dist/index144.js +31 -27
  93. package/dist/index145.cjs +1 -1
  94. package/dist/index145.js +21 -26
  95. package/dist/index146.cjs +1 -1
  96. package/dist/index146.js +5 -13
  97. package/dist/index147.cjs +1 -1
  98. package/dist/index147.js +5 -42
  99. package/dist/index148.cjs +1 -1
  100. package/dist/index148.js +5 -19
  101. package/dist/index149.cjs +9 -1
  102. package/dist/index149.js +31 -74
  103. package/dist/index150.cjs +1 -1
  104. package/dist/index150.js +3 -2
  105. package/dist/index151.cjs +1 -1
  106. package/dist/index151.js +13 -32
  107. package/dist/index152.cjs +1 -1
  108. package/dist/index152.js +16 -107
  109. package/dist/index153.cjs +1 -1
  110. package/dist/index153.js +33 -164
  111. package/dist/index154.cjs +1 -1
  112. package/dist/index154.js +6 -47
  113. package/dist/index155.cjs +4 -1
  114. package/dist/index155.js +194 -32
  115. package/dist/index156.cjs +1 -1
  116. package/dist/index156.js +27 -8
  117. package/dist/index157.cjs +1 -1
  118. package/dist/index157.js +161 -6
  119. package/dist/index158.cjs +1 -1
  120. package/dist/index158.js +127 -6
  121. package/dist/index159.cjs +1 -1
  122. package/dist/index159.js +27 -11
  123. package/dist/index160.cjs +1 -1
  124. package/dist/index160.js +54 -9
  125. package/dist/index161.cjs +1 -1
  126. package/dist/index161.js +190 -12
  127. package/dist/index162.cjs +1 -1
  128. package/dist/index162.js +4 -33
  129. package/dist/index163.cjs +1 -1
  130. package/dist/index163.js +21 -5
  131. package/dist/index164.cjs +1 -1
  132. package/dist/index164.js +3 -8
  133. package/dist/index165.cjs +1 -1
  134. package/dist/index165.js +14 -6
  135. package/dist/index166.cjs +1 -1
  136. package/dist/index166.js +11 -20
  137. package/dist/index167.cjs +1 -1
  138. package/dist/index167.js +32 -29
  139. package/dist/index168.cjs +1 -1
  140. package/dist/index168.js +3 -4
  141. package/dist/index169.cjs +1 -1
  142. package/dist/index169.js +27 -17
  143. package/dist/index17.cjs +1 -1
  144. package/dist/index17.js +2 -2
  145. package/dist/index170.cjs +1 -1
  146. package/dist/index170.js +8 -10
  147. package/dist/index171.cjs +1 -1
  148. package/dist/index171.js +24 -20
  149. package/dist/index172.cjs +1 -1
  150. package/dist/index172.js +28 -22
  151. package/dist/index173.cjs +1 -1
  152. package/dist/index173.js +3 -5
  153. package/dist/index174.cjs +1 -1
  154. package/dist/index174.js +6 -5
  155. package/dist/index175.cjs +1 -1
  156. package/dist/index175.js +6 -8
  157. package/dist/index176.cjs +1 -1
  158. package/dist/index176.js +30 -102
  159. package/dist/index177.cjs +1 -1
  160. package/dist/index177.js +5 -3
  161. package/dist/index178.cjs +1 -1
  162. package/dist/index178.js +36 -17
  163. package/dist/index179.cjs +1 -1
  164. package/dist/index179.js +45 -167
  165. package/dist/index18.cjs +1 -1
  166. package/dist/index18.js +8 -8
  167. package/dist/index180.cjs +1 -1
  168. package/dist/index180.js +32 -17
  169. package/dist/index181.cjs +1 -1
  170. package/dist/index181.js +6 -28
  171. package/dist/index182.cjs +1 -1
  172. package/dist/index182.js +43 -2
  173. package/dist/index183.cjs +1 -1
  174. package/dist/index183.js +51 -13
  175. package/dist/index184.cjs +1 -1
  176. package/dist/index184.js +104 -12
  177. package/dist/index185.cjs +1 -1
  178. package/dist/index185.js +3 -48
  179. package/dist/index186.cjs +1 -1
  180. package/dist/index186.js +5 -11
  181. package/dist/index187.cjs +1 -1
  182. package/dist/index187.js +3 -7
  183. package/dist/index188.cjs +1 -1
  184. package/dist/index188.js +16 -88
  185. package/dist/index189.cjs +1 -1
  186. package/dist/index189.js +5 -46
  187. package/dist/index190.cjs +1 -1
  188. package/dist/index190.js +8 -37
  189. package/dist/index191.cjs +1 -1
  190. package/dist/index191.js +103 -17
  191. package/dist/index192.cjs +1 -1
  192. package/dist/index192.js +5 -6
  193. package/dist/index193.cjs +1 -1
  194. package/dist/index193.js +6 -9
  195. package/dist/index194.cjs +1 -1
  196. package/dist/index194.js +27 -13
  197. package/dist/index195.cjs +1 -1
  198. package/dist/index195.js +34 -8
  199. package/dist/index196.cjs +1 -1
  200. package/dist/index196.js +13 -8
  201. package/dist/index197.cjs +1 -1
  202. package/dist/index197.js +78 -35
  203. package/dist/index198.cjs +1 -1
  204. package/dist/index198.js +2 -17
  205. package/dist/index199.cjs +1 -1
  206. package/dist/index199.js +18 -14
  207. package/dist/index20.cjs +1 -1
  208. package/dist/index20.js +2 -2
  209. package/dist/index200.cjs +1 -1
  210. package/dist/index200.js +171 -13
  211. package/dist/index201.cjs +1 -2
  212. package/dist/index201.js +16 -23
  213. package/dist/index202.cjs +1 -1
  214. package/dist/index202.js +10 -6
  215. package/dist/index203.cjs +1 -1
  216. package/dist/index203.js +2 -2
  217. package/dist/index204.cjs +1 -1
  218. package/dist/index204.js +5 -5
  219. package/dist/index206.cjs +1 -1
  220. package/dist/index206.js +1 -1
  221. package/dist/index207.cjs +1 -1
  222. package/dist/index207.js +2 -2
  223. package/dist/index208.cjs +1 -1
  224. package/dist/index208.js +1 -1
  225. package/dist/index209.cjs +1 -1
  226. package/dist/index209.js +5 -5
  227. package/dist/index21.cjs +1 -1
  228. package/dist/index21.js +17 -4
  229. package/dist/index210.cjs +1 -2
  230. package/dist/index210.js +24 -41
  231. package/dist/index211.cjs +1 -1
  232. package/dist/index211.js +47 -2
  233. package/dist/index212.cjs +1 -1
  234. package/dist/index212.js +9 -5
  235. package/dist/index213.cjs +2 -1
  236. package/dist/index213.js +40 -9
  237. package/dist/index214.cjs +1 -1
  238. package/dist/index214.js +2 -20
  239. package/dist/index215.cjs +1 -1
  240. package/dist/index215.js +5 -8
  241. package/dist/index216.cjs +1 -1
  242. package/dist/index216.js +9 -65
  243. package/dist/index217.cjs +1 -1
  244. package/dist/index217.js +17 -63
  245. package/dist/index218.cjs +1 -1
  246. package/dist/index218.js +8 -186
  247. package/dist/index219.cjs +1 -1
  248. package/dist/index219.js +66 -28
  249. package/dist/index22.cjs +1 -1
  250. package/dist/index22.js +3 -3
  251. package/dist/index220.cjs +1 -1
  252. package/dist/index220.js +61 -72
  253. package/dist/index221.cjs +1 -1
  254. package/dist/index221.js +183 -35
  255. package/dist/index222.cjs +1 -1
  256. package/dist/index222.js +21 -9
  257. package/dist/index223.cjs +1 -1
  258. package/dist/index223.js +70 -7
  259. package/dist/index224.cjs +1 -1
  260. package/dist/index224.js +40 -12
  261. package/dist/index225.cjs +1 -1
  262. package/dist/index225.js +16 -11
  263. package/dist/index226.cjs +1 -1
  264. package/dist/index226.js +12 -102
  265. package/dist/index227.cjs +1 -1
  266. package/dist/index227.js +11 -6
  267. package/dist/index228.cjs +1 -1
  268. package/dist/index228.js +10 -242
  269. package/dist/index229.cjs +1 -1
  270. package/dist/index229.js +2 -2
  271. package/dist/index23.cjs +1 -1
  272. package/dist/index23.js +12 -26
  273. package/dist/index230.cjs +1 -1
  274. package/dist/index230.js +2 -2
  275. package/dist/index231.cjs +1 -1
  276. package/dist/index231.js +18 -25
  277. package/dist/index232.cjs +1 -1
  278. package/dist/index232.js +107 -18
  279. package/dist/index233.cjs +1 -1
  280. package/dist/index233.js +99 -142
  281. package/dist/index234.cjs +1 -1
  282. package/dist/index234.js +26 -24
  283. package/dist/index235.cjs +1 -1
  284. package/dist/index235.js +15 -45
  285. package/dist/index236.cjs +1 -1
  286. package/dist/index236.js +213 -8
  287. package/dist/index237.cjs +1 -1
  288. package/dist/index237.js +1 -1
  289. package/dist/index238.cjs +1 -1
  290. package/dist/index238.js +1 -1
  291. package/dist/index24.cjs +1 -1
  292. package/dist/index24.js +59 -8
  293. package/dist/index240.cjs +1 -1
  294. package/dist/index240.js +1 -1
  295. package/dist/index241.cjs +1 -1
  296. package/dist/index241.js +3 -3
  297. package/dist/index242.cjs +2 -1
  298. package/dist/index242.js +66 -68
  299. package/dist/index243.cjs +1 -1
  300. package/dist/index243.js +14 -788
  301. package/dist/index244.cjs +1 -1
  302. package/dist/index244.js +67 -147
  303. package/dist/index245.cjs +1 -1
  304. package/dist/index245.js +640 -183
  305. package/dist/index246.cjs +1 -2
  306. package/dist/index246.js +203 -63
  307. package/dist/index247.cjs +1 -1
  308. package/dist/index247.js +177 -14
  309. package/dist/index25.cjs +16 -1
  310. package/dist/index25.js +113 -12
  311. package/dist/index26.cjs +1 -1
  312. package/dist/index26.js +30 -58
  313. package/dist/index27.cjs +1 -16
  314. package/dist/index27.js +24 -111
  315. package/dist/index28.cjs +1 -1
  316. package/dist/index28.js +7 -29
  317. package/dist/index29.cjs +1 -1
  318. package/dist/index29.js +171 -7
  319. package/dist/index30.cjs +1 -1
  320. package/dist/index30.js +110 -30
  321. package/dist/index31.cjs +1 -1
  322. package/dist/index31.js +30 -29
  323. package/dist/index32.cjs +1 -1
  324. package/dist/index32.js +3 -16
  325. package/dist/index33.cjs +1 -1
  326. package/dist/index33.js +2 -34
  327. package/dist/index34.cjs +1 -1
  328. package/dist/index34.js +4 -45
  329. package/dist/index35.cjs +2 -1
  330. package/dist/index35.js +59 -151
  331. package/dist/index36.cjs +2 -1
  332. package/dist/index36.js +50 -31
  333. package/dist/index37.cjs +3 -1
  334. package/dist/index37.js +210 -52
  335. package/dist/index38.cjs +1 -2
  336. package/dist/index38.js +22 -58
  337. package/dist/index39.cjs +1 -1
  338. package/dist/index39.js +18 -13
  339. package/dist/index40.cjs +1 -1
  340. package/dist/index40.js +10 -37
  341. package/dist/index41.cjs +1 -1
  342. package/dist/index41.js +20 -15
  343. package/dist/index42.cjs +1 -1
  344. package/dist/index42.js +45 -8
  345. package/dist/index43.cjs +1 -1
  346. package/dist/index43.js +12 -19
  347. package/dist/index44.cjs +1 -1
  348. package/dist/index44.js +13 -2
  349. package/dist/index45.cjs +1 -1
  350. package/dist/index45.js +24 -45
  351. package/dist/index46.cjs +1 -1
  352. package/dist/index46.js +27 -31
  353. package/dist/index47.cjs +1 -1
  354. package/dist/index47.js +47 -3
  355. package/dist/index48.cjs +1 -1
  356. package/dist/index48.js +19 -9
  357. package/dist/index49.cjs +1 -1
  358. package/dist/index49.js +10 -67
  359. package/dist/index50.cjs +1 -1
  360. package/dist/index50.js +31 -9
  361. package/dist/index51.cjs +1 -1
  362. package/dist/index51.js +36 -28
  363. package/dist/index52.cjs +1 -1
  364. package/dist/index52.js +7 -71
  365. package/dist/index53.cjs +1 -1
  366. package/dist/index53.js +29 -19
  367. package/dist/index54.cjs +1 -1
  368. package/dist/index54.js +22 -50
  369. package/dist/index55.cjs +1 -1
  370. package/dist/index55.js +7 -7
  371. package/dist/index56.cjs +1 -1
  372. package/dist/index56.js +89 -16
  373. package/dist/index57.cjs +1 -1
  374. package/dist/index57.js +46 -10
  375. package/dist/index58.cjs +1 -1
  376. package/dist/index58.js +23 -5
  377. package/dist/index59.cjs +1 -1
  378. package/dist/index59.js +36 -13
  379. package/dist/index60.cjs +1 -1
  380. package/dist/index60.js +17 -3
  381. package/dist/index61.cjs +1 -1
  382. package/dist/index61.js +6 -26
  383. package/dist/index62.cjs +1 -1
  384. package/dist/index62.js +9 -109
  385. package/dist/index63.cjs +1 -1
  386. package/dist/index63.js +13 -4
  387. package/dist/index64.cjs +1 -1
  388. package/dist/index64.js +109 -6
  389. package/dist/index65.cjs +1 -1
  390. package/dist/index65.js +7 -87
  391. package/dist/index66.cjs +1 -1
  392. package/dist/index66.js +23 -6
  393. package/dist/index67.cjs +1 -1
  394. package/dist/index67.js +6 -124
  395. package/dist/index68.cjs +1 -1
  396. package/dist/index68.js +21 -7
  397. package/dist/index69.cjs +1 -1
  398. package/dist/index69.js +8 -21
  399. package/dist/index70.cjs +1 -1
  400. package/dist/index70.js +31 -17
  401. package/dist/index71.cjs +1 -1
  402. package/dist/index71.js +7 -40
  403. package/dist/index72.cjs +1 -1
  404. package/dist/index72.js +16 -21
  405. package/dist/index73.cjs +1 -1
  406. package/dist/index73.js +72 -10
  407. package/dist/index74.cjs +1 -1
  408. package/dist/index74.js +35 -6
  409. package/dist/index75.cjs +1 -1
  410. package/dist/index75.js +16 -106
  411. package/dist/index76.cjs +1 -1
  412. package/dist/index76.js +66 -3
  413. package/dist/index77.cjs +1 -1
  414. package/dist/index77.js +12 -9
  415. package/dist/index78.cjs +1 -2
  416. package/dist/index78.js +15 -3
  417. package/dist/index79.cjs +3 -20
  418. package/dist/index79.js +71 -302
  419. package/dist/index80.cjs +1 -1
  420. package/dist/index80.js +24 -13
  421. package/dist/index81.cjs +1 -1
  422. package/dist/index81.js +33 -4
  423. package/dist/index82.cjs +1 -1
  424. package/dist/index82.js +45 -2
  425. package/dist/index83.cjs +1 -1
  426. package/dist/index83.js +6 -7
  427. package/dist/index84.cjs +1 -3
  428. package/dist/index84.js +148 -212
  429. package/dist/index85.cjs +20 -1
  430. package/dist/index85.js +327 -32
  431. package/dist/index86.cjs +3 -1
  432. package/dist/index86.js +451 -21
  433. package/dist/index87.cjs +1 -1
  434. package/dist/index87.js +64 -5
  435. package/dist/index88.cjs +1 -1
  436. package/dist/index88.js +36 -72
  437. package/dist/index89.cjs +1 -1
  438. package/dist/index89.js +15 -5
  439. package/dist/index90.cjs +1 -1
  440. package/dist/index90.js +2 -6
  441. package/dist/index91.cjs +1 -9
  442. package/dist/index91.js +16 -35
  443. package/dist/index92.cjs +1 -3
  444. package/dist/index92.js +10 -95
  445. package/dist/index93.cjs +1 -1
  446. package/dist/index93.js +126 -3
  447. package/dist/index94.cjs +1 -1
  448. package/dist/index94.js +5 -23
  449. package/dist/index95.cjs +1 -3
  450. package/dist/index95.js +21 -451
  451. package/dist/index96.cjs +1 -2
  452. package/dist/index96.js +43 -52
  453. package/dist/index97.cjs +1 -1
  454. package/dist/index97.js +35 -17
  455. package/dist/index98.cjs +1 -1
  456. package/dist/index98.js +6 -35
  457. package/dist/index99.cjs +1 -4
  458. package/dist/index99.js +85 -191
  459. package/package.json +1 -1
package/dist/index226.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index238.cjs"),x=require("./index233.cjs"),_=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),f=new Uint32Array(64);class u extends e.HashMD{constructor(o=32){super(64,o,8,!1),this.A=e.SHA256_IV[0]|0,this.B=e.SHA256_IV[1]|0,this.C=e.SHA256_IV[2]|0,this.D=e.SHA256_IV[3]|0,this.E=e.SHA256_IV[4]|0,this.F=e.SHA256_IV[5]|0,this.G=e.SHA256_IV[6]|0,this.H=e.SHA256_IV[7]|0}get(){const{A:o,B:h,C:s,D:a,E:r,F:b,G:c,H:i}=this;return[o,h,s,a,r,b,c,i]}set(o,h,s,a,r,b,c,i){this.A=o|0,this.B=h|0,this.C=s|0,this.D=a|0,this.E=r|0,this.F=b|0,this.G=c|0,this.H=i|0}process(o,h){for(let t=0;t<16;t++,h+=4)f[t]=o.getUint32(h,!1);for(let t=16;t<64;t++){const H=f[t-15],d=f[t-2],S=x.rotr(H,7)^x.rotr(H,18)^H>>>3,l=x.rotr(d,17)^x.rotr(d,19)^d>>>10;f[t]=l+f[t-7]+S+f[t-16]|0}let{A:s,B:a,C:r,D:b,E:c,F:i,G:n,H:A}=this;for(let t=0;t<64;t++){const H=x.rotr(c,6)^x.rotr(c,11)^x.rotr(c,25),d=A+H+e.Chi(c,i,n)+_[t]+f[t]|0,l=(x.rotr(s,2)^x.rotr(s,13)^x.rotr(s,22))+e.Maj(s,a,r)|0;A=n,n=i,i=c,c=b+d|0,b=r,r=a,a=s,s=d+l|0}s=s+this.A|0,a=a+this.B|0,r=r+this.C|0,b=b+this.D|0,c=c+this.E|0,i=i+this.F|0,n=n+this.G|0,A=A+this.H|0,this.set(s,a,r,b,c,i,n,A)}roundClean(){x.clean(f)}destroy(){this.set(0,0,0,0,0,0,0,0),x.clean(this.buffer)}}const I=x.createHasher(()=>new u);exports.SHA256=u;exports.sha256=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index213.cjs");class t extends r.BaseError{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}exports.CircularReferenceError=t;
package/dist/index226.js CHANGED
@@ -1,106 +1,16 @@
1
- import { HashMD as D, SHA256_IV as b, Chi as g, Maj as p } from "./index238.js";
2
- import { createHasher as u, clean as C, rotr as i } from "./index233.js";
3
- const B = /* @__PURE__ */ Uint32Array.from([
4
- 1116352408,
5
- 1899447441,
6
- 3049323471,
7
- 3921009573,
8
- 961987163,
9
- 1508970993,
10
- 2453635748,
11
- 2870763221,
12
- 3624381080,
13
- 310598401,
14
- 607225278,
15
- 1426881987,
16
- 1925078388,
17
- 2162078206,
18
- 2614888103,
19
- 3248222580,
20
- 3835390401,
21
- 4022224774,
22
- 264347078,
23
- 604807628,
24
- 770255983,
25
- 1249150122,
26
- 1555081692,
27
- 1996064986,
28
- 2554220882,
29
- 2821834349,
30
- 2952996808,
31
- 3210313671,
32
- 3336571891,
33
- 3584528711,
34
- 113926993,
35
- 338241895,
36
- 666307205,
37
- 773529912,
38
- 1294757372,
39
- 1396182291,
40
- 1695183700,
41
- 1986661051,
42
- 2177026350,
43
- 2456956037,
44
- 2730485921,
45
- 2820302411,
46
- 3259730800,
47
- 3345764771,
48
- 3516065817,
49
- 3600352804,
50
- 4094571909,
51
- 275423344,
52
- 430227734,
53
- 506948616,
54
- 659060556,
55
- 883997877,
56
- 958139571,
57
- 1322822218,
58
- 1537002063,
59
- 1747873779,
60
- 1955562222,
61
- 2024104815,
62
- 2227730452,
63
- 2361852424,
64
- 2428436474,
65
- 2756734187,
66
- 3204031479,
67
- 3329325298
68
- ]), h = /* @__PURE__ */ new Uint32Array(64);
69
- class E extends D {
70
- constructor(o = 32) {
71
- super(64, o, 8, !1), this.A = b[0] | 0, this.B = b[1] | 0, this.C = b[2] | 0, this.D = b[3] | 0, this.E = b[4] | 0, this.F = b[5] | 0, this.G = b[6] | 0, this.H = b[7] | 0;
72
- }
73
- get() {
74
- const { A: o, B: r, C: t, D: s, E: a, F: f, G: c, H: e } = this;
75
- return [o, r, t, s, a, f, c, e];
76
- }
77
- // prettier-ignore
78
- set(o, r, t, s, a, f, c, e) {
79
- this.A = o | 0, this.B = r | 0, this.C = t | 0, this.D = s | 0, this.E = a | 0, this.F = f | 0, this.G = c | 0, this.H = e | 0;
80
- }
81
- process(o, r) {
82
- for (let x = 0; x < 16; x++, r += 4)
83
- h[x] = o.getUint32(r, !1);
84
- for (let x = 16; x < 64; x++) {
85
- const H = h[x - 15], d = h[x - 2], m = i(H, 7) ^ i(H, 18) ^ H >>> 3, l = i(d, 17) ^ i(d, 19) ^ d >>> 10;
86
- h[x] = l + h[x - 7] + m + h[x - 16] | 0;
87
- }
88
- let { A: t, B: s, C: a, D: f, E: c, F: e, G: n, H: A } = this;
89
- for (let x = 0; x < 64; x++) {
90
- const H = i(c, 6) ^ i(c, 11) ^ i(c, 25), d = A + H + g(c, e, n) + B[x] + h[x] | 0, l = (i(t, 2) ^ i(t, 13) ^ i(t, 22)) + p(t, s, a) | 0;
91
- A = n, n = e, e = c, c = f + d | 0, f = a, a = s, s = t, t = d + l | 0;
92
- }
93
- t = t + this.A | 0, s = s + this.B | 0, a = a + this.C | 0, f = f + this.D | 0, c = c + this.E | 0, e = e + this.F | 0, n = n + this.G | 0, A = A + this.H | 0, this.set(t, s, a, f, c, e, n, A);
94
- }
95
- roundClean() {
96
- C(h);
97
- }
98
- destroy() {
99
- this.set(0, 0, 0, 0, 0, 0, 0, 0), C(this.buffer);
1
+ import { BaseError as r } from "./index213.js";
2
+ class a extends r {
3
+ constructor({ type: e }) {
4
+ super("Circular reference detected.", {
5
+ metaMessages: [`Struct "${e}" is a circular reference.`]
6
+ }), Object.defineProperty(this, "name", {
7
+ enumerable: !0,
8
+ configurable: !0,
9
+ writable: !0,
10
+ value: "CircularReferenceError"
11
+ });
100
12
  }
101
13
  }
102
- const y = /* @__PURE__ */ u(() => new E());
103
14
  export {
104
- E as SHA256,
105
- y as sha256
15
+ a as CircularReferenceError
106
16
  };
package/dist/index227.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index243.cjs");/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function c(r,t){const e=s=>a.weierstrass({...r,hash:s});return{...e(t),create:e}}exports.createCurve=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index116.cjs"),t=new o.LruMap(8192);function i(r,{enabled:n=!0,id:e}){if(!n||!e)return r();if(t.get(e))return t.get(e);const u=r().finally(()=>t.delete(e));return t.set(e,u),u}exports.promiseCache=t;exports.withDedupe=i;
package/dist/index227.js CHANGED
@@ -1,9 +1,14 @@
1
- import { weierstrass as s } from "./index243.js";
2
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
3
- function c(e, t) {
4
- const r = (o) => s({ ...e, hash: o });
5
- return { ...r(t), create: r };
1
+ import { LruMap as u } from "./index116.js";
2
+ const t = /* @__PURE__ */ new u(8192);
3
+ function s(r, { enabled: o = !0, id: e }) {
4
+ if (!o || !e)
5
+ return r();
6
+ if (t.get(e))
7
+ return t.get(e);
8
+ const n = r().finally(() => t.delete(e));
9
+ return t.set(e, n), n;
6
10
  }
7
11
  export {
8
- c as createCurve
12
+ t as promiseCache,
13
+ s as withDedupe
9
14
  };
package/dist/index228.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index244.cjs"),Y=require("./index233.cjs");/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const h=BigInt(0),g=BigInt(1),b=BigInt(2),x=BigInt(3),M=BigInt(4),A=BigInt(5),k=BigInt(7),j=BigInt(8),O=BigInt(9),V=BigInt(16);function q(t,n){const r=t%n;return r>=h?r:n+r}function U(t,n,r){let o=t;for(;n-- >h;)o*=o,o%=r;return o}function y(t,n){if(t===h)throw new Error("invert: expected non-zero number");if(n<=h)throw new Error("invert: expected positive modulus, got "+n);let r=q(t,n),o=n,l=h,f=g;for(;r!==h;){const i=o/r,s=o%r,u=l-f*i;o=r,r=s,l=f,f=u}if(o!==g)throw new Error("invert: does not exist");return q(l,n)}function I(t,n,r){if(!t.eql(t.sqr(n),r))throw new Error("Cannot find square root")}function Z(t,n){const r=(t.ORDER+g)/M,o=t.pow(n,r);return I(t,o,n),o}function $(t,n){const r=(t.ORDER-A)/j,o=t.mul(n,b),l=t.pow(o,r),f=t.mul(n,l),d=t.mul(t.mul(f,b),l),i=t.mul(f,t.sub(d,t.ONE));return I(t,i,n),i}function G(t){const n=_(t),r=S(t),o=r(n,n.neg(n.ONE)),l=r(n,o),f=r(n,n.neg(o)),d=(t+k)/V;return(i,s)=>{let u=i.pow(s,d),w=i.mul(u,o);const a=i.mul(u,l),e=i.mul(u,f),c=i.eql(i.sqr(w),s),m=i.eql(i.sqr(a),s);u=i.cmov(u,w,c),w=i.cmov(e,a,m);const B=i.eql(i.sqr(w),s),E=i.cmov(u,w,B);return I(i,E,s),E}}function S(t){if(t<x)throw new Error("sqrt is not defined for small field");let n=t-g,r=0;for(;n%b===h;)n/=b,r++;let o=b;const l=_(t);for(;N(l,o)===1;)if(o++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return Z;let f=l.pow(o,n);const d=(n+g)/b;return function(s,u){if(s.is0(u))return u;if(N(s,u)!==1)throw new Error("Cannot find square root");let w=r,a=s.mul(s.ONE,f),e=s.pow(u,n),c=s.pow(u,d);for(;!s.eql(e,s.ONE);){if(s.is0(e))return s.ZERO;let m=1,B=s.sqr(e);for(;!s.eql(B,s.ONE);)if(m++,B=s.sqr(B),m===w)throw new Error("Cannot find square root");const E=g<<BigInt(w-m-1),L=s.pow(a,E);w=m,a=s.sqr(L),e=s.mul(e,a),c=s.mul(c,L)}return c}}function z(t){return t%M===x?Z:t%j===A?$:t%V===O?G(t):S(t)}const J=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function W(t){const n={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},r=J.reduce((o,l)=>(o[l]="function",o),n);return v._validateObject(t,r),t}function C(t,n,r){if(r<h)throw new Error("invalid exponent, negatives unsupported");if(r===h)return t.ONE;if(r===g)return n;let o=t.ONE,l=n;for(;r>h;)r&g&&(o=t.mul(o,l)),l=t.sqr(l),r>>=g;return o}function H(t,n,r=!1){const o=new Array(n.length).fill(r?t.ZERO:void 0),l=n.reduce((d,i,s)=>t.is0(i)?d:(o[s]=d,t.mul(d,i)),t.ONE),f=t.inv(l);return n.reduceRight((d,i,s)=>t.is0(i)?d:(o[s]=t.mul(d,o[s]),t.mul(d,i)),f),o}function N(t,n){const r=(t.ORDER-g)/b,o=t.pow(n,r),l=t.eql(o,t.ONE),f=t.eql(o,t.ZERO),d=t.eql(o,t.neg(t.ONE));if(!l&&!f&&!d)throw new Error("invalid Legendre symbol result");return l?1:f?0:-1}function K(t,n){n!==void 0&&Y.anumber(n);const r=n!==void 0?n:t.toString(2).length,o=Math.ceil(r/8);return{nBitLength:r,nByteLength:o}}function _(t,n,r=!1,o={}){if(t<=h)throw new Error("invalid field: expected ORDER > 0, got "+t);let l,f,d=!1,i;if(typeof n=="object"&&n!=null){if(o.sqrt||r)throw new Error("cannot specify opts in two arguments");const e=n;e.BITS&&(l=e.BITS),e.sqrt&&(f=e.sqrt),typeof e.isLE=="boolean"&&(r=e.isLE),typeof e.modFromBytes=="boolean"&&(d=e.modFromBytes),i=e.allowedLengths}else typeof n=="number"&&(l=n),o.sqrt&&(f=o.sqrt);const{nBitLength:s,nByteLength:u}=K(t,l);if(u>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let w;const a=Object.freeze({ORDER:t,isLE:r,BITS:s,BYTES:u,MASK:v.bitMask(s),ZERO:h,ONE:g,allowedLengths:i,create:e=>q(e,t),isValid:e=>{if(typeof e!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof e);return h<=e&&e<t},is0:e=>e===h,isValidNot0:e=>!a.is0(e)&&a.isValid(e),isOdd:e=>(e&g)===g,neg:e=>q(-e,t),eql:(e,c)=>e===c,sqr:e=>q(e*e,t),add:(e,c)=>q(e+c,t),sub:(e,c)=>q(e-c,t),mul:(e,c)=>q(e*c,t),pow:(e,c)=>C(a,e,c),div:(e,c)=>q(e*y(c,t),t),sqrN:e=>e*e,addN:(e,c)=>e+c,subN:(e,c)=>e-c,mulN:(e,c)=>e*c,inv:e=>y(e,t),sqrt:f||(e=>(w||(w=z(t)),w(a,e))),toBytes:e=>r?v.numberToBytesLE(e,u):v.numberToBytesBE(e,u),fromBytes:(e,c=!0)=>{if(i){if(!i.includes(e.length)||e.length>u)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+e.length);const B=new Uint8Array(u);B.set(e,r?0:B.length-e.length),e=B}if(e.length!==u)throw new Error("Field.fromBytes: expected "+u+" bytes, got "+e.length);let m=r?v.bytesToNumberLE(e):v.bytesToNumberBE(e);if(d&&(m=q(m,t)),!c&&!a.isValid(m))throw new Error("invalid field element: outside of range 0..ORDER");return m},invertBatch:e=>H(a,e),cmov:(e,c,m)=>m?c:e});return Object.freeze(a)}function T(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const n=t.toString(2).length;return Math.ceil(n/8)}function Q(t){const n=T(t);return n+Math.ceil(n/2)}function X(t,n,r=!1){const o=t.length,l=T(n),f=Q(n);if(o<16||o<f||o>1024)throw new Error("expected "+f+"-1024 bytes of input, got "+o);const d=r?v.bytesToNumberLE(t):v.bytesToNumberBE(t),i=q(d,n-g)+g;return r?v.numberToBytesLE(i,l):v.numberToBytesBE(i,l)}exports.Field=_;exports.FpInvertBatch=H;exports.FpLegendre=N;exports.FpPow=C;exports.FpSqrt=z;exports.getFieldBytesLength=T;exports.getMinHashLength=Q;exports.invert=y;exports.mapHashToField=X;exports.mod=q;exports.nLength=K;exports.pow2=U;exports.tonelliShanks=S;exports.validateField=W;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const t=e();exports.idCache=t;
package/dist/index228.js CHANGED
@@ -1,247 +1,15 @@
1
- import { numberToBytesLE as _, numberToBytesBE as S, bitMask as K, bytesToNumberLE as x, bytesToNumberBE as T, _validateObject as Q } from "./index244.js";
2
- import { anumber as Y } from "./index233.js";
3
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
4
- const a = BigInt(0), g = BigInt(1), B = /* @__PURE__ */ BigInt(2), L = /* @__PURE__ */ BigInt(3), M = /* @__PURE__ */ BigInt(4), A = /* @__PURE__ */ BigInt(5), U = /* @__PURE__ */ BigInt(7), V = /* @__PURE__ */ BigInt(8), k = /* @__PURE__ */ BigInt(9), Z = /* @__PURE__ */ BigInt(16);
5
- function q(t, n) {
6
- const r = t % n;
7
- return r >= a ? r : n + r;
8
- }
9
- function F(t, n, r) {
10
- let o = t;
11
- for (; n-- > a; )
12
- o *= o, o %= r;
13
- return o;
14
- }
15
- function y(t, n) {
16
- if (t === a)
17
- throw new Error("invert: expected non-zero number");
18
- if (n <= a)
19
- throw new Error("invert: expected positive modulus, got " + n);
20
- let r = q(t, n), o = n, l = a, f = g;
21
- for (; r !== a; ) {
22
- const i = o / r, s = o % r, u = l - f * i;
23
- o = r, r = s, l = f, f = u;
24
- }
25
- if (o !== g)
26
- throw new Error("invert: does not exist");
27
- return q(l, n);
28
- }
29
- function b(t, n, r) {
30
- if (!t.eql(t.sqr(n), r))
31
- throw new Error("Cannot find square root");
32
- }
33
- function j(t, n) {
34
- const r = (t.ORDER + g) / M, o = t.pow(n, r);
35
- return b(t, o, n), o;
36
- }
37
- function G(t, n) {
38
- const r = (t.ORDER - A) / V, o = t.mul(n, B), l = t.pow(o, r), f = t.mul(n, l), d = t.mul(t.mul(f, B), l), i = t.mul(f, t.sub(d, t.ONE));
39
- return b(t, i, n), i;
40
- }
41
- function J(t) {
42
- const n = C(t), r = z(t), o = r(n, n.neg(n.ONE)), l = r(n, o), f = r(n, n.neg(o)), d = (t + U) / Z;
43
- return (i, s) => {
44
- let u = i.pow(s, d), h = i.mul(u, o);
45
- const w = i.mul(u, l), e = i.mul(u, f), c = i.eql(i.sqr(h), s), m = i.eql(i.sqr(w), s);
46
- u = i.cmov(u, h, c), h = i.cmov(e, w, m);
47
- const v = i.eql(i.sqr(h), s), E = i.cmov(u, h, v);
48
- return b(i, E, s), E;
49
- };
50
- }
51
- function z(t) {
52
- if (t < L)
53
- throw new Error("sqrt is not defined for small field");
54
- let n = t - g, r = 0;
55
- for (; n % B === a; )
56
- n /= B, r++;
57
- let o = B;
58
- const l = C(t);
59
- for (; I(l, o) === 1; )
60
- if (o++ > 1e3)
61
- throw new Error("Cannot find square root: probably non-prime P");
62
- if (r === 1)
63
- return j;
64
- let f = l.pow(o, n);
65
- const d = (n + g) / B;
66
- return function(s, u) {
67
- if (s.is0(u))
68
- return u;
69
- if (I(s, u) !== 1)
70
- throw new Error("Cannot find square root");
71
- let h = r, w = s.mul(s.ONE, f), e = s.pow(u, n), c = s.pow(u, d);
72
- for (; !s.eql(e, s.ONE); ) {
73
- if (s.is0(e))
74
- return s.ZERO;
75
- let m = 1, v = s.sqr(e);
76
- for (; !s.eql(v, s.ONE); )
77
- if (m++, v = s.sqr(v), m === h)
78
- throw new Error("Cannot find square root");
79
- const E = g << BigInt(h - m - 1), N = s.pow(w, E);
80
- h = m, w = s.sqr(N), e = s.mul(e, w), c = s.mul(c, N);
1
+ function r() {
2
+ return {
3
+ current: 0,
4
+ take() {
5
+ return this.current++;
6
+ },
7
+ reset() {
8
+ this.current = 0;
81
9
  }
82
- return c;
83
10
  };
84
11
  }
85
- function O(t) {
86
- return t % M === L ? j : t % V === A ? G : t % Z === k ? J(t) : z(t);
87
- }
88
- const W = [
89
- "create",
90
- "isValid",
91
- "is0",
92
- "neg",
93
- "inv",
94
- "sqrt",
95
- "sqr",
96
- "eql",
97
- "add",
98
- "sub",
99
- "mul",
100
- "pow",
101
- "div",
102
- "addN",
103
- "subN",
104
- "mulN",
105
- "sqrN"
106
- ];
107
- function tt(t) {
108
- const n = {
109
- ORDER: "bigint",
110
- MASK: "bigint",
111
- BYTES: "number",
112
- BITS: "number"
113
- }, r = W.reduce((o, l) => (o[l] = "function", o), n);
114
- return Q(t, r), t;
115
- }
116
- function X(t, n, r) {
117
- if (r < a)
118
- throw new Error("invalid exponent, negatives unsupported");
119
- if (r === a)
120
- return t.ONE;
121
- if (r === g)
122
- return n;
123
- let o = t.ONE, l = n;
124
- for (; r > a; )
125
- r & g && (o = t.mul(o, l)), l = t.sqr(l), r >>= g;
126
- return o;
127
- }
128
- function $(t, n, r = !1) {
129
- const o = new Array(n.length).fill(r ? t.ZERO : void 0), l = n.reduce((d, i, s) => t.is0(i) ? d : (o[s] = d, t.mul(d, i)), t.ONE), f = t.inv(l);
130
- return n.reduceRight((d, i, s) => t.is0(i) ? d : (o[s] = t.mul(d, o[s]), t.mul(d, i)), f), o;
131
- }
132
- function I(t, n) {
133
- const r = (t.ORDER - g) / B, o = t.pow(n, r), l = t.eql(o, t.ONE), f = t.eql(o, t.ZERO), d = t.eql(o, t.neg(t.ONE));
134
- if (!l && !f && !d)
135
- throw new Error("invalid Legendre symbol result");
136
- return l ? 1 : f ? 0 : -1;
137
- }
138
- function P(t, n) {
139
- n !== void 0 && Y(n);
140
- const r = n !== void 0 ? n : t.toString(2).length, o = Math.ceil(r / 8);
141
- return { nBitLength: r, nByteLength: o };
142
- }
143
- function C(t, n, r = !1, o = {}) {
144
- if (t <= a)
145
- throw new Error("invalid field: expected ORDER > 0, got " + t);
146
- let l, f, d = !1, i;
147
- if (typeof n == "object" && n != null) {
148
- if (o.sqrt || r)
149
- throw new Error("cannot specify opts in two arguments");
150
- const e = n;
151
- e.BITS && (l = e.BITS), e.sqrt && (f = e.sqrt), typeof e.isLE == "boolean" && (r = e.isLE), typeof e.modFromBytes == "boolean" && (d = e.modFromBytes), i = e.allowedLengths;
152
- } else
153
- typeof n == "number" && (l = n), o.sqrt && (f = o.sqrt);
154
- const { nBitLength: s, nByteLength: u } = P(t, l);
155
- if (u > 2048)
156
- throw new Error("invalid field: expected ORDER of <= 2048 bytes");
157
- let h;
158
- const w = Object.freeze({
159
- ORDER: t,
160
- isLE: r,
161
- BITS: s,
162
- BYTES: u,
163
- MASK: K(s),
164
- ZERO: a,
165
- ONE: g,
166
- allowedLengths: i,
167
- create: (e) => q(e, t),
168
- isValid: (e) => {
169
- if (typeof e != "bigint")
170
- throw new Error("invalid field element: expected bigint, got " + typeof e);
171
- return a <= e && e < t;
172
- },
173
- is0: (e) => e === a,
174
- // is valid and invertible
175
- isValidNot0: (e) => !w.is0(e) && w.isValid(e),
176
- isOdd: (e) => (e & g) === g,
177
- neg: (e) => q(-e, t),
178
- eql: (e, c) => e === c,
179
- sqr: (e) => q(e * e, t),
180
- add: (e, c) => q(e + c, t),
181
- sub: (e, c) => q(e - c, t),
182
- mul: (e, c) => q(e * c, t),
183
- pow: (e, c) => X(w, e, c),
184
- div: (e, c) => q(e * y(c, t), t),
185
- // Same as above, but doesn't normalize
186
- sqrN: (e) => e * e,
187
- addN: (e, c) => e + c,
188
- subN: (e, c) => e - c,
189
- mulN: (e, c) => e * c,
190
- inv: (e) => y(e, t),
191
- sqrt: f || ((e) => (h || (h = O(t)), h(w, e))),
192
- toBytes: (e) => r ? _(e, u) : S(e, u),
193
- fromBytes: (e, c = !0) => {
194
- if (i) {
195
- if (!i.includes(e.length) || e.length > u)
196
- throw new Error("Field.fromBytes: expected " + i + " bytes, got " + e.length);
197
- const v = new Uint8Array(u);
198
- v.set(e, r ? 0 : v.length - e.length), e = v;
199
- }
200
- if (e.length !== u)
201
- throw new Error("Field.fromBytes: expected " + u + " bytes, got " + e.length);
202
- let m = r ? x(e) : T(e);
203
- if (d && (m = q(m, t)), !c && !w.isValid(m))
204
- throw new Error("invalid field element: outside of range 0..ORDER");
205
- return m;
206
- },
207
- // TODO: we don't need it here, move out to separate fn
208
- invertBatch: (e) => $(w, e),
209
- // We can't move this out because Fp6, Fp12 implement it
210
- // and it's unclear what to return in there.
211
- cmov: (e, c, m) => m ? c : e
212
- });
213
- return Object.freeze(w);
214
- }
215
- function H(t) {
216
- if (typeof t != "bigint")
217
- throw new Error("field order must be bigint");
218
- const n = t.toString(2).length;
219
- return Math.ceil(n / 8);
220
- }
221
- function D(t) {
222
- const n = H(t);
223
- return n + Math.ceil(n / 2);
224
- }
225
- function et(t, n, r = !1) {
226
- const o = t.length, l = H(n), f = D(n);
227
- if (o < 16 || o < f || o > 1024)
228
- throw new Error("expected " + f + "-1024 bytes of input, got " + o);
229
- const d = r ? x(t) : T(t), i = q(d, n - g) + g;
230
- return r ? _(i, l) : S(i, l);
231
- }
12
+ const t = /* @__PURE__ */ r();
232
13
  export {
233
- C as Field,
234
- $ as FpInvertBatch,
235
- I as FpLegendre,
236
- X as FpPow,
237
- O as FpSqrt,
238
- H as getFieldBytesLength,
239
- D as getMinHashLength,
240
- y as invert,
241
- et as mapHashToField,
242
- q as mod,
243
- P as nLength,
244
- F as pow2,
245
- z as tonelliShanks,
246
- tt as validateField
14
+ t as idCache
247
15
  };
package/dist/index229.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index113.cjs"),r=require("./index129.cjs"),c=e=>r.keccak256(t.toBytes(e));function n(e){return c(e)}exports.hashSignature=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index160.cjs"),r=require("./index170.cjs"),c=e=>r.keccak256(t.toBytes(e));function n(e){return c(e)}exports.hashSignature=n;
package/dist/index229.js CHANGED
@@ -1,5 +1,5 @@
1
- import { toBytes as o } from "./index113.js";
2
- import { keccak256 as r } from "./index129.js";
1
+ import { toBytes as o } from "./index160.js";
2
+ import { keccak256 as r } from "./index170.js";
3
3
  const e = (t) => r(o(t));
4
4
  function c(t) {
5
5
  return e(t);
package/dist/index23.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index3.cjs");class i{constructor(e,t){this.maxRetries=Math.max(e,0),this.delay=t}async retry(e){let t=0,r;for(;t<this.maxRetries+1;)try{return await e()}catch(s){t++,r=s,await a.sleep(this.delay*t)}throw r}}exports.Retry=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index130.cjs"),c=require("./index132.cjs");function r(e){const{key:t="wallet",name:l="Wallet Client",transport:n}=e;return i.createClient({...e,key:t,name:l,transport:n,type:"walletClient"}).extend(c.walletActions)}exports.createWalletClient=r;
package/dist/index23.js CHANGED
@@ -1,29 +1,15 @@
1
- import { sleep as s } from "./index3.js";
2
- class l {
3
- /**
4
- * @param {number} maxRetries - The maximum number of retries, if less < 0 then it is set to 0
5
- * @param {number} delay - The delay between retries
6
- */
7
- constructor(e, t) {
8
- this.maxRetries = Math.max(e, 0), this.delay = t;
9
- }
10
- /**
11
- * Retries a function until it succeeds or the max number of retries is reached
12
- *
13
- * @param {() => Promise<T>} fn - The function to retry
14
- * @return {Promise<T>} a Promise that resolves to the result of the function
15
- */
16
- async retry(e) {
17
- let t = 0, r;
18
- for (; t < this.maxRetries + 1; )
19
- try {
20
- return await e();
21
- } catch (a) {
22
- t++, r = a, await s(this.delay * t);
23
- }
24
- throw r;
25
- }
1
+ import { createClient as i } from "./index130.js";
2
+ import { walletActions as o } from "./index132.js";
3
+ function m(t) {
4
+ const { key: e = "wallet", name: l = "Wallet Client", transport: n } = t;
5
+ return i({
6
+ ...t,
7
+ key: e,
8
+ name: l,
9
+ transport: n,
10
+ type: "walletClient"
11
+ }).extend(o);
26
12
  }
27
13
  export {
28
- l as Retry
14
+ m as createWalletClient
29
15
  };
package/dist/index230.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index231.cjs"),n=require("./index212.cjs"),i=t=>{const r=typeof t=="string"?t:n.formatAbiItem(t);return e.normalizeSignature(r)};exports.toSignature=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index234.cjs"),n=require("./index215.cjs"),i=t=>{const r=typeof t=="string"?t:n.formatAbiItem(t);return e.normalizeSignature(r)};exports.toSignature=i;
package/dist/index230.js CHANGED
@@ -1,5 +1,5 @@
1
- import { normalizeSignature as o } from "./index231.js";
2
- import { formatAbiItem as n } from "./index212.js";
1
+ import { normalizeSignature as o } from "./index234.js";
2
+ import { formatAbiItem as n } from "./index215.js";
3
3
  const m = (r) => {
4
4
  const t = typeof r == "string" ? r : n(r);
5
5
  return o(t);
package/dist/index231.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index38.cjs");function a(r){let l=!0,i="",o=0,t="",u=!1;for(let n=0;n<r.length;n++){const e=r[n];if(["(",")",","].includes(e)&&(l=!0),e==="("&&o++,e===")"&&o--,!!l){if(o===0){if(e===" "&&["event","function",""].includes(t))t="";else if(t+=e,e===")"){u=!0;break}continue}if(e===" "){r[n-1]!==","&&i!==","&&i!==",("&&(i="",l=!1);continue}t+=e,i+=e}}if(!u)throw new f.BaseError("Unable to normalize signature.");return t}exports.normalizeSignature=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=BigInt(2**32-1),c=BigInt(32);function u(t,o=!1){return o?{h:Number(t&l),l:Number(t>>c&l)}:{h:Number(t>>c&l)|0,l:Number(t&l)|0}}function B(t,o=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let e=0;e<r;e++){const{h:f,l:s}=u(t[e],o);[n[e],i[e]]=[f,s]}return[n,i]}const g=(t,o,r)=>t<<r|o>>>32-r,m=(t,o,r)=>o<<r|t>>>32-r,S=(t,o,r)=>o<<r-32|t>>>64-r,a=(t,o,r)=>t<<r-32|o>>>64-r;exports.fromBig=u;exports.rotlBH=S;exports.rotlBL=a;exports.rotlSH=g;exports.rotlSL=m;exports.split=B;
package/dist/index231.js CHANGED
@@ -1,29 +1,22 @@
1
- import { BaseError as u } from "./index38.js";
2
- function a(r) {
3
- let l = !0, i = "", f = 0, t = "", o = !1;
4
- for (let n = 0; n < r.length; n++) {
5
- const e = r[n];
6
- if (["(", ")", ","].includes(e) && (l = !0), e === "(" && f++, e === ")" && f--, !!l) {
7
- if (f === 0) {
8
- if (e === " " && ["event", "function", ""].includes(t))
9
- t = "";
10
- else if (t += e, e === ")") {
11
- o = !0;
12
- break;
13
- }
14
- continue;
15
- }
16
- if (e === " ") {
17
- r[n - 1] !== "," && i !== "," && i !== ",(" && (i = "", l = !1);
18
- continue;
19
- }
20
- t += e, i += e;
21
- }
1
+ const o = /* @__PURE__ */ BigInt(4294967295), i = /* @__PURE__ */ BigInt(32);
2
+ function s(t, r = !1) {
3
+ return r ? { h: Number(t & o), l: Number(t >> i & o) } : { h: Number(t >> i & o) | 0, l: Number(t & o) | 0 };
4
+ }
5
+ function h(t, r = !1) {
6
+ const n = t.length;
7
+ let l = new Uint32Array(n), c = new Uint32Array(n);
8
+ for (let e = 0; e < n; e++) {
9
+ const { h: u, l: f } = s(t[e], r);
10
+ [l[e], c[e]] = [u, f];
22
11
  }
23
- if (!o)
24
- throw new u("Unable to normalize signature.");
25
- return t;
12
+ return [l, c];
26
13
  }
14
+ const m = (t, r, n) => t << n | r >>> 32 - n, A = (t, r, n) => r << n | t >>> 32 - n, B = (t, r, n) => r << n - 32 | t >>> 64 - n, a = (t, r, n) => t << n - 32 | r >>> 64 - n;
27
15
  export {
28
- a as normalizeSignature
16
+ s as fromBig,
17
+ B as rotlBH,
18
+ a as rotlBL,
19
+ m as rotlSH,
20
+ A as rotlSL,
21
+ h as split
29
22
  };
package/dist/index232.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=BigInt(2**32-1),c=BigInt(32);function u(t,o=!1){return o?{h:Number(t&l),l:Number(t>>c&l)}:{h:Number(t>>c&l)|0,l:Number(t&l)|0}}function B(t,o=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let e=0;e<r;e++){const{h:f,l:s}=u(t[e],o);[n[e],i[e]]=[f,s]}return[n,i]}const g=(t,o,r)=>t<<r|o>>>32-r,m=(t,o,r)=>o<<r|t>>>32-r,S=(t,o,r)=>o<<r-32|t>>>64-r,a=(t,o,r)=>t<<r-32|o>>>64-r;exports.fromBig=u;exports.rotlBH=S;exports.rotlBL=a;exports.rotlSH=g;exports.rotlSL=m;exports.split=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index239.cjs");/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function s(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function u(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function f(t,...e){if(!s(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function h(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");u(t.outputLen),u(t.blockLen)}function g(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function b(t,e){f(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function d(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function m(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function B(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function x(t,e){return t<<32-e|t>>>e}const a=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function y(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function p(t){for(let e=0;e<t.length;e++)t[e]=y(t[e]);return t}const E=a?t=>t:p;function l(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function w(t){return typeof t=="string"&&(t=l(t)),f(t),t}function A(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];f(i),e+=i.length}const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const c=t[n];r.set(c,i),i+=c.length}return r}class U{}function L(t){const e=n=>t().update(w(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function H(t=32){if(o.crypto&&typeof o.crypto.getRandomValues=="function")return o.crypto.getRandomValues(new Uint8Array(t));if(o.crypto&&typeof o.crypto.randomBytes=="function")return Uint8Array.from(o.crypto.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}exports.Hash=U;exports.abytes=f;exports.aexists=g;exports.ahash=h;exports.anumber=u;exports.aoutput=b;exports.byteSwap=y;exports.byteSwap32=p;exports.clean=m;exports.concatBytes=A;exports.createHasher=L;exports.createView=B;exports.isBytes=s;exports.isLE=a;exports.randomBytes=H;exports.rotr=x;exports.swap32IfBE=E;exports.toBytes=w;exports.u32=d;exports.utf8ToBytes=l;