@gardenfi/utils 2.1.2 → 2.1.3-beta.1

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 (617) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +20 -20
  3. package/dist/index100.cjs +1 -1
  4. package/dist/index100.js +11 -3
  5. package/dist/index101.cjs +1 -1
  6. package/dist/index101.js +5 -11
  7. package/dist/index102.cjs +1 -1
  8. package/dist/index102.js +14 -19
  9. package/dist/index103.cjs +1 -1
  10. package/dist/index103.js +3 -8
  11. package/dist/index104.cjs +1 -1
  12. package/dist/index104.js +26 -18
  13. package/dist/index105.cjs +1 -1
  14. package/dist/index105.js +4 -643
  15. package/dist/index106.cjs +1 -1
  16. package/dist/index106.js +6 -172
  17. package/dist/index107.cjs +1 -1
  18. package/dist/index107.js +57 -10
  19. package/dist/index108.cjs +1 -1
  20. package/dist/index108.js +122 -124
  21. package/dist/index109.cjs +1 -2
  22. package/dist/index109.js +8 -3
  23. package/dist/index110.cjs +1 -1
  24. package/dist/index110.js +22 -2
  25. package/dist/index111.cjs +1 -1
  26. package/dist/index111.js +18 -2
  27. package/dist/index112.cjs +1 -1
  28. package/dist/index112.js +39 -36
  29. package/dist/index113.cjs +1 -1
  30. package/dist/index113.js +20 -37
  31. package/dist/index114.cjs +1 -1
  32. package/dist/index114.js +12 -5
  33. package/dist/index115.cjs +1 -1
  34. package/dist/index115.js +6 -10
  35. package/dist/index116.cjs +1 -1
  36. package/dist/index116.js +106 -6
  37. package/dist/index117.cjs +1 -1
  38. package/dist/index117.js +3 -21
  39. package/dist/index118.cjs +1 -1
  40. package/dist/index118.js +4 -5
  41. package/dist/index119.cjs +1 -0
  42. package/dist/index119.js +11 -0
  43. package/dist/index120.cjs +1 -0
  44. package/dist/index120.js +4 -0
  45. package/dist/index121.cjs +2 -0
  46. package/dist/index121.js +5 -0
  47. package/dist/index122.cjs +20 -0
  48. package/dist/index122.js +329 -0
  49. package/dist/index123.cjs +1 -0
  50. package/dist/index123.js +16 -0
  51. package/dist/index124.cjs +1 -0
  52. package/dist/index124.js +7 -0
  53. package/dist/index125.cjs +1 -0
  54. package/dist/index125.js +4 -0
  55. package/dist/index126.cjs +1 -0
  56. package/dist/index126.js +10 -0
  57. package/dist/index127.cjs +3 -0
  58. package/dist/index127.js +218 -0
  59. package/dist/index128.cjs +1 -0
  60. package/dist/index128.js +34 -0
  61. package/dist/index129.cjs +1 -0
  62. package/dist/index129.js +24 -0
  63. package/dist/index130.cjs +1 -0
  64. package/dist/index130.js +8 -0
  65. package/dist/index131.cjs +1 -0
  66. package/dist/index131.js +76 -0
  67. package/dist/index132.cjs +1 -0
  68. package/dist/index132.js +8 -0
  69. package/dist/index133.cjs +1 -0
  70. package/dist/index133.js +8 -0
  71. package/dist/index134.cjs +9 -0
  72. package/dist/index134.js +38 -0
  73. package/dist/index135.cjs +3 -0
  74. package/dist/index135.js +113 -0
  75. package/dist/index136.cjs +1 -0
  76. package/dist/index136.js +5 -0
  77. package/dist/index137.cjs +1 -0
  78. package/dist/index137.js +26 -0
  79. package/dist/index138.cjs +3 -0
  80. package/dist/index138.js +454 -0
  81. package/dist/index139.cjs +2 -0
  82. package/dist/index139.js +57 -0
  83. package/dist/index140.cjs +1 -0
  84. package/dist/index140.js +29 -0
  85. package/dist/index141.cjs +1 -0
  86. package/dist/index141.js +36 -0
  87. package/dist/index142.cjs +1 -0
  88. package/dist/index142.js +38 -0
  89. package/dist/index143.cjs +4 -0
  90. package/dist/index143.js +197 -0
  91. package/dist/index144.cjs +1 -0
  92. package/dist/index144.js +11 -0
  93. package/dist/index145.cjs +1 -0
  94. package/dist/index145.js +15 -0
  95. package/dist/index146.cjs +1 -0
  96. package/dist/index146.js +21 -0
  97. package/dist/index147.cjs +1 -0
  98. package/dist/index147.js +30 -0
  99. package/dist/index148.cjs +1 -0
  100. package/dist/index148.js +11 -0
  101. package/dist/index149.cjs +1 -0
  102. package/dist/index149.js +58 -0
  103. package/dist/index15.cjs +1 -1
  104. package/dist/index15.js +19 -18
  105. package/dist/index150.cjs +1 -0
  106. package/dist/index150.js +48 -0
  107. package/dist/index151.cjs +1 -0
  108. package/dist/index151.js +11 -0
  109. package/dist/index152.cjs +1 -0
  110. package/dist/index152.js +10 -0
  111. package/dist/index153.cjs +1 -0
  112. package/dist/index153.js +19 -0
  113. package/dist/index154.cjs +1 -0
  114. package/dist/index154.js +21 -0
  115. package/dist/index155.cjs +1 -0
  116. package/dist/index155.js +24 -0
  117. package/dist/index156.cjs +1 -0
  118. package/dist/index156.js +54 -0
  119. package/dist/index157.cjs +1 -0
  120. package/dist/index157.js +14 -0
  121. package/dist/index158.cjs +1 -0
  122. package/dist/index158.js +164 -0
  123. package/dist/index159.cjs +1 -0
  124. package/dist/index159.js +24 -0
  125. package/dist/index160.cjs +1 -0
  126. package/dist/index160.js +130 -0
  127. package/dist/index161.cjs +1 -0
  128. package/dist/index161.js +41 -0
  129. package/dist/index162.cjs +1 -0
  130. package/dist/index162.js +9 -0
  131. package/dist/index163.cjs +1 -0
  132. package/dist/index163.js +30 -0
  133. package/dist/index164.cjs +1 -0
  134. package/dist/index164.js +194 -0
  135. package/dist/index165.cjs +1 -0
  136. package/dist/index165.js +6 -0
  137. package/dist/index166.cjs +1 -0
  138. package/dist/index166.js +65 -0
  139. package/dist/index167.cjs +1 -0
  140. package/dist/index167.js +5 -0
  141. package/dist/index168.cjs +1 -0
  142. package/dist/index168.js +23 -0
  143. package/dist/index169.cjs +1 -0
  144. package/dist/index169.js +19 -0
  145. package/dist/index170.cjs +1 -0
  146. package/dist/index170.js +26 -0
  147. package/dist/index171.cjs +1 -0
  148. package/dist/index171.js +14 -0
  149. package/dist/index172.cjs +1 -0
  150. package/dist/index172.js +37 -0
  151. package/dist/index173.cjs +1 -0
  152. package/dist/index173.js +5 -0
  153. package/dist/index174.cjs +1 -0
  154. package/dist/index174.js +21 -0
  155. package/dist/index175.cjs +1 -0
  156. package/dist/index175.js +30 -0
  157. package/dist/index176.cjs +1 -0
  158. package/dist/index176.js +39 -0
  159. package/dist/index177.cjs +1 -0
  160. package/dist/index177.js +13 -0
  161. package/dist/index178.cjs +1 -0
  162. package/dist/index178.js +28 -0
  163. package/dist/index179.cjs +1 -0
  164. package/dist/index179.js +31 -0
  165. package/dist/index18.cjs +1 -1
  166. package/dist/index18.js +120 -93
  167. package/dist/index180.cjs +1 -0
  168. package/dist/index180.js +68 -0
  169. package/dist/index181.cjs +1 -0
  170. package/dist/index181.js +12 -0
  171. package/dist/index182.cjs +1 -0
  172. package/dist/index182.js +36 -0
  173. package/dist/index183.cjs +1 -0
  174. package/dist/index183.js +27 -0
  175. package/dist/index184.cjs +1 -0
  176. package/dist/index184.js +27 -0
  177. package/dist/index185.cjs +1 -0
  178. package/dist/index185.js +6 -0
  179. package/dist/index186.cjs +1 -0
  180. package/dist/index186.js +17 -0
  181. package/dist/index187.cjs +1 -0
  182. package/dist/index187.js +106 -0
  183. package/dist/index188.cjs +1 -0
  184. package/dist/index188.js +83 -0
  185. package/dist/index189.cjs +1 -0
  186. package/dist/index189.js +8 -0
  187. package/dist/index19.cjs +1 -1
  188. package/dist/index19.js +2 -36
  189. package/dist/index190.cjs +1 -0
  190. package/dist/index190.js +9 -0
  191. package/dist/index191.cjs +1 -0
  192. package/dist/index191.js +30 -0
  193. package/dist/index192.cjs +1 -0
  194. package/dist/index192.js +40 -0
  195. package/dist/index193.cjs +1 -0
  196. package/dist/index193.js +16 -0
  197. package/dist/index194.cjs +1 -0
  198. package/dist/index194.js +45 -0
  199. package/dist/index195.cjs +1 -0
  200. package/dist/index195.js +8 -0
  201. package/dist/index196.cjs +1 -0
  202. package/dist/index196.js +14 -0
  203. package/dist/index197.cjs +1 -0
  204. package/dist/index197.js +22 -0
  205. package/dist/index198.cjs +1 -0
  206. package/dist/index198.js +81 -0
  207. package/dist/index199.cjs +1 -0
  208. package/dist/index199.js +4 -0
  209. package/dist/index20.cjs +1 -1
  210. package/dist/index20.js +13 -32
  211. package/dist/index200.cjs +1 -0
  212. package/dist/index200.js +40 -0
  213. package/dist/index201.cjs +1 -0
  214. package/dist/index201.js +114 -0
  215. package/dist/index202.cjs +1 -0
  216. package/dist/index202.js +52 -0
  217. package/dist/index203.cjs +1 -0
  218. package/dist/index203.js +35 -0
  219. package/dist/index204.cjs +1 -0
  220. package/dist/index204.js +11 -0
  221. package/dist/index205.cjs +1 -0
  222. package/dist/index205.js +9 -0
  223. package/dist/index206.cjs +1 -0
  224. package/dist/index206.js +9 -0
  225. package/dist/index207.cjs +1 -0
  226. package/dist/index207.js +14 -0
  227. package/dist/index208.cjs +1 -0
  228. package/dist/index208.js +13 -0
  229. package/dist/index209.cjs +1 -0
  230. package/dist/index209.js +16 -0
  231. package/dist/index21.cjs +1 -16
  232. package/dist/index21.js +461 -111
  233. package/dist/index210.cjs +1 -0
  234. package/dist/index210.js +35 -0
  235. package/dist/index211.cjs +1 -0
  236. package/dist/index211.js +7 -0
  237. package/dist/index212.cjs +1 -0
  238. package/dist/index212.js +10 -0
  239. package/dist/index213.cjs +1 -0
  240. package/dist/index213.js +11 -0
  241. package/dist/index214.cjs +1 -0
  242. package/dist/index214.js +23 -0
  243. package/dist/index215.cjs +1 -0
  244. package/dist/index215.js +34 -0
  245. package/dist/index216.cjs +1 -0
  246. package/dist/index216.js +23 -0
  247. package/dist/index217.cjs +1 -0
  248. package/dist/index217.js +6 -0
  249. package/dist/index218.cjs +1 -0
  250. package/dist/index218.js +20 -0
  251. package/dist/index219.cjs +1 -0
  252. package/dist/index219.js +13 -0
  253. package/dist/index22.cjs +1 -1
  254. package/dist/index22.js +36 -31
  255. package/dist/index220.cjs +1 -0
  256. package/dist/index220.js +24 -0
  257. package/dist/index221.cjs +1 -0
  258. package/dist/index221.js +25 -0
  259. package/dist/index222.cjs +1 -0
  260. package/dist/index222.js +8 -0
  261. package/dist/index223.cjs +1 -0
  262. package/dist/index223.js +8 -0
  263. package/dist/index224.cjs +1 -0
  264. package/dist/index224.js +11 -0
  265. package/dist/index225.cjs +1 -0
  266. package/dist/index225.js +107 -0
  267. package/dist/index226.cjs +1 -0
  268. package/dist/index226.js +115 -0
  269. package/dist/index227.cjs +1 -0
  270. package/dist/index227.js +21 -0
  271. package/dist/index228.cjs +1 -0
  272. package/dist/index228.js +174 -0
  273. package/dist/index229.cjs +1 -0
  274. package/dist/index229.js +20 -0
  275. package/dist/index23.cjs +1 -1
  276. package/dist/index23.js +30 -41
  277. package/dist/index230.cjs +1 -0
  278. package/dist/index230.js +13 -0
  279. package/dist/index231.cjs +1 -0
  280. package/dist/index231.js +19 -0
  281. package/dist/index232.cjs +1 -0
  282. package/dist/index232.js +25 -0
  283. package/dist/index233.cjs +1 -0
  284. package/dist/index233.js +33 -0
  285. package/dist/index234.cjs +1 -0
  286. package/dist/index234.js +4 -0
  287. package/dist/index235.cjs +1 -0
  288. package/dist/index235.js +16 -0
  289. package/dist/index236.cjs +1 -0
  290. package/dist/index236.js +15 -0
  291. package/dist/index237.cjs +1 -0
  292. package/dist/index237.js +50 -0
  293. package/dist/index238.cjs +1 -0
  294. package/dist/index238.js +14 -0
  295. package/dist/index239.cjs +1 -0
  296. package/dist/index239.js +10 -0
  297. package/dist/index24.cjs +1 -1
  298. package/dist/index24.js +31 -45
  299. package/dist/index240.cjs +1 -0
  300. package/dist/index240.js +12 -0
  301. package/dist/index241.cjs +1 -0
  302. package/dist/index241.js +16 -0
  303. package/dist/index242.cjs +1 -0
  304. package/dist/index242.js +17 -0
  305. package/dist/index243.cjs +1 -0
  306. package/dist/index243.js +12 -0
  307. package/dist/index244.cjs +1 -0
  308. package/dist/index244.js +27 -0
  309. package/dist/index245.cjs +1 -0
  310. package/dist/index245.js +15 -0
  311. package/dist/index246.cjs +1 -0
  312. package/dist/index246.js +27 -0
  313. package/dist/index247.cjs +2 -0
  314. package/dist/index247.js +27 -0
  315. package/dist/index248.cjs +1 -0
  316. package/dist/index248.js +16 -0
  317. package/dist/index249.cjs +1 -0
  318. package/dist/index249.js +18 -0
  319. package/dist/index25.cjs +1 -1
  320. package/dist/index25.js +11 -25
  321. package/dist/index250.cjs +1 -0
  322. package/dist/index250.js +55 -0
  323. package/dist/index251.cjs +1 -0
  324. package/dist/index251.js +28 -0
  325. package/dist/index252.cjs +1 -0
  326. package/dist/index252.js +16 -0
  327. package/dist/index253.cjs +1 -0
  328. package/dist/index253.js +18 -0
  329. package/dist/index254.cjs +1 -0
  330. package/dist/index254.js +8 -0
  331. package/dist/index255.cjs +1 -0
  332. package/dist/index255.js +16 -0
  333. package/dist/index256.cjs +1 -0
  334. package/dist/index256.js +13 -0
  335. package/dist/index257.cjs +1 -0
  336. package/dist/index257.js +19 -0
  337. package/dist/index258.cjs +2 -0
  338. package/dist/index258.js +44 -0
  339. package/dist/index259.cjs +1 -0
  340. package/dist/index259.js +4 -0
  341. package/dist/index26.cjs +1 -1
  342. package/dist/index26.js +57 -6
  343. package/dist/index260.cjs +1 -0
  344. package/dist/index260.js +8 -0
  345. package/dist/index261.cjs +1 -0
  346. package/dist/index261.js +13 -0
  347. package/dist/index262.cjs +1 -0
  348. package/dist/index262.js +22 -0
  349. package/dist/index263.cjs +1 -0
  350. package/dist/index263.js +11 -0
  351. package/dist/index264.cjs +1 -0
  352. package/dist/index264.js +69 -0
  353. package/dist/index265.cjs +1 -0
  354. package/dist/index265.js +68 -0
  355. package/dist/index266.cjs +1 -0
  356. package/dist/index266.js +189 -0
  357. package/dist/index267.cjs +1 -0
  358. package/dist/index267.js +25 -0
  359. package/dist/index268.cjs +1 -0
  360. package/dist/index268.js +45 -0
  361. package/dist/index269.cjs +1 -0
  362. package/dist/index269.js +79 -0
  363. package/dist/index27.cjs +1 -1
  364. package/dist/index27.js +12 -13
  365. package/dist/index270.cjs +1 -0
  366. package/dist/index270.js +43 -0
  367. package/dist/index271.cjs +1 -0
  368. package/dist/index271.js +19 -0
  369. package/dist/index272.cjs +1 -0
  370. package/dist/index272.js +16 -0
  371. package/dist/index273.cjs +1 -0
  372. package/dist/index273.js +15 -0
  373. package/dist/index274.cjs +2 -0
  374. package/dist/index274.js +21 -0
  375. package/dist/index275.cjs +1 -0
  376. package/dist/index275.js +17 -0
  377. package/dist/index276.cjs +1 -0
  378. package/dist/index276.js +14 -0
  379. package/dist/index277.cjs +1 -0
  380. package/dist/index277.js +19 -0
  381. package/dist/index278.cjs +1 -0
  382. package/dist/index278.js +226 -0
  383. package/dist/index279.cjs +1 -0
  384. package/dist/index279.js +9 -0
  385. package/dist/index28.cjs +16 -1
  386. package/dist/index28.js +113 -15
  387. package/dist/index280.cjs +1 -0
  388. package/dist/index280.js +9 -0
  389. package/dist/index281.cjs +1 -0
  390. package/dist/index281.js +29 -0
  391. package/dist/index282.cjs +1 -0
  392. package/dist/index282.js +37 -0
  393. package/dist/index283.cjs +1 -0
  394. package/dist/index283.js +21 -0
  395. package/dist/index284.cjs +1 -0
  396. package/dist/index284.js +73 -0
  397. package/dist/index285.cjs +1 -0
  398. package/dist/index285.js +70 -0
  399. package/dist/index286.cjs +1 -0
  400. package/dist/index286.js +6 -0
  401. package/dist/index287.cjs +1 -0
  402. package/dist/index287.js +143 -0
  403. package/dist/index288.cjs +1 -0
  404. package/dist/index288.js +158 -0
  405. package/dist/index289.cjs +1 -0
  406. package/dist/index289.js +12 -0
  407. package/dist/index29.cjs +1 -1
  408. package/dist/index29.js +7 -5
  409. package/dist/index290.cjs +1 -0
  410. package/dist/index290.js +116 -0
  411. package/dist/index291.cjs +2 -0
  412. package/dist/index291.js +137 -0
  413. package/dist/index292.cjs +1 -0
  414. package/dist/index292.js +43 -0
  415. package/dist/index293.cjs +1 -0
  416. package/dist/index293.js +4 -0
  417. package/dist/index294.cjs +1 -0
  418. package/dist/index294.js +209 -0
  419. package/dist/index295.cjs +1 -0
  420. package/dist/index295.js +71 -0
  421. package/dist/index296.cjs +1 -0
  422. package/dist/index296.js +14 -0
  423. package/dist/index297.cjs +1 -0
  424. package/dist/index297.js +22 -0
  425. package/dist/index298.cjs +1 -0
  426. package/dist/index298.js +645 -0
  427. package/dist/index299.cjs +1 -0
  428. package/dist/index299.js +175 -0
  429. package/dist/index3.cjs +1 -1
  430. package/dist/index3.js +1 -1
  431. package/dist/index30.cjs +1 -1
  432. package/dist/index30.js +30 -12
  433. package/dist/index300.cjs +2 -0
  434. package/dist/index300.js +69 -0
  435. package/dist/index301.cjs +1 -0
  436. package/dist/index301.js +7 -0
  437. package/dist/index302.cjs +1 -0
  438. package/dist/index302.js +43 -0
  439. package/dist/index303.cjs +1 -0
  440. package/dist/index303.js +10 -0
  441. package/dist/index304.cjs +1 -0
  442. package/dist/index304.js +65 -0
  443. package/dist/index305.cjs +1 -0
  444. package/dist/index305.js +80 -0
  445. package/dist/index306.cjs +1 -0
  446. package/dist/index306.js +6 -0
  447. package/dist/index307.cjs +1 -0
  448. package/dist/index307.js +197 -0
  449. package/dist/index308.cjs +1 -0
  450. package/dist/index308.js +66 -0
  451. package/dist/index309.cjs +1 -0
  452. package/dist/index309.js +47 -0
  453. package/dist/index31.cjs +1 -1
  454. package/dist/index31.js +28 -9
  455. package/dist/index310.cjs +1 -0
  456. package/dist/index310.js +7 -0
  457. package/dist/index311.cjs +1 -0
  458. package/dist/index311.js +107 -0
  459. package/dist/index312.cjs +1 -0
  460. package/dist/index312.js +7 -0
  461. package/dist/index313.cjs +1 -0
  462. package/dist/index313.js +4 -0
  463. package/dist/index314.cjs +1 -0
  464. package/dist/index314.js +22 -0
  465. package/dist/index315.cjs +1 -0
  466. package/dist/index315.js +74 -0
  467. package/dist/index316.cjs +1 -0
  468. package/dist/index316.js +24 -0
  469. package/dist/index32.cjs +1 -1
  470. package/dist/index32.js +16 -12
  471. package/dist/index33.cjs +1 -1
  472. package/dist/index33.js +33 -11
  473. package/dist/index34.cjs +1 -1
  474. package/dist/index34.js +44 -13
  475. package/dist/index35.cjs +1 -1
  476. package/dist/index35.js +150 -22
  477. package/dist/index36.cjs +1 -1
  478. package/dist/index36.js +34 -54
  479. package/dist/index37.cjs +1 -1
  480. package/dist/index37.js +38 -16
  481. package/dist/index38.cjs +2 -1
  482. package/dist/index38.js +59 -5
  483. package/dist/index39.cjs +1 -1
  484. package/dist/index39.js +32 -8
  485. package/dist/index4.cjs +1 -1
  486. package/dist/index4.js +42 -25
  487. package/dist/index40.cjs +1 -1
  488. package/dist/index40.js +15 -171
  489. package/dist/index41.cjs +1 -1
  490. package/dist/index41.js +7 -102
  491. package/dist/index42.cjs +1 -1
  492. package/dist/index42.js +2 -22
  493. package/dist/index43.cjs +1 -1
  494. package/dist/index43.js +26 -17
  495. package/dist/index44.cjs +1 -1
  496. package/dist/index44.js +30 -6
  497. package/dist/index45.cjs +1 -1
  498. package/dist/index45.js +3 -21
  499. package/dist/index46.cjs +1 -1
  500. package/dist/index46.js +9 -8
  501. package/dist/index47.cjs +1 -1
  502. package/dist/index47.js +66 -29
  503. package/dist/index48.cjs +1 -1
  504. package/dist/index48.js +8 -25
  505. package/dist/index49.cjs +1 -2
  506. package/dist/index49.js +27 -64
  507. package/dist/index5.cjs +1 -1
  508. package/dist/index5.js +19 -47
  509. package/dist/index50.cjs +1 -1
  510. package/dist/index50.js +70 -50
  511. package/dist/index51.cjs +1 -1
  512. package/dist/index51.js +19 -12
  513. package/dist/index52.cjs +1 -1
  514. package/dist/index52.js +109 -23
  515. package/dist/index53.cjs +1 -1
  516. package/dist/index53.js +59 -74
  517. package/dist/index54.cjs +1 -1
  518. package/dist/index54.js +24 -7
  519. package/dist/index55.cjs +1 -1
  520. package/dist/index55.js +40 -32
  521. package/dist/index56.cjs +1 -1
  522. package/dist/index56.js +37 -15
  523. package/dist/index57.cjs +1 -1
  524. package/dist/index57.js +59 -2
  525. package/dist/index58.cjs +1 -1
  526. package/dist/index58.js +165 -8
  527. package/dist/index59.cjs +1 -1
  528. package/dist/index59.js +39 -19
  529. package/dist/index6.cjs +1 -1
  530. package/dist/index6.js +1 -1
  531. package/dist/index60.cjs +1 -1
  532. package/dist/index60.js +9 -40
  533. package/dist/index61.cjs +1 -1
  534. package/dist/index61.js +36 -34
  535. package/dist/index62.cjs +1 -1
  536. package/dist/index62.js +9 -69
  537. package/dist/index63.cjs +1 -1
  538. package/dist/index63.js +48 -110
  539. package/dist/index64.cjs +1 -1
  540. package/dist/index64.js +83 -65
  541. package/dist/index65.cjs +1 -1
  542. package/dist/index65.js +42 -2
  543. package/dist/index66.cjs +1 -1
  544. package/dist/index66.js +8 -16
  545. package/dist/index67.cjs +1 -1
  546. package/dist/index67.js +5 -222
  547. package/dist/index68.cjs +1 -1
  548. package/dist/index68.js +17 -231
  549. package/dist/index69.cjs +1 -1
  550. package/dist/index69.js +8 -12
  551. package/dist/index70.cjs +1 -1
  552. package/dist/index70.js +13 -34
  553. package/dist/index71.cjs +1 -2
  554. package/dist/index71.js +7 -59
  555. package/dist/index72.cjs +1 -1
  556. package/dist/index72.js +9 -21
  557. package/dist/index73.cjs +1 -1
  558. package/dist/index73.js +46 -18
  559. package/dist/index74.cjs +1 -1
  560. package/dist/index74.js +13 -42
  561. package/dist/index75.cjs +1 -1
  562. package/dist/index75.js +16 -8
  563. package/dist/index76.cjs +1 -1
  564. package/dist/index76.js +13 -104
  565. package/dist/index77.cjs +1 -1
  566. package/dist/index77.js +6 -3
  567. package/dist/index78.cjs +1 -1
  568. package/dist/index78.js +35 -17
  569. package/dist/index79.cjs +1 -1
  570. package/dist/index79.js +9 -8
  571. package/dist/index80.cjs +1 -1
  572. package/dist/index80.js +8 -10
  573. package/dist/index81.cjs +1 -1
  574. package/dist/index81.js +26 -11
  575. package/dist/index82.cjs +1 -1
  576. package/dist/index82.js +10 -13
  577. package/dist/index83.cjs +1 -1
  578. package/dist/index83.js +14 -6
  579. package/dist/index84.cjs +1 -1
  580. package/dist/index84.js +111 -74
  581. package/dist/index85.cjs +1 -1
  582. package/dist/index85.js +80 -14
  583. package/dist/index86.cjs +1 -1
  584. package/dist/index86.js +180 -17
  585. package/dist/index87.cjs +1 -1
  586. package/dist/index87.js +5 -190
  587. package/dist/index88.cjs +1 -1
  588. package/dist/index88.js +13 -64
  589. package/dist/index89.cjs +1 -1
  590. package/dist/index89.js +13 -4
  591. package/dist/index9.cjs +1 -1
  592. package/dist/index9.js +17 -16
  593. package/dist/index90.cjs +1 -1
  594. package/dist/index90.js +94 -2
  595. package/dist/index91.cjs +1 -1
  596. package/dist/index91.js +75 -6
  597. package/dist/index92.cjs +1 -1
  598. package/dist/index92.js +88 -11
  599. package/dist/index93.cjs +1 -5
  600. package/dist/index93.js +137 -55
  601. package/dist/index94.cjs +1 -2
  602. package/dist/index94.js +68 -33
  603. package/dist/index95.cjs +1 -1
  604. package/dist/index95.js +23 -5
  605. package/dist/index96.cjs +1 -1
  606. package/dist/index96.js +109 -3
  607. package/dist/index97.cjs +1 -1
  608. package/dist/index97.js +6 -6
  609. package/dist/index98.cjs +1 -1
  610. package/dist/index98.js +50 -32
  611. package/dist/index99.cjs +1 -1
  612. package/dist/index99.js +16 -27
  613. package/dist/src/lib/approve.d.ts +2 -1
  614. package/dist/src/lib/digestKey/digestKey.d.ts +4 -2
  615. package/dist/src/lib/result.d.ts +13 -9
  616. package/dist/src/lib/utils.d.ts +3 -2
  617. package/package.json +2 -3
package/dist/index67.js CHANGED
@@ -1,226 +1,9 @@
1
- import { numberToBytesLE as S, numberToBytesBE as x, bitMask as _, bytesToNumberLE as y, bytesToNumberBE as L, validateObject as M } from "./index68.js";
2
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
3
- const d = BigInt(0), c = BigInt(1), w = /* @__PURE__ */ BigInt(2), C = /* @__PURE__ */ BigInt(3), b = /* @__PURE__ */ BigInt(4), N = /* @__PURE__ */ BigInt(5), m = /* @__PURE__ */ BigInt(8);
4
- function g(t, i) {
5
- const r = t % i;
6
- return r >= d ? r : i + r;
7
- }
8
- function Z(t, i, r) {
9
- if (i < d)
10
- throw new Error("invalid exponent, negatives unsupported");
11
- if (r <= d)
12
- throw new Error("invalid modulus");
13
- if (r === c)
14
- return d;
15
- let e = c;
16
- for (; i > d; )
17
- i & c && (e = e * t % r), t = t * t % r, i >>= c;
18
- return e;
19
- }
20
- function V(t, i, r) {
21
- let e = t;
22
- for (; i-- > d; )
23
- e *= e, e %= r;
24
- return e;
25
- }
26
- function I(t, i) {
27
- if (t === d)
28
- throw new Error("invert: expected non-zero number");
29
- if (i <= d)
30
- throw new Error("invert: expected positive modulus, got " + i);
31
- let r = g(t, i), e = i, s = d, u = c;
32
- for (; r !== d; ) {
33
- const o = e / r, n = e % r, l = s - u * o;
34
- e = r, r = n, s = u, u = l;
35
- }
36
- if (e !== c)
37
- throw new Error("invert: does not exist");
38
- return g(s, i);
39
- }
40
- function j(t) {
41
- const i = (t - c) / w;
42
- let r, e, s;
43
- for (r = t - c, e = 0; r % w === d; r /= w, e++)
44
- ;
45
- for (s = w; s < t && Z(s, i, t) !== t - c; s++)
46
- if (s > 1e3)
47
- throw new Error("Cannot find square root: likely non-prime P");
48
- if (e === 1) {
49
- const f = (t + c) / b;
50
- return function(n, l) {
51
- const h = n.pow(l, f);
52
- if (!n.eql(n.sqr(h), l))
53
- throw new Error("Cannot find square root");
54
- return h;
55
- };
56
- }
57
- const u = (r + c) / w;
58
- return function(o, n) {
59
- if (o.pow(n, i) === o.neg(o.ONE))
60
- throw new Error("Cannot find square root");
61
- let l = e, h = o.pow(o.mul(o.ONE, s), r), v = o.pow(n, u), a = o.pow(n, r);
62
- for (; !o.eql(a, o.ONE); ) {
63
- if (o.eql(a, o.ZERO))
64
- return o.ZERO;
65
- let q = 1;
66
- for (let B = o.sqr(a); q < l && !o.eql(B, o.ONE); q++)
67
- B = o.sqr(B);
68
- const E = o.pow(h, c << BigInt(l - q - 1));
69
- h = o.sqr(E), v = o.mul(v, E), a = o.mul(a, h), l = q;
70
- }
71
- return v;
72
- };
73
- }
74
- function z(t) {
75
- if (t % b === C) {
76
- const i = (t + c) / b;
77
- return function(e, s) {
78
- const u = e.pow(s, i);
79
- if (!e.eql(e.sqr(u), s))
80
- throw new Error("Cannot find square root");
81
- return u;
82
- };
83
- }
84
- if (t % m === N) {
85
- const i = (t - N) / m;
86
- return function(e, s) {
87
- const u = e.mul(s, w), f = e.pow(u, i), o = e.mul(s, f), n = e.mul(e.mul(o, w), f), l = e.mul(o, e.sub(n, e.ONE));
88
- if (!e.eql(e.sqr(l), s))
89
- throw new Error("Cannot find square root");
90
- return l;
91
- };
92
- }
93
- return j(t);
94
- }
95
- const A = [
96
- "create",
97
- "isValid",
98
- "is0",
99
- "neg",
100
- "inv",
101
- "sqrt",
102
- "sqr",
103
- "eql",
104
- "add",
105
- "sub",
106
- "mul",
107
- "pow",
108
- "div",
109
- "addN",
110
- "subN",
111
- "mulN",
112
- "sqrN"
113
- ];
114
- function Y(t) {
115
- const i = {
116
- ORDER: "bigint",
117
- MASK: "bigint",
118
- BYTES: "isSafeInteger",
119
- BITS: "isSafeInteger"
120
- }, r = A.reduce((e, s) => (e[s] = "function", e), i);
121
- return M(t, r);
122
- }
123
- function k(t, i, r) {
124
- if (r < d)
125
- throw new Error("invalid exponent, negatives unsupported");
126
- if (r === d)
127
- return t.ONE;
128
- if (r === c)
129
- return i;
130
- let e = t.ONE, s = i;
131
- for (; r > d; )
132
- r & c && (e = t.mul(e, s)), s = t.sqr(s), r >>= c;
133
- return e;
134
- }
135
- function H(t, i) {
136
- const r = new Array(i.length), e = i.reduce((u, f, o) => t.is0(f) ? u : (r[o] = u, t.mul(u, f)), t.ONE), s = t.inv(e);
137
- return i.reduceRight((u, f, o) => t.is0(f) ? u : (r[o] = t.mul(u, r[o]), t.mul(u, f)), s), r;
138
- }
139
- function K(t, i) {
140
- const r = i !== void 0 ? i : t.toString(2).length, e = Math.ceil(r / 8);
141
- return { nBitLength: r, nByteLength: e };
142
- }
143
- function p(t, i, r = !1, e = {}) {
144
- if (t <= d)
145
- throw new Error("invalid field: expected ORDER > 0, got " + t);
146
- const { nBitLength: s, nByteLength: u } = K(t, i);
147
- if (u > 2048)
148
- throw new Error("invalid field: expected ORDER of <= 2048 bytes");
149
- let f;
150
- const o = Object.freeze({
151
- ORDER: t,
152
- isLE: r,
153
- BITS: s,
154
- BYTES: u,
155
- MASK: _(s),
156
- ZERO: d,
157
- ONE: c,
158
- create: (n) => g(n, t),
159
- isValid: (n) => {
160
- if (typeof n != "bigint")
161
- throw new Error("invalid field element: expected bigint, got " + typeof n);
162
- return d <= n && n < t;
163
- },
164
- is0: (n) => n === d,
165
- isOdd: (n) => (n & c) === c,
166
- neg: (n) => g(-n, t),
167
- eql: (n, l) => n === l,
168
- sqr: (n) => g(n * n, t),
169
- add: (n, l) => g(n + l, t),
170
- sub: (n, l) => g(n - l, t),
171
- mul: (n, l) => g(n * l, t),
172
- pow: (n, l) => k(o, n, l),
173
- div: (n, l) => g(n * I(l, t), t),
174
- // Same as above, but doesn't normalize
175
- sqrN: (n) => n * n,
176
- addN: (n, l) => n + l,
177
- subN: (n, l) => n - l,
178
- mulN: (n, l) => n * l,
179
- inv: (n) => I(n, t),
180
- sqrt: e.sqrt || ((n) => (f || (f = z(t)), f(o, n))),
181
- invertBatch: (n) => H(o, n),
182
- // TODO: do we really need constant cmov?
183
- // We don't have const-time bigints anyway, so probably will be not very useful
184
- cmov: (n, l, h) => h ? l : n,
185
- toBytes: (n) => r ? S(n, u) : x(n, u),
186
- fromBytes: (n) => {
187
- if (n.length !== u)
188
- throw new Error("Field.fromBytes: expected " + u + " bytes, got " + n.length);
189
- return r ? y(n) : L(n);
190
- }
1
+ async function a(e) {
2
+ const t = await e.request({
3
+ method: "eth_blobBaseFee"
191
4
  });
192
- return Object.freeze(o);
193
- }
194
- function T(t) {
195
- if (typeof t != "bigint")
196
- throw new Error("field order must be bigint");
197
- const i = t.toString(2).length;
198
- return Math.ceil(i / 8);
199
- }
200
- function O(t) {
201
- const i = T(t);
202
- return i + Math.ceil(i / 2);
203
- }
204
- function G(t, i, r = !1) {
205
- const e = t.length, s = T(i), u = O(i);
206
- if (e < 16 || e < u || e > 1024)
207
- throw new Error("expected " + u + "-1024 bytes of input, got " + e);
208
- const f = r ? y(t) : L(t), o = g(f, i - c) + c;
209
- return r ? S(o, s) : x(o, s);
5
+ return BigInt(t);
210
6
  }
211
7
  export {
212
- p as Field,
213
- H as FpInvertBatch,
214
- k as FpPow,
215
- z as FpSqrt,
216
- T as getFieldBytesLength,
217
- O as getMinHashLength,
218
- I as invert,
219
- G as mapHashToField,
220
- g as mod,
221
- K as nLength,
222
- Z as pow,
223
- V as pow2,
224
- j as tonelliShanks,
225
- Y as validateField
8
+ a as getBlobBaseFee
226
9
  };
package/dist/index68.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const y=BigInt(0),d=BigInt(1),N=BigInt(2);function b(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function m(t){if(!b(t))throw new Error("Uint8Array expected")}function _(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}const k=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function B(t){m(t);let e="";for(let r=0;r<t.length;r++)e+=k[t[r]];return e}function x(t){const e=t.toString(16);return e.length&1?"0"+e:e}function E(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?y:BigInt("0x"+t)}const f={_0:48,_9:57,A:65,F:70,a:97,f:102};function T(t){if(t>=f._0&&t<=f._9)return t-f._0;if(t>=f.A&&t<=f.F)return t-(f.A-10);if(t>=f.a&&t<=f.f)return t-(f.a-10)}function p(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let o=0,i=0;o<r;o++,i+=2){const a=T(t.charCodeAt(i)),s=T(t.charCodeAt(i+1));if(a===void 0||s===void 0){const c=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}n[o]=a*16+s}return n}function H(t){return E(B(t))}function O(t){return m(t),E(B(Uint8Array.from(t).reverse()))}function U(t,e){return p(t.toString(16).padStart(e*2,"0"))}function F(t,e){return U(t,e).reverse()}function V(t){return p(x(t))}function M(t,e,r){let n;if(typeof e=="string")try{n=p(e)}catch(i){throw new Error(t+" must be hex string or Uint8Array, cause: "+i)}else if(b(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const o=n.length;if(typeof r=="number"&&o!==r)throw new Error(t+" of length "+r+" expected, got "+o);return n}function I(...t){let e=0;for(let n=0;n<t.length;n++){const o=t[n];m(o),e+=o.length}const r=new Uint8Array(e);for(let n=0,o=0;n<t.length;n++){const i=t[n];r.set(i,o),o+=i.length}return r}function R(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}function j(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}const w=t=>typeof t=="bigint"&&y<=t;function S(t,e,r){return w(t)&&w(e)&&w(r)&&e<=t&&t<r}function z(t,e,r,n){if(!S(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function C(t){let e;for(e=0;t>y;t>>=d,e+=1);return e}function D(t,e){return t>>BigInt(e)&d}function G(t,e,r){return t|(r?d:y)<<BigInt(e)}const L=t=>(N<<BigInt(t-1))-d,h=t=>new Uint8Array(t),A=t=>Uint8Array.from(t);function P(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=h(t),o=h(t),i=0;const a=()=>{n.fill(1),o.fill(0),i=0},s=(...u)=>r(o,n,...u),c=(u=h())=>{o=s(A([0]),u),n=s(),u.length!==0&&(o=s(A([1]),u),n=s())},v=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let u=0;const l=[];for(;u<e;){n=s();const g=n.slice();l.push(g),u+=n.length}return I(...l)};return(u,l)=>{a(),c(u);let g;for(;!(g=l(v()));)c();return a(),g}}const q={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||b(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function W(t,e,r={}){const n=(o,i,a)=>{const s=q[i];if(typeof s!="function")throw new Error("invalid validator function");const c=t[o];if(!(a&&c===void 0)&&!s(c,t))throw new Error("param "+String(o)+" is invalid. Expected "+i+", got "+c)};for(const[o,i]of Object.entries(e))n(o,i,!1);for(const[o,i]of Object.entries(r))n(o,i,!0);return t}const J=()=>{throw new Error("not implemented")};function K(t){const e=new WeakMap;return(r,...n)=>{const o=e.get(r);if(o!==void 0)return o;const i=t(r,...n);return e.set(r,i),i}}exports.aInRange=z;exports.abool=_;exports.abytes=m;exports.bitGet=D;exports.bitLen=C;exports.bitMask=L;exports.bitSet=G;exports.bytesToHex=B;exports.bytesToNumberBE=H;exports.bytesToNumberLE=O;exports.concatBytes=I;exports.createHmacDrbg=P;exports.ensureBytes=M;exports.equalBytes=R;exports.hexToBytes=p;exports.hexToNumber=E;exports.inRange=S;exports.isBytes=b;exports.memoized=K;exports.notImplemented=J;exports.numberToBytesBE=U;exports.numberToBytesLE=F;exports.numberToHexUnpadded=x;exports.numberToVarBytesBE=V;exports.utf8ToBytes=j;exports.validateObject=W;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index126.cjs"),m=require("./index150.cjs"),k=require("./index155.cjs");async function B(t,{blockHash:o,blockNumber:r,blockTag:l,includeTransactions:i}={}){var c,s,u;const d=l??"latest",n=i??!1,a=r!==void 0?m.numberToHex(r):void 0;let e=null;if(o?e=await t.request({method:"eth_getBlockByHash",params:[o,n]},{dedupe:!0}):e=await t.request({method:"eth_getBlockByNumber",params:[a||d,n]},{dedupe:!!a}),!e)throw new f.BlockNotFoundError({blockHash:o,blockNumber:r});return(((u=(s=(c=t.chain)==null?void 0:c.formatters)==null?void 0:s.block)==null?void 0:u.format)||k.formatBlock)(e)}exports.getBlock=B;
package/dist/index68.js CHANGED
@@ -1,234 +1,20 @@
1
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2
- const d = /* @__PURE__ */ BigInt(0), y = /* @__PURE__ */ BigInt(1), I = /* @__PURE__ */ BigInt(2);
3
- function h(t) {
4
- return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
5
- }
6
- function b(t) {
7
- if (!h(t))
8
- throw new Error("Uint8Array expected");
9
- }
10
- function O(t, n) {
11
- if (typeof n != "boolean")
12
- throw new Error(t + " boolean expected, got " + n);
13
- }
14
- const T = /* @__PURE__ */ Array.from({ length: 256 }, (t, n) => n.toString(16).padStart(2, "0"));
15
- function B(t) {
16
- b(t);
17
- let n = "";
18
- for (let r = 0; r < t.length; r++)
19
- n += T[t[r]];
20
- return n;
21
- }
22
- function S(t) {
23
- const n = t.toString(16);
24
- return n.length & 1 ? "0" + n : n;
25
- }
26
- function U(t) {
27
- if (typeof t != "string")
28
- throw new Error("hex string expected, got " + typeof t);
29
- return t === "" ? d : BigInt("0x" + t);
30
- }
31
- const s = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
32
- function E(t) {
33
- if (t >= s._0 && t <= s._9)
34
- return t - s._0;
35
- if (t >= s.A && t <= s.F)
36
- return t - (s.A - 10);
37
- if (t >= s.a && t <= s.f)
38
- return t - (s.a - 10);
39
- }
40
- function m(t) {
41
- if (typeof t != "string")
42
- throw new Error("hex string expected, got " + typeof t);
43
- const n = t.length, r = n / 2;
44
- if (n % 2)
45
- throw new Error("hex string expected, got unpadded hex of length " + n);
46
- const e = new Uint8Array(r);
47
- for (let o = 0, i = 0; o < r; o++, i += 2) {
48
- const a = E(t.charCodeAt(i)), f = E(t.charCodeAt(i + 1));
49
- if (a === void 0 || f === void 0) {
50
- const c = t[i] + t[i + 1];
51
- throw new Error('hex string expected, got non-hex character "' + c + '" at index ' + i);
52
- }
53
- e[o] = a * 16 + f;
54
- }
55
- return e;
56
- }
57
- function V(t) {
58
- return U(B(t));
59
- }
60
- function H(t) {
61
- return b(t), U(B(Uint8Array.from(t).reverse()));
62
- }
63
- function v(t, n) {
64
- return m(t.toString(16).padStart(n * 2, "0"));
65
- }
66
- function C(t, n) {
67
- return v(t, n).reverse();
68
- }
69
- function M(t) {
70
- return m(S(t));
71
- }
72
- function R(t, n, r) {
73
- let e;
74
- if (typeof n == "string")
75
- try {
76
- e = m(n);
77
- } catch (i) {
78
- throw new Error(t + " must be hex string or Uint8Array, cause: " + i);
79
- }
80
- else if (h(n))
81
- e = Uint8Array.from(n);
82
- else
83
- throw new Error(t + " must be hex string or Uint8Array");
84
- const o = e.length;
85
- if (typeof r == "number" && o !== r)
86
- throw new Error(t + " of length " + r + " expected, got " + o);
87
- return e;
88
- }
89
- function _(...t) {
90
- let n = 0;
91
- for (let e = 0; e < t.length; e++) {
92
- const o = t[e];
93
- b(o), n += o.length;
94
- }
95
- const r = new Uint8Array(n);
96
- for (let e = 0, o = 0; e < t.length; e++) {
97
- const i = t[e];
98
- r.set(i, o), o += i.length;
99
- }
100
- return r;
101
- }
102
- function j(t, n) {
103
- if (t.length !== n.length)
104
- return !1;
105
- let r = 0;
106
- for (let e = 0; e < t.length; e++)
107
- r |= t[e] ^ n[e];
108
- return r === 0;
109
- }
110
- function z(t) {
111
- if (typeof t != "string")
112
- throw new Error("string expected");
113
- return new Uint8Array(new TextEncoder().encode(t));
114
- }
115
- const w = (t) => typeof t == "bigint" && d <= t;
116
- function N(t, n, r) {
117
- return w(t) && w(n) && w(r) && n <= t && t < r;
118
- }
119
- function D(t, n, r, e) {
120
- if (!N(n, r, e))
121
- throw new Error("expected valid " + t + ": " + r + " <= n < " + e + ", got " + n);
122
- }
123
- function G(t) {
124
- let n;
125
- for (n = 0; t > d; t >>= y, n += 1)
126
- ;
127
- return n;
128
- }
129
- function P(t, n) {
130
- return t >> BigInt(n) & y;
131
- }
132
- function W(t, n, r) {
133
- return t | (r ? y : d) << BigInt(n);
134
- }
135
- const q = (t) => (I << BigInt(t - 1)) - y, p = (t) => new Uint8Array(t), A = (t) => Uint8Array.from(t);
136
- function J(t, n, r) {
137
- if (typeof t != "number" || t < 2)
138
- throw new Error("hashLen must be a number");
139
- if (typeof n != "number" || n < 2)
140
- throw new Error("qByteLen must be a number");
141
- if (typeof r != "function")
142
- throw new Error("hmacFn must be a function");
143
- let e = p(t), o = p(t), i = 0;
144
- const a = () => {
145
- e.fill(1), o.fill(0), i = 0;
146
- }, f = (...u) => r(o, e, ...u), c = (u = p()) => {
147
- o = f(A([0]), u), e = f(), u.length !== 0 && (o = f(A([1]), u), e = f());
148
- }, x = () => {
149
- if (i++ >= 1e3)
150
- throw new Error("drbg: tried 1000 values");
151
- let u = 0;
152
- const l = [];
153
- for (; u < n; ) {
154
- e = f();
155
- const g = e.slice();
156
- l.push(g), u += e.length;
157
- }
158
- return _(...l);
159
- };
160
- return (u, l) => {
161
- a(), c(u);
162
- let g;
163
- for (; !(g = l(x())); )
164
- c();
165
- return a(), g;
166
- };
167
- }
168
- const k = {
169
- bigint: (t) => typeof t == "bigint",
170
- function: (t) => typeof t == "function",
171
- boolean: (t) => typeof t == "boolean",
172
- string: (t) => typeof t == "string",
173
- stringOrUint8Array: (t) => typeof t == "string" || h(t),
174
- isSafeInteger: (t) => Number.isSafeInteger(t),
175
- array: (t) => Array.isArray(t),
176
- field: (t, n) => n.Fp.isValid(t),
177
- hash: (t) => typeof t == "function" && Number.isSafeInteger(t.outputLen)
178
- };
179
- function K(t, n, r = {}) {
180
- const e = (o, i, a) => {
181
- const f = k[i];
182
- if (typeof f != "function")
183
- throw new Error("invalid validator function");
184
- const c = t[o];
185
- if (!(a && c === void 0) && !f(c, t))
186
- throw new Error("param " + String(o) + " is invalid. Expected " + i + ", got " + c);
187
- };
188
- for (const [o, i] of Object.entries(n))
189
- e(o, i, !1);
190
- for (const [o, i] of Object.entries(r))
191
- e(o, i, !0);
192
- return t;
193
- }
194
- const Q = () => {
195
- throw new Error("not implemented");
196
- };
197
- function X(t) {
198
- const n = /* @__PURE__ */ new WeakMap();
199
- return (r, ...e) => {
200
- const o = n.get(r);
201
- if (o !== void 0)
202
- return o;
203
- const i = t(r, ...e);
204
- return n.set(r, i), i;
205
- };
1
+ import { BlockNotFoundError as i } from "./index126.js";
2
+ import { numberToHex as l } from "./index150.js";
3
+ import { formatBlock as p } from "./index155.js";
4
+ async function T(e, { blockHash: t, blockNumber: r, blockTag: f, includeTransactions: u } = {}) {
5
+ var m, s, c;
6
+ const d = f ?? "latest", a = u ?? !1, n = r !== void 0 ? l(r) : void 0;
7
+ let o = null;
8
+ if (t ? o = await e.request({
9
+ method: "eth_getBlockByHash",
10
+ params: [t, a]
11
+ }, { dedupe: !0 }) : o = await e.request({
12
+ method: "eth_getBlockByNumber",
13
+ params: [n || d, a]
14
+ }, { dedupe: !!n }), !o)
15
+ throw new i({ blockHash: t, blockNumber: r });
16
+ return (((c = (s = (m = e.chain) == null ? void 0 : m.formatters) == null ? void 0 : s.block) == null ? void 0 : c.format) || p)(o);
206
17
  }
207
18
  export {
208
- D as aInRange,
209
- O as abool,
210
- b as abytes,
211
- P as bitGet,
212
- G as bitLen,
213
- q as bitMask,
214
- W as bitSet,
215
- B as bytesToHex,
216
- V as bytesToNumberBE,
217
- H as bytesToNumberLE,
218
- _ as concatBytes,
219
- J as createHmacDrbg,
220
- R as ensureBytes,
221
- j as equalBytes,
222
- m as hexToBytes,
223
- U as hexToNumber,
224
- N as inRange,
225
- h as isBytes,
226
- X as memoized,
227
- Q as notImplemented,
228
- v as numberToBytesBE,
229
- C as numberToBytesLE,
230
- S as numberToHexUnpadded,
231
- M as numberToVarBytesBE,
232
- z as utf8ToBytes,
233
- K as validateObject
19
+ T as getBlock
234
20
  };
package/dist/index69.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index71.cjs");class i extends n.BaseError{constructor({max:e,min:r,signed:s,size:t,value:a}){super(`Number "${a}" is not in safe ${t?`${t*8}-bit ${s?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}}class u extends n.BaseError{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}exports.IntegerOutOfRangeError=i;exports.SizeOverflowError=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index215.cjs"),r=e=>`blockNumber.${e}`;async function u(e,{cacheTime:c=e.cacheTime}={}){const t=await o.withCache(()=>e.request({method:"eth_blockNumber"}),{cacheKey:r(e.uid),cacheTime:c});return BigInt(t)}exports.getBlockNumber=u;
package/dist/index69.js CHANGED
@@ -1,15 +1,11 @@
1
- import { BaseError as t } from "./index71.js";
2
- class $ extends t {
3
- constructor({ max: e, min: r, signed: s, size: n, value: a }) {
4
- super(`Number "${a}" is not in safe ${n ? `${n * 8}-bit ${s ? "signed" : "unsigned"} ` : ""}integer range ${e ? `(${r} to ${e})` : `(above ${r})`}`, { name: "IntegerOutOfRangeError" });
5
- }
6
- }
7
- class c extends t {
8
- constructor({ givenSize: e, maxSize: r }) {
9
- super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`, { name: "SizeOverflowError" });
10
- }
1
+ import { withCache as t } from "./index215.js";
2
+ const r = (e) => `blockNumber.${e}`;
3
+ async function u(e, { cacheTime: c = e.cacheTime } = {}) {
4
+ const o = await t(() => e.request({
5
+ method: "eth_blockNumber"
6
+ }), { cacheKey: r(e.uid), cacheTime: c });
7
+ return BigInt(o);
11
8
  }
12
9
  export {
13
- $ as IntegerOutOfRangeError,
14
- c as SizeOverflowError
10
+ u as getBlockNumber
15
11
  };
package/dist/index70.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index107.cjs");function p(e,{dir:n,size:t=32}={}){return typeof e=="string"?o(e,{dir:n,size:t}):l(e,{dir:n,size:t})}function o(e,{dir:n,size:t=32}={}){if(t===null)return e;const r=e.replace("0x","");if(r.length>t*2)throw new i.SizeExceedsPaddingSizeError({size:Math.ceil(r.length/2),targetSize:t,type:"hex"});return`0x${r[n==="right"?"padEnd":"padStart"](t*2,"0")}`}function l(e,{dir:n,size:t=32}={}){if(t===null)return e;if(e.length>t)throw new i.SizeExceedsPaddingSizeError({size:e.length,targetSize:t,type:"bytes"});const r=new Uint8Array(t);for(let a=0;a<t;a++){const d=n==="right";r[d?a:t-a-1]=e[d?a:e.length-a-1]}return r}exports.pad=p;exports.padBytes=l;exports.padHex=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index182.cjs"),s=require("./index150.cjs");async function c(t,{blockHash:o,blockNumber:n,blockTag:u="latest"}={}){const r=n!==void 0?s.numberToHex(n):void 0;let e;return o?e=await t.request({method:"eth_getBlockTransactionCountByHash",params:[o]},{dedupe:!0}):e=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[r||u]},{dedupe:!!r}),a.hexToNumber(e)}exports.getBlockTransactionCount=c;
package/dist/index70.js CHANGED
@@ -1,37 +1,16 @@
1
- import { SizeExceedsPaddingSizeError as d } from "./index107.js";
2
- function f(n, { dir: r, size: t = 32 } = {}) {
3
- return typeof n == "string" ? p(n, { dir: r, size: t }) : i(n, { dir: r, size: t });
4
- }
5
- function p(n, { dir: r, size: t = 32 } = {}) {
6
- if (t === null)
7
- return n;
8
- const e = n.replace("0x", "");
9
- if (e.length > t * 2)
10
- throw new d({
11
- size: Math.ceil(e.length / 2),
12
- targetSize: t,
13
- type: "hex"
14
- });
15
- return `0x${e[r === "right" ? "padEnd" : "padStart"](t * 2, "0")}`;
16
- }
17
- function i(n, { dir: r, size: t = 32 } = {}) {
18
- if (t === null)
19
- return n;
20
- if (n.length > t)
21
- throw new d({
22
- size: n.length,
23
- targetSize: t,
24
- type: "bytes"
25
- });
26
- const e = new Uint8Array(t);
27
- for (let a = 0; a < t; a++) {
28
- const o = r === "right";
29
- e[o ? a : t - a - 1] = n[o ? a : n.length - a - 1];
30
- }
31
- return e;
1
+ import { hexToNumber as u } from "./index182.js";
2
+ import { numberToHex as m } from "./index150.js";
3
+ async function i(t, { blockHash: o, blockNumber: n, blockTag: a = "latest" } = {}) {
4
+ const r = n !== void 0 ? m(n) : void 0;
5
+ let e;
6
+ return o ? e = await t.request({
7
+ method: "eth_getBlockTransactionCountByHash",
8
+ params: [o]
9
+ }, { dedupe: !0 }) : e = await t.request({
10
+ method: "eth_getBlockTransactionCountByNumber",
11
+ params: [r || a]
12
+ }, { dedupe: !!r }), u(e);
32
13
  }
33
14
  export {
34
- f as pad,
35
- i as padBytes,
36
- p as padHex
15
+ i as getBlockTransactionCount
37
16
  };
package/dist/index71.cjs CHANGED
@@ -1,2 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index90.cjs");let i={getDocsUrl:({docsBaseUrl:s,docsPath:t="",docsSlug:e})=>t?`${s??"https://viem.sh"}${t}${e?`#${e}`:""}`:void 0,version:`viem@${l.version}`};class u extends Error{constructor(t,e={}){var o;const r=(()=>{var c;return e.cause instanceof u?e.cause.details:(c=e.cause)!=null&&c.message?e.cause.message:e.details})(),n=e.cause instanceof u&&e.cause.docsPath||e.docsPath,a=(o=i.getDocsUrl)==null?void 0:o.call(i,{...e,docsPath:n}),b=[t||"An error occurred.","",...e.metaMessages?[...e.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...r?[`Details: ${r}`]:[],...i.version?[`Version: ${i.version}`]:[]].join(`
2
- `);super(b,e.cause?{cause:e.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=n,this.metaMessages=e.metaMessages,this.name=e.name??this.name,this.shortMessage=t,this.version=l.version}walk(t){return d(this,t)}}function d(s,t){return t!=null&&t(s)?s:s&&typeof s=="object"&&"cause"in s&&s.cause!==void 0?d(s.cause,t):t?null:s}exports.BaseError=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index182.cjs");async function r(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return n.hexToNumber(t)}exports.getChainId=r;
package/dist/index71.js CHANGED
@@ -1,62 +1,10 @@
1
- import { version as l } from "./index90.js";
2
- let i = {
3
- getDocsUrl: ({ docsBaseUrl: s, docsPath: t = "", docsSlug: e }) => t ? `${s ?? "https://viem.sh"}${t}${e ? `#${e}` : ""}` : void 0,
4
- version: `viem@${l}`
5
- };
6
- class r extends Error {
7
- constructor(t, e = {}) {
8
- var o;
9
- const u = (() => {
10
- var c;
11
- return e.cause instanceof r ? e.cause.details : (c = e.cause) != null && c.message ? e.cause.message : e.details;
12
- })(), a = e.cause instanceof r && e.cause.docsPath || e.docsPath, n = (o = i.getDocsUrl) == null ? void 0 : o.call(i, { ...e, docsPath: a }), b = [
13
- t || "An error occurred.",
14
- "",
15
- ...e.metaMessages ? [...e.metaMessages, ""] : [],
16
- ...n ? [`Docs: ${n}`] : [],
17
- ...u ? [`Details: ${u}`] : [],
18
- ...i.version ? [`Version: ${i.version}`] : []
19
- ].join(`
20
- `);
21
- super(b, e.cause ? { cause: e.cause } : void 0), Object.defineProperty(this, "details", {
22
- enumerable: !0,
23
- configurable: !0,
24
- writable: !0,
25
- value: void 0
26
- }), Object.defineProperty(this, "docsPath", {
27
- enumerable: !0,
28
- configurable: !0,
29
- writable: !0,
30
- value: void 0
31
- }), Object.defineProperty(this, "metaMessages", {
32
- enumerable: !0,
33
- configurable: !0,
34
- writable: !0,
35
- value: void 0
36
- }), Object.defineProperty(this, "shortMessage", {
37
- enumerable: !0,
38
- configurable: !0,
39
- writable: !0,
40
- value: void 0
41
- }), Object.defineProperty(this, "version", {
42
- enumerable: !0,
43
- configurable: !0,
44
- writable: !0,
45
- value: void 0
46
- }), Object.defineProperty(this, "name", {
47
- enumerable: !0,
48
- configurable: !0,
49
- writable: !0,
50
- value: "BaseError"
51
- }), this.details = u, this.docsPath = a, this.metaMessages = e.metaMessages, this.name = e.name ?? this.name, this.shortMessage = t, this.version = l;
52
- }
53
- walk(t) {
54
- return d(this, t);
55
- }
56
- }
57
- function d(s, t) {
58
- return t != null && t(s) ? s : s && typeof s == "object" && "cause" in s && s.cause !== void 0 ? d(s.cause, t) : t ? null : s;
1
+ import { hexToNumber as n } from "./index182.js";
2
+ async function o(e) {
3
+ const t = await e.request({
4
+ method: "eth_chainId"
5
+ }, { dedupe: !0 });
6
+ return n(t);
59
7
  }
60
8
  export {
61
- r as BaseError
9
+ o as getChainId
62
10
  };
package/dist/index72.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class i extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const t=super.get(e);return super.has(e)&&t!==void 0&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){const s=this.keys().next().value;s&&this.delete(s)}return this}}exports.LruMap=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index150.cjs");async function i(o,{address:d,blockNumber:e,blockTag:r="latest"}){const t=e!==void 0?u.numberToHex(e):void 0,n=await o.request({method:"eth_getCode",params:[d,t||r]},{dedupe:!!t});if(n!=="0x")return n}exports.getCode=i;