@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/index104.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("./index273.cjs"),Z=require("./index123.cjs"),j=require("./index44.cjs"),ee=require("./index274.cjs"),R=require("./index93.cjs"),F=require("./index189.cjs"),A=require("./index85.cjs"),L=require("./index94.cjs"),te=require("./index221.cjs"),$=require("./index95.cjs"),ae=require("./index96.cjs"),re=require("./index84.cjs"),G=require("./index81.cjs"),oe=require("./index269.cjs"),ce=require("./index271.cjs"),ne=require("./index108.cjs"),se=require("./index181.cjs"),ie=require("./index275.cjs"),le=require("./index261.cjs"),M=require("./index276.cjs");async function ue(e,t){var P,T,H,_;const{account:a=e.account,authorizationList:s,batch:i=!!((P=e.batch)!=null&&P.multicall),blockNumber:l,blockTag:C=e.experimental_blockTag??"latest",accessList:D,blobs:k,blockOverrides:y,code:m,data:c,factory:b,factoryData:u,gas:x,gasPrice:w,maxFeePerBlobGas:p,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:q,to:r,value:J,stateOverride:K,...Q}=t,E=a?Z.parseAccount(a):void 0;if(m&&(b||u))throw new F.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(m&&r)throw new F.BaseError("Cannot provide both `code` & `to` as parameters.");const N=m&&c,S=b&&u&&r&&c,O=N||S,U=N?W({code:m,data:c}):S?be({data:c,factory:b,factoryData:u,to:r}):c;try{le.assertRequest(t);const o=(typeof l=="bigint"?G.numberToHex(l):void 0)||C,d=y?Y.toRpc(y):void 0,f=ie.serializeStateOverride(K),V=(_=(H=(T=e.chain)==null?void 0:T.formatters)==null?void 0:H.transactionRequest)==null?void 0:_.format,B=(V||ne.formatTransactionRequest)({...ce.extract(Q,{format:V}),accessList:D,account:E,authorizationList:s,blobs:k,data:U,gas:x,gasPrice:w,maxFeePerBlobGas:p,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:q,to:O?void 0:r,value:J},"call");if(i&&de({request:B})&&!f&&!d)try{return await fe(e,{...B,blockNumber:l,blockTag:C})}catch(n){if(!(n instanceof A.ClientChainNotConfiguredError)&&!(n instanceof A.ChainDoesNotSupportContract))throw n}const X=(()=>{const n=[B,o];return f&&d?[...n,f,d]:f?[...n,f]:d?[...n,{},d]:n})(),z=await e.request({method:"eth_call",params:X});return z==="0x"?{data:void 0}:{data:z}}catch(v){const o=I(v),{offchainLookup:d,offchainLookupSignature:f}=await Promise.resolve().then(()=>require("./index240.cjs"));if(e.ccipRead!==!1&&(o==null?void 0:o.slice(0,10))===f&&r)return{data:await d(e,{data:o,to:r})};throw O&&(o==null?void 0:o.slice(0,10))==="0x101bb98d"?new L.CounterfactualDeploymentFailedError({factory:b}):oe.getCallError(v,{...t,account:E,chain:e.chain})}}function de({request:e}){const{data:t,to:a,...s}=e;return!(!t||t.startsWith(ee.aggregate3Signature)||!a||Object.values(s).filter(i=>typeof i<"u").length>0)}async function fe(e,t){var w;const{batchSize:a=1024,deployless:s=!1,wait:i=0}=typeof((w=e.batch)==null?void 0:w.multicall)=="object"?e.batch.multicall:{},{blockNumber:l,blockTag:C=e.experimental_blockTag??"latest",data:D,to:k}=t,y=(()=>{if(s)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return re.getChainContractAddress({blockNumber:l,chain:e.chain,contract:"multicall3"});throw new A.ClientChainNotConfiguredError})(),c=(typeof l=="bigint"?G.numberToHex(l):void 0)||C,{schedule:b}=se.createBatchScheduler({id:`${e.uid}.${c}`,wait:i,shouldSplitBatch(p){return p.reduce((h,{data:q})=>h+(q.length-2),0)>a*2},fn:async p=>{const g=p.map(r=>({allowFailure:!0,callData:r.data,target:r.to})),h=ae.encodeFunctionData({abi:j.multicall3Abi,args:[g],functionName:"aggregate3"}),q=await e.request({method:"eth_call",params:[{...y===null?{data:W({code:R.multicall3Bytecode,data:h})}:{to:y,data:h}},c]});return te.decodeFunctionResult({abi:j.multicall3Abi,args:[g],functionName:"aggregate3",data:q||"0x"})}}),[{returnData:u,success:x}]=await b({data:D,to:k});if(!x)throw new L.RawContractError({data:u});return u==="0x"?{data:void 0}:{data:u}}function W(e){const{code:t,data:a}=e;return $.encodeDeployData({abi:M.parseAbi(["constructor(bytes, bytes)"]),bytecode:R.deploylessCallViaBytecodeBytecode,args:[t,a]})}function be(e){const{data:t,factory:a,factoryData:s,to:i}=e;return $.encodeDeployData({abi:M.parseAbi(["constructor(address, bytes, address, bytes)"]),bytecode:R.deploylessCallViaFactoryBytecode,args:[i,t,a,s]})}function I(e){var a;if(!(e instanceof F.BaseError))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(a=t.data)==null?void 0:a.data:t.data}exports.call=ue;exports.getRevertErrorData=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("./index273.cjs"),Z=require("./index123.cjs"),j=require("./index46.cjs"),ee=require("./index274.cjs"),R=require("./index93.cjs"),F=require("./index189.cjs"),A=require("./index85.cjs"),L=require("./index94.cjs"),te=require("./index221.cjs"),$=require("./index95.cjs"),ae=require("./index96.cjs"),re=require("./index84.cjs"),G=require("./index81.cjs"),oe=require("./index269.cjs"),ce=require("./index271.cjs"),ne=require("./index108.cjs"),se=require("./index181.cjs"),ie=require("./index275.cjs"),le=require("./index261.cjs"),M=require("./index276.cjs");async function ue(e,t){var P,T,H,_;const{account:a=e.account,authorizationList:s,batch:i=!!((P=e.batch)!=null&&P.multicall),blockNumber:l,blockTag:C=e.experimental_blockTag??"latest",accessList:D,blobs:k,blockOverrides:y,code:m,data:c,factory:b,factoryData:u,gas:x,gasPrice:w,maxFeePerBlobGas:p,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:q,to:r,value:J,stateOverride:K,...Q}=t,E=a?Z.parseAccount(a):void 0;if(m&&(b||u))throw new F.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(m&&r)throw new F.BaseError("Cannot provide both `code` & `to` as parameters.");const N=m&&c,S=b&&u&&r&&c,O=N||S,U=N?W({code:m,data:c}):S?be({data:c,factory:b,factoryData:u,to:r}):c;try{le.assertRequest(t);const o=(typeof l=="bigint"?G.numberToHex(l):void 0)||C,d=y?Y.toRpc(y):void 0,f=ie.serializeStateOverride(K),V=(_=(H=(T=e.chain)==null?void 0:T.formatters)==null?void 0:H.transactionRequest)==null?void 0:_.format,B=(V||ne.formatTransactionRequest)({...ce.extract(Q,{format:V}),accessList:D,account:E,authorizationList:s,blobs:k,data:U,gas:x,gasPrice:w,maxFeePerBlobGas:p,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:q,to:O?void 0:r,value:J},"call");if(i&&de({request:B})&&!f&&!d)try{return await fe(e,{...B,blockNumber:l,blockTag:C})}catch(n){if(!(n instanceof A.ClientChainNotConfiguredError)&&!(n instanceof A.ChainDoesNotSupportContract))throw n}const X=(()=>{const n=[B,o];return f&&d?[...n,f,d]:f?[...n,f]:d?[...n,{},d]:n})(),z=await e.request({method:"eth_call",params:X});return z==="0x"?{data:void 0}:{data:z}}catch(v){const o=I(v),{offchainLookup:d,offchainLookupSignature:f}=await Promise.resolve().then(()=>require("./index240.cjs"));if(e.ccipRead!==!1&&(o==null?void 0:o.slice(0,10))===f&&r)return{data:await d(e,{data:o,to:r})};throw O&&(o==null?void 0:o.slice(0,10))==="0x101bb98d"?new L.CounterfactualDeploymentFailedError({factory:b}):oe.getCallError(v,{...t,account:E,chain:e.chain})}}function de({request:e}){const{data:t,to:a,...s}=e;return!(!t||t.startsWith(ee.aggregate3Signature)||!a||Object.values(s).filter(i=>typeof i<"u").length>0)}async function fe(e,t){var w;const{batchSize:a=1024,deployless:s=!1,wait:i=0}=typeof((w=e.batch)==null?void 0:w.multicall)=="object"?e.batch.multicall:{},{blockNumber:l,blockTag:C=e.experimental_blockTag??"latest",data:D,to:k}=t,y=(()=>{if(s)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return re.getChainContractAddress({blockNumber:l,chain:e.chain,contract:"multicall3"});throw new A.ClientChainNotConfiguredError})(),c=(typeof l=="bigint"?G.numberToHex(l):void 0)||C,{schedule:b}=se.createBatchScheduler({id:`${e.uid}.${c}`,wait:i,shouldSplitBatch(p){return p.reduce((h,{data:q})=>h+(q.length-2),0)>a*2},fn:async p=>{const g=p.map(r=>({allowFailure:!0,callData:r.data,target:r.to})),h=ae.encodeFunctionData({abi:j.multicall3Abi,args:[g],functionName:"aggregate3"}),q=await e.request({method:"eth_call",params:[{...y===null?{data:W({code:R.multicall3Bytecode,data:h})}:{to:y,data:h}},c]});return te.decodeFunctionResult({abi:j.multicall3Abi,args:[g],functionName:"aggregate3",data:q||"0x"})}}),[{returnData:u,success:x}]=await b({data:D,to:k});if(!x)throw new L.RawContractError({data:u});return u==="0x"?{data:void 0}:{data:u}}function W(e){const{code:t,data:a}=e;return $.encodeDeployData({abi:M.parseAbi(["constructor(bytes, bytes)"]),bytecode:R.deploylessCallViaBytecodeBytecode,args:[t,a]})}function be(e){const{data:t,factory:a,factoryData:s,to:i}=e;return $.encodeDeployData({abi:M.parseAbi(["constructor(address, bytes, address, bytes)"]),bytecode:R.deploylessCallViaFactoryBytecode,args:[i,t,a,s]})}function I(e){var a;if(!(e instanceof F.BaseError))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(a=t.data)==null?void 0:a.data:t.data}exports.call=ue;exports.getRevertErrorData=I;
package/dist/index104.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { toRpc as Q } from "./index273.js";
2
2
  import { parseAccount as U } from "./index123.js";
3
- import { multicall3Abi as z } from "./index44.js";
3
+ import { multicall3Abi as z } from "./index46.js";
4
4
  import { aggregate3Signature as X } from "./index274.js";
5
5
  import { deploylessCallViaBytecodeBytecode as Y, deploylessCallViaFactoryBytecode as Z, multicall3Bytecode as tt } from "./index93.js";
6
6
  import { BaseError as N } from "./index189.js";
package/dist/index106.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index352.cjs"),g=require("./index354.cjs"),y=require("./index278.cjs"),t=require("./index277.cjs"),h=require("./index286.cjs"),o="0x8010801080108010801080108010801080108010801080108010801080108010",u=s.from("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function a(r){if(typeof r=="string"){if(t.slice(r,-32)!==o)throw new c(r)}else h.assert(r.authorization)}function m(r){a(r);const n=t.toNumber(t.slice(r,-64,-32)),d=t.slice(r,-n-64,-64),f=t.slice(r,0,-n-64),[e,l,i]=s.decode(u,d);return{authorization:g.from({address:e.delegation,chainId:Number(e.chainId),nonce:e.nonce,yParity:e.yParity,r:e.r,s:e.s}),signature:f,...i&&i!=="0x"?{data:i,to:l}:{}}}function b(r){try{return a(r),!0}catch{return!1}}class c extends y.BaseError{constructor(n){super(`Value \`${n}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}exports.InvalidWrappedSignatureError=c;exports.assert=a;exports.magicBytes=o;exports.suffixParameters=u;exports.unwrap=m;exports.validate=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index350.cjs"),g=require("./index355.cjs"),y=require("./index278.cjs"),t=require("./index277.cjs"),h=require("./index281.cjs"),o="0x8010801080108010801080108010801080108010801080108010801080108010",u=s.from("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function a(r){if(typeof r=="string"){if(t.slice(r,-32)!==o)throw new c(r)}else h.assert(r.authorization)}function m(r){a(r);const n=t.toNumber(t.slice(r,-64,-32)),d=t.slice(r,-n-64,-64),f=t.slice(r,0,-n-64),[e,l,i]=s.decode(u,d);return{authorization:g.from({address:e.delegation,chainId:Number(e.chainId),nonce:e.nonce,yParity:e.yParity,r:e.r,s:e.s}),signature:f,...i&&i!=="0x"?{data:i,to:l}:{}}}function b(r){try{return a(r),!0}catch{return!1}}class c extends y.BaseError{constructor(n){super(`Value \`${n}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}exports.InvalidWrappedSignatureError=c;exports.assert=a;exports.magicBytes=o;exports.suffixParameters=u;exports.unwrap=m;exports.validate=b;
package/dist/index106.js CHANGED
@@ -1,8 +1,8 @@
1
- import { decode as c, from as f } from "./index352.js";
2
- import { from as d } from "./index354.js";
1
+ import { decode as c, from as f } from "./index350.js";
2
+ import { from as d } from "./index355.js";
3
3
  import { BaseError as m } from "./index278.js";
4
4
  import { slice as n, toNumber as l } from "./index277.js";
5
- import { assert as g } from "./index286.js";
5
+ import { assert as g } from "./index281.js";
6
6
  const h = "0x8010801080108010801080108010801080108010801080108010801080108010", y = f("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");
7
7
  function a(r) {
8
8
  if (typeof r == "string") {
package/dist/index107.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index352.cjs"),c=require("./index278.cjs"),n=require("./index277.cjs"),t="0x6492649264926492649264926492649264926492649264926492649264926492";function i(r){if(n.slice(r,-32)!==t)throw new s(r)}function d(r){const{data:e,signature:u,to:o}=r;return n.concat(a.encode(a.from("address, bytes, bytes"),[o,e,u]),t)}function l(r){try{return i(r),!0}catch{return!1}}class s extends c.BaseError{constructor(e){super(`Value \`${e}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}exports.InvalidWrappedSignatureError=s;exports.assert=i;exports.magicBytes=t;exports.validate=l;exports.wrap=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index350.cjs"),c=require("./index278.cjs"),n=require("./index277.cjs"),t="0x6492649264926492649264926492649264926492649264926492649264926492";function i(r){if(n.slice(r,-32)!==t)throw new s(r)}function d(r){const{data:e,signature:u,to:o}=r;return n.concat(a.encode(a.from("address, bytes, bytes"),[o,e,u]),t)}function l(r){try{return i(r),!0}catch{return!1}}class s extends c.BaseError{constructor(e){super(`Value \`${e}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}exports.InvalidWrappedSignatureError=s;exports.assert=i;exports.magicBytes=t;exports.validate=l;exports.wrap=d;
package/dist/index107.js CHANGED
@@ -1,4 +1,4 @@
1
- import { encode as i, from as o } from "./index352.js";
1
+ import { encode as i, from as o } from "./index350.js";
2
2
  import { BaseError as s } from "./index278.js";
3
3
  import { concat as u, slice as c } from "./index277.js";
4
4
  const t = "0x6492649264926492649264926492649264926492649264926492649264926492";
package/dist/index113.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index385.cjs"),s=e=>o.base58.encode(e),t=e=>o.base58.decode(e);exports.fromBase58=t;exports.toBase58=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index383.cjs"),s=e=>o.base58.encode(e),t=e=>o.base58.decode(e);exports.fromBase58=t;exports.toBase58=s;
package/dist/index113.js CHANGED
@@ -1,4 +1,4 @@
1
- import { base58 as e } from "./index385.js";
1
+ import { base58 as e } from "./index383.js";
2
2
  const t = (o) => e.encode(o), c = (o) => e.decode(o);
3
3
  export {
4
4
  c as fromBase58,
package/dist/index116.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index307.cjs");class i{constructor({network:t,base:e,cache:c=(e==null?void 0:e.cache)??new r.ClientCache}){this.network=t,this.base=e??this,this.cache=c}$extend(...t){return Object.create(this,Object.fromEntries(t.map(e=>[e.name,{value:e.register(this)}])))}}exports.Experimental_BaseClient=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index303.cjs");class i{constructor({network:t,base:e,cache:c=(e==null?void 0:e.cache)??new r.ClientCache}){this.network=t,this.base=e??this,this.cache=c}$extend(...t){return Object.create(this,Object.fromEntries(t.map(e=>[e.name,{value:e.register(this)}])))}}exports.Experimental_BaseClient=i;
package/dist/index116.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ClientCache as c } from "./index307.js";
1
+ import { ClientCache as c } from "./index303.js";
2
2
  class h {
3
3
  constructor({
4
4
  network: e,
package/dist/index117.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index113.cjs"),S=require("./index321.cjs"),m=require("./index119.cjs"),T=32;function h(e){try{return g.fromBase58(e).length===T}catch{return!1}}const c=32;function d(e){return O(e)&&A(e)===c}function b(e){return d(e)}function x(e){return e.includes("::")?o(e):e}function o(e){const[n,r]=e.split("::"),i=m.isValidNamedPackage(n),t=e.slice(n.length+r.length+4),a=t.includes("<")?t.slice(0,t.indexOf("<")):t,s=t.includes("<")?S.splitGenericParameters(t.slice(t.indexOf("<")+1,t.lastIndexOf(">"))).map(f=>x(f.trim())):[];return{address:i?n:u(n),module:r,name:a,typeParams:s}}function l(e){const{address:n,module:r,name:i,typeParams:t}=typeof e=="string"?o(e):e,a=(t==null?void 0:t.length)>0?`<${t.map(s=>typeof s=="string"?s:l(s)).join(",")}>`:"";return`${n}::${r}::${i}${a}`}function u(e,n=!1){let r=e.toLowerCase();return!n&&r.startsWith("0x")&&(r=r.slice(2)),`0x${r.padStart(c*2,"0")}`}function I(e,n=!1){return u(e,n)}function O(e){return/^(0x|0X)?[a-fA-F0-9]+$/.test(e)&&e.length%2===0}function A(e){return/^(0x|0X)/.test(e)?(e.length-2)/2:e.length/2}exports.SUI_ADDRESS_LENGTH=c;exports.isValidSuiAddress=d;exports.isValidSuiObjectId=b;exports.isValidTransactionDigest=h;exports.normalizeStructTag=l;exports.normalizeSuiAddress=u;exports.normalizeSuiObjectId=I;exports.parseStructTag=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index113.cjs"),S=require("./index317.cjs"),m=require("./index119.cjs"),T=32;function h(e){try{return g.fromBase58(e).length===T}catch{return!1}}const c=32;function d(e){return O(e)&&A(e)===c}function b(e){return d(e)}function x(e){return e.includes("::")?o(e):e}function o(e){const[n,r]=e.split("::"),i=m.isValidNamedPackage(n),t=e.slice(n.length+r.length+4),a=t.includes("<")?t.slice(0,t.indexOf("<")):t,s=t.includes("<")?S.splitGenericParameters(t.slice(t.indexOf("<")+1,t.lastIndexOf(">"))).map(f=>x(f.trim())):[];return{address:i?n:u(n),module:r,name:a,typeParams:s}}function l(e){const{address:n,module:r,name:i,typeParams:t}=typeof e=="string"?o(e):e,a=(t==null?void 0:t.length)>0?`<${t.map(s=>typeof s=="string"?s:l(s)).join(",")}>`:"";return`${n}::${r}::${i}${a}`}function u(e,n=!1){let r=e.toLowerCase();return!n&&r.startsWith("0x")&&(r=r.slice(2)),`0x${r.padStart(c*2,"0")}`}function I(e,n=!1){return u(e,n)}function O(e){return/^(0x|0X)?[a-fA-F0-9]+$/.test(e)&&e.length%2===0}function A(e){return/^(0x|0X)/.test(e)?(e.length-2)/2:e.length/2}exports.SUI_ADDRESS_LENGTH=c;exports.isValidSuiAddress=d;exports.isValidSuiObjectId=b;exports.isValidTransactionDigest=h;exports.normalizeStructTag=l;exports.normalizeSuiAddress=u;exports.normalizeSuiObjectId=I;exports.parseStructTag=o;
package/dist/index117.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { fromBase58 as d } from "./index113.js";
2
- import { splitGenericParameters as l } from "./index321.js";
2
+ import { splitGenericParameters as l } from "./index317.js";
3
3
  import { isValidNamedPackage as m } from "./index119.js";
4
4
  const g = 32;
5
5
  function b(t) {
package/dist/index12.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@gardenfi/core"),r=require("@gardenfi/garden-book"),t=require("@gardenfi/orderbook"),i=require("@gardenfi/utils"),c=require("./index31.cjs"),u=require("./index32.cjs"),E={minError:(e,n)=>`Minimum amount is ${e} ${n}`,maxError:(e,n)=>`Maximum amount is ${e} ${n}`,outHigh:"Output amount too high",outLow:"Output amount too less",insufficientLiquidity:!0,insufficientBalance:!0,none:"",invalidFomAssset:"Invalid From Asset",invalidToAsset:"Invalid To Asset"};var o=(e=>(e.input="input",e.output="output",e))(o||{});const a={[i.Network.MAINNET]:{api:"https://api.garden.finance",explorer:"https://explorer.garden.finance"},[i.Network.TESTNET]:{api:"https://testnet.api.garden.finance",explorer:"https://testnet-explorer.garden.finance"},[i.Network.LOCALNET]:{api:"",explorer:""}},T=i.Network.TESTNET,l=e=>a[e],d=e=>t.isEVM(e.chain)||t.isSolana(e.chain)||t.isStarknet(e.chain)||t.isSui(e.chain)?"~30s":t.isBitcoin(e.chain)?"~10m":"",p={swap:{id:"swap",label:"Swap",index:0,Icon:r.SwapHorizontalIcon},history:{id:"history",label:"History",index:1,Icon:r.BlogIcon}},m={[s.hyperliquid.id]:"0xcA11bde05977b3631167028862bE2a173976CA11",[u.citreaTestnet.id]:"0x8470Ee1FCD47e7F9B90486bB5D142430e5C1f409",[c.botanix.id]:"0xeaE7721d779276eb0f5837e2fE260118724a2Ba4"},S={small:348,medium:408,large:496},I={small:88,medium:116,large:216};exports.API_ENDPOINTS=a;exports.BUFFER_HEIGHT=I;exports.DEFAULT_NETWORK=T;exports.Errors=E;exports.HEIGHTS=S;exports.IOType=o;exports.MULTICALL_CONTRACT_ADDRESSES=m;exports.getApiEndpoint=l;exports.getTimeEstimates=d;exports.tabs=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@gardenfi/core"),r=require("@gardenfi/garden-book"),t=require("@gardenfi/orderbook"),i=require("@gardenfi/utils"),c=require("./index31.cjs"),u=require("./index32.cjs"),E={minError:(e,n)=>`Minimum amount is ${e} ${n}`,maxError:(e,n)=>`Maximum amount is ${e} ${n}`,outHigh:"Output amount too high",outLow:"Output amount too less",insufficientLiquidity:!0,insufficientBalance:!0,none:"",invalidFomAssset:"Invalid From Asset",invalidToAsset:"Invalid To Asset"};var o=(e=>(e.input="input",e.output="output",e))(o||{});const a={[i.Network.MAINNET]:{api:"https://api.garden.finance",explorer:"https://explorer.garden.finance"},[i.Network.TESTNET]:{api:"https://testnet.api.garden.finance",explorer:"https://testnet-explorer.garden.finance"},[i.Network.LOCALNET]:{api:"",explorer:""}},T=i.Network.TESTNET,l=e=>a[e],d=e=>t.isEVM(e.chain)||t.isSolana(e.chain)||t.isStarknet(e.chain)||t.isSui(e.chain)?"~30s":t.isBitcoin(e.chain)?"~10m":"",p={swap:{id:"swap",label:"Swap",index:0,Icon:r.SwapHorizontalIcon},history:{id:"history",label:"History",index:1,Icon:r.BlogIcon}},m={[s.hyperevm.id]:"0xcA11bde05977b3631167028862bE2a173976CA11",[u.citreaTestnet.id]:"0x8470Ee1FCD47e7F9B90486bB5D142430e5C1f409",[c.botanix.id]:"0xeaE7721d779276eb0f5837e2fE260118724a2Ba4"},S={small:348,medium:408,large:496},I={small:88,medium:116,large:216};exports.API_ENDPOINTS=a;exports.BUFFER_HEIGHT=I;exports.DEFAULT_NETWORK=T;exports.Errors=E;exports.HEIGHTS=S;exports.IOType=o;exports.MULTICALL_CONTRACT_ADDRESSES=m;exports.getApiEndpoint=l;exports.getTimeEstimates=d;exports.tabs=p;
package/dist/index12.js CHANGED
@@ -1,12 +1,12 @@
1
- import { hyperliquid as n } from "@gardenfi/core";
2
- import { SwapHorizontalIcon as r, BlogIcon as e } from "@gardenfi/garden-book";
1
+ import { hyperevm as n } from "@gardenfi/core";
2
+ import { SwapHorizontalIcon as e, BlogIcon as r } from "@gardenfi/garden-book";
3
3
  import { isEVM as a, isSolana as s, isStarknet as m, isSui as p, isBitcoin as c } from "@gardenfi/orderbook";
4
- import { Network as t } from "@gardenfi/utils";
4
+ import { Network as i } from "@gardenfi/utils";
5
5
  import { botanix as u } from "./index31.js";
6
6
  import { citreaTestnet as l } from "./index32.js";
7
7
  const I = {
8
- minError: (i, o) => `Minimum amount is ${i} ${o}`,
9
- maxError: (i, o) => `Maximum amount is ${i} ${o}`,
8
+ minError: (t, o) => `Minimum amount is ${t} ${o}`,
9
+ maxError: (t, o) => `Maximum amount is ${t} ${o}`,
10
10
  outHigh: "Output amount too high",
11
11
  outLow: "Output amount too less",
12
12
  insufficientLiquidity: !0,
@@ -15,32 +15,32 @@ const I = {
15
15
  invalidFomAssset: "Invalid From Asset",
16
16
  invalidToAsset: "Invalid To Asset"
17
17
  };
18
- var E = /* @__PURE__ */ ((i) => (i.input = "input", i.output = "output", i))(E || {});
18
+ var E = /* @__PURE__ */ ((t) => (t.input = "input", t.output = "output", t))(E || {});
19
19
  const d = {
20
- [t.MAINNET]: {
20
+ [i.MAINNET]: {
21
21
  api: "https://api.garden.finance",
22
22
  explorer: "https://explorer.garden.finance"
23
23
  },
24
- [t.TESTNET]: {
24
+ [i.TESTNET]: {
25
25
  api: "https://testnet.api.garden.finance",
26
26
  explorer: "https://testnet-explorer.garden.finance"
27
27
  },
28
- [t.LOCALNET]: {
28
+ [i.LOCALNET]: {
29
29
  api: "",
30
30
  explorer: ""
31
31
  }
32
- }, A = t.TESTNET, N = (i) => d[i], b = (i) => a(i.chain) || s(i.chain) || m(i.chain) || p(i.chain) ? "~30s" : c(i.chain) ? "~10m" : "", L = {
32
+ }, A = i.TESTNET, N = (t) => d[t], b = (t) => a(t.chain) || s(t.chain) || m(t.chain) || p(t.chain) ? "~30s" : c(t.chain) ? "~10m" : "", L = {
33
33
  swap: {
34
34
  id: "swap",
35
35
  label: "Swap",
36
36
  index: 0,
37
- Icon: r
37
+ Icon: e
38
38
  },
39
39
  history: {
40
40
  id: "history",
41
41
  label: "History",
42
42
  index: 1,
43
- Icon: e
43
+ Icon: r
44
44
  }
45
45
  }, B = {
46
46
  [n.id]: "0xcA11bde05977b3631167028862bE2a173976CA11",
package/dist/index120.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./index322.cjs"),L=require("./index323.cjs"),$=require("./index119.cjs"),h=require("./index117.cjs"),F=require("./index110.cjs");var O=t=>{throw TypeError(t)},V=(t,a,e)=>a.has(t)||O("Cannot "+e),i=(t,a,e)=>(V(t,a,"read from private field"),e?e.call(t):a.get(t)),m=(t,a,e)=>a.has(t)?O("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(t):a.set(t,e),M=(t,a,e,s)=>(V(t,a,"write to private field"),a.set(t,e),e),_=(t,a,e)=>(V(t,a,"access private method"),e),w,u,v,y,f,E,S,b,W,A;const x="/",z={"Mvr-Source":`@mysten/sui@${F.PACKAGE_VERSION}`};class U{constructor({cache:a,url:e,pageSize:s=50,overrides:n}){m(this,f),m(this,w),m(this,u),m(this,v),m(this,y),M(this,w,a),M(this,u,e),M(this,v,s),M(this,y,{packages:n==null?void 0:n.packages,types:n==null?void 0:n.types}),G(i(this,y))}async resolvePackage({package:a}){return p(a)?{package:await i(this,f,E).load(a)}:{package:a}}async resolveType({type:a}){if(!p(a))return{type:a};const e=[...T(a)],s=await i(this,f,S).loadMany(e),n={};for(let r=0;r<e.length;r++){const o=s[r];if(o instanceof Error)throw o;n[e[r]]=o}return{type:P(a,n)}}async resolve({types:a=[],packages:e=[]}){var R,C,I;const s=new Set;for(const d of a??[])T(d,s);const n=[...s],[r,o]=await Promise.all([n.length>0?i(this,f,S).loadMany(n):[],e.length>0?i(this,f,E).loadMany(e):[]]),c={...(R=i(this,y))==null?void 0:R.types};for(const[d,k]of n.entries()){const g=r[d];if(g instanceof Error)throw g;c[k]=g}const l={};for(const d of a??[]){const k=P(d,c);l[d]={type:k}}const N={};for(const[d,k]of(e??[]).entries()){const g=((I=(C=i(this,y))==null?void 0:C.packages)==null?void 0:I[k])??o[d];if(g instanceof Error)throw g;N[k]={package:g}}return{types:l,packages:N}}}w=new WeakMap;u=new WeakMap;v=new WeakMap;y=new WeakMap;f=new WeakSet;E=function(){return i(this,w).readSync(["#mvrPackageDataLoader",i(this,u)??""],()=>{var e;const t=new L.DataLoader(async s=>{if(!i(this,u))throw new Error(`MVR Api URL is not set for the current client (resolving ${s.join(", ")})`);const n=await _(this,f,b).call(this,s);return s.map(r=>n[r]??new Error(`Failed to resolve package: ${r}`))}),a=(e=i(this,y))==null?void 0:e.packages;if(a)for(const[s,n]of Object.entries(a))t.prime(s,n);return t})};S=function(){return i(this,w).readSync(["#mvrTypeDataLoader",i(this,u)??""],()=>{var e;const t=new L.DataLoader(async s=>{if(!i(this,u))throw new Error(`MVR Api URL is not set for the current client (resolving ${s.join(", ")})`);const n=await _(this,f,W).call(this,s);return s.map(r=>n[r]??new Error(`Failed to resolve type: ${r}`))}),a=(e=i(this,y))==null?void 0:e.types;if(a)for(const[s,n]of Object.entries(a))t.prime(s,n);return t})};b=async function(t){if(t.length===0)return{};const a=D.chunk(t,i(this,v)),e={};return await Promise.all(a.map(async s=>{var r;const n=await _(this,f,A).call(this,"/v1/resolution/bulk",{names:s});if(n!=null&&n.resolution)for(const o of Object.keys(n==null?void 0:n.resolution)){const c=(r=n.resolution[o])==null?void 0:r.package_id;c&&(e[o]=c)}})),e};W=async function(t){if(t.length===0)return{};const a=D.chunk(t,i(this,v)),e={};return await Promise.all(a.map(async s=>{var r;const n=await _(this,f,A).call(this,"/v1/struct-definition/bulk",{types:s});if(n!=null&&n.resolution)for(const o of Object.keys(n==null?void 0:n.resolution)){const c=(r=n.resolution[o])==null?void 0:r.type_tag;c&&(e[o]=c)}})),e};A=async function(t,a){if(!i(this,u))throw new Error("MVR Api URL is not set for the current client");const e=await fetch(`${i(this,u)}${t}`,{method:"POST",headers:{"Content-Type":"application/json",...z},body:JSON.stringify(a)});if(!e.ok){const s=await e.json().catch(()=>({}));throw new Error(`Failed to resolve types: ${s==null?void 0:s.message}`)}return e.json()};function G(t){if(t!=null&&t.packages)for(const[a,e]of Object.entries(t.packages)){if(!$.isValidNamedPackage(a))throw new Error(`Invalid package name: ${a}`);if(!h.isValidSuiAddress(h.normalizeSuiAddress(e)))throw new Error(`Invalid package ID: ${e}`)}if(t!=null&&t.types)for(const[a,e]of Object.entries(t.types)){if(h.parseStructTag(a).typeParams.length>0)throw new Error("Type overrides must be first-level only. If you want to supply generic types, just pass each type individually.");const s=h.parseStructTag(e);if(!h.isValidSuiAddress(s.address))throw new Error(`Invalid type: ${e}`)}}function T(t,a=new Set){if(typeof t=="string"&&!p(t))return a;const e=q(t)?t:h.parseStructTag(t);p(e.address)&&a.add(`${e.address}::${e.module}::${e.name}`);for(const s of e.typeParams)T(s,a);return a}function P(t,a){const e=q(t)?t:h.parseStructTag(t),s=`${e.address}::${e.module}::${e.name}`,n=a[s];return h.normalizeStructTag({...e,address:n?n.split("::")[0]:e.address,typeParams:e.typeParams.map(r=>P(r,a))})}function p(t){return t.includes(x)||t.includes("@")||t.includes(".sui")}function q(t){return typeof t=="object"&&"address"in t&&"module"in t&&"name"in t&&"typeParams"in t}function H(t){const a=new Set,e=new Set;for(const s of t.commands)switch(s.$kind){case"MakeMoveVec":s.MakeMoveVec.type&&j([s.MakeMoveVec.type]).forEach(o=>{e.add(o)});break;case"MoveCall":const n=s.MoveCall,r=n.package.split("::")[0];if(p(r)){if(!$.isValidNamedPackage(r))throw new Error(`Invalid package name: ${r}`);a.add(r)}j(n.typeArguments??[]).forEach(o=>{e.add(o)});break}return{packages:[...a],types:[...e]}}function J(t,a){var e;for(const s of t.commands){if((e=s.MakeMoveVec)!=null&&e.type){if(!p(s.MakeMoveVec.type))continue;if(!a.types[s.MakeMoveVec.type])throw new Error(`No resolution found for type: ${s.MakeMoveVec.type}`);s.MakeMoveVec.type=a.types[s.MakeMoveVec.type].type}const n=s.MoveCall;if(!n)continue;const r=n.package.split("::"),o=r[0];if(p(o)&&!a.packages[o])throw new Error(`No address found for package: ${o}`);p(o)&&(r[0]=a.packages[o].package,n.package=r.join("::"));const c=n.typeArguments;if(c){for(let l=0;l<c.length;l++)if(p(c[l])){if(!a.types[c[l]])throw new Error(`No resolution found for type: ${c[l]}`);c[l]=a.types[c[l]].type}n.typeArguments=c}}}function j(t){const a=new Set;for(const e of t)if(p(e)){if(!$.isValidNamedType(e))throw new Error(`Invalid type with names: ${e}`);a.add(e)}return a}exports.MvrClient=U;exports.extractMvrTypes=T;exports.findNamesInTransaction=H;exports.hasMvrName=p;exports.replaceNames=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./index318.cjs"),L=require("./index319.cjs"),$=require("./index119.cjs"),h=require("./index117.cjs"),F=require("./index110.cjs");var O=t=>{throw TypeError(t)},V=(t,a,e)=>a.has(t)||O("Cannot "+e),i=(t,a,e)=>(V(t,a,"read from private field"),e?e.call(t):a.get(t)),m=(t,a,e)=>a.has(t)?O("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(t):a.set(t,e),M=(t,a,e,s)=>(V(t,a,"write to private field"),a.set(t,e),e),_=(t,a,e)=>(V(t,a,"access private method"),e),w,u,v,y,f,E,S,b,W,A;const x="/",z={"Mvr-Source":`@mysten/sui@${F.PACKAGE_VERSION}`};class U{constructor({cache:a,url:e,pageSize:s=50,overrides:n}){m(this,f),m(this,w),m(this,u),m(this,v),m(this,y),M(this,w,a),M(this,u,e),M(this,v,s),M(this,y,{packages:n==null?void 0:n.packages,types:n==null?void 0:n.types}),G(i(this,y))}async resolvePackage({package:a}){return p(a)?{package:await i(this,f,E).load(a)}:{package:a}}async resolveType({type:a}){if(!p(a))return{type:a};const e=[...T(a)],s=await i(this,f,S).loadMany(e),n={};for(let r=0;r<e.length;r++){const o=s[r];if(o instanceof Error)throw o;n[e[r]]=o}return{type:P(a,n)}}async resolve({types:a=[],packages:e=[]}){var R,C,I;const s=new Set;for(const d of a??[])T(d,s);const n=[...s],[r,o]=await Promise.all([n.length>0?i(this,f,S).loadMany(n):[],e.length>0?i(this,f,E).loadMany(e):[]]),c={...(R=i(this,y))==null?void 0:R.types};for(const[d,k]of n.entries()){const g=r[d];if(g instanceof Error)throw g;c[k]=g}const l={};for(const d of a??[]){const k=P(d,c);l[d]={type:k}}const N={};for(const[d,k]of(e??[]).entries()){const g=((I=(C=i(this,y))==null?void 0:C.packages)==null?void 0:I[k])??o[d];if(g instanceof Error)throw g;N[k]={package:g}}return{types:l,packages:N}}}w=new WeakMap;u=new WeakMap;v=new WeakMap;y=new WeakMap;f=new WeakSet;E=function(){return i(this,w).readSync(["#mvrPackageDataLoader",i(this,u)??""],()=>{var e;const t=new L.DataLoader(async s=>{if(!i(this,u))throw new Error(`MVR Api URL is not set for the current client (resolving ${s.join(", ")})`);const n=await _(this,f,b).call(this,s);return s.map(r=>n[r]??new Error(`Failed to resolve package: ${r}`))}),a=(e=i(this,y))==null?void 0:e.packages;if(a)for(const[s,n]of Object.entries(a))t.prime(s,n);return t})};S=function(){return i(this,w).readSync(["#mvrTypeDataLoader",i(this,u)??""],()=>{var e;const t=new L.DataLoader(async s=>{if(!i(this,u))throw new Error(`MVR Api URL is not set for the current client (resolving ${s.join(", ")})`);const n=await _(this,f,W).call(this,s);return s.map(r=>n[r]??new Error(`Failed to resolve type: ${r}`))}),a=(e=i(this,y))==null?void 0:e.types;if(a)for(const[s,n]of Object.entries(a))t.prime(s,n);return t})};b=async function(t){if(t.length===0)return{};const a=D.chunk(t,i(this,v)),e={};return await Promise.all(a.map(async s=>{var r;const n=await _(this,f,A).call(this,"/v1/resolution/bulk",{names:s});if(n!=null&&n.resolution)for(const o of Object.keys(n==null?void 0:n.resolution)){const c=(r=n.resolution[o])==null?void 0:r.package_id;c&&(e[o]=c)}})),e};W=async function(t){if(t.length===0)return{};const a=D.chunk(t,i(this,v)),e={};return await Promise.all(a.map(async s=>{var r;const n=await _(this,f,A).call(this,"/v1/struct-definition/bulk",{types:s});if(n!=null&&n.resolution)for(const o of Object.keys(n==null?void 0:n.resolution)){const c=(r=n.resolution[o])==null?void 0:r.type_tag;c&&(e[o]=c)}})),e};A=async function(t,a){if(!i(this,u))throw new Error("MVR Api URL is not set for the current client");const e=await fetch(`${i(this,u)}${t}`,{method:"POST",headers:{"Content-Type":"application/json",...z},body:JSON.stringify(a)});if(!e.ok){const s=await e.json().catch(()=>({}));throw new Error(`Failed to resolve types: ${s==null?void 0:s.message}`)}return e.json()};function G(t){if(t!=null&&t.packages)for(const[a,e]of Object.entries(t.packages)){if(!$.isValidNamedPackage(a))throw new Error(`Invalid package name: ${a}`);if(!h.isValidSuiAddress(h.normalizeSuiAddress(e)))throw new Error(`Invalid package ID: ${e}`)}if(t!=null&&t.types)for(const[a,e]of Object.entries(t.types)){if(h.parseStructTag(a).typeParams.length>0)throw new Error("Type overrides must be first-level only. If you want to supply generic types, just pass each type individually.");const s=h.parseStructTag(e);if(!h.isValidSuiAddress(s.address))throw new Error(`Invalid type: ${e}`)}}function T(t,a=new Set){if(typeof t=="string"&&!p(t))return a;const e=q(t)?t:h.parseStructTag(t);p(e.address)&&a.add(`${e.address}::${e.module}::${e.name}`);for(const s of e.typeParams)T(s,a);return a}function P(t,a){const e=q(t)?t:h.parseStructTag(t),s=`${e.address}::${e.module}::${e.name}`,n=a[s];return h.normalizeStructTag({...e,address:n?n.split("::")[0]:e.address,typeParams:e.typeParams.map(r=>P(r,a))})}function p(t){return t.includes(x)||t.includes("@")||t.includes(".sui")}function q(t){return typeof t=="object"&&"address"in t&&"module"in t&&"name"in t&&"typeParams"in t}function H(t){const a=new Set,e=new Set;for(const s of t.commands)switch(s.$kind){case"MakeMoveVec":s.MakeMoveVec.type&&j([s.MakeMoveVec.type]).forEach(o=>{e.add(o)});break;case"MoveCall":const n=s.MoveCall,r=n.package.split("::")[0];if(p(r)){if(!$.isValidNamedPackage(r))throw new Error(`Invalid package name: ${r}`);a.add(r)}j(n.typeArguments??[]).forEach(o=>{e.add(o)});break}return{packages:[...a],types:[...e]}}function J(t,a){var e;for(const s of t.commands){if((e=s.MakeMoveVec)!=null&&e.type){if(!p(s.MakeMoveVec.type))continue;if(!a.types[s.MakeMoveVec.type])throw new Error(`No resolution found for type: ${s.MakeMoveVec.type}`);s.MakeMoveVec.type=a.types[s.MakeMoveVec.type].type}const n=s.MoveCall;if(!n)continue;const r=n.package.split("::"),o=r[0];if(p(o)&&!a.packages[o])throw new Error(`No address found for package: ${o}`);p(o)&&(r[0]=a.packages[o].package,n.package=r.join("::"));const c=n.typeArguments;if(c){for(let l=0;l<c.length;l++)if(p(c[l])){if(!a.types[c[l]])throw new Error(`No resolution found for type: ${c[l]}`);c[l]=a.types[c[l]].type}n.typeArguments=c}}}function j(t){const a=new Set;for(const e of t)if(p(e)){if(!$.isValidNamedType(e))throw new Error(`Invalid type with names: ${e}`);a.add(e)}return a}exports.MvrClient=U;exports.extractMvrTypes=T;exports.findNamesInTransaction=H;exports.hasMvrName=p;exports.replaceNames=J;
package/dist/index120.js CHANGED
@@ -1,5 +1,5 @@
1
- import { chunk as D } from "./index322.js";
2
- import { DataLoader as L } from "./index323.js";
1
+ import { chunk as D } from "./index318.js";
2
+ import { DataLoader as L } from "./index319.js";
3
3
  import { isValidNamedPackage as O, isValidNamedType as z } from "./index119.js";
4
4
  import { isValidSuiAddress as I, normalizeSuiAddress as U, parseStructTag as M, normalizeStructTag as G } from "./index117.js";
5
5
  import { PACKAGE_VERSION as H } from "./index110.js";
package/dist/index121.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index114.cjs"),x=require("./index322.cjs"),p=require("./index324.cjs"),I=require("./index77.cjs"),P=require("./index325.cjs"),E=require("./index318.cjs"),k=require("./index117.cjs"),N=require("./index326.cjs"),f=require("./index327.cjs"),h=require("./index328.cjs");var S=t=>{throw TypeError(t)},C=(t,e,r)=>e.has(t)||S("Cannot "+r),i=(t,e,r)=>(C(t,e,"read from private field"),r?r.call(t):e.get(t)),A=(t,e,r)=>e.has(t)?S("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),B=(t,e,r,n)=>(C(t,e,"write to private field"),e.set(t,r),r),a;class $ extends N.Experimental_CoreClient{constructor({jsonRpcClient:e,mvr:r}){super({network:e.network,base:e,mvr:r}),A(this,a),B(this,a,e)}async getObjects(e){const r=x.chunk(e.objectIds,50),n=[];for(const d of r){const u=await i(this,a).multiGetObjects({ids:d,options:{showOwner:!0,showType:!0,showBcs:!0,showPreviousTransaction:!0},signal:e.signal});for(const[o,s]of u.entries())s.error?n.push(f.ObjectError.fromResponse(s.error,d[o])):n.push(v(s.data))}return{objects:n}}async getOwnedObjects(e){const r=await i(this,a).getOwnedObjects({owner:e.address,limit:e.limit,cursor:e.cursor,options:{showOwner:!0,showType:!0,showBcs:!0,showPreviousTransaction:!0},filter:e.type?{StructType:e.type}:null,signal:e.signal});return{objects:r.data.map(n=>{if(n.error)throw f.ObjectError.fromResponse(n.error);return v(n.data)}),hasNextPage:r.hasNextPage,cursor:r.nextCursor??null}}async getCoins(e){const r=await i(this,a).getCoins({owner:e.address,coinType:e.coinType,limit:e.limit,cursor:e.cursor,signal:e.signal});return{objects:r.data.map(n=>({id:n.coinObjectId,version:n.version,digest:n.digest,balance:n.balance,type:`0x2::coin::Coin<${n.coinType}>`,content:Promise.resolve(_.serialize({id:n.coinObjectId,balance:{value:n.balance}}).toBytes()),owner:{$kind:"ObjectOwner",ObjectOwner:e.address},previousTransaction:n.previousTransaction})),hasNextPage:r.hasNextPage,cursor:r.nextCursor??null}}async getBalance(e){const r=await i(this,a).getBalance({owner:e.address,coinType:e.coinType,signal:e.signal});return{balance:{coinType:r.coinType,balance:r.totalBalance}}}async getAllBalances(e){return{balances:(await i(this,a).getAllBalances({owner:e.address,signal:e.signal})).map(n=>({coinType:n.coinType,balance:n.totalBalance})),hasNextPage:!1,cursor:null}}async getTransaction(e){const r=await i(this,a).getTransactionBlock({digest:e.digest,options:{showRawInput:!0,showObjectChanges:!0,showRawEffects:!0,showEvents:!0,showEffects:!0,showBalanceChanges:!0},signal:e.signal});return{transaction:T(r)}}async executeTransaction(e){const r=await i(this,a).executeTransactionBlock({transactionBlock:e.transaction,signature:e.signatures,options:{showRawEffects:!0,showEvents:!0,showObjectChanges:!0,showRawInput:!0,showEffects:!0,showBalanceChanges:!0},signal:e.signal});return{transaction:T(r)}}async dryRunTransaction(e){const r=I.Transaction.from(e.transaction),n=await i(this,a).dryRunTransactionBlock({transactionBlock:e.transaction,signal:e.signal}),{effects:d,objectTypes:u}=V({effects:n.effects,objectChanges:n.objectChanges});return{transaction:{digest:await r.getDigest(),epoch:null,effects:d,objectTypes:Promise.resolve(u),signatures:[],transaction:h.parseTransactionBcs(e.transaction),balanceChanges:n.balanceChanges.map(o=>({coinType:o.coinType,address:D(o.owner),amount:o.amount}))}}}async getReferenceGasPrice(e){const r=await i(this,a).getReferenceGasPrice({signal:e==null?void 0:e.signal});return{referenceGasPrice:String(r)}}async getDynamicFields(e){const r=await i(this,a).getDynamicFields({parentId:e.parentId,limit:e.limit,cursor:e.cursor});return{dynamicFields:r.data.map(n=>({id:n.objectId,type:n.objectType,name:{type:n.name.type,bcs:g.fromBase64(n.bcsName)}})),hasNextPage:r.hasNextPage,cursor:r.nextCursor}}async verifyZkLoginSignature(e){const r=await i(this,a).verifyZkLoginSignature({bytes:e.bytes,signature:e.signature,intentScope:e.intentScope,author:e.author});return{success:r.success,errors:r.errors}}async defaultNameServiceName(e){return{data:{name:(await i(this,a).resolveNameServiceNames(e)).data[0]}}}resolveTransactionPlugin(){return P.jsonRpcClientResolveTransactionPlugin(i(this,a))}async getMoveFunction(e){const r=await i(this,a).getNormalizedMoveFunction({package:(await this.mvr.resolvePackage({package:e.packageId})).package,module:e.moduleName,function:e.name});return{function:{packageId:k.normalizeSuiAddress(e.packageId),moduleName:e.moduleName,name:e.name,visibility:U(r.visibility),isEntry:r.isEntry,typeParameters:r.typeParameters.map(n=>({isPhantom:!1,constraints:M(n)})),parameters:r.parameters.map(n=>j(n)),returns:r.return.map(n=>j(n))}}}}a=new WeakMap;function v(t){var e;return{id:t.objectId,version:t.version,digest:t.digest,type:t.type,content:Promise.resolve(((e=t.bcs)==null?void 0:e.dataType)==="moveObject"?g.fromBase64(t.bcs.bcsBytes):new Uint8Array),owner:l(t.owner),previousTransaction:t.previousTransaction??null}}function l(t){if(t==="Immutable")return{$kind:"Immutable",Immutable:!0};if("ConsensusAddressOwner"in t)return{$kind:"ConsensusAddressOwner",ConsensusAddressOwner:{owner:t.ConsensusAddressOwner.owner,startVersion:t.ConsensusAddressOwner.start_version}};if("AddressOwner"in t)return{$kind:"AddressOwner",AddressOwner:t.AddressOwner};if("ObjectOwner"in t)return{$kind:"ObjectOwner",ObjectOwner:t.ObjectOwner};if("Shared"in t)return{$kind:"Shared",Shared:{initialSharedVersion:t.Shared.initial_shared_version}};throw new Error(`Unknown owner type: ${JSON.stringify(t)}`)}function D(t){if(t==="Immutable")return null;if("ConsensusAddressOwner"in t)return t.ConsensusAddressOwner.owner;if("AddressOwner"in t)return t.AddressOwner;if("ObjectOwner"in t)return t.ObjectOwner;if("Shared"in t)return null;throw new Error(`Unknown owner type: ${JSON.stringify(t)}`)}function T(t){var u,o,s;const e=p.bcs.SenderSignedData.parse(g.fromBase64(t.rawTransaction))[0],r={};(u=t.objectChanges)==null||u.forEach(c=>{c.type!=="published"&&(r[c.objectId]=c.objectType)});const n=p.bcs.TransactionData.serialize(e.intentMessage.value).toBytes(),d=E.TransactionDataBuilder.restore({version:2,sender:e.intentMessage.value.V1.sender,expiration:e.intentMessage.value.V1.expiration,gasData:e.intentMessage.value.V1.gasData,inputs:e.intentMessage.value.V1.kind.ProgrammableTransaction.inputs,commands:e.intentMessage.value.V1.kind.ProgrammableTransaction.commands});return{digest:t.digest,epoch:((o=t.effects)==null?void 0:o.executedEpoch)??null,effects:h.parseTransactionEffectsBcs(new Uint8Array(t.rawEffects)),objectTypes:Promise.resolve(r),transaction:{...d,bcs:n},signatures:e.txSignatures,balanceChanges:((s=t.balanceChanges)==null?void 0:s.map(c=>({coinType:c.coinType,address:D(c.owner),amount:c.amount})))??[]}}function V({bytes:t,effects:e,objectChanges:r}){var o;const n=[],d=[],u={};return r==null||r.forEach(s=>{var c,O,m,y;switch(s.type){case"published":n.push({id:s.packageId,inputState:"DoesNotExist",inputVersion:null,inputDigest:null,inputOwner:null,outputState:"PackageWrite",outputVersion:s.version,outputDigest:s.digest,outputOwner:null,idOperation:"Created"});break;case"transferred":n.push({id:s.objectId,inputState:"Exists",inputVersion:s.version,inputDigest:s.digest,inputOwner:{$kind:"AddressOwner",AddressOwner:s.sender},outputState:"ObjectWrite",outputVersion:s.version,outputDigest:s.digest,outputOwner:l(s.recipient),idOperation:"None"}),u[s.objectId]=s.objectType;break;case"mutated":n.push({id:s.objectId,inputState:"Exists",inputVersion:s.previousVersion,inputDigest:null,inputOwner:l(s.owner),outputState:"ObjectWrite",outputVersion:s.version,outputDigest:s.digest,outputOwner:l(s.owner),idOperation:"None"}),u[s.objectId]=s.objectType;break;case"deleted":n.push({id:s.objectId,inputState:"Exists",inputVersion:s.version,inputDigest:((O=(c=e.deleted)==null?void 0:c.find(w=>w.objectId===s.objectId))==null?void 0:O.digest)??null,inputOwner:null,outputState:"DoesNotExist",outputVersion:null,outputDigest:null,outputOwner:null,idOperation:"Deleted"}),u[s.objectId]=s.objectType;break;case"wrapped":n.push({id:s.objectId,inputState:"Exists",inputVersion:s.version,inputDigest:null,inputOwner:{$kind:"AddressOwner",AddressOwner:s.sender},outputState:"ObjectWrite",outputVersion:s.version,outputDigest:((y=(m=e.wrapped)==null?void 0:m.find(w=>w.objectId===s.objectId))==null?void 0:y.digest)??null,outputOwner:{$kind:"ObjectOwner",ObjectOwner:s.sender},idOperation:"None"}),u[s.objectId]=s.objectType;break;case"created":n.push({id:s.objectId,inputState:"DoesNotExist",inputVersion:null,inputDigest:null,inputOwner:null,outputState:"ObjectWrite",outputVersion:s.version,outputDigest:s.digest,outputOwner:l(s.owner),idOperation:"Created"}),u[s.objectId]=s.objectType;break}}),{objectTypes:u,effects:{bcs:t??null,digest:e.transactionDigest,version:2,status:e.status.status==="success"?{success:!0,error:null}:{success:!1,error:e.status.error},gasUsed:e.gasUsed,transactionDigest:e.transactionDigest,gasObject:{id:(o=e.gasObject)==null?void 0:o.reference.objectId,inputState:"Exists",inputVersion:null,inputDigest:null,inputOwner:null,outputState:"ObjectWrite",outputVersion:e.gasObject.reference.version,outputDigest:e.gasObject.reference.digest,outputOwner:l(e.gasObject.owner),idOperation:"None"},eventsDigest:e.eventsDigest??null,dependencies:e.dependencies??[],lamportVersion:e.gasObject.reference.version,changedObjects:n,unchangedConsensusObjects:d,auxiliaryDataDigest:null}}}const R=p.bcs.struct("Balance",{value:p.bcs.u64()}),_=p.bcs.struct("Coin",{id:p.bcs.Address,balance:R});function j(t){if(typeof t!="string"){if("Reference"in t)return{reference:"immutable",body:b(t.Reference)};if("MutableReference"in t)return{reference:"mutable",body:b(t.MutableReference)}}return{reference:null,body:b(t)}}function b(t){switch(t){case"Address":return{$kind:"address"};case"Bool":return{$kind:"bool"};case"U8":return{$kind:"u8"};case"U16":return{$kind:"u16"};case"U32":return{$kind:"u32"};case"U64":return{$kind:"u64"};case"U128":return{$kind:"u128"};case"U256":return{$kind:"u256"}}if(typeof t=="string")throw new Error(`Unknown type: ${t}`);if("Vector"in t)return{$kind:"vector",vector:b(t.Vector)};if("Struct"in t)return{$kind:"datatype",datatype:{typeName:`${k.normalizeSuiAddress(t.Struct.address)}::${t.Struct.module}::${t.Struct.name}`,typeParameters:t.Struct.typeArguments.map(e=>b(e))}};if("TypeParameter"in t)return{$kind:"typeParameter",index:t.TypeParameter};throw new Error(`Unknown type: ${JSON.stringify(t)}`)}function M(t){return t.abilities.map(e=>{switch(e){case"Copy":return"copy";case"Drop":return"drop";case"Store":return"store";case"Key":return"key";default:return"unknown"}})}function U(t){switch(t){case"Public":return"public";case"Private":return"private";case"Friend":return"friend";default:return"unknown"}}exports.JSONRpcCoreClient=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index114.cjs"),x=require("./index318.cjs"),p=require("./index320.cjs"),I=require("./index77.cjs"),P=require("./index321.cjs"),E=require("./index314.cjs"),k=require("./index117.cjs"),N=require("./index322.cjs"),f=require("./index323.cjs"),h=require("./index324.cjs");var S=t=>{throw TypeError(t)},C=(t,e,r)=>e.has(t)||S("Cannot "+r),i=(t,e,r)=>(C(t,e,"read from private field"),r?r.call(t):e.get(t)),A=(t,e,r)=>e.has(t)?S("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),B=(t,e,r,n)=>(C(t,e,"write to private field"),e.set(t,r),r),a;class $ extends N.Experimental_CoreClient{constructor({jsonRpcClient:e,mvr:r}){super({network:e.network,base:e,mvr:r}),A(this,a),B(this,a,e)}async getObjects(e){const r=x.chunk(e.objectIds,50),n=[];for(const d of r){const u=await i(this,a).multiGetObjects({ids:d,options:{showOwner:!0,showType:!0,showBcs:!0,showPreviousTransaction:!0},signal:e.signal});for(const[o,s]of u.entries())s.error?n.push(f.ObjectError.fromResponse(s.error,d[o])):n.push(v(s.data))}return{objects:n}}async getOwnedObjects(e){const r=await i(this,a).getOwnedObjects({owner:e.address,limit:e.limit,cursor:e.cursor,options:{showOwner:!0,showType:!0,showBcs:!0,showPreviousTransaction:!0},filter:e.type?{StructType:e.type}:null,signal:e.signal});return{objects:r.data.map(n=>{if(n.error)throw f.ObjectError.fromResponse(n.error);return v(n.data)}),hasNextPage:r.hasNextPage,cursor:r.nextCursor??null}}async getCoins(e){const r=await i(this,a).getCoins({owner:e.address,coinType:e.coinType,limit:e.limit,cursor:e.cursor,signal:e.signal});return{objects:r.data.map(n=>({id:n.coinObjectId,version:n.version,digest:n.digest,balance:n.balance,type:`0x2::coin::Coin<${n.coinType}>`,content:Promise.resolve(_.serialize({id:n.coinObjectId,balance:{value:n.balance}}).toBytes()),owner:{$kind:"ObjectOwner",ObjectOwner:e.address},previousTransaction:n.previousTransaction})),hasNextPage:r.hasNextPage,cursor:r.nextCursor??null}}async getBalance(e){const r=await i(this,a).getBalance({owner:e.address,coinType:e.coinType,signal:e.signal});return{balance:{coinType:r.coinType,balance:r.totalBalance}}}async getAllBalances(e){return{balances:(await i(this,a).getAllBalances({owner:e.address,signal:e.signal})).map(n=>({coinType:n.coinType,balance:n.totalBalance})),hasNextPage:!1,cursor:null}}async getTransaction(e){const r=await i(this,a).getTransactionBlock({digest:e.digest,options:{showRawInput:!0,showObjectChanges:!0,showRawEffects:!0,showEvents:!0,showEffects:!0,showBalanceChanges:!0},signal:e.signal});return{transaction:T(r)}}async executeTransaction(e){const r=await i(this,a).executeTransactionBlock({transactionBlock:e.transaction,signature:e.signatures,options:{showRawEffects:!0,showEvents:!0,showObjectChanges:!0,showRawInput:!0,showEffects:!0,showBalanceChanges:!0},signal:e.signal});return{transaction:T(r)}}async dryRunTransaction(e){const r=I.Transaction.from(e.transaction),n=await i(this,a).dryRunTransactionBlock({transactionBlock:e.transaction,signal:e.signal}),{effects:d,objectTypes:u}=V({effects:n.effects,objectChanges:n.objectChanges});return{transaction:{digest:await r.getDigest(),epoch:null,effects:d,objectTypes:Promise.resolve(u),signatures:[],transaction:h.parseTransactionBcs(e.transaction),balanceChanges:n.balanceChanges.map(o=>({coinType:o.coinType,address:D(o.owner),amount:o.amount}))}}}async getReferenceGasPrice(e){const r=await i(this,a).getReferenceGasPrice({signal:e==null?void 0:e.signal});return{referenceGasPrice:String(r)}}async getDynamicFields(e){const r=await i(this,a).getDynamicFields({parentId:e.parentId,limit:e.limit,cursor:e.cursor});return{dynamicFields:r.data.map(n=>({id:n.objectId,type:n.objectType,name:{type:n.name.type,bcs:g.fromBase64(n.bcsName)}})),hasNextPage:r.hasNextPage,cursor:r.nextCursor}}async verifyZkLoginSignature(e){const r=await i(this,a).verifyZkLoginSignature({bytes:e.bytes,signature:e.signature,intentScope:e.intentScope,author:e.author});return{success:r.success,errors:r.errors}}async defaultNameServiceName(e){return{data:{name:(await i(this,a).resolveNameServiceNames(e)).data[0]}}}resolveTransactionPlugin(){return P.jsonRpcClientResolveTransactionPlugin(i(this,a))}async getMoveFunction(e){const r=await i(this,a).getNormalizedMoveFunction({package:(await this.mvr.resolvePackage({package:e.packageId})).package,module:e.moduleName,function:e.name});return{function:{packageId:k.normalizeSuiAddress(e.packageId),moduleName:e.moduleName,name:e.name,visibility:U(r.visibility),isEntry:r.isEntry,typeParameters:r.typeParameters.map(n=>({isPhantom:!1,constraints:M(n)})),parameters:r.parameters.map(n=>j(n)),returns:r.return.map(n=>j(n))}}}}a=new WeakMap;function v(t){var e;return{id:t.objectId,version:t.version,digest:t.digest,type:t.type,content:Promise.resolve(((e=t.bcs)==null?void 0:e.dataType)==="moveObject"?g.fromBase64(t.bcs.bcsBytes):new Uint8Array),owner:l(t.owner),previousTransaction:t.previousTransaction??null}}function l(t){if(t==="Immutable")return{$kind:"Immutable",Immutable:!0};if("ConsensusAddressOwner"in t)return{$kind:"ConsensusAddressOwner",ConsensusAddressOwner:{owner:t.ConsensusAddressOwner.owner,startVersion:t.ConsensusAddressOwner.start_version}};if("AddressOwner"in t)return{$kind:"AddressOwner",AddressOwner:t.AddressOwner};if("ObjectOwner"in t)return{$kind:"ObjectOwner",ObjectOwner:t.ObjectOwner};if("Shared"in t)return{$kind:"Shared",Shared:{initialSharedVersion:t.Shared.initial_shared_version}};throw new Error(`Unknown owner type: ${JSON.stringify(t)}`)}function D(t){if(t==="Immutable")return null;if("ConsensusAddressOwner"in t)return t.ConsensusAddressOwner.owner;if("AddressOwner"in t)return t.AddressOwner;if("ObjectOwner"in t)return t.ObjectOwner;if("Shared"in t)return null;throw new Error(`Unknown owner type: ${JSON.stringify(t)}`)}function T(t){var u,o,s;const e=p.bcs.SenderSignedData.parse(g.fromBase64(t.rawTransaction))[0],r={};(u=t.objectChanges)==null||u.forEach(c=>{c.type!=="published"&&(r[c.objectId]=c.objectType)});const n=p.bcs.TransactionData.serialize(e.intentMessage.value).toBytes(),d=E.TransactionDataBuilder.restore({version:2,sender:e.intentMessage.value.V1.sender,expiration:e.intentMessage.value.V1.expiration,gasData:e.intentMessage.value.V1.gasData,inputs:e.intentMessage.value.V1.kind.ProgrammableTransaction.inputs,commands:e.intentMessage.value.V1.kind.ProgrammableTransaction.commands});return{digest:t.digest,epoch:((o=t.effects)==null?void 0:o.executedEpoch)??null,effects:h.parseTransactionEffectsBcs(new Uint8Array(t.rawEffects)),objectTypes:Promise.resolve(r),transaction:{...d,bcs:n},signatures:e.txSignatures,balanceChanges:((s=t.balanceChanges)==null?void 0:s.map(c=>({coinType:c.coinType,address:D(c.owner),amount:c.amount})))??[]}}function V({bytes:t,effects:e,objectChanges:r}){var o;const n=[],d=[],u={};return r==null||r.forEach(s=>{var c,O,m,y;switch(s.type){case"published":n.push({id:s.packageId,inputState:"DoesNotExist",inputVersion:null,inputDigest:null,inputOwner:null,outputState:"PackageWrite",outputVersion:s.version,outputDigest:s.digest,outputOwner:null,idOperation:"Created"});break;case"transferred":n.push({id:s.objectId,inputState:"Exists",inputVersion:s.version,inputDigest:s.digest,inputOwner:{$kind:"AddressOwner",AddressOwner:s.sender},outputState:"ObjectWrite",outputVersion:s.version,outputDigest:s.digest,outputOwner:l(s.recipient),idOperation:"None"}),u[s.objectId]=s.objectType;break;case"mutated":n.push({id:s.objectId,inputState:"Exists",inputVersion:s.previousVersion,inputDigest:null,inputOwner:l(s.owner),outputState:"ObjectWrite",outputVersion:s.version,outputDigest:s.digest,outputOwner:l(s.owner),idOperation:"None"}),u[s.objectId]=s.objectType;break;case"deleted":n.push({id:s.objectId,inputState:"Exists",inputVersion:s.version,inputDigest:((O=(c=e.deleted)==null?void 0:c.find(w=>w.objectId===s.objectId))==null?void 0:O.digest)??null,inputOwner:null,outputState:"DoesNotExist",outputVersion:null,outputDigest:null,outputOwner:null,idOperation:"Deleted"}),u[s.objectId]=s.objectType;break;case"wrapped":n.push({id:s.objectId,inputState:"Exists",inputVersion:s.version,inputDigest:null,inputOwner:{$kind:"AddressOwner",AddressOwner:s.sender},outputState:"ObjectWrite",outputVersion:s.version,outputDigest:((y=(m=e.wrapped)==null?void 0:m.find(w=>w.objectId===s.objectId))==null?void 0:y.digest)??null,outputOwner:{$kind:"ObjectOwner",ObjectOwner:s.sender},idOperation:"None"}),u[s.objectId]=s.objectType;break;case"created":n.push({id:s.objectId,inputState:"DoesNotExist",inputVersion:null,inputDigest:null,inputOwner:null,outputState:"ObjectWrite",outputVersion:s.version,outputDigest:s.digest,outputOwner:l(s.owner),idOperation:"Created"}),u[s.objectId]=s.objectType;break}}),{objectTypes:u,effects:{bcs:t??null,digest:e.transactionDigest,version:2,status:e.status.status==="success"?{success:!0,error:null}:{success:!1,error:e.status.error},gasUsed:e.gasUsed,transactionDigest:e.transactionDigest,gasObject:{id:(o=e.gasObject)==null?void 0:o.reference.objectId,inputState:"Exists",inputVersion:null,inputDigest:null,inputOwner:null,outputState:"ObjectWrite",outputVersion:e.gasObject.reference.version,outputDigest:e.gasObject.reference.digest,outputOwner:l(e.gasObject.owner),idOperation:"None"},eventsDigest:e.eventsDigest??null,dependencies:e.dependencies??[],lamportVersion:e.gasObject.reference.version,changedObjects:n,unchangedConsensusObjects:d,auxiliaryDataDigest:null}}}const R=p.bcs.struct("Balance",{value:p.bcs.u64()}),_=p.bcs.struct("Coin",{id:p.bcs.Address,balance:R});function j(t){if(typeof t!="string"){if("Reference"in t)return{reference:"immutable",body:b(t.Reference)};if("MutableReference"in t)return{reference:"mutable",body:b(t.MutableReference)}}return{reference:null,body:b(t)}}function b(t){switch(t){case"Address":return{$kind:"address"};case"Bool":return{$kind:"bool"};case"U8":return{$kind:"u8"};case"U16":return{$kind:"u16"};case"U32":return{$kind:"u32"};case"U64":return{$kind:"u64"};case"U128":return{$kind:"u128"};case"U256":return{$kind:"u256"}}if(typeof t=="string")throw new Error(`Unknown type: ${t}`);if("Vector"in t)return{$kind:"vector",vector:b(t.Vector)};if("Struct"in t)return{$kind:"datatype",datatype:{typeName:`${k.normalizeSuiAddress(t.Struct.address)}::${t.Struct.module}::${t.Struct.name}`,typeParameters:t.Struct.typeArguments.map(e=>b(e))}};if("TypeParameter"in t)return{$kind:"typeParameter",index:t.TypeParameter};throw new Error(`Unknown type: ${JSON.stringify(t)}`)}function M(t){return t.abilities.map(e=>{switch(e){case"Copy":return"copy";case"Drop":return"drop";case"Store":return"store";case"Key":return"key";default:return"unknown"}})}function U(t){switch(t){case"Public":return"public";case"Private":return"private";case"Friend":return"friend";default:return"unknown"}}exports.JSONRpcCoreClient=$;
package/dist/index121.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { fromBase64 as m } from "./index114.js";
2
- import { chunk as x } from "./index322.js";
3
- import { bcs as p } from "./index324.js";
2
+ import { chunk as x } from "./index318.js";
3
+ import { bcs as p } from "./index320.js";
4
4
  import { Transaction as C } from "./index77.js";
5
- import { jsonRpcClientResolveTransactionPlugin as I } from "./index325.js";
6
- import { TransactionDataBuilder as P } from "./index318.js";
5
+ import { jsonRpcClientResolveTransactionPlugin as I } from "./index321.js";
6
+ import { TransactionDataBuilder as P } from "./index314.js";
7
7
  import { normalizeSuiAddress as k } from "./index117.js";
8
- import { Experimental_CoreClient as E } from "./index326.js";
9
- import { ObjectError as y } from "./index327.js";
10
- import { parseTransactionBcs as N, parseTransactionEffectsBcs as A } from "./index328.js";
8
+ import { Experimental_CoreClient as E } from "./index322.js";
9
+ import { ObjectError as y } from "./index323.js";
10
+ import { parseTransactionBcs as N, parseTransactionEffectsBcs as A } from "./index324.js";
11
11
  var h = (t) => {
12
12
  throw TypeError(t);
13
13
  }, S = (t, e, r) => e.has(t) || h("Cannot " + r), i = (t, e, r) => (S(t, e, "read from private field"), r ? r.call(t) : e.get(t)), $ = (t, e, r) => e.has(t) ? h("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), B = (t, e, r, n) => (S(t, e, "write to private field"), e.set(t, r), r), a;
package/dist/index126.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index44.cjs"),R=require("./index221.cjs"),b=require("./index96.cjs"),m=require("./index84.cjs"),y=require("./index88.cjs"),C=require("./index81.cjs"),w=require("./index333.cjs"),T=require("./index242.cjs"),v=require("./index245.cjs"),x=require("./index334.cjs"),B=require("./index101.cjs"),N=require("./index105.cjs");async function k(a,n){const{blockNumber:c,blockTag:f,coinType:i,name:t,gatewayUrls:h,strict:A}=n,{chain:r}=a,g=(()=>{if(n.universalResolverAddress)return n.universalResolverAddress;if(!r)throw new Error("client chain not configured. universalResolverAddress is required.");return m.getChainContractAddress({blockNumber:c,chain:r,contract:"ensUniversalResolver"})})(),u=r==null?void 0:r.ensTlds;if(u&&!u.some(e=>t.endsWith(e)))return null;const d=i!=null?[v.namehash(t),BigInt(i)]:[v.namehash(t)];try{const e=b.encodeFunctionData({abi:o.addressResolverAbi,functionName:"addr",args:d}),q={address:g,abi:o.universalResolverResolveAbi,functionName:"resolveWithGateways",args:[C.toHex(x.packetToBytes(t)),e,h??[T.localBatchGatewayUrl]],blockNumber:c,blockTag:f},l=await B.getAction(a,N.readContract,"readContract")(q);if(l[0]==="0x")return null;const s=R.decodeFunctionResult({abi:o.addressResolverAbi,args:d,functionName:"addr",data:l[0]});return s==="0x"||y.trim(s)==="0x00"?null:s}catch(e){if(A)throw e;if(w.isNullUniversalResolverError(e))return null;throw e}}exports.getEnsAddress=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index46.cjs"),R=require("./index221.cjs"),b=require("./index96.cjs"),m=require("./index84.cjs"),y=require("./index88.cjs"),C=require("./index81.cjs"),w=require("./index325.cjs"),T=require("./index242.cjs"),v=require("./index245.cjs"),x=require("./index326.cjs"),B=require("./index101.cjs"),N=require("./index105.cjs");async function k(a,n){const{blockNumber:c,blockTag:f,coinType:i,name:t,gatewayUrls:h,strict:A}=n,{chain:r}=a,g=(()=>{if(n.universalResolverAddress)return n.universalResolverAddress;if(!r)throw new Error("client chain not configured. universalResolverAddress is required.");return m.getChainContractAddress({blockNumber:c,chain:r,contract:"ensUniversalResolver"})})(),u=r==null?void 0:r.ensTlds;if(u&&!u.some(e=>t.endsWith(e)))return null;const d=i!=null?[v.namehash(t),BigInt(i)]:[v.namehash(t)];try{const e=b.encodeFunctionData({abi:o.addressResolverAbi,functionName:"addr",args:d}),q={address:g,abi:o.universalResolverResolveAbi,functionName:"resolveWithGateways",args:[C.toHex(x.packetToBytes(t)),e,h??[T.localBatchGatewayUrl]],blockNumber:c,blockTag:f},l=await B.getAction(a,N.readContract,"readContract")(q);if(l[0]==="0x")return null;const s=R.decodeFunctionResult({abi:o.addressResolverAbi,args:d,functionName:"addr",data:l[0]});return s==="0x"||y.trim(s)==="0x00"?null:s}catch(e){if(A)throw e;if(w.isNullUniversalResolverError(e))return null;throw e}}exports.getEnsAddress=k;
package/dist/index126.js CHANGED
@@ -1,13 +1,13 @@
1
- import { addressResolverAbi as u, universalResolverResolveAbi as R } from "./index44.js";
1
+ import { addressResolverAbi as u, universalResolverResolveAbi as R } from "./index46.js";
2
2
  import { decodeFunctionResult as g } from "./index221.js";
3
3
  import { encodeFunctionData as b } from "./index96.js";
4
4
  import { getChainContractAddress as w } from "./index84.js";
5
5
  import { trim as y } from "./index88.js";
6
6
  import { toHex as C } from "./index81.js";
7
- import { isNullUniversalResolverError as x } from "./index333.js";
7
+ import { isNullUniversalResolverError as x } from "./index325.js";
8
8
  import { localBatchGatewayUrl as N } from "./index242.js";
9
9
  import { namehash as m } from "./index245.js";
10
- import { packetToBytes as T } from "./index334.js";
10
+ import { packetToBytes as T } from "./index326.js";
11
11
  import { getAction as U } from "./index101.js";
12
12
  import { readContract as k } from "./index105.js";
13
13
  async function K(s, o) {
package/dist/index127.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index335.cjs"),g=require("./index101.cjs"),l=require("./index130.cjs");async function v(t,{blockNumber:r,blockTag:a,assetGatewayUrls:n,name:s,gatewayUrls:c,strict:o,universalResolverAddress:u}){const e=await g.getAction(t,l.getEnsText,"getEnsText")({blockNumber:r,blockTag:a,key:"avatar",name:s,universalResolverAddress:u,gatewayUrls:c,strict:o});if(!e)return null;try{return await i.parseAvatarRecord(t,{record:e,gatewayUrls:n})}catch{return null}}exports.getEnsAvatar=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index327.cjs"),g=require("./index101.cjs"),l=require("./index130.cjs");async function v(t,{blockNumber:r,blockTag:a,assetGatewayUrls:n,name:s,gatewayUrls:c,strict:o,universalResolverAddress:u}){const e=await g.getAction(t,l.getEnsText,"getEnsText")({blockNumber:r,blockTag:a,key:"avatar",name:s,universalResolverAddress:u,gatewayUrls:c,strict:o});if(!e)return null;try{return await i.parseAvatarRecord(t,{record:e,gatewayUrls:n})}catch{return null}}exports.getEnsAvatar=v;
package/dist/index127.js CHANGED
@@ -1,4 +1,4 @@
1
- import { parseAvatarRecord as m } from "./index335.js";
1
+ import { parseAvatarRecord as m } from "./index327.js";
2
2
  import { getAction as u } from "./index101.js";
3
3
  import { getEnsText as f } from "./index130.js";
4
4
  async function y(t, { blockNumber: a, blockTag: e, assetGatewayUrls: n, name: o, gatewayUrls: c, strict: i, universalResolverAddress: s }) {
package/dist/index128.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index44.cjs"),h=require("./index84.cjs"),A=require("./index333.cjs"),w=require("./index242.cjs"),y=require("./index101.cjs"),C=require("./index105.cjs");async function R(t,r){const{address:a,blockNumber:s,blockTag:o,coinType:c=60n,gatewayUrls:i,strict:l}=r,{chain:n}=t,u=(()=>{if(r.universalResolverAddress)return r.universalResolverAddress;if(!n)throw new Error("client chain not configured. universalResolverAddress is required.");return h.getChainContractAddress({blockNumber:s,chain:n,contract:"ensUniversalResolver"})})();try{const e={address:u,abi:g.universalResolverReverseAbi,args:[a,c,i??[w.localBatchGatewayUrl]],functionName:"reverseWithGateways",blockNumber:s,blockTag:o},d=y.getAction(t,C.readContract,"readContract"),[v]=await d(e);return v||null}catch(e){if(l)throw e;if(A.isNullUniversalResolverError(e))return null;throw e}}exports.getEnsName=R;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index46.cjs"),h=require("./index84.cjs"),A=require("./index325.cjs"),w=require("./index242.cjs"),y=require("./index101.cjs"),C=require("./index105.cjs");async function R(t,r){const{address:a,blockNumber:s,blockTag:o,coinType:c=60n,gatewayUrls:i,strict:l}=r,{chain:n}=t,u=(()=>{if(r.universalResolverAddress)return r.universalResolverAddress;if(!n)throw new Error("client chain not configured. universalResolverAddress is required.");return h.getChainContractAddress({blockNumber:s,chain:n,contract:"ensUniversalResolver"})})();try{const e={address:u,abi:g.universalResolverReverseAbi,args:[a,c,i??[w.localBatchGatewayUrl]],functionName:"reverseWithGateways",blockNumber:s,blockTag:o},d=y.getAction(t,C.readContract,"readContract"),[v]=await d(e);return v||null}catch(e){if(l)throw e;if(A.isNullUniversalResolverError(e))return null;throw e}}exports.getEnsName=R;
package/dist/index128.js CHANGED
@@ -1,6 +1,6 @@
1
- import { universalResolverReverseAbi as m } from "./index44.js";
1
+ import { universalResolverReverseAbi as m } from "./index46.js";
2
2
  import { getChainContractAddress as f } from "./index84.js";
3
- import { isNullUniversalResolverError as h } from "./index333.js";
3
+ import { isNullUniversalResolverError as h } from "./index325.js";
4
4
  import { localBatchGatewayUrl as w } from "./index242.js";
5
5
  import { getAction as A } from "./index101.js";
6
6
  import { readContract as R } from "./index105.js";
package/dist/index129.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index84.cjs"),l=require("./index81.cjs"),v=require("./index334.cjs"),y=require("./index101.cjs"),f=require("./index105.cjs");async function g(n,r){const{blockNumber:o,blockTag:i,name:s}=r,{chain:e}=n,a=(()=>{if(r.universalResolverAddress)return r.universalResolverAddress;if(!e)throw new Error("client chain not configured. universalResolverAddress is required.");return u.getChainContractAddress({blockNumber:o,chain:e,contract:"ensUniversalResolver"})})(),t=e==null?void 0:e.ensTlds;if(t&&!t.some(d=>s.endsWith(d)))throw new Error(`${s} is not a valid ENS TLD (${t==null?void 0:t.join(", ")}) for chain "${e.name}" (id: ${e.id}).`);const[c]=await y.getAction(n,f.readContract,"readContract")({address:a,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[l.toHex(v.packetToBytes(s))],blockNumber:o,blockTag:i});return c}exports.getEnsResolver=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index84.cjs"),l=require("./index81.cjs"),v=require("./index326.cjs"),y=require("./index101.cjs"),f=require("./index105.cjs");async function g(n,r){const{blockNumber:o,blockTag:i,name:s}=r,{chain:e}=n,a=(()=>{if(r.universalResolverAddress)return r.universalResolverAddress;if(!e)throw new Error("client chain not configured. universalResolverAddress is required.");return u.getChainContractAddress({blockNumber:o,chain:e,contract:"ensUniversalResolver"})})(),t=e==null?void 0:e.ensTlds;if(t&&!t.some(d=>s.endsWith(d)))throw new Error(`${s} is not a valid ENS TLD (${t==null?void 0:t.join(", ")}) for chain "${e.name}" (id: ${e.id}).`);const[c]=await y.getAction(n,f.readContract,"readContract")({address:a,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[l.toHex(v.packetToBytes(s))],blockNumber:o,blockTag:i});return c}exports.getEnsResolver=g;
package/dist/index129.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { getChainContractAddress as l } from "./index84.js";
2
2
  import { toHex as u } from "./index81.js";
3
- import { packetToBytes as v } from "./index334.js";
3
+ import { packetToBytes as v } from "./index326.js";
4
4
  import { getAction as f } from "./index101.js";
5
5
  import { readContract as m } from "./index105.js";
6
6
  async function g(s, t) {
package/dist/index130.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index44.cjs"),q=require("./index221.cjs"),A=require("./index96.cjs"),R=require("./index84.cjs"),b=require("./index81.cjs"),f=require("./index333.cjs"),y=require("./index242.cjs"),C=require("./index245.cjs"),w=require("./index334.cjs"),x=require("./index101.cjs"),m=require("./index105.cjs");async function T(o,r){const{blockNumber:a,blockTag:l,key:d,name:n,gatewayUrls:v,strict:h}=r,{chain:t}=o,g=(()=>{if(r.universalResolverAddress)return r.universalResolverAddress;if(!t)throw new Error("client chain not configured. universalResolverAddress is required.");return R.getChainContractAddress({blockNumber:a,chain:t,contract:"ensUniversalResolver"})})(),c=t==null?void 0:t.ensTlds;if(c&&!c.some(e=>n.endsWith(e)))return null;try{const e={address:g,abi:s.universalResolverResolveAbi,args:[b.toHex(w.packetToBytes(n)),A.encodeFunctionData({abi:s.textResolverAbi,functionName:"text",args:[C.namehash(n),d]}),v??[y.localBatchGatewayUrl]],functionName:"resolveWithGateways",blockNumber:a,blockTag:l},i=await x.getAction(o,m.readContract,"readContract")(e);if(i[0]==="0x")return null;const u=q.decodeFunctionResult({abi:s.textResolverAbi,functionName:"text",data:i[0]});return u===""?null:u}catch(e){if(h)throw e;if(f.isNullUniversalResolverError(e))return null;throw e}}exports.getEnsText=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index46.cjs"),q=require("./index221.cjs"),A=require("./index96.cjs"),R=require("./index84.cjs"),b=require("./index81.cjs"),f=require("./index325.cjs"),y=require("./index242.cjs"),C=require("./index245.cjs"),w=require("./index326.cjs"),x=require("./index101.cjs"),m=require("./index105.cjs");async function T(o,r){const{blockNumber:a,blockTag:l,key:d,name:n,gatewayUrls:v,strict:h}=r,{chain:t}=o,g=(()=>{if(r.universalResolverAddress)return r.universalResolverAddress;if(!t)throw new Error("client chain not configured. universalResolverAddress is required.");return R.getChainContractAddress({blockNumber:a,chain:t,contract:"ensUniversalResolver"})})(),c=t==null?void 0:t.ensTlds;if(c&&!c.some(e=>n.endsWith(e)))return null;try{const e={address:g,abi:s.universalResolverResolveAbi,args:[b.toHex(w.packetToBytes(n)),A.encodeFunctionData({abi:s.textResolverAbi,functionName:"text",args:[C.namehash(n),d]}),v??[y.localBatchGatewayUrl]],functionName:"resolveWithGateways",blockNumber:a,blockTag:l},i=await x.getAction(o,m.readContract,"readContract")(e);if(i[0]==="0x")return null;const u=q.decodeFunctionResult({abi:s.textResolverAbi,functionName:"text",data:i[0]});return u===""?null:u}catch(e){if(h)throw e;if(f.isNullUniversalResolverError(e))return null;throw e}}exports.getEnsText=T;
package/dist/index130.js CHANGED
@@ -1,12 +1,12 @@
1
- import { textResolverAbi as l, universalResolverResolveAbi as p } from "./index44.js";
1
+ import { textResolverAbi as l, universalResolverResolveAbi as p } from "./index46.js";
2
2
  import { decodeFunctionResult as h } from "./index221.js";
3
3
  import { encodeFunctionData as A } from "./index96.js";
4
4
  import { getChainContractAddress as R } from "./index84.js";
5
5
  import { toHex as b } from "./index81.js";
6
- import { isNullUniversalResolverError as g } from "./index333.js";
6
+ import { isNullUniversalResolverError as g } from "./index325.js";
7
7
  import { localBatchGatewayUrl as w } from "./index242.js";
8
8
  import { namehash as x } from "./index245.js";
9
- import { packetToBytes as y } from "./index334.js";
9
+ import { packetToBytes as y } from "./index326.js";
10
10
  import { getAction as C } from "./index101.js";
11
11
  import { readContract as N } from "./index105.js";
12
12
  async function j(n, e) {
package/dist/index132.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index329.cjs");async function o(e){const r=c.createFilterRequestScope(e,{method:"eth_newBlockFilter"}),t=await e.request({method:"eth_newBlockFilter"});return{id:t,request:r(t),type:"block"}}exports.createBlockFilter=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index302.cjs");async function o(e){const r=c.createFilterRequestScope(e,{method:"eth_newBlockFilter"}),t=await e.request({method:"eth_newBlockFilter"});return{id:t,request:r(t),type:"block"}}exports.createBlockFilter=o;
package/dist/index132.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createFilterRequestScope as r } from "./index329.js";
1
+ import { createFilterRequestScope as r } from "./index302.js";
2
2
  async function i(e) {
3
3
  const o = r(e, {
4
4
  method: "eth_newBlockFilter"
package/dist/index133.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index225.cjs"),s=require("./index81.cjs"),q=require("./index329.cjs");async function b(r,a){const{address:u,abi:n,args:c,eventName:e,fromBlock:t,strict:l,toBlock:o}=a,d=q.createFilterRequestScope(r,{method:"eth_newFilter"}),p=e?m.encodeEventTopics({abi:n,args:c,eventName:e}):void 0,i=await r.request({method:"eth_newFilter",params:[{address:u,fromBlock:typeof t=="bigint"?s.numberToHex(t):t,toBlock:typeof o=="bigint"?s.numberToHex(o):o,topics:p}]});return{abi:n,args:c,eventName:e,id:i,request:d(i),strict:!!l,type:"event"}}exports.createContractEventFilter=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index225.cjs"),s=require("./index81.cjs"),q=require("./index302.cjs");async function b(r,a){const{address:u,abi:n,args:c,eventName:e,fromBlock:t,strict:l,toBlock:o}=a,d=q.createFilterRequestScope(r,{method:"eth_newFilter"}),p=e?m.encodeEventTopics({abi:n,args:c,eventName:e}):void 0,i=await r.request({method:"eth_newFilter",params:[{address:u,fromBlock:typeof t=="bigint"?s.numberToHex(t):t,toBlock:typeof o=="bigint"?s.numberToHex(o):o,topics:p}]});return{abi:n,args:c,eventName:e,id:i,request:d(i),strict:!!l,type:"event"}}exports.createContractEventFilter=b;
package/dist/index133.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { encodeEventTopics as l } from "./index225.js";
2
2
  import { numberToHex as s } from "./index81.js";
3
- import { createFilterRequestScope as u } from "./index329.js";
3
+ import { createFilterRequestScope as u } from "./index302.js";
4
4
  async function h(r, a) {
5
5
  const { address: m, abi: n, args: i, eventName: e, fromBlock: t, strict: p, toBlock: o } = a, f = u(r, {
6
6
  method: "eth_newFilter"
package/dist/index134.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index225.cjs"),u=require("./index81.cjs"),q=require("./index329.cjs");async function f(o,{address:d,args:s,event:e,events:p,fromBlock:n,strict:b,toBlock:i}={}){const r=p??(e?[e]:void 0),l=q.createFilterRequestScope(o,{method:"eth_newFilter"});let t=[];r&&(t=[r.flatMap(a=>m.encodeEventTopics({abi:[a],eventName:a.name,args:s}))],e&&(t=t[0]));const c=await o.request({method:"eth_newFilter",params:[{address:d,fromBlock:typeof n=="bigint"?u.numberToHex(n):n,toBlock:typeof i=="bigint"?u.numberToHex(i):i,...t.length?{topics:t}:{}}]});return{abi:r,args:s,eventName:e?e.name:void 0,fromBlock:n,id:c,request:l(c),strict:!!b,toBlock:i,type:"event"}}exports.createEventFilter=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index225.cjs"),u=require("./index81.cjs"),q=require("./index302.cjs");async function f(o,{address:d,args:s,event:e,events:p,fromBlock:n,strict:b,toBlock:i}={}){const r=p??(e?[e]:void 0),l=q.createFilterRequestScope(o,{method:"eth_newFilter"});let t=[];r&&(t=[r.flatMap(a=>m.encodeEventTopics({abi:[a],eventName:a.name,args:s}))],e&&(t=t[0]));const c=await o.request({method:"eth_newFilter",params:[{address:d,fromBlock:typeof n=="bigint"?u.numberToHex(n):n,toBlock:typeof i=="bigint"?u.numberToHex(i):i,...t.length?{topics:t}:{}}]});return{abi:r,args:s,eventName:e?e.name:void 0,fromBlock:n,id:c,request:l(c),strict:!!b,toBlock:i,type:"event"}}exports.createEventFilter=f;
package/dist/index134.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { encodeEventTopics as b } from "./index225.js";
2
2
  import { numberToHex as m } from "./index81.js";
3
- import { createFilterRequestScope as h } from "./index329.js";
3
+ import { createFilterRequestScope as h } from "./index302.js";
4
4
  async function l(r, { address: p, args: a, event: e, events: c, fromBlock: n, strict: f, toBlock: i } = {}) {
5
5
  const o = c ?? (e ? [e] : void 0), u = h(r, {
6
6
  method: "eth_newFilter"
package/dist/index135.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index329.cjs");async function i(e){const n=r.createFilterRequestScope(e,{method:"eth_newPendingTransactionFilter"}),t=await e.request({method:"eth_newPendingTransactionFilter"});return{id:t,request:n(t),type:"transaction"}}exports.createPendingTransactionFilter=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index302.cjs");async function i(e){const n=r.createFilterRequestScope(e,{method:"eth_newPendingTransactionFilter"}),t=await e.request({method:"eth_newPendingTransactionFilter"});return{id:t,request:n(t),type:"transaction"}}exports.createPendingTransactionFilter=i;
package/dist/index135.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createFilterRequestScope as r } from "./index329.js";
1
+ import { createFilterRequestScope as r } from "./index302.js";
2
2
  async function a(e) {
3
3
  const n = r(e, {
4
4
  method: "eth_newPendingTransactionFilter"
package/dist/index138.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("./index123.cjs"),P=require("./index189.cjs"),E=require("./index272.cjs"),F=require("./index81.cjs"),S=require("./index336.cjs"),B=require("./index271.cjs"),N=require("./index108.cjs"),_=require("./index275.cjs"),g=require("./index261.cjs"),V=require("./index174.cjs");async function j(t,e){var u,m,d;const{account:c=t.account,prepare:o=!0}=e,r=c?O.parseAccount(c):void 0,q=(()=>{if(Array.isArray(o))return o;if((r==null?void 0:r.type)!=="local")return["blobVersionedHashes"]})();try{const a=await(async()=>{if(e.to)return e.to;if(e.authorizationList&&e.authorizationList.length>0)return await E.recoverAuthorizationAddress({authorization:e.authorizationList[0]}).catch(()=>{throw new P.BaseError("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:l,authorizationList:p,blobs:x,blobVersionedHashes:y,blockNumber:b,blockTag:v,data:z,gas:s,gasPrice:G,maxFeePerBlobGas:A,maxFeePerGas:w,maxPriorityFeePerGas:R,nonce:T,value:k,stateOverride:H,...L}=o?await V.prepareTransactionRequest(t,{...e,parameters:q,to:a}):e;if(s&&e.gas!==s)return s;const i=(typeof b=="bigint"?F.numberToHex(b):void 0)||v,h=_.serializeStateOverride(H);g.assertRequest(e);const f=(d=(m=(u=t.chain)==null?void 0:u.formatters)==null?void 0:m.transactionRequest)==null?void 0:d.format,n=(f||N.formatTransactionRequest)({...B.extract(L,{format:f}),account:r,accessList:l,authorizationList:p,blobs:x,blobVersionedHashes:y,data:z,gasPrice:G,maxFeePerBlobGas:A,maxFeePerGas:w,maxPriorityFeePerGas:R,nonce:T,to:a,value:k},"estimateGas");return BigInt(await t.request({method:"eth_estimateGas",params:h?[n,i??t.experimental_blockTag??"latest",h]:i?[n,i]:[n]}))}catch(a){throw S.getEstimateGasError(a,{...e,account:r,chain:t.chain})}}exports.estimateGas=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("./index123.cjs"),P=require("./index189.cjs"),E=require("./index272.cjs"),F=require("./index81.cjs"),S=require("./index328.cjs"),B=require("./index271.cjs"),N=require("./index108.cjs"),_=require("./index275.cjs"),g=require("./index261.cjs"),V=require("./index174.cjs");async function j(t,e){var u,m,d;const{account:c=t.account,prepare:o=!0}=e,r=c?O.parseAccount(c):void 0,q=(()=>{if(Array.isArray(o))return o;if((r==null?void 0:r.type)!=="local")return["blobVersionedHashes"]})();try{const a=await(async()=>{if(e.to)return e.to;if(e.authorizationList&&e.authorizationList.length>0)return await E.recoverAuthorizationAddress({authorization:e.authorizationList[0]}).catch(()=>{throw new P.BaseError("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:l,authorizationList:p,blobs:x,blobVersionedHashes:y,blockNumber:b,blockTag:v,data:z,gas:s,gasPrice:G,maxFeePerBlobGas:A,maxFeePerGas:w,maxPriorityFeePerGas:R,nonce:T,value:k,stateOverride:H,...L}=o?await V.prepareTransactionRequest(t,{...e,parameters:q,to:a}):e;if(s&&e.gas!==s)return s;const i=(typeof b=="bigint"?F.numberToHex(b):void 0)||v,h=_.serializeStateOverride(H);g.assertRequest(e);const f=(d=(m=(u=t.chain)==null?void 0:u.formatters)==null?void 0:m.transactionRequest)==null?void 0:d.format,n=(f||N.formatTransactionRequest)({...B.extract(L,{format:f}),account:r,accessList:l,authorizationList:p,blobs:x,blobVersionedHashes:y,data:z,gasPrice:G,maxFeePerBlobGas:A,maxFeePerGas:w,maxPriorityFeePerGas:R,nonce:T,to:a,value:k},"estimateGas");return BigInt(await t.request({method:"eth_estimateGas",params:h?[n,i??t.experimental_blockTag??"latest",h]:i?[n,i]:[n]}))}catch(a){throw S.getEstimateGasError(a,{...e,account:r,chain:t.chain})}}exports.estimateGas=j;
package/dist/index138.js CHANGED
@@ -2,7 +2,7 @@ import { parseAccount as F } from "./index123.js";
2
2
  import { BaseError as R } from "./index189.js";
3
3
  import { recoverAuthorizationAddress as B } from "./index272.js";
4
4
  import { numberToHex as E } from "./index81.js";
5
- import { getEstimateGasError as N } from "./index336.js";
5
+ import { getEstimateGasError as N } from "./index328.js";
6
6
  import { extract as O } from "./index271.js";
7
7
  import { formatTransactionRequest as _ } from "./index108.js";
8
8
  import { serializeStateOverride as S } from "./index275.js";
package/dist/index140.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index123.cjs"),j=require("./index204.cjs"),z=require("./index331.cjs"),N=require("./index271.cjs"),O=require("./index73.cjs"),V=require("./index108.cjs"),h=require("./index101.cjs"),$=require("./index261.cjs"),D=require("./index143.cjs"),J=require("./index146.cjs");async function K(r,a){var P,g,m,d,F;const{account:s=r.account,accessList:w,authorizationList:B,chain:t=r.chain,blobVersionedHashes:T,blobs:I,data:M,gas:k,gasPrice:A,maxFeePerBlobGas:p,maxFeePerGas:R,maxPriorityFeePerGas:S,nonce:n,nonceManager:u,to:v,type:C,value:E,..._}=a,H=await(async()=>{if(!s||!u||typeof n<"u")return n;const o=y.parseAccount(s),x=t?t.id:await h.getAction(r,J.getChainId,"getChainId")({});return await u.consume({address:o.address,chainId:x,client:r})})();$.assertRequest(a);const f=(g=(P=t==null?void 0:t.formatters)==null?void 0:P.transactionRequest)==null?void 0:g.format,l=(f||V.formatTransactionRequest)({...N.extract(_,{format:f}),account:s?y.parseAccount(s):void 0,accessList:w,authorizationList:B,blobs:I,blobVersionedHashes:T,data:M,gas:k,gasPrice:A,maxFeePerBlobGas:p,maxFeePerGas:R,maxPriorityFeePerGas:S,nonce:H,to:v,type:C,value:E},"fillTransaction");try{const o=await r.request({method:"eth_fillTransaction",params:[l]}),e=(((d=(m=t==null?void 0:t.formatters)==null?void 0:m.transaction)==null?void 0:d.format)||O.formatTransaction)(o.tx);delete e.blockHash,delete e.blockNumber,delete e.r,delete e.s,delete e.transactionIndex,delete e.v,delete e.yParity,e.data=e.input,e.gas&&(e.gas=a.gas??e.gas),e.gasPrice&&(e.gasPrice=a.gasPrice??e.gasPrice),e.maxFeePerBlobGas&&(e.maxFeePerBlobGas=a.maxFeePerBlobGas??e.maxFeePerBlobGas),e.maxFeePerGas&&(e.maxFeePerGas=a.maxFeePerGas??e.maxFeePerGas),e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=a.maxPriorityFeePerGas??e.maxPriorityFeePerGas),e.nonce&&(e.nonce=a.nonce??e.nonce);const c=await(async()=>{var i,q;if(typeof((i=t==null?void 0:t.fees)==null?void 0:i.baseFeeMultiplier)=="function"){const L=await h.getAction(r,D.getBlock,"getBlock")({});return t.fees.baseFeeMultiplier({block:L,client:r,request:a})}return((q=t==null?void 0:t.fees)==null?void 0:q.baseFeeMultiplier)??1.2})();if(c<1)throw new j.BaseFeeScalarError;const G=10**(((F=c.toString().split(".")[1])==null?void 0:F.length)??0),b=i=>i*BigInt(Math.ceil(c*G))/BigInt(G);return e.maxFeePerGas&&!a.maxFeePerGas&&(e.maxFeePerGas=b(e.maxFeePerGas)),e.gasPrice&&!a.gasPrice&&(e.gasPrice=b(e.gasPrice)),{raw:o.raw,transaction:{from:l.from,...e}}}catch(o){throw z.getTransactionError(o,{...a,chain:r.chain})}}exports.fillTransaction=K;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index123.cjs"),j=require("./index204.cjs"),z=require("./index329.cjs"),N=require("./index271.cjs"),O=require("./index73.cjs"),V=require("./index108.cjs"),h=require("./index101.cjs"),$=require("./index261.cjs"),D=require("./index143.cjs"),J=require("./index146.cjs");async function K(r,a){var P,g,m,d,F;const{account:s=r.account,accessList:w,authorizationList:B,chain:t=r.chain,blobVersionedHashes:T,blobs:I,data:M,gas:k,gasPrice:A,maxFeePerBlobGas:p,maxFeePerGas:R,maxPriorityFeePerGas:S,nonce:n,nonceManager:u,to:v,type:C,value:E,..._}=a,H=await(async()=>{if(!s||!u||typeof n<"u")return n;const o=y.parseAccount(s),x=t?t.id:await h.getAction(r,J.getChainId,"getChainId")({});return await u.consume({address:o.address,chainId:x,client:r})})();$.assertRequest(a);const f=(g=(P=t==null?void 0:t.formatters)==null?void 0:P.transactionRequest)==null?void 0:g.format,l=(f||V.formatTransactionRequest)({...N.extract(_,{format:f}),account:s?y.parseAccount(s):void 0,accessList:w,authorizationList:B,blobs:I,blobVersionedHashes:T,data:M,gas:k,gasPrice:A,maxFeePerBlobGas:p,maxFeePerGas:R,maxPriorityFeePerGas:S,nonce:H,to:v,type:C,value:E},"fillTransaction");try{const o=await r.request({method:"eth_fillTransaction",params:[l]}),e=(((d=(m=t==null?void 0:t.formatters)==null?void 0:m.transaction)==null?void 0:d.format)||O.formatTransaction)(o.tx);delete e.blockHash,delete e.blockNumber,delete e.r,delete e.s,delete e.transactionIndex,delete e.v,delete e.yParity,e.data=e.input,e.gas&&(e.gas=a.gas??e.gas),e.gasPrice&&(e.gasPrice=a.gasPrice??e.gasPrice),e.maxFeePerBlobGas&&(e.maxFeePerBlobGas=a.maxFeePerBlobGas??e.maxFeePerBlobGas),e.maxFeePerGas&&(e.maxFeePerGas=a.maxFeePerGas??e.maxFeePerGas),e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=a.maxPriorityFeePerGas??e.maxPriorityFeePerGas),e.nonce&&(e.nonce=a.nonce??e.nonce);const c=await(async()=>{var i,q;if(typeof((i=t==null?void 0:t.fees)==null?void 0:i.baseFeeMultiplier)=="function"){const L=await h.getAction(r,D.getBlock,"getBlock")({});return t.fees.baseFeeMultiplier({block:L,client:r,request:a})}return((q=t==null?void 0:t.fees)==null?void 0:q.baseFeeMultiplier)??1.2})();if(c<1)throw new j.BaseFeeScalarError;const G=10**(((F=c.toString().split(".")[1])==null?void 0:F.length)??0),b=i=>i*BigInt(Math.ceil(c*G))/BigInt(G);return e.maxFeePerGas&&!a.maxFeePerGas&&(e.maxFeePerGas=b(e.maxFeePerGas)),e.gasPrice&&!a.gasPrice&&(e.gasPrice=b(e.gasPrice)),{raw:o.raw,transaction:{from:l.from,...e}}}catch(o){throw z.getTransactionError(o,{...a,chain:r.chain})}}exports.fillTransaction=K;
package/dist/index140.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { parseAccount as p } from "./index123.js";
2
2
  import { BaseFeeScalarError as z } from "./index204.js";
3
- import { getTransactionError as N } from "./index331.js";
3
+ import { getTransactionError as N } from "./index329.js";
4
4
  import { extract as V } from "./index271.js";
5
5
  import { formatTransaction as j } from "./index73.js";
6
6
  import { formatTransactionRequest as D } from "./index108.js";
package/dist/index148.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index337.cjs"),d=require("./index101.cjs"),f=require("./index105.cjs");async function g(a,i){const{address:n,factory:r,factoryData:o}=i;try{const[e,t,c,s,u,m,y]=await d.getAction(a,f.readContract,"readContract")({abi:l,address:n,functionName:"eip712Domain",factory:r,factoryData:o});return{domain:{name:t,version:c,chainId:Number(s),verifyingContract:u,salt:m},extensions:y,fields:e}}catch(e){const t=e;throw t.name==="ContractFunctionExecutionError"&&t.cause.name==="ContractFunctionZeroDataError"?new p.Eip712DomainNotFoundError({address:n}):t}}const l=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];exports.getEip712Domain=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index330.cjs"),d=require("./index101.cjs"),f=require("./index105.cjs");async function g(a,i){const{address:n,factory:r,factoryData:o}=i;try{const[e,t,c,s,u,m,y]=await d.getAction(a,f.readContract,"readContract")({abi:l,address:n,functionName:"eip712Domain",factory:r,factoryData:o});return{domain:{name:t,version:c,chainId:Number(s),verifyingContract:u,salt:m},extensions:y,fields:e}}catch(e){const t=e;throw t.name==="ContractFunctionExecutionError"&&t.cause.name==="ContractFunctionZeroDataError"?new p.Eip712DomainNotFoundError({address:n}):t}}const l=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];exports.getEip712Domain=g;
package/dist/index148.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Eip712DomainNotFoundError as u } from "./index337.js";
1
+ import { Eip712DomainNotFoundError as u } from "./index330.js";
2
2
  import { getAction as d } from "./index101.js";
3
3
  import { readContract as f } from "./index105.js";
4
4
  async function E(a, o) {
package/dist/index149.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index81.cjs"),a=require("./index338.cjs");async function y(r,{blockCount:i,blockNumber:e,blockTag:n="latest",rewardPercentiles:s}){const t=typeof e=="bigint"?o.numberToHex(e):void 0,u=await r.request({method:"eth_feeHistory",params:[o.numberToHex(i),t||n,s]},{dedupe:!!t});return a.formatFeeHistory(u)}exports.getFeeHistory=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index81.cjs"),a=require("./index331.cjs");async function y(r,{blockCount:i,blockNumber:e,blockTag:n="latest",rewardPercentiles:s}){const t=typeof e=="bigint"?o.numberToHex(e):void 0,u=await r.request({method:"eth_feeHistory",params:[o.numberToHex(i),t||n,s]},{dedupe:!!t});return a.formatFeeHistory(u)}exports.getFeeHistory=y;
package/dist/index149.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { numberToHex as o } from "./index81.js";
2
- import { formatFeeHistory as f } from "./index338.js";
2
+ import { formatFeeHistory as f } from "./index331.js";
3
3
  async function u(r, { blockCount: i, blockNumber: e, blockTag: n = "latest", rewardPercentiles: s }) {
4
4
  const t = typeof e == "bigint" ? o(e) : void 0, a = await r.request({
5
5
  method: "eth_feeHistory",
package/dist/index154.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index81.cjs"),u=require("./index339.cjs");async function i(o,{address:t,blockNumber:e,blockTag:r,storageKeys:n}){const a=r??"latest",c=e!==void 0?s.numberToHex(e):void 0,f=await o.request({method:"eth_getProof",params:[t,n,c||a]});return u.formatProof(f)}exports.getProof=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index81.cjs"),u=require("./index332.cjs");async function i(o,{address:t,blockNumber:e,blockTag:r,storageKeys:n}){const a=r??"latest",c=e!==void 0?s.numberToHex(e):void 0,f=await o.request({method:"eth_getProof",params:[t,n,c||a]});return u.formatProof(f)}exports.getProof=i;
package/dist/index154.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { numberToHex as c } from "./index81.js";
2
- import { formatProof as s } from "./index339.js";
2
+ import { formatProof as s } from "./index332.js";
3
3
  async function d(t, { address: e, blockNumber: o, blockTag: r, storageKeys: n }) {
4
4
  const f = r ?? "latest", a = o !== void 0 ? c(o) : void 0, m = await t.request({
5
5
  method: "eth_getProof",