@gardenfi/swap 0.0.2 → 0.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/dist/index104.cjs +1 -1
  2. package/dist/index104.js +1 -1
  3. package/dist/index106.cjs +1 -1
  4. package/dist/index106.js +3 -3
  5. package/dist/index107.cjs +1 -1
  6. package/dist/index107.js +1 -1
  7. package/dist/index113.cjs +1 -1
  8. package/dist/index113.js +1 -1
  9. package/dist/index116.cjs +1 -1
  10. package/dist/index116.js +1 -1
  11. package/dist/index117.cjs +1 -1
  12. package/dist/index117.js +1 -1
  13. package/dist/index12.cjs +1 -1
  14. package/dist/index12.js +12 -12
  15. package/dist/index120.cjs +1 -1
  16. package/dist/index120.js +2 -2
  17. package/dist/index121.cjs +1 -1
  18. package/dist/index121.js +7 -7
  19. package/dist/index126.cjs +1 -1
  20. package/dist/index126.js +3 -3
  21. package/dist/index127.cjs +1 -1
  22. package/dist/index127.js +1 -1
  23. package/dist/index128.cjs +1 -1
  24. package/dist/index128.js +2 -2
  25. package/dist/index129.cjs +1 -1
  26. package/dist/index129.js +1 -1
  27. package/dist/index130.cjs +1 -1
  28. package/dist/index130.js +3 -3
  29. package/dist/index132.cjs +1 -1
  30. package/dist/index132.js +1 -1
  31. package/dist/index133.cjs +1 -1
  32. package/dist/index133.js +1 -1
  33. package/dist/index134.cjs +1 -1
  34. package/dist/index134.js +1 -1
  35. package/dist/index135.cjs +1 -1
  36. package/dist/index135.js +1 -1
  37. package/dist/index138.cjs +1 -1
  38. package/dist/index138.js +1 -1
  39. package/dist/index140.cjs +1 -1
  40. package/dist/index140.js +1 -1
  41. package/dist/index148.cjs +1 -1
  42. package/dist/index148.js +1 -1
  43. package/dist/index149.cjs +1 -1
  44. package/dist/index149.js +1 -1
  45. package/dist/index154.cjs +1 -1
  46. package/dist/index154.js +1 -1
  47. package/dist/index160.cjs +1 -1
  48. package/dist/index160.js +1 -1
  49. package/dist/index162.cjs +1 -1
  50. package/dist/index162.js +2 -2
  51. package/dist/index167.cjs +1 -1
  52. package/dist/index167.js +2 -2
  53. package/dist/index168.cjs +1 -1
  54. package/dist/index168.js +2 -2
  55. package/dist/index169.cjs +1 -1
  56. package/dist/index169.js +2 -2
  57. package/dist/index170.cjs +1 -1
  58. package/dist/index170.js +2 -2
  59. package/dist/index171.cjs +1 -1
  60. package/dist/index171.js +2 -2
  61. package/dist/index172.cjs +1 -1
  62. package/dist/index172.js +2 -2
  63. package/dist/index173.cjs +1 -1
  64. package/dist/index173.js +2 -2
  65. package/dist/index178.cjs +1 -1
  66. package/dist/index178.js +1 -1
  67. package/dist/index18.cjs +1 -1
  68. package/dist/index18.js +3 -3
  69. package/dist/index181.cjs +1 -1
  70. package/dist/index181.js +1 -1
  71. package/dist/index182.cjs +1 -1
  72. package/dist/index182.js +61 -42
  73. package/dist/index19.cjs +1 -1
  74. package/dist/index19.js +18 -18
  75. package/dist/index190.cjs +1 -1
  76. package/dist/index190.js +1 -1
  77. package/dist/index195.cjs +1 -1
  78. package/dist/index195.js +19 -19
  79. package/dist/index20.cjs +1 -1
  80. package/dist/index20.js +2 -2
  81. package/dist/index21.cjs +1 -1
  82. package/dist/index21.js +19 -19
  83. package/dist/index217.cjs +1 -1
  84. package/dist/index217.js +58 -49
  85. package/dist/index24.cjs +1 -1
  86. package/dist/index24.js +2 -2
  87. package/dist/index242.cjs +1 -1
  88. package/dist/index242.js +1 -1
  89. package/dist/index247.cjs +1 -1
  90. package/dist/index247.js +2 -2
  91. package/dist/index248.cjs +1 -1
  92. package/dist/index248.js +1 -1
  93. package/dist/index249.cjs +1 -1
  94. package/dist/index249.js +2 -2
  95. package/dist/index260.cjs +1 -1
  96. package/dist/index260.js +3 -3
  97. package/dist/index272.cjs +1 -1
  98. package/dist/index272.js +1 -1
  99. package/dist/index273.cjs +1 -1
  100. package/dist/index273.js +1 -1
  101. package/dist/index276.cjs +1 -1
  102. package/dist/index276.js +3 -3
  103. package/dist/index278.cjs +1 -1
  104. package/dist/index278.js +1 -1
  105. package/dist/index28.cjs +1 -1
  106. package/dist/index28.js +58 -58
  107. package/dist/index281.cjs +1 -1
  108. package/dist/index281.js +140 -54
  109. package/dist/index282.cjs +1 -1
  110. package/dist/index282.js +5 -120
  111. package/dist/index283.cjs +2 -1
  112. package/dist/index283.js +42 -5
  113. package/dist/index284.cjs +1 -1
  114. package/dist/index284.js +2 -8
  115. package/dist/index285.cjs +1 -1
  116. package/dist/index285.js +5 -4
  117. package/dist/index286.cjs +1 -1
  118. package/dist/index286.js +9 -162
  119. package/dist/index287.cjs +1 -1
  120. package/dist/index287.js +20 -5
  121. package/dist/index288.cjs +1 -2
  122. package/dist/index288.js +8 -41
  123. package/dist/index289.cjs +1 -1
  124. package/dist/index289.js +73 -2
  125. package/dist/index290.cjs +1 -1
  126. package/dist/index290.js +65 -5
  127. package/dist/index291.cjs +1 -1
  128. package/dist/index291.js +187 -9
  129. package/dist/index292.cjs +1 -1
  130. package/dist/index292.js +20 -17
  131. package/dist/index293.cjs +1 -1
  132. package/dist/index293.js +42 -8
  133. package/dist/index294.cjs +1 -1
  134. package/dist/index294.js +24 -71
  135. package/dist/index295.cjs +1 -1
  136. package/dist/index295.js +86 -61
  137. package/dist/index296.cjs +1 -1
  138. package/dist/index296.js +35 -183
  139. package/dist/index297.cjs +1 -1
  140. package/dist/index297.js +15 -21
  141. package/dist/index298.cjs +1 -1
  142. package/dist/index298.js +5 -34
  143. package/dist/index299.cjs +1 -1
  144. package/dist/index299.js +36 -24
  145. package/dist/index3.cjs +1 -1
  146. package/dist/index3.js +4 -12
  147. package/dist/index300.cjs +1 -1
  148. package/dist/index300.js +15 -90
  149. package/dist/index301.cjs +1 -1
  150. package/dist/index301.js +8 -40
  151. package/dist/index302.cjs +1 -1
  152. package/dist/index302.js +7 -16
  153. package/dist/index303.cjs +1 -1
  154. package/dist/index303.js +41 -12
  155. package/dist/index304.cjs +1 -1
  156. package/dist/index304.js +318 -35
  157. package/dist/index305.cjs +1 -1
  158. package/dist/index305.js +605 -15
  159. package/dist/index306.cjs +1 -1
  160. package/dist/index306.js +110 -9
  161. package/dist/index307.cjs +1 -1
  162. package/dist/index307.js +167 -42
  163. package/dist/index308.cjs +1 -1
  164. package/dist/index308.js +291 -310
  165. package/dist/index309.cjs +1 -1
  166. package/dist/index309.js +94 -606
  167. package/dist/index31.cjs +1 -1
  168. package/dist/index31.js +1 -1
  169. package/dist/index310.cjs +1 -1
  170. package/dist/index310.js +44 -97
  171. package/dist/index311.cjs +1 -1
  172. package/dist/index311.js +52 -166
  173. package/dist/index312.cjs +1 -1
  174. package/dist/index312.js +41 -298
  175. package/dist/index313.cjs +1 -1
  176. package/dist/index313.js +15 -93
  177. package/dist/index314.cjs +1 -1
  178. package/dist/index314.js +310 -49
  179. package/dist/index315.cjs +1 -1
  180. package/dist/index315.js +57 -51
  181. package/dist/index316.cjs +1 -1
  182. package/dist/index316.js +18 -43
  183. package/dist/index317.cjs +1 -1
  184. package/dist/index317.js +28 -14
  185. package/dist/index318.cjs +1 -1
  186. package/dist/index318.js +3 -317
  187. package/dist/index319.cjs +7 -1
  188. package/dist/index319.js +232 -54
  189. package/dist/index32.cjs +1 -1
  190. package/dist/index32.js +1 -1
  191. package/dist/index320.cjs +1 -1
  192. package/dist/index320.js +47 -19
  193. package/dist/index321.cjs +1 -1
  194. package/dist/index321.js +208 -25
  195. package/dist/index322.cjs +1 -1
  196. package/dist/index322.js +81 -3
  197. package/dist/index323.cjs +1 -7
  198. package/dist/index323.js +27 -235
  199. package/dist/index324.cjs +1 -1
  200. package/dist/index324.js +77 -48
  201. package/dist/index325.cjs +1 -1
  202. package/dist/index325.js +9 -212
  203. package/dist/index326.cjs +1 -1
  204. package/dist/index326.js +15 -80
  205. package/dist/index327.cjs +1 -1
  206. package/dist/index327.js +20 -27
  207. package/dist/index328.cjs +1 -1
  208. package/dist/index328.js +13 -76
  209. package/dist/index329.cjs +1 -1
  210. package/dist/index329.js +13 -7
  211. package/dist/index330.cjs +1 -1
  212. package/dist/index330.js +14 -11
  213. package/dist/index331.cjs +1 -1
  214. package/dist/index331.js +9 -13
  215. package/dist/index332.cjs +1 -1
  216. package/dist/index332.js +13 -10
  217. package/dist/index333.cjs +1 -1
  218. package/dist/index333.js +25 -9
  219. package/dist/index334.cjs +1 -1
  220. package/dist/index334.js +31 -16
  221. package/dist/index335.cjs +2 -1
  222. package/dist/index335.js +18 -22
  223. package/dist/index336.cjs +1 -1
  224. package/dist/index336.js +14 -13
  225. package/dist/index337.cjs +1 -1
  226. package/dist/index337.js +11 -14
  227. package/dist/index338.cjs +1 -1
  228. package/dist/index338.js +10 -7
  229. package/dist/index339.cjs +1 -1
  230. package/dist/index339.js +32 -14
  231. package/dist/index340.cjs +1 -1
  232. package/dist/index340.js +115 -25
  233. package/dist/index341.cjs +1 -1
  234. package/dist/index341.js +102 -30
  235. package/dist/index342.cjs +1 -2
  236. package/dist/index342.js +6 -18
  237. package/dist/index343.cjs +1 -1
  238. package/dist/index343.js +7 -15
  239. package/dist/index344.cjs +1 -1
  240. package/dist/index344.js +25 -32
  241. package/dist/index345.cjs +1 -1
  242. package/dist/index345.js +16 -115
  243. package/dist/index346.cjs +1 -1
  244. package/dist/index346.js +212 -101
  245. package/dist/index347.cjs +1 -1
  246. package/dist/index347.js +7 -6
  247. package/dist/index348.cjs +1 -1
  248. package/dist/index348.js +120 -7
  249. package/dist/index349.cjs +1 -1
  250. package/dist/index349.js +4 -26
  251. package/dist/index350.cjs +2 -1
  252. package/dist/index350.js +193 -16
  253. package/dist/index351.cjs +1 -1
  254. package/dist/index351.js +72 -209
  255. package/dist/index352.cjs +1 -2
  256. package/dist/index352.js +317 -167
  257. package/dist/index353.cjs +1 -1
  258. package/dist/index353.js +160 -16
  259. package/dist/index354.cjs +1 -1
  260. package/dist/index354.js +5 -15
  261. package/dist/index355.cjs +1 -1
  262. package/dist/index355.js +12 -7
  263. package/dist/index356.cjs +1 -1
  264. package/dist/index356.js +16 -52
  265. package/dist/index357.cjs +1 -1
  266. package/dist/index357.js +51 -20
  267. package/dist/index358.cjs +1 -1
  268. package/dist/index358.js +10 -2
  269. package/dist/index363.cjs +1 -1
  270. package/dist/index363.js +1 -1
  271. package/dist/index364.cjs +1 -1
  272. package/dist/index364.js +1 -1
  273. package/dist/index365.cjs +1 -1
  274. package/dist/index365.js +3 -275
  275. package/dist/index366.cjs +1 -1
  276. package/dist/index366.js +73 -170
  277. package/dist/index367.cjs +1 -1
  278. package/dist/index367.js +32 -10
  279. package/dist/index368.cjs +1 -1
  280. package/dist/index368.js +5 -107
  281. package/dist/index369.cjs +1 -1
  282. package/dist/index369.js +140 -5
  283. package/dist/index370.cjs +1 -1
  284. package/dist/index370.js +274 -72
  285. package/dist/index371.cjs +1 -1
  286. package/dist/index371.js +171 -10
  287. package/dist/index372.cjs +1 -1
  288. package/dist/index372.js +10 -32
  289. package/dist/index373.cjs +1 -1
  290. package/dist/index373.js +101 -134
  291. package/dist/index374.cjs +1 -1
  292. package/dist/index374.js +9 -3
  293. package/dist/index375.cjs +1 -1
  294. package/dist/index375.js +4 -4
  295. package/dist/index376.cjs +1 -1
  296. package/dist/index376.js +1 -1
  297. package/dist/index378.cjs +1 -1
  298. package/dist/index378.js +1 -1
  299. package/dist/index379.cjs +1 -1
  300. package/dist/index379.js +1 -1
  301. package/dist/index38.cjs +1 -1
  302. package/dist/index38.js +2 -2
  303. package/dist/index380.cjs +1 -1
  304. package/dist/index380.js +1 -1
  305. package/dist/index381.cjs +1 -1
  306. package/dist/index381.js +2 -344
  307. package/dist/index382.cjs +1 -1
  308. package/dist/index382.js +15 -154
  309. package/dist/index383.cjs +1 -1
  310. package/dist/index383.js +110 -3
  311. package/dist/index384.cjs +1 -1
  312. package/dist/index384.js +3 -63
  313. package/dist/index385.cjs +1 -1
  314. package/dist/index385.js +59 -106
  315. package/dist/index386.cjs +1 -1
  316. package/dist/index386.js +2 -2
  317. package/dist/index42.cjs +1 -1
  318. package/dist/index42.js +88 -12
  319. package/dist/index43.cjs +1 -1
  320. package/dist/index43.js +13 -58
  321. package/dist/index44.cjs +1 -1
  322. package/dist/index44.js +12 -522
  323. package/dist/index45.cjs +1 -1
  324. package/dist/index45.js +59 -30
  325. package/dist/index46.cjs +1 -1
  326. package/dist/index46.js +522 -26
  327. package/dist/index47.cjs +1 -1
  328. package/dist/index47.js +16 -12
  329. package/dist/index48.cjs +1 -1
  330. package/dist/index48.js +12 -35
  331. package/dist/index49.cjs +1 -1
  332. package/dist/index49.js +14 -16
  333. package/dist/index50.cjs +1 -1
  334. package/dist/index50.js +38 -17
  335. package/dist/index51.cjs +1 -1
  336. package/dist/index51.js +15 -18
  337. package/dist/index52.cjs +1 -1
  338. package/dist/index52.js +17 -19
  339. package/dist/index53.cjs +1 -1
  340. package/dist/index53.js +17 -42
  341. package/dist/index54.cjs +1 -1
  342. package/dist/index54.js +15 -39
  343. package/dist/index55.cjs +1 -1
  344. package/dist/index55.js +49 -29
  345. package/dist/index56.cjs +1 -1
  346. package/dist/index56.js +46 -29
  347. package/dist/index57.cjs +1 -1
  348. package/dist/index57.js +26 -20
  349. package/dist/index58.cjs +1 -1
  350. package/dist/index58.js +27 -18
  351. package/dist/index59.cjs +1 -1
  352. package/dist/index59.js +16 -14
  353. package/dist/index60.cjs +1 -1
  354. package/dist/index60.js +28 -15
  355. package/dist/index61.cjs +1 -1
  356. package/dist/index61.js +28 -14
  357. package/dist/index62.cjs +1 -1
  358. package/dist/index62.js +13 -86
  359. package/dist/index63.cjs +1 -1
  360. package/dist/index63.js +13 -13
  361. package/dist/index64.cjs +1 -1
  362. package/dist/index64.js +17 -32
  363. package/dist/index65.cjs +1 -1
  364. package/dist/index65.js +9 -14
  365. package/dist/index66.cjs +1 -1
  366. package/dist/index66.js +32 -17
  367. package/dist/index67.cjs +1 -1
  368. package/dist/index67.js +14 -9
  369. package/dist/index71.cjs +1 -1
  370. package/dist/index71.js +28 -19
  371. package/dist/index77.cjs +1 -1
  372. package/dist/index77.js +13 -13
  373. package/dist/index9.cjs +1 -1
  374. package/dist/index9.js +27 -19
  375. package/dist/index92.cjs +1 -1
  376. package/dist/index92.js +1 -1
  377. package/dist/src/lib/constants/wagmiConfig.d.ts +9 -9
  378. package/dist/src/lib/store/swapStore.d.ts +1 -1
  379. package/dist/src/lib/types/types.d.ts +0 -1
  380. package/package.json +6 -6
package/dist/index67.js CHANGED
@@ -1,12 +1,17 @@
1
- import { contracts as o } from "./index68.js";
2
- import { formatters as r } from "./index69.js";
3
- import { serializers as t } from "./index70.js";
4
- const e = {
5
- blockTime: 2e3,
6
- contracts: o,
7
- formatters: r,
8
- serializers: t
1
+ import e from "react";
2
+ import { Typography as t } from "@gardenfi/garden-book";
3
+ import { motion as c } from "framer-motion";
4
+ import { expandWithDelayAnimation as n } from "./index66.js";
5
+ import { swapStore as o } from "./index6.js";
6
+ import { AddressDetails as i } from "./index268.js";
7
+ const h = ({
8
+ refundAddress: a,
9
+ receiveAddress: m,
10
+ networkFeesValue: r
11
+ }) => {
12
+ const { outputAsset: l, outputAmount: s } = o();
13
+ return /* @__PURE__ */ e.createElement(c.div, { className: "flex flex-col", ...n }, /* @__PURE__ */ e.createElement("div", { className: "h-full" }, /* @__PURE__ */ e.createElement("div", { className: "flex items-center justify-between px-4 pt-1" }, /* @__PURE__ */ e.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular", className: "!text-mid-grey" }, "Network fee")), /* @__PURE__ */ e.createElement("div", { className: "flex gap-5 py-1" }, /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular" }, r === 0 ? "Free" : "$" + r))), /* @__PURE__ */ e.createElement("div", { className: "flex items-center justify-between px-4" }, /* @__PURE__ */ e.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular", className: "!text-mid-grey" }, "Minimum received")), /* @__PURE__ */ e.createElement("div", { className: "flex gap-5 py-1" }, /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular" }, s, " ", l == null ? void 0 : l.symbol))), (m || a) && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: "flex flex-col items-stretch justify-center" }, m && /* @__PURE__ */ e.createElement(i, { address: m }), a && /* @__PURE__ */ e.createElement(i, { address: a, isRefund: !0 })))));
9
14
  };
10
15
  export {
11
- e as chainConfig
16
+ h as SwapSavingsAndAddresses
12
17
  };
package/dist/index71.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index86.cjs"),u=require("./index87.cjs"),t=require("./index88.cjs");function o(i,{size:e}){if(u.size(i)>e)throw new f.SizeOverflowError({givenSize:u.size(i),maxSize:e})}function z(i,e={}){const{signed:n}=e;e.size&&o(i,{size:e.size});const r=BigInt(i);if(!n)return r;const s=(i.length-2)/2,c=(1n<<BigInt(s)*8n-1n)-1n;return r<=c?r:r-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function a(i,e={}){let n=i;if(e.size&&(o(n,{size:e.size}),n=t.trim(n)),t.trim(n)==="0x00")return!1;if(t.trim(n)==="0x01")return!0;throw new f.InvalidHexBooleanError(n)}function l(i,e={}){return Number(z(i,e))}exports.assertSize=o;exports.hexToBigInt=z;exports.hexToBool=a;exports.hexToNumber=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index86.cjs"),f=require("./index87.cjs"),t=require("./index88.cjs");function u(i,{size:e}){if(f.size(i)>e)throw new o.SizeOverflowError({givenSize:f.size(i),maxSize:e})}function a(i,e={}){const{signed:n}=e;e.size&&u(i,{size:e.size});const r=BigInt(i);if(!n)return r;const s=(i.length-2)/2,z=(1n<<BigInt(s)*8n-1n)-1n;return r<=z?r:r-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function c(i,e={}){let n=i;if(e.size&&(u(n,{size:e.size}),n=t.trim(n)),t.trim(n)==="0x00")return!1;if(t.trim(n)==="0x01")return!0;throw new o.InvalidHexBooleanError(n)}function g(i,e={}){const n=a(i,e),r=Number(n);if(!Number.isSafeInteger(r))throw new o.IntegerOutOfRangeError({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:e.signed,size:e.size,value:`${n}n`});return r}exports.assertSize=u;exports.hexToBigInt=a;exports.hexToBool=c;exports.hexToNumber=g;
package/dist/index71.js CHANGED
@@ -1,36 +1,45 @@
1
- import { SizeOverflowError as z, InvalidHexBooleanError as m } from "./index86.js";
1
+ import { IntegerOutOfRangeError as s, SizeOverflowError as a, InvalidHexBooleanError as z } from "./index86.js";
2
2
  import { size as f } from "./index87.js";
3
3
  import { trim as t } from "./index88.js";
4
- function u(i, { size: e }) {
5
- if (f(i) > e)
6
- throw new z({
7
- givenSize: f(i),
4
+ function u(r, { size: e }) {
5
+ if (f(r) > e)
6
+ throw new a({
7
+ givenSize: f(r),
8
8
  maxSize: e
9
9
  });
10
10
  }
11
- function a(i, e = {}) {
11
+ function g(r, e = {}) {
12
12
  const { signed: n } = e;
13
- e.size && u(i, { size: e.size });
14
- const r = BigInt(i);
13
+ e.size && u(r, { size: e.size });
14
+ const i = BigInt(r);
15
15
  if (!n)
16
- return r;
17
- const o = (i.length - 2) / 2, s = (1n << BigInt(o) * 8n - 1n) - 1n;
18
- return r <= s ? r : r - BigInt(`0x${"f".padStart(o * 2, "f")}`) - 1n;
16
+ return i;
17
+ const o = (r.length - 2) / 2, m = (1n << BigInt(o) * 8n - 1n) - 1n;
18
+ return i <= m ? i : i - BigInt(`0x${"f".padStart(o * 2, "f")}`) - 1n;
19
19
  }
20
- function g(i, e = {}) {
21
- let n = i;
20
+ function x(r, e = {}) {
21
+ let n = r;
22
22
  if (e.size && (u(n, { size: e.size }), n = t(n)), t(n) === "0x00")
23
23
  return !1;
24
24
  if (t(n) === "0x01")
25
25
  return !0;
26
- throw new m(n);
26
+ throw new z(n);
27
27
  }
28
- function w(i, e = {}) {
29
- return Number(a(i, e));
28
+ function E(r, e = {}) {
29
+ const n = g(r, e), i = Number(n);
30
+ if (!Number.isSafeInteger(i))
31
+ throw new s({
32
+ max: `${Number.MAX_SAFE_INTEGER}`,
33
+ min: `${Number.MIN_SAFE_INTEGER}`,
34
+ signed: e.signed,
35
+ size: e.size,
36
+ value: `${n}n`
37
+ });
38
+ return i;
30
39
  }
31
40
  export {
32
41
  u as assertSize,
33
- a as hexToBigInt,
34
- g as hexToBool,
35
- w as hexToNumber
42
+ g as hexToBigInt,
43
+ x as hexToBool,
44
+ E as hexToNumber
36
45
  };
package/dist/index77.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./index114.cjs"),V=require("./index308.cjs"),S=require("./index309.cjs"),et=require("./index117.cjs"),R=require("./index310.cjs"),T=require("./index311.cjs"),F=require("./index312.cjs"),nt=require("./index313.cjs"),$=require("./index314.cjs"),J=require("./index315.cjs"),st=require("./index316.cjs"),it=require("./index317.cjs"),_=require("./index318.cjs"),U=require("./index319.cjs"),rt=require("./index320.cjs");var Y=s=>{throw TypeError(s)},E=(s,t,e)=>t.has(s)||Y("Cannot "+e),n=(s,t,e)=>(E(s,t,"read from private field"),e?e.call(s):t.get(s)),w=(s,t,e)=>t.has(s)?Y("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),l=(s,t,e,r)=>(E(s,t,"write to private field"),t.set(s,e),e),d=(s,t,e)=>(E(s,t,"access private method"),e),P,k,y,b,p,m,g,I,i,h,H,j,O,N,v,z,B,L,Q;function A(s,t=1/0){const e={$kind:"Result",get Result(){return typeof s=="function"?s():s}},r=[],a=o=>r[o]??(r[o]={$kind:"NestedResult",get NestedResult(){return[typeof s=="function"?s():s,o]}});return new Proxy(e,{set(){throw new Error("The transaction result is a proxy, and does not support setting properties directly")},get(o,f){if(f in o)return Reflect.get(o,f);if(f===Symbol.iterator)return function*(){let c=0;for(;c<t;)yield a(c),c++};if(typeof f=="symbol")return;const u=parseInt(f,10);if(!(Number.isNaN(u)||u<0))return a(u)}})}const X=Symbol.for("@mysten/transaction");function Z(s){return!!s&&typeof s=="object"&&s[X]===!0}const K={buildPlugins:new Map,serializationPlugins:new Map},M=Symbol.for("@mysten/transaction/registry");function C(){try{const s=globalThis;return s[M]||(s[M]=K),s[M]}catch{return K}}const tt=class x{constructor(){w(this,h),w(this,P),w(this,k),w(this,y,new Map),w(this,b,[]),w(this,p,[]),w(this,m,new Set),w(this,g,new Set),w(this,I,new Map),w(this,i),this.object=st.createObjectMethods(e=>{var o,f;if(typeof e=="function")return this.object(this.add(e));if(typeof e=="object"&&S.is(T.ArgumentSchema,e))return e;const r=U.getIdFromCallArg(e),a=n(this,i).inputs.find(u=>r===U.getIdFromCallArg(u));return(o=a==null?void 0:a.Object)!=null&&o.SharedObject&&typeof e=="object"&&((f=e.Object)!=null&&f.SharedObject)&&(a.Object.SharedObject.mutable=a.Object.SharedObject.mutable||e.Object.SharedObject.mutable),a?{$kind:"Input",Input:n(this,i).inputs.indexOf(a),type:"object"}:d(this,h,O).call(this,"object",typeof e=="string"?{$kind:"UnresolvedObject",UnresolvedObject:{objectId:et.normalizeSuiAddress(e)}}:e)});const t=C();l(this,i,new _.TransactionDataBuilder),l(this,k,[...t.buildPlugins.values()]),l(this,P,[...t.serializationPlugins.values()])}static fromKind(t){const e=new x;return l(e,i,_.TransactionDataBuilder.fromKindBytes(typeof t=="string"?W.fromBase64(t):t)),l(e,b,n(e,i).inputs.slice()),l(e,p,n(e,i).commands.slice()),l(e,m,new Set(n(e,p).map((r,a)=>a))),e}static from(t){const e=new x;return Z(t)?l(e,i,_.TransactionDataBuilder.restore(t.getData())):typeof t!="string"||!t.startsWith("{")?l(e,i,_.TransactionDataBuilder.fromBytes(typeof t=="string"?W.fromBase64(t):t)):l(e,i,_.TransactionDataBuilder.restore(JSON.parse(t))),l(e,b,n(e,i).inputs.slice()),l(e,p,n(e,i).commands.slice()),l(e,m,new Set(n(e,p).map((r,a)=>a))),e}static registerGlobalSerializationPlugin(t,e){C().serializationPlugins.set(t,e??t)}static unregisterGlobalSerializationPlugin(t){C().serializationPlugins.delete(t)}static registerGlobalBuildPlugin(t,e){C().buildPlugins.set(t,e??t)}static unregisterGlobalBuildPlugin(t){C().buildPlugins.delete(t)}addSerializationPlugin(t){n(this,P).push(t)}addBuildPlugin(t){n(this,k).push(t)}addIntentResolver(t,e){if(n(this,y).has(t)&&n(this,y).get(t)!==e)throw new Error(`Intent resolver for ${t} already exists`);n(this,y).set(t,e)}setSender(t){n(this,i).sender=t}setSenderIfNotSet(t){n(this,i).sender||(n(this,i).sender=t)}setExpiration(t){n(this,i).expiration=t?S.parse(T.TransactionExpiration,t):null}setGasPrice(t){n(this,i).gasConfig.price=String(t)}setGasBudget(t){n(this,i).gasConfig.budget=String(t)}setGasBudgetIfNotSet(t){n(this,i).gasData.budget==null&&(n(this,i).gasConfig.budget=String(t))}setGasOwner(t){n(this,i).gasConfig.owner=t}setGasPayment(t){n(this,i).gasConfig.payment=t.map(e=>S.parse(T.ObjectRefSchema,e))}get blockData(){return F.serializeV1TransactionData(n(this,i).snapshot())}getData(){return n(this,i).snapshot()}get[X](){return!0}get pure(){return Object.defineProperty(this,"pure",{enumerable:!1,value:it.createPure(t=>V.isSerializedBcs(t)?d(this,h,O).call(this,"pure",{$kind:"Pure",Pure:{bytes:t.toBase64()}}):d(this,h,O).call(this,"pure",S.is(T.NormalizedCallArg,t)?S.parse(T.NormalizedCallArg,t):t instanceof Uint8Array?$.Inputs.Pure(t):{$kind:"UnresolvedPure",UnresolvedPure:{value:t}}))}),this.pure}get gas(){return{$kind:"GasCoin",GasCoin:!0}}objectRef(...t){return this.object($.Inputs.ObjectRef(...t))}receivingRef(...t){return this.object($.Inputs.ReceivingRef(...t))}sharedObjectRef(...t){return this.object($.Inputs.SharedObjectRef(...t))}add(t){if(typeof t=="function"){if(n(this,I).has(t))return n(this,I).get(t);const e=d(this,h,H).call(this),r=t(e);if(!(r&&typeof r=="object"&&"then"in r))return l(this,m,n(e,m)),n(this,I).set(t,r),r;const a=d(this,h,j).call(this,{$kind:"$Intent",$Intent:{name:"AsyncTransactionThunk",inputs:{},data:{resultIndex:n(this,i).commands.length,result:null}}});n(this,g).add(Promise.resolve(r).then(f=>{a.$Intent.data.result=f}));const o=A(()=>a.$Intent.data.resultIndex);return n(this,I).set(t,o),o}else d(this,h,j).call(this,t);return A(n(this,i).commands.length-1)}splitCoins(t,e){const r=R.Commands.SplitCoins(typeof t=="string"?this.object(t):d(this,h,v).call(this,t),e.map(a=>typeof a=="number"||typeof a=="bigint"||typeof a=="string"?this.pure.u64(a):d(this,h,N).call(this,a)));return d(this,h,j).call(this,r),A(n(this,i).commands.length-1,e.length)}mergeCoins(t,e){return this.add(R.Commands.MergeCoins(this.object(t),e.map(r=>this.object(r))))}publish({modules:t,dependencies:e}){return this.add(R.Commands.Publish({modules:t,dependencies:e}))}upgrade({modules:t,dependencies:e,package:r,ticket:a}){return this.add(R.Commands.Upgrade({modules:t,dependencies:e,package:r,ticket:this.object(a)}))}moveCall({arguments:t,...e}){return this.add(R.Commands.MoveCall({...e,arguments:t==null?void 0:t.map(r=>d(this,h,N).call(this,r))}))}transferObjects(t,e){return this.add(R.Commands.TransferObjects(t.map(r=>this.object(r)),typeof e=="string"?this.pure.address(e):d(this,h,N).call(this,e)))}makeMoveVec({type:t,elements:e}){return this.add(R.Commands.MakeMoveVec({type:t,elements:e.map(r=>this.object(r))}))}serialize(){return JSON.stringify(F.serializeV1TransactionData(n(this,i).snapshot()))}async toJSON(t={}){await this.prepareForSerialization(t);const e=this.isFullyResolved();return JSON.stringify(S.parse(nt.SerializedTransactionDataV2Schema,e?{...n(this,i).snapshot(),digest:n(this,i).getDigest()}:n(this,i).snapshot()),(r,a)=>typeof a=="bigint"?a.toString():a,2)}async sign(t){const{signer:e,...r}=t,a=await this.build(r);return e.signTransaction(a)}isFullyResolved(){return!(!n(this,i).sender||n(this,g).size>0||n(this,i).commands.some(t=>t.$Intent)||J.needsTransactionResolution(n(this,i),{}))}async build(t={}){return await this.prepareForSerialization(t),await d(this,h,z).call(this,t),n(this,i).build({onlyTransactionKind:t.onlyTransactionKind})}async getDigest(t={}){return await this.prepareForSerialization(t),await d(this,h,z).call(this,t),n(this,i).getDigest()}async prepareForSerialization(t){var a;await d(this,h,L).call(this),d(this,h,Q).call(this);const e=new Set;for(const o of n(this,i).commands)o.$Intent&&e.add(o.$Intent.name);const r=[...n(this,P)];for(const o of e)if(!((a=t.supportedIntents)!=null&&a.includes(o))){if(!n(this,y).has(o))throw new Error(`Missing intent resolver for ${o}`);r.push(n(this,y).get(o))}r.push(rt.namedPackagesPlugin()),await d(this,h,B).call(this,r,t)}};P=new WeakMap;k=new WeakMap;y=new WeakMap;b=new WeakMap;p=new WeakMap;m=new WeakMap;g=new WeakMap;I=new WeakMap;i=new WeakMap;h=new WeakSet;H=function(){const s=new tt;return l(s,i,n(this,i)),l(s,P,n(this,P)),l(s,k,n(this,k)),l(s,y,n(this,y)),l(s,g,n(this,g)),l(s,m,new Set(n(this,m))),l(s,I,n(this,I)),n(this,b).push(n(s,b)),n(this,p).push(n(s,p)),s};j=function(s){const t=n(this,i).commands.length;return n(this,p).push(s),n(this,m).add(t),n(this,i).commands.push(s),n(this,i).mapCommandArguments(t,e=>{if(e.$kind==="Result"&&!n(this,m).has(e.Result))throw new Error(`Result { Result: ${e.Result} } is not available to use in the current transaction`);if(e.$kind==="NestedResult"&&!n(this,m).has(e.NestedResult[0]))throw new Error(`Result { NestedResult: [${e.NestedResult[0]}, ${e.NestedResult[1]}] } is not available to use in the current transaction`);if(e.$kind==="Input"&&e.Input>=n(this,i).inputs.length)throw new Error(`Input { Input: ${e.Input} } references an input that does not exist in the current transaction`);return e}),s};O=function(s,t){return n(this,b).push(t),n(this,i).addInput(s,t)};N=function(s){return V.isSerializedBcs(s)?this.pure(s):d(this,h,v).call(this,s)};v=function(s){if(typeof s=="function"){const t=this.add(s);return typeof t=="function"?d(this,h,v).call(this,t):S.parse(T.ArgumentSchema,t)}return S.parse(T.ArgumentSchema,s)};z=async function(s){if(!s.onlyTransactionKind&&!n(this,i).sender)throw new Error("Missing transaction sender");await d(this,h,B).call(this,[...n(this,k),J.resolveTransactionPlugin],s)};B=async function(s,t){try{const e=r=>{if(r>=s.length)return()=>{};const a=s[r];return async()=>{const o=e(r+1);let f=!1,u=!1;if(await a(n(this,i),t,async()=>{if(f)throw new Error(`next() was call multiple times in TransactionPlugin ${r}`);f=!0,await o(),u=!0}),!f)throw new Error(`next() was not called in TransactionPlugin ${r}`);if(!u)throw new Error(`next() was not awaited in TransactionPlugin ${r}`)}};await e(0)()}finally{l(this,b,n(this,i).inputs.slice()),l(this,p,n(this,i).commands.slice()),l(this,m,new Set(n(this,p).map((e,r)=>r)))}};L=async function(){for(;n(this,g).size>0;){const s=Promise.all(n(this,g));n(this,g).clear(),n(this,g).add(s),await s,n(this,g).delete(s)}};Q=function(){var f;const s=n(this,i).commands,t=n(this,i).inputs,e=n(this,p).flat(1/0),r=n(this,b).flat(1/0);if(e.length!==s.length)throw new Error("Unexpected number of commands found in transaction data");if(r.length!==t.length)throw new Error("Unexpected number of inputs found in transaction data");const a=e.filter(u=>{var c;return((c=u.$Intent)==null?void 0:c.name)!=="AsyncTransactionThunk"});n(this,i).commands=a,n(this,i).inputs=r,l(this,p,a),l(this,b,r),l(this,m,new Set(a.map((u,c)=>c)));function o(u){var q;const c=s[u];if(((q=c.$Intent)==null?void 0:q.name)==="AsyncTransactionThunk"){const G=c.$Intent.data.result;if(G==null)throw new Error("AsyncTransactionThunk has not been resolved");return o(G.Result)}const D=a.indexOf(c);if(D===-1)throw new Error("Unable to find original index for command");return D}n(this,i).mapArguments(u=>{if(u.$kind==="Input"){const c=r.indexOf(t[u.Input]);if(c===-1)throw new Error("Input has not been resolved");return{...u,Input:c}}else if(u.$kind==="Result"){const c=o(u.Result);return{...u,Result:c}}else if(u.$kind==="NestedResult"){const c=o(u.NestedResult[0]);return{...u,NestedResult:[c,u.NestedResult[1]]}}return u});for(const[u,c]of s.entries())if(((f=c.$Intent)==null?void 0:f.name)==="AsyncTransactionThunk")try{c.$Intent.data.resultIndex=o(u)}catch{}};let at=tt;exports.Transaction=at;exports.isTransaction=Z;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./index114.cjs"),V=require("./index304.cjs"),S=require("./index305.cjs"),et=require("./index117.cjs"),R=require("./index306.cjs"),T=require("./index307.cjs"),F=require("./index308.cjs"),nt=require("./index309.cjs"),$=require("./index310.cjs"),J=require("./index311.cjs"),st=require("./index312.cjs"),it=require("./index313.cjs"),_=require("./index314.cjs"),U=require("./index315.cjs"),rt=require("./index316.cjs");var Y=s=>{throw TypeError(s)},E=(s,t,e)=>t.has(s)||Y("Cannot "+e),n=(s,t,e)=>(E(s,t,"read from private field"),e?e.call(s):t.get(s)),w=(s,t,e)=>t.has(s)?Y("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),l=(s,t,e,r)=>(E(s,t,"write to private field"),t.set(s,e),e),d=(s,t,e)=>(E(s,t,"access private method"),e),P,k,y,b,p,m,g,I,i,h,H,j,O,N,v,z,B,L,Q;function A(s,t=1/0){const e={$kind:"Result",get Result(){return typeof s=="function"?s():s}},r=[],a=o=>r[o]??(r[o]={$kind:"NestedResult",get NestedResult(){return[typeof s=="function"?s():s,o]}});return new Proxy(e,{set(){throw new Error("The transaction result is a proxy, and does not support setting properties directly")},get(o,f){if(f in o)return Reflect.get(o,f);if(f===Symbol.iterator)return function*(){let c=0;for(;c<t;)yield a(c),c++};if(typeof f=="symbol")return;const u=parseInt(f,10);if(!(Number.isNaN(u)||u<0))return a(u)}})}const X=Symbol.for("@mysten/transaction");function Z(s){return!!s&&typeof s=="object"&&s[X]===!0}const K={buildPlugins:new Map,serializationPlugins:new Map},M=Symbol.for("@mysten/transaction/registry");function C(){try{const s=globalThis;return s[M]||(s[M]=K),s[M]}catch{return K}}const tt=class x{constructor(){w(this,h),w(this,P),w(this,k),w(this,y,new Map),w(this,b,[]),w(this,p,[]),w(this,m,new Set),w(this,g,new Set),w(this,I,new Map),w(this,i),this.object=st.createObjectMethods(e=>{var o,f;if(typeof e=="function")return this.object(this.add(e));if(typeof e=="object"&&S.is(T.ArgumentSchema,e))return e;const r=U.getIdFromCallArg(e),a=n(this,i).inputs.find(u=>r===U.getIdFromCallArg(u));return(o=a==null?void 0:a.Object)!=null&&o.SharedObject&&typeof e=="object"&&((f=e.Object)!=null&&f.SharedObject)&&(a.Object.SharedObject.mutable=a.Object.SharedObject.mutable||e.Object.SharedObject.mutable),a?{$kind:"Input",Input:n(this,i).inputs.indexOf(a),type:"object"}:d(this,h,O).call(this,"object",typeof e=="string"?{$kind:"UnresolvedObject",UnresolvedObject:{objectId:et.normalizeSuiAddress(e)}}:e)});const t=C();l(this,i,new _.TransactionDataBuilder),l(this,k,[...t.buildPlugins.values()]),l(this,P,[...t.serializationPlugins.values()])}static fromKind(t){const e=new x;return l(e,i,_.TransactionDataBuilder.fromKindBytes(typeof t=="string"?W.fromBase64(t):t)),l(e,b,n(e,i).inputs.slice()),l(e,p,n(e,i).commands.slice()),l(e,m,new Set(n(e,p).map((r,a)=>a))),e}static from(t){const e=new x;return Z(t)?l(e,i,_.TransactionDataBuilder.restore(t.getData())):typeof t!="string"||!t.startsWith("{")?l(e,i,_.TransactionDataBuilder.fromBytes(typeof t=="string"?W.fromBase64(t):t)):l(e,i,_.TransactionDataBuilder.restore(JSON.parse(t))),l(e,b,n(e,i).inputs.slice()),l(e,p,n(e,i).commands.slice()),l(e,m,new Set(n(e,p).map((r,a)=>a))),e}static registerGlobalSerializationPlugin(t,e){C().serializationPlugins.set(t,e??t)}static unregisterGlobalSerializationPlugin(t){C().serializationPlugins.delete(t)}static registerGlobalBuildPlugin(t,e){C().buildPlugins.set(t,e??t)}static unregisterGlobalBuildPlugin(t){C().buildPlugins.delete(t)}addSerializationPlugin(t){n(this,P).push(t)}addBuildPlugin(t){n(this,k).push(t)}addIntentResolver(t,e){if(n(this,y).has(t)&&n(this,y).get(t)!==e)throw new Error(`Intent resolver for ${t} already exists`);n(this,y).set(t,e)}setSender(t){n(this,i).sender=t}setSenderIfNotSet(t){n(this,i).sender||(n(this,i).sender=t)}setExpiration(t){n(this,i).expiration=t?S.parse(T.TransactionExpiration,t):null}setGasPrice(t){n(this,i).gasConfig.price=String(t)}setGasBudget(t){n(this,i).gasConfig.budget=String(t)}setGasBudgetIfNotSet(t){n(this,i).gasData.budget==null&&(n(this,i).gasConfig.budget=String(t))}setGasOwner(t){n(this,i).gasConfig.owner=t}setGasPayment(t){n(this,i).gasConfig.payment=t.map(e=>S.parse(T.ObjectRefSchema,e))}get blockData(){return F.serializeV1TransactionData(n(this,i).snapshot())}getData(){return n(this,i).snapshot()}get[X](){return!0}get pure(){return Object.defineProperty(this,"pure",{enumerable:!1,value:it.createPure(t=>V.isSerializedBcs(t)?d(this,h,O).call(this,"pure",{$kind:"Pure",Pure:{bytes:t.toBase64()}}):d(this,h,O).call(this,"pure",S.is(T.NormalizedCallArg,t)?S.parse(T.NormalizedCallArg,t):t instanceof Uint8Array?$.Inputs.Pure(t):{$kind:"UnresolvedPure",UnresolvedPure:{value:t}}))}),this.pure}get gas(){return{$kind:"GasCoin",GasCoin:!0}}objectRef(...t){return this.object($.Inputs.ObjectRef(...t))}receivingRef(...t){return this.object($.Inputs.ReceivingRef(...t))}sharedObjectRef(...t){return this.object($.Inputs.SharedObjectRef(...t))}add(t){if(typeof t=="function"){if(n(this,I).has(t))return n(this,I).get(t);const e=d(this,h,H).call(this),r=t(e);if(!(r&&typeof r=="object"&&"then"in r))return l(this,m,n(e,m)),n(this,I).set(t,r),r;const a=d(this,h,j).call(this,{$kind:"$Intent",$Intent:{name:"AsyncTransactionThunk",inputs:{},data:{resultIndex:n(this,i).commands.length,result:null}}});n(this,g).add(Promise.resolve(r).then(f=>{a.$Intent.data.result=f}));const o=A(()=>a.$Intent.data.resultIndex);return n(this,I).set(t,o),o}else d(this,h,j).call(this,t);return A(n(this,i).commands.length-1)}splitCoins(t,e){const r=R.Commands.SplitCoins(typeof t=="string"?this.object(t):d(this,h,v).call(this,t),e.map(a=>typeof a=="number"||typeof a=="bigint"||typeof a=="string"?this.pure.u64(a):d(this,h,N).call(this,a)));return d(this,h,j).call(this,r),A(n(this,i).commands.length-1,e.length)}mergeCoins(t,e){return this.add(R.Commands.MergeCoins(this.object(t),e.map(r=>this.object(r))))}publish({modules:t,dependencies:e}){return this.add(R.Commands.Publish({modules:t,dependencies:e}))}upgrade({modules:t,dependencies:e,package:r,ticket:a}){return this.add(R.Commands.Upgrade({modules:t,dependencies:e,package:r,ticket:this.object(a)}))}moveCall({arguments:t,...e}){return this.add(R.Commands.MoveCall({...e,arguments:t==null?void 0:t.map(r=>d(this,h,N).call(this,r))}))}transferObjects(t,e){return this.add(R.Commands.TransferObjects(t.map(r=>this.object(r)),typeof e=="string"?this.pure.address(e):d(this,h,N).call(this,e)))}makeMoveVec({type:t,elements:e}){return this.add(R.Commands.MakeMoveVec({type:t,elements:e.map(r=>this.object(r))}))}serialize(){return JSON.stringify(F.serializeV1TransactionData(n(this,i).snapshot()))}async toJSON(t={}){await this.prepareForSerialization(t);const e=this.isFullyResolved();return JSON.stringify(S.parse(nt.SerializedTransactionDataV2Schema,e?{...n(this,i).snapshot(),digest:n(this,i).getDigest()}:n(this,i).snapshot()),(r,a)=>typeof a=="bigint"?a.toString():a,2)}async sign(t){const{signer:e,...r}=t,a=await this.build(r);return e.signTransaction(a)}isFullyResolved(){return!(!n(this,i).sender||n(this,g).size>0||n(this,i).commands.some(t=>t.$Intent)||J.needsTransactionResolution(n(this,i),{}))}async build(t={}){return await this.prepareForSerialization(t),await d(this,h,z).call(this,t),n(this,i).build({onlyTransactionKind:t.onlyTransactionKind})}async getDigest(t={}){return await this.prepareForSerialization(t),await d(this,h,z).call(this,t),n(this,i).getDigest()}async prepareForSerialization(t){var a;await d(this,h,L).call(this),d(this,h,Q).call(this);const e=new Set;for(const o of n(this,i).commands)o.$Intent&&e.add(o.$Intent.name);const r=[...n(this,P)];for(const o of e)if(!((a=t.supportedIntents)!=null&&a.includes(o))){if(!n(this,y).has(o))throw new Error(`Missing intent resolver for ${o}`);r.push(n(this,y).get(o))}r.push(rt.namedPackagesPlugin()),await d(this,h,B).call(this,r,t)}};P=new WeakMap;k=new WeakMap;y=new WeakMap;b=new WeakMap;p=new WeakMap;m=new WeakMap;g=new WeakMap;I=new WeakMap;i=new WeakMap;h=new WeakSet;H=function(){const s=new tt;return l(s,i,n(this,i)),l(s,P,n(this,P)),l(s,k,n(this,k)),l(s,y,n(this,y)),l(s,g,n(this,g)),l(s,m,new Set(n(this,m))),l(s,I,n(this,I)),n(this,b).push(n(s,b)),n(this,p).push(n(s,p)),s};j=function(s){const t=n(this,i).commands.length;return n(this,p).push(s),n(this,m).add(t),n(this,i).commands.push(s),n(this,i).mapCommandArguments(t,e=>{if(e.$kind==="Result"&&!n(this,m).has(e.Result))throw new Error(`Result { Result: ${e.Result} } is not available to use in the current transaction`);if(e.$kind==="NestedResult"&&!n(this,m).has(e.NestedResult[0]))throw new Error(`Result { NestedResult: [${e.NestedResult[0]}, ${e.NestedResult[1]}] } is not available to use in the current transaction`);if(e.$kind==="Input"&&e.Input>=n(this,i).inputs.length)throw new Error(`Input { Input: ${e.Input} } references an input that does not exist in the current transaction`);return e}),s};O=function(s,t){return n(this,b).push(t),n(this,i).addInput(s,t)};N=function(s){return V.isSerializedBcs(s)?this.pure(s):d(this,h,v).call(this,s)};v=function(s){if(typeof s=="function"){const t=this.add(s);return typeof t=="function"?d(this,h,v).call(this,t):S.parse(T.ArgumentSchema,t)}return S.parse(T.ArgumentSchema,s)};z=async function(s){if(!s.onlyTransactionKind&&!n(this,i).sender)throw new Error("Missing transaction sender");await d(this,h,B).call(this,[...n(this,k),J.resolveTransactionPlugin],s)};B=async function(s,t){try{const e=r=>{if(r>=s.length)return()=>{};const a=s[r];return async()=>{const o=e(r+1);let f=!1,u=!1;if(await a(n(this,i),t,async()=>{if(f)throw new Error(`next() was call multiple times in TransactionPlugin ${r}`);f=!0,await o(),u=!0}),!f)throw new Error(`next() was not called in TransactionPlugin ${r}`);if(!u)throw new Error(`next() was not awaited in TransactionPlugin ${r}`)}};await e(0)()}finally{l(this,b,n(this,i).inputs.slice()),l(this,p,n(this,i).commands.slice()),l(this,m,new Set(n(this,p).map((e,r)=>r)))}};L=async function(){for(;n(this,g).size>0;){const s=Promise.all(n(this,g));n(this,g).clear(),n(this,g).add(s),await s,n(this,g).delete(s)}};Q=function(){var f;const s=n(this,i).commands,t=n(this,i).inputs,e=n(this,p).flat(1/0),r=n(this,b).flat(1/0);if(e.length!==s.length)throw new Error("Unexpected number of commands found in transaction data");if(r.length!==t.length)throw new Error("Unexpected number of inputs found in transaction data");const a=e.filter(u=>{var c;return((c=u.$Intent)==null?void 0:c.name)!=="AsyncTransactionThunk"});n(this,i).commands=a,n(this,i).inputs=r,l(this,p,a),l(this,b,r),l(this,m,new Set(a.map((u,c)=>c)));function o(u){var q;const c=s[u];if(((q=c.$Intent)==null?void 0:q.name)==="AsyncTransactionThunk"){const G=c.$Intent.data.result;if(G==null)throw new Error("AsyncTransactionThunk has not been resolved");return o(G.Result)}const D=a.indexOf(c);if(D===-1)throw new Error("Unable to find original index for command");return D}n(this,i).mapArguments(u=>{if(u.$kind==="Input"){const c=r.indexOf(t[u.Input]);if(c===-1)throw new Error("Input has not been resolved");return{...u,Input:c}}else if(u.$kind==="Result"){const c=o(u.Result);return{...u,Result:c}}else if(u.$kind==="NestedResult"){const c=o(u.NestedResult[0]);return{...u,NestedResult:[c,u.NestedResult[1]]}}return u});for(const[u,c]of s.entries())if(((f=c.$Intent)==null?void 0:f.name)==="AsyncTransactionThunk")try{c.$Intent.data.resultIndex=o(u)}catch{}};let at=tt;exports.Transaction=at;exports.isTransaction=Z;
package/dist/index77.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import { fromBase64 as F } from "./index114.js";
2
- import { isSerializedBcs as q } from "./index308.js";
3
- import { parse as P, is as U } from "./index309.js";
2
+ import { isSerializedBcs as q } from "./index304.js";
3
+ import { parse as P, is as U } from "./index305.js";
4
4
  import { normalizeSuiAddress as et } from "./index117.js";
5
- import { Commands as S } from "./index310.js";
6
- import { ArgumentSchema as x, TransactionExpiration as nt, ObjectRefSchema as st, NormalizedCallArg as K } from "./index311.js";
7
- import { serializeV1TransactionData as J } from "./index312.js";
8
- import { SerializedTransactionDataV2Schema as it } from "./index313.js";
9
- import { Inputs as $ } from "./index314.js";
10
- import { needsTransactionResolution as rt, resolveTransactionPlugin as at } from "./index315.js";
11
- import { createObjectMethods as ot } from "./index316.js";
12
- import { createPure as lt } from "./index317.js";
13
- import { TransactionDataBuilder as T } from "./index318.js";
14
- import { getIdFromCallArg as V } from "./index319.js";
15
- import { namedPackagesPlugin as ut } from "./index320.js";
5
+ import { Commands as S } from "./index306.js";
6
+ import { ArgumentSchema as x, TransactionExpiration as nt, ObjectRefSchema as st, NormalizedCallArg as K } from "./index307.js";
7
+ import { serializeV1TransactionData as J } from "./index308.js";
8
+ import { SerializedTransactionDataV2Schema as it } from "./index309.js";
9
+ import { Inputs as $ } from "./index310.js";
10
+ import { needsTransactionResolution as rt, resolveTransactionPlugin as at } from "./index311.js";
11
+ import { createObjectMethods as ot } from "./index312.js";
12
+ import { createPure as lt } from "./index313.js";
13
+ import { TransactionDataBuilder as T } from "./index314.js";
14
+ import { getIdFromCallArg as V } from "./index315.js";
15
+ import { namedPackagesPlugin as ut } from "./index316.js";
16
16
  var H = (s) => {
17
17
  throw TypeError(s);
18
18
  }, z = (s, t, e) => t.has(s) || H("Cannot " + e), n = (s, t, e) => (z(s, t, "read from private field"), e ? e.call(s) : t.get(s)), w = (s, t, e) => t.has(s) ? H("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, e), u = (s, t, e, r) => (z(s, t, "write to private field"), t.set(s, e), e), d = (s, t, e) => (z(s, t, "access private method"), e), I, k, y, b, p, m, g, R, i, c, L, j, O, N, C, A, G, Q, X;
package/dist/index9.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),T=require("@gardenfi/garden-book"),b=require("@gardenfi/react-hooks"),A=require("./index23.cjs"),q=require("./index24.cjs"),M=require("./index6.cjs"),k=require("./index25.cjs"),s=require("./index12.cjs"),I=({isOpen:o=!0})=>{const[n,r]=e.useState(!1),{evmAddress:d,bitcoinAddress:u,solanaAddress:f,suiAddress:m,starknetAddress:g}=k.useAddresses(),[H,h]=e.useState({bitcoin:"",evm:"",starknet:"",solana:"",sui:"",tron:""}),{garden:t}=b.useGarden(),{fetchTransactions:a,totalItems:l,transactions:c,loadMore:w}=A.transactionHistoryStore(),{showFeesAndRateDetails:y,showBtcAddress:E}=M.swapStore(),S=e.useMemo(()=>c.length<l,[c.length,l]),v=async()=>{if(t){r(!0);try{await w(t,H)}finally{r(!1)}}};if(e.useEffect(()=>{if(!t||!o)return;const i={bitcoin:u||"",evm:d||"",starknet:g||"",solana:f||"",sui:m||"",tron:""};h(i),a(t,i)},[t,o,a]),!o)return null;const x=(y?E?s.HEIGHTS.large:s.HEIGHTS.medium:s.HEIGHTS.small)-s.BUFFER_HEIGHT.small;return e.createElement("div",{className:"flex flex-col h-full w-full gap-3 overflow-y-auto"},e.createElement("div",{className:"scrollbar-hide flex flex-1 flex-col gap-5 overflow-y-auto h-full items-center rounded-2xl pb-6",style:{minHeight:x}},e.createElement("div",{className:"flex flex-col rounded-2xl w-full bg-white/50"},e.createElement(q.Transactions,null)),S&&e.createElement(T.Button,{onClick:v,variant:n?"disabled":"secondary",className:"mx-auto min-h-10 w-1/4"},n?"Loading...":"Load More")))};exports.TransactionHistory=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),v=require("@gardenfi/garden-book"),T=require("@gardenfi/react-hooks"),b=require("./index23.cjs"),A=require("./index24.cjs"),k=require("./index6.cjs"),q=require("./index25.cjs"),s=require("./index12.cjs"),M=({isOpen:n=!0})=>{const[o,r]=e.useState(!1),{evmAddress:d,bitcoinAddress:u,solanaAddress:f,suiAddress:m,starknetAddress:g}=q.useAddresses(),[H,h]=e.useState({bitcoin:"",evm:"",starknet:"",solana:"",sui:"",tron:"",litecoin:"",alpen_signet:"",xrpl:"",spark:""}),{garden:t}=T.useGarden(),{fetchTransactions:a,totalItems:l,transactions:c,loadMore:w}=b.transactionHistoryStore(),{showFeesAndRateDetails:y,showBtcAddress:x}=k.swapStore(),E=e.useMemo(()=>c.length<l,[c.length,l]),S=async()=>{if(t){r(!0);try{await w(t,H)}finally{r(!1)}}};if(e.useEffect(()=>{if(!t||!n)return;const i={bitcoin:u||"",evm:d||"",starknet:g||"",solana:f||"",sui:m||"",tron:"",litecoin:"",alpen_signet:"",xrpl:"",spark:""};h(i),a(t,i)},[t,n,a]),!n)return null;const p=(y?x?s.HEIGHTS.large:s.HEIGHTS.medium:s.HEIGHTS.small)-s.BUFFER_HEIGHT.small;return e.createElement("div",{className:"flex flex-col h-full w-full gap-3 overflow-y-auto"},e.createElement("div",{className:"scrollbar-hide flex flex-1 flex-col gap-5 overflow-y-auto h-full items-center rounded-2xl pb-6",style:{minHeight:p}},e.createElement("div",{className:"flex flex-col rounded-2xl w-full bg-white/50"},e.createElement(A.Transactions,null)),E&&e.createElement(v.Button,{onClick:S,variant:o?"disabled":"secondary",className:"mx-auto min-h-10 w-1/4"},o?"Loading...":"Load More")))};exports.TransactionHistory=M;
package/dist/index9.js CHANGED
@@ -1,53 +1,61 @@
1
1
  import t, { useState as d, useMemo as b, useEffect as M } from "react";
2
- import { Button as L } from "@gardenfi/garden-book";
3
- import { useGarden as T } from "@gardenfi/react-hooks";
4
- import { transactionHistoryStore as k } from "./index23.js";
2
+ import { Button as k } from "@gardenfi/garden-book";
3
+ import { useGarden as L } from "@gardenfi/react-hooks";
4
+ import { transactionHistoryStore as T } from "./index23.js";
5
5
  import { Transactions as I } from "./index24.js";
6
6
  import { swapStore as N } from "./index6.js";
7
7
  import { useAddresses as S } from "./index25.js";
8
- import { HEIGHTS as s, BUFFER_HEIGHT as B } from "./index12.js";
8
+ import { HEIGHTS as o, BUFFER_HEIGHT as B } from "./index12.js";
9
9
  const j = ({
10
- isOpen: o = !0
10
+ isOpen: s = !0
11
11
  }) => {
12
12
  const [r, a] = d(!1), {
13
13
  evmAddress: m,
14
14
  bitcoinAddress: f,
15
15
  solanaAddress: u,
16
- suiAddress: h,
17
- starknetAddress: w
18
- } = S(), [g, p] = d({
16
+ suiAddress: p,
17
+ starknetAddress: g
18
+ } = S(), [h, w] = d({
19
19
  bitcoin: "",
20
20
  evm: "",
21
21
  starknet: "",
22
22
  solana: "",
23
23
  sui: "",
24
- tron: ""
25
- }), { garden: e } = T(), { fetchTransactions: n, totalItems: l, transactions: i, loadMore: x } = k(), { showFeesAndRateDetails: v, showBtcAddress: y } = N(), E = b(
24
+ tron: "",
25
+ litecoin: "",
26
+ alpen_signet: "",
27
+ xrpl: "",
28
+ spark: ""
29
+ }), { garden: e } = L(), { fetchTransactions: n, totalItems: l, transactions: i, loadMore: x } = T(), { showFeesAndRateDetails: v, showBtcAddress: y } = N(), E = b(
26
30
  () => i.length < l,
27
31
  [i.length, l]
28
32
  ), A = async () => {
29
33
  if (e) {
30
34
  a(!0);
31
35
  try {
32
- await x(e, g);
36
+ await x(e, h);
33
37
  } finally {
34
38
  a(!1);
35
39
  }
36
40
  }
37
41
  };
38
42
  if (M(() => {
39
- if (!e || !o) return;
43
+ if (!e || !s) return;
40
44
  const c = {
41
45
  bitcoin: f || "",
42
46
  evm: m || "",
43
- starknet: w || "",
47
+ starknet: g || "",
44
48
  solana: u || "",
45
- sui: h || "",
46
- tron: ""
49
+ sui: p || "",
50
+ tron: "",
51
+ litecoin: "",
52
+ alpen_signet: "",
53
+ xrpl: "",
54
+ spark: ""
47
55
  };
48
- p(c), n(e, c);
49
- }, [e, o, n]), !o) return null;
50
- const H = (v ? y ? s.large : s.medium : s.small) - B.small;
56
+ w(c), n(e, c);
57
+ }, [e, s, n]), !s) return null;
58
+ const H = (v ? y ? o.large : o.medium : o.small) - B.small;
51
59
  return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col h-full w-full gap-3 overflow-y-auto" }, /* @__PURE__ */ t.createElement(
52
60
  "div",
53
61
  {
@@ -56,7 +64,7 @@ const j = ({
56
64
  },
57
65
  /* @__PURE__ */ t.createElement("div", { className: "flex flex-col rounded-2xl w-full bg-white/50" }, /* @__PURE__ */ t.createElement(I, null)),
58
66
  E && /* @__PURE__ */ t.createElement(
59
- L,
67
+ k,
60
68
  {
61
69
  onClick: A,
62
70
  variant: r ? "disabled" : "secondary",
package/dist/index92.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index44.cjs"),x=require("./index93.cjs"),E=require("./index94.cjs"),V=require("./index95.cjs"),S=require("./index96.cjs"),N=require("./index97.cjs"),T=require("./index98.cjs"),F=require("./index99.cjs"),k=require("./index80.cjs"),B=require("./index100.cjs"),P=require("./index71.cjs"),w=require("./index81.cjs"),b=require("./index101.cjs"),j=require("./index102.cjs"),p=require("./index103.cjs"),I=require("./index104.cjs"),W=require("./index91.cjs"),D=require("./index105.cjs"),H=require("./index106.cjs"),q=require("./index107.cjs");async function L(i,a){var s,d,f,g;const{address:n,chain:r=i.chain,hash:c,erc6492VerifierAddress:u=a.universalSignatureVerifierAddress??((d=(s=r==null?void 0:r.contracts)==null?void 0:s.erc6492Verifier)==null?void 0:d.address),multicallAddress:o=a.multicallAddress??((g=(f=r==null?void 0:r.contracts)==null?void 0:f.multicall3)==null?void 0:g.address)}=a;if(r!=null&&r.verifyHash)return await r.verifyHash(i,a);const e=(()=>{const t=a.signature;return B.isHex(t)?t:typeof t=="object"&&"r"in t&&"s"in t?p.serializeSignature(t):w.bytesToHex(t)})();try{return H.validate(e)?await m(i,{...a,multicallAddress:o,signature:e}):await M(i,{...a,verifierAddress:u,signature:e})}catch(t){try{if(T.isAddressEqual(N.getAddress(n),await j.recoverAddress({hash:c,signature:e})))return!0}catch{}if(t instanceof l)return!1;throw t}}async function m(i,a){var v;const{address:n,blockNumber:r,blockTag:c,hash:u,multicallAddress:o}=a,{authorization:e,data:s,signature:d,to:f}=H.unwrap(a.signature);if(await W.getCode(i,{address:n,blockNumber:r,blockTag:c})===k.concatHex(["0xef0100",e.address]))return await z(i,{address:n,blockNumber:r,blockTag:c,hash:u,signature:d});const t={address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:w.numberToHex(e.r,{size:32}),s:w.numberToHex(e.s,{size:32}),yParity:e.yParity};if(!await F.verifyAuthorization({address:n,authorization:t}))throw new l;const A=await b.getAction(i,D.readContract,"readContract")({...o?{address:o}:{code:x.multicall3Bytecode},authorizationList:[t],abi:h.multicall3Abi,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...s?[{allowFailure:!0,target:f??n,callData:s}]:[],{allowFailure:!0,target:n,callData:S.encodeFunctionData({abi:h.erc1271Abi,functionName:"isValidSignature",args:[u,d]})}]]}),y=(v=A[A.length-1])==null?void 0:v.returnData;if(y!=null&&y.startsWith("0x1626ba7e"))return!0;throw new l}async function M(i,a){const{address:n,factory:r,factoryData:c,hash:u,signature:o,verifierAddress:e,...s}=a,d=await(async()=>!r&&!c||q.validate(o)?o:q.wrap({data:c,signature:o,to:r}))(),f=e?{to:e,data:S.encodeFunctionData({abi:h.erc6492SignatureValidatorAbi,functionName:"isValidSig",args:[n,u,d]}),...s}:{data:V.encodeDeployData({abi:h.erc6492SignatureValidatorAbi,args:[n,u,d],bytecode:x.erc6492SignatureValidatorByteCode}),...s},{data:g}=await b.getAction(i,I.call,"call")(f).catch(t=>{throw t instanceof E.CallExecutionError?new l:t});if(P.hexToBool(g??"0x0"))return!0;throw new l}async function z(i,a){const{address:n,blockNumber:r,blockTag:c,hash:u,signature:o}=a;if((await b.getAction(i,D.readContract,"readContract")({address:n,abi:h.erc1271Abi,args:[u,o],blockNumber:r,blockTag:c,functionName:"isValidSignature"}).catch(s=>{throw s instanceof E.ContractFunctionExecutionError?new l:s})).startsWith("0x1626ba7e"))return!0;throw new l}class l extends Error{}exports.verifyErc1271=z;exports.verifyErc8010=m;exports.verifyHash=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index46.cjs"),x=require("./index93.cjs"),E=require("./index94.cjs"),V=require("./index95.cjs"),S=require("./index96.cjs"),N=require("./index97.cjs"),T=require("./index98.cjs"),F=require("./index99.cjs"),k=require("./index80.cjs"),B=require("./index100.cjs"),P=require("./index71.cjs"),w=require("./index81.cjs"),b=require("./index101.cjs"),j=require("./index102.cjs"),p=require("./index103.cjs"),I=require("./index104.cjs"),W=require("./index91.cjs"),D=require("./index105.cjs"),H=require("./index106.cjs"),q=require("./index107.cjs");async function L(i,a){var s,d,f,g;const{address:n,chain:r=i.chain,hash:c,erc6492VerifierAddress:u=a.universalSignatureVerifierAddress??((d=(s=r==null?void 0:r.contracts)==null?void 0:s.erc6492Verifier)==null?void 0:d.address),multicallAddress:o=a.multicallAddress??((g=(f=r==null?void 0:r.contracts)==null?void 0:f.multicall3)==null?void 0:g.address)}=a;if(r!=null&&r.verifyHash)return await r.verifyHash(i,a);const e=(()=>{const t=a.signature;return B.isHex(t)?t:typeof t=="object"&&"r"in t&&"s"in t?p.serializeSignature(t):w.bytesToHex(t)})();try{return H.validate(e)?await m(i,{...a,multicallAddress:o,signature:e}):await M(i,{...a,verifierAddress:u,signature:e})}catch(t){try{if(T.isAddressEqual(N.getAddress(n),await j.recoverAddress({hash:c,signature:e})))return!0}catch{}if(t instanceof l)return!1;throw t}}async function m(i,a){var v;const{address:n,blockNumber:r,blockTag:c,hash:u,multicallAddress:o}=a,{authorization:e,data:s,signature:d,to:f}=H.unwrap(a.signature);if(await W.getCode(i,{address:n,blockNumber:r,blockTag:c})===k.concatHex(["0xef0100",e.address]))return await z(i,{address:n,blockNumber:r,blockTag:c,hash:u,signature:d});const t={address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:w.numberToHex(e.r,{size:32}),s:w.numberToHex(e.s,{size:32}),yParity:e.yParity};if(!await F.verifyAuthorization({address:n,authorization:t}))throw new l;const A=await b.getAction(i,D.readContract,"readContract")({...o?{address:o}:{code:x.multicall3Bytecode},authorizationList:[t],abi:h.multicall3Abi,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...s?[{allowFailure:!0,target:f??n,callData:s}]:[],{allowFailure:!0,target:n,callData:S.encodeFunctionData({abi:h.erc1271Abi,functionName:"isValidSignature",args:[u,d]})}]]}),y=(v=A[A.length-1])==null?void 0:v.returnData;if(y!=null&&y.startsWith("0x1626ba7e"))return!0;throw new l}async function M(i,a){const{address:n,factory:r,factoryData:c,hash:u,signature:o,verifierAddress:e,...s}=a,d=await(async()=>!r&&!c||q.validate(o)?o:q.wrap({data:c,signature:o,to:r}))(),f=e?{to:e,data:S.encodeFunctionData({abi:h.erc6492SignatureValidatorAbi,functionName:"isValidSig",args:[n,u,d]}),...s}:{data:V.encodeDeployData({abi:h.erc6492SignatureValidatorAbi,args:[n,u,d],bytecode:x.erc6492SignatureValidatorByteCode}),...s},{data:g}=await b.getAction(i,I.call,"call")(f).catch(t=>{throw t instanceof E.CallExecutionError?new l:t});if(P.hexToBool(g??"0x0"))return!0;throw new l}async function z(i,a){const{address:n,blockNumber:r,blockTag:c,hash:u,signature:o}=a;if((await b.getAction(i,D.readContract,"readContract")({address:n,abi:h.erc1271Abi,args:[u,o],blockNumber:r,blockTag:c,functionName:"isValidSignature"}).catch(s=>{throw s instanceof E.ContractFunctionExecutionError?new l:s})).startsWith("0x1626ba7e"))return!0;throw new l}class l extends Error{}exports.verifyErc1271=z;exports.verifyErc8010=m;exports.verifyHash=L;
package/dist/index92.js CHANGED
@@ -1,4 +1,4 @@
1
- import { multicall3Abi as V, erc1271Abi as v, erc6492SignatureValidatorAbi as b } from "./index44.js";
1
+ import { multicall3Abi as V, erc1271Abi as v, erc6492SignatureValidatorAbi as b } from "./index46.js";
2
2
  import { multicall3Bytecode as z, erc6492SignatureValidatorByteCode as D } from "./index93.js";
3
3
  import { CallExecutionError as N, ContractFunctionExecutionError as S } from "./index94.js";
4
4
  import { encodeDeployData as C } from "./index95.js";
@@ -274,16 +274,16 @@ export declare const SupportedChains: readonly [{
274
274
  r: import('viem').Hex;
275
275
  s: import('viem').Hex;
276
276
  v: bigint;
277
- value: bigint;
278
- gas: bigint;
279
277
  to: import('viem').Address | null;
280
278
  from: import('viem').Address;
279
+ gas: bigint;
281
280
  nonce: number;
281
+ value: bigint;
282
282
  blockHash: `0x${string}` | null;
283
283
  blockNumber: bigint | null;
284
- transactionIndex: number | null;
285
284
  hash: import('viem').Hash;
286
285
  input: import('viem').Hex;
286
+ transactionIndex: number | null;
287
287
  typeHex: import('viem').Hex | null;
288
288
  accessList?: undefined | undefined;
289
289
  authorizationList?: undefined | undefined;
@@ -770,16 +770,16 @@ export declare const SupportedChains: readonly [{
770
770
  r: import('viem').Hex;
771
771
  s: import('viem').Hex;
772
772
  v: bigint;
773
- value: bigint;
774
- gas: bigint;
775
773
  to: import('viem').Address | null;
776
774
  from: import('viem').Address;
775
+ gas: bigint;
777
776
  nonce: number;
777
+ value: bigint;
778
778
  blockHash: `0x${string}` | null;
779
779
  blockNumber: bigint | null;
780
- transactionIndex: number | null;
781
780
  hash: import('viem').Hash;
782
781
  input: import('viem').Hex;
782
+ transactionIndex: number | null;
783
783
  typeHex: import('viem').Hex | null;
784
784
  accessList?: undefined | undefined;
785
785
  authorizationList?: undefined | undefined;
@@ -1087,16 +1087,16 @@ export declare const SupportedChains: readonly [{
1087
1087
  r: import('viem').Hex;
1088
1088
  s: import('viem').Hex;
1089
1089
  v: bigint;
1090
- value: bigint;
1091
- gas: bigint;
1092
1090
  to: import('viem').Address | null;
1093
1091
  from: import('viem').Address;
1092
+ gas: bigint;
1094
1093
  nonce: number;
1094
+ value: bigint;
1095
1095
  blockHash: `0x${string}` | null;
1096
1096
  blockNumber: bigint | null;
1097
- transactionIndex: number | null;
1098
1097
  hash: import('viem').Hash;
1099
1098
  input: import('viem').Hex;
1099
+ transactionIndex: number | null;
1100
1100
  typeHex: import('viem').Hex | null;
1101
1101
  accessList?: undefined | undefined;
1102
1102
  authorizationList?: undefined | undefined;
@@ -88,7 +88,7 @@ export declare const BTC: {
88
88
  address: string;
89
89
  schema: string;
90
90
  };
91
- chain: "solana_localnet" | "arbitrum_localnet" | "ethereum_localnet" | "bitcoin_regtest" | "starknet_devnet" | "solana_testnet" | "bitcoin_testnet" | "ethereum_sepolia" | "arbitrum_sepolia" | "base_sepolia" | "bera_testnet" | "citrea_testnet" | "monad_testnet" | "starknet_sepolia" | "sui_testnet" | "hyperliquid_testnet" | "bnbchain_testnet" | "alpen_signet" | "alpen_testnet" | "tron_shasta" | "bitcoin" | "base" | "monad" | "arbitrum" | "ethereum" | "solana" | "bera" | "starknet" | "sui" | "hyperliquid" | "unichain" | "corn" | "botanix" | "bnbchain" | "core" | "tron" | "hypercore" | "hypercore_testnet";
91
+ chain: "solana_localnet" | "arbitrum_localnet" | "ethereum_localnet" | "bitcoin_regtest" | "starknet_devnet" | "solana_testnet" | "bitcoin_testnet" | "ethereum_sepolia" | "arbitrum_sepolia" | "base_sepolia" | "bera_testnet" | "citrea" | "citrea_testnet" | "monad_testnet" | "starknet_sepolia" | "sui_testnet" | "hyperliquid_testnet" | "bnbchain_testnet" | "alpen_signet" | "litecoin_testnet" | "alpen_testnet" | "tron_shasta" | "bitcoin" | "base" | "monad" | "arbitrum" | "ethereum" | "solana" | "bera" | "starknet" | "sui" | "hyperevm" | "unichain" | "corn" | "botanix" | "bnbchain" | "core" | "tron" | "spark" | "spark_regtest" | "litecoin" | "hyperliquid" | "xrpl" | "xrpl_testnet" | "hypercore" | "hypercore_testnet";
92
92
  price: number;
93
93
  min_amount: string;
94
94
  max_amount: string;
@@ -66,7 +66,6 @@ export type GardenSwapWidgetStyles = {
66
66
  export type GardenSwapWidgetProps = {
67
67
  config: GardenProviderProps['config'] & {
68
68
  store: GardenProviderProps['store'];
69
- setRedeemServiceEnabled?: GardenProviderProps['setRedeemServiceEnabled'];
70
69
  styles?: GardenSwapWidgetStyles;
71
70
  };
72
71
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gardenfi/swap",
3
- "version": "0.0.2",
3
+ "version": "0.1.0-beta.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "vite build",
@@ -29,11 +29,11 @@
29
29
  "registry": "https://registry.npmjs.org/"
30
30
  },
31
31
  "dependencies": {
32
- "@gardenfi/core": "3.0.8",
32
+ "@gardenfi/core": "3.1.0-beta.1",
33
33
  "@gardenfi/garden-book": "0.2.2",
34
- "@gardenfi/orderbook": "3.0.6",
35
- "@gardenfi/react-hooks": "3.0.7",
36
- "@gardenfi/utils": "3.0.0",
34
+ "@gardenfi/orderbook": "3.1.0-beta.1",
35
+ "@gardenfi/react-hooks": "3.1.0-beta.1",
36
+ "@gardenfi/utils": "3.1.0-beta.1",
37
37
  "@mysten/sui": "^1.37.2",
38
38
  "@number-flow/react": "^0.5.9",
39
39
  "@solana/web3.js": "^1.98.2",
@@ -43,7 +43,7 @@
43
43
  "framer-motion": "^11.18.1",
44
44
  "lodash.debounce": "^4.0.8",
45
45
  "react-qr-code": "^2.0.15",
46
- "starknet": "7.6.4",
46
+ "starknet": "8.0.0",
47
47
  "zustand": "^5.0.2"
48
48
  },
49
49
  "peerDependencies": {