@gardenfi/utils 3.1.0 → 3.1.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 (443) hide show
  1. package/dist/index100.cjs +1 -2
  2. package/dist/index100.js +27 -119
  3. package/dist/index101.cjs +1 -1
  4. package/dist/index101.js +90 -14
  5. package/dist/index102.cjs +1 -1
  6. package/dist/index102.js +4 -25
  7. package/dist/index103.cjs +2 -1
  8. package/dist/index103.js +3 -34
  9. package/dist/index104.cjs +1 -1
  10. package/dist/index104.js +9 -45
  11. package/dist/index105.cjs +20 -1
  12. package/dist/index105.js +326 -6
  13. package/dist/index106.cjs +1 -1
  14. package/dist/index106.js +13 -103
  15. package/dist/index107.cjs +1 -1
  16. package/dist/index107.js +4 -37
  17. package/dist/index108.cjs +1 -1
  18. package/dist/index108.js +2 -9
  19. package/dist/index109.cjs +1 -1
  20. package/dist/index109.js +7 -20
  21. package/dist/index110.cjs +2 -1
  22. package/dist/index110.js +55 -2
  23. package/dist/index111.cjs +3 -1
  24. package/dist/index111.js +211 -71
  25. package/dist/index112.cjs +1 -1
  26. package/dist/index112.js +32 -16
  27. package/dist/index113.cjs +1 -1
  28. package/dist/index113.js +20 -150
  29. package/dist/index114.cjs +1 -20
  30. package/dist/index114.js +5 -326
  31. package/dist/index115.cjs +1 -3
  32. package/dist/index115.js +72 -450
  33. package/dist/index116.cjs +1 -1
  34. package/dist/index116.js +5 -73
  35. package/dist/index117.cjs +1 -1
  36. package/dist/index117.js +5 -16
  37. package/dist/index118.cjs +9 -1
  38. package/dist/index118.js +35 -10
  39. package/dist/index119.cjs +2 -1
  40. package/dist/index119.js +114 -119
  41. package/dist/index120.cjs +1 -1
  42. package/dist/index120.js +3 -6
  43. package/dist/index121.cjs +1 -1
  44. package/dist/index121.js +17 -44
  45. package/dist/index122.cjs +1 -1
  46. package/dist/index122.js +17 -35
  47. package/dist/index123.cjs +1 -1
  48. package/dist/index123.js +35 -6
  49. package/dist/index124.cjs +1 -1
  50. package/dist/index124.js +21 -88
  51. package/dist/index125.cjs +1 -1
  52. package/dist/index125.js +7 -13
  53. package/dist/index126.cjs +4 -1
  54. package/dist/index126.js +194 -3
  55. package/dist/index127.cjs +3 -1
  56. package/dist/index127.js +451 -26
  57. package/dist/index128.cjs +1 -2
  58. package/dist/index128.js +22 -19
  59. package/dist/index129.cjs +1 -1
  60. package/dist/index129.js +161 -9
  61. package/dist/index130.cjs +1 -1
  62. package/dist/index130.js +127 -8
  63. package/dist/index131.cjs +1 -1
  64. package/dist/index131.js +38 -10
  65. package/dist/index132.cjs +1 -1
  66. package/dist/index132.js +6 -11
  67. package/dist/index133.cjs +1 -1
  68. package/dist/index133.js +27 -13
  69. package/dist/index134.cjs +1 -1
  70. package/dist/index134.js +189 -19
  71. package/dist/index135.cjs +1 -1
  72. package/dist/index135.js +4 -15
  73. package/dist/index136.cjs +1 -1
  74. package/dist/index136.js +73 -4
  75. package/dist/index137.cjs +1 -1
  76. package/dist/index137.js +20 -6
  77. package/dist/index138.cjs +1 -1
  78. package/dist/index138.js +3 -19
  79. package/dist/index139.cjs +1 -1
  80. package/dist/index139.js +16 -10
  81. package/dist/index140.cjs +1 -1
  82. package/dist/index140.js +22 -57
  83. package/dist/index141.cjs +1 -1
  84. package/dist/index141.js +18 -6
  85. package/dist/index142.cjs +1 -1
  86. package/dist/index142.js +34 -13
  87. package/dist/index143.cjs +1 -1
  88. package/dist/index143.js +3 -8
  89. package/dist/index144.cjs +1 -1
  90. package/dist/index144.js +18 -138
  91. package/dist/index145.cjs +1 -1
  92. package/dist/index145.js +27 -7
  93. package/dist/index146.cjs +1 -1
  94. package/dist/index146.js +36 -21
  95. package/dist/index147.cjs +1 -1
  96. package/dist/index147.js +10 -17
  97. package/dist/index148.cjs +1 -1
  98. package/dist/index148.js +24 -42
  99. package/dist/index149.cjs +1 -1
  100. package/dist/index149.js +28 -21
  101. package/dist/index150.cjs +1 -1
  102. package/dist/index150.js +70 -75
  103. package/dist/index151.cjs +1 -1
  104. package/dist/index151.js +9 -11
  105. package/dist/index152.cjs +1 -1
  106. package/dist/index152.js +15 -7
  107. package/dist/index153.cjs +1 -1
  108. package/dist/index153.js +8 -6
  109. package/dist/index154.cjs +1 -1
  110. package/dist/index154.js +10 -41
  111. package/dist/index155.cjs +1 -1
  112. package/dist/index155.js +11 -5
  113. package/dist/index156.cjs +1 -1
  114. package/dist/index156.js +6 -33
  115. package/dist/index157.cjs +1 -1
  116. package/dist/index157.js +6 -9
  117. package/dist/index158.cjs +1 -1
  118. package/dist/index158.js +13 -60
  119. package/dist/index159.cjs +1 -1
  120. package/dist/index159.js +32 -19
  121. package/dist/index160.cjs +1 -1
  122. package/dist/index160.js +5 -107
  123. package/dist/index161.cjs +1 -1
  124. package/dist/index161.js +32 -73
  125. package/dist/index162.cjs +1 -1
  126. package/dist/index162.js +109 -7
  127. package/dist/index163.cjs +1 -1
  128. package/dist/index163.js +166 -85
  129. package/dist/index164.cjs +1 -2
  130. package/dist/index164.js +50 -3
  131. package/dist/index165.cjs +1 -1
  132. package/dist/index165.js +33 -9
  133. package/dist/index166.cjs +1 -1
  134. package/dist/index166.js +7 -13
  135. package/dist/index167.cjs +1 -1
  136. package/dist/index167.js +17 -4
  137. package/dist/index168.cjs +1 -1
  138. package/dist/index168.js +21 -2
  139. package/dist/index169.cjs +1 -1
  140. package/dist/index169.js +41 -30
  141. package/dist/index170.cjs +1 -1
  142. package/dist/index170.js +22 -21
  143. package/dist/index171.cjs +1 -1
  144. package/dist/index171.js +21 -5
  145. package/dist/index172.cjs +1 -1
  146. package/dist/index172.js +51 -5
  147. package/dist/index173.cjs +1 -1
  148. package/dist/index173.js +12 -5
  149. package/dist/index174.cjs +1 -9
  150. package/dist/index174.js +24 -35
  151. package/dist/index175.cjs +1 -1
  152. package/dist/index175.js +25 -3
  153. package/dist/index176.cjs +1 -1
  154. package/dist/index176.js +100 -14
  155. package/dist/index177.cjs +1 -1
  156. package/dist/index177.js +3 -21
  157. package/dist/index178.cjs +1 -1
  158. package/dist/index178.js +5 -35
  159. package/dist/index179.cjs +1 -1
  160. package/dist/index179.js +30 -7
  161. package/dist/index18.cjs +1 -1
  162. package/dist/index18.js +8 -8
  163. package/dist/index180.cjs +1 -4
  164. package/dist/index180.js +3 -194
  165. package/dist/index181.cjs +1 -1
  166. package/dist/index181.js +17 -27
  167. package/dist/index182.cjs +1 -1
  168. package/dist/index182.js +8 -161
  169. package/dist/index183.cjs +1 -1
  170. package/dist/index183.js +79 -126
  171. package/dist/index184.cjs +1 -1
  172. package/dist/index184.js +5 -27
  173. package/dist/index185.cjs +1 -1
  174. package/dist/index185.js +26 -190
  175. package/dist/index186.cjs +1 -1
  176. package/dist/index186.js +17 -4
  177. package/dist/index187.cjs +1 -1
  178. package/dist/index187.js +75 -17
  179. package/dist/index188.cjs +1 -1
  180. package/dist/index188.js +2 -3
  181. package/dist/index189.cjs +1 -1
  182. package/dist/index189.js +14 -16
  183. package/dist/index190.cjs +1 -1
  184. package/dist/index190.js +17 -33
  185. package/dist/index191.cjs +1 -1
  186. package/dist/index191.js +18 -3
  187. package/dist/index192.cjs +1 -1
  188. package/dist/index192.js +10 -27
  189. package/dist/index193.cjs +1 -1
  190. package/dist/index193.js +28 -23
  191. package/dist/index194.cjs +1 -1
  192. package/dist/index194.js +2 -29
  193. package/dist/index195.cjs +1 -1
  194. package/dist/index195.js +13 -6
  195. package/dist/index196.cjs +1 -1
  196. package/dist/index196.js +12 -6
  197. package/dist/index197.cjs +1 -1
  198. package/dist/index197.js +46 -31
  199. package/dist/index198.cjs +1 -1
  200. package/dist/index198.js +12 -5
  201. package/dist/index199.cjs +1 -1
  202. package/dist/index199.js +7 -37
  203. package/dist/index20.cjs +1 -1
  204. package/dist/index20.js +2 -2
  205. package/dist/index200.cjs +1 -1
  206. package/dist/index200.js +68 -47
  207. package/dist/index201.cjs +1 -1
  208. package/dist/index201.js +46 -32
  209. package/dist/index202.cjs +1 -1
  210. package/dist/index202.js +36 -16
  211. package/dist/index203.cjs +1 -1
  212. package/dist/index203.js +17 -42
  213. package/dist/index204.cjs +1 -1
  214. package/dist/index204.js +6 -104
  215. package/dist/index205.cjs +1 -1
  216. package/dist/index205.js +10 -3
  217. package/dist/index206.cjs +1 -1
  218. package/dist/index206.js +13 -5
  219. package/dist/index207.cjs +1 -1
  220. package/dist/index207.js +13 -3
  221. package/dist/index208.cjs +1 -1
  222. package/dist/index208.js +8 -17
  223. package/dist/index209.cjs +1 -1
  224. package/dist/index209.js +35 -8
  225. package/dist/index210.cjs +1 -1
  226. package/dist/index210.js +16 -5
  227. package/dist/index211.cjs +1 -1
  228. package/dist/index211.js +29 -27
  229. package/dist/index212.cjs +1 -1
  230. package/dist/index212.js +14 -78
  231. package/dist/index213.cjs +1 -1
  232. package/dist/index213.js +7 -2
  233. package/dist/index214.cjs +1 -1
  234. package/dist/index214.js +103 -18
  235. package/dist/index215.cjs +1 -1
  236. package/dist/index215.js +74 -16
  237. package/dist/index216.cjs +2 -1
  238. package/dist/index216.js +24 -10
  239. package/dist/index217.cjs +1 -1
  240. package/dist/index217.js +10 -102
  241. package/dist/index218.cjs +1 -1
  242. package/dist/index218.js +18 -15
  243. package/dist/index219.cjs +1 -1
  244. package/dist/index219.js +101 -212
  245. package/dist/index220.cjs +1 -1
  246. package/dist/index220.js +16 -108
  247. package/dist/index221.cjs +1 -1
  248. package/dist/index221.js +206 -198
  249. package/dist/index222.cjs +2 -1
  250. package/dist/index222.js +40 -41
  251. package/dist/index223.cjs +1 -1
  252. package/dist/index223.js +2 -79
  253. package/dist/index224.cjs +1 -1
  254. package/dist/index224.js +6 -2
  255. package/dist/index225.cjs +1 -1
  256. package/dist/index225.js +10 -24
  257. package/dist/index226.cjs +1 -1
  258. package/dist/index226.js +17 -44
  259. package/dist/index227.cjs +1 -1
  260. package/dist/index227.js +8 -9
  261. package/dist/index228.cjs +1 -2
  262. package/dist/index228.js +66 -41
  263. package/dist/index229.cjs +1 -1
  264. package/dist/index229.js +66 -2
  265. package/dist/index23.cjs +1 -1
  266. package/dist/index23.js +2 -2
  267. package/dist/index230.cjs +1 -1
  268. package/dist/index230.js +188 -5
  269. package/dist/index231.cjs +1 -1
  270. package/dist/index231.js +27 -9
  271. package/dist/index232.cjs +1 -1
  272. package/dist/index232.js +74 -17
  273. package/dist/index233.cjs +1 -1
  274. package/dist/index233.js +40 -8
  275. package/dist/index234.cjs +1 -1
  276. package/dist/index234.js +16 -66
  277. package/dist/index235.cjs +1 -1
  278. package/dist/index235.js +12 -64
  279. package/dist/index236.cjs +1 -1
  280. package/dist/index236.js +11 -188
  281. package/dist/index237.cjs +1 -1
  282. package/dist/index237.js +12 -28
  283. package/dist/index238.cjs +1 -1
  284. package/dist/index238.js +103 -71
  285. package/dist/index239.cjs +1 -1
  286. package/dist/index239.js +202 -36
  287. package/dist/index24.cjs +1 -1
  288. package/dist/index24.js +5 -5
  289. package/dist/index240.cjs +1 -1
  290. package/dist/index240.js +41 -15
  291. package/dist/index241.cjs +1 -1
  292. package/dist/index241.js +77 -12
  293. package/dist/index242.cjs +1 -1
  294. package/dist/index242.js +2 -12
  295. package/dist/index243.cjs +1 -1
  296. package/dist/index243.js +19 -12
  297. package/dist/index245.cjs +1 -1
  298. package/dist/index245.js +2 -2
  299. package/dist/index246.cjs +1 -1
  300. package/dist/index246.js +25 -18
  301. package/dist/index247.cjs +1 -1
  302. package/dist/index247.js +45 -25
  303. package/dist/index248.cjs +1 -1
  304. package/dist/index248.js +9 -11
  305. package/dist/index249.cjs +1 -1
  306. package/dist/index249.js +24 -19
  307. package/dist/index25.cjs +1 -1
  308. package/dist/index25.js +2 -2
  309. package/dist/index250.cjs +1 -1
  310. package/dist/index250.js +2 -2
  311. package/dist/index251.cjs +1 -1
  312. package/dist/index251.js +2 -2
  313. package/dist/index252.cjs +1 -2
  314. package/dist/index252.js +68 -91
  315. package/dist/index253.cjs +2 -1
  316. package/dist/index253.js +91 -14
  317. package/dist/index254.cjs +1 -1
  318. package/dist/index254.js +14 -68
  319. package/dist/index26.cjs +1 -1
  320. package/dist/index26.js +1 -1
  321. package/dist/index30.cjs +1 -1
  322. package/dist/index30.js +3 -3
  323. package/dist/index31.cjs +1 -1
  324. package/dist/index31.js +2 -2
  325. package/dist/index32.cjs +1 -1
  326. package/dist/index32.js +2 -2
  327. package/dist/index33.cjs +1 -1
  328. package/dist/index33.js +2 -2
  329. package/dist/index41.cjs +1 -1
  330. package/dist/index41.js +1 -1
  331. package/dist/index42.cjs +1 -1
  332. package/dist/index42.js +1 -1
  333. package/dist/index44.cjs +1 -1
  334. package/dist/index44.js +1 -1
  335. package/dist/index45.cjs +1 -1
  336. package/dist/index45.js +1 -1
  337. package/dist/index47.cjs +1 -1
  338. package/dist/index47.js +2 -2
  339. package/dist/index48.cjs +1 -1
  340. package/dist/index48.js +1 -1
  341. package/dist/index49.cjs +1 -1
  342. package/dist/index49.js +12 -12
  343. package/dist/index50.cjs +1 -1
  344. package/dist/index50.js +3 -3
  345. package/dist/index51.cjs +1 -1
  346. package/dist/index51.js +7 -171
  347. package/dist/index52.cjs +1 -1
  348. package/dist/index52.js +30 -110
  349. package/dist/index53.cjs +1 -1
  350. package/dist/index53.js +29 -30
  351. package/dist/index54.cjs +1 -1
  352. package/dist/index54.js +17 -2
  353. package/dist/index55.cjs +1 -1
  354. package/dist/index55.js +34 -4
  355. package/dist/index56.cjs +1 -2
  356. package/dist/index56.js +43 -58
  357. package/dist/index57.cjs +1 -2
  358. package/dist/index57.js +150 -53
  359. package/dist/index58.cjs +1 -3
  360. package/dist/index58.js +39 -213
  361. package/dist/index59.cjs +1 -1
  362. package/dist/index59.js +57 -22
  363. package/dist/index60.cjs +2 -1
  364. package/dist/index60.js +59 -18
  365. package/dist/index61.cjs +1 -1
  366. package/dist/index61.js +13 -10
  367. package/dist/index62.cjs +1 -1
  368. package/dist/index62.js +37 -20
  369. package/dist/index63.cjs +1 -1
  370. package/dist/index63.js +15 -13
  371. package/dist/index64.cjs +1 -1
  372. package/dist/index64.js +8 -12
  373. package/dist/index65.cjs +1 -1
  374. package/dist/index65.js +20 -24
  375. package/dist/index66.cjs +1 -1
  376. package/dist/index66.js +2 -29
  377. package/dist/index67.cjs +1 -1
  378. package/dist/index67.js +44 -46
  379. package/dist/index68.cjs +1 -1
  380. package/dist/index68.js +33 -16
  381. package/dist/index69.cjs +1 -1
  382. package/dist/index69.js +8 -10
  383. package/dist/index70.cjs +1 -1
  384. package/dist/index70.js +58 -29
  385. package/dist/index71.cjs +1 -1
  386. package/dist/index71.js +76 -35
  387. package/dist/index72.cjs +1 -1
  388. package/dist/index72.js +7 -7
  389. package/dist/index73.cjs +1 -1
  390. package/dist/index73.js +16 -29
  391. package/dist/index74.cjs +1 -1
  392. package/dist/index74.js +9 -21
  393. package/dist/index75.cjs +1 -1
  394. package/dist/index75.js +5 -7
  395. package/dist/index76.cjs +1 -1
  396. package/dist/index76.js +13 -69
  397. package/dist/index77.cjs +1 -1
  398. package/dist/index77.js +3 -46
  399. package/dist/index78.cjs +1 -1
  400. package/dist/index78.js +25 -22
  401. package/dist/index79.cjs +1 -1
  402. package/dist/index79.js +161 -34
  403. package/dist/index80.cjs +1 -1
  404. package/dist/index80.js +4 -17
  405. package/dist/index81.cjs +1 -1
  406. package/dist/index81.js +6 -6
  407. package/dist/index82.cjs +1 -1
  408. package/dist/index82.js +89 -8
  409. package/dist/index83.cjs +1 -1
  410. package/dist/index83.js +9 -12
  411. package/dist/index84.cjs +1 -1
  412. package/dist/index84.js +6 -164
  413. package/dist/index85.cjs +1 -1
  414. package/dist/index85.js +13 -77
  415. package/dist/index86.cjs +1 -1
  416. package/dist/index86.js +125 -13
  417. package/dist/index87.cjs +1 -1
  418. package/dist/index87.js +137 -50
  419. package/dist/index88.cjs +1 -1
  420. package/dist/index88.js +7 -7
  421. package/dist/index89.cjs +1 -1
  422. package/dist/index89.js +21 -7
  423. package/dist/index90.cjs +1 -1
  424. package/dist/index90.js +17 -21
  425. package/dist/index91.cjs +1 -1
  426. package/dist/index91.js +43 -8
  427. package/dist/index92.cjs +1 -1
  428. package/dist/index92.js +20 -30
  429. package/dist/index93.cjs +1 -1
  430. package/dist/index93.js +11 -16
  431. package/dist/index94.cjs +1 -1
  432. package/dist/index94.js +6 -73
  433. package/dist/index95.cjs +1 -1
  434. package/dist/index95.js +5 -35
  435. package/dist/index96.cjs +1 -1
  436. package/dist/index96.js +19 -16
  437. package/dist/index97.cjs +1 -1
  438. package/dist/index97.js +103 -72
  439. package/dist/index98.cjs +1 -1
  440. package/dist/index98.js +78 -12
  441. package/dist/index99.cjs +1 -1
  442. package/dist/index99.js +8 -28
  443. package/package.json +1 -1
package/dist/index252.js CHANGED
@@ -1,94 +1,71 @@
1
- import { getVersion as f } from "./index255.js";
2
- class r extends Error {
3
- static setStaticOptions(t) {
4
- r.prototype.docsOrigin = t.docsOrigin, r.prototype.showVersion = t.showVersion, r.prototype.version = t.version;
5
- }
6
- constructor(t, e = {}) {
7
- const i = (() => {
8
- var a;
9
- if (e.cause instanceof r) {
10
- if (e.cause.details)
11
- return e.cause.details;
12
- if (e.cause.shortMessage)
13
- return e.cause.shortMessage;
14
- }
15
- return e.cause && "details" in e.cause && typeof e.cause.details == "string" ? e.cause.details : (a = e.cause) != null && a.message ? e.cause.message : e.details;
16
- })(), u = e.cause instanceof r && e.cause.docsPath || e.docsPath, n = e.docsOrigin ?? r.prototype.docsOrigin, l = `${n}${u ?? ""}`, c = !!(e.version ?? r.prototype.showVersion), o = e.version ?? r.prototype.version, b = [
17
- t || "An error occurred.",
18
- ...e.metaMessages ? ["", ...e.metaMessages] : [],
19
- ...i || u || c ? [
20
- "",
21
- i ? `Details: ${i}` : void 0,
22
- u ? `See: ${l}` : void 0,
23
- c ? `Version: ${o}` : void 0
24
- ] : []
25
- ].filter((a) => typeof a == "string").join(`
26
- `);
27
- super(b, e.cause ? { cause: e.cause } : void 0), Object.defineProperty(this, "details", {
28
- enumerable: !0,
29
- configurable: !0,
30
- writable: !0,
31
- value: void 0
32
- }), Object.defineProperty(this, "docs", {
33
- enumerable: !0,
34
- configurable: !0,
35
- writable: !0,
36
- value: void 0
37
- }), Object.defineProperty(this, "docsOrigin", {
38
- enumerable: !0,
39
- configurable: !0,
40
- writable: !0,
41
- value: void 0
42
- }), Object.defineProperty(this, "docsPath", {
43
- enumerable: !0,
44
- configurable: !0,
45
- writable: !0,
46
- value: void 0
47
- }), Object.defineProperty(this, "shortMessage", {
48
- enumerable: !0,
49
- configurable: !0,
50
- writable: !0,
51
- value: void 0
52
- }), Object.defineProperty(this, "showVersion", {
53
- enumerable: !0,
54
- configurable: !0,
55
- writable: !0,
56
- value: void 0
57
- }), Object.defineProperty(this, "version", {
58
- enumerable: !0,
59
- configurable: !0,
60
- writable: !0,
61
- value: void 0
62
- }), Object.defineProperty(this, "cause", {
63
- enumerable: !0,
64
- configurable: !0,
65
- writable: !0,
66
- value: void 0
67
- }), Object.defineProperty(this, "name", {
68
- enumerable: !0,
69
- configurable: !0,
70
- writable: !0,
71
- value: "BaseError"
72
- }), this.cause = e.cause, this.details = i, this.docs = l, this.docsOrigin = n, this.docsPath = u, this.shortMessage = t, this.showVersion = c, this.version = o;
73
- }
74
- walk(t) {
75
- return d(this, t);
76
- }
77
- }
78
- Object.defineProperty(r, "defaultStaticOptions", {
79
- enumerable: !0,
80
- configurable: !0,
81
- writable: !0,
82
- value: {
83
- docsOrigin: "https://oxlib.sh",
84
- showVersion: !1,
85
- version: `ox@${f()}`
86
- }
87
- });
88
- r.setStaticOptions(r.defaultStaticOptions);
89
- function d(s, t) {
90
- return t != null && t(s) ? s : s && typeof s == "object" && "cause" in s && s.cause ? d(s.cause, t) : t ? null : s;
1
+ function d(y, i, a) {
2
+ let e = "";
3
+ if (a)
4
+ for (const t of Object.entries(a)) {
5
+ if (!t)
6
+ continue;
7
+ let s = "";
8
+ for (const n of t[1])
9
+ s += `[${n.type}${n.name ? `:${n.name}` : ""}]`;
10
+ e += `(${t[0]}{${s}})`;
11
+ }
12
+ return i ? `${i}:${y}${e}` : `${y}${e}`;
91
13
  }
14
+ const p = /* @__PURE__ */ new Map([
15
+ // Unnamed
16
+ ["address", { type: "address" }],
17
+ ["bool", { type: "bool" }],
18
+ ["bytes", { type: "bytes" }],
19
+ ["bytes32", { type: "bytes32" }],
20
+ ["int", { type: "int256" }],
21
+ ["int256", { type: "int256" }],
22
+ ["string", { type: "string" }],
23
+ ["uint", { type: "uint256" }],
24
+ ["uint8", { type: "uint8" }],
25
+ ["uint16", { type: "uint16" }],
26
+ ["uint24", { type: "uint24" }],
27
+ ["uint32", { type: "uint32" }],
28
+ ["uint64", { type: "uint64" }],
29
+ ["uint96", { type: "uint96" }],
30
+ ["uint112", { type: "uint112" }],
31
+ ["uint160", { type: "uint160" }],
32
+ ["uint192", { type: "uint192" }],
33
+ ["uint256", { type: "uint256" }],
34
+ // Named
35
+ ["address owner", { type: "address", name: "owner" }],
36
+ ["address to", { type: "address", name: "to" }],
37
+ ["bool approved", { type: "bool", name: "approved" }],
38
+ ["bytes _data", { type: "bytes", name: "_data" }],
39
+ ["bytes data", { type: "bytes", name: "data" }],
40
+ ["bytes signature", { type: "bytes", name: "signature" }],
41
+ ["bytes32 hash", { type: "bytes32", name: "hash" }],
42
+ ["bytes32 r", { type: "bytes32", name: "r" }],
43
+ ["bytes32 root", { type: "bytes32", name: "root" }],
44
+ ["bytes32 s", { type: "bytes32", name: "s" }],
45
+ ["string name", { type: "string", name: "name" }],
46
+ ["string symbol", { type: "string", name: "symbol" }],
47
+ ["string tokenURI", { type: "string", name: "tokenURI" }],
48
+ ["uint tokenId", { type: "uint256", name: "tokenId" }],
49
+ ["uint8 v", { type: "uint8", name: "v" }],
50
+ ["uint256 balance", { type: "uint256", name: "balance" }],
51
+ ["uint256 tokenId", { type: "uint256", name: "tokenId" }],
52
+ ["uint256 value", { type: "uint256", name: "value" }],
53
+ // Indexed
54
+ [
55
+ "event:address indexed from",
56
+ { type: "address", name: "from", indexed: !0 }
57
+ ],
58
+ ["event:address indexed to", { type: "address", name: "to", indexed: !0 }],
59
+ [
60
+ "event:uint indexed tokenId",
61
+ { type: "uint256", name: "tokenId", indexed: !0 }
62
+ ],
63
+ [
64
+ "event:uint256 indexed tokenId",
65
+ { type: "uint256", name: "tokenId", indexed: !0 }
66
+ ]
67
+ ]);
92
68
  export {
93
- r as BaseError
69
+ d as getParameterCacheKey,
70
+ p as parameterCache
94
71
  };
package/dist/index253.cjs CHANGED
@@ -1 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index226.cjs");function d(r,i={}){const{dir:n,size:e=32}=i;if(e===0)return r;const t=r.replace("0x","");if(t.length>e*2)throw new a.SizeExceedsPaddingSizeError({size:Math.ceil(t.length/2),targetSize:e,type:"Hex"});return`0x${t[n==="right"?"padEnd":"padStart"](e*2,"0")}`}exports.pad=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index255.cjs");class r extends Error{static setStaticOptions(t){r.prototype.docsOrigin=t.docsOrigin,r.prototype.showVersion=t.showVersion,r.prototype.version=t.version}constructor(t,e={}){const i=(()=>{var a;if(e.cause instanceof r){if(e.cause.details)return e.cause.details;if(e.cause.shortMessage)return e.cause.shortMessage}return e.cause&&"details"in e.cause&&typeof e.cause.details=="string"?e.cause.details:(a=e.cause)!=null&&a.message?e.cause.message:e.details})(),u=e.cause instanceof r&&e.cause.docsPath||e.docsPath,n=e.docsOrigin??r.prototype.docsOrigin,l=`${n}${u??""}`,c=!!(e.version??r.prototype.showVersion),o=e.version??r.prototype.version,b=[t||"An error occurred.",...e.metaMessages?["",...e.metaMessages]:[],...i||u||c?["",i?`Details: ${i}`:void 0,u?`See: ${l}`:void 0,c?`Version: ${o}`:void 0]:[]].filter(a=>typeof a=="string").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,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{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,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{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,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=e.cause,this.details=i,this.docs=l,this.docsOrigin=n,this.docsPath=u,this.shortMessage=t,this.showVersion=c,this.version=o}walk(t){return d(this,t)}}Object.defineProperty(r,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${f.getVersion()}`}});r.setStaticOptions(r.defaultStaticOptions);function d(s,t){return t!=null&&t(s)?s:s&&typeof s=="object"&&"cause"in s&&s.cause?d(s.cause,t):t?null:s}exports.BaseError=r;
package/dist/index253.js CHANGED
@@ -1,17 +1,94 @@
1
- import { SizeExceedsPaddingSizeError as a } from "./index226.js";
2
- function o(r, i = {}) {
3
- const { dir: n, size: e = 32 } = i;
4
- if (e === 0)
5
- return r;
6
- const t = r.replace("0x", "");
7
- if (t.length > e * 2)
8
- throw new a({
9
- size: Math.ceil(t.length / 2),
10
- targetSize: e,
11
- type: "Hex"
12
- });
13
- return `0x${t[n === "right" ? "padEnd" : "padStart"](e * 2, "0")}`;
1
+ import { getVersion as f } from "./index255.js";
2
+ class r extends Error {
3
+ static setStaticOptions(t) {
4
+ r.prototype.docsOrigin = t.docsOrigin, r.prototype.showVersion = t.showVersion, r.prototype.version = t.version;
5
+ }
6
+ constructor(t, e = {}) {
7
+ const i = (() => {
8
+ var a;
9
+ if (e.cause instanceof r) {
10
+ if (e.cause.details)
11
+ return e.cause.details;
12
+ if (e.cause.shortMessage)
13
+ return e.cause.shortMessage;
14
+ }
15
+ return e.cause && "details" in e.cause && typeof e.cause.details == "string" ? e.cause.details : (a = e.cause) != null && a.message ? e.cause.message : e.details;
16
+ })(), u = e.cause instanceof r && e.cause.docsPath || e.docsPath, n = e.docsOrigin ?? r.prototype.docsOrigin, l = `${n}${u ?? ""}`, c = !!(e.version ?? r.prototype.showVersion), o = e.version ?? r.prototype.version, b = [
17
+ t || "An error occurred.",
18
+ ...e.metaMessages ? ["", ...e.metaMessages] : [],
19
+ ...i || u || c ? [
20
+ "",
21
+ i ? `Details: ${i}` : void 0,
22
+ u ? `See: ${l}` : void 0,
23
+ c ? `Version: ${o}` : void 0
24
+ ] : []
25
+ ].filter((a) => typeof a == "string").join(`
26
+ `);
27
+ super(b, e.cause ? { cause: e.cause } : void 0), Object.defineProperty(this, "details", {
28
+ enumerable: !0,
29
+ configurable: !0,
30
+ writable: !0,
31
+ value: void 0
32
+ }), Object.defineProperty(this, "docs", {
33
+ enumerable: !0,
34
+ configurable: !0,
35
+ writable: !0,
36
+ value: void 0
37
+ }), Object.defineProperty(this, "docsOrigin", {
38
+ enumerable: !0,
39
+ configurable: !0,
40
+ writable: !0,
41
+ value: void 0
42
+ }), Object.defineProperty(this, "docsPath", {
43
+ enumerable: !0,
44
+ configurable: !0,
45
+ writable: !0,
46
+ value: void 0
47
+ }), Object.defineProperty(this, "shortMessage", {
48
+ enumerable: !0,
49
+ configurable: !0,
50
+ writable: !0,
51
+ value: void 0
52
+ }), Object.defineProperty(this, "showVersion", {
53
+ enumerable: !0,
54
+ configurable: !0,
55
+ writable: !0,
56
+ value: void 0
57
+ }), Object.defineProperty(this, "version", {
58
+ enumerable: !0,
59
+ configurable: !0,
60
+ writable: !0,
61
+ value: void 0
62
+ }), Object.defineProperty(this, "cause", {
63
+ enumerable: !0,
64
+ configurable: !0,
65
+ writable: !0,
66
+ value: void 0
67
+ }), Object.defineProperty(this, "name", {
68
+ enumerable: !0,
69
+ configurable: !0,
70
+ writable: !0,
71
+ value: "BaseError"
72
+ }), this.cause = e.cause, this.details = i, this.docs = l, this.docsOrigin = n, this.docsPath = u, this.shortMessage = t, this.showVersion = c, this.version = o;
73
+ }
74
+ walk(t) {
75
+ return d(this, t);
76
+ }
77
+ }
78
+ Object.defineProperty(r, "defaultStaticOptions", {
79
+ enumerable: !0,
80
+ configurable: !0,
81
+ writable: !0,
82
+ value: {
83
+ docsOrigin: "https://oxlib.sh",
84
+ showVersion: !1,
85
+ version: `ox@${f()}`
86
+ }
87
+ });
88
+ r.setStaticOptions(r.defaultStaticOptions);
89
+ function d(s, t) {
90
+ return t != null && t(s) ? s : s && typeof s == "object" && "cause" in s && s.cause ? d(s.cause, t) : t ? null : s;
14
91
  }
15
92
  export {
16
- o as pad
93
+ r as BaseError
17
94
  };
package/dist/index254.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(a,y,i){let e="";if(i)for(const t of Object.entries(i)){if(!t)continue;let s="";for(const n of t[1])s+=`[${n.type}${n.name?`:${n.name}`:""}]`;e+=`(${t[0]}{${s}})`}return y?`${y}:${a}${e}`:`${a}${e}`}const d=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);exports.getParameterCacheKey=r;exports.parameterCache=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index247.cjs");function d(r,i={}){const{dir:n,size:e=32}=i;if(e===0)return r;const t=r.replace("0x","");if(t.length>e*2)throw new a.SizeExceedsPaddingSizeError({size:Math.ceil(t.length/2),targetSize:e,type:"Hex"});return`0x${t[n==="right"?"padEnd":"padStart"](e*2,"0")}`}exports.pad=d;
package/dist/index254.js CHANGED
@@ -1,71 +1,17 @@
1
- function d(y, i, a) {
2
- let e = "";
3
- if (a)
4
- for (const t of Object.entries(a)) {
5
- if (!t)
6
- continue;
7
- let s = "";
8
- for (const n of t[1])
9
- s += `[${n.type}${n.name ? `:${n.name}` : ""}]`;
10
- e += `(${t[0]}{${s}})`;
11
- }
12
- return i ? `${i}:${y}${e}` : `${y}${e}`;
1
+ import { SizeExceedsPaddingSizeError as a } from "./index247.js";
2
+ function o(r, i = {}) {
3
+ const { dir: n, size: e = 32 } = i;
4
+ if (e === 0)
5
+ return r;
6
+ const t = r.replace("0x", "");
7
+ if (t.length > e * 2)
8
+ throw new a({
9
+ size: Math.ceil(t.length / 2),
10
+ targetSize: e,
11
+ type: "Hex"
12
+ });
13
+ return `0x${t[n === "right" ? "padEnd" : "padStart"](e * 2, "0")}`;
13
14
  }
14
- const p = /* @__PURE__ */ new Map([
15
- // Unnamed
16
- ["address", { type: "address" }],
17
- ["bool", { type: "bool" }],
18
- ["bytes", { type: "bytes" }],
19
- ["bytes32", { type: "bytes32" }],
20
- ["int", { type: "int256" }],
21
- ["int256", { type: "int256" }],
22
- ["string", { type: "string" }],
23
- ["uint", { type: "uint256" }],
24
- ["uint8", { type: "uint8" }],
25
- ["uint16", { type: "uint16" }],
26
- ["uint24", { type: "uint24" }],
27
- ["uint32", { type: "uint32" }],
28
- ["uint64", { type: "uint64" }],
29
- ["uint96", { type: "uint96" }],
30
- ["uint112", { type: "uint112" }],
31
- ["uint160", { type: "uint160" }],
32
- ["uint192", { type: "uint192" }],
33
- ["uint256", { type: "uint256" }],
34
- // Named
35
- ["address owner", { type: "address", name: "owner" }],
36
- ["address to", { type: "address", name: "to" }],
37
- ["bool approved", { type: "bool", name: "approved" }],
38
- ["bytes _data", { type: "bytes", name: "_data" }],
39
- ["bytes data", { type: "bytes", name: "data" }],
40
- ["bytes signature", { type: "bytes", name: "signature" }],
41
- ["bytes32 hash", { type: "bytes32", name: "hash" }],
42
- ["bytes32 r", { type: "bytes32", name: "r" }],
43
- ["bytes32 root", { type: "bytes32", name: "root" }],
44
- ["bytes32 s", { type: "bytes32", name: "s" }],
45
- ["string name", { type: "string", name: "name" }],
46
- ["string symbol", { type: "string", name: "symbol" }],
47
- ["string tokenURI", { type: "string", name: "tokenURI" }],
48
- ["uint tokenId", { type: "uint256", name: "tokenId" }],
49
- ["uint8 v", { type: "uint8", name: "v" }],
50
- ["uint256 balance", { type: "uint256", name: "balance" }],
51
- ["uint256 tokenId", { type: "uint256", name: "tokenId" }],
52
- ["uint256 value", { type: "uint256", name: "value" }],
53
- // Indexed
54
- [
55
- "event:address indexed from",
56
- { type: "address", name: "from", indexed: !0 }
57
- ],
58
- ["event:address indexed to", { type: "address", name: "to", indexed: !0 }],
59
- [
60
- "event:uint indexed tokenId",
61
- { type: "uint256", name: "tokenId", indexed: !0 }
62
- ],
63
- [
64
- "event:uint256 indexed tokenId",
65
- { type: "uint256", name: "tokenId", indexed: !0 }
66
- ]
67
- ]);
68
15
  export {
69
- d as getParameterCacheKey,
70
- p as parameterCache
16
+ o as pad
71
17
  };
package/dist/index26.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index202.cjs"),t=e.defineChain({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}});exports.mainnet=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index167.cjs"),t=e.defineChain({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}});exports.mainnet=t;
package/dist/index26.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineChain as e } from "./index202.js";
1
+ import { defineChain as e } from "./index167.js";
2
2
  const t = /* @__PURE__ */ e({
3
3
  id: 1,
4
4
  name: "Ethereum",
package/dist/index30.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./index217.cjs"),C=require("./index218.cjs"),n=require("./index219.cjs");/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const k=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),x=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),G=BigInt(0),M=BigInt(1),w=BigInt(2),h=(t,f)=>(t+f/w)/f;function N(t){const f=k,e=BigInt(3),r=BigInt(6),p=BigInt(11),a=BigInt(22),s=BigInt(23),i=BigInt(44),d=BigInt(88),o=t*t*t%f,c=o*o*t%f,g=n.pow2(c,e,f)*c%f,b=n.pow2(g,e,f)*c%f,l=n.pow2(b,w,f)*o%f,B=n.pow2(l,p,f)*l%f,I=n.pow2(B,a,f)*B%f,_=n.pow2(I,i,f)*I%f,m=n.pow2(_,d,f)*_%f,S=n.pow2(m,i,f)*I%f,P=n.pow2(S,e,f)*c%f,v=n.pow2(P,s,f)*B%f,E=n.pow2(v,r,f)*o%f,q=n.pow2(E,w,f);if(!u.eql(u.sqr(q),t))throw new Error("Cannot find square root");return q}const u=n.Field(k,void 0,void 0,{sqrt:N}),O=C.createCurve({a:G,b:BigInt(7),Fp:u,n:x,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const f=x,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-M*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),p=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=e,s=BigInt("0x100000000000000000000000000000000"),i=h(a*t,f),d=h(-r*t,f);let o=n.mod(t-i*e-d*p,f),c=n.mod(-i*r-d*a,f);const g=o>s,b=c>s;if(g&&(o=f-o),b&&(c=f-c),o>s||c>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:g,k1:o,k2neg:b,k2:c}}}},F.sha256);exports.secp256k1=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./index219.cjs"),C=require("./index220.cjs"),n=require("./index221.cjs");/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const k=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),x=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),G=BigInt(0),M=BigInt(1),w=BigInt(2),h=(t,f)=>(t+f/w)/f;function N(t){const f=k,e=BigInt(3),r=BigInt(6),p=BigInt(11),a=BigInt(22),s=BigInt(23),i=BigInt(44),d=BigInt(88),o=t*t*t%f,c=o*o*t%f,g=n.pow2(c,e,f)*c%f,b=n.pow2(g,e,f)*c%f,l=n.pow2(b,w,f)*o%f,B=n.pow2(l,p,f)*l%f,I=n.pow2(B,a,f)*B%f,_=n.pow2(I,i,f)*I%f,m=n.pow2(_,d,f)*_%f,S=n.pow2(m,i,f)*I%f,P=n.pow2(S,e,f)*c%f,v=n.pow2(P,s,f)*B%f,E=n.pow2(v,r,f)*o%f,q=n.pow2(E,w,f);if(!u.eql(u.sqr(q),t))throw new Error("Cannot find square root");return q}const u=n.Field(k,void 0,void 0,{sqrt:N}),O=C.createCurve({a:G,b:BigInt(7),Fp:u,n:x,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const f=x,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-M*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),p=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=e,s=BigInt("0x100000000000000000000000000000000"),i=h(a*t,f),d=h(-r*t,f);let o=n.mod(t-i*e-d*p,f),c=n.mod(-i*r-d*a,f);const g=o>s,b=c>s;if(g&&(o=f-o),b&&(c=f-c),o>s||c>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:g,k1:o,k2neg:b,k2:c}}}},F.sha256);exports.secp256k1=O;
package/dist/index30.js CHANGED
@@ -1,6 +1,6 @@
1
- import { sha256 as C } from "./index217.js";
2
- import { createCurve as G } from "./index218.js";
3
- import { Field as N, mod as k, pow2 as t } from "./index219.js";
1
+ import { sha256 as C } from "./index219.js";
2
+ import { createCurve as G } from "./index220.js";
3
+ import { Field as N, mod as k, pow2 as t } from "./index221.js";
4
4
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
5
5
  const q = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), w = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), M = BigInt(0), O = BigInt(1), _ = BigInt(2), h = (n, f) => (n + f / _) / f;
6
6
  function W(n) {
package/dist/index31.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index177.cjs"),u=require("./index167.cjs");function o(n,{size:e}){if(u.size(n)>e)throw new s.SizeOverflowError({givenSize:u.size(n),maxSize:e})}function g(n,e={}){const{signed:r}=e;e.size&&o(n,{size:e.size});const i=BigInt(n);if(!r)return i;const t=(n.length-2)/2,a=(1n<<BigInt(t)*8n-1n)-1n;return i<=a?i:i-BigInt(`0x${"f".padStart(t*2,"f")}`)-1n}function c(n,e={}){const r=g(n,e),i=Number(r);if(!Number.isSafeInteger(i))throw new s.IntegerOutOfRangeError({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:e.signed,size:e.size,value:`${r}n`});return i}exports.assertSize=o;exports.hexToBigInt=g;exports.hexToNumber=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index122.cjs"),u=require("./index107.cjs");function o(n,{size:e}){if(u.size(n)>e)throw new s.SizeOverflowError({givenSize:u.size(n),maxSize:e})}function g(n,e={}){const{signed:r}=e;e.size&&o(n,{size:e.size});const i=BigInt(n);if(!r)return i;const t=(n.length-2)/2,a=(1n<<BigInt(t)*8n-1n)-1n;return i<=a?i:i-BigInt(`0x${"f".padStart(t*2,"f")}`)-1n}function c(n,e={}){const r=g(n,e),i=Number(r);if(!Number.isSafeInteger(i))throw new s.IntegerOutOfRangeError({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:e.signed,size:e.size,value:`${r}n`});return i}exports.assertSize=o;exports.hexToBigInt=g;exports.hexToNumber=c;
package/dist/index31.js CHANGED
@@ -1,5 +1,5 @@
1
- import { IntegerOutOfRangeError as f, SizeOverflowError as m } from "./index177.js";
2
- import { size as o } from "./index167.js";
1
+ import { IntegerOutOfRangeError as f, SizeOverflowError as m } from "./index122.js";
2
+ import { size as o } from "./index107.js";
3
3
  function s(n, { size: e }) {
4
4
  if (o(n) > e)
5
5
  throw new m({
package/dist/index32.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index56.cjs"),l=require("./index46.cjs"),u=require("./index190.cjs"),f=require("./index31.cjs"),m=require("./index33.cjs"),h=new TextEncoder;function A(e,n={}){return typeof e=="number"||typeof e=="bigint"?B(e,n):typeof e=="boolean"?x(e,n):l.isHex(e)?c(e,n):T(e,n)}function x(e,n={}){const t=new Uint8Array(1);return t[0]=Number(e),typeof n.size=="number"?(f.assertSize(t,{size:n.size}),u.pad(t,{size:n.size})):t}const i={zero:48,nine:57,A:65,F:70,a:97,f:102};function g(e){if(e>=i.zero&&e<=i.nine)return e-i.zero;if(e>=i.A&&e<=i.F)return e-(i.A-10);if(e>=i.a&&e<=i.f)return e-(i.a-10)}function c(e,n={}){let t=e;n.size&&(f.assertSize(t,{size:n.size}),t=u.pad(t,{dir:"right",size:n.size}));let r=t.slice(2);r.length%2&&(r=`0${r}`);const d=r.length/2,y=new Uint8Array(d);for(let s=0,o=0;s<d;s++){const b=g(r.charCodeAt(o++)),z=g(r.charCodeAt(o++));if(b===void 0||z===void 0)throw new a.BaseError(`Invalid byte sequence ("${r[o-2]}${r[o-1]}" in "${r}").`);y[s]=b*16+z}return y}function B(e,n){const t=m.numberToHex(e,n);return c(t)}function T(e,n={}){const t=h.encode(e);return typeof n.size=="number"?(f.assertSize(t,{size:n.size}),u.pad(t,{dir:"right",size:n.size})):t}exports.boolToBytes=x;exports.hexToBytes=c;exports.numberToBytes=B;exports.stringToBytes=T;exports.toBytes=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index60.cjs"),l=require("./index46.cjs"),u=require("./index142.cjs"),f=require("./index31.cjs"),m=require("./index33.cjs"),h=new TextEncoder;function A(e,n={}){return typeof e=="number"||typeof e=="bigint"?B(e,n):typeof e=="boolean"?x(e,n):l.isHex(e)?c(e,n):T(e,n)}function x(e,n={}){const t=new Uint8Array(1);return t[0]=Number(e),typeof n.size=="number"?(f.assertSize(t,{size:n.size}),u.pad(t,{size:n.size})):t}const i={zero:48,nine:57,A:65,F:70,a:97,f:102};function g(e){if(e>=i.zero&&e<=i.nine)return e-i.zero;if(e>=i.A&&e<=i.F)return e-(i.A-10);if(e>=i.a&&e<=i.f)return e-(i.a-10)}function c(e,n={}){let t=e;n.size&&(f.assertSize(t,{size:n.size}),t=u.pad(t,{dir:"right",size:n.size}));let r=t.slice(2);r.length%2&&(r=`0${r}`);const d=r.length/2,y=new Uint8Array(d);for(let s=0,o=0;s<d;s++){const b=g(r.charCodeAt(o++)),z=g(r.charCodeAt(o++));if(b===void 0||z===void 0)throw new a.BaseError(`Invalid byte sequence ("${r[o-2]}${r[o-1]}" in "${r}").`);y[s]=b*16+z}return y}function B(e,n){const t=m.numberToHex(e,n);return c(t)}function T(e,n={}){const t=h.encode(e);return typeof n.size=="number"?(f.assertSize(t,{size:n.size}),u.pad(t,{dir:"right",size:n.size})):t}exports.boolToBytes=x;exports.hexToBytes=c;exports.numberToBytes=B;exports.stringToBytes=T;exports.toBytes=A;
package/dist/index32.js CHANGED
@@ -1,6 +1,6 @@
1
- import { BaseError as g } from "./index56.js";
1
+ import { BaseError as g } from "./index60.js";
2
2
  import { isHex as x } from "./index46.js";
3
- import { pad as s } from "./index190.js";
3
+ import { pad as s } from "./index142.js";
4
4
  import { assertSize as u } from "./index31.js";
5
5
  import { numberToHex as h } from "./index33.js";
6
6
  const A = /* @__PURE__ */ new TextEncoder();
package/dist/index33.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index177.cjs"),f=require("./index190.cjs"),x=require("./index31.cjs"),z=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0"));function H(e,n={}){return typeof e=="number"||typeof e=="bigint"?d(e,n):typeof e=="string"?m(e,n):typeof e=="boolean"?b(e,n):u(e,n)}function b(e,n={}){const t=`0x${Number(e)}`;return typeof n.size=="number"?(x.assertSize(t,{size:n.size}),f.pad(t,{size:n.size})):t}function u(e,n={}){let t="";for(let i=0;i<e.length;i++)t+=z[e[i]];const r=`0x${t}`;return typeof n.size=="number"?(x.assertSize(r,{size:n.size}),f.pad(r,{dir:"right",size:n.size})):r}function d(e,n={}){const{signed:t,size:r}=n,i=BigInt(e);let o;r?t?o=(1n<<BigInt(r)*8n-1n)-1n:o=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(o=BigInt(Number.MAX_SAFE_INTEGER));const c=typeof o=="bigint"&&t?-o-1n:0;if(o&&i>o||i<c){const s=typeof e=="bigint"?"n":"";throw new y.IntegerOutOfRangeError({max:o?`${o}${s}`:void 0,min:`${c}${s}`,signed:t,size:r,value:`${e}${s}`})}const g=`0x${(t&&i<0?(1n<<BigInt(r*8))+BigInt(i):i).toString(16)}`;return r?f.pad(g,{size:r}):g}const T=new TextEncoder;function m(e,n={}){const t=T.encode(e);return u(t,n)}exports.boolToHex=b;exports.bytesToHex=u;exports.numberToHex=d;exports.stringToHex=m;exports.toHex=H;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index122.cjs"),f=require("./index142.cjs"),x=require("./index31.cjs"),z=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0"));function H(e,n={}){return typeof e=="number"||typeof e=="bigint"?d(e,n):typeof e=="string"?m(e,n):typeof e=="boolean"?b(e,n):u(e,n)}function b(e,n={}){const t=`0x${Number(e)}`;return typeof n.size=="number"?(x.assertSize(t,{size:n.size}),f.pad(t,{size:n.size})):t}function u(e,n={}){let t="";for(let i=0;i<e.length;i++)t+=z[e[i]];const r=`0x${t}`;return typeof n.size=="number"?(x.assertSize(r,{size:n.size}),f.pad(r,{dir:"right",size:n.size})):r}function d(e,n={}){const{signed:t,size:r}=n,i=BigInt(e);let o;r?t?o=(1n<<BigInt(r)*8n-1n)-1n:o=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(o=BigInt(Number.MAX_SAFE_INTEGER));const c=typeof o=="bigint"&&t?-o-1n:0;if(o&&i>o||i<c){const s=typeof e=="bigint"?"n":"";throw new y.IntegerOutOfRangeError({max:o?`${o}${s}`:void 0,min:`${c}${s}`,signed:t,size:r,value:`${e}${s}`})}const g=`0x${(t&&i<0?(1n<<BigInt(r*8))+BigInt(i):i).toString(16)}`;return r?f.pad(g,{size:r}):g}const T=new TextEncoder;function m(e,n={}){const t=T.encode(e);return u(t,n)}exports.boolToHex=b;exports.bytesToHex=u;exports.numberToHex=d;exports.stringToHex=m;exports.toHex=H;
package/dist/index33.js CHANGED
@@ -1,5 +1,5 @@
1
- import { IntegerOutOfRangeError as x } from "./index177.js";
2
- import { pad as s } from "./index190.js";
1
+ import { IntegerOutOfRangeError as x } from "./index122.js";
2
+ import { pad as s } from "./index142.js";
3
3
  import { assertSize as c } from "./index31.js";
4
4
  const b = /* @__PURE__ */ Array.from({ length: 256 }, (n, e) => e.toString(16).padStart(2, "0"));
5
5
  function B(n, e = {}) {
package/dist/index41.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index56.cjs");class r extends s.BaseError{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}exports.InvalidAddressError=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index60.cjs");class r extends s.BaseError{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}exports.InvalidAddressError=r;
package/dist/index41.js CHANGED
@@ -1,4 +1,4 @@
1
- import { BaseError as r } from "./index56.js";
1
+ import { BaseError as r } from "./index60.js";
2
2
  class d extends r {
3
3
  constructor({ address: s }) {
4
4
  super(`Address "${s}" is invalid.`, {
package/dist/index42.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index134.cjs"),i=require("./index44.cjs"),o=/^0x[a-fA-F0-9]{40}$/,t=new c.LruMap(8192);function f(e,n){const{strict:s=!0}=n??{},r=`${e}.${s}`;if(t.has(r))return t.get(r);const u=o.test(e)?e.toLowerCase()===e?!0:s?i.checksumAddress(e)===e:!0:!1;return t.set(r,u),u}exports.isAddress=f;exports.isAddressCache=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index152.cjs"),i=require("./index44.cjs"),o=/^0x[a-fA-F0-9]{40}$/,t=new c.LruMap(8192);function f(e,n){const{strict:s=!0}=n??{},r=`${e}.${s}`;if(t.has(r))return t.get(r);const u=o.test(e)?e.toLowerCase()===e?!0:s?i.checksumAddress(e)===e:!0:!1;return t.set(r,u),u}exports.isAddress=f;exports.isAddressCache=t;
package/dist/index42.js CHANGED
@@ -1,4 +1,4 @@
1
- import { LruMap as u } from "./index134.js";
1
+ import { LruMap as u } from "./index152.js";
2
2
  import { checksumAddress as c } from "./index44.js";
3
3
  const i = /^0x[a-fA-F0-9]{40}$/, r = /* @__PURE__ */ new u(8192);
4
4
  function h(t, s) {
package/dist/index44.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index41.cjs"),f=require("./index32.cjs"),a=require("./index45.cjs"),l=require("./index134.cjs"),A=require("./index42.cjs"),o=new l.LruMap(8192);function u(s,t){if(o.has(`${s}.${t}`))return o.get(`${s}.${t}`);const c=s.substring(2).toLowerCase(),n=a.keccak256(f.stringToBytes(c),"bytes"),r=c.split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&r[e]&&(r[e]=r[e].toUpperCase()),(n[e>>1]&15)>=8&&r[e+1]&&(r[e+1]=r[e+1].toUpperCase());const i=`0x${r.join("")}`;return o.set(`${s}.${t}`,i),i}function g(s,t){if(!A.isAddress(s,{strict:!1}))throw new d.InvalidAddressError({address:s});return u(s,t)}exports.checksumAddress=u;exports.getAddress=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index41.cjs"),f=require("./index32.cjs"),a=require("./index45.cjs"),l=require("./index152.cjs"),A=require("./index42.cjs"),o=new l.LruMap(8192);function u(s,t){if(o.has(`${s}.${t}`))return o.get(`${s}.${t}`);const c=s.substring(2).toLowerCase(),n=a.keccak256(f.stringToBytes(c),"bytes"),r=c.split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&r[e]&&(r[e]=r[e].toUpperCase()),(n[e>>1]&15)>=8&&r[e+1]&&(r[e+1]=r[e+1].toUpperCase());const i=`0x${r.join("")}`;return o.set(`${s}.${t}`,i),i}function g(s,t){if(!A.isAddress(s,{strict:!1}))throw new d.InvalidAddressError({address:s});return u(s,t)}exports.checksumAddress=u;exports.getAddress=g;
package/dist/index44.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { InvalidAddressError as c } from "./index41.js";
2
2
  import { stringToBytes as m } from "./index32.js";
3
3
  import { keccak256 as p } from "./index45.js";
4
- import { LruMap as u } from "./index134.js";
4
+ import { LruMap as u } from "./index152.js";
5
5
  import { isAddress as $ } from "./index42.js";
6
6
  const s = /* @__PURE__ */ new u(8192);
7
7
  function h(t, o) {
package/dist/index45.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index204.cjs"),o=require("./index46.cjs"),i=require("./index32.cjs"),n=require("./index33.cjs");function u(e,r){const s=r||"hex",t=c.keccak_256(o.isHex(e,{strict:!1})?i.toBytes(e):e);return s==="bytes"?t:n.toHex(t)}exports.keccak256=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index176.cjs"),o=require("./index46.cjs"),i=require("./index32.cjs"),n=require("./index33.cjs");function u(e,r){const s=r||"hex",t=c.keccak_256(o.isHex(e,{strict:!1})?i.toBytes(e):e);return s==="bytes"?t:n.toHex(t)}exports.keccak256=u;
package/dist/index45.js CHANGED
@@ -1,4 +1,4 @@
1
- import { keccak_256 as c } from "./index204.js";
1
+ import { keccak_256 as c } from "./index176.js";
2
2
  import { isHex as i } from "./index46.js";
3
3
  import { toBytes as m } from "./index32.js";
4
4
  import { toHex as s } from "./index33.js";
package/dist/index47.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index138.cjs"),u=require("./index32.cjs"),c=require("./index33.cjs"),a=require("./index203.cjs"),h=require("./index45.cjs");function d(e){const{chainId:t,nonce:o,to:r}=e,s=e.contractAddress??e.address,n=h.keccak256(i.concatHex(["0x05",a.toRlp([t?c.numberToHex(t):"0x",s,o?c.numberToHex(o):"0x"])]));return r==="bytes"?u.hexToBytes(n):n}exports.hashAuthorization=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index141.cjs"),u=require("./index32.cjs"),c=require("./index33.cjs"),a=require("./index169.cjs"),h=require("./index45.cjs");function d(e){const{chainId:t,nonce:o,to:r}=e,s=e.contractAddress??e.address,n=h.keccak256(i.concatHex(["0x05",a.toRlp([t?c.numberToHex(t):"0x",s,o?c.numberToHex(o):"0x"])]));return r==="bytes"?u.hexToBytes(n):n}exports.hashAuthorization=d;
package/dist/index47.js CHANGED
@@ -1,7 +1,7 @@
1
- import { concatHex as i } from "./index138.js";
1
+ import { concatHex as i } from "./index141.js";
2
2
  import { hexToBytes as m } from "./index32.js";
3
3
  import { numberToHex as c } from "./index33.js";
4
- import { toRlp as d } from "./index203.js";
4
+ import { toRlp as d } from "./index169.js";
5
5
  import { keccak256 as f } from "./index45.js";
6
6
  function b(o) {
7
7
  const { chainId: t, nonce: r, to: s } = o, e = o.contractAddress ?? o.address, n = f(i([
package/dist/index48.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index45.cjs"),t=require("./index209.cjs");function a(e,s){return r.keccak256(t.toPrefixedMessage(e),s)}exports.hashMessage=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index45.cjs"),t=require("./index182.cjs");function a(e,s){return r.keccak256(t.toPrefixedMessage(e),s)}exports.hashMessage=a;
package/dist/index48.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { keccak256 as o } from "./index45.js";
2
- import { toPrefixedMessage as t } from "./index209.js";
2
+ import { toPrefixedMessage as t } from "./index182.js";
3
3
  function f(e, r) {
4
4
  return o(t(e), r);
5
5
  }
package/dist/index49.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./index100.cjs"),G=require("./index215.cjs"),R=require("./index130.cjs"),S=require("./index131.cjs"),B=require("./index132.cjs"),V=require("./index133.cjs"),L=require("./index138.cjs"),h=require("./index123.cjs"),r=require("./index33.cjs"),d=require("./index203.cjs"),y=require("./index212.cjs"),C=require("./index135.cjs"),v=require("./index214.cjs");function k(e,o){const n=C.getTransactionType(e);return n==="eip1559"?_(e,o):n==="eip2930"?j(e,o):n==="eip4844"?Y(e,o):n==="eip7702"?w(e,o):M(e,o)}function w(e,o){const{authorizationList:n,chainId:s,gas:i,nonce:c,to:a,value:x,maxFeePerGas:u,maxPriorityFeePerGas:t,accessList:l,data:T}=e;y.assertTransactionEIP7702(e);const b=v.serializeAccessList(l),m=G.serializeAuthorizationList(n);return L.concatHex(["0x04",d.toRlp([r.numberToHex(s),c?r.numberToHex(c):"0x",t?r.numberToHex(t):"0x",u?r.numberToHex(u):"0x",i?r.numberToHex(i):"0x",a??"0x",x?r.numberToHex(x):"0x",T??"0x",b,m,...z(e,o)])])}function Y(e,o){const{chainId:n,gas:s,nonce:i,to:c,value:a,maxFeePerBlobGas:x,maxFeePerGas:u,maxPriorityFeePerGas:t,accessList:l,data:T}=e;y.assertTransactionEIP4844(e);let b=e.blobVersionedHashes,m=e.sidecars;if(e.blobs&&(typeof b>"u"||typeof m>"u")){const f=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(p=>r.bytesToHex(p)),P=e.kzg,H=R.blobsToCommitments({blobs:f,kzg:P});if(typeof b>"u"&&(b=B.commitmentsToVersionedHashes({commitments:H})),typeof m>"u"){const p=S.blobsToProofs({blobs:f,commitments:H,kzg:P});m=V.toBlobSidecars({blobs:f,commitments:H,proofs:p})}}const I=v.serializeAccessList(l),A=[r.numberToHex(n),i?r.numberToHex(i):"0x",t?r.numberToHex(t):"0x",u?r.numberToHex(u):"0x",s?r.numberToHex(s):"0x",c??"0x",a?r.numberToHex(a):"0x",T??"0x",I,x?r.numberToHex(x):"0x",b??[],...z(e,o)],q=[],g=[],E=[];if(m)for(let f=0;f<m.length;f++){const{blob:P,commitment:H,proof:p}=m[f];q.push(P),g.push(H),E.push(p)}return L.concatHex(["0x03",m?d.toRlp([A,q,g,E]):d.toRlp(A)])}function _(e,o){const{chainId:n,gas:s,nonce:i,to:c,value:a,maxFeePerGas:x,maxPriorityFeePerGas:u,accessList:t,data:l}=e;y.assertTransactionEIP1559(e);const T=v.serializeAccessList(t),b=[r.numberToHex(n),i?r.numberToHex(i):"0x",u?r.numberToHex(u):"0x",x?r.numberToHex(x):"0x",s?r.numberToHex(s):"0x",c??"0x",a?r.numberToHex(a):"0x",l??"0x",T,...z(e,o)];return L.concatHex(["0x02",d.toRlp(b)])}function j(e,o){const{chainId:n,gas:s,data:i,nonce:c,to:a,value:x,accessList:u,gasPrice:t}=e;y.assertTransactionEIP2930(e);const l=v.serializeAccessList(u),T=[r.numberToHex(n),c?r.numberToHex(c):"0x",t?r.numberToHex(t):"0x",s?r.numberToHex(s):"0x",a??"0x",x?r.numberToHex(x):"0x",i??"0x",l,...z(e,o)];return L.concatHex(["0x01",d.toRlp(T)])}function M(e,o){const{chainId:n=0,gas:s,data:i,nonce:c,to:a,value:x,gasPrice:u}=e;y.assertTransactionLegacy(e);let t=[c?r.numberToHex(c):"0x",u?r.numberToHex(u):"0x",s?r.numberToHex(s):"0x",a??"0x",x?r.numberToHex(x):"0x",i??"0x"];if(o){const l=(()=>{if(o.v>=35n)return(o.v-35n)/2n>0?o.v:27n+(o.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+o.v-27n);const m=27n+(o.v===27n?0n:1n);if(o.v!==m)throw new F.InvalidLegacyVError({v:o.v});return m})(),T=h.trim(o.r),b=h.trim(o.s);t=[...t,r.numberToHex(l),T==="0x00"?"0x":T,b==="0x00"?"0x":b]}else n>0&&(t=[...t,r.numberToHex(n),"0x","0x"]);return d.toRlp(t)}function z(e,o){const n=o??e,{v:s,yParity:i}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof s>"u"&&typeof i>"u")return[];const c=h.trim(n.r),a=h.trim(n.s);return[typeof i=="number"?i?r.numberToHex(1):"0x":s===0n?"0x":s===1n?r.numberToHex(1):s===27n?"0x":r.numberToHex(1),c==="0x00"?"0x":c,a==="0x00"?"0x":a]}exports.serializeTransaction=k;exports.toYParitySignatureArray=z;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./index119.cjs"),G=require("./index191.cjs"),R=require("./index153.cjs"),S=require("./index154.cjs"),B=require("./index155.cjs"),V=require("./index158.cjs"),L=require("./index141.cjs"),h=require("./index132.cjs"),r=require("./index33.cjs"),d=require("./index169.cjs"),y=require("./index187.cjs"),C=require("./index189.cjs"),v=require("./index190.cjs");function k(e,o){const n=C.getTransactionType(e);return n==="eip1559"?_(e,o):n==="eip2930"?j(e,o):n==="eip4844"?Y(e,o):n==="eip7702"?w(e,o):M(e,o)}function w(e,o){const{authorizationList:n,chainId:s,gas:i,nonce:c,to:a,value:x,maxFeePerGas:u,maxPriorityFeePerGas:t,accessList:l,data:T}=e;y.assertTransactionEIP7702(e);const b=v.serializeAccessList(l),m=G.serializeAuthorizationList(n);return L.concatHex(["0x04",d.toRlp([r.numberToHex(s),c?r.numberToHex(c):"0x",t?r.numberToHex(t):"0x",u?r.numberToHex(u):"0x",i?r.numberToHex(i):"0x",a??"0x",x?r.numberToHex(x):"0x",T??"0x",b,m,...z(e,o)])])}function Y(e,o){const{chainId:n,gas:s,nonce:i,to:c,value:a,maxFeePerBlobGas:x,maxFeePerGas:u,maxPriorityFeePerGas:t,accessList:l,data:T}=e;y.assertTransactionEIP4844(e);let b=e.blobVersionedHashes,m=e.sidecars;if(e.blobs&&(typeof b>"u"||typeof m>"u")){const f=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(p=>r.bytesToHex(p)),P=e.kzg,H=R.blobsToCommitments({blobs:f,kzg:P});if(typeof b>"u"&&(b=B.commitmentsToVersionedHashes({commitments:H})),typeof m>"u"){const p=S.blobsToProofs({blobs:f,commitments:H,kzg:P});m=V.toBlobSidecars({blobs:f,commitments:H,proofs:p})}}const I=v.serializeAccessList(l),A=[r.numberToHex(n),i?r.numberToHex(i):"0x",t?r.numberToHex(t):"0x",u?r.numberToHex(u):"0x",s?r.numberToHex(s):"0x",c??"0x",a?r.numberToHex(a):"0x",T??"0x",I,x?r.numberToHex(x):"0x",b??[],...z(e,o)],q=[],g=[],E=[];if(m)for(let f=0;f<m.length;f++){const{blob:P,commitment:H,proof:p}=m[f];q.push(P),g.push(H),E.push(p)}return L.concatHex(["0x03",m?d.toRlp([A,q,g,E]):d.toRlp(A)])}function _(e,o){const{chainId:n,gas:s,nonce:i,to:c,value:a,maxFeePerGas:x,maxPriorityFeePerGas:u,accessList:t,data:l}=e;y.assertTransactionEIP1559(e);const T=v.serializeAccessList(t),b=[r.numberToHex(n),i?r.numberToHex(i):"0x",u?r.numberToHex(u):"0x",x?r.numberToHex(x):"0x",s?r.numberToHex(s):"0x",c??"0x",a?r.numberToHex(a):"0x",l??"0x",T,...z(e,o)];return L.concatHex(["0x02",d.toRlp(b)])}function j(e,o){const{chainId:n,gas:s,data:i,nonce:c,to:a,value:x,accessList:u,gasPrice:t}=e;y.assertTransactionEIP2930(e);const l=v.serializeAccessList(u),T=[r.numberToHex(n),c?r.numberToHex(c):"0x",t?r.numberToHex(t):"0x",s?r.numberToHex(s):"0x",a??"0x",x?r.numberToHex(x):"0x",i??"0x",l,...z(e,o)];return L.concatHex(["0x01",d.toRlp(T)])}function M(e,o){const{chainId:n=0,gas:s,data:i,nonce:c,to:a,value:x,gasPrice:u}=e;y.assertTransactionLegacy(e);let t=[c?r.numberToHex(c):"0x",u?r.numberToHex(u):"0x",s?r.numberToHex(s):"0x",a??"0x",x?r.numberToHex(x):"0x",i??"0x"];if(o){const l=(()=>{if(o.v>=35n)return(o.v-35n)/2n>0?o.v:27n+(o.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+o.v-27n);const m=27n+(o.v===27n?0n:1n);if(o.v!==m)throw new F.InvalidLegacyVError({v:o.v});return m})(),T=h.trim(o.r),b=h.trim(o.s);t=[...t,r.numberToHex(l),T==="0x00"?"0x":T,b==="0x00"?"0x":b]}else n>0&&(t=[...t,r.numberToHex(n),"0x","0x"]);return d.toRlp(t)}function z(e,o){const n=o??e,{v:s,yParity:i}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof s>"u"&&typeof i>"u")return[];const c=h.trim(n.r),a=h.trim(n.s);return[typeof i=="number"?i?r.numberToHex(1):"0x":s===0n?"0x":s===1n?r.numberToHex(1):s===27n?"0x":r.numberToHex(1),c==="0x00"?"0x":c,a==="0x00"?"0x":a]}exports.serializeTransaction=k;exports.toYParitySignatureArray=z;
package/dist/index49.js CHANGED
@@ -1,16 +1,16 @@
1
- import { InvalidLegacyVError as H } from "./index100.js";
2
- import { serializeAuthorizationList as g } from "./index215.js";
3
- import { blobsToCommitments as B } from "./index130.js";
4
- import { blobsToProofs as V } from "./index131.js";
5
- import { commitmentsToVersionedHashes as C } from "./index132.js";
6
- import { toBlobSidecars as k } from "./index133.js";
7
- import { concatHex as h } from "./index138.js";
8
- import { trim as T } from "./index123.js";
1
+ import { InvalidLegacyVError as H } from "./index119.js";
2
+ import { serializeAuthorizationList as g } from "./index191.js";
3
+ import { blobsToCommitments as B } from "./index153.js";
4
+ import { blobsToProofs as V } from "./index154.js";
5
+ import { commitmentsToVersionedHashes as C } from "./index155.js";
6
+ import { toBlobSidecars as k } from "./index158.js";
7
+ import { concatHex as h } from "./index141.js";
8
+ import { trim as T } from "./index132.js";
9
9
  import { numberToHex as o, bytesToHex as w } from "./index33.js";
10
- import { toRlp as b } from "./index203.js";
11
- import { assertTransactionEIP1559 as S, assertTransactionEIP2930 as _, assertTransactionEIP4844 as R, assertTransactionEIP7702 as Y, assertTransactionLegacy as j } from "./index212.js";
12
- import { getTransactionType as q } from "./index135.js";
13
- import { serializeAccessList as v } from "./index214.js";
10
+ import { toRlp as b } from "./index169.js";
11
+ import { assertTransactionEIP1559 as S, assertTransactionEIP2930 as _, assertTransactionEIP4844 as R, assertTransactionEIP7702 as Y, assertTransactionLegacy as j } from "./index187.js";
12
+ import { getTransactionType as q } from "./index189.js";
13
+ import { serializeAccessList as v } from "./index190.js";
14
14
  function te(e, r) {
15
15
  const i = q(e);
16
16
  return i === "eip1559" ? K(e, r) : i === "eip2930" ? M(e, r) : i === "eip4844" ? J(e, r) : i === "eip7702" ? D(e, r) : N(e, r);