@gardenfi/swap 0.1.2 → 0.1.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (360) hide show
  1. package/dist/index104.cjs +1 -1
  2. package/dist/index104.js +4 -4
  3. package/dist/index106.cjs +1 -1
  4. package/dist/index106.js +1 -1
  5. package/dist/index107.cjs +1 -1
  6. package/dist/index107.js +1 -1
  7. package/dist/index108.cjs +1 -1
  8. package/dist/index108.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/index120.cjs +1 -1
  14. package/dist/index120.js +2 -2
  15. package/dist/index121.cjs +1 -1
  16. package/dist/index121.js +8 -8
  17. package/dist/index126.cjs +1 -1
  18. package/dist/index126.js +4 -4
  19. package/dist/index128.cjs +1 -1
  20. package/dist/index128.js +2 -2
  21. package/dist/index129.cjs +1 -1
  22. package/dist/index129.js +2 -2
  23. package/dist/index130.cjs +1 -1
  24. package/dist/index130.js +3 -3
  25. package/dist/index131.cjs +1 -1
  26. package/dist/index131.js +1 -1
  27. package/dist/index132.cjs +1 -1
  28. package/dist/index132.js +1 -1
  29. package/dist/index133.cjs +1 -1
  30. package/dist/index133.js +2 -2
  31. package/dist/index134.cjs +1 -1
  32. package/dist/index134.js +2 -2
  33. package/dist/index135.cjs +1 -1
  34. package/dist/index135.js +1 -1
  35. package/dist/index138.cjs +1 -1
  36. package/dist/index138.js +1 -1
  37. package/dist/index141.cjs +1 -1
  38. package/dist/index141.js +1 -1
  39. package/dist/index143.cjs +1 -1
  40. package/dist/index143.js +1 -1
  41. package/dist/index145.cjs +1 -1
  42. package/dist/index145.js +1 -1
  43. package/dist/index149.cjs +1 -1
  44. package/dist/index149.js +1 -1
  45. package/dist/index150.cjs +1 -1
  46. package/dist/index150.js +1 -1
  47. package/dist/index151.cjs +1 -1
  48. package/dist/index151.js +1 -1
  49. package/dist/index153.cjs +1 -1
  50. package/dist/index153.js +2 -2
  51. package/dist/index154.cjs +1 -1
  52. package/dist/index154.js +1 -1
  53. package/dist/index155.cjs +1 -1
  54. package/dist/index155.js +1 -1
  55. package/dist/index156.cjs +1 -1
  56. package/dist/index156.js +1 -1
  57. package/dist/index158.cjs +1 -1
  58. package/dist/index158.js +1 -1
  59. package/dist/index160.cjs +1 -1
  60. package/dist/index160.js +2 -2
  61. package/dist/index161.cjs +1 -1
  62. package/dist/index161.js +3 -3
  63. package/dist/index167.cjs +1 -1
  64. package/dist/index167.js +2 -2
  65. package/dist/index168.cjs +1 -1
  66. package/dist/index168.js +2 -2
  67. package/dist/index169.cjs +1 -1
  68. package/dist/index169.js +2 -2
  69. package/dist/index170.cjs +1 -1
  70. package/dist/index170.js +3 -3
  71. package/dist/index171.cjs +1 -1
  72. package/dist/index171.js +3 -3
  73. package/dist/index172.cjs +1 -1
  74. package/dist/index172.js +2 -2
  75. package/dist/index176.cjs +1 -1
  76. package/dist/index176.js +1 -1
  77. package/dist/index178.cjs +1 -1
  78. package/dist/index178.js +1 -1
  79. package/dist/index18.cjs +1 -1
  80. package/dist/index18.js +3 -3
  81. package/dist/index181.cjs +1 -1
  82. package/dist/index181.js +1 -1
  83. package/dist/index187.cjs +1 -1
  84. package/dist/index187.js +1 -1
  85. package/dist/index19.cjs +1 -1
  86. package/dist/index19.js +15 -15
  87. package/dist/index195.cjs +1 -1
  88. package/dist/index195.js +1 -1
  89. package/dist/index20.cjs +1 -1
  90. package/dist/index20.js +2 -2
  91. package/dist/index21.cjs +1 -1
  92. package/dist/index21.js +4 -4
  93. package/dist/index210.cjs +1 -1
  94. package/dist/index210.js +3 -3
  95. package/dist/index212.cjs +1 -1
  96. package/dist/index212.js +1 -1
  97. package/dist/index213.cjs +1 -1
  98. package/dist/index213.js +3 -3
  99. package/dist/index214.cjs +1 -1
  100. package/dist/index214.js +1 -1
  101. package/dist/index215.cjs +1 -1
  102. package/dist/index215.js +6 -6
  103. package/dist/index217.cjs +1 -1
  104. package/dist/index217.js +1 -1
  105. package/dist/index224.cjs +1 -1
  106. package/dist/index224.js +1 -1
  107. package/dist/index226.cjs +1 -1
  108. package/dist/index226.js +1 -1
  109. package/dist/index231.cjs +1 -1
  110. package/dist/index231.js +1 -1
  111. package/dist/index232.cjs +1 -1
  112. package/dist/index232.js +1 -1
  113. package/dist/index234.cjs +1 -1
  114. package/dist/index234.js +1 -1
  115. package/dist/index237.cjs +1 -1
  116. package/dist/index237.js +2 -2
  117. package/dist/index24.cjs +1 -1
  118. package/dist/index24.js +2 -2
  119. package/dist/index240.cjs +1 -1
  120. package/dist/index240.js +1 -1
  121. package/dist/index242.cjs +1 -1
  122. package/dist/index242.js +1 -1
  123. package/dist/index243.cjs +1 -1
  124. package/dist/index243.js +1 -1
  125. package/dist/index245.cjs +1 -1
  126. package/dist/index245.js +2 -2
  127. package/dist/index255.cjs +1 -1
  128. package/dist/index255.js +3 -3
  129. package/dist/index256.cjs +1 -1
  130. package/dist/index256.js +2 -2
  131. package/dist/index257.cjs +1 -1
  132. package/dist/index257.js +4 -4
  133. package/dist/index259.cjs +1 -1
  134. package/dist/index259.js +2 -2
  135. package/dist/index261.cjs +1 -1
  136. package/dist/index261.js +2 -2
  137. package/dist/index262.cjs +1 -1
  138. package/dist/index262.js +4 -4
  139. package/dist/index265.cjs +1 -1
  140. package/dist/index265.js +2 -2
  141. package/dist/index266.cjs +1 -1
  142. package/dist/index266.js +2 -2
  143. package/dist/index275.cjs +1 -1
  144. package/dist/index275.js +3 -3
  145. package/dist/index278.cjs +1 -1
  146. package/dist/index278.js +1 -1
  147. package/dist/index29.cjs +1 -1
  148. package/dist/index29.js +1 -1
  149. package/dist/index299.cjs +1 -1
  150. package/dist/index299.js +41 -36
  151. package/dist/index30.cjs +1 -1
  152. package/dist/index30.js +2 -2
  153. package/dist/index300.cjs +1 -1
  154. package/dist/index300.js +320 -15
  155. package/dist/index301.cjs +1 -1
  156. package/dist/index301.js +604 -7
  157. package/dist/index302.cjs +1 -1
  158. package/dist/index302.js +110 -8
  159. package/dist/index303.cjs +1 -1
  160. package/dist/index303.js +167 -42
  161. package/dist/index304.cjs +1 -1
  162. package/dist/index304.js +291 -310
  163. package/dist/index305.cjs +1 -1
  164. package/dist/index305.js +94 -606
  165. package/dist/index306.cjs +1 -1
  166. package/dist/index306.js +44 -97
  167. package/dist/index307.cjs +1 -1
  168. package/dist/index307.js +52 -166
  169. package/dist/index308.cjs +1 -1
  170. package/dist/index308.js +41 -298
  171. package/dist/index309.cjs +1 -1
  172. package/dist/index309.js +15 -93
  173. package/dist/index310.cjs +1 -1
  174. package/dist/index310.js +310 -49
  175. package/dist/index311.cjs +1 -1
  176. package/dist/index311.js +57 -51
  177. package/dist/index312.cjs +1 -1
  178. package/dist/index312.js +18 -43
  179. package/dist/index313.cjs +1 -1
  180. package/dist/index313.js +28 -14
  181. package/dist/index314.cjs +1 -1
  182. package/dist/index314.js +3 -317
  183. package/dist/index315.cjs +7 -1
  184. package/dist/index315.js +232 -54
  185. package/dist/index316.cjs +1 -1
  186. package/dist/index316.js +47 -19
  187. package/dist/index317.cjs +1 -1
  188. package/dist/index317.js +208 -25
  189. package/dist/index318.cjs +1 -1
  190. package/dist/index318.js +81 -3
  191. package/dist/index319.cjs +1 -7
  192. package/dist/index319.js +27 -235
  193. package/dist/index320.cjs +1 -1
  194. package/dist/index320.js +77 -48
  195. package/dist/index321.cjs +1 -1
  196. package/dist/index321.js +34 -209
  197. package/dist/index322.cjs +1 -1
  198. package/dist/index322.js +14 -80
  199. package/dist/index323.cjs +1 -1
  200. package/dist/index323.js +8 -29
  201. package/dist/index324.cjs +1 -1
  202. package/dist/index324.js +7 -76
  203. package/dist/index326.cjs +1 -1
  204. package/dist/index326.js +1 -1
  205. package/dist/index327.cjs +1 -1
  206. package/dist/index327.js +1 -1
  207. package/dist/index333.cjs +1 -1
  208. package/dist/index333.js +1 -1
  209. package/dist/index334.cjs +1 -1
  210. package/dist/index334.js +1 -1
  211. package/dist/index336.cjs +1 -1
  212. package/dist/index336.js +1 -1
  213. package/dist/index349.cjs +2 -1
  214. package/dist/index349.js +193 -4
  215. package/dist/index350.cjs +1 -2
  216. package/dist/index350.js +52 -168
  217. package/dist/index351.cjs +1 -1
  218. package/dist/index351.js +331 -65
  219. package/dist/index352.cjs +1 -1
  220. package/dist/index352.js +149 -332
  221. package/dist/index353.cjs +1 -1
  222. package/dist/index353.js +5 -161
  223. package/dist/index354.cjs +1 -1
  224. package/dist/index354.js +5 -5
  225. package/dist/index356.cjs +1 -1
  226. package/dist/index356.js +3 -3
  227. package/dist/index363.cjs +1 -1
  228. package/dist/index363.js +1 -1
  229. package/dist/index364.cjs +1 -1
  230. package/dist/index364.js +1 -1
  231. package/dist/index365.cjs +1 -1
  232. package/dist/index365.js +1 -1
  233. package/dist/index366.cjs +1 -1
  234. package/dist/index366.js +1 -1
  235. package/dist/index368.cjs +1 -1
  236. package/dist/index368.js +275 -3
  237. package/dist/index369.cjs +1 -1
  238. package/dist/index369.js +170 -140
  239. package/dist/index370.cjs +1 -1
  240. package/dist/index370.js +10 -276
  241. package/dist/index371.cjs +1 -1
  242. package/dist/index371.js +107 -170
  243. package/dist/index372.cjs +1 -1
  244. package/dist/index372.js +10 -10
  245. package/dist/index373.cjs +1 -1
  246. package/dist/index373.js +3 -107
  247. package/dist/index374.cjs +1 -1
  248. package/dist/index374.js +140 -9
  249. package/dist/index381.cjs +1 -1
  250. package/dist/index381.js +22 -2
  251. package/dist/index382.cjs +1 -1
  252. package/dist/index382.js +2 -22
  253. package/dist/index385.cjs +1 -1
  254. package/dist/index385.js +1 -1
  255. package/dist/index39.cjs +1 -1
  256. package/dist/index39.js +24 -83
  257. package/dist/index40.cjs +1 -1
  258. package/dist/index40.js +15 -11
  259. package/dist/index41.cjs +1 -1
  260. package/dist/index41.js +103 -24
  261. package/dist/index42.cjs +1 -1
  262. package/dist/index42.js +12 -18
  263. package/dist/index43.cjs +1 -1
  264. package/dist/index43.js +58 -107
  265. package/dist/index44.cjs +1 -1
  266. package/dist/index44.js +522 -12
  267. package/dist/index45.cjs +1 -1
  268. package/dist/index45.js +30 -59
  269. package/dist/index46.cjs +1 -1
  270. package/dist/index46.js +26 -522
  271. package/dist/index47.cjs +1 -1
  272. package/dist/index47.js +12 -16
  273. package/dist/index48.cjs +1 -1
  274. package/dist/index48.js +34 -11
  275. package/dist/index49.cjs +1 -1
  276. package/dist/index49.js +16 -14
  277. package/dist/index50.cjs +1 -1
  278. package/dist/index50.js +16 -37
  279. package/dist/index51.cjs +1 -1
  280. package/dist/index51.js +17 -14
  281. package/dist/index52.cjs +1 -1
  282. package/dist/index52.js +19 -17
  283. package/dist/index53.cjs +1 -1
  284. package/dist/index53.js +42 -17
  285. package/dist/index54.cjs +1 -1
  286. package/dist/index54.js +39 -15
  287. package/dist/index55.cjs +1 -1
  288. package/dist/index55.js +29 -49
  289. package/dist/index56.cjs +1 -1
  290. package/dist/index56.js +29 -46
  291. package/dist/index57.cjs +1 -1
  292. package/dist/index57.js +19 -25
  293. package/dist/index58.cjs +1 -1
  294. package/dist/index58.js +18 -27
  295. package/dist/index59.cjs +1 -1
  296. package/dist/index59.js +14 -16
  297. package/dist/index60.cjs +1 -1
  298. package/dist/index60.js +15 -28
  299. package/dist/index61.cjs +1 -1
  300. package/dist/index61.js +14 -28
  301. package/dist/index62.cjs +1 -1
  302. package/dist/index62.js +86 -13
  303. package/dist/index63.cjs +1 -1
  304. package/dist/index63.js +13 -13
  305. package/dist/index70.cjs +1 -1
  306. package/dist/index70.js +6 -6
  307. package/dist/index71.cjs +1 -1
  308. package/dist/index71.js +3 -3
  309. package/dist/index72.cjs +1 -1
  310. package/dist/index72.js +1 -1
  311. package/dist/index73.cjs +1 -1
  312. package/dist/index73.js +1 -1
  313. package/dist/index74.cjs +1 -1
  314. package/dist/index74.js +2 -2
  315. package/dist/index75.cjs +1 -1
  316. package/dist/index75.js +728 -20
  317. package/dist/index76.cjs +1 -1
  318. package/dist/index76.js +482 -688
  319. package/dist/index77.cjs +1 -1
  320. package/dist/index77.js +18 -520
  321. package/dist/index78.cjs +1 -1
  322. package/dist/index78.js +19 -11
  323. package/dist/index79.cjs +1 -1
  324. package/dist/index79.js +30 -11
  325. package/dist/index80.cjs +1 -1
  326. package/dist/index80.js +24 -16
  327. package/dist/index81.cjs +1 -1
  328. package/dist/index81.js +4 -45
  329. package/dist/index82.cjs +1 -1
  330. package/dist/index82.js +6 -42
  331. package/dist/index83.cjs +1 -1
  332. package/dist/index83.js +16 -171
  333. package/dist/index84.cjs +1 -1
  334. package/dist/index84.js +12 -20
  335. package/dist/index85.cjs +1 -1
  336. package/dist/index85.js +8 -26
  337. package/dist/index86.cjs +1 -1
  338. package/dist/index86.js +11 -26
  339. package/dist/index87.cjs +1 -1
  340. package/dist/index87.js +17 -3
  341. package/dist/index88.cjs +1 -1
  342. package/dist/index88.js +45 -6
  343. package/dist/index89.cjs +1 -1
  344. package/dist/index89.js +42 -16
  345. package/dist/index90.cjs +1 -1
  346. package/dist/index90.js +171 -12
  347. package/dist/index91.cjs +1 -1
  348. package/dist/index91.js +1 -1
  349. package/dist/index92.cjs +1 -1
  350. package/dist/index92.js +3 -3
  351. package/dist/index95.cjs +1 -1
  352. package/dist/index95.js +1 -1
  353. package/dist/index96.cjs +1 -1
  354. package/dist/index96.js +1 -1
  355. package/dist/index97.cjs +1 -1
  356. package/dist/index97.js +2 -2
  357. package/dist/index98.cjs +1 -1
  358. package/dist/index98.js +2 -2
  359. package/dist/src/lib/store/swapStore.d.ts +1 -1
  360. package/package.json +4 -4
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("./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;
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("./index79.cjs"),L=require("./index94.cjs"),te=require("./index221.cjs"),$=require("./index95.cjs"),ae=require("./index96.cjs"),re=require("./index78.cjs"),G=require("./index88.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,16 +1,16 @@
1
1
  import { toRpc as Q } from "./index273.js";
2
2
  import { parseAccount as U } from "./index123.js";
3
- import { multicall3Abi as z } from "./index46.js";
3
+ import { multicall3Abi as z } from "./index44.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";
7
- import { ClientChainNotConfiguredError as H, ChainDoesNotSupportContract as at } from "./index85.js";
7
+ import { ClientChainNotConfiguredError as H, ChainDoesNotSupportContract as at } from "./index79.js";
8
8
  import { CounterfactualDeploymentFailedError as et, RawContractError as ot } from "./index94.js";
9
9
  import { decodeFunctionResult as rt } from "./index221.js";
10
10
  import { encodeDeployData as L } from "./index95.js";
11
11
  import { encodeFunctionData as ct } from "./index96.js";
12
- import { getChainContractAddress as nt } from "./index84.js";
13
- import { numberToHex as j } from "./index81.js";
12
+ import { getChainContractAddress as nt } from "./index78.js";
13
+ import { numberToHex as j } from "./index88.js";
14
14
  import { getCallError as st } from "./index269.js";
15
15
  import { extract as it } from "./index271.js";
16
16
  import { formatTransactionRequest as lt } from "./index108.js";
package/dist/index106.cjs CHANGED
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index349.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,4 +1,4 @@
1
- import { decode as c, from as f } from "./index350.js";
1
+ import { decode as c, from as f } from "./index349.js";
2
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";
package/dist/index107.cjs CHANGED
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index349.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 "./index350.js";
1
+ import { encode as i, from as o } from "./index349.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/index108.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index81.cjs"),i={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function a(e,f){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=y(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(d=>o.bytesToHex(d)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=o.numberToHex(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=o.numberToHex(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=o.numberToHex(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=o.numberToHex(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=o.numberToHex(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=o.numberToHex(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=i[e.type]),typeof e.value<"u"&&(n.value=o.numberToHex(e.value)),n}function y(e){return e.map(f=>({address:f.address,r:f.r?o.numberToHex(BigInt(f.r)):f.r,s:f.s?o.numberToHex(BigInt(f.s)):f.s,chainId:o.numberToHex(f.chainId),nonce:o.numberToHex(f.nonce),...typeof f.yParity<"u"?{yParity:o.numberToHex(f.yParity)}:{},...typeof f.v<"u"&&typeof f.yParity>"u"?{v:o.numberToHex(f.v)}:{}}))}exports.formatTransactionRequest=a;exports.rpcTransactionType=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index88.cjs"),i={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function a(e,f){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=y(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(d=>o.bytesToHex(d)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=o.numberToHex(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=o.numberToHex(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=o.numberToHex(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=o.numberToHex(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=o.numberToHex(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=o.numberToHex(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=i[e.type]),typeof e.value<"u"&&(n.value=o.numberToHex(e.value)),n}function y(e){return e.map(f=>({address:f.address,r:f.r?o.numberToHex(BigInt(f.r)):f.r,s:f.s?o.numberToHex(BigInt(f.s)):f.s,chainId:o.numberToHex(f.chainId),nonce:o.numberToHex(f.nonce),...typeof f.yParity<"u"?{yParity:o.numberToHex(f.yParity)}:{},...typeof f.v<"u"&&typeof f.yParity>"u"?{v:o.numberToHex(f.v)}:{}}))}exports.formatTransactionRequest=a;exports.rpcTransactionType=i;
package/dist/index108.js CHANGED
@@ -1,4 +1,4 @@
1
- import { bytesToHex as o, numberToHex as i } from "./index81.js";
1
+ import { bytesToHex as o, numberToHex as i } from "./index88.js";
2
2
  const a = {
3
3
  legacy: "0x0",
4
4
  eip2930: "0x1",
package/dist/index116.cjs CHANGED
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index299.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 "./index303.js";
1
+ import { ClientCache as c } from "./index299.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("./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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index113.cjs"),S=require("./index313.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 "./index317.js";
2
+ import { splitGenericParameters as l } from "./index313.js";
3
3
  import { isValidNamedPackage as m } from "./index119.js";
4
4
  const g = 32;
5
5
  function b(t) {
package/dist/index120.cjs CHANGED
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./index314.cjs"),L=require("./index315.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 "./index318.js";
2
- import { DataLoader as L } from "./index319.js";
1
+ import { chunk as D } from "./index314.js";
2
+ import { DataLoader as L } from "./index315.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("./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=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index114.cjs"),x=require("./index314.cjs"),p=require("./index316.cjs"),I=require("./index76.cjs"),P=require("./index317.cjs"),E=require("./index310.cjs"),k=require("./index117.cjs"),N=require("./index318.cjs"),f=require("./index319.cjs"),h=require("./index320.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 "./index318.js";
3
- import { bcs as p } from "./index320.js";
4
- import { Transaction as C } from "./index77.js";
5
- import { jsonRpcClientResolveTransactionPlugin as I } from "./index321.js";
6
- import { TransactionDataBuilder as P } from "./index314.js";
2
+ import { chunk as x } from "./index314.js";
3
+ import { bcs as p } from "./index316.js";
4
+ import { Transaction as C } from "./index76.js";
5
+ import { jsonRpcClientResolveTransactionPlugin as I } from "./index317.js";
6
+ import { TransactionDataBuilder as P } from "./index310.js";
7
7
  import { normalizeSuiAddress as k } from "./index117.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";
8
+ import { Experimental_CoreClient as E } from "./index318.js";
9
+ import { ObjectError as y } from "./index319.js";
10
+ import { parseTransactionBcs as N, parseTransactionEffectsBcs as A } from "./index320.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("./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;
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("./index78.cjs"),y=require("./index82.cjs"),C=require("./index88.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,9 +1,9 @@
1
- import { addressResolverAbi as u, universalResolverResolveAbi as R } from "./index46.js";
1
+ import { addressResolverAbi as u, universalResolverResolveAbi as R } from "./index44.js";
2
2
  import { decodeFunctionResult as g } from "./index221.js";
3
3
  import { encodeFunctionData as b } from "./index96.js";
4
- import { getChainContractAddress as w } from "./index84.js";
5
- import { trim as y } from "./index88.js";
6
- import { toHex as C } from "./index81.js";
4
+ import { getChainContractAddress as w } from "./index78.js";
5
+ import { trim as y } from "./index82.js";
6
+ import { toHex as C } from "./index88.js";
7
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";
package/dist/index128.cjs CHANGED
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index44.cjs"),h=require("./index78.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,5 +1,5 @@
1
- import { universalResolverReverseAbi as m } from "./index46.js";
2
- import { getChainContractAddress as f } from "./index84.js";
1
+ import { universalResolverReverseAbi as m } from "./index44.js";
2
+ import { getChainContractAddress as f } from "./index78.js";
3
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";
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("./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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index78.cjs"),l=require("./index88.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,5 +1,5 @@
1
- import { getChainContractAddress as l } from "./index84.js";
2
- import { toHex as u } from "./index81.js";
1
+ import { getChainContractAddress as l } from "./index78.js";
2
+ import { toHex as u } from "./index88.js";
3
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";
package/dist/index130.cjs CHANGED
@@ -1 +1 @@
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;
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("./index78.cjs"),b=require("./index88.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,8 +1,8 @@
1
- import { textResolverAbi as l, universalResolverResolveAbi as p } from "./index46.js";
1
+ import { textResolverAbi as l, universalResolverResolveAbi as p } from "./index44.js";
2
2
  import { decodeFunctionResult as h } from "./index221.js";
3
3
  import { encodeFunctionData as A } from "./index96.js";
4
- import { getChainContractAddress as R } from "./index84.js";
5
- import { toHex as b } from "./index81.js";
4
+ import { getChainContractAddress as R } from "./index78.js";
5
+ import { toHex as b } from "./index88.js";
6
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";
package/dist/index131.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./index123.cjs"),R=require("./index81.cjs"),F=require("./index269.cjs"),H=require("./index271.cjs"),T=require("./index108.cjs"),G=require("./index261.cjs");async function N(e,t){var a,o,n;const{account:s=e.account,blockNumber:r,blockTag:b="latest",blobs:l,data:q,gas:f,gasPrice:d,maxFeePerBlobGas:g,maxFeePerGas:x,maxPriorityFeePerGas:h,to:p,value:y,...A}=t,c=s?k.parseAccount(s):void 0;try{G.assertRequest(t);const L=(typeof r=="bigint"?R.numberToHex(r):void 0)||b,i=(n=(o=(a=e.chain)==null?void 0:a.formatters)==null?void 0:o.transactionRequest)==null?void 0:n.format,P=(i||T.formatTransactionRequest)({...H.extract(A,{format:i}),account:c,blobs:l,data:q,gas:f,gasPrice:d,maxFeePerBlobGas:g,maxFeePerGas:x,maxPriorityFeePerGas:h,to:p,value:y},"createAccessList"),m=await e.request({method:"eth_createAccessList",params:[P,L]});return{accessList:m.accessList,gasUsed:BigInt(m.gasUsed)}}catch(u){throw F.getCallError(u,{...t,account:c,chain:e.chain})}}exports.createAccessList=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./index123.cjs"),R=require("./index88.cjs"),F=require("./index269.cjs"),H=require("./index271.cjs"),T=require("./index108.cjs"),G=require("./index261.cjs");async function N(e,t){var a,o,n;const{account:s=e.account,blockNumber:r,blockTag:b="latest",blobs:l,data:q,gas:f,gasPrice:d,maxFeePerBlobGas:g,maxFeePerGas:x,maxPriorityFeePerGas:h,to:p,value:y,...A}=t,c=s?k.parseAccount(s):void 0;try{G.assertRequest(t);const L=(typeof r=="bigint"?R.numberToHex(r):void 0)||b,i=(n=(o=(a=e.chain)==null?void 0:a.formatters)==null?void 0:o.transactionRequest)==null?void 0:n.format,P=(i||T.formatTransactionRequest)({...H.extract(A,{format:i}),account:c,blobs:l,data:q,gas:f,gasPrice:d,maxFeePerBlobGas:g,maxFeePerGas:x,maxPriorityFeePerGas:h,to:p,value:y},"createAccessList"),m=await e.request({method:"eth_createAccessList",params:[P,L]});return{accessList:m.accessList,gasUsed:BigInt(m.gasUsed)}}catch(u){throw F.getCallError(u,{...t,account:c,chain:e.chain})}}exports.createAccessList=N;
package/dist/index131.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { parseAccount as A } from "./index123.js";
2
- import { numberToHex as F } from "./index81.js";
2
+ import { numberToHex as F } from "./index88.js";
3
3
  import { getCallError as G } from "./index269.js";
4
4
  import { extract as H } from "./index271.js";
5
5
  import { formatTransactionRequest as N } from "./index108.js";
package/dist/index132.cjs CHANGED
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index324.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 "./index302.js";
1
+ import { createFilterRequestScope as r } from "./index324.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("./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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index225.cjs"),s=require("./index88.cjs"),q=require("./index324.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
- import { numberToHex as s } from "./index81.js";
3
- import { createFilterRequestScope as u } from "./index302.js";
2
+ import { numberToHex as s } from "./index88.js";
3
+ import { createFilterRequestScope as u } from "./index324.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("./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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index225.cjs"),u=require("./index88.cjs"),q=require("./index324.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
- import { numberToHex as m } from "./index81.js";
3
- import { createFilterRequestScope as h } from "./index302.js";
2
+ import { numberToHex as m } from "./index88.js";
3
+ import { createFilterRequestScope as h } from "./index324.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("./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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index324.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 "./index302.js";
1
+ import { createFilterRequestScope as r } from "./index324.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("./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;
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("./index88.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
@@ -1,7 +1,7 @@
1
1
  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
- import { numberToHex as E } from "./index81.js";
4
+ import { numberToHex as E } from "./index88.js";
5
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";
package/dist/index141.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index81.cjs");async function i(e,{address:a,blockNumber:t,blockTag:n=e.experimental_blockTag??"latest"}){const o=typeof t=="bigint"?c.numberToHex(t):void 0,r=await e.request({method:"eth_getBalance",params:[a,o||n]});return BigInt(r)}exports.getBalance=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index88.cjs");async function i(e,{address:a,blockNumber:t,blockTag:n=e.experimental_blockTag??"latest"}){const o=typeof t=="bigint"?c.numberToHex(t):void 0,r=await e.request({method:"eth_getBalance",params:[a,o||n]});return BigInt(r)}exports.getBalance=i;
package/dist/index141.js CHANGED
@@ -1,4 +1,4 @@
1
- import { numberToHex as c } from "./index81.js";
1
+ import { numberToHex as c } from "./index88.js";
2
2
  async function m(e, { address: a, blockNumber: t, blockTag: n = e.experimental_blockTag ?? "latest" }) {
3
3
  const o = typeof t == "bigint" ? c(t) : void 0, r = await e.request({
4
4
  method: "eth_getBalance",
package/dist/index143.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index191.cjs"),f=require("./index81.cjs"),m=require("./index72.cjs");async function B(e,{blockHash:o,blockNumber:r,blockTag:l=e.experimental_blockTag??"latest",includeTransactions:i}={}){var c,s,u;const n=i??!1,a=r!==void 0?f.numberToHex(r):void 0;let t=null;if(o?t=await e.request({method:"eth_getBlockByHash",params:[o,n]},{dedupe:!0}):t=await e.request({method:"eth_getBlockByNumber",params:[a||l,n]},{dedupe:!!a}),!t)throw new d.BlockNotFoundError({blockHash:o,blockNumber:r});return(((u=(s=(c=e.chain)==null?void 0:c.formatters)==null?void 0:s.block)==null?void 0:u.format)||m.formatBlock)(t,"getBlock")}exports.getBlock=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index191.cjs"),f=require("./index88.cjs"),m=require("./index72.cjs");async function B(e,{blockHash:o,blockNumber:r,blockTag:l=e.experimental_blockTag??"latest",includeTransactions:i}={}){var c,s,u;const n=i??!1,a=r!==void 0?f.numberToHex(r):void 0;let t=null;if(o?t=await e.request({method:"eth_getBlockByHash",params:[o,n]},{dedupe:!0}):t=await e.request({method:"eth_getBlockByNumber",params:[a||l,n]},{dedupe:!!a}),!t)throw new d.BlockNotFoundError({blockHash:o,blockNumber:r});return(((u=(s=(c=e.chain)==null?void 0:c.formatters)==null?void 0:s.block)==null?void 0:u.format)||m.formatBlock)(t,"getBlock")}exports.getBlock=B;
package/dist/index143.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { BlockNotFoundError as d } from "./index191.js";
2
- import { numberToHex as i } from "./index81.js";
2
+ import { numberToHex as i } from "./index88.js";
3
3
  import { formatBlock as l } from "./index72.js";
4
4
  async function h(e, { blockHash: t, blockNumber: r, blockTag: u = e.experimental_blockTag ?? "latest", includeTransactions: c } = {}) {
5
5
  var m, s, f;
package/dist/index145.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index71.cjs"),s=require("./index81.cjs");async function c(t,{blockHash:o,blockNumber:n,blockTag:u="latest"}={}){const r=n!==void 0?s.numberToHex(n):void 0;let e;return o?e=await t.request({method:"eth_getBlockTransactionCountByHash",params:[o]},{dedupe:!0}):e=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[r||u]},{dedupe:!!r}),a.hexToNumber(e)}exports.getBlockTransactionCount=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index71.cjs"),s=require("./index88.cjs");async function c(t,{blockHash:o,blockNumber:n,blockTag:u="latest"}={}){const r=n!==void 0?s.numberToHex(n):void 0;let e;return o?e=await t.request({method:"eth_getBlockTransactionCountByHash",params:[o]},{dedupe:!0}):e=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[r||u]},{dedupe:!!r}),a.hexToNumber(e)}exports.getBlockTransactionCount=c;
package/dist/index145.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { hexToNumber as u } from "./index71.js";
2
- import { numberToHex as m } from "./index81.js";
2
+ import { numberToHex as m } from "./index88.js";
3
3
  async function i(t, { blockHash: o, blockNumber: n, blockTag: a = "latest" } = {}) {
4
4
  const r = n !== void 0 ? m(n) : void 0;
5
5
  let e;
package/dist/index149.cjs CHANGED
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index88.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,4 +1,4 @@
1
- import { numberToHex as o } from "./index81.js";
1
+ import { numberToHex as o } from "./index88.js";
2
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({
package/dist/index150.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index229.cjs"),a=require("./index90.cjs");async function i(g,{filter:t}){const n="strict"in t&&t.strict,e=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof e[0]=="string")return e;const s=e.map(o=>a.formatLog(o));return!("abi"in t)||!t.abi?s:r.parseEventLogs({abi:t.abi,logs:s,strict:n})}exports.getFilterChanges=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index229.cjs"),a=require("./index84.cjs");async function i(g,{filter:t}){const n="strict"in t&&t.strict,e=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof e[0]=="string")return e;const s=e.map(o=>a.formatLog(o));return!("abi"in t)||!t.abi?s:r.parseEventLogs({abi:t.abi,logs:s,strict:n})}exports.getFilterChanges=i;
package/dist/index150.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { parseEventLogs as a } from "./index229.js";
2
- import { formatLog as i } from "./index90.js";
2
+ import { formatLog as i } from "./index84.js";
3
3
  async function m(e, { filter: t }) {
4
4
  const n = "strict" in t && t.strict, o = await t.request({
5
5
  method: "eth_getFilterChanges",
package/dist/index151.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index229.cjs"),a=require("./index90.cjs");async function g(n,{filter:t}){const o=t.strict??!1,e=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(s=>a.formatLog(s));return t.abi?r.parseEventLogs({abi:t.abi,logs:e,strict:o}):e}exports.getFilterLogs=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index229.cjs"),a=require("./index84.cjs");async function g(n,{filter:t}){const o=t.strict??!1,e=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(s=>a.formatLog(s));return t.abi?r.parseEventLogs({abi:t.abi,logs:e,strict:o}):e}exports.getFilterLogs=g;
package/dist/index151.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { parseEventLogs as a } from "./index229.js";
2
- import { formatLog as e } from "./index90.js";
2
+ import { formatLog as e } from "./index84.js";
3
3
  async function c(g, { filter: t }) {
4
4
  const s = t.strict ?? !1, o = (await t.request({
5
5
  method: "eth_getFilterLogs",
package/dist/index153.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index225.cjs"),q=require("./index229.cjs"),m=require("./index81.cjs"),y=require("./index90.cjs");async function T(i,{address:a,blockHash:g,fromBlock:o,toBlock:s,event:n,events:c,args:u,strict:L}={}){const b=L??!1,t=c??(n?[n]:void 0);let e=[];t&&(e=[t.flatMap(p=>l.encodeEventTopics({abi:[p],eventName:p.name,args:c?void 0:u}))],n&&(e=e[0]));let r;g?r=await i.request({method:"eth_getLogs",params:[{address:a,topics:e,blockHash:g}]}):r=await i.request({method:"eth_getLogs",params:[{address:a,topics:e,fromBlock:typeof o=="bigint"?m.numberToHex(o):o,toBlock:typeof s=="bigint"?m.numberToHex(s):s}]});const d=r.map(f=>y.formatLog(f));return t?q.parseEventLogs({abi:t,args:u,logs:d,strict:b}):d}exports.getLogs=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index225.cjs"),q=require("./index229.cjs"),m=require("./index88.cjs"),y=require("./index84.cjs");async function T(i,{address:a,blockHash:g,fromBlock:o,toBlock:s,event:n,events:c,args:u,strict:L}={}){const b=L??!1,t=c??(n?[n]:void 0);let e=[];t&&(e=[t.flatMap(p=>l.encodeEventTopics({abi:[p],eventName:p.name,args:c?void 0:u}))],n&&(e=e[0]));let r;g?r=await i.request({method:"eth_getLogs",params:[{address:a,topics:e,blockHash:g}]}):r=await i.request({method:"eth_getLogs",params:[{address:a,topics:e,fromBlock:typeof o=="bigint"?m.numberToHex(o):o,toBlock:typeof s=="bigint"?m.numberToHex(s):s}]});const d=r.map(f=>y.formatLog(f));return t?q.parseEventLogs({abi:t,args:u,logs:d,strict:b}):d}exports.getLogs=T;
package/dist/index153.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { encodeEventTopics as h } from "./index225.js";
2
2
  import { parseEventLogs as l } from "./index229.js";
3
- import { numberToHex as u } from "./index81.js";
4
- import { formatLog as y } from "./index90.js";
3
+ import { numberToHex as u } from "./index88.js";
4
+ import { formatLog as y } from "./index84.js";
5
5
  async function T(n, { address: a, blockHash: m, fromBlock: o, toBlock: i, event: r, events: f, args: g, strict: L } = {}) {
6
6
  const b = L ?? !1, e = f ?? (r ? [r] : void 0);
7
7
  let t = [];
package/dist/index154.cjs CHANGED
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index88.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,4 +1,4 @@
1
- import { numberToHex as c } from "./index81.js";
1
+ import { numberToHex as c } from "./index88.js";
2
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({
package/dist/index155.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index81.cjs");async function d(t,{address:a,blockNumber:e,blockTag:n="latest",slot:o}){const r=e!==void 0?u.numberToHex(e):void 0;return await t.request({method:"eth_getStorageAt",params:[a,o,r||n]})}exports.getStorageAt=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index88.cjs");async function d(t,{address:a,blockNumber:e,blockTag:n="latest",slot:o}){const r=e!==void 0?u.numberToHex(e):void 0;return await t.request({method:"eth_getStorageAt",params:[a,o,r||n]})}exports.getStorageAt=d;
package/dist/index155.js CHANGED
@@ -1,4 +1,4 @@
1
- import { numberToHex as d } from "./index81.js";
1
+ import { numberToHex as d } from "./index88.js";
2
2
  async function i(e, { address: a, blockNumber: t, blockTag: n = "latest", slot: o }) {
3
3
  const r = t !== void 0 ? d(t) : void 0;
4
4
  return await e.request({