@dcl/governance-site 2.5.0 → 2.5.1-33082581209.commit-22bd878

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 (160) hide show
  1. package/assets/{ConstantsUtil-689989f0.js → ConstantsUtil-59b2cd86.js} +1 -1
  2. package/assets/{ExchangeController-88f78111.js → ExchangeController-fa484fd0.js} +1 -1
  3. package/assets/{HelpersUtil-40f31189.js → HelpersUtil-770828c8.js} +1 -1
  4. package/assets/{NetworkUtil-2fb81493.js → NetworkUtil-3fb1c3fe.js} +1 -1
  5. package/assets/{ReownAuthentication-e5d1d4cc.js → ReownAuthentication-f940c538.js} +1 -1
  6. package/assets/{SwapController-f47e6f17.js → SwapController-4c01709b.js} +1 -1
  7. package/assets/{UserAvatar-0c19fd64.js → UserAvatar-f3b95af9.js} +1 -1
  8. package/assets/{W3MFrameProviderSingleton-33e9645e.js → W3MFrameProviderSingleton-7fcb402e.js} +2 -2
  9. package/assets/{basic-509eb412.js → basic-8ed25007.js} +1 -1
  10. package/assets/{biconomy-6fa3eb98.js → biconomy-0556809e.js} +1 -1
  11. package/assets/{ccip-040f274b.js → ccip-57e7e084.js} +1 -1
  12. package/assets/{ccip-6d1e4a15.js → ccip-68ca0fd0.js} +1 -1
  13. package/assets/{chains-bae55e5f.js → chains-1a5f4ed2.js} +1 -1
  14. package/assets/{common-f2e88a7e.js → common-01677528.js} +1 -1
  15. package/assets/{compat-b432550d.js → compat-cd8c4091.js} +1 -1
  16. package/assets/{controller-83cf739b.js → controller-7e89d43c.js} +1 -1
  17. package/assets/{core-71a03396.js → core-622edb4b.js} +3 -3
  18. package/assets/{custom-7ae31f11.js → custom-6c3adaba.js} +1 -1
  19. package/assets/{data-capture-f1f485c2.js → data-capture-cba69814.js} +1 -1
  20. package/assets/{decimals-9d5fec14.js → decimals-87f73bc8.js} +1 -1
  21. package/assets/decimals-9f72f7a7.js +1 -0
  22. package/assets/{email-be31d86e.js → email-80e0bbfe.js} +1 -1
  23. package/assets/{embedded-wallet-41341ab4.js → embedded-wallet-a9db005f.js} +1 -1
  24. package/assets/{engine-8d2b111b.js → engine-d00cb92f.js} +1 -1
  25. package/assets/{estimate-l1-fee-8acb8860.js → estimate-l1-fee-b18b1add.js} +1 -1
  26. package/assets/eth_estimateGas-f72c796d.js +1 -0
  27. package/assets/{eth_getStorageAt-2d8a4700.js → eth_getStorageAt-94d435fd.js} +1 -1
  28. package/assets/{eth_getTransactionCount-273004ec.js → eth_getTransactionCount-f65a6014.js} +1 -1
  29. package/assets/{ethereum-667be7dc.js → ethereum-a70fe449.js} +1 -1
  30. package/assets/{execute-6c88dd5f.js → execute-cfc083c5.js} +1 -1
  31. package/assets/{extractIPFS-640303a3.js → extractIPFS-f36e345a.js} +1 -1
  32. package/assets/features-806a397a.js +1 -0
  33. package/assets/{fetchTokenMetadata-1e138f21.js → fetchTokenMetadata-a4be56d3.js} +1 -1
  34. package/assets/{fortmatic-d34f42c3.js → fortmatic-1337bcf5.js} +1 -1
  35. package/assets/{get-bytecode-8cb4e224.js → get-bytecode-a32ec435.js} +1 -1
  36. package/assets/{get-ecosystem-wallet-info-ec712acc.js → get-ecosystem-wallet-info-2915d4f0.js} +1 -1
  37. package/assets/{getBalance-0308f38f.js → getBalance-efeee2c5.js} +1 -1
  38. package/assets/{getInstalledModules-17fa1a09.js → getInstalledModules-00081c9b.js} +1 -1
  39. package/assets/{getNFT-30795fe1.js → getNFT-280473b8.js} +1 -1
  40. package/assets/{getNFT-06eb1406.js → getNFT-4e9b31bb.js} +1 -1
  41. package/assets/{hashBytecode-a29db705.js → hashBytecode-ffe0c51d.js} +1 -1
  42. package/assets/{hashTypedData-23a00dc9.js → hashTypedData-6a1d5c90.js} +1 -1
  43. package/assets/{hashTypedData-ba8e399b.js → hashTypedData-f2ac0c46.js} +1 -1
  44. package/assets/{in-app-9acc158b.js → in-app-bb81af0c.js} +1 -1
  45. package/assets/{in-app-wallet-calls-48ca2694.js → in-app-wallet-calls-f8da82cd.js} +1 -1
  46. package/assets/{index-d7bf28d3.js → index-05fb92b4.js} +1 -1
  47. package/assets/{index-9c119afb.js → index-0814e813.js} +1 -1
  48. package/assets/{index-05f3c18a.js → index-0d43d9ed.js} +1 -1
  49. package/assets/{index-8b5a06dd.js → index-132215e1.js} +1 -1
  50. package/assets/{index-9c2f8893.js → index-1573dd52.js} +1 -1
  51. package/assets/{index-2124b7cd.js → index-1b1eb822.js} +1 -1
  52. package/assets/{index-b40ed19e.js → index-1ffbaae5.js} +1 -1
  53. package/assets/{index-3c50ab3b.js → index-23121972.js} +1 -1
  54. package/assets/{index-3cdab001.js → index-23d1f93a.js} +1 -1
  55. package/assets/{index-a5c29e80.js → index-26191a1a.js} +1 -1
  56. package/assets/{index-f4401a12.js → index-283fc9a2.js} +1 -1
  57. package/assets/{index-863b5c53.js → index-29e826f8.js} +1 -1
  58. package/assets/{index-69ac8519.js → index-2dd08e94.js} +1 -1
  59. package/assets/{index-c7839713.js → index-2f8dfd91.js} +1 -1
  60. package/assets/{index-9ecf773e.js → index-36edc093.js} +1 -1
  61. package/assets/{index-e7f3149f.css → index-393d8500.css} +4 -4
  62. package/assets/{index-ffdeacb2.js → index-39b708b0.js} +1 -1
  63. package/assets/{index-5b4e7208.js → index-484e428c.js} +1 -1
  64. package/assets/{index-a5876580.js → index-4a42880b.js} +1 -1
  65. package/assets/{index-78689969.js → index-4ef2b1cb.js} +1 -1
  66. package/assets/index-5fc895c4.js +77 -0
  67. package/assets/{index-f4841b7d.js → index-61225d13.js} +1 -1
  68. package/assets/{index-ec8cf158.js → index-613ebb4e.js} +1 -1
  69. package/assets/{index-d7ed4af8.js → index-6192741c.js} +1 -1
  70. package/assets/{index-2e071cd2.js → index-64d202b1.js} +1 -1
  71. package/assets/{index-1368749b.js → index-667c419c.js} +1 -1
  72. package/assets/{index-a91bb597.js → index-6a124ae5.js} +1 -1
  73. package/assets/{index-6c8c5091.js → index-77bf3df8.js} +1 -1
  74. package/assets/{index-355751ab.js → index-7ad60780.js} +245 -245
  75. package/assets/{index-4bc8eee8.js → index-80010c3a.js} +1 -1
  76. package/assets/{index-375e28ad.js → index-817cf9cd.js} +1 -1
  77. package/assets/{index-8bdd54b7.js → index-86fd2679.js} +1 -1
  78. package/assets/{index-276c1c99.js → index-88f8dc1a.js} +1 -1
  79. package/assets/{index-6e64d31e.js → index-8d4c6be6.js} +2 -2
  80. package/assets/{index-9e3730d4.js → index-8f227749.js} +1 -1
  81. package/assets/{index-e2d1a06e.js → index-905b390f.js} +1 -1
  82. package/assets/{index-33bd3c33.js → index-939f5c5f.js} +1 -1
  83. package/assets/{index-e332724b.js → index-9afdd2b9.js} +1 -1
  84. package/assets/{index-2ebd7a81.js → index-a06134e9.js} +1 -1
  85. package/assets/{index-2537319c.js → index-adb46e7f.js} +1 -1
  86. package/assets/{index-54323fc3.js → index-b5c8b407.js} +2 -2
  87. package/assets/{index-89cbc69d.js → index-b70b01d5.js} +1 -1
  88. package/assets/{index-ab687c6f.js → index-b9ce3e4d.js} +1 -1
  89. package/assets/{index-5947dd15.js → index-c9c1d671.js} +1 -1
  90. package/assets/{index-b7605561.js → index-cb7a576f.js} +1 -1
  91. package/assets/{index-1c9749d2.js → index-cc7dbce8.js} +1 -1
  92. package/assets/{index-e6d2ed90.js → index-cf42fef2.js} +1 -1
  93. package/assets/{index-3d2bada3.js → index-d15dcb4c.js} +1 -1
  94. package/assets/{index-3ad96675.js → index-d79af667.js} +1 -1
  95. package/assets/{index-66d53073.js → index-e5717874.js} +2 -2
  96. package/assets/{index-b41b719c.js → index-e638cea0.js} +1 -1
  97. package/assets/{index-5f847edd.js → index-e7a8f28b.js} +2 -2
  98. package/assets/{index-76dbec48.js → index-ec6cdadb.js} +1 -1
  99. package/assets/{index-57dbcd5d.js → index-f2a7f7f0.js} +1 -1
  100. package/assets/{index-e6ba4bbe.js → index-f347a362.js} +1 -1
  101. package/assets/{index.es-2aacf970.js → index.es-26bc13d1.js} +1 -1
  102. package/assets/{index.es-ce0aa5fd.js → index.es-2fd56c76.js} +3 -3
  103. package/assets/{index.es-ac60fff2.js → index.es-f2ff8299.js} +1 -1
  104. package/assets/{index.web-1837e57d.js → index.web-447bc5a9.js} +1 -1
  105. package/assets/{localBatchGatewayRequest-b2e2be89.js → localBatchGatewayRequest-69468f9d.js} +1 -1
  106. package/assets/{native-8dd45a06.js → native-8d26fb1e.js} +1 -1
  107. package/assets/{networks-2b49f856.js → networks-c9098993.js} +1 -1
  108. package/assets/{onramp-7ba26b97.js → onramp-265ce080.js} +1 -1
  109. package/assets/{openzeppelin-56d83a0f.js → openzeppelin-ec0a06b4.js} +1 -1
  110. package/assets/{ownerOf-558180d2.js → ownerOf-c26ccb7e.js} +1 -1
  111. package/assets/parseNft-d17ba5d1.js +1 -0
  112. package/assets/{parseSignature-7a759338.js → parseSignature-6109cfb8.js} +1 -1
  113. package/assets/{parseSignature-16c7c561.js → parseSignature-6692cf8f.js} +2 -2
  114. package/assets/{passkeys-fd92f407.js → passkeys-88fbcf43.js} +1 -1
  115. package/assets/{pay-with-exchange-542b5282.js → pay-with-exchange-4f9213da.js} +1 -1
  116. package/assets/{prepare-contract-call-ac31a985.js → prepare-contract-call-61ed7f10.js} +1 -1
  117. package/assets/{qr-overlay-548b2074.js → qr-overlay-ff429bf0.js} +1 -1
  118. package/assets/{receive-9119a0fc.js → receive-654e1011.js} +1 -1
  119. package/assets/{redirect-state-202ec690.js → redirect-state-0eb003cc.js} +1 -1
  120. package/assets/{resolveImplementation-ffd32467.js → resolveImplementation-19e165be.js} +1 -1
  121. package/assets/{rpc-4fa5fbde.js → rpc-270b3a16.js} +1 -1
  122. package/assets/{secp256k1-2e39eaab.js → secp256k1-4235faa9.js} +1 -1
  123. package/assets/{secp256k1-61174a68.js → secp256k1-c4549fdf.js} +1 -1
  124. package/assets/{secp256k1-587b447b.js → secp256k1-ca23cefd.js} +1 -1
  125. package/assets/{send-5e9549ca.js → send-51c750ac.js} +1 -1
  126. package/assets/{send-batch-transaction-16b5b747.js → send-batch-transaction-26ad8017.js} +1 -1
  127. package/assets/{send-eip712-transaction-67b51817.js → send-eip712-transaction-7428d14b.js} +1 -1
  128. package/assets/send-gasless-transaction-629c6301.js +1 -0
  129. package/assets/{send-transaction-5984dc09.js → send-transaction-d88f260d.js} +1 -1
  130. package/assets/{session-proposal-548687be.js → session-proposal-478c6c90.js} +1 -1
  131. package/assets/{session-request-543a34de.js → session-request-763e482a.js} +1 -1
  132. package/assets/{sha256-865a5e2e.js → sha256-912f9e4c.js} +1 -1
  133. package/assets/{signing-67cb53a5.js → signing-8c84a26e.js} +2 -2
  134. package/assets/{socials-1c5f45aa.js → socials-0fe1c43f.js} +1 -1
  135. package/assets/{swaps-a0b58cae.js → swaps-8fca8430.js} +1 -1
  136. package/assets/{thirdweb-d54893e0.js → thirdweb-93346565.js} +2 -2
  137. package/assets/{to-serializable-transaction-2ea802ff.js → to-serializable-transaction-f4f170dd.js} +2 -2
  138. package/assets/{totalSupply-f714505e.js → totalSupply-f4e2ebc4.js} +1 -1
  139. package/assets/{transaction-e500e7c4.js → transaction-de6aa420.js} +1 -1
  140. package/assets/{transactionReceipt-c6fe2381.js → transactionReceipt-048e59e4.js} +1 -1
  141. package/assets/{transactions-9a79e8f9.js → transactions-5d81f4ca.js} +1 -1
  142. package/assets/{tslib.es6-b444c8f1.js → tslib.es6-dfcb9aaf.js} +1 -1
  143. package/assets/{utils-74c631d9.js → utils-13a7e3ab.js} +1 -1
  144. package/assets/{verifyHash-34edded7.js → verifyHash-ae676cbd.js} +1 -1
  145. package/assets/{w3m-modal-0795c078.js → w3m-modal-24af9160.js} +1 -1
  146. package/assets/{w3m-modal-906aa735.js → w3m-modal-b6bcdae1.js} +1 -1
  147. package/assets/{wait-for-tx-receipt-dbf6b521.js → wait-for-tx-receipt-1106c895.js} +1 -1
  148. package/assets/{wallets-331c410d.js → wallets-95ac61f8.js} +4 -4
  149. package/assets/{web-connector-3a1204fd.js → web-connector-856f3af1.js} +2 -2
  150. package/assets/{writeContract-f6b81199.js → writeContract-f029805e.js} +2 -2
  151. package/assets/{zora-sepolia-eaf59a0b.js → zora-sepolia-b68fb504.js} +1 -1
  152. package/assets/{zoraTestnet-55836178.js → zoraTestnet-9a287ef8.js} +1 -1
  153. package/index.html +4 -4
  154. package/package.json +3 -3
  155. package/assets/decimals-37678a25.js +0 -1
  156. package/assets/eth_estimateGas-79dc1763.js +0 -1
  157. package/assets/features-0025dc16.js +0 -1
  158. package/assets/index-7ee82e4f.js +0 -77
  159. package/assets/parseNft-93d99682.js +0 -1
  160. package/assets/send-gasless-transaction-8bdf3649.js +0 -1
@@ -1 +1 @@
1
- import{p as yt,b as Xt,i as Qt,I as Yt,m as gt,s as ut,A as M,e as Zt,g as U,d as te,f as N,r as ee,h as ae,j as ne,k as re,w as se,n as oe,o as ie,q as ce,t as ue,v as de,u as me,x as Y,y as le,z as fe,B as he,C as H,D as pe,E as ye,F as ge,G as be,H as we,J as xe,K as Ee,L as vt,M as Ie,N as Te,O as St,P as At,Q as Ce,R as Pt,S as _t,T as Rt,U as ve,V as dt,W as qt,X as Se,Y as Ae,Z as Ft,_ as Pe,$ as Ut,a0 as K,a1 as _e,a2 as kt,a3 as Re,a4 as qe,a5 as mt,a6 as Fe,a7 as Ue,a8 as ke,a9 as Be,aa as Ne,ab as Bt,ac as Le}from"./parseSignature-16c7c561.js";import{bg as Ir,b2 as Tr,aN as Cr,aO as vr,aU as Sr,aP as Ar,aQ as Pr,aR as _r,ad as Rr,aS as qr,aV as Fr,aW as Ur,aX as kr,aY as Br,b3 as Nr,a_ as Lr,a$ as Dr,b0 as Mr,b1 as zr,b5 as Gr,b6 as Hr,bi as Or,b7 as $r,b8 as jr,b9 as Wr,ae as Vr,af as Kr,ag as Jr,aT as Xr,bp as Qr,ah as Yr,ai as Zr,aj as ts,ak as es,bj as as,al as ns,bk as rs,am as ss,b4 as os,ba as is,bb as cs,bc as us,aZ as ds,aq as ms,bh as ls,bd as fs,bl as hs,bm as ps,bn as ys,be as gs,bf as bs,ar as ws,as as xs,at as Es,bo as Is,bw as Ts,bx as Cs,by as vs,bD as Ss,av as As,bq as Ps,br as _s,aI as Rs,aJ as qs,bs as Fs,bt as Us,bu as ks,aB as Bs,ay as Ns,az as Ls,aC as Ds,aD as Ms,aK as zs,aA as Gs,aF as Hs,bO as Os,bP as $s,bQ as js,bA as Ws,bM as Vs,bH as Ks,ax as Js,bB as Xs,aE as Qs,bC as Ys,bE as Zs,an as to,ao as eo,ap as ao,bH as no,bv as ro,aL as so,aw as oo,bI as io,au as co,bN as uo,bJ as mo,bK as lo,bK as fo,bz as ho,bL as po,aD as yo,aK as go,aM as bo,bF as wo,bG as xo,aG as Eo,aH as Io}from"./parseSignature-16c7c561.js";import{z as B,b6 as k,C as X,A as De,a7 as Me,p as ze,b7 as Ge,y as O,V as ct,W as G,B as Nt,q as E,J as He,a2 as Oe,b8 as j,a1 as bt,L as Lt,b9 as Dt,b as Mt,F as R,o as F,ba as A,G as $e,I as je,bb as We,bc as wt,D as Ve,bd as Ke,be as Je,bf as Xe,bg as xt}from"./prepare-contract-call-ac31a985.js";import{bh as Co,S as vo,a8 as So,bi as Ao,bj as Po,bk as _o,bl as Ro,bm as qo,aa as Fo,bn as Uo,N as ko,Q as Bo,bo as No,bp as Lo,bq as Do,K as Mo,U as zo,R as Go,bD as Ho,bz as Oo,br as $o,bs as jo,bt as Wo,bA as Vo,bu as Ko,bB as Jo,bx as Xo,bC as Qo,by as Yo,bv as Zo,bS as ti,bV as ei,bK as ai,bL as ni,bM as ri,bN as si,bG as oi,bH as ii,j as ci,bE as ui,bO as di,bP as mi,bF as li,O as fi,bX as hi,a9 as pi,bX as yi,bQ as gi,bR as bi,bT as wi,bI as xi,bw as Ei,bJ as Ii,bU as Ti,bW as Ci,O as vi,bX as Si,bW as Ai,a9 as Pi,bX as _i}from"./prepare-contract-call-ac31a985.js";import{u as lt}from"./to-serializable-transaction-2ea802ff.js";import{b as qi,C as Fi,B as Ui,D as ki,E as Bi,m as Ni,n as Li,F as Di,s as Mi,a as zi}from"./to-serializable-transaction-2ea802ff.js";import{w as Qe,h as Ye,g as Ze,v as ta,s as ea}from"./hashTypedData-ba8e399b.js";import{I as Hi,a as Oi,b as $i,e as ji,c as Wi,d as Vi}from"./hashTypedData-ba8e399b.js";import{T as aa,a as Q,W as Et,b as na,U as ra,R as sa}from"./rpc-4fa5fbde.js";import{c as Ji,A as Xi,B as Qi,C as Yi,D as Zi,H as tc,I as ec,d as ac,e as nc,f as rc,J as sc,L as oc,M as ic,h as cc,P as uc,i as dc,j as mc,k as lc,l as fc,m as hc,S as pc,n as yc,o as gc,p as bc,q as wc,r as xc,s as Ec}from"./rpc-4fa5fbde.js";import{_ as oa}from"./index-355751ab.js";import{t as ia,H as ca}from"./sha256-865a5e2e.js";import{aJ as Tc,aK as Cc,n as vc,o as Sc,p as Ac,q as Pc,r as _c,u as Rc,v as qc,b as Fc,w as Uc,x as kc,y as Bc,z as Nc,A as Lc,B as Dc,C as Mc,D as zc,E as Gc,F as Hc,c as Oc,G as $c,I as jc,J as Wc,d as Vc,e as Kc,f as Jc,g as Xc,h as Qc,i as Yc,a as Zc,j as tu,k as eu,l as au,V as nu,W as ru,X as su,Y as ou,Z as iu,_ as cu,$ as uu,m as du,a0 as mu,a1 as lu,a2 as fu,a3 as hu,a4 as pu,a5 as yu,a6 as gu,a7 as bu,a8 as wu,a9 as xu,L as Eu,aa as Iu,ab as Tu,ac as Cu,M as vu,N as Su,O as Au,P as Pu,Q as _u,R as Ru,K as qu,S as Fu,T as Uu,U as ku,ap as Bu,aq as Nu,ar as Lu,as as Du,at as Mu,au as zu,av as Gu,ae as Hu,aw as Ou,ax as $u,ay as ju,az as Wu,aA as Vu,aB as Ku,aC as Ju,aD as Xu,aE as Qu,aF as Yu,af as Zu,aG as td,aH as ed,aI as ad,ag as nd,ah as rd,ai as sd,aj as od,ak as id,al as cd,ad as ud,am as dd,an as md,ao as ld,s as fd}from"./sha256-865a5e2e.js";import{i as ft}from"./get-bytecode-8cb4e224.js";import{d as pd,a as yd}from"./get-bytecode-8cb4e224.js";import{ccipRequest as bd,ccipRequest as wd,offchainLookup as xd,offchainLookupAbiItem as Ed,offchainLookupSignature as Id}from"./ccip-6d1e4a15.js";import{d as Cd,a as vd,f as Sd}from"./transactionReceipt-c6fe2381.js";import"./utils-74c631d9.js";import"./transaction-e500e7c4.js";function jn(t){let e;if(typeof t=="string")e=yt(t,{modifiers:gt});else{const a=Xt(t),n=t.length;for(let r=0;r<n;r++){const s=t[r];if(!Qt(s)){e=yt(s,{modifiers:gt,structs:a});break}}}if(!e)throw new Yt({param:t});return e}async function D(t,e){return D.internal(t,ut,"sendTransaction",e)}(function(t){async function e(a,n,r,s){const{abi:c,account:d=a.account,address:u,args:i,dataSuffix:f,functionName:l,...h}=s;if(typeof d>"u")throw new M({docsPath:"/docs/contract/writeContract"});const o=d?N(d):null,p=Zt({abi:c,args:i,functionName:l});try{return await U(a,n,r)({data:`${p}${f?f.replace("0x",""):""}`,to:u,account:o,...h})}catch(m){throw te(m,{abi:c,address:u,args:i,docsPath:"/docs/contract/writeContract",functionName:l,sender:o==null?void 0:o.address})}}t.internal=e})(D||(D={}));function Wn({abi:t,address:e,client:a}){const n=a,[r,s]=(()=>n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0])(),c=r!=null,d=s!=null,u={};let i=!1,f=!1,l=!1;for(const h of t)if(h.type==="function"?h.stateMutability==="view"||h.stateMutability==="pure"?i=!0:f=!0:h.type==="event"&&(l=!0),i&&f&&l)break;return c&&(i&&(u.read=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(r,ee,"readContract")({abi:t,address:e,functionName:o,args:m,...y})}}})),f&&(u.simulate=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(r,ae,"simulateContract")({abi:t,address:e,functionName:o,args:m,...y})}}})),l&&(u.createEventFilter=new Proxy({},{get(h,o){return(...p)=>{const m=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,m);return U(r,ne,"createContractEventFilter")({abi:t,address:e,eventName:o,args:y,...w})}}}),u.getEvents=new Proxy({},{get(h,o){return(...p)=>{const m=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,m);return U(r,re,"getContractEvents")({abi:t,address:e,eventName:o,args:y,...w})}}}),u.watchEvent=new Proxy({},{get(h,o){return(...p)=>{const m=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,m);return U(r,se,"watchContractEvent")({abi:t,address:e,eventName:o,args:y,...w})}}}))),d&&f&&(u.write=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(s,D,"writeContract")({abi:t,address:e,functionName:o,args:m,...y})}}})),(c||d)&&f&&(u.estimateGas=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(r??s,oe,"estimateContractGas")({abi:t,address:e,functionName:o,args:m,...y,account:y.account??s.account})}}})),u.address=e,u.abi=t,u}function W(t){const e=t.length&&Array.isArray(t[0]),a=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:a,options:n}}function rt(t,e){let a=!1;Array.isArray(t[0])?a=!0:t.length===1?a=e.inputs.some(s=>s.indexed):t.length===2&&(a=!0);const n=a?t[0]:void 0,r=(a?t[1]:t[0])??{};return{args:n,options:r}}function It(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}function Vn(t){return t.opcode==="CREATE2"?da(t):ua(t)}function ua(t){const e=B(k(t.from));let a=B(t.nonce);return a[0]===0&&(a=new Uint8Array([])),k(`0x${X(ia([e,a],"bytes")).slice(26)}`)}function da(t){const e=B(k(t.from)),a=De(It(t.salt)?t.salt:B(t.salt),{size:32}),n=(()=>"bytecodeHash"in t?It(t.bytecodeHash)?t.bytecodeHash:B(t.bytecodeHash):X(t.bytecode,"bytes"))();return k(Me(X(ze([B("0xff"),e,a,n])),12))}function Kn({chains:t,id:e}){return t.find(a=>a.id===e)}function zt(t,e="hex"){const a=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new Ge(t);return O(t)}return t})(),n=ct(a,{recursiveReadLimit:Number.POSITIVE_INFINITY});return Gt(n,e)}function Gt(t,e="hex"){if(t.bytes.length===0)return e==="hex"?G(t.bytes):t.bytes;const a=t.readByte();if(a<128&&t.decrementPosition(1),a<192){const r=Tt(t,a,128),s=t.readBytes(r);return e==="hex"?G(s):s}const n=Tt(t,a,192);return ma(t,n,e)}function Tt(t,e,a){if(a===128&&e<128)return 1;if(e<=a+55)return e-a;if(e===a+55+1)return t.readUint8();if(e===a+55+2)return t.readUint16();if(e===a+55+3)return t.readUint24();if(e===a+55+4)return t.readUint32();throw new Nt("Invalid RLP prefix")}function ma(t,e,a){const n=t.position,r=[];for(;t.position-n<e;)r.push(Gt(t,a));return r}function la(t){return E(t)&&He(t)===32}const fa=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Ht=(()=>Uint8Array.from(new Array(16).fill(0).map((t,e)=>e)))(),ha=(()=>Ht.map(t=>(9*t+5)%16))(),Ot=(()=>{const a=[[Ht],[ha]];for(let n=0;n<4;n++)for(let r of a)r.push(r[n].map(s=>fa[s]));return a})(),$t=(()=>Ot[0])(),jt=(()=>Ot[1])(),Wt=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>Uint8Array.from(t)),pa=$t.map((t,e)=>t.map(a=>Wt[e][a])),ya=jt.map((t,e)=>t.map(a=>Wt[e][a])),ga=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),ba=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function Ct(t,e,a,n){return t===0?e^a^n:t===1?e&a|~e&n:t===2?(e|~a)^n:t===3?e&n|a&~n:e^(a|~n)}const V=new Uint32Array(16);class wa extends ca{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:n,h3:r,h4:s}=this;return[e,a,n,r,s]}set(e,a,n,r,s){this.h0=e|0,this.h1=a|0,this.h2=n|0,this.h3=r|0,this.h4=s|0}process(e,a){for(let o=0;o<16;o++,a+=4)V[o]=e.getUint32(a,!0);let n=this.h0|0,r=n,s=this.h1|0,c=s,d=this.h2|0,u=d,i=this.h3|0,f=i,l=this.h4|0,h=l;for(let o=0;o<5;o++){const p=4-o,m=ga[o],y=ba[o],w=$t[o],g=jt[o],C=pa[o],b=ya[o];for(let x=0;x<16;x++){const I=j(n+Ct(o,s,d,i)+V[w[x]]+m,C[x])+l|0;n=l,l=i,i=j(d,10)|0,d=s,s=I}for(let x=0;x<16;x++){const I=j(r+Ct(p,c,u,f)+V[g[x]]+y,b[x])+h|0;r=h,h=f,f=j(u,10)|0,u=c,c=I}}this.set(this.h1+d+f|0,this.h2+i+h|0,this.h3+l+r|0,this.h4+n+c|0,this.h0+s+u|0)}roundClean(){bt(V)}destroy(){this.destroyed=!0,bt(this.buffer),this.set(0,0,0,0,0)}}const xa=Oe(()=>new wa),Ea=xa;function Jn(t,e){const a=e||"hex",n=Ea(E(t,{strict:!1})?B(t):t);return a==="bytes"?n:Lt(n)}const st=new Map;async function Ia(t){const{getSocket:e,keepAlive:a=!0,key:n="socket",reconnect:r=!0,url:s}=t,{interval:c=3e4}=typeof a=="object"?a:{},{attempts:d=5,delay:u=2e3}=typeof r=="object"?r:{},i=JSON.stringify({keepAlive:a,key:n,url:s,reconnect:r});let f=st.get(i);if(f)return f;let l=0;const{schedule:h}=ie({id:i,fn:async()=>{const m=new Map,y=new Map;let w,g,C,b=!1;function x(){if(r&&l<d){if(b)return;b=!0,l++,g==null||g.close(),setTimeout(async()=>{await I().catch(console.error),b=!1},u)}else m.clear(),y.clear()}async function I(){const T=await e({onClose(){var v,P;for(const S of m.values())(v=S.onError)==null||v.call(S,new Q({url:s}));for(const S of y.values())(P=S.onError)==null||P.call(S,new Q({url:s}));x()},onError(v){var P,S;w=v;for(const _ of m.values())(P=_.onError)==null||P.call(_,w);for(const _ of y.values())(S=_.onError)==null||S.call(_,w);x()},onOpen(){w=void 0,l=0},onResponse(v){const P=v.method==="eth_subscription",S=P?v.params.subscription:v.id,_=P?y:m,q=_.get(S);q&&q.onResponse(v),P||_.delete(S)}});if(g=T,a&&(C&&clearInterval(C),C=setInterval(()=>{var v;return(v=g.ping)==null?void 0:v.call(g)},c)),r&&y.size>0){const v=y.entries();for(const[P,{onResponse:S,body:_,onError:q}]of v)_&&(y.delete(P),f==null||f.request({body:_,onResponse:S,onError:q}))}return T}return await I(),w=void 0,f={close(){C&&clearInterval(C),g.close(),st.delete(i)},get socket(){return g},request({body:T,onError:v,onResponse:P}){w&&v&&v(w);const S=T.id??ce.take(),_=q=>{var z;typeof q.id=="number"&&S!==q.id||(T.method==="eth_subscribe"&&typeof q.result=="string"&&y.set(q.result,{onResponse:_,onError:v,body:T}),T.method==="eth_unsubscribe"&&y.delete((z=T.params)==null?void 0:z[0]),P(q))};m.set(S,{onResponse:_,onError:v});try{g.request({body:{jsonrpc:"2.0",id:S,...T}})}catch(q){v==null||v(q)}},requestAsync({body:T,timeout:v=1e4}){return Qe(()=>new Promise((P,S)=>this.request({body:T,onError:S,onResponse:P})),{errorInstance:new aa({body:T,url:s}),timeout:v})},requests:m,subscriptions:y,url:s},st.set(i,f),[f]}}),[o,[p]]=await h();return p}async function J(t,e={}){const{keepAlive:a,reconnect:n}=e;return Ia({async getSocket({onClose:r,onError:s,onOpen:c,onResponse:d}){const u=await oa(()=>import("./native-8dd45a06.js"),["assets/native-8dd45a06.js","assets/index-355751ab.js","assets/index-e7f3149f.css"]).then(o=>o.WebSocket),i=new u(t);function f(){i.removeEventListener("close",f),i.removeEventListener("message",l),i.removeEventListener("error",s),i.removeEventListener("open",c),r()}function l({data:o}){if(!(typeof o=="string"&&o.trim().length===0))try{const p=JSON.parse(o);d(p)}catch(p){s(p)}}i.addEventListener("close",f),i.addEventListener("message",l),i.addEventListener("error",s),i.addEventListener("open",c),i.readyState===u.CONNECTING&&await new Promise((o,p)=>{i&&(i.onopen=o,i.onerror=p)});const{close:h}=i;return Object.assign(i,{close(){h.bind(i)(),f()},ping(){try{if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new Et({url:i.url,cause:new Q({url:i.url})});const o={jsonrpc:"2.0",id:null,method:"net_version",params:[]};i.send(JSON.stringify(o))}catch(o){s(o)}},request({body:o}){if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new Et({body:o,url:i.url,cause:new Q({url:i.url})});return i.send(JSON.stringify(o))}})},keepAlive:a,reconnect:n,url:t})}async function Ta(t){const e=await J(t);return Object.assign(e.socket,{requests:e.requests,subscriptions:e.subscriptions})}function Ca(t){return Dt(t,-32)===ue}function va(t){return de(t)}function Xn(t){if(!Ca(t))return{signature:t};const[e,a,n]=Mt([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:e,data:a,signature:n}}function Qn(t){if(!va(t))return{signature:t};const{authorization:e,to:a,...n}=me(t);return{authorization:{address:e.address,chainId:e.chainId,nonce:Number(e.nonce),r:R(e.r,{size:32}),s:R(e.s,{size:32}),yParity:e.yParity},...a?{address:a}:{},...n}}async function Sa({message:t,signature:e}){return Y({hash:le(t),signature:e})}async function Aa(t){const{domain:e,message:a,primaryType:n,signature:r,types:s}=t;return Y({hash:Ye({domain:e,message:a,primaryType:n,types:s}),signature:r})}function Yn(t){const{address:e,data:a,signature:n,to:r="hex"}=t,s=fe({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:a,signature:n,to:e});return r==="hex"?s:O(s)}async function Zn({address:t,hash:e,signature:a}){return ft(k(t),await Y({hash:e,signature:a}))}async function tr({address:t,message:e,signature:a}){return ft(k(t),await Sa({message:e,signature:a}))}async function er(t){const{address:e,domain:a,message:n,primaryType:r,signature:s,types:c}=t;return ft(k(e),await Aa({domain:a,message:n,primaryType:r,signature:s,types:c}))}function Pa(t){const e=Dt(t,0,1);if(e==="0x04")return"eip7702";if(e==="0x03")return"eip4844";if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&F(e)>=192)return"legacy";throw new he({serializedType:e})}function _a(t){const e=Pa(t);return e==="eip1559"?Fa(t):e==="eip2930"?Ua(t):e==="eip4844"?qa(t):e==="eip7702"?Ra(t):ka(t)}function Ra(t){const e=Z(t),[a,n,r,s,c,d,u,i,f,l,h,o,p]=e;if(e.length!==10&&e.length!==13)throw new H({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:c,to:d,value:u,data:i,accessList:f,authorizationList:l,...e.length>9?{v:h,r:o,s:p}:{}},serializedTransaction:t,type:"eip7702"});const m={chainId:F(a),type:"eip7702"};return E(d)&&d!=="0x"&&(m.to=d),E(c)&&c!=="0x"&&(m.gas=A(c)),E(i)&&i!=="0x"&&(m.data=i),E(n)&&(m.nonce=n==="0x"?0:F(n)),E(u)&&u!=="0x"&&(m.value=A(u)),E(s)&&s!=="0x"&&(m.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(m.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(m.accessList=tt(f)),l.length!==0&&l!=="0x"&&(m.authorizationList=Ba(l)),pe(m),{...e.length===13?$(e):void 0,...m}}function qa(t){const e=Z(t),a=e.length===4,n=a?e[0]:e,r=a?e.slice(1):[],[s,c,d,u,i,f,l,h,o,p,m,y,w,g]=n,[C,b,x]=r;if(!(n.length===11||n.length===14))throw new H({attributes:{chainId:s,nonce:c,maxPriorityFeePerGas:d,maxFeePerGas:u,gas:i,to:f,value:l,data:h,accessList:o,...n.length>9?{v:y,r:w,s:g}:{}},serializedTransaction:t,type:"eip4844"});const I={blobVersionedHashes:m,chainId:F(s),to:f,type:"eip4844"};return E(i)&&i!=="0x"&&(I.gas=A(i)),E(h)&&h!=="0x"&&(I.data=h),E(c)&&(I.nonce=c==="0x"?0:F(c)),E(l)&&l!=="0x"&&(I.value=A(l)),E(p)&&p!=="0x"&&(I.maxFeePerBlobGas=A(p)),E(u)&&u!=="0x"&&(I.maxFeePerGas=A(u)),E(d)&&d!=="0x"&&(I.maxPriorityFeePerGas=A(d)),o.length!==0&&o!=="0x"&&(I.accessList=tt(o)),C&&b&&x&&(I.sidecars=ye({blobs:C,commitments:b,proofs:x})),ge(I),{...n.length===14?$(n):void 0,...I}}function Fa(t){const e=Z(t),[a,n,r,s,c,d,u,i,f,l,h,o]=e;if(!(e.length===9||e.length===12))throw new H({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:c,to:d,value:u,data:i,accessList:f,...e.length>9?{v:l,r:h,s:o}:{}},serializedTransaction:t,type:"eip1559"});const p={chainId:F(a),type:"eip1559"};return E(d)&&d!=="0x"&&(p.to=d),E(c)&&c!=="0x"&&(p.gas=A(c)),E(i)&&i!=="0x"&&(p.data=i),E(n)&&(p.nonce=n==="0x"?0:F(n)),E(u)&&u!=="0x"&&(p.value=A(u)),E(s)&&s!=="0x"&&(p.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(p.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(p.accessList=tt(f)),be(p),{...e.length===12?$(e):void 0,...p}}function Ua(t){const e=Z(t),[a,n,r,s,c,d,u,i,f,l,h]=e;if(!(e.length===8||e.length===11))throw new H({attributes:{chainId:a,nonce:n,gasPrice:r,gas:s,to:c,value:d,data:u,accessList:i,...e.length>8?{v:f,r:l,s:h}:{}},serializedTransaction:t,type:"eip2930"});const o={chainId:F(a),type:"eip2930"};return E(c)&&c!=="0x"&&(o.to=c),E(s)&&s!=="0x"&&(o.gas=A(s)),E(u)&&u!=="0x"&&(o.data=u),E(n)&&(o.nonce=n==="0x"?0:F(n)),E(d)&&d!=="0x"&&(o.value=A(d)),E(r)&&r!=="0x"&&(o.gasPrice=A(r)),i.length!==0&&i!=="0x"&&(o.accessList=tt(i)),we(o),{...e.length===11?$(e):void 0,...o}}function ka(t){const e=zt(t,"hex"),[a,n,r,s,c,d,u,i,f]=e;if(!(e.length===6||e.length===9))throw new H({attributes:{nonce:a,gasPrice:n,gas:r,to:s,value:c,data:d,...e.length>6?{v:u,r:i,s:f}:{}},serializedTransaction:t,type:"legacy"});const l={type:"legacy"};if(E(s)&&s!=="0x"&&(l.to=s),E(r)&&r!=="0x"&&(l.gas=A(r)),E(d)&&d!=="0x"&&(l.data=d),E(a)&&(l.nonce=a==="0x"?0:F(a)),E(c)&&c!=="0x"&&(l.value=A(c)),E(n)&&n!=="0x"&&(l.gasPrice=A(n)),xe(l),e.length===6)return l;const h=E(u)&&u!=="0x"?A(u):0n;if(f==="0x"&&i==="0x")return h>0&&(l.chainId=Number(h)),l;const o=h,p=Number((o-35n)/2n);if(p>0)l.chainId=p;else if(o!==27n&&o!==28n)throw new Ee({v:o});return l.v=o,l.s=f,l.r=i,l.yParity=o%2n===0n?1:0,l}function Z(t){return zt(`0x${t.slice(4)}`,"hex")}function tt(t){const e=[];for(let a=0;a<t.length;a++){const[n,r]=t[a];if(!$e(n,{strict:!1}))throw new je({address:n});e.push({address:n,storageKeys:r.map(s=>la(s)?s:We(s))})}return e}function Ba(t){const e=[];for(let a=0;a<t.length;a++){const[n,r,s,c,d,u]=t[a];e.push({address:r,chainId:n==="0x"?0:F(n),nonce:s==="0x"?0:F(s),...$([c,d,u])})}return e}function $(t){const e=t.slice(-3),a=e[0]==="0x"||A(e[0])===0n?27n:28n;return{r:wt(e[1],{size:32}),s:wt(e[2],{size:32}),v:a,yParity:a===27n?0:1}}function ar(t,e="wei"){return vt(t,Ie[e])}function nr(t,e="wei"){return vt(t,Te[e])}async function Na(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function La(t){return t.request({method:`${t.mode}_dumpState`})}async function Da(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function Ma(t){return await t.request({method:"txpool_content"})}async function za(t){const{pending:e,queued:a}=await t.request({method:"txpool_status"});return{pending:F(e),queued:F(a)}}async function Ga(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function Ha(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[R(e)]})}async function Oa(t){return await t.request({method:"txpool_inspect"})}async function $a(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function ja(t,{blocks:e,interval:a}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:R(e)}]}):await t.request({method:`${t.mode}_mine`,params:[R(e),R(a||0)]})}async function Wa(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function Va(t,{blockNumber:e,jsonRpcUrl:a}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:a}}]})}async function Ka(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function Ja(t,e){var w,g,C;const{accessList:a,data:n,from:r,gas:s,gasPrice:c,maxFeePerGas:d,maxPriorityFeePerGas:u,nonce:i,to:f,value:l,...h}=e,o=(C=(g=(w=t.chain)==null?void 0:w.formatters)==null?void 0:g.transactionRequest)==null?void 0:C.format,m=(o||lt)({...St(h,{format:o}),accessList:a,data:n,from:r,gas:s,gasPrice:c,maxFeePerGas:d,maxPriorityFeePerGas:u,nonce:i,to:f,value:l},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[m]})}async function Xa(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function Qa(t,{address:e,value:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,R(a)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,R(a)]})}async function Ya(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[R(e)]})}async function Za(t,{interval:e}){const a=(()=>t.mode==="hardhat"?e*1e3:e)();await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[a]})}async function tn(t,{address:e,bytecode:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[e,a]}):await t.request({method:`${t.mode}_setCode`,params:[e,a]})}async function en(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function an(t,{interval:e}){const a=(()=>t.mode==="hardhat"?e*1e3:e)();await t.request({method:"evm_setIntervalMining",params:[a]})}async function nn(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function rn(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[R(e)]})}async function sn(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[R(e)]})}async function on(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[R(e)]})}async function cn(t,{address:e,nonce:a}){await t.request({method:`${t.mode}_setNonce`,params:[e,R(a)]})}async function un(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function dn(t,{address:e,index:a,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof a=="number"?R(a):a,n]})}async function mn(t){return await t.request({method:"evm_snapshot"})}async function ln(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function fn({mode:t}){return e=>{const a=e.extend(()=>({mode:t}));return{dropTransaction:n=>Na(a,n),dumpState:()=>La(a),getAutomine:()=>Da(a),getTxpoolContent:()=>Ma(a),getTxpoolStatus:()=>za(a),impersonateAccount:n=>Ga(a,n),increaseTime:n=>Ha(a,n),inspectTxpool:()=>Oa(a),loadState:n=>$a(a,n),mine:n=>ja(a,n),removeBlockTimestampInterval:()=>Wa(a),reset:n=>Va(a,n),revert:n=>Ka(a,n),sendUnsignedTransaction:n=>Ja(a,n),setAutomine:n=>Xa(a,n),setBalance:n=>Qa(a,n),setBlockGasLimit:n=>Ya(a,n),setBlockTimestampInterval:n=>Za(a,n),setCode:n=>tn(a,n),setCoinbase:n=>en(a,n),setIntervalMining:n=>an(a,n),setLoggingEnabled:n=>nn(a,n),setMinGasPrice:n=>rn(a,n),setNextBlockBaseFeePerGas:n=>sn(a,n),setNextBlockTimestamp:n=>on(a,n),setNonce:n=>cn(a,n),setRpcUrl:n=>un(a,n),setStorageAt:n=>dn(a,n),snapshot:()=>mn(a),stopImpersonatingAccount:n=>ln(a,n)}}}function rr(t){const{key:e="test",name:a="Test Client",mode:n}=t;return At({...t,key:e,name:a,type:"testClient"}).extend(s=>({mode:n,...fn({mode:n})(s)}))}async function hn(t,{chain:e}){const{id:a,name:n,nativeCurrency:r,rpcUrls:s,blockExplorers:c}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:R(a),chainName:n,nativeCurrency:r,rpcUrls:s.default.http,blockExplorerUrls:c?Object.values(c).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}function pn(t,e){const{abi:a,args:n,bytecode:r,...s}=e,c=Ce({abi:a,args:n,bytecode:r});return ut(t,{...s,...s.authorizationList?{to:null}:{},data:c})}async function yn(t){var a;return((a=t.account)==null?void 0:a.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Ve(n))}async function gn(t,e={}){const{account:a=t.account,chainId:n}=e,r=a?N(a):void 0,s=n?[r==null?void 0:r.address,[R(n)]]:[r==null?void 0:r.address],c=await t.request({method:"wallet_getCapabilities",params:s}),d={};for(const[u,i]of Object.entries(c)){d[Number(u)]={};for(let[f,l]of Object.entries(i))f==="addSubAccount"&&(f="unstable_addSubAccount"),d[Number(u)][f]=l}return typeof n=="number"?d[n]:d}async function bn(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function wn(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>k(a))}async function xn(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function En(t,e){const{chain:a=t.chain}=e,n=e.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),r=await Pt(t,e);return await _t(t,{...e,id:r.id,timeout:n})}const ot=new Ke(128);async function Vt(t,e){var x,I,T,v;const{account:a=t.account,chain:n=t.chain,accessList:r,authorizationList:s,blobs:c,data:d,gas:u,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:l,maxPriorityFeePerGas:h,nonce:o,pollingInterval:p,throwOnReceiptRevert:m,type:y,value:w,...g}=e,C=e.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof a>"u")throw new M({docsPath:"/docs/actions/wallet/sendTransactionSync"});const b=a?N(a):null;try{Rt(e);const P=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await ve({authorization:s[0]}).catch(()=>{throw new Nt("`to` is required. Could not infer from `authorizationList`.")})})();if((b==null?void 0:b.type)==="json-rpc"||b===null){let S;n!==null&&(S=await U(t,dt,"getChainId")({}),qt({currentChainId:S,chain:n}));const _=(T=(I=(x=t.chain)==null?void 0:x.formatters)==null?void 0:I.transactionRequest)==null?void 0:T.format,z=(_||lt)({...St(g,{format:_}),accessList:r,account:b,authorizationList:s,blobs:c,chainId:S,data:d,gas:u,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:l,maxPriorityFeePerGas:h,nonce:o,to:P,type:y,value:w},"sendTransaction"),ht=ot.get(t.uid),Kt=ht?"wallet_sendTransaction":"eth_sendTransaction",Jt=await(async()=>{try{return await t.request({method:Kt,params:[z]},{retryCount:0})}catch(pt){if(ht===!1)throw pt;const L=pt;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[z]},{retryCount:0}).then(at=>(ot.set(t.uid,!0),at)).catch(at=>{const nt=at;throw nt.name==="MethodNotFoundRpcError"||nt.name==="MethodNotSupportedRpcError"?(ot.set(t.uid,!1),L):nt});throw L}})(),et=await U(t,Se,"waitForTransactionReceipt")({checkReplacement:!1,hash:Jt,pollingInterval:p,timeout:C});if(m&&et.status==="reverted")throw new Ae({receipt:et});return et}if((b==null?void 0:b.type)==="local"){const S=await U(t,Ft,"prepareTransactionRequest")({account:b,accessList:r,authorizationList:s,blobs:c,chain:n,data:d,gas:u,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:l,maxPriorityFeePerGas:h,nonce:o,nonceManager:b.nonceManager,parameters:[...Pe,"sidecars"],type:y,value:w,...g,to:P}),_=(v=n==null?void 0:n.serializers)==null?void 0:v.transaction,q=await b.signTransaction(S,{serializer:_});return await U(t,Ut,"sendRawTransactionSync")({serializedTransaction:q,throwOnReceiptRevert:m})}throw(b==null?void 0:b.type)==="smart"?new K({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new K({docsPath:"/docs/actions/wallet/sendTransactionSync",type:b==null?void 0:b.type})}catch(P){throw P instanceof K?P:_e(P,{...e,account:b,chain:e.chain||void 0})}}async function In(t,e){const{id:a}=e;await t.request({method:"wallet_showCallsStatus",params:[a]})}async function Tn(t,e){const{account:a=t.account}=e;if(!a)throw new M({docsPath:"/docs/eip7702/signAuthorization"});const n=N(a);if(!n.signAuthorization)throw new K({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const r=await kt(t,e);return n.signAuthorization(r)}async function Cn(t,{account:e=t.account,message:a}){if(!e)throw new M({docsPath:"/docs/actions/wallet/signMessage"});const n=N(e);if(n.signMessage)return n.signMessage({message:a});const r=(()=>typeof a=="string"?Je(a):a.raw instanceof Uint8Array?Lt(a.raw):a.raw)();return t.request({method:"personal_sign",params:[r,n.address]},{retryCount:0})}async function vn(t,e){var i,f,l,h;const{account:a=t.account,chain:n=t.chain,...r}=e;if(!a)throw new M({docsPath:"/docs/actions/wallet/signTransaction"});const s=N(a);Rt({account:s,...e});const c=await U(t,dt,"getChainId")({});n!==null&&qt({currentChainId:c,chain:n});const d=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),u=((f=d==null?void 0:d.transactionRequest)==null?void 0:f.format)||lt;return s.signTransaction?s.signTransaction({...r,chainId:c},{serializer:(h=(l=t.chain)==null?void 0:l.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...u({...r,account:s},"signTransaction"),chainId:R(c),from:s.address}]},{retryCount:0})}async function Sn(t,e){const{account:a=t.account,domain:n,message:r,primaryType:s}=e;if(!a)throw new M({docsPath:"/docs/actions/wallet/signTypedData"});const c=N(a),d={EIP712Domain:Ze({domain:n}),...e.types};if(ta({domain:n,message:r,primaryType:s,types:d}),c.signTypedData)return c.signTypedData({domain:n,message:r,primaryType:s,types:d});const u=ea({domain:n,message:r,primaryType:s,types:d});return t.request({method:"eth_signTypedData_v4",params:[c.address,u]},{retryCount:0})}async function An(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:R(e)}]},{retryCount:0})}async function Pn(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}async function _n(t,e){return D.internal(t,Vt,"sendTransactionSync",e)}function Rn(t){return{addChain:e=>hn(t,e),deployContract:e=>pn(t,e),getAddresses:()=>yn(t),getCallsStatus:e=>Re(t,e),getCapabilities:e=>gn(t,e),getChainId:()=>dt(t),getPermissions:()=>bn(t),prepareAuthorization:e=>kt(t,e),prepareTransactionRequest:e=>Ft(t,e),requestAddresses:()=>wn(t),requestPermissions:e=>xn(t,e),sendCalls:e=>Pt(t,e),sendCallsSync:e=>En(t,e),sendRawTransaction:e=>qe(t,e),sendRawTransactionSync:e=>Ut(t,e),sendTransaction:e=>ut(t,e),sendTransactionSync:e=>Vt(t,e),showCallsStatus:e=>In(t,e),signAuthorization:e=>Tn(t,e),signMessage:e=>Cn(t,e),signTransaction:e=>vn(t,e),signTypedData:e=>Sn(t,e),switchChain:e=>An(t,e),waitForCallsStatus:e=>_t(t,e),watchAsset:e=>Pn(t,e),writeContract:e=>D(t,e),writeContractSync:e=>_n(t,e)}}function sr(t){const{key:e="wallet",name:a="Wallet Client",transport:n}=t;return At({...t,key:e,name:a,transport:n,type:"walletClient"}).extend(Rn)}function or(t,e={}){const{key:a="custom",methods:n,name:r="Custom Provider",retryDelay:s}=e;return({retryCount:c})=>mt({key:a,methods:n,name:r,request:t.request.bind(t),retryCount:e.retryCount??c,retryDelay:s,type:"custom"})}function ir(t,e={}){const{key:a="fallback",name:n="Fallback",rank:r=!1,shouldThrow:s=qn,retryCount:c,retryDelay:d}=e;return({chain:u,pollingInterval:i=4e3,timeout:f,...l})=>{let h=t,o=()=>{};const p=mt({key:a,name:n,async request({method:m,params:y}){let w;const g=async(C=0)=>{const b=h[C]({...l,chain:u,retryCount:0,timeout:f});try{const x=await b.request({method:m,params:y});return o({method:m,params:y,response:x,transport:b,status:"success"}),x}catch(x){if(o({error:x,method:m,params:y,transport:b,status:"error"}),s(x)||C===h.length-1||(w??(w=h.slice(C+1).some(I=>{const{include:T,exclude:v}=I({chain:u}).config.methods||{};return T?T.includes(m):v?!v.includes(m):!0})),!w))throw x;return g(C+1)}};return g()},retryCount:c,retryDelay:d,type:"fallback"},{onResponse:m=>o=m,transports:h.map(m=>m({chain:u,retryCount:0}))});if(r){const m=typeof r=="object"?r:{};Fn({chain:u,interval:m.interval??i,onTransports:y=>h=y,ping:m.ping,sampleCount:m.sampleCount,timeout:m.timeout,transports:h,weights:m.weights})}return p}}function qn(t){return!!("code"in t&&typeof t.code=="number"&&(t.code===na.code||t.code===ra.code||Fe.nodeMessage.test(t.message)||t.code===5e3))}function Fn({chain:t,interval:e=4e3,onTransports:a,ping:n,sampleCount:r=10,timeout:s=1e3,transports:c,weights:d={}}){const{stability:u=.7,latency:i=.3}=d,f=[],l=async()=>{const h=await Promise.all(c.map(async m=>{const y=m({chain:t,retryCount:0,timeout:s}),w=Date.now();let g,C;try{await(n?n({transport:y}):y.request({method:"net_listening"})),C=1}catch{C=0}finally{g=Date.now()}return{latency:g-w,success:C}}));f.push(h),f.length>r&&f.shift();const o=Math.max(...f.map(m=>Math.max(...m.map(({latency:y})=>y)))),p=c.map((m,y)=>{const w=f.map(I=>I[y].latency),C=1-w.reduce((I,T)=>I+T,0)/w.length/o,b=f.map(I=>I[y].success),x=b.reduce((I,T)=>I+T,0)/b.length;return x===0?[0,y]:[i*C+u*x,y]}).sort((m,y)=>y[0]-m[0]);a(p.map(([,m])=>c[m])),await Ue(e),l()};l()}function cr(t,e={}){const{keepAlive:a,key:n="webSocket",methods:r,name:s="WebSocket JSON-RPC",reconnect:c,retryDelay:d}=e;return({chain:u,retryCount:i,timeout:f})=>{var m;const l=e.retryCount??i,h=f??e.timeout??1e4,o=t||((m=u==null?void 0:u.rpcUrls.default.webSocket)==null?void 0:m[0]),p={keepAlive:a,reconnect:c};if(!o)throw new ke;return mt({key:n,methods:r,name:s,async request({method:y,params:w}){const g={method:y,params:w},C=await J(o,p),{error:b,result:x}=await C.requestAsync({body:g,timeout:h});if(b)throw new sa({body:g,error:b,url:o});return x},retryCount:l,retryDelay:d,timeout:h,type:"webSocket"},{getSocket(){return Ta(o)},getRpcClient(){return J(o,p)},async subscribe({params:y,onData:w,onError:g}){const C=await J(o,p),{result:b}=await new Promise((x,I)=>C.request({body:{method:"eth_subscribe",params:y},onError(T){I(T),g==null||g(T)},onResponse(T){if(T.error){I(T.error),g==null||g(T.error);return}if(typeof T.id=="number"){x(T);return}T.method==="eth_subscription"&&w(T.params)}}));return{subscriptionId:b,async unsubscribe(){return new Promise(x=>C.request({body:{method:"eth_unsubscribe",params:[b]},onResponse:x}))}}}})}}class ur extends Error{constructor(e,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=a}}const it="/docs/contract/decodeDeployData";function dr(t){const{abi:e,bytecode:a,data:n}=t;if(n===a)return{bytecode:a};const r=e.find(c=>"type"in c&&c.type==="constructor");if(!r)throw new Xe({docsPath:it});if(!("inputs"in r))throw new xt({docsPath:it});if(!r.inputs||r.inputs.length===0)throw new xt({docsPath:it});return{args:Mt(r.inputs,`0x${n.replace(a,"")}`),bytecode:a}}function mr(t){const e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),a=typeof t.blobs[0]=="string"?t.blobs.map(d=>O(d)):t.blobs,n=a.reduce((d,u)=>d+u.length,0),r=ct(new Uint8Array(n));let s=!0;for(const d of a){const u=ct(d);for(;s&&u.position<d.length;){u.incrementPosition(1);let i=31;d.length-u.position<31&&(i=d.length-u.position);for(const f in Array.from({length:i})){const l=u.readByte();if(l===128&&!u.inspectBytes(u.remaining).includes(128)){s=!1;break}r.pushByte(l)}}}const c=r.bytes.slice(0,r.position);return e==="hex"?G(c):c}function lr(t){const{sidecars:e,version:a}=t,n=t.to??(typeof e[0].blob=="string"?"hex":"bytes"),r=[];for(const{commitment:s}of e)r.push(Be({commitment:s,to:n,version:a}));return r}const Un=2147483648;function fr(t){if(t===1)return 60n;if(t>=Un||t<0)throw new Ne({chainId:t});return BigInt((2147483648|t)>>>0)}function kn({blobToKzgCommitment:t,computeBlobKzgProof:e}){return{blobToKzgCommitment:t,computeBlobKzgProof:e}}function hr(t,e){try{t.loadTrustedSetup(e)}catch(a){const n=a;if(!n.message.includes("trusted setup is already loaded"))throw n}return kn(t)}function pr({r:t,yParityAndS:e}){const a=O(e),n=a[0]&128?1:0,r=a;return n===1&&(r[0]&=127),{r:t,s:G(r),yParity:n}}function yr(t){const{r:e,s:a}=Bt.Signature.fromCompact(t.slice(2,130));return{r:R(e,{size:32}),yParityAndS:R(a,{size:32})}}async function gr(t){const{serializedTransaction:e,signature:a}=t,n=_a(e),r=a??{r:n.r,s:n.s,v:n.v,yParity:n.yParity},s=Le({...n,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await Y({hash:X(s),signature:r})}function br({r:t,yParityAndS:e}){return`0x${new Bt.Signature(A(t),A(e)).toCompactHex()}`}function wr(t){const{r:e,s:a,v:n,yParity:r}=t,s=Number(r??n-27n);let c=a;if(s===1){const d=O(a);d[0]|=128,c=G(d)}return{r:e,yParityAndS:c}}export{Xe as AbiConstructorNotFoundError,xt as AbiConstructorParamsNotFoundError,Co as AbiDecodingDataSizeInvalidError,vo as AbiDecodingDataSizeTooSmallError,So as AbiDecodingZeroDataError,Ao as AbiEncodingArrayLengthMismatchError,Po as AbiEncodingBytesSizeMismatchError,_o as AbiEncodingLengthMismatchError,Ro as AbiErrorInputsNotFoundError,qo as AbiErrorNotFoundError,Fo as AbiErrorSignatureNotFoundError,Uo as AbiEventNotFoundError,ko as AbiEventSignatureEmptyTopicsError,Bo as AbiEventSignatureNotFoundError,No as AbiFunctionNotFoundError,Lo as AbiFunctionOutputsNotFoundError,Do as AbiFunctionSignatureNotFoundError,Ir as AccountStateConflictError,Ji as AtomicReadyWalletRejectedUpgradeError,Xi as AtomicityNotSupportedError,Nt as BaseError,Tr as BaseFeeScalarError,Cr as BlockNotFoundError,vr as BundleFailedError,Qi as BundleTooLargeError,Mo as BytesSizeMismatchError,Sr as CallExecutionError,Yi as ChainDisconnectedError,Ar as ChainDoesNotSupportContract,Pr as ChainMismatchError,_r as ChainNotFoundError,Rr as CircularReferenceError,qr as ClientChainNotConfiguredError,Fr as ContractFunctionExecutionError,Ur as ContractFunctionRevertedError,kr as ContractFunctionZeroDataError,Br as CounterfactualDeploymentFailedError,zo as DecodeLogDataMismatch,Go as DecodeLogTopicsMismatch,Zi as DuplicateIdError,ur as EIP1193ProviderRpcError,Nr as Eip1559FeesNotSupportedError,Lr as EnsAvatarInvalidNftUriError,Dr as EnsAvatarUnsupportedNamespaceError,Mr as EnsAvatarUriResolutionError,Ne as EnsInvalidChainIdError,zr as EstimateGasExecutionError,Fe as ExecutionRevertedError,Gr as FeeCapTooHighError,Hr as FeeCapTooLowError,Or as FeeConflictError,Ho as FilterTypeNotSupportedError,tc as HttpRequestError,$r as InsufficientFundsError,Oo as IntegerOutOfRangeError,ec as InternalRpcError,jr as IntrinsicGasTooHighError,Wr as IntrinsicGasTooLowError,$o as InvalidAbiDecodingTypeError,jo as InvalidAbiEncodingTypeError,Vr as InvalidAbiItemError,Yt as InvalidAbiParameterError,Kr as InvalidAbiParametersError,Jr as InvalidAbiTypeParameterError,je as InvalidAddressError,Wo as InvalidArrayError,Vo as InvalidBytesBooleanError,Xr as InvalidChainIdError,Qr as InvalidDecimalNumberError,Ko as InvalidDefinitionTypeError,Hi as InvalidDomainError,Yr as InvalidFunctionModifierError,Jo as InvalidHexBooleanError,Ge as InvalidHexValueError,ac as InvalidInputRpcError,Ee as InvalidLegacyVError,Zr as InvalidModifierError,ts as InvalidParameterError,nc as InvalidParamsRpcError,es as InvalidParenthesisError,Oi as InvalidPrimaryTypeError,rc as InvalidRequestRpcError,as as InvalidSerializableTransactionError,H as InvalidSerializedTransactionError,he as InvalidSerializedTransactionTypeError,ns as InvalidSignatureError,rs as InvalidStorageKeySizeError,ss as InvalidStructSignatureError,$i as InvalidStructTypeError,sc as JsonRpcVersionUnsupportedError,oc as LimitExceededRpcError,os as MaxFeePerGasTooLowError,ic as MethodNotFoundRpcError,cc as MethodNotSupportedRpcError,is as NonceMaxValueError,cs as NonceTooHighError,us as NonceTooLowError,uc as ParseRpcError,dc as ProviderDisconnectedError,mc as ProviderRpcError,ds as RawContractError,lc as ResourceNotFoundRpcError,fc as ResourceUnavailableRpcError,hc as RpcError,sa as RpcRequestError,Xo as SizeExceedsPaddingSizeError,Qo as SizeOverflowError,Yo as SliceOffsetOutOfBoundsError,Q as SocketClosedError,ms as SolidityProtectedKeywordError,ls as StateAssignmentConflictError,pc as SwitchChainError,aa as TimeoutError,fs as TipAboveFeeCapError,hs as TransactionExecutionError,ps as TransactionNotFoundError,ys as TransactionReceiptNotFoundError,na as TransactionRejectedRpcError,gs as TransactionTypeNotSupportedError,yc as UnauthorizedProviderError,gc as UnknownBundleIdError,bs as UnknownNodeError,bc as UnknownRpcError,ws as UnknownSignatureError,xs as UnknownTypeError,wc as UnsupportedChainIdError,xc as UnsupportedNonOptionalCapabilityError,Zo as UnsupportedPackedAbiType,Ec as UnsupportedProviderMethodError,ke as UrlRequiredError,ra as UserRejectedRequestError,Es as WaitForCallsStatusTimeoutError,Is as WaitForTransactionReceiptTimeoutError,Et as WebSocketRequestError,qt as assertCurrentChain,Rt as assertRequest,be as assertTransactionEIP1559,we as assertTransactionEIP2930,xe as assertTransactionLegacy,Ts as blobsToCommitments,Cs as blobsToProofs,ti as boolToBytes,ei as boolToHex,ai as bytesToBigInt,ni as bytesToBool,G as bytesToHex,ri as bytesToNumber,Tc as bytesToRlp,si as bytesToString,bd as ccipFetch,wd as ccipRequest,Ve as checksumAddress,Be as commitmentToVersionedHash,vs as commitmentsToVersionedHashes,br as compactSignatureToHex,pr as compactSignatureToSignature,ze as concat,oi as concatBytes,ii as concatHex,At as createClient,Ss as createNonceManager,As as createPublicClient,rr as createTestClient,mt as createTransport,sr as createWalletClient,or as custom,Mt as decodeAbiParameters,dr as decodeDeployData,qi as decodeErrorResult,pd as decodeEventLog,Ps as decodeFunctionData,_s as decodeFunctionResult,Fi as defineBlock,Ui as defineChain,kn as defineKzg,ki as defineTransaction,Cd as defineTransactionReceipt,Bi as defineTransactionRequest,Rs as deploylessCallViaBytecodeBytecode,qs as deploylessCallViaFactoryBytecode,ji as domainSeparator,ci as encodeAbiParameters,Ce as encodeDeployData,Fs as encodeErrorResult,ui as encodeEventTopics,Zt as encodeFunctionData,Us as encodeFunctionResult,ks as encodePacked,Bs as erc1155Abi,Ns as erc20Abi,Ls as erc20Abi_bytes32,Ds as erc4626Abi,Ms as erc6492SignatureValidatorAbi,zs as erc6492SignatureValidatorByteCode,Gs as erc721Abi,Hs as ethAddress,Ie as etherUnits,Kn as extractChain,ir as fallback,Ni as formatBlock,Os as formatEther,$s as formatGwei,vd as formatLog,Li as formatTransaction,Sd as formatTransactionReceipt,lt as formatTransactionRequest,js as formatUnits,mr as fromBlobs,di as fromBytes,mi as fromHex,zt as fromRlp,li as getAbiItem,k as getAddress,Ws as getChainContractAddress,Wn as getContract,Vn as getContractAddress,te as getContractError,da as getCreate2Address,ua as getCreateAddress,fi as getEventSelector,hi as getEventSignature,pi as getFunctionSelector,yi as getFunctionSignature,Pa as getSerializedTransactionType,Vs as getTransactionType,Ze as getTypesForEIP712Domain,Te as gweiUnits,Wi as hashDomain,le as hashMessage,Vi as hashStruct,Ye as hashTypedData,A as hexToBigInt,gi as hexToBool,O as hexToBytes,yr as hexToCompactSignature,F as hexToNumber,Cc as hexToRlp,Ks as hexToSignature,bi as hexToString,Js as http,$e as isAddress,ft as isAddressEqual,It as isBytes,Ca as isErc6492Signature,va as isErc8010Signature,la as isHash,E as isHex,X as keccak256,Xs as labelhash,vc as maxInt104,Sc as maxInt112,Ac as maxInt120,Pc as maxInt128,_c as maxInt136,Rc as maxInt144,qc as maxInt152,Fc as maxInt16,Uc as maxInt160,kc as maxInt168,Bc as maxInt176,Nc as maxInt184,Lc as maxInt192,Dc as maxInt200,Mc as maxInt208,zc as maxInt216,Gc as maxInt224,Hc as maxInt232,Oc as maxInt24,$c as maxInt240,jc as maxInt248,Wc as maxInt256,Vc as maxInt32,Kc as maxInt40,Jc as maxInt48,Xc as maxInt56,Qc as maxInt64,Yc as maxInt72,Zc as maxInt8,tu as maxInt80,eu as maxInt88,au as maxInt96,nu as maxUint104,ru as maxUint112,su as maxUint120,ou as maxUint128,iu as maxUint136,cu as maxUint144,uu as maxUint152,du as maxUint16,mu as maxUint160,lu as maxUint168,fu as maxUint176,hu as maxUint184,pu as maxUint192,yu as maxUint200,gu as maxUint208,bu as maxUint216,wu as maxUint224,xu as maxUint232,Eu as maxUint24,Iu as maxUint240,Tu as maxUint248,Cu as maxUint256,vu as maxUint32,Su as maxUint40,Au as maxUint48,Pu as maxUint56,_u as maxUint64,Ru as maxUint72,qu as maxUint8,Fu as maxUint80,Uu as maxUint88,ku as maxUint96,Bu as minInt104,Nu as minInt112,Lu as minInt120,Du as minInt128,Mu as minInt136,zu as minInt144,Gu as minInt152,Hu as minInt16,Ou as minInt160,$u as minInt168,ju as minInt176,Wu as minInt184,Vu as minInt192,Ku as minInt200,Ju as minInt208,Xu as minInt216,Qu as minInt224,Yu as minInt232,Zu as minInt24,td as minInt240,ed as minInt248,ad as minInt256,nd as minInt32,rd as minInt40,sd as minInt48,od as minInt56,id as minInt64,cd as minInt72,ud as minInt8,dd as minInt80,md as minInt88,ld as minInt96,Qs as multicall3Abi,Ys as namehash,Zs as nonceManager,wi as numberToBytes,R as numberToHex,xd as offchainLookup,Ed as offchainLookupAbiItem,Id as offchainLookupSignature,De as pad,xi as padBytes,wt as padHex,to as parseAbi,eo as parseAbiItem,jn as parseAbiParameter,ao as parseAbiParameters,yr as parseCompactSignature,Xn as parseErc6492Signature,Qn as parseErc8010Signature,ar as parseEther,yd as parseEventLogs,nr as parseGwei,no as parseSignature,_a as parseTransaction,vt as parseUnits,ro as prepareEncodeFunctionData,so as presignMessagePrefix,oo as publicActions,Y as recoverAddress,Sa as recoverMessageAddress,io as recoverPublicKey,gr as recoverTransactionAddress,Aa as recoverTypedDataAddress,Jn as ripemd160,co as rpcSchema,Di as rpcTransactionType,uo as serializeAccessList,br as serializeCompactSignature,mo as serializeErc6492Signature,Yn as serializeErc8010Signature,lo as serializeSignature,Le as serializeTransaction,ea as serializeTypedData,Ei as setErrorConfig,hr as setupKzg,fd as sha256,qn as shouldThrow,lr as sidecarsToVersionedHashes,wr as signatureToCompactSignature,fo as signatureToHex,He as size,Me as slice,Ii as sliceBytes,Dt as sliceHex,Ti as stringToBytes,Je as stringToHex,Mi as stringify,fn as testActions,ye as toBlobSidecars,ho as toBlobs,B as toBytes,fr as toCoinType,Ci as toEventHash,vi as toEventSelector,Si as toEventSignature,Ai as toFunctionHash,Pi as toFunctionSelector,_i as toFunctionSignature,Lt as toHex,po as toPrefixedMessage,ia as toRlp,zi as transactionType,We as trim,yo as universalSignatureValidatorAbi,go as universalSignatureValidatorByteCode,ta as validateTypedData,Zn as verifyHash,tr as verifyMessage,er as verifyTypedData,Rn as walletActions,cr as webSocket,bo as weiUnits,wo as withCache,xo as withRetry,Qe as withTimeout,Eo as zeroAddress,Io as zeroHash};
1
+ import{p as yt,b as Xt,i as Qt,I as Yt,m as gt,s as ut,A as M,e as Zt,g as U,d as te,f as N,r as ee,h as ae,j as ne,k as re,w as se,n as oe,o as ie,q as ce,t as ue,v as de,u as me,x as Y,y as le,z as fe,B as he,C as H,D as pe,E as ye,F as ge,G as be,H as we,J as xe,K as Ee,L as vt,M as Ie,N as Te,O as St,P as At,Q as Ce,R as Pt,S as _t,T as Rt,U as ve,V as dt,W as qt,X as Se,Y as Ae,Z as Ft,_ as Pe,$ as Ut,a0 as K,a1 as _e,a2 as kt,a3 as Re,a4 as qe,a5 as mt,a6 as Fe,a7 as Ue,a8 as ke,a9 as Be,aa as Ne,ab as Bt,ac as Le}from"./parseSignature-6692cf8f.js";import{bg as Ir,b2 as Tr,aN as Cr,aO as vr,aU as Sr,aP as Ar,aQ as Pr,aR as _r,ad as Rr,aS as qr,aV as Fr,aW as Ur,aX as kr,aY as Br,b3 as Nr,a_ as Lr,a$ as Dr,b0 as Mr,b1 as zr,b5 as Gr,b6 as Hr,bi as Or,b7 as $r,b8 as jr,b9 as Wr,ae as Vr,af as Kr,ag as Jr,aT as Xr,bp as Qr,ah as Yr,ai as Zr,aj as ts,ak as es,bj as as,al as ns,bk as rs,am as ss,b4 as os,ba as is,bb as cs,bc as us,aZ as ds,aq as ms,bh as ls,bd as fs,bl as hs,bm as ps,bn as ys,be as gs,bf as bs,ar as ws,as as xs,at as Es,bo as Is,bw as Ts,bx as Cs,by as vs,bD as Ss,av as As,bq as Ps,br as _s,aI as Rs,aJ as qs,bs as Fs,bt as Us,bu as ks,aB as Bs,ay as Ns,az as Ls,aC as Ds,aD as Ms,aK as zs,aA as Gs,aF as Hs,bO as Os,bP as $s,bQ as js,bA as Ws,bM as Vs,bH as Ks,ax as Js,bB as Xs,aE as Qs,bC as Ys,bE as Zs,an as to,ao as eo,ap as ao,bH as no,bv as ro,aL as so,aw as oo,bI as io,au as co,bN as uo,bJ as mo,bK as lo,bK as fo,bz as ho,bL as po,aD as yo,aK as go,aM as bo,bF as wo,bG as xo,aG as Eo,aH as Io}from"./parseSignature-6692cf8f.js";import{z as B,b6 as k,C as X,A as De,a7 as Me,p as ze,b7 as Ge,y as O,V as ct,W as G,B as Nt,q as E,J as He,a2 as Oe,b8 as j,a1 as bt,L as Lt,b9 as Dt,b as Mt,F as R,o as F,ba as A,G as $e,I as je,bb as We,bc as wt,D as Ve,bd as Ke,be as Je,bf as Xe,bg as xt}from"./prepare-contract-call-61ed7f10.js";import{bh as Co,S as vo,a8 as So,bi as Ao,bj as Po,bk as _o,bl as Ro,bm as qo,aa as Fo,bn as Uo,N as ko,Q as Bo,bo as No,bp as Lo,bq as Do,K as Mo,U as zo,R as Go,bD as Ho,bz as Oo,br as $o,bs as jo,bt as Wo,bA as Vo,bu as Ko,bB as Jo,bx as Xo,bC as Qo,by as Yo,bv as Zo,bS as ti,bV as ei,bK as ai,bL as ni,bM as ri,bN as si,bG as oi,bH as ii,j as ci,bE as ui,bO as di,bP as mi,bF as li,O as fi,bX as hi,a9 as pi,bX as yi,bQ as gi,bR as bi,bT as wi,bI as xi,bw as Ei,bJ as Ii,bU as Ti,bW as Ci,O as vi,bX as Si,bW as Ai,a9 as Pi,bX as _i}from"./prepare-contract-call-61ed7f10.js";import{u as lt}from"./to-serializable-transaction-f4f170dd.js";import{b as qi,C as Fi,B as Ui,D as ki,E as Bi,m as Ni,n as Li,F as Di,s as Mi,a as zi}from"./to-serializable-transaction-f4f170dd.js";import{w as Qe,h as Ye,g as Ze,v as ta,s as ea}from"./hashTypedData-f2ac0c46.js";import{I as Hi,a as Oi,b as $i,e as ji,c as Wi,d as Vi}from"./hashTypedData-f2ac0c46.js";import{T as aa,a as Q,W as Et,b as na,U as ra,R as sa}from"./rpc-270b3a16.js";import{c as Ji,A as Xi,B as Qi,C as Yi,D as Zi,H as tc,I as ec,d as ac,e as nc,f as rc,J as sc,L as oc,M as ic,h as cc,P as uc,i as dc,j as mc,k as lc,l as fc,m as hc,S as pc,n as yc,o as gc,p as bc,q as wc,r as xc,s as Ec}from"./rpc-270b3a16.js";import{_ as oa}from"./index-7ad60780.js";import{t as ia,H as ca}from"./sha256-912f9e4c.js";import{aJ as Tc,aK as Cc,n as vc,o as Sc,p as Ac,q as Pc,r as _c,u as Rc,v as qc,b as Fc,w as Uc,x as kc,y as Bc,z as Nc,A as Lc,B as Dc,C as Mc,D as zc,E as Gc,F as Hc,c as Oc,G as $c,I as jc,J as Wc,d as Vc,e as Kc,f as Jc,g as Xc,h as Qc,i as Yc,a as Zc,j as tu,k as eu,l as au,V as nu,W as ru,X as su,Y as ou,Z as iu,_ as cu,$ as uu,m as du,a0 as mu,a1 as lu,a2 as fu,a3 as hu,a4 as pu,a5 as yu,a6 as gu,a7 as bu,a8 as wu,a9 as xu,L as Eu,aa as Iu,ab as Tu,ac as Cu,M as vu,N as Su,O as Au,P as Pu,Q as _u,R as Ru,K as qu,S as Fu,T as Uu,U as ku,ap as Bu,aq as Nu,ar as Lu,as as Du,at as Mu,au as zu,av as Gu,ae as Hu,aw as Ou,ax as $u,ay as ju,az as Wu,aA as Vu,aB as Ku,aC as Ju,aD as Xu,aE as Qu,aF as Yu,af as Zu,aG as td,aH as ed,aI as ad,ag as nd,ah as rd,ai as sd,aj as od,ak as id,al as cd,ad as ud,am as dd,an as md,ao as ld,s as fd}from"./sha256-912f9e4c.js";import{i as ft}from"./get-bytecode-a32ec435.js";import{d as pd,a as yd}from"./get-bytecode-a32ec435.js";import{ccipRequest as bd,ccipRequest as wd,offchainLookup as xd,offchainLookupAbiItem as Ed,offchainLookupSignature as Id}from"./ccip-68ca0fd0.js";import{d as Cd,a as vd,f as Sd}from"./transactionReceipt-048e59e4.js";import"./utils-13a7e3ab.js";import"./transaction-de6aa420.js";function jn(t){let e;if(typeof t=="string")e=yt(t,{modifiers:gt});else{const a=Xt(t),n=t.length;for(let r=0;r<n;r++){const s=t[r];if(!Qt(s)){e=yt(s,{modifiers:gt,structs:a});break}}}if(!e)throw new Yt({param:t});return e}async function D(t,e){return D.internal(t,ut,"sendTransaction",e)}(function(t){async function e(a,n,r,s){const{abi:c,account:d=a.account,address:u,args:i,dataSuffix:f,functionName:l,...h}=s;if(typeof d>"u")throw new M({docsPath:"/docs/contract/writeContract"});const o=d?N(d):null,p=Zt({abi:c,args:i,functionName:l});try{return await U(a,n,r)({data:`${p}${f?f.replace("0x",""):""}`,to:u,account:o,...h})}catch(m){throw te(m,{abi:c,address:u,args:i,docsPath:"/docs/contract/writeContract",functionName:l,sender:o==null?void 0:o.address})}}t.internal=e})(D||(D={}));function Wn({abi:t,address:e,client:a}){const n=a,[r,s]=(()=>n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0])(),c=r!=null,d=s!=null,u={};let i=!1,f=!1,l=!1;for(const h of t)if(h.type==="function"?h.stateMutability==="view"||h.stateMutability==="pure"?i=!0:f=!0:h.type==="event"&&(l=!0),i&&f&&l)break;return c&&(i&&(u.read=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(r,ee,"readContract")({abi:t,address:e,functionName:o,args:m,...y})}}})),f&&(u.simulate=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(r,ae,"simulateContract")({abi:t,address:e,functionName:o,args:m,...y})}}})),l&&(u.createEventFilter=new Proxy({},{get(h,o){return(...p)=>{const m=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,m);return U(r,ne,"createContractEventFilter")({abi:t,address:e,eventName:o,args:y,...w})}}}),u.getEvents=new Proxy({},{get(h,o){return(...p)=>{const m=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,m);return U(r,re,"getContractEvents")({abi:t,address:e,eventName:o,args:y,...w})}}}),u.watchEvent=new Proxy({},{get(h,o){return(...p)=>{const m=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,m);return U(r,se,"watchContractEvent")({abi:t,address:e,eventName:o,args:y,...w})}}}))),d&&f&&(u.write=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(s,D,"writeContract")({abi:t,address:e,functionName:o,args:m,...y})}}})),(c||d)&&f&&(u.estimateGas=new Proxy({},{get(h,o){return(...p)=>{const{args:m,options:y}=W(p);return U(r??s,oe,"estimateContractGas")({abi:t,address:e,functionName:o,args:m,...y,account:y.account??s.account})}}})),u.address=e,u.abi=t,u}function W(t){const e=t.length&&Array.isArray(t[0]),a=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:a,options:n}}function rt(t,e){let a=!1;Array.isArray(t[0])?a=!0:t.length===1?a=e.inputs.some(s=>s.indexed):t.length===2&&(a=!0);const n=a?t[0]:void 0,r=(a?t[1]:t[0])??{};return{args:n,options:r}}function It(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}function Vn(t){return t.opcode==="CREATE2"?da(t):ua(t)}function ua(t){const e=B(k(t.from));let a=B(t.nonce);return a[0]===0&&(a=new Uint8Array([])),k(`0x${X(ia([e,a],"bytes")).slice(26)}`)}function da(t){const e=B(k(t.from)),a=De(It(t.salt)?t.salt:B(t.salt),{size:32}),n=(()=>"bytecodeHash"in t?It(t.bytecodeHash)?t.bytecodeHash:B(t.bytecodeHash):X(t.bytecode,"bytes"))();return k(Me(X(ze([B("0xff"),e,a,n])),12))}function Kn({chains:t,id:e}){return t.find(a=>a.id===e)}function zt(t,e="hex"){const a=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new Ge(t);return O(t)}return t})(),n=ct(a,{recursiveReadLimit:Number.POSITIVE_INFINITY});return Gt(n,e)}function Gt(t,e="hex"){if(t.bytes.length===0)return e==="hex"?G(t.bytes):t.bytes;const a=t.readByte();if(a<128&&t.decrementPosition(1),a<192){const r=Tt(t,a,128),s=t.readBytes(r);return e==="hex"?G(s):s}const n=Tt(t,a,192);return ma(t,n,e)}function Tt(t,e,a){if(a===128&&e<128)return 1;if(e<=a+55)return e-a;if(e===a+55+1)return t.readUint8();if(e===a+55+2)return t.readUint16();if(e===a+55+3)return t.readUint24();if(e===a+55+4)return t.readUint32();throw new Nt("Invalid RLP prefix")}function ma(t,e,a){const n=t.position,r=[];for(;t.position-n<e;)r.push(Gt(t,a));return r}function la(t){return E(t)&&He(t)===32}const fa=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Ht=(()=>Uint8Array.from(new Array(16).fill(0).map((t,e)=>e)))(),ha=(()=>Ht.map(t=>(9*t+5)%16))(),Ot=(()=>{const a=[[Ht],[ha]];for(let n=0;n<4;n++)for(let r of a)r.push(r[n].map(s=>fa[s]));return a})(),$t=(()=>Ot[0])(),jt=(()=>Ot[1])(),Wt=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>Uint8Array.from(t)),pa=$t.map((t,e)=>t.map(a=>Wt[e][a])),ya=jt.map((t,e)=>t.map(a=>Wt[e][a])),ga=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),ba=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function Ct(t,e,a,n){return t===0?e^a^n:t===1?e&a|~e&n:t===2?(e|~a)^n:t===3?e&n|a&~n:e^(a|~n)}const V=new Uint32Array(16);class wa extends ca{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:n,h3:r,h4:s}=this;return[e,a,n,r,s]}set(e,a,n,r,s){this.h0=e|0,this.h1=a|0,this.h2=n|0,this.h3=r|0,this.h4=s|0}process(e,a){for(let o=0;o<16;o++,a+=4)V[o]=e.getUint32(a,!0);let n=this.h0|0,r=n,s=this.h1|0,c=s,d=this.h2|0,u=d,i=this.h3|0,f=i,l=this.h4|0,h=l;for(let o=0;o<5;o++){const p=4-o,m=ga[o],y=ba[o],w=$t[o],g=jt[o],C=pa[o],b=ya[o];for(let x=0;x<16;x++){const I=j(n+Ct(o,s,d,i)+V[w[x]]+m,C[x])+l|0;n=l,l=i,i=j(d,10)|0,d=s,s=I}for(let x=0;x<16;x++){const I=j(r+Ct(p,c,u,f)+V[g[x]]+y,b[x])+h|0;r=h,h=f,f=j(u,10)|0,u=c,c=I}}this.set(this.h1+d+f|0,this.h2+i+h|0,this.h3+l+r|0,this.h4+n+c|0,this.h0+s+u|0)}roundClean(){bt(V)}destroy(){this.destroyed=!0,bt(this.buffer),this.set(0,0,0,0,0)}}const xa=Oe(()=>new wa),Ea=xa;function Jn(t,e){const a=e||"hex",n=Ea(E(t,{strict:!1})?B(t):t);return a==="bytes"?n:Lt(n)}const st=new Map;async function Ia(t){const{getSocket:e,keepAlive:a=!0,key:n="socket",reconnect:r=!0,url:s}=t,{interval:c=3e4}=typeof a=="object"?a:{},{attempts:d=5,delay:u=2e3}=typeof r=="object"?r:{},i=JSON.stringify({keepAlive:a,key:n,url:s,reconnect:r});let f=st.get(i);if(f)return f;let l=0;const{schedule:h}=ie({id:i,fn:async()=>{const m=new Map,y=new Map;let w,g,C,b=!1;function x(){if(r&&l<d){if(b)return;b=!0,l++,g==null||g.close(),setTimeout(async()=>{await I().catch(console.error),b=!1},u)}else m.clear(),y.clear()}async function I(){const T=await e({onClose(){var v,P;for(const S of m.values())(v=S.onError)==null||v.call(S,new Q({url:s}));for(const S of y.values())(P=S.onError)==null||P.call(S,new Q({url:s}));x()},onError(v){var P,S;w=v;for(const _ of m.values())(P=_.onError)==null||P.call(_,w);for(const _ of y.values())(S=_.onError)==null||S.call(_,w);x()},onOpen(){w=void 0,l=0},onResponse(v){const P=v.method==="eth_subscription",S=P?v.params.subscription:v.id,_=P?y:m,q=_.get(S);q&&q.onResponse(v),P||_.delete(S)}});if(g=T,a&&(C&&clearInterval(C),C=setInterval(()=>{var v;return(v=g.ping)==null?void 0:v.call(g)},c)),r&&y.size>0){const v=y.entries();for(const[P,{onResponse:S,body:_,onError:q}]of v)_&&(y.delete(P),f==null||f.request({body:_,onResponse:S,onError:q}))}return T}return await I(),w=void 0,f={close(){C&&clearInterval(C),g.close(),st.delete(i)},get socket(){return g},request({body:T,onError:v,onResponse:P}){w&&v&&v(w);const S=T.id??ce.take(),_=q=>{var z;typeof q.id=="number"&&S!==q.id||(T.method==="eth_subscribe"&&typeof q.result=="string"&&y.set(q.result,{onResponse:_,onError:v,body:T}),T.method==="eth_unsubscribe"&&y.delete((z=T.params)==null?void 0:z[0]),P(q))};m.set(S,{onResponse:_,onError:v});try{g.request({body:{jsonrpc:"2.0",id:S,...T}})}catch(q){v==null||v(q)}},requestAsync({body:T,timeout:v=1e4}){return Qe(()=>new Promise((P,S)=>this.request({body:T,onError:S,onResponse:P})),{errorInstance:new aa({body:T,url:s}),timeout:v})},requests:m,subscriptions:y,url:s},st.set(i,f),[f]}}),[o,[p]]=await h();return p}async function J(t,e={}){const{keepAlive:a,reconnect:n}=e;return Ia({async getSocket({onClose:r,onError:s,onOpen:c,onResponse:d}){const u=await oa(()=>import("./native-8d26fb1e.js"),["assets/native-8d26fb1e.js","assets/index-7ad60780.js","assets/index-393d8500.css"]).then(o=>o.WebSocket),i=new u(t);function f(){i.removeEventListener("close",f),i.removeEventListener("message",l),i.removeEventListener("error",s),i.removeEventListener("open",c),r()}function l({data:o}){if(!(typeof o=="string"&&o.trim().length===0))try{const p=JSON.parse(o);d(p)}catch(p){s(p)}}i.addEventListener("close",f),i.addEventListener("message",l),i.addEventListener("error",s),i.addEventListener("open",c),i.readyState===u.CONNECTING&&await new Promise((o,p)=>{i&&(i.onopen=o,i.onerror=p)});const{close:h}=i;return Object.assign(i,{close(){h.bind(i)(),f()},ping(){try{if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new Et({url:i.url,cause:new Q({url:i.url})});const o={jsonrpc:"2.0",id:null,method:"net_version",params:[]};i.send(JSON.stringify(o))}catch(o){s(o)}},request({body:o}){if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new Et({body:o,url:i.url,cause:new Q({url:i.url})});return i.send(JSON.stringify(o))}})},keepAlive:a,reconnect:n,url:t})}async function Ta(t){const e=await J(t);return Object.assign(e.socket,{requests:e.requests,subscriptions:e.subscriptions})}function Ca(t){return Dt(t,-32)===ue}function va(t){return de(t)}function Xn(t){if(!Ca(t))return{signature:t};const[e,a,n]=Mt([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:e,data:a,signature:n}}function Qn(t){if(!va(t))return{signature:t};const{authorization:e,to:a,...n}=me(t);return{authorization:{address:e.address,chainId:e.chainId,nonce:Number(e.nonce),r:R(e.r,{size:32}),s:R(e.s,{size:32}),yParity:e.yParity},...a?{address:a}:{},...n}}async function Sa({message:t,signature:e}){return Y({hash:le(t),signature:e})}async function Aa(t){const{domain:e,message:a,primaryType:n,signature:r,types:s}=t;return Y({hash:Ye({domain:e,message:a,primaryType:n,types:s}),signature:r})}function Yn(t){const{address:e,data:a,signature:n,to:r="hex"}=t,s=fe({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:a,signature:n,to:e});return r==="hex"?s:O(s)}async function Zn({address:t,hash:e,signature:a}){return ft(k(t),await Y({hash:e,signature:a}))}async function tr({address:t,message:e,signature:a}){return ft(k(t),await Sa({message:e,signature:a}))}async function er(t){const{address:e,domain:a,message:n,primaryType:r,signature:s,types:c}=t;return ft(k(e),await Aa({domain:a,message:n,primaryType:r,signature:s,types:c}))}function Pa(t){const e=Dt(t,0,1);if(e==="0x04")return"eip7702";if(e==="0x03")return"eip4844";if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&F(e)>=192)return"legacy";throw new he({serializedType:e})}function _a(t){const e=Pa(t);return e==="eip1559"?Fa(t):e==="eip2930"?Ua(t):e==="eip4844"?qa(t):e==="eip7702"?Ra(t):ka(t)}function Ra(t){const e=Z(t),[a,n,r,s,c,d,u,i,f,l,h,o,p]=e;if(e.length!==10&&e.length!==13)throw new H({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:c,to:d,value:u,data:i,accessList:f,authorizationList:l,...e.length>9?{v:h,r:o,s:p}:{}},serializedTransaction:t,type:"eip7702"});const m={chainId:F(a),type:"eip7702"};return E(d)&&d!=="0x"&&(m.to=d),E(c)&&c!=="0x"&&(m.gas=A(c)),E(i)&&i!=="0x"&&(m.data=i),E(n)&&(m.nonce=n==="0x"?0:F(n)),E(u)&&u!=="0x"&&(m.value=A(u)),E(s)&&s!=="0x"&&(m.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(m.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(m.accessList=tt(f)),l.length!==0&&l!=="0x"&&(m.authorizationList=Ba(l)),pe(m),{...e.length===13?$(e):void 0,...m}}function qa(t){const e=Z(t),a=e.length===4,n=a?e[0]:e,r=a?e.slice(1):[],[s,c,d,u,i,f,l,h,o,p,m,y,w,g]=n,[C,b,x]=r;if(!(n.length===11||n.length===14))throw new H({attributes:{chainId:s,nonce:c,maxPriorityFeePerGas:d,maxFeePerGas:u,gas:i,to:f,value:l,data:h,accessList:o,...n.length>9?{v:y,r:w,s:g}:{}},serializedTransaction:t,type:"eip4844"});const I={blobVersionedHashes:m,chainId:F(s),to:f,type:"eip4844"};return E(i)&&i!=="0x"&&(I.gas=A(i)),E(h)&&h!=="0x"&&(I.data=h),E(c)&&(I.nonce=c==="0x"?0:F(c)),E(l)&&l!=="0x"&&(I.value=A(l)),E(p)&&p!=="0x"&&(I.maxFeePerBlobGas=A(p)),E(u)&&u!=="0x"&&(I.maxFeePerGas=A(u)),E(d)&&d!=="0x"&&(I.maxPriorityFeePerGas=A(d)),o.length!==0&&o!=="0x"&&(I.accessList=tt(o)),C&&b&&x&&(I.sidecars=ye({blobs:C,commitments:b,proofs:x})),ge(I),{...n.length===14?$(n):void 0,...I}}function Fa(t){const e=Z(t),[a,n,r,s,c,d,u,i,f,l,h,o]=e;if(!(e.length===9||e.length===12))throw new H({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:c,to:d,value:u,data:i,accessList:f,...e.length>9?{v:l,r:h,s:o}:{}},serializedTransaction:t,type:"eip1559"});const p={chainId:F(a),type:"eip1559"};return E(d)&&d!=="0x"&&(p.to=d),E(c)&&c!=="0x"&&(p.gas=A(c)),E(i)&&i!=="0x"&&(p.data=i),E(n)&&(p.nonce=n==="0x"?0:F(n)),E(u)&&u!=="0x"&&(p.value=A(u)),E(s)&&s!=="0x"&&(p.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(p.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(p.accessList=tt(f)),be(p),{...e.length===12?$(e):void 0,...p}}function Ua(t){const e=Z(t),[a,n,r,s,c,d,u,i,f,l,h]=e;if(!(e.length===8||e.length===11))throw new H({attributes:{chainId:a,nonce:n,gasPrice:r,gas:s,to:c,value:d,data:u,accessList:i,...e.length>8?{v:f,r:l,s:h}:{}},serializedTransaction:t,type:"eip2930"});const o={chainId:F(a),type:"eip2930"};return E(c)&&c!=="0x"&&(o.to=c),E(s)&&s!=="0x"&&(o.gas=A(s)),E(u)&&u!=="0x"&&(o.data=u),E(n)&&(o.nonce=n==="0x"?0:F(n)),E(d)&&d!=="0x"&&(o.value=A(d)),E(r)&&r!=="0x"&&(o.gasPrice=A(r)),i.length!==0&&i!=="0x"&&(o.accessList=tt(i)),we(o),{...e.length===11?$(e):void 0,...o}}function ka(t){const e=zt(t,"hex"),[a,n,r,s,c,d,u,i,f]=e;if(!(e.length===6||e.length===9))throw new H({attributes:{nonce:a,gasPrice:n,gas:r,to:s,value:c,data:d,...e.length>6?{v:u,r:i,s:f}:{}},serializedTransaction:t,type:"legacy"});const l={type:"legacy"};if(E(s)&&s!=="0x"&&(l.to=s),E(r)&&r!=="0x"&&(l.gas=A(r)),E(d)&&d!=="0x"&&(l.data=d),E(a)&&(l.nonce=a==="0x"?0:F(a)),E(c)&&c!=="0x"&&(l.value=A(c)),E(n)&&n!=="0x"&&(l.gasPrice=A(n)),xe(l),e.length===6)return l;const h=E(u)&&u!=="0x"?A(u):0n;if(f==="0x"&&i==="0x")return h>0&&(l.chainId=Number(h)),l;const o=h,p=Number((o-35n)/2n);if(p>0)l.chainId=p;else if(o!==27n&&o!==28n)throw new Ee({v:o});return l.v=o,l.s=f,l.r=i,l.yParity=o%2n===0n?1:0,l}function Z(t){return zt(`0x${t.slice(4)}`,"hex")}function tt(t){const e=[];for(let a=0;a<t.length;a++){const[n,r]=t[a];if(!$e(n,{strict:!1}))throw new je({address:n});e.push({address:n,storageKeys:r.map(s=>la(s)?s:We(s))})}return e}function Ba(t){const e=[];for(let a=0;a<t.length;a++){const[n,r,s,c,d,u]=t[a];e.push({address:r,chainId:n==="0x"?0:F(n),nonce:s==="0x"?0:F(s),...$([c,d,u])})}return e}function $(t){const e=t.slice(-3),a=e[0]==="0x"||A(e[0])===0n?27n:28n;return{r:wt(e[1],{size:32}),s:wt(e[2],{size:32}),v:a,yParity:a===27n?0:1}}function ar(t,e="wei"){return vt(t,Ie[e])}function nr(t,e="wei"){return vt(t,Te[e])}async function Na(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function La(t){return t.request({method:`${t.mode}_dumpState`})}async function Da(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function Ma(t){return await t.request({method:"txpool_content"})}async function za(t){const{pending:e,queued:a}=await t.request({method:"txpool_status"});return{pending:F(e),queued:F(a)}}async function Ga(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function Ha(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[R(e)]})}async function Oa(t){return await t.request({method:"txpool_inspect"})}async function $a(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function ja(t,{blocks:e,interval:a}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:R(e)}]}):await t.request({method:`${t.mode}_mine`,params:[R(e),R(a||0)]})}async function Wa(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function Va(t,{blockNumber:e,jsonRpcUrl:a}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:a}}]})}async function Ka(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function Ja(t,e){var w,g,C;const{accessList:a,data:n,from:r,gas:s,gasPrice:c,maxFeePerGas:d,maxPriorityFeePerGas:u,nonce:i,to:f,value:l,...h}=e,o=(C=(g=(w=t.chain)==null?void 0:w.formatters)==null?void 0:g.transactionRequest)==null?void 0:C.format,m=(o||lt)({...St(h,{format:o}),accessList:a,data:n,from:r,gas:s,gasPrice:c,maxFeePerGas:d,maxPriorityFeePerGas:u,nonce:i,to:f,value:l},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[m]})}async function Xa(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function Qa(t,{address:e,value:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,R(a)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,R(a)]})}async function Ya(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[R(e)]})}async function Za(t,{interval:e}){const a=(()=>t.mode==="hardhat"?e*1e3:e)();await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[a]})}async function tn(t,{address:e,bytecode:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[e,a]}):await t.request({method:`${t.mode}_setCode`,params:[e,a]})}async function en(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function an(t,{interval:e}){const a=(()=>t.mode==="hardhat"?e*1e3:e)();await t.request({method:"evm_setIntervalMining",params:[a]})}async function nn(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function rn(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[R(e)]})}async function sn(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[R(e)]})}async function on(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[R(e)]})}async function cn(t,{address:e,nonce:a}){await t.request({method:`${t.mode}_setNonce`,params:[e,R(a)]})}async function un(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function dn(t,{address:e,index:a,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof a=="number"?R(a):a,n]})}async function mn(t){return await t.request({method:"evm_snapshot"})}async function ln(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function fn({mode:t}){return e=>{const a=e.extend(()=>({mode:t}));return{dropTransaction:n=>Na(a,n),dumpState:()=>La(a),getAutomine:()=>Da(a),getTxpoolContent:()=>Ma(a),getTxpoolStatus:()=>za(a),impersonateAccount:n=>Ga(a,n),increaseTime:n=>Ha(a,n),inspectTxpool:()=>Oa(a),loadState:n=>$a(a,n),mine:n=>ja(a,n),removeBlockTimestampInterval:()=>Wa(a),reset:n=>Va(a,n),revert:n=>Ka(a,n),sendUnsignedTransaction:n=>Ja(a,n),setAutomine:n=>Xa(a,n),setBalance:n=>Qa(a,n),setBlockGasLimit:n=>Ya(a,n),setBlockTimestampInterval:n=>Za(a,n),setCode:n=>tn(a,n),setCoinbase:n=>en(a,n),setIntervalMining:n=>an(a,n),setLoggingEnabled:n=>nn(a,n),setMinGasPrice:n=>rn(a,n),setNextBlockBaseFeePerGas:n=>sn(a,n),setNextBlockTimestamp:n=>on(a,n),setNonce:n=>cn(a,n),setRpcUrl:n=>un(a,n),setStorageAt:n=>dn(a,n),snapshot:()=>mn(a),stopImpersonatingAccount:n=>ln(a,n)}}}function rr(t){const{key:e="test",name:a="Test Client",mode:n}=t;return At({...t,key:e,name:a,type:"testClient"}).extend(s=>({mode:n,...fn({mode:n})(s)}))}async function hn(t,{chain:e}){const{id:a,name:n,nativeCurrency:r,rpcUrls:s,blockExplorers:c}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:R(a),chainName:n,nativeCurrency:r,rpcUrls:s.default.http,blockExplorerUrls:c?Object.values(c).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}function pn(t,e){const{abi:a,args:n,bytecode:r,...s}=e,c=Ce({abi:a,args:n,bytecode:r});return ut(t,{...s,...s.authorizationList?{to:null}:{},data:c})}async function yn(t){var a;return((a=t.account)==null?void 0:a.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Ve(n))}async function gn(t,e={}){const{account:a=t.account,chainId:n}=e,r=a?N(a):void 0,s=n?[r==null?void 0:r.address,[R(n)]]:[r==null?void 0:r.address],c=await t.request({method:"wallet_getCapabilities",params:s}),d={};for(const[u,i]of Object.entries(c)){d[Number(u)]={};for(let[f,l]of Object.entries(i))f==="addSubAccount"&&(f="unstable_addSubAccount"),d[Number(u)][f]=l}return typeof n=="number"?d[n]:d}async function bn(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function wn(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>k(a))}async function xn(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function En(t,e){const{chain:a=t.chain}=e,n=e.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),r=await Pt(t,e);return await _t(t,{...e,id:r.id,timeout:n})}const ot=new Ke(128);async function Vt(t,e){var x,I,T,v;const{account:a=t.account,chain:n=t.chain,accessList:r,authorizationList:s,blobs:c,data:d,gas:u,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:l,maxPriorityFeePerGas:h,nonce:o,pollingInterval:p,throwOnReceiptRevert:m,type:y,value:w,...g}=e,C=e.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof a>"u")throw new M({docsPath:"/docs/actions/wallet/sendTransactionSync"});const b=a?N(a):null;try{Rt(e);const P=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await ve({authorization:s[0]}).catch(()=>{throw new Nt("`to` is required. Could not infer from `authorizationList`.")})})();if((b==null?void 0:b.type)==="json-rpc"||b===null){let S;n!==null&&(S=await U(t,dt,"getChainId")({}),qt({currentChainId:S,chain:n}));const _=(T=(I=(x=t.chain)==null?void 0:x.formatters)==null?void 0:I.transactionRequest)==null?void 0:T.format,z=(_||lt)({...St(g,{format:_}),accessList:r,account:b,authorizationList:s,blobs:c,chainId:S,data:d,gas:u,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:l,maxPriorityFeePerGas:h,nonce:o,to:P,type:y,value:w},"sendTransaction"),ht=ot.get(t.uid),Kt=ht?"wallet_sendTransaction":"eth_sendTransaction",Jt=await(async()=>{try{return await t.request({method:Kt,params:[z]},{retryCount:0})}catch(pt){if(ht===!1)throw pt;const L=pt;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[z]},{retryCount:0}).then(at=>(ot.set(t.uid,!0),at)).catch(at=>{const nt=at;throw nt.name==="MethodNotFoundRpcError"||nt.name==="MethodNotSupportedRpcError"?(ot.set(t.uid,!1),L):nt});throw L}})(),et=await U(t,Se,"waitForTransactionReceipt")({checkReplacement:!1,hash:Jt,pollingInterval:p,timeout:C});if(m&&et.status==="reverted")throw new Ae({receipt:et});return et}if((b==null?void 0:b.type)==="local"){const S=await U(t,Ft,"prepareTransactionRequest")({account:b,accessList:r,authorizationList:s,blobs:c,chain:n,data:d,gas:u,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:l,maxPriorityFeePerGas:h,nonce:o,nonceManager:b.nonceManager,parameters:[...Pe,"sidecars"],type:y,value:w,...g,to:P}),_=(v=n==null?void 0:n.serializers)==null?void 0:v.transaction,q=await b.signTransaction(S,{serializer:_});return await U(t,Ut,"sendRawTransactionSync")({serializedTransaction:q,throwOnReceiptRevert:m})}throw(b==null?void 0:b.type)==="smart"?new K({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new K({docsPath:"/docs/actions/wallet/sendTransactionSync",type:b==null?void 0:b.type})}catch(P){throw P instanceof K?P:_e(P,{...e,account:b,chain:e.chain||void 0})}}async function In(t,e){const{id:a}=e;await t.request({method:"wallet_showCallsStatus",params:[a]})}async function Tn(t,e){const{account:a=t.account}=e;if(!a)throw new M({docsPath:"/docs/eip7702/signAuthorization"});const n=N(a);if(!n.signAuthorization)throw new K({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const r=await kt(t,e);return n.signAuthorization(r)}async function Cn(t,{account:e=t.account,message:a}){if(!e)throw new M({docsPath:"/docs/actions/wallet/signMessage"});const n=N(e);if(n.signMessage)return n.signMessage({message:a});const r=(()=>typeof a=="string"?Je(a):a.raw instanceof Uint8Array?Lt(a.raw):a.raw)();return t.request({method:"personal_sign",params:[r,n.address]},{retryCount:0})}async function vn(t,e){var i,f,l,h;const{account:a=t.account,chain:n=t.chain,...r}=e;if(!a)throw new M({docsPath:"/docs/actions/wallet/signTransaction"});const s=N(a);Rt({account:s,...e});const c=await U(t,dt,"getChainId")({});n!==null&&qt({currentChainId:c,chain:n});const d=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),u=((f=d==null?void 0:d.transactionRequest)==null?void 0:f.format)||lt;return s.signTransaction?s.signTransaction({...r,chainId:c},{serializer:(h=(l=t.chain)==null?void 0:l.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...u({...r,account:s},"signTransaction"),chainId:R(c),from:s.address}]},{retryCount:0})}async function Sn(t,e){const{account:a=t.account,domain:n,message:r,primaryType:s}=e;if(!a)throw new M({docsPath:"/docs/actions/wallet/signTypedData"});const c=N(a),d={EIP712Domain:Ze({domain:n}),...e.types};if(ta({domain:n,message:r,primaryType:s,types:d}),c.signTypedData)return c.signTypedData({domain:n,message:r,primaryType:s,types:d});const u=ea({domain:n,message:r,primaryType:s,types:d});return t.request({method:"eth_signTypedData_v4",params:[c.address,u]},{retryCount:0})}async function An(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:R(e)}]},{retryCount:0})}async function Pn(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}async function _n(t,e){return D.internal(t,Vt,"sendTransactionSync",e)}function Rn(t){return{addChain:e=>hn(t,e),deployContract:e=>pn(t,e),getAddresses:()=>yn(t),getCallsStatus:e=>Re(t,e),getCapabilities:e=>gn(t,e),getChainId:()=>dt(t),getPermissions:()=>bn(t),prepareAuthorization:e=>kt(t,e),prepareTransactionRequest:e=>Ft(t,e),requestAddresses:()=>wn(t),requestPermissions:e=>xn(t,e),sendCalls:e=>Pt(t,e),sendCallsSync:e=>En(t,e),sendRawTransaction:e=>qe(t,e),sendRawTransactionSync:e=>Ut(t,e),sendTransaction:e=>ut(t,e),sendTransactionSync:e=>Vt(t,e),showCallsStatus:e=>In(t,e),signAuthorization:e=>Tn(t,e),signMessage:e=>Cn(t,e),signTransaction:e=>vn(t,e),signTypedData:e=>Sn(t,e),switchChain:e=>An(t,e),waitForCallsStatus:e=>_t(t,e),watchAsset:e=>Pn(t,e),writeContract:e=>D(t,e),writeContractSync:e=>_n(t,e)}}function sr(t){const{key:e="wallet",name:a="Wallet Client",transport:n}=t;return At({...t,key:e,name:a,transport:n,type:"walletClient"}).extend(Rn)}function or(t,e={}){const{key:a="custom",methods:n,name:r="Custom Provider",retryDelay:s}=e;return({retryCount:c})=>mt({key:a,methods:n,name:r,request:t.request.bind(t),retryCount:e.retryCount??c,retryDelay:s,type:"custom"})}function ir(t,e={}){const{key:a="fallback",name:n="Fallback",rank:r=!1,shouldThrow:s=qn,retryCount:c,retryDelay:d}=e;return({chain:u,pollingInterval:i=4e3,timeout:f,...l})=>{let h=t,o=()=>{};const p=mt({key:a,name:n,async request({method:m,params:y}){let w;const g=async(C=0)=>{const b=h[C]({...l,chain:u,retryCount:0,timeout:f});try{const x=await b.request({method:m,params:y});return o({method:m,params:y,response:x,transport:b,status:"success"}),x}catch(x){if(o({error:x,method:m,params:y,transport:b,status:"error"}),s(x)||C===h.length-1||(w??(w=h.slice(C+1).some(I=>{const{include:T,exclude:v}=I({chain:u}).config.methods||{};return T?T.includes(m):v?!v.includes(m):!0})),!w))throw x;return g(C+1)}};return g()},retryCount:c,retryDelay:d,type:"fallback"},{onResponse:m=>o=m,transports:h.map(m=>m({chain:u,retryCount:0}))});if(r){const m=typeof r=="object"?r:{};Fn({chain:u,interval:m.interval??i,onTransports:y=>h=y,ping:m.ping,sampleCount:m.sampleCount,timeout:m.timeout,transports:h,weights:m.weights})}return p}}function qn(t){return!!("code"in t&&typeof t.code=="number"&&(t.code===na.code||t.code===ra.code||Fe.nodeMessage.test(t.message)||t.code===5e3))}function Fn({chain:t,interval:e=4e3,onTransports:a,ping:n,sampleCount:r=10,timeout:s=1e3,transports:c,weights:d={}}){const{stability:u=.7,latency:i=.3}=d,f=[],l=async()=>{const h=await Promise.all(c.map(async m=>{const y=m({chain:t,retryCount:0,timeout:s}),w=Date.now();let g,C;try{await(n?n({transport:y}):y.request({method:"net_listening"})),C=1}catch{C=0}finally{g=Date.now()}return{latency:g-w,success:C}}));f.push(h),f.length>r&&f.shift();const o=Math.max(...f.map(m=>Math.max(...m.map(({latency:y})=>y)))),p=c.map((m,y)=>{const w=f.map(I=>I[y].latency),C=1-w.reduce((I,T)=>I+T,0)/w.length/o,b=f.map(I=>I[y].success),x=b.reduce((I,T)=>I+T,0)/b.length;return x===0?[0,y]:[i*C+u*x,y]}).sort((m,y)=>y[0]-m[0]);a(p.map(([,m])=>c[m])),await Ue(e),l()};l()}function cr(t,e={}){const{keepAlive:a,key:n="webSocket",methods:r,name:s="WebSocket JSON-RPC",reconnect:c,retryDelay:d}=e;return({chain:u,retryCount:i,timeout:f})=>{var m;const l=e.retryCount??i,h=f??e.timeout??1e4,o=t||((m=u==null?void 0:u.rpcUrls.default.webSocket)==null?void 0:m[0]),p={keepAlive:a,reconnect:c};if(!o)throw new ke;return mt({key:n,methods:r,name:s,async request({method:y,params:w}){const g={method:y,params:w},C=await J(o,p),{error:b,result:x}=await C.requestAsync({body:g,timeout:h});if(b)throw new sa({body:g,error:b,url:o});return x},retryCount:l,retryDelay:d,timeout:h,type:"webSocket"},{getSocket(){return Ta(o)},getRpcClient(){return J(o,p)},async subscribe({params:y,onData:w,onError:g}){const C=await J(o,p),{result:b}=await new Promise((x,I)=>C.request({body:{method:"eth_subscribe",params:y},onError(T){I(T),g==null||g(T)},onResponse(T){if(T.error){I(T.error),g==null||g(T.error);return}if(typeof T.id=="number"){x(T);return}T.method==="eth_subscription"&&w(T.params)}}));return{subscriptionId:b,async unsubscribe(){return new Promise(x=>C.request({body:{method:"eth_unsubscribe",params:[b]},onResponse:x}))}}}})}}class ur extends Error{constructor(e,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=a}}const it="/docs/contract/decodeDeployData";function dr(t){const{abi:e,bytecode:a,data:n}=t;if(n===a)return{bytecode:a};const r=e.find(c=>"type"in c&&c.type==="constructor");if(!r)throw new Xe({docsPath:it});if(!("inputs"in r))throw new xt({docsPath:it});if(!r.inputs||r.inputs.length===0)throw new xt({docsPath:it});return{args:Mt(r.inputs,`0x${n.replace(a,"")}`),bytecode:a}}function mr(t){const e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),a=typeof t.blobs[0]=="string"?t.blobs.map(d=>O(d)):t.blobs,n=a.reduce((d,u)=>d+u.length,0),r=ct(new Uint8Array(n));let s=!0;for(const d of a){const u=ct(d);for(;s&&u.position<d.length;){u.incrementPosition(1);let i=31;d.length-u.position<31&&(i=d.length-u.position);for(const f in Array.from({length:i})){const l=u.readByte();if(l===128&&!u.inspectBytes(u.remaining).includes(128)){s=!1;break}r.pushByte(l)}}}const c=r.bytes.slice(0,r.position);return e==="hex"?G(c):c}function lr(t){const{sidecars:e,version:a}=t,n=t.to??(typeof e[0].blob=="string"?"hex":"bytes"),r=[];for(const{commitment:s}of e)r.push(Be({commitment:s,to:n,version:a}));return r}const Un=2147483648;function fr(t){if(t===1)return 60n;if(t>=Un||t<0)throw new Ne({chainId:t});return BigInt((2147483648|t)>>>0)}function kn({blobToKzgCommitment:t,computeBlobKzgProof:e}){return{blobToKzgCommitment:t,computeBlobKzgProof:e}}function hr(t,e){try{t.loadTrustedSetup(e)}catch(a){const n=a;if(!n.message.includes("trusted setup is already loaded"))throw n}return kn(t)}function pr({r:t,yParityAndS:e}){const a=O(e),n=a[0]&128?1:0,r=a;return n===1&&(r[0]&=127),{r:t,s:G(r),yParity:n}}function yr(t){const{r:e,s:a}=Bt.Signature.fromCompact(t.slice(2,130));return{r:R(e,{size:32}),yParityAndS:R(a,{size:32})}}async function gr(t){const{serializedTransaction:e,signature:a}=t,n=_a(e),r=a??{r:n.r,s:n.s,v:n.v,yParity:n.yParity},s=Le({...n,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await Y({hash:X(s),signature:r})}function br({r:t,yParityAndS:e}){return`0x${new Bt.Signature(A(t),A(e)).toCompactHex()}`}function wr(t){const{r:e,s:a,v:n,yParity:r}=t,s=Number(r??n-27n);let c=a;if(s===1){const d=O(a);d[0]|=128,c=G(d)}return{r:e,yParityAndS:c}}export{Xe as AbiConstructorNotFoundError,xt as AbiConstructorParamsNotFoundError,Co as AbiDecodingDataSizeInvalidError,vo as AbiDecodingDataSizeTooSmallError,So as AbiDecodingZeroDataError,Ao as AbiEncodingArrayLengthMismatchError,Po as AbiEncodingBytesSizeMismatchError,_o as AbiEncodingLengthMismatchError,Ro as AbiErrorInputsNotFoundError,qo as AbiErrorNotFoundError,Fo as AbiErrorSignatureNotFoundError,Uo as AbiEventNotFoundError,ko as AbiEventSignatureEmptyTopicsError,Bo as AbiEventSignatureNotFoundError,No as AbiFunctionNotFoundError,Lo as AbiFunctionOutputsNotFoundError,Do as AbiFunctionSignatureNotFoundError,Ir as AccountStateConflictError,Ji as AtomicReadyWalletRejectedUpgradeError,Xi as AtomicityNotSupportedError,Nt as BaseError,Tr as BaseFeeScalarError,Cr as BlockNotFoundError,vr as BundleFailedError,Qi as BundleTooLargeError,Mo as BytesSizeMismatchError,Sr as CallExecutionError,Yi as ChainDisconnectedError,Ar as ChainDoesNotSupportContract,Pr as ChainMismatchError,_r as ChainNotFoundError,Rr as CircularReferenceError,qr as ClientChainNotConfiguredError,Fr as ContractFunctionExecutionError,Ur as ContractFunctionRevertedError,kr as ContractFunctionZeroDataError,Br as CounterfactualDeploymentFailedError,zo as DecodeLogDataMismatch,Go as DecodeLogTopicsMismatch,Zi as DuplicateIdError,ur as EIP1193ProviderRpcError,Nr as Eip1559FeesNotSupportedError,Lr as EnsAvatarInvalidNftUriError,Dr as EnsAvatarUnsupportedNamespaceError,Mr as EnsAvatarUriResolutionError,Ne as EnsInvalidChainIdError,zr as EstimateGasExecutionError,Fe as ExecutionRevertedError,Gr as FeeCapTooHighError,Hr as FeeCapTooLowError,Or as FeeConflictError,Ho as FilterTypeNotSupportedError,tc as HttpRequestError,$r as InsufficientFundsError,Oo as IntegerOutOfRangeError,ec as InternalRpcError,jr as IntrinsicGasTooHighError,Wr as IntrinsicGasTooLowError,$o as InvalidAbiDecodingTypeError,jo as InvalidAbiEncodingTypeError,Vr as InvalidAbiItemError,Yt as InvalidAbiParameterError,Kr as InvalidAbiParametersError,Jr as InvalidAbiTypeParameterError,je as InvalidAddressError,Wo as InvalidArrayError,Vo as InvalidBytesBooleanError,Xr as InvalidChainIdError,Qr as InvalidDecimalNumberError,Ko as InvalidDefinitionTypeError,Hi as InvalidDomainError,Yr as InvalidFunctionModifierError,Jo as InvalidHexBooleanError,Ge as InvalidHexValueError,ac as InvalidInputRpcError,Ee as InvalidLegacyVError,Zr as InvalidModifierError,ts as InvalidParameterError,nc as InvalidParamsRpcError,es as InvalidParenthesisError,Oi as InvalidPrimaryTypeError,rc as InvalidRequestRpcError,as as InvalidSerializableTransactionError,H as InvalidSerializedTransactionError,he as InvalidSerializedTransactionTypeError,ns as InvalidSignatureError,rs as InvalidStorageKeySizeError,ss as InvalidStructSignatureError,$i as InvalidStructTypeError,sc as JsonRpcVersionUnsupportedError,oc as LimitExceededRpcError,os as MaxFeePerGasTooLowError,ic as MethodNotFoundRpcError,cc as MethodNotSupportedRpcError,is as NonceMaxValueError,cs as NonceTooHighError,us as NonceTooLowError,uc as ParseRpcError,dc as ProviderDisconnectedError,mc as ProviderRpcError,ds as RawContractError,lc as ResourceNotFoundRpcError,fc as ResourceUnavailableRpcError,hc as RpcError,sa as RpcRequestError,Xo as SizeExceedsPaddingSizeError,Qo as SizeOverflowError,Yo as SliceOffsetOutOfBoundsError,Q as SocketClosedError,ms as SolidityProtectedKeywordError,ls as StateAssignmentConflictError,pc as SwitchChainError,aa as TimeoutError,fs as TipAboveFeeCapError,hs as TransactionExecutionError,ps as TransactionNotFoundError,ys as TransactionReceiptNotFoundError,na as TransactionRejectedRpcError,gs as TransactionTypeNotSupportedError,yc as UnauthorizedProviderError,gc as UnknownBundleIdError,bs as UnknownNodeError,bc as UnknownRpcError,ws as UnknownSignatureError,xs as UnknownTypeError,wc as UnsupportedChainIdError,xc as UnsupportedNonOptionalCapabilityError,Zo as UnsupportedPackedAbiType,Ec as UnsupportedProviderMethodError,ke as UrlRequiredError,ra as UserRejectedRequestError,Es as WaitForCallsStatusTimeoutError,Is as WaitForTransactionReceiptTimeoutError,Et as WebSocketRequestError,qt as assertCurrentChain,Rt as assertRequest,be as assertTransactionEIP1559,we as assertTransactionEIP2930,xe as assertTransactionLegacy,Ts as blobsToCommitments,Cs as blobsToProofs,ti as boolToBytes,ei as boolToHex,ai as bytesToBigInt,ni as bytesToBool,G as bytesToHex,ri as bytesToNumber,Tc as bytesToRlp,si as bytesToString,bd as ccipFetch,wd as ccipRequest,Ve as checksumAddress,Be as commitmentToVersionedHash,vs as commitmentsToVersionedHashes,br as compactSignatureToHex,pr as compactSignatureToSignature,ze as concat,oi as concatBytes,ii as concatHex,At as createClient,Ss as createNonceManager,As as createPublicClient,rr as createTestClient,mt as createTransport,sr as createWalletClient,or as custom,Mt as decodeAbiParameters,dr as decodeDeployData,qi as decodeErrorResult,pd as decodeEventLog,Ps as decodeFunctionData,_s as decodeFunctionResult,Fi as defineBlock,Ui as defineChain,kn as defineKzg,ki as defineTransaction,Cd as defineTransactionReceipt,Bi as defineTransactionRequest,Rs as deploylessCallViaBytecodeBytecode,qs as deploylessCallViaFactoryBytecode,ji as domainSeparator,ci as encodeAbiParameters,Ce as encodeDeployData,Fs as encodeErrorResult,ui as encodeEventTopics,Zt as encodeFunctionData,Us as encodeFunctionResult,ks as encodePacked,Bs as erc1155Abi,Ns as erc20Abi,Ls as erc20Abi_bytes32,Ds as erc4626Abi,Ms as erc6492SignatureValidatorAbi,zs as erc6492SignatureValidatorByteCode,Gs as erc721Abi,Hs as ethAddress,Ie as etherUnits,Kn as extractChain,ir as fallback,Ni as formatBlock,Os as formatEther,$s as formatGwei,vd as formatLog,Li as formatTransaction,Sd as formatTransactionReceipt,lt as formatTransactionRequest,js as formatUnits,mr as fromBlobs,di as fromBytes,mi as fromHex,zt as fromRlp,li as getAbiItem,k as getAddress,Ws as getChainContractAddress,Wn as getContract,Vn as getContractAddress,te as getContractError,da as getCreate2Address,ua as getCreateAddress,fi as getEventSelector,hi as getEventSignature,pi as getFunctionSelector,yi as getFunctionSignature,Pa as getSerializedTransactionType,Vs as getTransactionType,Ze as getTypesForEIP712Domain,Te as gweiUnits,Wi as hashDomain,le as hashMessage,Vi as hashStruct,Ye as hashTypedData,A as hexToBigInt,gi as hexToBool,O as hexToBytes,yr as hexToCompactSignature,F as hexToNumber,Cc as hexToRlp,Ks as hexToSignature,bi as hexToString,Js as http,$e as isAddress,ft as isAddressEqual,It as isBytes,Ca as isErc6492Signature,va as isErc8010Signature,la as isHash,E as isHex,X as keccak256,Xs as labelhash,vc as maxInt104,Sc as maxInt112,Ac as maxInt120,Pc as maxInt128,_c as maxInt136,Rc as maxInt144,qc as maxInt152,Fc as maxInt16,Uc as maxInt160,kc as maxInt168,Bc as maxInt176,Nc as maxInt184,Lc as maxInt192,Dc as maxInt200,Mc as maxInt208,zc as maxInt216,Gc as maxInt224,Hc as maxInt232,Oc as maxInt24,$c as maxInt240,jc as maxInt248,Wc as maxInt256,Vc as maxInt32,Kc as maxInt40,Jc as maxInt48,Xc as maxInt56,Qc as maxInt64,Yc as maxInt72,Zc as maxInt8,tu as maxInt80,eu as maxInt88,au as maxInt96,nu as maxUint104,ru as maxUint112,su as maxUint120,ou as maxUint128,iu as maxUint136,cu as maxUint144,uu as maxUint152,du as maxUint16,mu as maxUint160,lu as maxUint168,fu as maxUint176,hu as maxUint184,pu as maxUint192,yu as maxUint200,gu as maxUint208,bu as maxUint216,wu as maxUint224,xu as maxUint232,Eu as maxUint24,Iu as maxUint240,Tu as maxUint248,Cu as maxUint256,vu as maxUint32,Su as maxUint40,Au as maxUint48,Pu as maxUint56,_u as maxUint64,Ru as maxUint72,qu as maxUint8,Fu as maxUint80,Uu as maxUint88,ku as maxUint96,Bu as minInt104,Nu as minInt112,Lu as minInt120,Du as minInt128,Mu as minInt136,zu as minInt144,Gu as minInt152,Hu as minInt16,Ou as minInt160,$u as minInt168,ju as minInt176,Wu as minInt184,Vu as minInt192,Ku as minInt200,Ju as minInt208,Xu as minInt216,Qu as minInt224,Yu as minInt232,Zu as minInt24,td as minInt240,ed as minInt248,ad as minInt256,nd as minInt32,rd as minInt40,sd as minInt48,od as minInt56,id as minInt64,cd as minInt72,ud as minInt8,dd as minInt80,md as minInt88,ld as minInt96,Qs as multicall3Abi,Ys as namehash,Zs as nonceManager,wi as numberToBytes,R as numberToHex,xd as offchainLookup,Ed as offchainLookupAbiItem,Id as offchainLookupSignature,De as pad,xi as padBytes,wt as padHex,to as parseAbi,eo as parseAbiItem,jn as parseAbiParameter,ao as parseAbiParameters,yr as parseCompactSignature,Xn as parseErc6492Signature,Qn as parseErc8010Signature,ar as parseEther,yd as parseEventLogs,nr as parseGwei,no as parseSignature,_a as parseTransaction,vt as parseUnits,ro as prepareEncodeFunctionData,so as presignMessagePrefix,oo as publicActions,Y as recoverAddress,Sa as recoverMessageAddress,io as recoverPublicKey,gr as recoverTransactionAddress,Aa as recoverTypedDataAddress,Jn as ripemd160,co as rpcSchema,Di as rpcTransactionType,uo as serializeAccessList,br as serializeCompactSignature,mo as serializeErc6492Signature,Yn as serializeErc8010Signature,lo as serializeSignature,Le as serializeTransaction,ea as serializeTypedData,Ei as setErrorConfig,hr as setupKzg,fd as sha256,qn as shouldThrow,lr as sidecarsToVersionedHashes,wr as signatureToCompactSignature,fo as signatureToHex,He as size,Me as slice,Ii as sliceBytes,Dt as sliceHex,Ti as stringToBytes,Je as stringToHex,Mi as stringify,fn as testActions,ye as toBlobSidecars,ho as toBlobs,B as toBytes,fr as toCoinType,Ci as toEventHash,vi as toEventSelector,Si as toEventSignature,Ai as toFunctionHash,Pi as toFunctionSelector,_i as toFunctionSignature,Lt as toHex,po as toPrefixedMessage,ia as toRlp,zi as transactionType,We as trim,yo as universalSignatureValidatorAbi,go as universalSignatureValidatorByteCode,ta as validateTypedData,Zn as verifyHash,tr as verifyMessage,er as verifyTypedData,Rn as walletActions,cr as webSocket,bo as weiUnits,wo as withCache,xo as withRetry,Qe as withTimeout,Eo as zeroAddress,Io as zeroHash};
@@ -1,4 +1,4 @@
1
- import{w as k,i as W,b as v}from"./lit-element-0711c853.js";import{n as b}from"./class-map-d7835e88.js";import{c as I}from"./index-78689969.js";import"./index-5947dd15.js";import{a as M}from"./browser-54fcd4f6.js";import{d as O,r as N}from"./index-6e64d31e.js";const A=.1,_=2.5,w=7;function x(t,a,d){return t===a?!1:(t-a<0?a-t:t-a)<=d+A}function q(t,a){const d=Array.prototype.slice.call(M.create(t,{errorCorrectionLevel:a}).modules.data,0),l=Math.sqrt(d.length);return d.reduce((h,f,p)=>(p%l===0?h.push([f]):h[h.length-1].push(f))&&h,[])}const P={generate({uri:t,size:a,logoSize:d,padding:l=8,dotColor:h="var(--apkt-colors-black)"}){const p=[],u=q(t,"Q"),n=(a-2*l)/u.length,E=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];E.forEach(({x:i,y:e})=>{const s=(u.length-w)*n*i+l,r=(u.length-w)*n*e+l,c=.45;for(let o=0;o<E.length;o+=1){const m=n*(w-o*2);p.push(k`
1
+ import{w as k,i as W,b as v}from"./lit-element-0711c853.js";import{n as b}from"./class-map-d7835e88.js";import{c as I}from"./index-4ef2b1cb.js";import"./index-c9c1d671.js";import{a as M}from"./browser-54fcd4f6.js";import{d as O,r as N}from"./index-8d4c6be6.js";const A=.1,_=2.5,w=7;function x(t,a,d){return t===a?!1:(t-a<0?a-t:t-a)<=d+A}function q(t,a){const d=Array.prototype.slice.call(M.create(t,{errorCorrectionLevel:a}).modules.data,0),l=Math.sqrt(d.length);return d.reduce((h,f,p)=>(p%l===0?h.push([f]):h[h.length-1].push(f))&&h,[])}const P={generate({uri:t,size:a,logoSize:d,padding:l=8,dotColor:h="var(--apkt-colors-black)"}){const p=[],u=q(t,"Q"),n=(a-2*l)/u.length,E=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];E.forEach(({x:i,y:e})=>{const s=(u.length-w)*n*i+l,r=(u.length-w)*n*e+l,c=.45;for(let o=0;o<E.length;o+=1){const m=n*(w-o*2);p.push(k`
2
2
  <rect
3
3
  fill=${o===2?"var(--apkt-colors-black)":"var(--apkt-colors-white)"}
4
4
  width=${o===0?m-10:m}
@@ -1 +1 @@
1
- import{az as Ot,av as xa,aw as Ea,bP as se,aB as $t,bQ as Ia,bR as Ta,bS as J,x as jt,af as nt,by as Tt,b6 as va,a8 as S,bJ as vt,bT as At,bz as rt,bA as oe,a as et,bo as Vt,bf as ie,bU as Aa,bV as tt,bt as Ca,a1 as O,bh as $,bW as bt,bv as Ct,bX as ce,bY as M,as as ue,at as de,q as me,r as le,bZ as fe,a0 as _,o as H,ao as he,s as pe,ae as ye,ad as ge,d as be,n as Sa,b as St,b8 as j,i as st,a3 as Pt,ba as we,bg as xe,bi as Ee,bN as Pa,bO as Ra,b_ as Ie,b$ as wt,c0 as Te,c1 as _a,c2 as Fa,bC as qa,c3 as Ua,c4 as Ba,bp as Na,j as ka,h as La,c5 as za,bj as Ma,c6 as Da,c7 as Ga,l as Ha,m as Oa,A as $a,c8 as ja,c9 as Va,ab as Wa,B as Ka,bb as Ja,ca as Ya,cb as Za,cc as Qa,cd as Xa,ce as tn,bc as en,bw as an,cf as nn,cg as rn,bm as sn,bn as on,ch as cn,ci as un,cj as dn,ck as mn,cl as ln,cm as fn,ax as hn,aA as pn,cn as yn,I as gn,ag as bn,co as wn,cp as xn,cq as En,cr as In,cs as Tn,ct as vn,cu as An,am as Cn,cv as Sn,cw as Pn,bD as Rn,cx as _n,cy as Fn,cz as qn,a4 as Un,a6 as Bn,cA as Nn,cB as kn,br as Ln,a9 as zn,ap as Mn,ar as Dn,cC as Gn,cD as Hn,cE as On,cF as $n,cG as jn,aq as Vn,cH as Wn,k as Kn,bl as Jn,cI as Yn,cJ as Zn,cK as Qn,cL as Xn,bI as tr,cM as er,e as ar,bd as Wt,bG as nr,cN as rr,a2 as sr,a5 as or,a7 as ir,cO as cr,g as ur,bx as dr,b7 as mr,bk as Kt,cP as Y,t as Jt,an as lr,cQ as fr,cR as hr,cS as pr,cT as yr,cU as gr,cV as br,cW as wr,cX as xr,cY as Er,cZ as Ir,c_ as Tr,c$ as vr,d0 as Ar,d1 as Cr,d2 as Sr,d3 as Pr,d4 as Rr,d5 as _r,d6 as Fr,d7 as qr,d8 as Ur,d9 as Br,da as Nr,db as kr,dc as Lr,dd as zr,de as Mr,df as Dr,dg as Gr,dh as Hr,di as Or,dj as $r,dk as jr,dl as Vr,dm as Wr,dn as Kr,dp as Jr,dq as Yr,dr as Zr,ds as Qr,dt as Xr,du as ts,dv as es,dw as as,dx as ns,dy as rs,dz as ss,dA as os,dB as is,dC as cs,dD as us,dE as ds,dF as ms,dG as ls,ah as fs,dH as hs,dI as ps,dJ as ys,dK as gs,dL as bs,dM as ws,dN as xs,dO as Es,dP as Is,dQ as Ts,dR as vs,dS as As,dT as Cs,dU as Ss,dV as Ps,dW as Rs,dX as _s,dY as Fs,dZ as qs,d_ as Us,d$ as Bs,e0 as Ns,e1 as ks,e2 as Ls,e3 as zs,e4 as Ms,e5 as Ds,e6 as Gs,e7 as Hs,e8 as Os,e9 as $s,ea as js,eb as Vs,ec as Ws,ed as Ks,ee as Js,ef as Ys,eg as Zs,eh as Qs,ei as Xs,ej as to,ek as eo,el as ao,em as no,en as ro,eo as so,ep as oo,eq as io,er as co,es as Yt,et as uo}from"./writeContract-f6b81199.js";import{s as ve,e as mo,a as Rt,c as lo,g as fo,w as ho,b as _t,d as Ae,p as at,r as ot,t as Ce,f as Se,h as Pe,i as Re,j as _e,k as po,E as Fe,B as yo,l as go,m as bo,n as wo,F as xo,W as Eo,o as Io,q as To,u as vo,v as Ao,x as Co,y as Zt,z as So,A as Po,C as Ro,D as _o,G as Fo,H as qo,I as Uo}from"./parseSignature-7a759338.js";import{h as Bo,i as No,j as qe,k as Ue,l as Be,m as ko,u as Lo,w as zo,r as Mo,s as Ne,n as Do,o as Go,p as Ho,q as Oo,t as $o,x as Qt}from"./verifyHash-34edded7.js";import{w as jo,a as Ft,s as Vo,m as Z,c as Wo,p as Ko,r as Jo,n as Yo}from"./custom-7ae31f11.js";import{L as Zo,B as it,aj as ke,a4 as D,ak as Le,al as ze,f as N,am as Me,b as g,h as De,a2 as C,Y as x,a3 as Ge,an as xt,a9 as F,aa as He,d as ft,H as Oe,t as $e,n as E,ao as Qo,ap as Xo,ai as k,R as je,p as ti,A as ei,q as ai,C as ni,D as ri,X as si,a0 as oi,aq as ii,ar as ci,as as ui,F as di,at as mi,au as li,av as fi,aw as hi,I as pi,G as yi,N as gi,J as bi,y as wi,K as xi,M as Ei,ax as Ii,ay as Ti,az as vi,O as Ai,P as Ci,aA as Si,E as Pi,l as Ri,Q as _i,aB as Fi,aC as qi,aD as Ui,aE as Bi,S as Ni,k as ki,T as Li,a1 as zi,z as Mi,aF as Di,x as Gi,r as Hi,ah as Oi,m as $i,u as ji,v as Vi,w as Wi,U as Ki,W as Ji,aG as Yi,ab as Zi,aH as Qi,aI as Xi,aJ as tc,a6 as Xt,aK as ec,aL as ac,j as nc,a7 as rc,a8 as sc,$ as oc,aM as ic,aN as cc,aO as uc,ac as dc,e as mc,s as lc}from"./createBatchScheduler-7c9ada66.js";import{h as Ve,a as We,g as Ke,v as Je,s as Ye,I as fc,b as hc,c as pc,d as yc,e as gc,f as bc,i as wc,p as xc,t as Ec}from"./hashTypedData-23a00dc9.js";import{f as qt,U as Ze,c as Qe,d as Ic,h as Tc,s as vc,a as Ac,w as Cc}from"./http-a4cf4808.js";import{g as Sc,a as ht}from"./compat-b432550d.js";import{l as Pc,d as Rc,e as _c,b as Fc}from"./localBatchGatewayRequest-b2e2be89.js";import{ccipRequest as Et,offchainLookup as qc,offchainLookupAbiItem as Uc,offchainLookupSignature as Bc}from"./ccip-040f274b.js";import{s as Xe}from"./secp256k1-61174a68.js";function Nc({chains:t,id:e}){return t.find(a=>a.id===e)}function kc(t){let e;if(typeof t=="string")e=Ot(t,{modifiers:$t});else{const a=xa(t),n=t.length;for(let r=0;r<n;r++){const s=t[r];if(!Ea(s)){e=Ot(s,{modifiers:$t,structs:a});break}}}if(!e)throw new se({param:t});return e}const Lc=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),ta=(()=>Uint8Array.from(new Array(16).fill(0).map((t,e)=>e)))(),zc=(()=>ta.map(t=>(9*t+5)%16))(),ea=(()=>{const a=[[ta],[zc]];for(let n=0;n<4;n++)for(let r of a)r.push(r[n].map(s=>Lc[s]));return a})(),aa=(()=>ea[0])(),na=(()=>ea[1])(),ra=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>Uint8Array.from(t)),Mc=aa.map((t,e)=>t.map(a=>ra[e][a])),Dc=na.map((t,e)=>t.map(a=>ra[e][a])),Gc=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),Hc=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function te(t,e,a,n){return t===0?e^a^n:t===1?e&a|~e&n:t===2?(e|~a)^n:t===3?e&n|a&~n:e^(a|~n)}const Q=new Uint32Array(16);class Oc extends Ta{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:n,h3:r,h4:s}=this;return[e,a,n,r,s]}set(e,a,n,r,s){this.h0=e|0,this.h1=a|0,this.h2=n|0,this.h3=r|0,this.h4=s|0}process(e,a){for(let u=0;u<16;u++,a+=4)Q[u]=e.getUint32(a,!0);let n=this.h0|0,r=n,s=this.h1|0,o=s,i=this.h2|0,c=i,d=this.h3|0,l=d,m=this.h4|0,h=m;for(let u=0;u<5;u++){const f=4-u,y=Gc[u],w=Hc[u],I=aa[u],b=na[u],v=Mc[u],P=Dc[u];for(let T=0;T<16;T++){const p=J(n+te(u,s,i,d)+Q[I[T]]+y,v[T])+m|0;n=m,m=d,d=J(i,10)|0,i=s,s=p}for(let T=0;T<16;T++){const p=J(r+te(f,o,c,l)+Q[b[T]]+w,P[T])+h|0;r=h,h=l,l=J(c,10)|0,c=o,o=p}}this.set(this.h1+i+l|0,this.h2+d+h|0,this.h3+m+r|0,this.h4+n+o|0,this.h0+s+c|0)}roundClean(){jt(Q)}destroy(){this.destroyed=!0,jt(this.buffer),this.set(0,0,0,0,0)}}const $c=Ia(()=>new Oc),jc=$c,pt=new Zo(128);async function sa(t,e){var Nt,kt,Lt,zt,Mt,Dt;const{account:a=t.account,assertChainId:n=!0,chain:r=t.chain,accessList:s,authorizationList:o,blobs:i,data:c,dataSuffix:d=typeof t.dataSuffix=="string"?t.dataSuffix:(Nt=t.dataSuffix)==null?void 0:Nt.value,gas:l,gasPrice:m,maxFeePerBlobGas:h,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:y,pollingInterval:w,throwOnReceiptRevert:I,type:b,value:v,...P}=e,T=e.timeout??Math.max(((r==null?void 0:r.blockTime)??0)*3,5e3);if(typeof a>"u")throw new nt({docsPath:"/docs/actions/wallet/sendTransactionSync"});const p=a?O(a):null;let A;try{Tt(e);const q=await(async()=>{if(e.to)return e.to;if(e.to!==null&&o&&o.length>0)return await va({authorization:o[0]}).catch(()=>{throw new it("`to` is required. Could not infer from `authorizationList`.")})})();if((p==null?void 0:p.type)==="json-rpc"||p===null){let G;r!==null&&(G=await S(t,vt,"getChainId")({}),n&&At({currentChainId:G,chain:r}));const W=(zt=(Lt=(kt=t.chain)==null?void 0:kt.formatters)==null?void 0:Lt.transactionRequest)==null?void 0:zt.format,K=(W||rt)({...oe(P,{format:W}),accessList:s,account:p,authorizationList:o,blobs:i,chainId:G,data:d?et([c??"0x",d]):c,gas:l,gasPrice:m,maxFeePerBlobGas:h,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:y,to:q,type:b,value:v},"sendTransaction"),U=pt.get(t.uid),R=U?"wallet_sendTransaction":"eth_sendTransaction",wa=await(async()=>{try{return await t.request({method:R,params:[K]},{retryCount:0})}catch(Ht){if(U===!1)throw Ht;const B=Ht;if(B.name==="InvalidInputRpcError"||B.name==="InvalidParamsRpcError"||B.name==="MethodNotFoundRpcError"||B.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[K]},{retryCount:0}).then(mt=>(pt.set(t.uid,!0),mt)).catch(mt=>{const lt=mt;throw lt.name==="MethodNotFoundRpcError"||lt.name==="MethodNotSupportedRpcError"?(pt.set(t.uid,!1),B):lt});throw B}})(),dt=await S(t,jo,"waitForTransactionReceipt")({checkReplacement:!1,hash:wa,pollingInterval:w,timeout:T});if(I&&dt.status==="reverted")throw new Vt({receipt:dt});return dt}if((p==null?void 0:p.type)==="local"){const G=(()=>{if(!p.nonceManager||typeof y<"u")return p.nonceManager;const U=p.nonceManager;return{consume(R){return A={address:R.address,chainId:R.chainId},U.consume(R)},get(R){return U.get(R)},increment(R){return U.increment(R)},reset(R){return U.reset(R)}}})(),W=await S(t,ie,"prepareTransactionRequest")({account:p,accessList:s,authorizationList:o,blobs:i,chain:r,data:d?et([c??"0x",d]):c,gas:l,gasPrice:m,maxFeePerBlobGas:h,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:y,nonceManager:G,parameters:[...Aa,"sidecars"],type:b,value:v,...P,to:q}),Gt=(Mt=r==null?void 0:r.serializers)==null?void 0:Mt.transaction,K=await p.signTransaction(W,{serializer:Gt});return await S(t,ve,"sendRawTransactionSync")({serializedTransaction:K,throwOnReceiptRevert:I,timeout:e.timeout})}throw(p==null?void 0:p.type)==="smart"?new tt({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new tt({docsPath:"/docs/actions/wallet/sendTransactionSync",type:p==null?void 0:p.type})}catch(q){throw q instanceof tt?q:(A&&!(q instanceof Vt)&&((Dt=p==null?void 0:p.nonceManager)==null||Dt.reset(A)),Ca(q,{...e,account:p,chain:e.chain||void 0}))}}async function Ut(t,e){return $.internal(t,sa,"sendTransactionSync",e)}const ee=1024;function Bt(t,e="hex"){const a=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new ke(t);return D(t)}return t})(),n=bt(a,{recursiveReadLimit:Number.POSITIVE_INFINITY}),r=oa(n,e);if(n.position<n.bytes.length)throw new Le({count:n.bytes.length-n.position});return r}function oa(t,e="hex",a=0){if(a>=ee)throw new ze({limit:ee});if(t.bytes.length===0)return e==="hex"?N(t.bytes):t.bytes;const n=t.readByte();if(n<128&&t.decrementPosition(1),n<192){const s=ae(t,n,128),o=t.readBytes(s);return e==="hex"?N(o):o}const r=ae(t,n,192);return Vc(t,r,e,a+1)}function ae(t,e,a){if(a===128&&e<128)return 1;if(e<=a+55)return e-a;if(e===a+55+1)return t.readUint8();if(e===a+55+2)return t.readUint16();if(e===a+55+3)return t.readUint24();if(e===a+55+4)return t.readUint32();throw new it("Invalid RLP prefix")}function Vc(t,e,a,n){const r=t.position,s=[];for(;t.position-r<e;)s.push(oa(t,a,n));if(t.position-r!==e)throw new Me({consumed:t.position-r,declared:e});return s}function ia(t){return g(t)&&De(t)===32}function ca(t){const e=Ct(t,0,1);if(e==="0x04")return"eip7702";if(e==="0x03")return"eip4844";if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&C(e)>=192)return"legacy";throw new ce({serializedType:e})}function ua(t){const e=ca(t);return e==="eip1559"?Jc(t):e==="eip2930"?Yc(t):e==="eip4844"?Kc(t):e==="eip7702"?Wc(t):Zc(t)}function Wc(t){const e=ct(t),[a,n,r,s,o,i,c,d,l,m,h,u,f]=e;if(e.length!==10&&e.length!==13)throw new M({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:o,to:i,value:c,data:d,accessList:l,authorizationList:m,...e.length>9?{v:h,r:u,s:f}:{}},serializedTransaction:t,type:"eip7702"});const y={chainId:C(a),type:"eip7702"};return g(i)&&i!=="0x"&&(y.to=i),g(o)&&o!=="0x"&&(y.gas=x(o)),g(d)&&d!=="0x"&&(y.data=d),g(n)&&(y.nonce=n==="0x"?0:C(n)),g(c)&&c!=="0x"&&(y.value=x(c)),g(s)&&s!=="0x"&&(y.maxFeePerGas=x(s)),g(r)&&r!=="0x"&&(y.maxPriorityFeePerGas=x(r)),l.length!==0&&l!=="0x"&&(y.accessList=ut(l)),m.length!==0&&m!=="0x"&&(y.authorizationList=Qc(m)),Bo(y),{...e.length===13?V(e):void 0,...y}}function Kc(t){const e=ct(t),a=e.length===4,n=a?e[0]:e,r=a?e.slice(1):[],[s,o,i,c,d,l,m,h,u,f,y,w,I,b]=n,[v,P,T]=r;if(!(n.length===11||n.length===14))throw new M({attributes:{chainId:s,nonce:o,maxPriorityFeePerGas:i,maxFeePerGas:c,gas:d,to:l,value:m,data:h,accessList:u,...n.length>9?{v:w,r:I,s:b}:{}},serializedTransaction:t,type:"eip4844"});const p={blobVersionedHashes:y,chainId:C(s),to:l,type:"eip4844"};return g(d)&&d!=="0x"&&(p.gas=x(d)),g(h)&&h!=="0x"&&(p.data=h),g(o)&&(p.nonce=o==="0x"?0:C(o)),g(m)&&m!=="0x"&&(p.value=x(m)),g(f)&&f!=="0x"&&(p.maxFeePerBlobGas=x(f)),g(c)&&c!=="0x"&&(p.maxFeePerGas=x(c)),g(i)&&i!=="0x"&&(p.maxPriorityFeePerGas=x(i)),u.length!==0&&u!=="0x"&&(p.accessList=ut(u)),v&&P&&T&&(p.sidecars=ue({blobs:v,commitments:P,proofs:T})),No(p),{...n.length===14?V(n):void 0,...p}}function Jc(t){const e=ct(t),[a,n,r,s,o,i,c,d,l,m,h,u]=e;if(!(e.length===9||e.length===12))throw new M({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:o,to:i,value:c,data:d,accessList:l,...e.length>9?{v:m,r:h,s:u}:{}},serializedTransaction:t,type:"eip1559"});const f={chainId:C(a),type:"eip1559"};return g(i)&&i!=="0x"&&(f.to=i),g(o)&&o!=="0x"&&(f.gas=x(o)),g(d)&&d!=="0x"&&(f.data=d),g(n)&&(f.nonce=n==="0x"?0:C(n)),g(c)&&c!=="0x"&&(f.value=x(c)),g(s)&&s!=="0x"&&(f.maxFeePerGas=x(s)),g(r)&&r!=="0x"&&(f.maxPriorityFeePerGas=x(r)),l.length!==0&&l!=="0x"&&(f.accessList=ut(l)),qe(f),{...e.length===12?V(e):void 0,...f}}function Yc(t){const e=ct(t),[a,n,r,s,o,i,c,d,l,m,h]=e;if(!(e.length===8||e.length===11))throw new M({attributes:{chainId:a,nonce:n,gasPrice:r,gas:s,to:o,value:i,data:c,accessList:d,...e.length>8?{v:l,r:m,s:h}:{}},serializedTransaction:t,type:"eip2930"});const u={chainId:C(a),type:"eip2930"};return g(o)&&o!=="0x"&&(u.to=o),g(s)&&s!=="0x"&&(u.gas=x(s)),g(c)&&c!=="0x"&&(u.data=c),g(n)&&(u.nonce=n==="0x"?0:C(n)),g(i)&&i!=="0x"&&(u.value=x(i)),g(r)&&r!=="0x"&&(u.gasPrice=x(r)),d.length!==0&&d!=="0x"&&(u.accessList=ut(d)),Ue(u),{...e.length===11?V(e):void 0,...u}}function Zc(t){const e=Bt(t,"hex"),[a,n,r,s,o,i,c,d,l]=e;if(!(e.length===6||e.length===9))throw new M({attributes:{nonce:a,gasPrice:n,gas:r,to:s,value:o,data:i,...e.length>6?{v:c,r:d,s:l}:{}},serializedTransaction:t,type:"legacy"});const m={type:"legacy"};if(g(s)&&s!=="0x"&&(m.to=s),g(r)&&r!=="0x"&&(m.gas=x(r)),g(i)&&i!=="0x"&&(m.data=i),g(a)&&(m.nonce=a==="0x"?0:C(a)),g(o)&&o!=="0x"&&(m.value=x(o)),g(n)&&n!=="0x"&&(m.gasPrice=x(n)),Be(m),e.length===6)return m;const h=g(c)&&c!=="0x"?x(c):0n;if(l==="0x"&&d==="0x")return h>0&&(m.chainId=Number(h)),m;const u=h,f=Number((u-35n)/2n);if(f>0)m.chainId=f;else if(u!==27n&&u!==28n)throw new de({v:u});return m.v=u,m.s=l,m.r=d,m.yParity=u%2n===0n?1:0,m}function ct(t){return Bt(`0x${t.slice(4)}`,"hex")}function ut(t){const e=[];for(let a=0;a<t.length;a++){const[n,r]=t[a];if(!me(n,{strict:!1}))throw new le({address:n});e.push({address:n,storageKeys:r.map(s=>ia(s)?s:Ge(s))})}return e}function Qc(t){const e=[];for(let a=0;a<t.length;a++){const[n,r,s,o,i,c]=t[a];e.push({address:r,chainId:n==="0x"?0:C(n),nonce:s==="0x"?0:C(s),...V([o,i,c])})}return e}function V(t){const e=t.slice(-3),a=e[0]==="0x"?0n:x(e[0]);if(a!==0n&&a!==1n)throw new fe({yParity:a});const n=a===0n?27n:28n;return{r:xt(e[1],{size:32}),s:xt(e[2],{size:32}),v:n,yParity:n===27n?0:1}}function It(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}function Xc(t){return t.opcode==="CREATE2"?ma(t):da(t)}function da(t){const e=F(_(t.from));let a=F(t.nonce);return a[0]===0&&(a=new Uint8Array([])),_(`0x${H(he([e,a],"bytes")).slice(26)}`)}function ma(t){const e=F(_(t.from)),a=He(It(t.salt)?t.salt:F(t.salt),{size:32}),n=(()=>"bytecodeHash"in t?It(t.bytecodeHash)?t.bytecodeHash:F(t.bytecodeHash):H(t.bytecode,"bytes"))();return _(pe(H(et([F("0xff"),e,a,n])),12))}function tu({batchGateways:t,ccipRequest:e=Et}){return{async request({data:a,sender:n,urls:r}){if(r.includes(Pc))return e({data:a,sender:n,urls:t});{const[s,o]=ye({abi:ft,functionName:"query",data:await e({data:ge({abi:ft,functionName:"query",args:[[{sender:n,data:a,urls:r}]]}),sender:n,urls:t})});if(s[0]){let i;try{const c=be({abi:[...ft,Sa],data:o[0]});if(c.errorName==="HttpError")i=new Oe({body:{message:c.args[1]},status:c.args[0],url:r.join(" | ")});else{const d=c.args[0];d&&(i=new Error(d))}}catch{}throw i??new Error("An unknown error occurred.")}return o[0]}}}}function eu(t,e){const a=e||"hex",n=jc(g(t,{strict:!1})?F(t):t);return a==="bytes"?n:$e(n)}function la(t){return Ct(t,-32)===mo}function fa(t){return ko(t)}function au(t){if(!la(t))return{signature:t};const[e,a,n]=St([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:e,data:a,signature:n}}function nu(t){if(!fa(t))return{signature:t};const{authorization:e,to:a,...n}=Lo(t);return{authorization:{address:e.address,chainId:e.chainId,nonce:Number(e.nonce),r:E(e.r,{size:32}),s:E(e.s,{size:32}),yParity:e.yParity},...a?{address:a}:{},...n}}async function ha({message:t,signature:e}){return j({hash:Ve(t),signature:e})}async function pa(t){const{domain:e,message:a,primaryType:n,signature:r,types:s}=t;return j({hash:We({domain:e,message:a,primaryType:n,types:s}),signature:r})}function ru(t){const{address:e,data:a,signature:n,to:r="hex"}=t,s=zo({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:a,signature:n,to:e});return r==="hex"?s:D(s)}async function su({address:t,hash:e,signature:a}){return st(_(t),await j({hash:e,signature:a}))}async function ou({address:t,message:e,signature:a}){return st(_(t),await ha({message:e,signature:a}))}async function iu(t){const{address:e,domain:a,message:n,primaryType:r,signature:s,types:o}=t;return st(_(e),await pa({domain:a,message:n,primaryType:r,signature:s,types:o}))}function cu(t,e="wei"){return Qo(t,e)}function uu(t,e="wei"){return Xo(t,e)}function du({abi:t,address:e,client:a}){const n=a,[r,s]=(()=>n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0])(),o=r!=null,i=s!=null,c={};let d=!1,l=!1,m=!1;for(const h of t)if(h.type==="function"?h.stateMutability==="view"||h.stateMutability==="pure"?d=!0:l=!0:h.type==="event"&&(m=!0),d&&l&&m)break;return o&&(d&&(c.read=new Proxy({},{get(h,u){return(...f)=>{const{args:y,options:w}=X(f);return S(r,Mo,"readContract")({abi:t,address:e,functionName:u,args:y,...w})}}})),l&&(c.simulate=new Proxy({},{get(h,u){return(...f)=>{const{args:y,options:w}=X(f);return S(r,Rt,"simulateContract")({abi:t,address:e,functionName:u,args:y,...w})}}})),m&&(c.createEventFilter=new Proxy({},{get(h,u){return(...f)=>{const y=t.find(b=>b.type==="event"&&b.name===u),{args:w,options:I}=yt(f,y);return S(r,lo,"createContractEventFilter")({abi:t,address:e,eventName:u,args:w,...I})}}}),c.getEvents=new Proxy({},{get(h,u){return(...f)=>{const y=t.find(b=>b.type==="event"&&b.name===u),{args:w,options:I}=yt(f,y);return S(r,fo,"getContractEvents")({abi:t,address:e,eventName:u,args:w,...I})}}}),c.watchEvent=new Proxy({},{get(h,u){return(...f)=>{const y=t.find(b=>b.type==="event"&&b.name===u),{args:w,options:I}=yt(f,y);return S(r,ho,"watchContractEvent")({abi:t,address:e,eventName:u,args:w,...I})}}}))),i&&l&&(c.write=new Proxy({},{get(h,u){return(...f)=>{const{args:y,options:w}=X(f);return S(s,$,"writeContract")({abi:t,address:e,functionName:u,args:y,...w})}}})),(o||i)&&l&&(c.estimateGas=new Proxy({},{get(h,u){return(...f)=>{const{args:y,options:w}=X(f);return S(r??s,_t,"estimateContractGas")({abi:t,address:e,functionName:u,args:y,...w,account:w.account??s.account})}}})),c.address=e,c.abi=t,c}function X(t){const e=t.length&&Array.isArray(t[0]),a=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:a,options:n}}function yt(t,e){let a=!1;Array.isArray(t[0])?a=!0:t.length===1?a=e.inputs.some(s=>s.indexed):t.length===2&&(a=!0);const n=a?t[0]:void 0,r=(a?t[1]:t[0])??{};return{args:n,options:r}}async function L(t,e){return L.inner($,t,e)}(function(t){async function e(o,i,c){return await o(i,{...c,...t.call(i,c)})}t.inner=e;function a(o,i){return Ae(mu(o,i))}t.call=a;async function n(o,i){return _t(o,{...at(i),...t.call(o,i)})}t.estimateGas=n;async function r(o,i){return Rt(o,{...at(i),...t.call(o,i)})}t.simulate=r;function s(o){const[i]=Pt({abi:k,logs:o,eventName:"Approval",strict:!0});if(!i)throw new Error("`Approval` event not found.");return i}t.extractEvent=s})(L||(L={}));function mu(t,e){const{amount:a,spender:n,token:r}=e,{address:s,decimals:o}=ot(t,{token:r});return{abi:k,address:s,args:[n,Ce(a,o)],functionName:"approve"}}async function lu(t,e){const{amount:a,token:n,throwOnReceiptRevert:r=!0}=e,{decimals:s}=ot(t,{token:n}),o=Se(a,s),i=await L.inner(Ut,t,{...e,throwOnReceiptRevert:r}),{args:c}=L.extractEvent(i.logs);return{...c,...o===void 0?{}:{decimals:o,formatted:qt(c.value,o)},receipt:i}}async function z(t,e){return z.inner($,t,e)}(function(t){async function e(o,i,c){return await o(i,{...c,...t.call(i,c)})}t.inner=e;function a(o,i){return Ae(fu(o,i))}t.call=a;async function n(o,i){return _t(o,{...at(i),...t.call(o,i)})}t.estimateGas=n;async function r(o,i){return Rt(o,{...at(i),...t.call(o,i)})}t.simulate=r;function s(o){const[i]=Pt({abi:k,logs:o,eventName:"Transfer",strict:!0});if(!i)throw new Error("`Transfer` event not found.");return i}t.extractEvent=s})(z||(z={}));function fu(t,e){const{amount:a,from:n,to:r,token:s}=e,{address:o,decimals:i}=ot(t,{token:s}),c=Ce(a,i);return n?{abi:k,address:o,args:[n,r,c],functionName:"transferFrom"}:{abi:k,address:o,args:[r,c],functionName:"transfer"}}async function hu(t,e){const{amount:a,token:n,throwOnReceiptRevert:r=!0}=e,{decimals:s}=ot(t,{token:n}),o=Se(a,s),i=await z.inner(Ut,t,{...e,throwOnReceiptRevert:r}),{args:c}=z.extractEvent(i.logs);return{...c,...o===void 0?{}:{decimals:o,formatted:qt(c.value,o)},receipt:i}}async function pu(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function yu(t){return t.request({method:`${t.mode}_dumpState`})}async function gu(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function bu(t){return await t.request({method:"txpool_content"})}async function wu(t){const{pending:e,queued:a}=await t.request({method:"txpool_status"});return{pending:C(e),queued:C(a)}}async function xu(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function Eu(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[E(e)]})}async function Iu(t){return await t.request({method:"txpool_inspect"})}async function Tu(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function vu(t,{blocks:e,interval:a}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:E(e)}]}):await t.request({method:`${t.mode}_mine`,params:[E(e),E(a||0)]})}async function Au(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function Cu(t,{blockNumber:e,jsonRpcUrl:a}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:a}}]})}async function Su(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function Pu(t,e){var I,b,v;const{accessList:a,data:n,from:r,gas:s,gasPrice:o,maxFeePerGas:i,maxPriorityFeePerGas:c,nonce:d,to:l,value:m,...h}=e,u=(v=(b=(I=t.chain)==null?void 0:I.formatters)==null?void 0:b.transactionRequest)==null?void 0:v.format,y=(u||rt)({...oe(h,{format:u}),accessList:a,data:n,from:r,gas:s,gasPrice:o,maxFeePerGas:i,maxPriorityFeePerGas:c,nonce:d,to:l,value:m},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[y]})}async function Ru(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function _u(t,{address:e,value:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,E(a)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,E(a)]})}async function Fu(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[E(e)]})}async function qu(t,{interval:e}){const a=(()=>t.mode==="hardhat"?e*1e3:e)();await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[a]})}async function Uu(t,{address:e,bytecode:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[e,a]}):await t.request({method:`${t.mode}_setCode`,params:[e,a]})}async function Bu(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function Nu(t,{interval:e}){const a=(()=>t.mode==="hardhat"?e*1e3:e)();await t.request({method:"evm_setIntervalMining",params:[a]})}async function ku(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function Lu(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[E(e)]})}async function zu(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[E(e)]})}async function Mu(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[E(e)]})}async function Du(t,{address:e,nonce:a}){await t.request({method:`${t.mode}_setNonce`,params:[e,E(a)]})}async function Gu(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function Hu(t,{address:e,index:a,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof a=="number"?E(a):a,n]})}async function Ou(t){return await t.request({method:"evm_snapshot"})}async function $u(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function ya({mode:t}){return e=>{const a=e.extend(()=>({mode:t}));return{dropTransaction:n=>pu(a,n),dumpState:()=>yu(a),getAutomine:()=>gu(a),getTxpoolContent:()=>bu(a),getTxpoolStatus:()=>wu(a),impersonateAccount:n=>xu(a,n),increaseTime:n=>Eu(a,n),inspectTxpool:()=>Iu(a),loadState:n=>Tu(a,n),mine:n=>vu(a,n),removeBlockTimestampInterval:()=>Au(a),reset:n=>Cu(a,n),revert:n=>Su(a,n),sendUnsignedTransaction:n=>Pu(a,n),setAutomine:n=>Ru(a,n),setBalance:n=>_u(a,n),setBlockGasLimit:n=>Fu(a,n),setBlockTimestampInterval:n=>qu(a,n),setCode:n=>Uu(a,n),setCoinbase:n=>Bu(a,n),setIntervalMining:n=>Nu(a,n),setLoggingEnabled:n=>ku(a,n),setMinGasPrice:n=>Lu(a,n),setNextBlockBaseFeePerGas:n=>zu(a,n),setNextBlockTimestamp:n=>Mu(a,n),setNonce:n=>Du(a,n),setRpcUrl:n=>Gu(a,n),setStorageAt:n=>Hu(a,n),snapshot:()=>Ou(a),stopImpersonatingAccount:n=>$u(a,n)}}}function ju(t){const{key:e="test",name:a="Test Client",mode:n}=t;return Ft({...t,key:e,name:a,type:"testClient"}).extend(s=>({mode:n,...ya({mode:n})(s)}))}async function Vu(t,{chain:e}){const{id:a,name:n,nativeCurrency:r,rpcUrls:s,blockExplorers:o}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:E(a),chainName:n,nativeCurrency:r,rpcUrls:s.default.http,blockExplorerUrls:o?Object.values(o).map(({url:i})=>i):void 0}]},{dedupe:!0,retryCount:0})}function Wu(t,e){const{abi:a,args:n,bytecode:r,...s}=e,o=we({abi:a,args:n,bytecode:r});return xe(t,{...s,...s.authorizationList?{to:null}:{},data:o})}async function Ku(t){var a;return((a=t.account)==null?void 0:a.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Ee(n))}async function Ju(t,e={}){const{account:a=t.account,chainId:n}=e,r=a?O(a):void 0,s=n?[r==null?void 0:r.address,[E(n)]]:[r==null?void 0:r.address],o=await t.request({method:"wallet_getCapabilities",params:s}),i={};for(const[c,d]of Object.entries(o)){i[Number(c)]={};for(let[l,m]of Object.entries(d))l==="addSubAccount"&&(l="unstable_addSubAccount"),i[Number(c)][l]=m}return typeof n=="number"?i[n]:i}async function Yu(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function Zu(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>_(a))}async function Qu(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function Xu(t,e){const{chain:a=t.chain}=e,n=e.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),r=await S(t,Pe,"sendCalls")(e);return await S(t,Re,"waitForCallsStatus")({...e,id:r.id,timeout:n})}async function td(t,e){const{id:a}=e;await t.request({method:"wallet_showCallsStatus",params:[a]})}async function ed(t,e){const{account:a=t.account}=e;if(!a)throw new nt({docsPath:"/docs/eip7702/signAuthorization"});const n=O(a);if(!n.signAuthorization)throw new tt({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const r=await _e(t,e);return n.signAuthorization(r)}async function ad(t,e){var d,l,m,h;const{account:a=t.account,chain:n=t.chain,...r}=e;if(!a)throw new nt({docsPath:"/docs/actions/wallet/signTransaction"});const s=O(a);Tt({account:s,...e});const o=await S(t,vt,"getChainId")({});n!==null&&At({currentChainId:o,chain:n});const i=(n==null?void 0:n.formatters)||((d=t.chain)==null?void 0:d.formatters),c=((l=i==null?void 0:i.transactionRequest)==null?void 0:l.format)||rt;return s.signTransaction?s.signTransaction({...r,account:s,chainId:o},{serializer:(h=(m=t.chain)==null?void 0:m.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...r,account:s},"signTransaction"),chainId:E(o),from:s.address}]},{retryCount:0})}async function nd(t,e){const{account:a=t.account,domain:n,message:r,primaryType:s}=e;if(!a)throw new nt({docsPath:"/docs/actions/wallet/signTypedData"});const o=O(a),i={EIP712Domain:Ke({domain:n}),...e.types};if(Je({domain:n,message:r,primaryType:s,types:i}),o.signTypedData)return o.signTypedData({domain:n,message:r,primaryType:s,types:i});const c=Ye({domain:n,message:r,primaryType:s,types:i});return t.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function rd(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:E(e)}]},{retryCount:0})}async function sd(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}function ga(t){return{addChain:e=>Vu(t,e),deployContract:e=>Wu(t,e),fillTransaction:e=>Pa(t,e),getAddresses:()=>Ku(t),getCallsStatus:e=>po(t,e),getCapabilities:e=>Ju(t,e),getChainId:()=>vt(t),getPermissions:()=>Yu(t),prepareAuthorization:e=>_e(t,e),prepareTransactionRequest:e=>ie(t,e),requestAddresses:()=>Zu(t),requestPermissions:e=>Qu(t,e),sendCalls:e=>Pe(t,e),sendCallsSync:e=>Xu(t,e),sendRawTransaction:e=>Ra(t,e),sendRawTransactionSync:e=>ve(t,e),sendTransaction:e=>xe(t,e),sendTransactionSync:e=>sa(t,e),showCallsStatus:e=>td(t,e),signAuthorization:e=>ed(t,e),signMessage:e=>Vo(t,e),signTransaction:e=>ad(t,e),signTypedData:e=>nd(t,e),switchChain:e=>rd(t,e),waitForCallsStatus:e=>Re(t,e),watchAsset:e=>sd(t,e),writeContract:e=>$(t,e),writeContractSync:e=>Ut(t,e),token:{approve:Z(t,L),approveSync:Z(t,lu),transfer:Z(t,z),transferSync:Z(t,hu)}}}function od(t){const{key:e="wallet",name:a="Wallet Client",transport:n}=t;return Ft({...t,key:e,name:a,transport:n,type:"walletClient"}).extend(ga)}function id(t,e={}){const{keepAlive:a,key:n="webSocket",methods:r,name:s="WebSocket JSON-RPC",reconnect:o,retryDelay:i}=e;return({chain:c,retryCount:d,timeout:l})=>{var y;const m=e.retryCount??d,h=l??e.timeout??1e4,u=t||((y=c==null?void 0:c.rpcUrls.default.webSocket)==null?void 0:y[0]),f={keepAlive:a,reconnect:o};if(!u)throw new Ze;return Qe({key:n,methods:r,name:s,async request({method:w,params:I}){const b={method:w,params:I},v=await ht(u,f),{error:P,result:T}=await v.requestAsync({body:b,timeout:h});if(P)throw new je({body:b,error:P,url:u});return T},retryCount:m,retryDelay:i,timeout:h,type:"webSocket"},{getSocket(){return Sc(u)},getRpcClient(){return ht(u,f)},async subscribe({params:w,onData:I,onError:b}){const v=await ht(u,f),{result:P}=await new Promise((T,p)=>v.request({body:{method:"eth_subscribe",params:w},onError(A){p(A),b==null||b(A)},onResponse(A){if(A.error){p(A.error),b==null||b(A.error);return}if(typeof A.id=="number"){T(A);return}A.method==="eth_subscription"&&I(A.params)}}));return{subscriptionId:P,async unsubscribe(){return new Promise(T=>v.request({body:{method:"eth_unsubscribe",params:[P]},onResponse:T}))}}}})}}const cd={gwei:9,wei:18},ud={ether:-9,wei:9},dd={ether:-18,gwei:-9};class md extends it{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}class ld extends Error{constructor(e,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=a}}const gt="/docs/contract/decodeDeployData";function fd(t){const{abi:e,bytecode:a,data:n}=t;if(n===a)return{bytecode:a};const r=e.find(o=>"type"in o&&o.type==="constructor");if(!r)throw new Ie({docsPath:gt});if(!("inputs"in r))throw new wt({docsPath:gt});if(!r.inputs||r.inputs.length===0)throw new wt({docsPath:gt});return{args:St(r.inputs,`0x${n.replace(a,"")}`),bytecode:a}}function hd(t){const e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),a=typeof t.blobs[0]=="string"?t.blobs.map(i=>D(i)):t.blobs,n=a.reduce((i,c)=>i+c.length,0),r=bt(new Uint8Array(n));let s=!0;for(const[i,c]of a.entries()){const d=bt(c),l=i===a.length-1;for(;s&&d.position<c.length;){d.incrementPosition(1);let m=31;c.length-d.position<31&&(m=c.length-d.position);for(const h in Array.from({length:m})){const u=d.readByte();if(l&&u===128&&!d.inspectBytes(d.remaining).includes(128)){s=!1;break}r.pushByte(u)}}}const o=r.bytes.slice(0,r.position);return e==="hex"?N(o):o}function pd(t){const{sidecars:e,version:a}=t,n=t.to??(typeof e[0].blob=="string"?"hex":"bytes"),r=[];for(const{commitment:s}of e)r.push(Te({commitment:s,to:n,version:a}));return r}const yd=2147483648;function gd(t){if(t===1)return 60n;if(t>=yd||t<0)throw new Fe({chainId:t});return BigInt((2147483648|t)>>>0)}function ba({blobToKzgCommitment:t,computeBlobKzgProof:e}){return{blobToKzgCommitment:t,computeBlobKzgProof:e}}function bd(t,e){try{t.loadTrustedSetup(e)}catch(a){const n=a;if(!n.message.includes("trusted setup is already loaded"))throw n}return ba(t)}function wd({r:t,yParityAndS:e}){const a=D(e),n=a[0]&128?1:0,r=a;return n===1&&(r[0]&=127),{r:t,s:N(r),yParity:n}}function ne(t){const{r:e,s:a}=Xe.Signature.fromCompact(t.slice(2,130));return{r:E(e,{size:32}),yParityAndS:E(a,{size:32})}}async function xd(t){const{serializedTransaction:e,signature:a}=t,n=ua(e),r=a??{r:n.r,s:n.s,v:n.v,yParity:n.yParity},s=Ne({...n,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await j({hash:H(s),signature:r})}function re({r:t,yParityAndS:e}){return`0x${new Xe.Signature(x(t),x(e)).toCompactHex()}`}function Ed(t){const{r:e,s:a,v:n,yParity:r}=t,s=Number(r??n-27n);let o=a;if(s===1){const i=D(a);i[0]|=128,o=N(i)}return{r:e,yParityAndS:o}}const Ud=Object.freeze(Object.defineProperty({__proto__:null,AbiConstructorNotFoundError:Ie,AbiConstructorParamsNotFoundError:wt,AbiDecodingDataSizeInvalidError:_a,AbiDecodingDataSizeTooSmallError:Fa,AbiDecodingZeroDataError:qa,AbiEncodingArrayLengthMismatchError:Ua,AbiEncodingBytesSizeMismatchError:Ba,AbiEncodingLengthMismatchError:Na,AbiErrorInputsNotFoundError:ka,AbiErrorNotFoundError:La,AbiErrorSignatureNotFoundError:za,AbiEventNotFoundError:Ma,AbiEventSignatureEmptyTopicsError:Da,AbiEventSignatureNotFoundError:Ga,AbiFunctionNotFoundError:Ha,AbiFunctionOutputsNotFoundError:Oa,AbiFunctionSignatureNotFoundError:$a,AccountStateConflictError:ja,AtomicReadyWalletRejectedUpgradeError:ti,AtomicityNotSupportedError:ei,BaseError:it,BaseFeeScalarError:Va,BlockNotFoundError:Wa,BundleFailedError:yo,BundleTooLargeError:ai,BytesSizeMismatchError:Ka,CallExecutionError:Ja,ChainDisconnectedError:ni,ChainDoesNotSupportContract:Ya,ChainMismatchError:Za,ChainNotFoundError:Qa,CircularReferenceError:Xa,ClientChainNotConfiguredError:tn,ContractFunctionExecutionError:en,ContractFunctionRevertedError:an,ContractFunctionZeroDataError:nn,CounterfactualDeploymentFailedError:rn,DecodeLogDataMismatch:sn,DecodeLogTopicsMismatch:on,DuplicateIdError:ri,EIP1193ProviderRpcError:ld,Eip1559FeesNotSupportedError:cn,EnsAvatarInvalidNftUriError:go,EnsAvatarUnsupportedNamespaceError:bo,EnsAvatarUriResolutionError:wo,EnsInvalidChainIdError:Fe,EstimateGasExecutionError:un,ExecutionRevertedError:si,FeeCapTooHighError:oi,FeeCapTooLowError:ii,FeeConflictError:dn,FeePayerNonceMismatchError:mn,FilterTypeNotSupportedError:xo,HttpRequestError:Oe,InsufficientFundsError:ci,IntegerOutOfRangeError:ui,InternalRpcError:di,IntrinsicGasTooHighError:mi,IntrinsicGasTooLowError:li,InvalidAbiDecodingTypeError:ln,InvalidAbiEncodingTypeError:fn,InvalidAbiItemError:hn,InvalidAbiParameterError:se,InvalidAbiParametersError:pn,InvalidAbiTypeParameterError:yn,InvalidAddressError:le,InvalidArrayError:gn,InvalidBytesBooleanError:fi,InvalidChainIdError:bn,InvalidDecimalNumberError:md,InvalidDefinitionTypeError:wn,InvalidDomainError:fc,InvalidFunctionModifierError:xn,InvalidHexBooleanError:hi,InvalidHexValueError:ke,InvalidInputRpcError:pi,InvalidLegacyVError:de,InvalidModifierError:En,InvalidParameterError:In,InvalidParamsRpcError:yi,InvalidParenthesisError:Tn,InvalidPrimaryTypeError:hc,InvalidRequestRpcError:gi,InvalidSerializableTransactionError:vn,InvalidSerializedTransactionError:M,InvalidSerializedTransactionTypeError:ce,InvalidSignatureError:An,InvalidStorageKeySizeError:Cn,InvalidStructSignatureError:Sn,InvalidStructTypeError:pc,InvalidTypedDataTypeError:yc,InvalidYParityError:fe,JsonRpcVersionUnsupportedError:bi,LimitExceededRpcError:wi,MaxFeePerGasTooLowError:Pn,MethodNotFoundRpcError:xi,MethodNotSupportedRpcError:Ei,NonceMaxValueError:Ii,NonceTooHighError:Ti,NonceTooLowError:vi,ParseRpcError:Ai,ProviderDisconnectedError:Ci,ProviderRpcError:Si,RawContractError:Rn,ResourceNotFoundRpcError:Pi,ResourceUnavailableRpcError:Ri,ResponseBodyTooLargeError:_i,RlpDepthLimitExceededError:ze,RlpListBoundaryExceededError:Me,RlpTrailingBytesError:Le,RpcError:Fi,RpcRequestError:je,SizeExceedsPaddingSizeError:qi,SizeOverflowError:Ui,SliceOffsetOutOfBoundsError:Bi,SocketClosedError:Ni,SolidityProtectedKeywordError:_n,StateAssignmentConflictError:Fn,SwitchChainError:ki,TimeoutError:Li,TipAboveFeeCapError:zi,TransactionExecutionError:qn,TransactionNotFoundError:Un,TransactionReceiptNotFoundError:Bn,TransactionRejectedRpcError:Mi,TransactionTypeNotSupportedError:Di,UnauthorizedProviderError:Gi,UnknownBundleIdError:Hi,UnknownNodeError:Oi,UnknownRpcError:$i,UnknownSignatureError:Nn,UnknownTypeError:kn,UnsupportedChainIdError:ji,UnsupportedNonOptionalCapabilityError:Vi,UnsupportedPackedAbiType:Ln,UnsupportedProviderMethodError:Wi,UrlRequiredError:Ze,UserRejectedRequestError:Ki,WaitForCallsStatusTimeoutError:Eo,WaitForTransactionReceiptTimeoutError:zn,WebSocketRequestError:Ji,assertCurrentChain:At,assertRequest:Tt,assertTransactionEIP1559:qe,assertTransactionEIP2930:Ue,assertTransactionLegacy:Be,blobsToCommitments:Mn,blobsToProofs:Dn,boolToBytes:Yi,boolToHex:Zi,bytesToBigInt:Gn,bytesToBool:Hn,bytesToHex:N,bytesToNumber:On,bytesToRlp:$n,bytesToString:jn,ccipFetch:Et,ccipReadTunnel:tu,ccipRequest:Et,checksumAddress:Ee,commitmentToVersionedHash:Te,commitmentsToVersionedHashes:Vn,compactSignatureToHex:re,compactSignatureToSignature:wd,concat:et,concatBytes:Wn,concatHex:Kn,createClient:Ft,createNonceManager:Io,createPublicClient:To,createTestClient:ju,createTransport:Qe,createWalletClient:od,custom:Wo,decodeAbiParameters:St,decodeDeployData:fd,decodeErrorResult:be,decodeEventLog:Jn,decodeFunctionData:Rc,decodeFunctionResult:ye,defineBlock:Yn,defineChain:Do,defineKzg:ba,defineTransaction:Zn,defineTransactionReceipt:Qn,defineTransactionRequest:Xn,deploylessCallViaBytecodeBytecode:tr,deploylessCallViaFactoryBytecode:er,domainSeparator:gc,encodeAbiParameters:ar,encodeDeployData:we,encodeErrorResult:_c,encodeEventTopics:vo,encodeFunctionData:ge,encodeFunctionResult:Fc,encodePacked:Ao,erc1155Abi:Qi,erc20Abi:k,erc20Abi_bytes32:Xi,erc4626Abi:tc,erc6492SignatureValidatorAbi:Xt,erc6492SignatureValidatorByteCode:Wt,erc721Abi:ec,ethAddress:Co,etherUnits:cd,extendSchema:Go,extractChain:Nc,fallback:Ic,formatBlock:nr,formatEther:rr,formatGwei:ac,formatLog:sr,formatTransaction:or,formatTransactionReceipt:ir,formatTransactionRequest:rt,formatUnits:qt,fromBlobs:hd,fromBytes:cr,fromHex:nc,fromRlp:Bt,getAbiItem:ur,getAddress:_,getChainContractAddress:dr,getContract:du,getContractAddress:Xc,getContractError:mr,getCreate2Address:ma,getCreateAddress:da,getEventSelector:Kt,getEventSignature:Y,getFunctionSelector:Jt,getFunctionSignature:Y,getSerializedTransactionType:ca,getTransactionType:lr,getTypesForEIP712Domain:Ke,gweiUnits:ud,hashDomain:bc,hashMessage:Ve,hashStruct:wc,hashTypedData:We,hexToBigInt:x,hexToBool:rc,hexToBytes:D,hexToCompactSignature:ne,hexToNumber:C,hexToRlp:fr,hexToSignature:Zt,hexToString:sc,http:Tc,isAddress:me,isAddressEqual:st,isBytes:It,isErc6492Signature:la,isErc8010Signature:fa,isHash:ia,isHex:g,keccak256:H,labelhash:So,maxInt104:hr,maxInt112:pr,maxInt120:yr,maxInt128:gr,maxInt136:br,maxInt144:wr,maxInt152:xr,maxInt16:Er,maxInt160:Ir,maxInt168:Tr,maxInt176:vr,maxInt184:Ar,maxInt192:Cr,maxInt200:Sr,maxInt208:Pr,maxInt216:Rr,maxInt224:_r,maxInt232:Fr,maxInt24:qr,maxInt240:Ur,maxInt248:Br,maxInt256:Nr,maxInt32:kr,maxInt40:Lr,maxInt48:zr,maxInt56:Mr,maxInt64:Dr,maxInt72:Gr,maxInt8:Hr,maxInt80:Or,maxInt88:$r,maxInt96:jr,maxUint104:Vr,maxUint112:Wr,maxUint120:Kr,maxUint128:Jr,maxUint136:Yr,maxUint144:Zr,maxUint152:Qr,maxUint16:Xr,maxUint160:ts,maxUint168:es,maxUint176:as,maxUint184:ns,maxUint192:rs,maxUint200:ss,maxUint208:os,maxUint216:is,maxUint224:cs,maxUint232:us,maxUint24:ds,maxUint240:ms,maxUint248:ls,maxUint256:fs,maxUint32:hs,maxUint40:ps,maxUint48:ys,maxUint56:gs,maxUint64:bs,maxUint72:ws,maxUint8:xs,maxUint80:Es,maxUint88:Is,maxUint96:Ts,minInt104:vs,minInt112:As,minInt120:Cs,minInt128:Ss,minInt136:Ps,minInt144:Rs,minInt152:_s,minInt16:Fs,minInt160:qs,minInt168:Us,minInt176:Bs,minInt184:Ns,minInt192:ks,minInt200:Ls,minInt208:zs,minInt216:Ms,minInt224:Ds,minInt232:Gs,minInt24:Hs,minInt240:Os,minInt248:$s,minInt256:js,minInt32:Vs,minInt40:Ws,minInt48:Ks,minInt56:Js,minInt64:Ys,minInt72:Zs,minInt8:Qs,minInt80:Xs,minInt88:to,minInt96:eo,multicall3Abi:oc,namehash:Po,nonceManager:Ro,numberToBytes:ic,numberToHex:E,offchainLookup:qc,offchainLookupAbiItem:Uc,offchainLookupSignature:Bc,pad:He,padBytes:cc,padHex:xt,parseAbi:ao,parseAbiItem:Ho,parseAbiParameter:kc,parseAbiParameters:Oo,parseCompactSignature:ne,parseErc6492Signature:au,parseErc8010Signature:nu,parseEther:cu,parseEventLogs:Pt,parseGwei:uu,parseSignature:Zt,parseTransaction:ua,parseUnits:Ko,prepareEncodeFunctionData:no,presignMessagePrefix:xc,publicActions:_o,recoverAddress:j,recoverMessageAddress:ha,recoverPublicKey:ro,recoverTransactionAddress:xd,recoverTypedDataAddress:pa,ripemd160:eu,rpcSchema:Jo,rpcTransactionType:so,serializeAccessList:$o,serializeCompactSignature:re,serializeErc6492Signature:Fo,serializeErc8010Signature:ru,serializeSignature:Qt,serializeTransaction:Ne,serializeTypedData:Ye,setErrorConfig:uc,setupKzg:bd,sha256:oo,shouldThrow:vc,sidecarsToVersionedHashes:pd,signatureToCompactSignature:Ed,signatureToHex:Qt,size:De,slice:pe,sliceBytes:io,sliceHex:Ct,stringToBytes:dc,stringToHex:mc,stringify:lc,testActions:ya,toBlobSidecars:ue,toBlobs:co,toBytes:F,toCoinType:gd,toEventHash:Yt,toEventSelector:Kt,toEventSignature:Y,toFunctionHash:Yt,toFunctionSelector:Jt,toFunctionSignature:Y,toHex:$e,toPrefixedMessage:Ec,toRlp:he,transactionType:uo,trim:Ge,universalSignatureValidatorAbi:Xt,universalSignatureValidatorByteCode:Wt,validateTypedData:Je,verifyHash:su,verifyMessage:ou,verifyTypedData:iu,walletActions:ga,webSocket:id,weiUnits:dd,withCache:Yo,withRetry:Ac,withTimeout:Cc,zeroAddress:qo,zeroHash:Uo},Symbol.toStringTag,{value:"Module"}));export{Ud as _};
1
+ import{az as Ot,av as xa,aw as Ea,bP as se,aB as $t,bQ as Ia,bR as Ta,bS as J,x as jt,af as nt,by as Tt,b6 as va,a8 as S,bJ as vt,bT as At,bz as rt,bA as oe,a as et,bo as Vt,bf as ie,bU as Aa,bV as tt,bt as Ca,a1 as O,bh as $,bW as bt,bv as Ct,bX as ce,bY as M,as as ue,at as de,q as me,r as le,bZ as fe,a0 as _,o as H,ao as he,s as pe,ae as ye,ad as ge,d as be,n as Sa,b as St,b8 as j,i as st,a3 as Pt,ba as we,bg as xe,bi as Ee,bN as Pa,bO as Ra,b_ as Ie,b$ as wt,c0 as Te,c1 as _a,c2 as Fa,bC as qa,c3 as Ua,c4 as Ba,bp as Na,j as ka,h as La,c5 as za,bj as Ma,c6 as Da,c7 as Ga,l as Ha,m as Oa,A as $a,c8 as ja,c9 as Va,ab as Wa,B as Ka,bb as Ja,ca as Ya,cb as Za,cc as Qa,cd as Xa,ce as tn,bc as en,bw as an,cf as nn,cg as rn,bm as sn,bn as on,ch as cn,ci as un,cj as dn,ck as mn,cl as ln,cm as fn,ax as hn,aA as pn,cn as yn,I as gn,ag as bn,co as wn,cp as xn,cq as En,cr as In,cs as Tn,ct as vn,cu as An,am as Cn,cv as Sn,cw as Pn,bD as Rn,cx as _n,cy as Fn,cz as qn,a4 as Un,a6 as Bn,cA as Nn,cB as kn,br as Ln,a9 as zn,ap as Mn,ar as Dn,cC as Gn,cD as Hn,cE as On,cF as $n,cG as jn,aq as Vn,cH as Wn,k as Kn,bl as Jn,cI as Yn,cJ as Zn,cK as Qn,cL as Xn,bI as tr,cM as er,e as ar,bd as Wt,bG as nr,cN as rr,a2 as sr,a5 as or,a7 as ir,cO as cr,g as ur,bx as dr,b7 as mr,bk as Kt,cP as Y,t as Jt,an as lr,cQ as fr,cR as hr,cS as pr,cT as yr,cU as gr,cV as br,cW as wr,cX as xr,cY as Er,cZ as Ir,c_ as Tr,c$ as vr,d0 as Ar,d1 as Cr,d2 as Sr,d3 as Pr,d4 as Rr,d5 as _r,d6 as Fr,d7 as qr,d8 as Ur,d9 as Br,da as Nr,db as kr,dc as Lr,dd as zr,de as Mr,df as Dr,dg as Gr,dh as Hr,di as Or,dj as $r,dk as jr,dl as Vr,dm as Wr,dn as Kr,dp as Jr,dq as Yr,dr as Zr,ds as Qr,dt as Xr,du as ts,dv as es,dw as as,dx as ns,dy as rs,dz as ss,dA as os,dB as is,dC as cs,dD as us,dE as ds,dF as ms,dG as ls,ah as fs,dH as hs,dI as ps,dJ as ys,dK as gs,dL as bs,dM as ws,dN as xs,dO as Es,dP as Is,dQ as Ts,dR as vs,dS as As,dT as Cs,dU as Ss,dV as Ps,dW as Rs,dX as _s,dY as Fs,dZ as qs,d_ as Us,d$ as Bs,e0 as Ns,e1 as ks,e2 as Ls,e3 as zs,e4 as Ms,e5 as Ds,e6 as Gs,e7 as Hs,e8 as Os,e9 as $s,ea as js,eb as Vs,ec as Ws,ed as Ks,ee as Js,ef as Ys,eg as Zs,eh as Qs,ei as Xs,ej as to,ek as eo,el as ao,em as no,en as ro,eo as so,ep as oo,eq as io,er as co,es as Yt,et as uo}from"./writeContract-f029805e.js";import{s as ve,e as mo,a as Rt,c as lo,g as fo,w as ho,b as _t,d as Ae,p as at,r as ot,t as Ce,f as Se,h as Pe,i as Re,j as _e,k as po,E as Fe,B as yo,l as go,m as bo,n as wo,F as xo,W as Eo,o as Io,q as To,u as vo,v as Ao,x as Co,y as Zt,z as So,A as Po,C as Ro,D as _o,G as Fo,H as qo,I as Uo}from"./parseSignature-6109cfb8.js";import{h as Bo,i as No,j as qe,k as Ue,l as Be,m as ko,u as Lo,w as zo,r as Mo,s as Ne,n as Do,o as Go,p as Ho,q as Oo,t as $o,x as Qt}from"./verifyHash-ae676cbd.js";import{w as jo,a as Ft,s as Vo,m as Z,c as Wo,p as Ko,r as Jo,n as Yo}from"./custom-6c3adaba.js";import{L as Zo,B as it,aj as ke,a4 as D,ak as Le,al as ze,f as N,am as Me,b as g,h as De,a2 as C,Y as x,a3 as Ge,an as xt,a9 as F,aa as He,d as ft,H as Oe,t as $e,n as E,ao as Qo,ap as Xo,ai as k,R as je,p as ti,A as ei,q as ai,C as ni,D as ri,X as si,a0 as oi,aq as ii,ar as ci,as as ui,F as di,at as mi,au as li,av as fi,aw as hi,I as pi,G as yi,N as gi,J as bi,y as wi,K as xi,M as Ei,ax as Ii,ay as Ti,az as vi,O as Ai,P as Ci,aA as Si,E as Pi,l as Ri,Q as _i,aB as Fi,aC as qi,aD as Ui,aE as Bi,S as Ni,k as ki,T as Li,a1 as zi,z as Mi,aF as Di,x as Gi,r as Hi,ah as Oi,m as $i,u as ji,v as Vi,w as Wi,U as Ki,W as Ji,aG as Yi,ab as Zi,aH as Qi,aI as Xi,aJ as tc,a6 as Xt,aK as ec,aL as ac,j as nc,a7 as rc,a8 as sc,$ as oc,aM as ic,aN as cc,aO as uc,ac as dc,e as mc,s as lc}from"./createBatchScheduler-7c9ada66.js";import{h as Ve,a as We,g as Ke,v as Je,s as Ye,I as fc,b as hc,c as pc,d as yc,e as gc,f as bc,i as wc,p as xc,t as Ec}from"./hashTypedData-6a1d5c90.js";import{f as qt,U as Ze,c as Qe,d as Ic,h as Tc,s as vc,a as Ac,w as Cc}from"./http-a4cf4808.js";import{g as Sc,a as ht}from"./compat-cd8c4091.js";import{l as Pc,d as Rc,e as _c,b as Fc}from"./localBatchGatewayRequest-69468f9d.js";import{ccipRequest as Et,offchainLookup as qc,offchainLookupAbiItem as Uc,offchainLookupSignature as Bc}from"./ccip-57e7e084.js";import{s as Xe}from"./secp256k1-c4549fdf.js";function Nc({chains:t,id:e}){return t.find(a=>a.id===e)}function kc(t){let e;if(typeof t=="string")e=Ot(t,{modifiers:$t});else{const a=xa(t),n=t.length;for(let r=0;r<n;r++){const s=t[r];if(!Ea(s)){e=Ot(s,{modifiers:$t,structs:a});break}}}if(!e)throw new se({param:t});return e}const Lc=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),ta=(()=>Uint8Array.from(new Array(16).fill(0).map((t,e)=>e)))(),zc=(()=>ta.map(t=>(9*t+5)%16))(),ea=(()=>{const a=[[ta],[zc]];for(let n=0;n<4;n++)for(let r of a)r.push(r[n].map(s=>Lc[s]));return a})(),aa=(()=>ea[0])(),na=(()=>ea[1])(),ra=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>Uint8Array.from(t)),Mc=aa.map((t,e)=>t.map(a=>ra[e][a])),Dc=na.map((t,e)=>t.map(a=>ra[e][a])),Gc=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),Hc=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function te(t,e,a,n){return t===0?e^a^n:t===1?e&a|~e&n:t===2?(e|~a)^n:t===3?e&n|a&~n:e^(a|~n)}const Q=new Uint32Array(16);class Oc extends Ta{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:n,h3:r,h4:s}=this;return[e,a,n,r,s]}set(e,a,n,r,s){this.h0=e|0,this.h1=a|0,this.h2=n|0,this.h3=r|0,this.h4=s|0}process(e,a){for(let u=0;u<16;u++,a+=4)Q[u]=e.getUint32(a,!0);let n=this.h0|0,r=n,s=this.h1|0,o=s,i=this.h2|0,c=i,d=this.h3|0,l=d,m=this.h4|0,h=m;for(let u=0;u<5;u++){const f=4-u,y=Gc[u],w=Hc[u],I=aa[u],b=na[u],v=Mc[u],P=Dc[u];for(let T=0;T<16;T++){const p=J(n+te(u,s,i,d)+Q[I[T]]+y,v[T])+m|0;n=m,m=d,d=J(i,10)|0,i=s,s=p}for(let T=0;T<16;T++){const p=J(r+te(f,o,c,l)+Q[b[T]]+w,P[T])+h|0;r=h,h=l,l=J(c,10)|0,c=o,o=p}}this.set(this.h1+i+l|0,this.h2+d+h|0,this.h3+m+r|0,this.h4+n+o|0,this.h0+s+c|0)}roundClean(){jt(Q)}destroy(){this.destroyed=!0,jt(this.buffer),this.set(0,0,0,0,0)}}const $c=Ia(()=>new Oc),jc=$c,pt=new Zo(128);async function sa(t,e){var Nt,kt,Lt,zt,Mt,Dt;const{account:a=t.account,assertChainId:n=!0,chain:r=t.chain,accessList:s,authorizationList:o,blobs:i,data:c,dataSuffix:d=typeof t.dataSuffix=="string"?t.dataSuffix:(Nt=t.dataSuffix)==null?void 0:Nt.value,gas:l,gasPrice:m,maxFeePerBlobGas:h,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:y,pollingInterval:w,throwOnReceiptRevert:I,type:b,value:v,...P}=e,T=e.timeout??Math.max(((r==null?void 0:r.blockTime)??0)*3,5e3);if(typeof a>"u")throw new nt({docsPath:"/docs/actions/wallet/sendTransactionSync"});const p=a?O(a):null;let A;try{Tt(e);const q=await(async()=>{if(e.to)return e.to;if(e.to!==null&&o&&o.length>0)return await va({authorization:o[0]}).catch(()=>{throw new it("`to` is required. Could not infer from `authorizationList`.")})})();if((p==null?void 0:p.type)==="json-rpc"||p===null){let G;r!==null&&(G=await S(t,vt,"getChainId")({}),n&&At({currentChainId:G,chain:r}));const W=(zt=(Lt=(kt=t.chain)==null?void 0:kt.formatters)==null?void 0:Lt.transactionRequest)==null?void 0:zt.format,K=(W||rt)({...oe(P,{format:W}),accessList:s,account:p,authorizationList:o,blobs:i,chainId:G,data:d?et([c??"0x",d]):c,gas:l,gasPrice:m,maxFeePerBlobGas:h,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:y,to:q,type:b,value:v},"sendTransaction"),U=pt.get(t.uid),R=U?"wallet_sendTransaction":"eth_sendTransaction",wa=await(async()=>{try{return await t.request({method:R,params:[K]},{retryCount:0})}catch(Ht){if(U===!1)throw Ht;const B=Ht;if(B.name==="InvalidInputRpcError"||B.name==="InvalidParamsRpcError"||B.name==="MethodNotFoundRpcError"||B.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[K]},{retryCount:0}).then(mt=>(pt.set(t.uid,!0),mt)).catch(mt=>{const lt=mt;throw lt.name==="MethodNotFoundRpcError"||lt.name==="MethodNotSupportedRpcError"?(pt.set(t.uid,!1),B):lt});throw B}})(),dt=await S(t,jo,"waitForTransactionReceipt")({checkReplacement:!1,hash:wa,pollingInterval:w,timeout:T});if(I&&dt.status==="reverted")throw new Vt({receipt:dt});return dt}if((p==null?void 0:p.type)==="local"){const G=(()=>{if(!p.nonceManager||typeof y<"u")return p.nonceManager;const U=p.nonceManager;return{consume(R){return A={address:R.address,chainId:R.chainId},U.consume(R)},get(R){return U.get(R)},increment(R){return U.increment(R)},reset(R){return U.reset(R)}}})(),W=await S(t,ie,"prepareTransactionRequest")({account:p,accessList:s,authorizationList:o,blobs:i,chain:r,data:d?et([c??"0x",d]):c,gas:l,gasPrice:m,maxFeePerBlobGas:h,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:y,nonceManager:G,parameters:[...Aa,"sidecars"],type:b,value:v,...P,to:q}),Gt=(Mt=r==null?void 0:r.serializers)==null?void 0:Mt.transaction,K=await p.signTransaction(W,{serializer:Gt});return await S(t,ve,"sendRawTransactionSync")({serializedTransaction:K,throwOnReceiptRevert:I,timeout:e.timeout})}throw(p==null?void 0:p.type)==="smart"?new tt({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new tt({docsPath:"/docs/actions/wallet/sendTransactionSync",type:p==null?void 0:p.type})}catch(q){throw q instanceof tt?q:(A&&!(q instanceof Vt)&&((Dt=p==null?void 0:p.nonceManager)==null||Dt.reset(A)),Ca(q,{...e,account:p,chain:e.chain||void 0}))}}async function Ut(t,e){return $.internal(t,sa,"sendTransactionSync",e)}const ee=1024;function Bt(t,e="hex"){const a=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new ke(t);return D(t)}return t})(),n=bt(a,{recursiveReadLimit:Number.POSITIVE_INFINITY}),r=oa(n,e);if(n.position<n.bytes.length)throw new Le({count:n.bytes.length-n.position});return r}function oa(t,e="hex",a=0){if(a>=ee)throw new ze({limit:ee});if(t.bytes.length===0)return e==="hex"?N(t.bytes):t.bytes;const n=t.readByte();if(n<128&&t.decrementPosition(1),n<192){const s=ae(t,n,128),o=t.readBytes(s);return e==="hex"?N(o):o}const r=ae(t,n,192);return Vc(t,r,e,a+1)}function ae(t,e,a){if(a===128&&e<128)return 1;if(e<=a+55)return e-a;if(e===a+55+1)return t.readUint8();if(e===a+55+2)return t.readUint16();if(e===a+55+3)return t.readUint24();if(e===a+55+4)return t.readUint32();throw new it("Invalid RLP prefix")}function Vc(t,e,a,n){const r=t.position,s=[];for(;t.position-r<e;)s.push(oa(t,a,n));if(t.position-r!==e)throw new Me({consumed:t.position-r,declared:e});return s}function ia(t){return g(t)&&De(t)===32}function ca(t){const e=Ct(t,0,1);if(e==="0x04")return"eip7702";if(e==="0x03")return"eip4844";if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&C(e)>=192)return"legacy";throw new ce({serializedType:e})}function ua(t){const e=ca(t);return e==="eip1559"?Jc(t):e==="eip2930"?Yc(t):e==="eip4844"?Kc(t):e==="eip7702"?Wc(t):Zc(t)}function Wc(t){const e=ct(t),[a,n,r,s,o,i,c,d,l,m,h,u,f]=e;if(e.length!==10&&e.length!==13)throw new M({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:o,to:i,value:c,data:d,accessList:l,authorizationList:m,...e.length>9?{v:h,r:u,s:f}:{}},serializedTransaction:t,type:"eip7702"});const y={chainId:C(a),type:"eip7702"};return g(i)&&i!=="0x"&&(y.to=i),g(o)&&o!=="0x"&&(y.gas=x(o)),g(d)&&d!=="0x"&&(y.data=d),g(n)&&(y.nonce=n==="0x"?0:C(n)),g(c)&&c!=="0x"&&(y.value=x(c)),g(s)&&s!=="0x"&&(y.maxFeePerGas=x(s)),g(r)&&r!=="0x"&&(y.maxPriorityFeePerGas=x(r)),l.length!==0&&l!=="0x"&&(y.accessList=ut(l)),m.length!==0&&m!=="0x"&&(y.authorizationList=Qc(m)),Bo(y),{...e.length===13?V(e):void 0,...y}}function Kc(t){const e=ct(t),a=e.length===4,n=a?e[0]:e,r=a?e.slice(1):[],[s,o,i,c,d,l,m,h,u,f,y,w,I,b]=n,[v,P,T]=r;if(!(n.length===11||n.length===14))throw new M({attributes:{chainId:s,nonce:o,maxPriorityFeePerGas:i,maxFeePerGas:c,gas:d,to:l,value:m,data:h,accessList:u,...n.length>9?{v:w,r:I,s:b}:{}},serializedTransaction:t,type:"eip4844"});const p={blobVersionedHashes:y,chainId:C(s),to:l,type:"eip4844"};return g(d)&&d!=="0x"&&(p.gas=x(d)),g(h)&&h!=="0x"&&(p.data=h),g(o)&&(p.nonce=o==="0x"?0:C(o)),g(m)&&m!=="0x"&&(p.value=x(m)),g(f)&&f!=="0x"&&(p.maxFeePerBlobGas=x(f)),g(c)&&c!=="0x"&&(p.maxFeePerGas=x(c)),g(i)&&i!=="0x"&&(p.maxPriorityFeePerGas=x(i)),u.length!==0&&u!=="0x"&&(p.accessList=ut(u)),v&&P&&T&&(p.sidecars=ue({blobs:v,commitments:P,proofs:T})),No(p),{...n.length===14?V(n):void 0,...p}}function Jc(t){const e=ct(t),[a,n,r,s,o,i,c,d,l,m,h,u]=e;if(!(e.length===9||e.length===12))throw new M({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:o,to:i,value:c,data:d,accessList:l,...e.length>9?{v:m,r:h,s:u}:{}},serializedTransaction:t,type:"eip1559"});const f={chainId:C(a),type:"eip1559"};return g(i)&&i!=="0x"&&(f.to=i),g(o)&&o!=="0x"&&(f.gas=x(o)),g(d)&&d!=="0x"&&(f.data=d),g(n)&&(f.nonce=n==="0x"?0:C(n)),g(c)&&c!=="0x"&&(f.value=x(c)),g(s)&&s!=="0x"&&(f.maxFeePerGas=x(s)),g(r)&&r!=="0x"&&(f.maxPriorityFeePerGas=x(r)),l.length!==0&&l!=="0x"&&(f.accessList=ut(l)),qe(f),{...e.length===12?V(e):void 0,...f}}function Yc(t){const e=ct(t),[a,n,r,s,o,i,c,d,l,m,h]=e;if(!(e.length===8||e.length===11))throw new M({attributes:{chainId:a,nonce:n,gasPrice:r,gas:s,to:o,value:i,data:c,accessList:d,...e.length>8?{v:l,r:m,s:h}:{}},serializedTransaction:t,type:"eip2930"});const u={chainId:C(a),type:"eip2930"};return g(o)&&o!=="0x"&&(u.to=o),g(s)&&s!=="0x"&&(u.gas=x(s)),g(c)&&c!=="0x"&&(u.data=c),g(n)&&(u.nonce=n==="0x"?0:C(n)),g(i)&&i!=="0x"&&(u.value=x(i)),g(r)&&r!=="0x"&&(u.gasPrice=x(r)),d.length!==0&&d!=="0x"&&(u.accessList=ut(d)),Ue(u),{...e.length===11?V(e):void 0,...u}}function Zc(t){const e=Bt(t,"hex"),[a,n,r,s,o,i,c,d,l]=e;if(!(e.length===6||e.length===9))throw new M({attributes:{nonce:a,gasPrice:n,gas:r,to:s,value:o,data:i,...e.length>6?{v:c,r:d,s:l}:{}},serializedTransaction:t,type:"legacy"});const m={type:"legacy"};if(g(s)&&s!=="0x"&&(m.to=s),g(r)&&r!=="0x"&&(m.gas=x(r)),g(i)&&i!=="0x"&&(m.data=i),g(a)&&(m.nonce=a==="0x"?0:C(a)),g(o)&&o!=="0x"&&(m.value=x(o)),g(n)&&n!=="0x"&&(m.gasPrice=x(n)),Be(m),e.length===6)return m;const h=g(c)&&c!=="0x"?x(c):0n;if(l==="0x"&&d==="0x")return h>0&&(m.chainId=Number(h)),m;const u=h,f=Number((u-35n)/2n);if(f>0)m.chainId=f;else if(u!==27n&&u!==28n)throw new de({v:u});return m.v=u,m.s=l,m.r=d,m.yParity=u%2n===0n?1:0,m}function ct(t){return Bt(`0x${t.slice(4)}`,"hex")}function ut(t){const e=[];for(let a=0;a<t.length;a++){const[n,r]=t[a];if(!me(n,{strict:!1}))throw new le({address:n});e.push({address:n,storageKeys:r.map(s=>ia(s)?s:Ge(s))})}return e}function Qc(t){const e=[];for(let a=0;a<t.length;a++){const[n,r,s,o,i,c]=t[a];e.push({address:r,chainId:n==="0x"?0:C(n),nonce:s==="0x"?0:C(s),...V([o,i,c])})}return e}function V(t){const e=t.slice(-3),a=e[0]==="0x"?0n:x(e[0]);if(a!==0n&&a!==1n)throw new fe({yParity:a});const n=a===0n?27n:28n;return{r:xt(e[1],{size:32}),s:xt(e[2],{size:32}),v:n,yParity:n===27n?0:1}}function It(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}function Xc(t){return t.opcode==="CREATE2"?ma(t):da(t)}function da(t){const e=F(_(t.from));let a=F(t.nonce);return a[0]===0&&(a=new Uint8Array([])),_(`0x${H(he([e,a],"bytes")).slice(26)}`)}function ma(t){const e=F(_(t.from)),a=He(It(t.salt)?t.salt:F(t.salt),{size:32}),n=(()=>"bytecodeHash"in t?It(t.bytecodeHash)?t.bytecodeHash:F(t.bytecodeHash):H(t.bytecode,"bytes"))();return _(pe(H(et([F("0xff"),e,a,n])),12))}function tu({batchGateways:t,ccipRequest:e=Et}){return{async request({data:a,sender:n,urls:r}){if(r.includes(Pc))return e({data:a,sender:n,urls:t});{const[s,o]=ye({abi:ft,functionName:"query",data:await e({data:ge({abi:ft,functionName:"query",args:[[{sender:n,data:a,urls:r}]]}),sender:n,urls:t})});if(s[0]){let i;try{const c=be({abi:[...ft,Sa],data:o[0]});if(c.errorName==="HttpError")i=new Oe({body:{message:c.args[1]},status:c.args[0],url:r.join(" | ")});else{const d=c.args[0];d&&(i=new Error(d))}}catch{}throw i??new Error("An unknown error occurred.")}return o[0]}}}}function eu(t,e){const a=e||"hex",n=jc(g(t,{strict:!1})?F(t):t);return a==="bytes"?n:$e(n)}function la(t){return Ct(t,-32)===mo}function fa(t){return ko(t)}function au(t){if(!la(t))return{signature:t};const[e,a,n]=St([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:e,data:a,signature:n}}function nu(t){if(!fa(t))return{signature:t};const{authorization:e,to:a,...n}=Lo(t);return{authorization:{address:e.address,chainId:e.chainId,nonce:Number(e.nonce),r:E(e.r,{size:32}),s:E(e.s,{size:32}),yParity:e.yParity},...a?{address:a}:{},...n}}async function ha({message:t,signature:e}){return j({hash:Ve(t),signature:e})}async function pa(t){const{domain:e,message:a,primaryType:n,signature:r,types:s}=t;return j({hash:We({domain:e,message:a,primaryType:n,types:s}),signature:r})}function ru(t){const{address:e,data:a,signature:n,to:r="hex"}=t,s=zo({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:a,signature:n,to:e});return r==="hex"?s:D(s)}async function su({address:t,hash:e,signature:a}){return st(_(t),await j({hash:e,signature:a}))}async function ou({address:t,message:e,signature:a}){return st(_(t),await ha({message:e,signature:a}))}async function iu(t){const{address:e,domain:a,message:n,primaryType:r,signature:s,types:o}=t;return st(_(e),await pa({domain:a,message:n,primaryType:r,signature:s,types:o}))}function cu(t,e="wei"){return Qo(t,e)}function uu(t,e="wei"){return Xo(t,e)}function du({abi:t,address:e,client:a}){const n=a,[r,s]=(()=>n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0])(),o=r!=null,i=s!=null,c={};let d=!1,l=!1,m=!1;for(const h of t)if(h.type==="function"?h.stateMutability==="view"||h.stateMutability==="pure"?d=!0:l=!0:h.type==="event"&&(m=!0),d&&l&&m)break;return o&&(d&&(c.read=new Proxy({},{get(h,u){return(...f)=>{const{args:y,options:w}=X(f);return S(r,Mo,"readContract")({abi:t,address:e,functionName:u,args:y,...w})}}})),l&&(c.simulate=new Proxy({},{get(h,u){return(...f)=>{const{args:y,options:w}=X(f);return S(r,Rt,"simulateContract")({abi:t,address:e,functionName:u,args:y,...w})}}})),m&&(c.createEventFilter=new Proxy({},{get(h,u){return(...f)=>{const y=t.find(b=>b.type==="event"&&b.name===u),{args:w,options:I}=yt(f,y);return S(r,lo,"createContractEventFilter")({abi:t,address:e,eventName:u,args:w,...I})}}}),c.getEvents=new Proxy({},{get(h,u){return(...f)=>{const y=t.find(b=>b.type==="event"&&b.name===u),{args:w,options:I}=yt(f,y);return S(r,fo,"getContractEvents")({abi:t,address:e,eventName:u,args:w,...I})}}}),c.watchEvent=new Proxy({},{get(h,u){return(...f)=>{const y=t.find(b=>b.type==="event"&&b.name===u),{args:w,options:I}=yt(f,y);return S(r,ho,"watchContractEvent")({abi:t,address:e,eventName:u,args:w,...I})}}}))),i&&l&&(c.write=new Proxy({},{get(h,u){return(...f)=>{const{args:y,options:w}=X(f);return S(s,$,"writeContract")({abi:t,address:e,functionName:u,args:y,...w})}}})),(o||i)&&l&&(c.estimateGas=new Proxy({},{get(h,u){return(...f)=>{const{args:y,options:w}=X(f);return S(r??s,_t,"estimateContractGas")({abi:t,address:e,functionName:u,args:y,...w,account:w.account??s.account})}}})),c.address=e,c.abi=t,c}function X(t){const e=t.length&&Array.isArray(t[0]),a=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:a,options:n}}function yt(t,e){let a=!1;Array.isArray(t[0])?a=!0:t.length===1?a=e.inputs.some(s=>s.indexed):t.length===2&&(a=!0);const n=a?t[0]:void 0,r=(a?t[1]:t[0])??{};return{args:n,options:r}}async function L(t,e){return L.inner($,t,e)}(function(t){async function e(o,i,c){return await o(i,{...c,...t.call(i,c)})}t.inner=e;function a(o,i){return Ae(mu(o,i))}t.call=a;async function n(o,i){return _t(o,{...at(i),...t.call(o,i)})}t.estimateGas=n;async function r(o,i){return Rt(o,{...at(i),...t.call(o,i)})}t.simulate=r;function s(o){const[i]=Pt({abi:k,logs:o,eventName:"Approval",strict:!0});if(!i)throw new Error("`Approval` event not found.");return i}t.extractEvent=s})(L||(L={}));function mu(t,e){const{amount:a,spender:n,token:r}=e,{address:s,decimals:o}=ot(t,{token:r});return{abi:k,address:s,args:[n,Ce(a,o)],functionName:"approve"}}async function lu(t,e){const{amount:a,token:n,throwOnReceiptRevert:r=!0}=e,{decimals:s}=ot(t,{token:n}),o=Se(a,s),i=await L.inner(Ut,t,{...e,throwOnReceiptRevert:r}),{args:c}=L.extractEvent(i.logs);return{...c,...o===void 0?{}:{decimals:o,formatted:qt(c.value,o)},receipt:i}}async function z(t,e){return z.inner($,t,e)}(function(t){async function e(o,i,c){return await o(i,{...c,...t.call(i,c)})}t.inner=e;function a(o,i){return Ae(fu(o,i))}t.call=a;async function n(o,i){return _t(o,{...at(i),...t.call(o,i)})}t.estimateGas=n;async function r(o,i){return Rt(o,{...at(i),...t.call(o,i)})}t.simulate=r;function s(o){const[i]=Pt({abi:k,logs:o,eventName:"Transfer",strict:!0});if(!i)throw new Error("`Transfer` event not found.");return i}t.extractEvent=s})(z||(z={}));function fu(t,e){const{amount:a,from:n,to:r,token:s}=e,{address:o,decimals:i}=ot(t,{token:s}),c=Ce(a,i);return n?{abi:k,address:o,args:[n,r,c],functionName:"transferFrom"}:{abi:k,address:o,args:[r,c],functionName:"transfer"}}async function hu(t,e){const{amount:a,token:n,throwOnReceiptRevert:r=!0}=e,{decimals:s}=ot(t,{token:n}),o=Se(a,s),i=await z.inner(Ut,t,{...e,throwOnReceiptRevert:r}),{args:c}=z.extractEvent(i.logs);return{...c,...o===void 0?{}:{decimals:o,formatted:qt(c.value,o)},receipt:i}}async function pu(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function yu(t){return t.request({method:`${t.mode}_dumpState`})}async function gu(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function bu(t){return await t.request({method:"txpool_content"})}async function wu(t){const{pending:e,queued:a}=await t.request({method:"txpool_status"});return{pending:C(e),queued:C(a)}}async function xu(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function Eu(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[E(e)]})}async function Iu(t){return await t.request({method:"txpool_inspect"})}async function Tu(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function vu(t,{blocks:e,interval:a}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:E(e)}]}):await t.request({method:`${t.mode}_mine`,params:[E(e),E(a||0)]})}async function Au(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function Cu(t,{blockNumber:e,jsonRpcUrl:a}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:a}}]})}async function Su(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function Pu(t,e){var I,b,v;const{accessList:a,data:n,from:r,gas:s,gasPrice:o,maxFeePerGas:i,maxPriorityFeePerGas:c,nonce:d,to:l,value:m,...h}=e,u=(v=(b=(I=t.chain)==null?void 0:I.formatters)==null?void 0:b.transactionRequest)==null?void 0:v.format,y=(u||rt)({...oe(h,{format:u}),accessList:a,data:n,from:r,gas:s,gasPrice:o,maxFeePerGas:i,maxPriorityFeePerGas:c,nonce:d,to:l,value:m},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[y]})}async function Ru(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function _u(t,{address:e,value:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,E(a)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,E(a)]})}async function Fu(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[E(e)]})}async function qu(t,{interval:e}){const a=(()=>t.mode==="hardhat"?e*1e3:e)();await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[a]})}async function Uu(t,{address:e,bytecode:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[e,a]}):await t.request({method:`${t.mode}_setCode`,params:[e,a]})}async function Bu(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function Nu(t,{interval:e}){const a=(()=>t.mode==="hardhat"?e*1e3:e)();await t.request({method:"evm_setIntervalMining",params:[a]})}async function ku(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function Lu(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[E(e)]})}async function zu(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[E(e)]})}async function Mu(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[E(e)]})}async function Du(t,{address:e,nonce:a}){await t.request({method:`${t.mode}_setNonce`,params:[e,E(a)]})}async function Gu(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function Hu(t,{address:e,index:a,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof a=="number"?E(a):a,n]})}async function Ou(t){return await t.request({method:"evm_snapshot"})}async function $u(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function ya({mode:t}){return e=>{const a=e.extend(()=>({mode:t}));return{dropTransaction:n=>pu(a,n),dumpState:()=>yu(a),getAutomine:()=>gu(a),getTxpoolContent:()=>bu(a),getTxpoolStatus:()=>wu(a),impersonateAccount:n=>xu(a,n),increaseTime:n=>Eu(a,n),inspectTxpool:()=>Iu(a),loadState:n=>Tu(a,n),mine:n=>vu(a,n),removeBlockTimestampInterval:()=>Au(a),reset:n=>Cu(a,n),revert:n=>Su(a,n),sendUnsignedTransaction:n=>Pu(a,n),setAutomine:n=>Ru(a,n),setBalance:n=>_u(a,n),setBlockGasLimit:n=>Fu(a,n),setBlockTimestampInterval:n=>qu(a,n),setCode:n=>Uu(a,n),setCoinbase:n=>Bu(a,n),setIntervalMining:n=>Nu(a,n),setLoggingEnabled:n=>ku(a,n),setMinGasPrice:n=>Lu(a,n),setNextBlockBaseFeePerGas:n=>zu(a,n),setNextBlockTimestamp:n=>Mu(a,n),setNonce:n=>Du(a,n),setRpcUrl:n=>Gu(a,n),setStorageAt:n=>Hu(a,n),snapshot:()=>Ou(a),stopImpersonatingAccount:n=>$u(a,n)}}}function ju(t){const{key:e="test",name:a="Test Client",mode:n}=t;return Ft({...t,key:e,name:a,type:"testClient"}).extend(s=>({mode:n,...ya({mode:n})(s)}))}async function Vu(t,{chain:e}){const{id:a,name:n,nativeCurrency:r,rpcUrls:s,blockExplorers:o}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:E(a),chainName:n,nativeCurrency:r,rpcUrls:s.default.http,blockExplorerUrls:o?Object.values(o).map(({url:i})=>i):void 0}]},{dedupe:!0,retryCount:0})}function Wu(t,e){const{abi:a,args:n,bytecode:r,...s}=e,o=we({abi:a,args:n,bytecode:r});return xe(t,{...s,...s.authorizationList?{to:null}:{},data:o})}async function Ku(t){var a;return((a=t.account)==null?void 0:a.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Ee(n))}async function Ju(t,e={}){const{account:a=t.account,chainId:n}=e,r=a?O(a):void 0,s=n?[r==null?void 0:r.address,[E(n)]]:[r==null?void 0:r.address],o=await t.request({method:"wallet_getCapabilities",params:s}),i={};for(const[c,d]of Object.entries(o)){i[Number(c)]={};for(let[l,m]of Object.entries(d))l==="addSubAccount"&&(l="unstable_addSubAccount"),i[Number(c)][l]=m}return typeof n=="number"?i[n]:i}async function Yu(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function Zu(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>_(a))}async function Qu(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function Xu(t,e){const{chain:a=t.chain}=e,n=e.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),r=await S(t,Pe,"sendCalls")(e);return await S(t,Re,"waitForCallsStatus")({...e,id:r.id,timeout:n})}async function td(t,e){const{id:a}=e;await t.request({method:"wallet_showCallsStatus",params:[a]})}async function ed(t,e){const{account:a=t.account}=e;if(!a)throw new nt({docsPath:"/docs/eip7702/signAuthorization"});const n=O(a);if(!n.signAuthorization)throw new tt({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const r=await _e(t,e);return n.signAuthorization(r)}async function ad(t,e){var d,l,m,h;const{account:a=t.account,chain:n=t.chain,...r}=e;if(!a)throw new nt({docsPath:"/docs/actions/wallet/signTransaction"});const s=O(a);Tt({account:s,...e});const o=await S(t,vt,"getChainId")({});n!==null&&At({currentChainId:o,chain:n});const i=(n==null?void 0:n.formatters)||((d=t.chain)==null?void 0:d.formatters),c=((l=i==null?void 0:i.transactionRequest)==null?void 0:l.format)||rt;return s.signTransaction?s.signTransaction({...r,account:s,chainId:o},{serializer:(h=(m=t.chain)==null?void 0:m.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...r,account:s},"signTransaction"),chainId:E(o),from:s.address}]},{retryCount:0})}async function nd(t,e){const{account:a=t.account,domain:n,message:r,primaryType:s}=e;if(!a)throw new nt({docsPath:"/docs/actions/wallet/signTypedData"});const o=O(a),i={EIP712Domain:Ke({domain:n}),...e.types};if(Je({domain:n,message:r,primaryType:s,types:i}),o.signTypedData)return o.signTypedData({domain:n,message:r,primaryType:s,types:i});const c=Ye({domain:n,message:r,primaryType:s,types:i});return t.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function rd(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:E(e)}]},{retryCount:0})}async function sd(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}function ga(t){return{addChain:e=>Vu(t,e),deployContract:e=>Wu(t,e),fillTransaction:e=>Pa(t,e),getAddresses:()=>Ku(t),getCallsStatus:e=>po(t,e),getCapabilities:e=>Ju(t,e),getChainId:()=>vt(t),getPermissions:()=>Yu(t),prepareAuthorization:e=>_e(t,e),prepareTransactionRequest:e=>ie(t,e),requestAddresses:()=>Zu(t),requestPermissions:e=>Qu(t,e),sendCalls:e=>Pe(t,e),sendCallsSync:e=>Xu(t,e),sendRawTransaction:e=>Ra(t,e),sendRawTransactionSync:e=>ve(t,e),sendTransaction:e=>xe(t,e),sendTransactionSync:e=>sa(t,e),showCallsStatus:e=>td(t,e),signAuthorization:e=>ed(t,e),signMessage:e=>Vo(t,e),signTransaction:e=>ad(t,e),signTypedData:e=>nd(t,e),switchChain:e=>rd(t,e),waitForCallsStatus:e=>Re(t,e),watchAsset:e=>sd(t,e),writeContract:e=>$(t,e),writeContractSync:e=>Ut(t,e),token:{approve:Z(t,L),approveSync:Z(t,lu),transfer:Z(t,z),transferSync:Z(t,hu)}}}function od(t){const{key:e="wallet",name:a="Wallet Client",transport:n}=t;return Ft({...t,key:e,name:a,transport:n,type:"walletClient"}).extend(ga)}function id(t,e={}){const{keepAlive:a,key:n="webSocket",methods:r,name:s="WebSocket JSON-RPC",reconnect:o,retryDelay:i}=e;return({chain:c,retryCount:d,timeout:l})=>{var y;const m=e.retryCount??d,h=l??e.timeout??1e4,u=t||((y=c==null?void 0:c.rpcUrls.default.webSocket)==null?void 0:y[0]),f={keepAlive:a,reconnect:o};if(!u)throw new Ze;return Qe({key:n,methods:r,name:s,async request({method:w,params:I}){const b={method:w,params:I},v=await ht(u,f),{error:P,result:T}=await v.requestAsync({body:b,timeout:h});if(P)throw new je({body:b,error:P,url:u});return T},retryCount:m,retryDelay:i,timeout:h,type:"webSocket"},{getSocket(){return Sc(u)},getRpcClient(){return ht(u,f)},async subscribe({params:w,onData:I,onError:b}){const v=await ht(u,f),{result:P}=await new Promise((T,p)=>v.request({body:{method:"eth_subscribe",params:w},onError(A){p(A),b==null||b(A)},onResponse(A){if(A.error){p(A.error),b==null||b(A.error);return}if(typeof A.id=="number"){T(A);return}A.method==="eth_subscription"&&I(A.params)}}));return{subscriptionId:P,async unsubscribe(){return new Promise(T=>v.request({body:{method:"eth_unsubscribe",params:[P]},onResponse:T}))}}}})}}const cd={gwei:9,wei:18},ud={ether:-9,wei:9},dd={ether:-18,gwei:-9};class md extends it{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}class ld extends Error{constructor(e,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=a}}const gt="/docs/contract/decodeDeployData";function fd(t){const{abi:e,bytecode:a,data:n}=t;if(n===a)return{bytecode:a};const r=e.find(o=>"type"in o&&o.type==="constructor");if(!r)throw new Ie({docsPath:gt});if(!("inputs"in r))throw new wt({docsPath:gt});if(!r.inputs||r.inputs.length===0)throw new wt({docsPath:gt});return{args:St(r.inputs,`0x${n.replace(a,"")}`),bytecode:a}}function hd(t){const e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),a=typeof t.blobs[0]=="string"?t.blobs.map(i=>D(i)):t.blobs,n=a.reduce((i,c)=>i+c.length,0),r=bt(new Uint8Array(n));let s=!0;for(const[i,c]of a.entries()){const d=bt(c),l=i===a.length-1;for(;s&&d.position<c.length;){d.incrementPosition(1);let m=31;c.length-d.position<31&&(m=c.length-d.position);for(const h in Array.from({length:m})){const u=d.readByte();if(l&&u===128&&!d.inspectBytes(d.remaining).includes(128)){s=!1;break}r.pushByte(u)}}}const o=r.bytes.slice(0,r.position);return e==="hex"?N(o):o}function pd(t){const{sidecars:e,version:a}=t,n=t.to??(typeof e[0].blob=="string"?"hex":"bytes"),r=[];for(const{commitment:s}of e)r.push(Te({commitment:s,to:n,version:a}));return r}const yd=2147483648;function gd(t){if(t===1)return 60n;if(t>=yd||t<0)throw new Fe({chainId:t});return BigInt((2147483648|t)>>>0)}function ba({blobToKzgCommitment:t,computeBlobKzgProof:e}){return{blobToKzgCommitment:t,computeBlobKzgProof:e}}function bd(t,e){try{t.loadTrustedSetup(e)}catch(a){const n=a;if(!n.message.includes("trusted setup is already loaded"))throw n}return ba(t)}function wd({r:t,yParityAndS:e}){const a=D(e),n=a[0]&128?1:0,r=a;return n===1&&(r[0]&=127),{r:t,s:N(r),yParity:n}}function ne(t){const{r:e,s:a}=Xe.Signature.fromCompact(t.slice(2,130));return{r:E(e,{size:32}),yParityAndS:E(a,{size:32})}}async function xd(t){const{serializedTransaction:e,signature:a}=t,n=ua(e),r=a??{r:n.r,s:n.s,v:n.v,yParity:n.yParity},s=Ne({...n,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await j({hash:H(s),signature:r})}function re({r:t,yParityAndS:e}){return`0x${new Xe.Signature(x(t),x(e)).toCompactHex()}`}function Ed(t){const{r:e,s:a,v:n,yParity:r}=t,s=Number(r??n-27n);let o=a;if(s===1){const i=D(a);i[0]|=128,o=N(i)}return{r:e,yParityAndS:o}}const Ud=Object.freeze(Object.defineProperty({__proto__:null,AbiConstructorNotFoundError:Ie,AbiConstructorParamsNotFoundError:wt,AbiDecodingDataSizeInvalidError:_a,AbiDecodingDataSizeTooSmallError:Fa,AbiDecodingZeroDataError:qa,AbiEncodingArrayLengthMismatchError:Ua,AbiEncodingBytesSizeMismatchError:Ba,AbiEncodingLengthMismatchError:Na,AbiErrorInputsNotFoundError:ka,AbiErrorNotFoundError:La,AbiErrorSignatureNotFoundError:za,AbiEventNotFoundError:Ma,AbiEventSignatureEmptyTopicsError:Da,AbiEventSignatureNotFoundError:Ga,AbiFunctionNotFoundError:Ha,AbiFunctionOutputsNotFoundError:Oa,AbiFunctionSignatureNotFoundError:$a,AccountStateConflictError:ja,AtomicReadyWalletRejectedUpgradeError:ti,AtomicityNotSupportedError:ei,BaseError:it,BaseFeeScalarError:Va,BlockNotFoundError:Wa,BundleFailedError:yo,BundleTooLargeError:ai,BytesSizeMismatchError:Ka,CallExecutionError:Ja,ChainDisconnectedError:ni,ChainDoesNotSupportContract:Ya,ChainMismatchError:Za,ChainNotFoundError:Qa,CircularReferenceError:Xa,ClientChainNotConfiguredError:tn,ContractFunctionExecutionError:en,ContractFunctionRevertedError:an,ContractFunctionZeroDataError:nn,CounterfactualDeploymentFailedError:rn,DecodeLogDataMismatch:sn,DecodeLogTopicsMismatch:on,DuplicateIdError:ri,EIP1193ProviderRpcError:ld,Eip1559FeesNotSupportedError:cn,EnsAvatarInvalidNftUriError:go,EnsAvatarUnsupportedNamespaceError:bo,EnsAvatarUriResolutionError:wo,EnsInvalidChainIdError:Fe,EstimateGasExecutionError:un,ExecutionRevertedError:si,FeeCapTooHighError:oi,FeeCapTooLowError:ii,FeeConflictError:dn,FeePayerNonceMismatchError:mn,FilterTypeNotSupportedError:xo,HttpRequestError:Oe,InsufficientFundsError:ci,IntegerOutOfRangeError:ui,InternalRpcError:di,IntrinsicGasTooHighError:mi,IntrinsicGasTooLowError:li,InvalidAbiDecodingTypeError:ln,InvalidAbiEncodingTypeError:fn,InvalidAbiItemError:hn,InvalidAbiParameterError:se,InvalidAbiParametersError:pn,InvalidAbiTypeParameterError:yn,InvalidAddressError:le,InvalidArrayError:gn,InvalidBytesBooleanError:fi,InvalidChainIdError:bn,InvalidDecimalNumberError:md,InvalidDefinitionTypeError:wn,InvalidDomainError:fc,InvalidFunctionModifierError:xn,InvalidHexBooleanError:hi,InvalidHexValueError:ke,InvalidInputRpcError:pi,InvalidLegacyVError:de,InvalidModifierError:En,InvalidParameterError:In,InvalidParamsRpcError:yi,InvalidParenthesisError:Tn,InvalidPrimaryTypeError:hc,InvalidRequestRpcError:gi,InvalidSerializableTransactionError:vn,InvalidSerializedTransactionError:M,InvalidSerializedTransactionTypeError:ce,InvalidSignatureError:An,InvalidStorageKeySizeError:Cn,InvalidStructSignatureError:Sn,InvalidStructTypeError:pc,InvalidTypedDataTypeError:yc,InvalidYParityError:fe,JsonRpcVersionUnsupportedError:bi,LimitExceededRpcError:wi,MaxFeePerGasTooLowError:Pn,MethodNotFoundRpcError:xi,MethodNotSupportedRpcError:Ei,NonceMaxValueError:Ii,NonceTooHighError:Ti,NonceTooLowError:vi,ParseRpcError:Ai,ProviderDisconnectedError:Ci,ProviderRpcError:Si,RawContractError:Rn,ResourceNotFoundRpcError:Pi,ResourceUnavailableRpcError:Ri,ResponseBodyTooLargeError:_i,RlpDepthLimitExceededError:ze,RlpListBoundaryExceededError:Me,RlpTrailingBytesError:Le,RpcError:Fi,RpcRequestError:je,SizeExceedsPaddingSizeError:qi,SizeOverflowError:Ui,SliceOffsetOutOfBoundsError:Bi,SocketClosedError:Ni,SolidityProtectedKeywordError:_n,StateAssignmentConflictError:Fn,SwitchChainError:ki,TimeoutError:Li,TipAboveFeeCapError:zi,TransactionExecutionError:qn,TransactionNotFoundError:Un,TransactionReceiptNotFoundError:Bn,TransactionRejectedRpcError:Mi,TransactionTypeNotSupportedError:Di,UnauthorizedProviderError:Gi,UnknownBundleIdError:Hi,UnknownNodeError:Oi,UnknownRpcError:$i,UnknownSignatureError:Nn,UnknownTypeError:kn,UnsupportedChainIdError:ji,UnsupportedNonOptionalCapabilityError:Vi,UnsupportedPackedAbiType:Ln,UnsupportedProviderMethodError:Wi,UrlRequiredError:Ze,UserRejectedRequestError:Ki,WaitForCallsStatusTimeoutError:Eo,WaitForTransactionReceiptTimeoutError:zn,WebSocketRequestError:Ji,assertCurrentChain:At,assertRequest:Tt,assertTransactionEIP1559:qe,assertTransactionEIP2930:Ue,assertTransactionLegacy:Be,blobsToCommitments:Mn,blobsToProofs:Dn,boolToBytes:Yi,boolToHex:Zi,bytesToBigInt:Gn,bytesToBool:Hn,bytesToHex:N,bytesToNumber:On,bytesToRlp:$n,bytesToString:jn,ccipFetch:Et,ccipReadTunnel:tu,ccipRequest:Et,checksumAddress:Ee,commitmentToVersionedHash:Te,commitmentsToVersionedHashes:Vn,compactSignatureToHex:re,compactSignatureToSignature:wd,concat:et,concatBytes:Wn,concatHex:Kn,createClient:Ft,createNonceManager:Io,createPublicClient:To,createTestClient:ju,createTransport:Qe,createWalletClient:od,custom:Wo,decodeAbiParameters:St,decodeDeployData:fd,decodeErrorResult:be,decodeEventLog:Jn,decodeFunctionData:Rc,decodeFunctionResult:ye,defineBlock:Yn,defineChain:Do,defineKzg:ba,defineTransaction:Zn,defineTransactionReceipt:Qn,defineTransactionRequest:Xn,deploylessCallViaBytecodeBytecode:tr,deploylessCallViaFactoryBytecode:er,domainSeparator:gc,encodeAbiParameters:ar,encodeDeployData:we,encodeErrorResult:_c,encodeEventTopics:vo,encodeFunctionData:ge,encodeFunctionResult:Fc,encodePacked:Ao,erc1155Abi:Qi,erc20Abi:k,erc20Abi_bytes32:Xi,erc4626Abi:tc,erc6492SignatureValidatorAbi:Xt,erc6492SignatureValidatorByteCode:Wt,erc721Abi:ec,ethAddress:Co,etherUnits:cd,extendSchema:Go,extractChain:Nc,fallback:Ic,formatBlock:nr,formatEther:rr,formatGwei:ac,formatLog:sr,formatTransaction:or,formatTransactionReceipt:ir,formatTransactionRequest:rt,formatUnits:qt,fromBlobs:hd,fromBytes:cr,fromHex:nc,fromRlp:Bt,getAbiItem:ur,getAddress:_,getChainContractAddress:dr,getContract:du,getContractAddress:Xc,getContractError:mr,getCreate2Address:ma,getCreateAddress:da,getEventSelector:Kt,getEventSignature:Y,getFunctionSelector:Jt,getFunctionSignature:Y,getSerializedTransactionType:ca,getTransactionType:lr,getTypesForEIP712Domain:Ke,gweiUnits:ud,hashDomain:bc,hashMessage:Ve,hashStruct:wc,hashTypedData:We,hexToBigInt:x,hexToBool:rc,hexToBytes:D,hexToCompactSignature:ne,hexToNumber:C,hexToRlp:fr,hexToSignature:Zt,hexToString:sc,http:Tc,isAddress:me,isAddressEqual:st,isBytes:It,isErc6492Signature:la,isErc8010Signature:fa,isHash:ia,isHex:g,keccak256:H,labelhash:So,maxInt104:hr,maxInt112:pr,maxInt120:yr,maxInt128:gr,maxInt136:br,maxInt144:wr,maxInt152:xr,maxInt16:Er,maxInt160:Ir,maxInt168:Tr,maxInt176:vr,maxInt184:Ar,maxInt192:Cr,maxInt200:Sr,maxInt208:Pr,maxInt216:Rr,maxInt224:_r,maxInt232:Fr,maxInt24:qr,maxInt240:Ur,maxInt248:Br,maxInt256:Nr,maxInt32:kr,maxInt40:Lr,maxInt48:zr,maxInt56:Mr,maxInt64:Dr,maxInt72:Gr,maxInt8:Hr,maxInt80:Or,maxInt88:$r,maxInt96:jr,maxUint104:Vr,maxUint112:Wr,maxUint120:Kr,maxUint128:Jr,maxUint136:Yr,maxUint144:Zr,maxUint152:Qr,maxUint16:Xr,maxUint160:ts,maxUint168:es,maxUint176:as,maxUint184:ns,maxUint192:rs,maxUint200:ss,maxUint208:os,maxUint216:is,maxUint224:cs,maxUint232:us,maxUint24:ds,maxUint240:ms,maxUint248:ls,maxUint256:fs,maxUint32:hs,maxUint40:ps,maxUint48:ys,maxUint56:gs,maxUint64:bs,maxUint72:ws,maxUint8:xs,maxUint80:Es,maxUint88:Is,maxUint96:Ts,minInt104:vs,minInt112:As,minInt120:Cs,minInt128:Ss,minInt136:Ps,minInt144:Rs,minInt152:_s,minInt16:Fs,minInt160:qs,minInt168:Us,minInt176:Bs,minInt184:Ns,minInt192:ks,minInt200:Ls,minInt208:zs,minInt216:Ms,minInt224:Ds,minInt232:Gs,minInt24:Hs,minInt240:Os,minInt248:$s,minInt256:js,minInt32:Vs,minInt40:Ws,minInt48:Ks,minInt56:Js,minInt64:Ys,minInt72:Zs,minInt8:Qs,minInt80:Xs,minInt88:to,minInt96:eo,multicall3Abi:oc,namehash:Po,nonceManager:Ro,numberToBytes:ic,numberToHex:E,offchainLookup:qc,offchainLookupAbiItem:Uc,offchainLookupSignature:Bc,pad:He,padBytes:cc,padHex:xt,parseAbi:ao,parseAbiItem:Ho,parseAbiParameter:kc,parseAbiParameters:Oo,parseCompactSignature:ne,parseErc6492Signature:au,parseErc8010Signature:nu,parseEther:cu,parseEventLogs:Pt,parseGwei:uu,parseSignature:Zt,parseTransaction:ua,parseUnits:Ko,prepareEncodeFunctionData:no,presignMessagePrefix:xc,publicActions:_o,recoverAddress:j,recoverMessageAddress:ha,recoverPublicKey:ro,recoverTransactionAddress:xd,recoverTypedDataAddress:pa,ripemd160:eu,rpcSchema:Jo,rpcTransactionType:so,serializeAccessList:$o,serializeCompactSignature:re,serializeErc6492Signature:Fo,serializeErc8010Signature:ru,serializeSignature:Qt,serializeTransaction:Ne,serializeTypedData:Ye,setErrorConfig:uc,setupKzg:bd,sha256:oo,shouldThrow:vc,sidecarsToVersionedHashes:pd,signatureToCompactSignature:Ed,signatureToHex:Qt,size:De,slice:pe,sliceBytes:io,sliceHex:Ct,stringToBytes:dc,stringToHex:mc,stringify:lc,testActions:ya,toBlobSidecars:ue,toBlobs:co,toBytes:F,toCoinType:gd,toEventHash:Yt,toEventSelector:Kt,toEventSignature:Y,toFunctionHash:Yt,toFunctionSelector:Jt,toFunctionSignature:Y,toHex:$e,toPrefixedMessage:Ec,toRlp:he,transactionType:uo,trim:Ge,universalSignatureValidatorAbi:Xt,universalSignatureValidatorByteCode:Wt,validateTypedData:Je,verifyHash:su,verifyMessage:ou,verifyTypedData:iu,walletActions:ga,webSocket:id,weiUnits:dd,withCache:Yo,withRetry:Ac,withTimeout:Cc,zeroAddress:qo,zeroHash:Uo},Symbol.toStringTag,{value:"Module"}));export{Ud as _};
@@ -1 +1 @@
1
- import{P as t,A as i,a as p}from"./index-d7bf28d3.js";import{b as le,c as be,W as ye}from"./index-d7bf28d3.js";import"./lit-element-0711c853.js";import"./class-map-d7835e88.js";import"./index-6e64d31e.js";import"./index-355751ab.js";import"./W3MFrameProviderSingleton-33e9645e.js";import"./index-2124b7cd.js";import"./NetworkUtil-2fb81493.js";import"./http-a4cf4808.js";import"./createBatchScheduler-7c9ada66.js";import"./index-276c1c99.js";import"./index-accd8060.js";import"./index-69ac8519.js";import"./index.es-ac60fff2.js";import"./index-78689969.js";import"./index-ffdeacb2.js";import"./index-9c119afb.js";import"./index-ab687c6f.js";import"./index-5947dd15.js";import"./index-1368749b.js";import"./index-375e28ad.js";import"./index-76dbec48.js";import"./index-8bdd54b7.js";import"./index-6c8c5091.js";import"./MathUtil-b514a570.js";const C=3e5;async function U(e){return t.handleOpenPay(e)}async function W(e,r=C){if(r<=0)throw new i(p.INVALID_PAYMENT_CONFIG,"Timeout must be greater than 0");try{await U(e)}catch(s){throw s instanceof i?s:new i(p.UNABLE_TO_INITIATE_PAYMENT,s.message)}return new Promise((s,l)=>{let o=!1;const c=setTimeout(()=>{o||(o=!0,m(),l(new i(p.GENERIC_PAYMENT_ERROR,"Payment timeout")))},r);function n(){if(o)return;const a=t.state.currentPayment,u=t.state.error,D=t.state.isPaymentInProgress;if((a==null?void 0:a.status)==="SUCCESS"){o=!0,m(),clearTimeout(c),s({success:!0,result:a.result});return}if((a==null?void 0:a.status)==="FAILED"){o=!0,m(),clearTimeout(c),s({success:!1,error:u||"Payment failed"});return}u&&!D&&!a&&(o=!0,m(),clearTimeout(c),s({success:!1,error:u}))}const b=d("currentPayment",n),y=d("error",n),S=d("isPaymentInProgress",n),m=E([b,y,S]);n()})}function J(){return t.getExchanges()}function V(){var e;return(e=t.state.currentPayment)==null?void 0:e.result}function Z(){return t.state.error}function j(){return t.state.isPaymentInProgress}function d(e,r){return t.subscribeKey(e,r)}function E(e){return()=>{e.forEach(r=>{try{r()}catch{}})}}const Q={network:"eip155:8453",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},X={network:"eip155:8453",asset:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},$={network:"eip155:84532",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},ee={network:"eip155:1",asset:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},te={network:"eip155:10",asset:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ae={network:"eip155:42161",asset:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},se={network:"eip155:137",asset:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},re={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},oe={network:"eip155:1",asset:"0xdAC17F958D2ee523a2206206994597C13D831ec7",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ne={network:"eip155:10",asset:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},me={network:"eip155:42161",asset:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ie={network:"eip155:137",asset:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ce={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ue={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"native",metadata:{name:"Solana",symbol:"SOL",decimals:9}};export{t as PayController,le as W3mPayLoadingView,be as W3mPayQuoteView,ye as W3mPayView,ae as arbitrumUSDC,me as arbitrumUSDT,Q as baseETH,$ as baseSepoliaETH,X as baseUSDC,ee as ethereumUSDC,oe as ethereumUSDT,J as getExchanges,j as getIsPaymentInProgress,Z as getPayError,V as getPayResult,U as openPay,te as optimismUSDC,ne as optimismUSDT,W as pay,se as polygonUSDC,ie as polygonUSDT,ue as solanaSOL,re as solanaUSDC,ce as solanaUSDT};
1
+ import{P as t,A as i,a as p}from"./index-05fb92b4.js";import{b as le,c as be,W as ye}from"./index-05fb92b4.js";import"./lit-element-0711c853.js";import"./class-map-d7835e88.js";import"./index-8d4c6be6.js";import"./index-7ad60780.js";import"./W3MFrameProviderSingleton-7fcb402e.js";import"./index-1b1eb822.js";import"./NetworkUtil-3fb1c3fe.js";import"./http-a4cf4808.js";import"./createBatchScheduler-7c9ada66.js";import"./index-88f8dc1a.js";import"./index-accd8060.js";import"./index-2dd08e94.js";import"./index.es-f2ff8299.js";import"./index-4ef2b1cb.js";import"./index-39b708b0.js";import"./index-0814e813.js";import"./index-b9ce3e4d.js";import"./index-c9c1d671.js";import"./index-667c419c.js";import"./index-817cf9cd.js";import"./index-ec6cdadb.js";import"./index-86fd2679.js";import"./index-77bf3df8.js";import"./MathUtil-b514a570.js";const C=3e5;async function U(e){return t.handleOpenPay(e)}async function W(e,r=C){if(r<=0)throw new i(p.INVALID_PAYMENT_CONFIG,"Timeout must be greater than 0");try{await U(e)}catch(s){throw s instanceof i?s:new i(p.UNABLE_TO_INITIATE_PAYMENT,s.message)}return new Promise((s,l)=>{let o=!1;const c=setTimeout(()=>{o||(o=!0,m(),l(new i(p.GENERIC_PAYMENT_ERROR,"Payment timeout")))},r);function n(){if(o)return;const a=t.state.currentPayment,u=t.state.error,D=t.state.isPaymentInProgress;if((a==null?void 0:a.status)==="SUCCESS"){o=!0,m(),clearTimeout(c),s({success:!0,result:a.result});return}if((a==null?void 0:a.status)==="FAILED"){o=!0,m(),clearTimeout(c),s({success:!1,error:u||"Payment failed"});return}u&&!D&&!a&&(o=!0,m(),clearTimeout(c),s({success:!1,error:u}))}const b=d("currentPayment",n),y=d("error",n),S=d("isPaymentInProgress",n),m=E([b,y,S]);n()})}function J(){return t.getExchanges()}function V(){var e;return(e=t.state.currentPayment)==null?void 0:e.result}function Z(){return t.state.error}function j(){return t.state.isPaymentInProgress}function d(e,r){return t.subscribeKey(e,r)}function E(e){return()=>{e.forEach(r=>{try{r()}catch{}})}}const Q={network:"eip155:8453",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},X={network:"eip155:8453",asset:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},$={network:"eip155:84532",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},ee={network:"eip155:1",asset:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},te={network:"eip155:10",asset:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ae={network:"eip155:42161",asset:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},se={network:"eip155:137",asset:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},re={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},oe={network:"eip155:1",asset:"0xdAC17F958D2ee523a2206206994597C13D831ec7",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ne={network:"eip155:10",asset:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},me={network:"eip155:42161",asset:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ie={network:"eip155:137",asset:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ce={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ue={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"native",metadata:{name:"Solana",symbol:"SOL",decimals:9}};export{t as PayController,le as W3mPayLoadingView,be as W3mPayQuoteView,ye as W3mPayView,ae as arbitrumUSDC,me as arbitrumUSDT,Q as baseETH,$ as baseSepoliaETH,X as baseUSDC,ee as ethereumUSDC,oe as ethereumUSDT,J as getExchanges,j as getIsPaymentInProgress,Z as getPayError,V as getPayResult,U as openPay,te as optimismUSDC,ne as optimismUSDT,W as pay,se as polygonUSDC,ie as polygonUSDT,ue as solanaSOL,re as solanaUSDC,ce as solanaUSDT};