@gardenfi/utils 2.1.2 → 2.1.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 (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 +28 -0
  279. package/dist/index231.cjs +1 -0
  280. package/dist/index231.js +16 -0
  281. package/dist/index232.cjs +1 -0
  282. package/dist/index232.js +18 -0
  283. package/dist/index233.cjs +1 -0
  284. package/dist/index233.js +8 -0
  285. package/dist/index234.cjs +1 -0
  286. package/dist/index234.js +16 -0
  287. package/dist/index235.cjs +1 -0
  288. package/dist/index235.js +13 -0
  289. package/dist/index236.cjs +1 -0
  290. package/dist/index236.js +19 -0
  291. package/dist/index237.cjs +1 -0
  292. package/dist/index237.js +13 -0
  293. package/dist/index238.cjs +1 -0
  294. package/dist/index238.js +19 -0
  295. package/dist/index239.cjs +1 -0
  296. package/dist/index239.js +25 -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 +33 -0
  301. package/dist/index241.cjs +1 -0
  302. package/dist/index241.js +4 -0
  303. package/dist/index242.cjs +1 -0
  304. package/dist/index242.js +16 -0
  305. package/dist/index243.cjs +1 -0
  306. package/dist/index243.js +15 -0
  307. package/dist/index244.cjs +1 -0
  308. package/dist/index244.js +50 -0
  309. package/dist/index245.cjs +1 -0
  310. package/dist/index245.js +14 -0
  311. package/dist/index246.cjs +1 -0
  312. package/dist/index246.js +10 -0
  313. package/dist/index247.cjs +1 -0
  314. package/dist/index247.js +12 -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 +17 -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 +12 -0
  323. package/dist/index251.cjs +1 -0
  324. package/dist/index251.js +27 -0
  325. package/dist/index252.cjs +1 -0
  326. package/dist/index252.js +15 -0
  327. package/dist/index253.cjs +1 -0
  328. package/dist/index253.js +27 -0
  329. package/dist/index254.cjs +2 -0
  330. package/dist/index254.js +27 -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 +18 -0
  335. package/dist/index257.cjs +1 -0
  336. package/dist/index257.js +55 -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 +43 -0
  401. package/dist/index287.cjs +1 -0
  402. package/dist/index287.js +4 -0
  403. package/dist/index288.cjs +1 -0
  404. package/dist/index288.js +209 -0
  405. package/dist/index289.cjs +1 -0
  406. package/dist/index289.js +6 -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 +143 -0
  411. package/dist/index291.cjs +1 -0
  412. package/dist/index291.js +158 -0
  413. package/dist/index292.cjs +1 -0
  414. package/dist/index292.js +12 -0
  415. package/dist/index293.cjs +1 -0
  416. package/dist/index293.js +116 -0
  417. package/dist/index294.cjs +2 -0
  418. package/dist/index294.js +137 -0
  419. package/dist/index295.cjs +1 -0
  420. package/dist/index295.js +14 -0
  421. package/dist/index296.cjs +1 -0
  422. package/dist/index296.js +22 -0
  423. package/dist/index297.cjs +1 -0
  424. package/dist/index297.js +71 -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/index46.js CHANGED
@@ -1,11 +1,12 @@
1
- import { withCache as t } from "./index47.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);
1
+ let i = 256, t;
2
+ function s(e = 11) {
3
+ if (!t || i + e > 256 * 2) {
4
+ t = "", i = 0;
5
+ for (let r = 0; r < 256; r++)
6
+ t += (256 + Math.random() * 256 | 0).toString(16).substring(1);
7
+ }
8
+ return t.substring(i, i++ + e);
8
9
  }
9
10
  export {
10
- u as getBlockNumber
11
+ s as uid
11
12
  };
package/dist/index47.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=new Map,c=new Map;function p(o){const a=(s,t)=>({clear:()=>t.delete(s),get:()=>t.get(s),set:n=>t.set(s,n)}),r=a(o,i),e=a(o,c);return{clear:()=>{r.clear(),e.clear()},promise:r,response:e}}async function l(o,{cacheKey:a,cacheTime:r=Number.POSITIVE_INFINITY}){const e=p(a),s=e.response.get();if(s&&r>0&&new Date().getTime()-s.created.getTime()<r)return s.data;let t=e.promise.get();t||(t=o(),e.promise.set(t));try{const n=await t;return e.response.set({created:new Date,data:n}),n}finally{e.promise.clear()}}exports.getCache=p;exports.promiseCache=i;exports.responseCache=c;exports.withCache=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index42.cjs"),i=require("./index38.cjs"),o=require("./index136.cjs");class d extends i.BaseError{constructor({body:t,cause:e,details:r,headers:n,status:s,url:l}){super("HTTP request failed.",{cause:e,details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${o.getUrl(l)}`,t&&`Request body: ${u.stringify(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=n,this.status=s,this.url=l}}class c extends i.BaseError{constructor({body:t,error:e,url:r}){super("RPC Request failed.",{cause:e,details:e.message,metaMessages:[`URL: ${o.getUrl(r)}`,`Request body: ${u.stringify(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e.code,this.data=e.data}}class b extends i.BaseError{constructor({body:t,url:e}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${o.getUrl(e)}`,`Request body: ${u.stringify(t)}`],name:"TimeoutError"})}}exports.HttpRequestError=d;exports.RpcRequestError=c;exports.TimeoutError=b;
package/dist/index47.js CHANGED
@@ -1,34 +1,71 @@
1
- const i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
2
- function p(o) {
3
- const a = (s, t) => ({
4
- clear: () => t.delete(s),
5
- get: () => t.get(s),
6
- set: (r) => t.set(s, r)
7
- }), n = a(o, i), e = a(o, c);
8
- return {
9
- clear: () => {
10
- n.clear(), e.clear();
11
- },
12
- promise: n,
13
- response: e
14
- };
1
+ import { stringify as s } from "./index42.js";
2
+ import { BaseError as a } from "./index38.js";
3
+ import { getUrl as o } from "./index136.js";
4
+ class m extends a {
5
+ constructor({ body: t, cause: e, details: r, headers: d, status: u, url: l }) {
6
+ super("HTTP request failed.", {
7
+ cause: e,
8
+ details: r,
9
+ metaMessages: [
10
+ u && `Status: ${u}`,
11
+ `URL: ${o(l)}`,
12
+ t && `Request body: ${s(t)}`
13
+ ].filter(Boolean),
14
+ name: "HttpRequestError"
15
+ }), Object.defineProperty(this, "body", {
16
+ enumerable: !0,
17
+ configurable: !0,
18
+ writable: !0,
19
+ value: void 0
20
+ }), Object.defineProperty(this, "headers", {
21
+ enumerable: !0,
22
+ configurable: !0,
23
+ writable: !0,
24
+ value: void 0
25
+ }), Object.defineProperty(this, "status", {
26
+ enumerable: !0,
27
+ configurable: !0,
28
+ writable: !0,
29
+ value: void 0
30
+ }), Object.defineProperty(this, "url", {
31
+ enumerable: !0,
32
+ configurable: !0,
33
+ writable: !0,
34
+ value: void 0
35
+ }), this.body = t, this.headers = d, this.status = u, this.url = l;
36
+ }
37
+ }
38
+ class f extends a {
39
+ constructor({ body: t, error: e, url: r }) {
40
+ super("RPC Request failed.", {
41
+ cause: e,
42
+ details: e.message,
43
+ metaMessages: [`URL: ${o(r)}`, `Request body: ${s(t)}`],
44
+ name: "RpcRequestError"
45
+ }), Object.defineProperty(this, "code", {
46
+ enumerable: !0,
47
+ configurable: !0,
48
+ writable: !0,
49
+ value: void 0
50
+ }), Object.defineProperty(this, "data", {
51
+ enumerable: !0,
52
+ configurable: !0,
53
+ writable: !0,
54
+ value: void 0
55
+ }), this.code = e.code, this.data = e.data;
56
+ }
15
57
  }
16
- async function l(o, { cacheKey: a, cacheTime: n = Number.POSITIVE_INFINITY }) {
17
- const e = p(a), s = e.response.get();
18
- if (s && n > 0 && (/* @__PURE__ */ new Date()).getTime() - s.created.getTime() < n)
19
- return s.data;
20
- let t = e.promise.get();
21
- t || (t = o(), e.promise.set(t));
22
- try {
23
- const r = await t;
24
- return e.response.set({ created: /* @__PURE__ */ new Date(), data: r }), r;
25
- } finally {
26
- e.promise.clear();
58
+ class p extends a {
59
+ constructor({ body: t, url: e }) {
60
+ super("The request took too long to respond.", {
61
+ details: "The request timed out.",
62
+ metaMessages: [`URL: ${o(e)}`, `Request body: ${s(t)}`],
63
+ name: "TimeoutError"
64
+ });
27
65
  }
28
66
  }
29
67
  export {
30
- p as getCache,
31
- i as promiseCache,
32
- c as responseCache,
33
- l as withCache
68
+ m as HttpRequestError,
69
+ f as RpcRequestError,
70
+ p as TimeoutError
34
71
  };
package/dist/index48.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index49.cjs"),s=require("./index24.cjs"),g=require("./index50.cjs");async function l(t,{blockHash:a,blockNumber:n,blockTag:T,hash:r,index:o}){var c,d,m;const u=T||"latest",i=n!==void 0?s.numberToHex(n):void 0;let e=null;if(r?e=await t.request({method:"eth_getTransactionByHash",params:[r]},{dedupe:!0}):a?e=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[a,s.numberToHex(o)]},{dedupe:!0}):e=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[i||u,s.numberToHex(o)]},{dedupe:!!i}),!e)throw new f.TransactionNotFoundError({blockHash:a,blockNumber:n,blockTag:u,hash:r,index:o});return(((m=(d=(c=t.chain)==null?void 0:c.formatters)==null?void 0:d.transaction)==null?void 0:m.format)||g.formatTransaction)(e)}exports.getTransaction=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index38.cjs");class e extends r.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}exports.UrlRequiredError=e;
package/dist/index48.js CHANGED
@@ -1,29 +1,12 @@
1
- import { TransactionNotFoundError as p } from "./index49.js";
2
- import { numberToHex as s } from "./index24.js";
3
- import { formatTransaction as T } from "./index50.js";
4
- async function h(e, { blockHash: a, blockNumber: r, blockTag: c, hash: o, index: n }) {
5
- var i, u, f;
6
- const m = c || "latest", d = r !== void 0 ? s(r) : void 0;
7
- let t = null;
8
- if (o ? t = await e.request({
9
- method: "eth_getTransactionByHash",
10
- params: [o]
11
- }, { dedupe: !0 }) : a ? t = await e.request({
12
- method: "eth_getTransactionByBlockHashAndIndex",
13
- params: [a, s(n)]
14
- }, { dedupe: !0 }) : t = await e.request({
15
- method: "eth_getTransactionByBlockNumberAndIndex",
16
- params: [d || m, s(n)]
17
- }, { dedupe: !!d }), !t)
18
- throw new p({
19
- blockHash: a,
20
- blockNumber: r,
21
- blockTag: m,
22
- hash: o,
23
- index: n
1
+ import { BaseError as r } from "./index38.js";
2
+ class t extends r {
3
+ constructor() {
4
+ super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.", {
5
+ docsPath: "/docs/clients/intro",
6
+ name: "UrlRequiredError"
24
7
  });
25
- return (((f = (u = (i = e.chain) == null ? void 0 : i.formatters) == null ? void 0 : u.transaction) == null ? void 0 : f.format) || T)(t);
8
+ }
26
9
  }
27
10
  export {
28
- h as getTransaction
11
+ t as UrlRequiredError
29
12
  };
package/dist/index49.cjs CHANGED
@@ -1,2 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index71.cjs");function c(t){const r=Object.entries(t).map(([a,e])=>e===void 0||e===!1?null:[a,e]).filter(Boolean),s=r.reduce((a,[e])=>Math.max(a,e.length),0);return r.map(([a,e])=>` ${`${a}:`.padEnd(s+1)} ${e}`).join(`
2
- `)}class d extends o.BaseError{constructor({v:r}){super(`Invalid \`v\` value "${r}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class l extends o.BaseError{constructor({transaction:r}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",c(r),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class u extends o.BaseError{constructor({storageKey:r}){super(`Size for storage key "${r}" is invalid. Expected 32 bytes. Got ${Math.floor((r.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class T extends o.BaseError{constructor({blockHash:r,blockNumber:s,blockTag:a,hash:e,index:n}){let i="Transaction";a&&n!==void 0&&(i=`Transaction at block time "${a}" at index "${n}"`),r&&n!==void 0&&(i=`Transaction at block hash "${r}" at index "${n}"`),s&&n!==void 0&&(i=`Transaction at block number "${s}" at index "${n}"`),e&&(i=`Transaction with hash "${e}"`),super(`${i} could not be found.`,{name:"TransactionNotFoundError"})}}class E extends o.BaseError{constructor({hash:r}){super(`Transaction receipt with hash "${r}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class p extends o.BaseError{constructor({hash:r}){super(`Timed out while waiting for transaction with hash "${r}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}exports.InvalidLegacyVError=d;exports.InvalidSerializableTransactionError=l;exports.InvalidStorageKeySizeError=u;exports.TransactionNotFoundError=T;exports.TransactionReceiptNotFoundError=E;exports.WaitForTransactionReceiptTimeoutError=p;exports.prettyPrint=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index41.cjs"),l=new Map;function A({fn:a,id:o,shouldSplitBatch:h,wait:y=0,sort:u}){const i=async()=>{const e=n();f();const s=e.map(({args:t})=>t);s.length!==0&&a(s).then(t=>{u&&Array.isArray(t)&&t.sort(u);for(let c=0;c<e.length;c++){const{resolve:r}=e[c];r==null||r([t[c],t])}}).catch(t=>{for(let c=0;c<e.length;c++){const{reject:r}=e[c];r==null||r(t)}})},f=()=>l.delete(o),m=()=>n().map(({args:e})=>e),n=()=>l.get(o)||[],g=e=>l.set(o,[...n(),e]);return{flush:f,async schedule(e){const{promise:s,resolve:t,reject:c}=v.withResolvers();return(h==null?void 0:h([...m(),e]))&&i(),n().length>0?(g({args:e,resolve:t,reject:c}),s):(g({args:e,resolve:t,reject:c}),setTimeout(i,y),s)}}}exports.createBatchScheduler=A;
package/dist/index49.js CHANGED
@@ -1,68 +1,31 @@
1
- import { BaseError as o } from "./index71.js";
2
- function c(e) {
3
- const r = Object.entries(e).map(([t, n]) => n === void 0 || n === !1 ? null : [t, n]).filter(Boolean), s = r.reduce((t, [n]) => Math.max(t, n.length), 0);
4
- return r.map(([t, n]) => ` ${`${t}:`.padEnd(s + 1)} ${n}`).join(`
5
- `);
6
- }
7
- class u extends o {
8
- constructor({ v: r }) {
9
- super(`Invalid \`v\` value "${r}". Expected 27 or 28.`, {
10
- name: "InvalidLegacyVError"
11
- });
12
- }
13
- }
14
- class l extends o {
15
- constructor({ transaction: r }) {
16
- super("Cannot infer a transaction type from provided transaction.", {
17
- metaMessages: [
18
- "Provided Transaction:",
19
- "{",
20
- c(r),
21
- "}",
22
- "",
23
- "To infer the type, either provide:",
24
- "- a `type` to the Transaction, or",
25
- "- an EIP-1559 Transaction with `maxFeePerGas`, or",
26
- "- an EIP-2930 Transaction with `gasPrice` & `accessList`, or",
27
- "- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or",
28
- "- an EIP-7702 Transaction with `authorizationList`, or",
29
- "- a Legacy Transaction with `gasPrice`"
30
- ],
31
- name: "InvalidSerializableTransactionError"
1
+ import { withResolvers as y } from "./index41.js";
2
+ const l = /* @__PURE__ */ new Map();
3
+ function w({ fn: m, id: o, shouldSplitBatch: h, wait: A = 0, sort: u }) {
4
+ const i = async () => {
5
+ const e = s();
6
+ f();
7
+ const r = e.map(({ args: t }) => t);
8
+ r.length !== 0 && m(r).then((t) => {
9
+ u && Array.isArray(t) && t.sort(u);
10
+ for (let c = 0; c < e.length; c++) {
11
+ const { resolve: n } = e[c];
12
+ n == null || n([t[c], t]);
13
+ }
14
+ }).catch((t) => {
15
+ for (let c = 0; c < e.length; c++) {
16
+ const { reject: n } = e[c];
17
+ n == null || n(t);
18
+ }
32
19
  });
33
- }
34
- }
35
- class T extends o {
36
- constructor({ storageKey: r }) {
37
- super(`Size for storage key "${r}" is invalid. Expected 32 bytes. Got ${Math.floor((r.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
38
- }
39
- }
40
- class h extends o {
41
- constructor({ blockHash: r, blockNumber: s, blockTag: t, hash: n, index: a }) {
42
- let i = "Transaction";
43
- t && a !== void 0 && (i = `Transaction at block time "${t}" at index "${a}"`), r && a !== void 0 && (i = `Transaction at block hash "${r}" at index "${a}"`), s && a !== void 0 && (i = `Transaction at block number "${s}" at index "${a}"`), n && (i = `Transaction with hash "${n}"`), super(`${i} could not be found.`, {
44
- name: "TransactionNotFoundError"
45
- });
46
- }
47
- }
48
- class p extends o {
49
- constructor({ hash: r }) {
50
- super(`Transaction receipt with hash "${r}" could not be found. The Transaction may not be processed on a block yet.`, {
51
- name: "TransactionReceiptNotFoundError"
52
- });
53
- }
54
- }
55
- class f extends o {
56
- constructor({ hash: r }) {
57
- super(`Timed out while waiting for transaction with hash "${r}" to be confirmed.`, { name: "WaitForTransactionReceiptTimeoutError" });
58
- }
20
+ }, f = () => l.delete(o), p = () => s().map(({ args: e }) => e), s = () => l.get(o) || [], g = (e) => l.set(o, [...s(), e]);
21
+ return {
22
+ flush: f,
23
+ async schedule(e) {
24
+ const { promise: r, resolve: t, reject: c } = y();
25
+ return (h == null ? void 0 : h([...p(), e])) && i(), s().length > 0 ? (g({ args: e, resolve: t, reject: c }), r) : (g({ args: e, resolve: t, reject: c }), setTimeout(i, A), r);
26
+ }
27
+ };
59
28
  }
60
29
  export {
61
- u as InvalidLegacyVError,
62
- l as InvalidSerializableTransactionError,
63
- T as InvalidStorageKeySizeError,
64
- h as TransactionNotFoundError,
65
- p as TransactionReceiptNotFoundError,
66
- f as WaitForTransactionReceiptTimeoutError,
67
- c as prettyPrint
30
+ w as createBatchScheduler
68
31
  };
package/dist/index5.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var g=t=>{throw TypeError(t)};var a=(t,e,n)=>e.has(t)||g("Cannot "+n);var u=(t,e,n)=>(a(t,e,"read from private field"),n?n.call(t):e.get(t)),l=(t,e,n)=>e.has(t)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),f=(t,e,n,r)=>(a(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var i,s,o;class c{constructor(e,n,r=void 0){l(this,i);l(this,s);l(this,o);f(this,i,e),f(this,o,r),f(this,s,n)}get ok(){return u(this,i)}get error(){return u(this,o)}get val(){return u(this,s)}}i=new WeakMap,s=new WeakMap,o=new WeakMap;const d=t=>new c(!0,t),h=void 0,v=(t,...e)=>{if(typeof t=="string"&&e&&e.length>0){const n=[t,...e].map(r=>{if(r){if(r instanceof Error)return r.message;if(typeof r=="string")return r;if(r!=null&&r.toString)return r.toString()}});return new c(!1,null,n.filter(r=>r!==void 0).join(" "))}return new c(!1,null,t)};exports.Err=v;exports.Ok=d;exports.Result=c;exports.Void=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=t=>({ok:!0,val:t}),n=void 0,s=(t,...e)=>{let i=t;return typeof t=="string"&&e&&e.length>0&&(i=[t,...e].map(r=>{if(r){if(r instanceof Error)return r.message;if(typeof r=="string")return r;if(r!=null&&r.toString)return r.toString()}}).filter(r=>r!==void 0).join(" ")),{ok:!1,val:void 0,error:i}};exports.Err=s;exports.Ok=o;exports.Void=n;
package/dist/index5.js CHANGED
@@ -1,50 +1,22 @@
1
- var g = (t) => {
2
- throw TypeError(t);
3
- };
4
- var h = (t, r, n) => r.has(t) || g("Cannot " + n);
5
- var u = (t, r, n) => (h(t, r, "read from private field"), n ? n.call(t) : r.get(t)), l = (t, r, n) => r.has(t) ? g("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(t) : r.set(t, n), f = (t, r, n, e) => (h(t, r, "write to private field"), e ? e.call(t, n) : r.set(t, n), n);
6
- var s, i, o;
7
- class c {
8
- constructor(r, n, e = void 0) {
9
- l(this, s);
10
- l(this, i);
11
- l(this, o);
12
- f(this, s, r), f(this, o, e), f(this, i, n);
13
- }
14
- get ok() {
15
- return u(this, s);
16
- }
17
- get error() {
18
- return u(this, o);
19
- }
20
- get val() {
21
- return u(this, i);
22
- }
23
- }
24
- s = new WeakMap(), i = new WeakMap(), o = new WeakMap();
25
- const v = (t) => new c(!0, t), d = void 0, k = (t, ...r) => {
26
- if (typeof t == "string" && r && r.length > 0) {
27
- const n = [t, ...r].map((e) => {
28
- if (e) {
29
- if (e instanceof Error)
30
- return e.message;
31
- if (typeof e == "string")
32
- return e;
33
- if (e != null && e.toString)
34
- return e.toString();
35
- }
36
- });
37
- return new c(
38
- !1,
39
- null,
40
- n.filter((e) => e !== void 0).join(" ")
41
- );
42
- }
43
- return new c(!1, null, t);
1
+ const o = (t) => ({ ok: !0, val: t }), s = void 0, f = (t, ...e) => {
2
+ let i = t;
3
+ return typeof t == "string" && e && e.length > 0 && (i = [t, ...e].map((r) => {
4
+ if (r) {
5
+ if (r instanceof Error)
6
+ return r.message;
7
+ if (typeof r == "string")
8
+ return r;
9
+ if (r != null && r.toString)
10
+ return r.toString();
11
+ }
12
+ }).filter((r) => r !== void 0).join(" ")), {
13
+ ok: !1,
14
+ val: void 0,
15
+ error: i
16
+ };
44
17
  };
45
18
  export {
46
- k as Err,
47
- v as Ok,
48
- c as Result,
49
- d as Void
19
+ f as Err,
20
+ o as Ok,
21
+ s as Void
50
22
  };
package/dist/index50.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index35.cjs"),i={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function u(e){const d={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?r.hexToNumber(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?r.hexToNumber(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?i[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(d.authorizationList=l(e.authorizationList)),d.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof d.v=="bigint"){if(d.v===0n||d.v===27n)return 0;if(d.v===1n||d.v===28n)return 1;if(d.v>=35n)return d.v%2n===0n?1:0}})(),d.type==="legacy"&&(delete d.accessList,delete d.maxFeePerBlobGas,delete d.maxFeePerGas,delete d.maxPriorityFeePerGas,delete d.yParity),d.type==="eip2930"&&(delete d.maxFeePerBlobGas,delete d.maxFeePerGas,delete d.maxPriorityFeePerGas),d.type==="eip1559"&&delete d.maxFeePerBlobGas,d}function l(e){return e.map(d=>({address:d.address,chainId:Number(d.chainId),nonce:Number(d.nonce),r:d.r,s:d.s,yParity:Number(d.yParity)}))}exports.formatTransaction=u;exports.transactionType=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index47.cjs"),j=require("./index218.cjs"),u=require("./index42.cjs"),l=require("./index273.cjs");function C(s,i={}){return{async request(h){var w;const{body:r,onRequest:o=i.onRequest,onResponse:p=i.onResponse,timeout:d=i.timeout??1e4}=h,f={...i.fetchOptions??{},...h.fetchOptions??{}},{headers:q,method:m,signal:T}=f;try{const t=await j.withTimeout(async({signal:a})=>{const c={...f,body:Array.isArray(r)?u.stringify(r.map(g=>({jsonrpc:"2.0",id:g.id??l.idCache.take(),...g}))):u.stringify({jsonrpc:"2.0",id:r.id??l.idCache.take(),...r}),headers:{"Content-Type":"application/json",...q},method:m||"POST",signal:T||(d>0?a:null)},R=new Request(s,c),y=await(o==null?void 0:o(R,c))??{...c,url:s};return await fetch(y.url??s,y)},{errorInstance:new n.TimeoutError({body:r,url:s}),timeout:d,signal:!0});p&&await p(t);let e;if((w=t.headers.get("Content-Type"))!=null&&w.startsWith("application/json"))e=await t.json();else{e=await t.text();try{e=JSON.parse(e||"{}")}catch(a){if(t.ok)throw a;e={error:e}}}if(!t.ok)throw new n.HttpRequestError({body:r,details:u.stringify(e.error)||t.statusText,headers:t.headers,status:t.status,url:s});return e}catch(t){throw t instanceof n.HttpRequestError||t instanceof n.TimeoutError?t:new n.HttpRequestError({body:r,cause:t,url:s})}}}}exports.getHttpRpcClient=C;
package/dist/index50.js CHANGED
@@ -1,54 +1,74 @@
1
- import { hexToNumber as i } from "./index35.js";
2
- const r = {
3
- "0x0": "legacy",
4
- "0x1": "eip2930",
5
- "0x2": "eip1559",
6
- "0x3": "eip4844",
7
- "0x4": "eip7702"
8
- };
9
- function m(e) {
10
- const d = {
11
- ...e,
12
- blockHash: e.blockHash ? e.blockHash : null,
13
- blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
14
- chainId: e.chainId ? i(e.chainId) : void 0,
15
- gas: e.gas ? BigInt(e.gas) : void 0,
16
- gasPrice: e.gasPrice ? BigInt(e.gasPrice) : void 0,
17
- maxFeePerBlobGas: e.maxFeePerBlobGas ? BigInt(e.maxFeePerBlobGas) : void 0,
18
- maxFeePerGas: e.maxFeePerGas ? BigInt(e.maxFeePerGas) : void 0,
19
- maxPriorityFeePerGas: e.maxPriorityFeePerGas ? BigInt(e.maxPriorityFeePerGas) : void 0,
20
- nonce: e.nonce ? i(e.nonce) : void 0,
21
- to: e.to ? e.to : null,
22
- transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
23
- type: e.type ? r[e.type] : void 0,
24
- typeHex: e.type ? e.type : void 0,
25
- value: e.value ? BigInt(e.value) : void 0,
26
- v: e.v ? BigInt(e.v) : void 0
27
- };
28
- return e.authorizationList && (d.authorizationList = u(e.authorizationList)), d.yParity = (() => {
29
- if (e.yParity)
30
- return Number(e.yParity);
31
- if (typeof d.v == "bigint") {
32
- if (d.v === 0n || d.v === 27n)
33
- return 0;
34
- if (d.v === 1n || d.v === 28n)
35
- return 1;
36
- if (d.v >= 35n)
37
- return d.v % 2n === 0n ? 1 : 0;
1
+ import { TimeoutError as g, HttpRequestError as c } from "./index47.js";
2
+ import { withTimeout as k } from "./index218.js";
3
+ import { stringify as p } from "./index42.js";
4
+ import { idCache as l } from "./index273.js";
5
+ function H(s, o = {}) {
6
+ return {
7
+ async request(h) {
8
+ var m;
9
+ const { body: r, onRequest: n = o.onRequest, onResponse: f = o.onResponse, timeout: w = o.timeout ?? 1e4 } = h, d = {
10
+ ...o.fetchOptions ?? {},
11
+ ...h.fetchOptions ?? {}
12
+ }, { headers: T, method: j, signal: O } = d;
13
+ try {
14
+ const t = await k(async ({ signal: a }) => {
15
+ const i = {
16
+ ...d,
17
+ body: Array.isArray(r) ? p(r.map((y) => ({
18
+ jsonrpc: "2.0",
19
+ id: y.id ?? l.take(),
20
+ ...y
21
+ }))) : p({
22
+ jsonrpc: "2.0",
23
+ id: r.id ?? l.take(),
24
+ ...r
25
+ }),
26
+ headers: {
27
+ "Content-Type": "application/json",
28
+ ...T
29
+ },
30
+ method: j || "POST",
31
+ signal: O || (w > 0 ? a : null)
32
+ }, R = new Request(s, i), u = await (n == null ? void 0 : n(R, i)) ?? { ...i, url: s };
33
+ return await fetch(u.url ?? s, u);
34
+ }, {
35
+ errorInstance: new g({ body: r, url: s }),
36
+ timeout: w,
37
+ signal: !0
38
+ });
39
+ f && await f(t);
40
+ let e;
41
+ if ((m = t.headers.get("Content-Type")) != null && m.startsWith("application/json"))
42
+ e = await t.json();
43
+ else {
44
+ e = await t.text();
45
+ try {
46
+ e = JSON.parse(e || "{}");
47
+ } catch (a) {
48
+ if (t.ok)
49
+ throw a;
50
+ e = { error: e };
51
+ }
52
+ }
53
+ if (!t.ok)
54
+ throw new c({
55
+ body: r,
56
+ details: p(e.error) || t.statusText,
57
+ headers: t.headers,
58
+ status: t.status,
59
+ url: s
60
+ });
61
+ return e;
62
+ } catch (t) {
63
+ throw t instanceof c || t instanceof g ? t : new c({
64
+ body: r,
65
+ cause: t,
66
+ url: s
67
+ });
68
+ }
38
69
  }
39
- })(), d.type === "legacy" && (delete d.accessList, delete d.maxFeePerBlobGas, delete d.maxFeePerGas, delete d.maxPriorityFeePerGas, delete d.yParity), d.type === "eip2930" && (delete d.maxFeePerBlobGas, delete d.maxFeePerGas, delete d.maxPriorityFeePerGas), d.type === "eip1559" && delete d.maxFeePerBlobGas, d;
40
- }
41
- function u(e) {
42
- return e.map((d) => ({
43
- address: d.address,
44
- chainId: Number(d.chainId),
45
- nonce: Number(d.nonce),
46
- r: d.r,
47
- s: d.s,
48
- yParity: Number(d.yParity)
49
- }));
70
+ };
50
71
  }
51
72
  export {
52
- m as formatTransaction,
53
- r as transactionType
73
+ H as getHttpRpcClient
54
74
  };
package/dist/index51.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index49.cjs"),i=require("./index52.cjs");async function s(t,{hash:e}){var a,n,o;const r=await t.request({method:"eth_getTransactionReceipt",params:[e]},{dedupe:!0});if(!r)throw new c.TransactionReceiptNotFoundError({hash:e});return(((o=(n=(a=t.chain)==null?void 0:a.formatters)==null?void 0:n.transactionReceipt)==null?void 0:o.format)||i.formatTransactionReceipt)(r)}exports.getTransactionReceipt=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index116.cjs"),b=require("./index46.cjs");function l({key:r,methods:e,name:n,request:u,retryCount:i=3,retryDelay:t=150,timeout:c,type:o},s){const d=b.uid();return{config:{key:r,methods:e,name:n,request:u,retryCount:i,retryDelay:t,timeout:c,type:o},request:a.buildRequest(u,{methods:e,retryCount:i,retryDelay:t,uid:d}),value:s}}exports.createTransport=l;
package/dist/index51.js CHANGED
@@ -1,15 +1,22 @@
1
- import { TransactionReceiptNotFoundError as i } from "./index49.js";
2
- import { formatTransactionReceipt as c } from "./index52.js";
3
- async function f(t, { hash: r }) {
4
- var o, a, n;
5
- const e = await t.request({
6
- method: "eth_getTransactionReceipt",
7
- params: [r]
8
- }, { dedupe: !0 });
9
- if (!e)
10
- throw new i({ hash: r });
11
- return (((n = (a = (o = t.chain) == null ? void 0 : o.formatters) == null ? void 0 : a.transactionReceipt) == null ? void 0 : n.format) || c)(e);
1
+ import { buildRequest as m } from "./index116.js";
2
+ import { uid as e } from "./index46.js";
3
+ function b({ key: n, methods: i, name: t, request: o, retryCount: r = 3, retryDelay: u = 150, timeout: c, type: f }, p) {
4
+ const d = e();
5
+ return {
6
+ config: {
7
+ key: n,
8
+ methods: i,
9
+ name: t,
10
+ request: o,
11
+ retryCount: r,
12
+ retryDelay: u,
13
+ timeout: c,
14
+ type: f
15
+ },
16
+ request: m(o, { methods: i, retryCount: r, retryDelay: u, uid: d }),
17
+ value: p
18
+ };
12
19
  }
13
20
  export {
14
- f as getTransactionReceipt
21
+ b as createTransport
15
22
  };
package/dist/index52.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index35.cjs"),d=require("./index92.cjs"),r=require("./index50.cjs"),u={"0x0":"reverted","0x1":"success"};function o(l){const s={...l,blockNumber:l.blockNumber?BigInt(l.blockNumber):null,contractAddress:l.contractAddress?l.contractAddress:null,cumulativeGasUsed:l.cumulativeGasUsed?BigInt(l.cumulativeGasUsed):null,effectiveGasPrice:l.effectiveGasPrice?BigInt(l.effectiveGasPrice):null,gasUsed:l.gasUsed?BigInt(l.gasUsed):null,logs:l.logs?l.logs.map(e=>d.formatLog(e)):null,to:l.to?l.to:null,transactionIndex:l.transactionIndex?b.hexToNumber(l.transactionIndex):null,status:l.status?u[l.status]:null,type:l.type?r.transactionType[l.type]||l.type:null};return l.blobGasPrice&&(s.blobGasPrice=BigInt(l.blobGasPrice)),l.blobGasUsed&&(s.blobGasUsed=BigInt(l.blobGasUsed)),s}exports.formatTransactionReceipt=o;exports.receiptStatuses=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index53.cjs"),o=require("./index54.cjs"),n=require("./index55.cjs"),i=require("./index56.cjs"),c=require("./index57.cjs"),g=require("./index58.cjs"),u=require("./index59.cjs"),q=require("./index60.cjs"),l=require("./index30.cjs"),m=require("./index61.cjs"),C=require("./index62.cjs"),T=require("./index31.cjs"),F=require("./index63.cjs"),E=require("./index64.cjs"),B=require("./index65.cjs"),d=require("./index66.cjs"),v=require("./index67.cjs"),w=require("./index68.cjs"),k=require("./index69.cjs"),P=require("./index70.cjs"),h=require("./index71.cjs"),r=require("./index72.cjs"),p=require("./index32.cjs"),y=require("./index73.cjs"),f=require("./index74.cjs"),G=require("./index75.cjs"),R=require("./index76.cjs"),A=require("./index77.cjs"),b=require("./index78.cjs"),M=require("./index79.cjs"),L=require("./index80.cjs"),N=require("./index81.cjs"),S=require("./index82.cjs"),x=require("./index83.cjs"),D=require("./index20.cjs"),H=require("./index84.cjs"),I=require("./index33.cjs"),a=require("./index85.cjs"),j=require("./index86.cjs"),O=require("./index34.cjs"),z=require("./index87.cjs"),J=require("./index88.cjs"),K=require("./index89.cjs"),Q=require("./index90.cjs"),U=require("./index91.cjs"),V=require("./index92.cjs"),W=require("./index35.cjs"),X=require("./index93.cjs"),Y=require("./index94.cjs"),Z=require("./index95.cjs"),_=require("./index96.cjs"),$=require("./index97.cjs");function ee(t){return{call:e=>g.call(t,e),createAccessList:e=>u.createAccessList(t,e),createBlockFilter:()=>q.createBlockFilter(t),createContractEventFilter:e=>l.createContractEventFilter(t,e),createEventFilter:e=>m.createEventFilter(t,e),createPendingTransactionFilter:()=>C.createPendingTransactionFilter(t),estimateContractGas:e=>T.estimateContractGas(t,e),estimateGas:e=>E.estimateGas(t,e),getBalance:e=>d.getBalance(t,e),getBlobBaseFee:()=>v.getBlobBaseFee(t),getBlock:e=>w.getBlock(t,e),getBlockNumber:e=>k.getBlockNumber(t,e),getBlockTransactionCount:e=>P.getBlockTransactionCount(t,e),getBytecode:e=>r.getCode(t,e),getChainId:()=>h.getChainId(t),getCode:e=>r.getCode(t,e),getContractEvents:e=>p.getContractEvents(t,e),getEip712Domain:e=>y.getEip712Domain(t,e),getEnsAddress:e=>s.getEnsAddress(t,e),getEnsAvatar:e=>o.getEnsAvatar(t,e),getEnsName:e=>n.getEnsName(t,e),getEnsResolver:e=>i.getEnsResolver(t,e),getEnsText:e=>c.getEnsText(t,e),getFeeHistory:e=>f.getFeeHistory(t,e),estimateFeesPerGas:e=>F.estimateFeesPerGas(t,e),getFilterChanges:e=>G.getFilterChanges(t,e),getFilterLogs:e=>R.getFilterLogs(t,e),getGasPrice:()=>A.getGasPrice(t),getLogs:e=>b.getLogs(t,e),getProof:e=>M.getProof(t,e),estimateMaxPriorityFeePerGas:e=>B.estimateMaxPriorityFeePerGas(t,e),getStorageAt:e=>L.getStorageAt(t,e),getTransaction:e=>N.getTransaction(t,e),getTransactionConfirmations:e=>S.getTransactionConfirmations(t,e),getTransactionCount:e=>x.getTransactionCount(t,e),getTransactionReceipt:e=>D.getTransactionReceipt(t,e),multicall:e=>H.multicall(t,e),prepareTransactionRequest:e=>_.prepareTransactionRequest(t,e),readContract:e=>I.readContract(t,e),sendRawTransaction:e=>$.sendRawTransaction(t,e),simulate:e=>a.simulateBlocks(t,e),simulateBlocks:e=>a.simulateBlocks(t,e),simulateCalls:e=>j.simulateCalls(t,e),simulateContract:e=>O.simulateContract(t,e),verifyMessage:e=>J.verifyMessage(t,e),verifySiweMessage:e=>Z.verifySiweMessage(t,e),verifyTypedData:e=>K.verifyTypedData(t,e),uninstallFilter:e=>z.uninstallFilter(t,e),waitForTransactionReceipt:e=>Q.waitForTransactionReceipt(t,e),watchBlocks:e=>V.watchBlocks(t,e),watchBlockNumber:e=>U.watchBlockNumber(t,e),watchContractEvent:e=>W.watchContractEvent(t,e),watchEvent:e=>X.watchEvent(t,e),watchPendingTransactions:e=>Y.watchPendingTransactions(t,e)}}exports.publicActions=ee;