@dcl/shop 0.1.0-29588264451.commit-627b4b7 → 0.1.0-29588647657.commit-2cc8158

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 (178) hide show
  1. package/assets/{AnimatedBackground-psFU9eqJ.js → AnimatedBackground-urlvv1u-.js} +3 -3
  2. package/assets/{Assets-iKVqmFqq.js → Assets-Bgol1TFW.js} +1 -1
  3. package/assets/{Cart-B0oxrKWW.js → Cart-BLK0NtgY.js} +1 -1
  4. package/assets/{CircularProgress-Fg-Nhc1W.js → CircularProgress-CPG7ZOfs.js} +1 -1
  5. package/assets/{Collection-D5Q48x8i.js → Collection-oY08s2SC.js} +1 -1
  6. package/assets/{ContentClient-CiSvC4he.js → ContentClient-CcNIfFcB.js} +1 -1
  7. package/assets/{Creator-Cw25k_kz.js → Creator-Geua9taX.js} +1 -1
  8. package/assets/{CssVarsProvider-D1D1cNqm.js → CssVarsProvider-CNdYCyi9.js} +1 -1
  9. package/assets/{DeploymentBuilder-Du1wr7ad.js → DeploymentBuilder-DOqh7sYP.js} +1 -1
  10. package/assets/{ExchangeController-DR6BBi2L.js → ExchangeController-BnfYxF48.js} +1 -1
  11. package/assets/GetCredits-COdRHzqV.js +1 -0
  12. package/assets/{HelpersUtil-31KPVf4r.js → HelpersUtil-C5w2ExFs.js} +1 -1
  13. package/assets/{ImportListings-dKZfPQUt.js → ImportListings-B-zcLoS1.js} +1 -1
  14. package/assets/{ItemDetail-Cx-6T0Eg.js → ItemDetail-BEVnVvI_.js} +2 -2
  15. package/assets/{MarketCheckout-Qn1ixrkb.js → MarketCheckout-k3hh1fMb.js} +1 -1
  16. package/assets/{MyAssets-DxI94ipn.js → MyAssets-CtamOoiB.js} +1 -1
  17. package/assets/{MyFavorites-D2VaWS1B.js → MyFavorites-DB_RHGeZ.js} +1 -1
  18. package/assets/{MyPurchases-B9emkBFN.js → MyPurchases-DLo5AL4P.js} +1 -1
  19. package/assets/{NotFound-E0wDMFCK.js → NotFound-CALTSbn3.js} +1 -1
  20. package/assets/{StoreSettings-DfKsXLjF.js → StoreSettings-IyPLWce9.js} +1 -1
  21. package/assets/{Success-D8vbmLlB.js → Success-CPrrgz5q.js} +1 -1
  22. package/assets/{SwapController-BhWJpnsS.js → SwapController-CUPcRb3X.js} +1 -1
  23. package/assets/{TradeService-CzTJfCBU.js → TradeService-DE_CcjPe.js} +1 -1
  24. package/assets/{W3MFrameProviderSingleton-QTe845Ty.js → W3MFrameProviderSingleton-KZXDtdeN.js} +3 -3
  25. package/assets/{WebCryptoP256-C9DwfYdN.js → WebCryptoP256-CmfR3sjC.js} +1 -1
  26. package/assets/{basic-BZccaaZw.js → basic-CrYMfATs.js} +1 -1
  27. package/assets/{biconomy-DB7oVSPZ.js → biconomy-CHSrNezt.js} +1 -1
  28. package/assets/{buy-D_7yggiZ.js → buy-C_OnDZx3.js} +1 -1
  29. package/assets/{buy-gasless-DdXBIm99.js → buy-gasless-uH5qu5A8.js} +1 -1
  30. package/assets/{cart-checkout-C6slCzLp.js → cart-checkout-DJSPllz1.js} +1 -1
  31. package/assets/{categories-CS5KEV15.js → categories-Dqa3M8i7.js} +1 -1
  32. package/assets/{ccip-CRir71Ts.js → ccip-CYomOMLt.js} +1 -1
  33. package/assets/{ccip-Bs_9Z_ZN.js → ccip-h7KPERy4.js} +1 -1
  34. package/assets/{collection-BB4WIsDf.js → collection-DOsbvafd.js} +1 -1
  35. package/assets/{controller-8YCt_5kO.js → controller-KHxYFosg.js} +2 -2
  36. package/assets/{core-_p71vehW.js → core-pBN9FKMw.js} +4 -4
  37. package/assets/{custom-D5gy9Lbk.js → custom-CEHsyFlW.js} +1 -1
  38. package/assets/{data-capture-D4KpcM2w.js → data-capture-BSdkL8U7.js} +1 -1
  39. package/assets/{decimals-DAdpv8M5.js → decimals-BA-bLcGh.js} +1 -1
  40. package/assets/decimals-CwI_mnkm.js +1 -0
  41. package/assets/{detectExtension-BwC-gZ7s.js → detectExtension-G5UH8a-M.js} +1 -1
  42. package/assets/{email-DoKqUCg3.js → email-BMkLtjTu.js} +1 -1
  43. package/assets/{embedded-wallet-DFjP-9W6.js → embedded-wallet-CMLY6maG.js} +1 -1
  44. package/assets/{emotion-styled.browser.esm-B7PezGnO.js → emotion-styled.browser.esm-Bcg9MXM8.js} +1 -1
  45. package/assets/{engine-C07V9FFP.js → engine-ZKKEGTTG.js} +1 -1
  46. package/assets/{estimate-l1-fee-CbSYXxVq.js → estimate-l1-fee-XHZSoWjk.js} +1 -1
  47. package/assets/{eth_estimateGas-CHt9spnf.js → eth_estimateGas-Bq7UQHDY.js} +1 -1
  48. package/assets/{eth_getStorageAt-Dzigs9Zu.js → eth_getStorageAt-DEYLIJ2f.js} +1 -1
  49. package/assets/{eth_getTransactionCount-CDY9h_Rg.js → eth_getTransactionCount-sK45qAke.js} +1 -1
  50. package/assets/{extractIPFS-BOTNSryE.js → extractIPFS-BTNSHVMw.js} +1 -1
  51. package/assets/{features-C90RUzSP.js → features-jLiVGuCn.js} +1 -1
  52. package/assets/{fetchTokenMetadata-BKZfKsNV.js → fetchTokenMetadata-CLRXW5Ae.js} +2 -2
  53. package/assets/get-ecosystem-wallet-info-HaXmkjKB.js +1 -0
  54. package/assets/{getBalance-Bb_-F40S.js → getBalance-D85PcSgJ.js} +1 -1
  55. package/assets/{getInstalledModules-BOPp6l-B.js → getInstalledModules-BbkWCUI_.js} +1 -1
  56. package/assets/{getNFT-DsdBNES9.js → getNFT-Ba-KxS5w.js} +1 -1
  57. package/assets/{getNFT-jiRKQ5Oo.js → getNFT-CpSdZEPv.js} +2 -2
  58. package/assets/{getOverlayAlpha-CM9JvcJV.js → getOverlayAlpha-CPeU_wtJ.js} +1 -1
  59. package/assets/{hashTypedData-DONiI8QZ.js → hashTypedData-BiAfRLxc.js} +1 -1
  60. package/assets/{hashTypedData-vGDzeBcA.js → hashTypedData-_My6_zHk.js} +1 -1
  61. package/assets/{import-DM-iC_9y.js → import-BM47oMM1.js} +1 -1
  62. package/assets/{in-app-wallet-calls-C_aNlFmv.js → in-app-wallet-calls-DB4mrEuh.js} +1 -1
  63. package/assets/{index-BtVa_Kh7.js → index-0YKOyKsz.js} +1 -1
  64. package/assets/{index-BVEDAipP.js → index-1w11c9kT.js} +1 -1
  65. package/assets/{index-SOuBSYKv.js → index-2lgRM28O.js} +1 -1
  66. package/assets/{index-xHNUVGAh.js → index-7a1mhp_I.js} +1 -1
  67. package/assets/{index-DO9rihjD.js → index-B1e1ZADY.js} +1 -1
  68. package/assets/{index-CE5ZSWni.js → index-B4HZUf7-.js} +1 -1
  69. package/assets/{index-MqZwF8o9.js → index-B9Xqc0Hi.js} +2 -2
  70. package/assets/{index-DHJgxESc.js → index-BE03Fup7.js} +1 -1
  71. package/assets/{index-C5j8nmW-.js → index-BNhDGSX8.js} +1 -1
  72. package/assets/{index-Bj7GkEZm.js → index-BQzrms9Y.js} +1 -1
  73. package/assets/{index-C02-3pKD.js → index-BS31iF_T.js} +1 -1
  74. package/assets/{index-BIJTdhnz.js → index-BUYyFeCt.js} +2 -2
  75. package/assets/{index-BNKsMdm-.js → index-BY2ihj74.js} +1 -1
  76. package/assets/{index-Bn_Nt76C.js → index-BhW68dt9.js} +1 -1
  77. package/assets/{index-DSs6L904.js → index-Bi6W-t7S.js} +1 -1
  78. package/assets/{index-CSm8067w.js → index-Bs2u8R9P.js} +1 -1
  79. package/assets/{index-C__ZUWCs.js → index-BseAK0jv.js} +1 -1
  80. package/assets/{index-CnWEn3Fl.js → index-BvJT7BsV.js} +1 -1
  81. package/assets/{index-BNsBOmtc.js → index-BvrUtN1i.js} +1 -1
  82. package/assets/{index-BUzSFM10.js → index-Bwj5NrhW.js} +1 -1
  83. package/assets/{index-QHZTwn8s.js → index-C-GvP7Ri.js} +1 -1
  84. package/assets/{index-BVpuOhLG.js → index-C-uQhIOu.js} +3 -3
  85. package/assets/{index--gVKrRw0.js → index-C0OEAd0W.js} +1 -1
  86. package/assets/{index-C2G2lljO.js → index-C1L7bhks.js} +1 -1
  87. package/assets/{index-CRTJ7_WQ.js → index-C8L1dg3z.js} +1 -1
  88. package/assets/{index-CFy8QjLL.js → index-CGf6vfVT.js} +1 -1
  89. package/assets/{index-DzmAUU0P.js → index-COd6Hpl3.js} +1 -1
  90. package/assets/{index-DmQaEVTR.js → index-COmrTRgF.js} +1 -1
  91. package/assets/{index-DaIODAHU.js → index-CRWbHzp3.js} +1 -1
  92. package/assets/{index-gEVnIhEr.js → index-CSy-_M5R.js} +1 -1
  93. package/assets/{index-D66LUjvb.js → index-CWkyddUj.js} +1 -1
  94. package/assets/{index-DgPN63Jh.js → index-CYWpV70P.js} +6 -6
  95. package/assets/{index-B2Zw4G7Z.js → index-Ct5KJb97.js} +1 -1
  96. package/assets/{index-8TBzmL0l.js → index-D8XdtECa.js} +1 -1
  97. package/assets/{index-Cv14wakP.js → index-D8bR8hF2.js} +1 -1
  98. package/assets/{index-DD6TVIkI.js → index-DMLSNnyb.js} +1 -1
  99. package/assets/{index-Ckj9N8kM.js → index-DMU6YRL7.js} +1 -1
  100. package/assets/{index-D8WLCETG.js → index-DMWWvHVt.js} +1 -1
  101. package/assets/{index-DxBzK74p.js → index-DPAyBtUP.js} +1 -1
  102. package/assets/{index-C7gttTv8.js → index-DUwiQnps.js} +1 -1
  103. package/assets/{index-D3SxIXox.js → index-DWVC6kWx.js} +1 -1
  104. package/assets/{index-ChMOJahJ.js → index-DYJHRYX4.js} +1 -1
  105. package/assets/{index-CBVNSjCQ.js → index-Df8J_8ta.js} +1 -1
  106. package/assets/{index-Bv4pyelF.js → index-DhmytMhG.js} +1 -1
  107. package/assets/{index-7DJmnNdg.js → index-Dih2AmlD.js} +1 -1
  108. package/assets/{index-CsTr0LfC.js → index-DqO1kUFU.js} +1 -1
  109. package/assets/{index-BpQeHVbA.js → index-Dy65iyWb.js} +1 -1
  110. package/assets/{index-7PEMu-vS.js → index-Ncc_A7mr.js} +1 -1
  111. package/assets/{index-D8WMIH5c.js → index-T4DqOE4M.js} +1 -1
  112. package/assets/{index-BQrBXxNO.js → index-X5dRqFqG.js} +1 -1
  113. package/assets/{index-CThtDCr0.js → index-XztZBEgs.js} +3 -3
  114. package/assets/{index-C8i-4YQe.js → index-eL578oJV.js} +1 -1
  115. package/assets/{index-Cmhu1R9V.js → index-fJZF9Wlt.js} +1 -1
  116. package/assets/{index-zHd02W0T.js → index-oExJUWSQ.js} +1 -1
  117. package/assets/{index-Dgwg-DaP.js → index-pOWOYTZf.js} +1 -1
  118. package/assets/{index-TNdqfy5A.js → index-wsdLqN_j.js} +2 -2
  119. package/assets/{index-BEob012O.js → index-xVgoxgG9.js} +1 -1
  120. package/assets/{index.es-D2JDwbaX.js → index.es-CAdXWwOm.js} +4 -4
  121. package/assets/{index.es-B5B8Zcyr.js → index.es-CiB5ifZN.js} +1 -1
  122. package/assets/{index.es-C122sfII.js → index.es-CsD1tXVc.js} +1 -1
  123. package/assets/{localBatchGatewayRequest-aLhcfaIA.js → localBatchGatewayRequest--Sv8eIOm.js} +1 -1
  124. package/assets/{mana-rate-DM_I1GlP.js → mana-rate-DgCtJ5pM.js} +1 -1
  125. package/assets/network-DRGleXEI.js +1 -0
  126. package/assets/{networks-C5Fm0Wg2.js → networks-BqVCrj8Y.js} +1 -1
  127. package/assets/{onramp-DkCes_uB.js → onramp-CBfgz1Ty.js} +1 -1
  128. package/assets/{openzeppelin-Do5qc-L4.js → openzeppelin-D2z1DmVV.js} +1 -1
  129. package/assets/{ownerOf-B7-bZ1Kj.js → ownerOf-DFlcEy6_.js} +1 -1
  130. package/assets/{parseNft-BnBeb8zU.js → parseNft-msnZvn_A.js} +2 -2
  131. package/assets/{parseSignature-gA3whR_I.js → parseSignature-CjbZVQR3.js} +1 -1
  132. package/assets/{parseSignature-BXiUrtE0.js → parseSignature-DEAl-96W.js} +3 -3
  133. package/assets/{pay-with-exchange-Bfj0m_wp.js → pay-with-exchange-CRwxKD_d.js} +1 -1
  134. package/assets/{payments-Cz9uOQEa.js → payments-CFEkq9jj.js} +1 -1
  135. package/assets/{qr-overlay-tCTGCDoP.js → qr-overlay-CS6qAFtp.js} +1 -1
  136. package/assets/{receive-BB-3p_8X.js → receive-D_7ieG-4.js} +1 -1
  137. package/assets/{resolveImplementation-AZ8V1faE.js → resolveImplementation-BxK03jeA.js} +1 -1
  138. package/assets/{rpc-DfJIwLRx.js → rpc-Cd5PGlK-.js} +1 -1
  139. package/assets/{secp256k1-D5GxePTM.js → secp256k1-BDhwR6SH.js} +1 -1
  140. package/assets/{secp256k1-lxVndZFi.js → secp256k1-D5XG5Cq2.js} +1 -1
  141. package/assets/{secp256k1-Bmuoeuaz.js → secp256k1-D_53A2qu.js} +1 -1
  142. package/assets/{send-DmW5J-Nc.js → send--YozeJBn.js} +1 -1
  143. package/assets/{send-batch-transaction-CZjLQhJF.js → send-batch-transaction-DiGyQeR5.js} +1 -1
  144. package/assets/{send-eip712-transaction-BhyQ0a_B.js → send-eip712-transaction-Dqu8RfN0.js} +2 -2
  145. package/assets/{send-gasless-transaction-CXbVlKhB.js → send-gasless-transaction-B5uz3mX0.js} +2 -2
  146. package/assets/{sendRawTransaction-BGdiWFeb.js → sendRawTransaction-rRmixG-d.js} +3 -3
  147. package/assets/{serializeTransaction-DykKczc7.js → serializeTransaction-CzGG2kBz.js} +1 -1
  148. package/assets/{session-proposal-BEX_HaKf.js → session-proposal-CCHvDJo0.js} +1 -1
  149. package/assets/{session-request-DR4MsaR6.js → session-request-BkhA5-RY.js} +2 -2
  150. package/assets/{sha256-Dlxe-c_a.js → sha256-Bt6mLy1E.js} +1 -1
  151. package/assets/{signing-DznnvpB3.js → signing-BwuIt3X5.js} +4 -4
  152. package/assets/{socials-BIESIfY8.js → socials-BStKssws.js} +1 -1
  153. package/assets/{swaps-CA_8qfYn.js → swaps-Bid0ju8o.js} +1 -1
  154. package/assets/{thirdweb-UauMP3KV.js → thirdweb-BMJ7fr_N.js} +3 -3
  155. package/assets/{totalSupply-V0CpLejD.js → totalSupply--8jNML7t.js} +1 -1
  156. package/assets/{trade-encoding-CWQaROcB.js → trade-encoding-Drnx1u3j.js} +1 -1
  157. package/assets/{transactionReceipt-T_4Pqj5L.js → transactionReceipt-C1w204dJ.js} +1 -1
  158. package/assets/{transactions-CCKmzO8P.js → transactions-KwvVTP9x.js} +1 -1
  159. package/assets/{useInfiniteGrid-BwrFUhaa.js → useInfiniteGrid-BAS-zEte.js} +1 -1
  160. package/assets/{useStore-D9l09yvh.js → useStore-D0Fp5fnX.js} +2 -2
  161. package/assets/useTheme-CBsdNYl2.js +1 -0
  162. package/assets/{useTheme-Bf8Lxsxi.js → useTheme-DU7pyJai.js} +1 -1
  163. package/assets/{verifyHash-DictgvCd.js → verifyHash-yypMHIUe.js} +1 -1
  164. package/assets/{w3m-modal-DEg0nzZj.js → w3m-modal-Cf0rHk1f.js} +1 -1
  165. package/assets/{w3m-modal-DjfQ6wwU.js → w3m-modal-D4BKzcIi.js} +1 -1
  166. package/assets/{wait-for-tx-receipt-agyY9QD2.js → wait-for-tx-receipt-Dq_saZBt.js} +1 -1
  167. package/assets/{wallet-kind-Jzl4cyiP.js → wallet-kind-D_7fqJZh.js} +1 -1
  168. package/assets/{wallets-_A4Bjek9.js → wallets-DthYtMmh.js} +6 -6
  169. package/assets/{web-connector-BaXQsZJI.js → web-connector-Cahc_-N0.js} +3 -3
  170. package/assets/{writeContract-D9YLPdhX.js → writeContract-CYBPanmL.js} +1 -1
  171. package/assets/{zoraTestnet-BC6E1i5C.js → zoraTestnet-CupsSsoK.js} +1 -1
  172. package/index.html +8 -8
  173. package/package.json +2 -2
  174. package/assets/GetCredits-HKG4BM_P.js +0 -1
  175. package/assets/decimals-Bkiwsrz3.js +0 -1
  176. package/assets/get-ecosystem-wallet-info-WLLUCIzd.js +0 -1
  177. package/assets/network-Dev_1fOd.js +0 -1
  178. package/assets/useTheme-B2pFHCn2.js +0 -1
@@ -1 +1 @@
1
- import{r as k}from"./index-BV8s6ez1.js";import{az as w}from"./sendRawTransaction-BGdiWFeb.js";import{c as I,e as q}from"./hashTypedData-vGDzeBcA.js";import"./NetworkUtil-Yv-DdqEo.js";import"./ethers-DArfy-QF.js";import"./react-yytiy0wi.js";import"./index-DgPN63Jh.js";const v=()=>"9.1.0",C=t=>t.toString(16).padStart(2,"0"),R=t=>{const e=new Uint8Array(t/2);return window.crypto.getRandomValues(e),Array.from(e,C).join("")},E=()=>typeof window<"u"?R(10):new Date().getTime().toString(36);class g{}g.makeRequest=(t,e)=>({id:E(),method:t,params:e,env:{sdkVersion:v()}});g.makeResponse=(t,e,s)=>({id:t,success:!0,version:s,data:e});g.makeErrorResponse=(t,e,s)=>({id:t,success:!1,error:e,version:s});var r;(function(t){t.sendTransactions="sendTransactions",t.rpcCall="rpcCall",t.getChainInfo="getChainInfo",t.getSafeInfo="getSafeInfo",t.getTxBySafeTxHash="getTxBySafeTxHash",t.getSafeBalances="getSafeBalances",t.signMessage="signMessage",t.signTypedMessage="signTypedMessage",t.getEnvironmentInfo="getEnvironmentInfo",t.getOffChainSignature="getOffChainSignature",t.requestAddressBook="requestAddressBook",t.wallet_getPermissions="wallet_getPermissions",t.wallet_requestPermissions="wallet_requestPermissions"})(r||(r={}));var f;(function(t){t.requestAddressBook="requestAddressBook"})(f||(f={}));class H{constructor(e=null,s=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:a,data:n,source:i})=>{const o=!n,l=!this.isServer&&i===window.parent,u=typeof n.version<"u"&&parseInt(n.version.split(".")[0]),B=typeof u=="number"&&u>=1;let y=!0;return Array.isArray(this.allowedOrigins)&&(y=this.allowedOrigins.find(P=>P.test(a))!==void 0),!o&&l&&B&&y},this.logIncomingMessage=a=>{console.info(`Safe Apps SDK v1: A message was received from origin ${a.origin}. `,a.data)},this.onParentMessage=a=>{this.isValidMessage(a)&&(this.debugMode&&this.logIncomingMessage(a),this.handleIncomingMessage(a.data))},this.handleIncomingMessage=a=>{const{id:n}=a,i=this.callbacks.get(n);i&&(i(a),this.callbacks.delete(n))},this.send=(a,n)=>{const i=g.makeRequest(a,n);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(i,"*"),new Promise((o,l)=>{this.callbacks.set(i.id,u=>{if(!u.success){l(new Error(u.error));return}o(u)})})},this.allowedOrigins=e,this.debugMode=s,this.isServer||window.addEventListener("message",this.onParentMessage)}}const S=t=>typeof t=="object"&&t!=null&&"domain"in t&&"types"in t&&"message"in t;var m=k();class A{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(r.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const s={message:e};return(await this.communicator.send(r.signMessage,s)).data}async signTypedMessage(e){if(!S(e))throw new Error("Invalid typed data");return(await this.communicator.send(r.signTypedMessage,{typedData:e})).data}async send({txs:e,params:s}){if(!e||!e.length)throw new Error("No transactions were passed");const a={txs:e,params:s};return(await this.communicator.send(r.sendTransactions,a)).data}}const c={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"},h={defaultBlockParam:(t="latest")=>t,returnFullTxObjectParam:(t=!1)=>t,blockNumberToHex:t=>Number.isInteger(t)?`0x${t.toString(16)}`:t};class O{constructor(e){this.communicator=e,this.call=this.buildRequest({call:c.eth_call,formatters:[null,h.defaultBlockParam]}),this.getBalance=this.buildRequest({call:c.eth_getBalance,formatters:[null,h.defaultBlockParam]}),this.getCode=this.buildRequest({call:c.eth_getCode,formatters:[null,h.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:c.eth_getStorageAt,formatters:[null,h.blockNumberToHex,h.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:c.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:c.eth_getBlockByHash,formatters:[null,h.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:c.eth_getBlockByNumber,formatters:[h.blockNumberToHex,h.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:c.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:c.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:c.eth_getTransactionCount,formatters:[null,h.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:c.eth_gasPrice}),this.getEstimateGas=s=>this.buildRequest({call:c.eth_estimateGas})([s]),this.setSafeSettings=this.buildRequest({call:c.safe_setSettings})}buildRequest(e){const{call:s,formatters:a}=e;return async n=>{a&&Array.isArray(n)&&a.forEach((l,u)=>{l&&(n[u]=l(n[u]))});const i={call:s,params:n||[]};return(await this.communicator.send(r.rpcCall,i)).data}}}const x="0x1626ba7e",V="0x20c13b0b",p=4001;class d extends Error{constructor(e,s,a){super(e),this.code=s,this.data=a,Object.setPrototypeOf(this,d.prototype)}}class _{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(r.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new d("Permissions request is invalid",p);try{return(await this.communicator.send(r.wallet_requestPermissions,e)).data}catch{throw new d("Permissions rejected",p)}}isPermissionRequestValid(e){return e.every(s=>typeof s=="object"?Object.keys(s).every(a=>!!Object.values(f).includes(a)):!1)}}const b=(t,e)=>e.some(s=>s.parentCapability===t),M=()=>(t,e,s)=>{const a=s.value;return s.value=async function(){const n=new _(this.communicator);let i=await n.getPermissions();if(b(e,i)||(i=await n.requestPermissions([{[e]:{}}])),!b(e,i))throw new d("Permissions rejected",p);return a.apply(this)},s};var j=function(t,e,s,a){var n=arguments.length,i=n<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,s):a,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,s,a);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(i=(n<3?o(i):n>3?o(e,s,i):o(e,s))||i);return n>3&&i&&Object.defineProperty(e,s,i),i};class T{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(r.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(r.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(r.getSafeBalances,{currency:e})).data}async check1271Signature(e,s="0x"){const a=await this.getInfo(),n=w({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,s]}),i={call:c.eth_call,params:[{to:a.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(r.rpcCall,i)).data.slice(0,10).toLowerCase()===x}catch{return!1}}async check1271SignatureBytes(e,s="0x"){const a=await this.getInfo(),n=w({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,s]}),i={call:c.eth_call,params:[{to:a.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(r.rpcCall,i)).data.slice(0,10).toLowerCase()===V}catch{return!1}}calculateMessageHash(e){return I(e)}calculateTypedMessageHash(e){const s=typeof e.domain.chainId=="object"?e.domain.chainId.toNumber():Number(e.domain.chainId);let a=e.primaryType;if(!a){const n=Object.values(e.types),i=Object.keys(e.types).filter(o=>n.every(l=>l.every(({type:u})=>u.replace("[","").replace("]","")!==o)));if(i.length===0||i.length>1)throw new Error("Please specify primaryType");a=i[0]}return q({message:e.message,domain:{...e.domain,chainId:s,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt},types:e.types,primaryType:a})}async getOffChainSignature(e){return(await this.communicator.send(r.getOffChainSignature,e)).data}async isMessageSigned(e,s="0x"){let a;if(typeof e=="string"&&(a=async()=>{const n=this.calculateMessageHash(e);return await this.isMessageHashSigned(n,s)}),S(e)&&(a=async()=>{const n=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(n,s)}),a)return await a();throw new Error("Invalid message type")}async isMessageHashSigned(e,s="0x"){const a=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const n of a)if(await n(e,s))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(r.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(r.requestAddressBook,void 0)).data}}j([M()],T.prototype,"requestAddressBook",null);class W{constructor(e={}){const{allowedDomains:s=null,debug:a=!1}=e;this.communicator=new H(s,a),this.eth=new O(this.communicator),this.txs=new A(this.communicator),this.safe=new T(this.communicator),this.wallet=new _(this.communicator)}}const $=m.Operation,z=m.TokenType,J=m.TransactionStatus,Q=m.TransferDirection;export{g as MessageFormatter,r as Methods,$ as Operation,c as RPC_CALLS,f as RestrictedMethods,z as TokenType,J as TransactionStatus,Q as TransferDirection,W as default,v as getSDKVersion,S as isObjectEIP712TypedData};
1
+ import{r as k}from"./index-BV8s6ez1.js";import{az as w}from"./sendRawTransaction-rRmixG-d.js";import{c as I,e as q}from"./hashTypedData-_My6_zHk.js";import"./NetworkUtil-Yv-DdqEo.js";import"./ethers-DArfy-QF.js";import"./react-yytiy0wi.js";import"./index-CYWpV70P.js";const v=()=>"9.1.0",C=t=>t.toString(16).padStart(2,"0"),R=t=>{const e=new Uint8Array(t/2);return window.crypto.getRandomValues(e),Array.from(e,C).join("")},E=()=>typeof window<"u"?R(10):new Date().getTime().toString(36);class g{}g.makeRequest=(t,e)=>({id:E(),method:t,params:e,env:{sdkVersion:v()}});g.makeResponse=(t,e,s)=>({id:t,success:!0,version:s,data:e});g.makeErrorResponse=(t,e,s)=>({id:t,success:!1,error:e,version:s});var r;(function(t){t.sendTransactions="sendTransactions",t.rpcCall="rpcCall",t.getChainInfo="getChainInfo",t.getSafeInfo="getSafeInfo",t.getTxBySafeTxHash="getTxBySafeTxHash",t.getSafeBalances="getSafeBalances",t.signMessage="signMessage",t.signTypedMessage="signTypedMessage",t.getEnvironmentInfo="getEnvironmentInfo",t.getOffChainSignature="getOffChainSignature",t.requestAddressBook="requestAddressBook",t.wallet_getPermissions="wallet_getPermissions",t.wallet_requestPermissions="wallet_requestPermissions"})(r||(r={}));var f;(function(t){t.requestAddressBook="requestAddressBook"})(f||(f={}));class H{constructor(e=null,s=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:a,data:n,source:i})=>{const o=!n,l=!this.isServer&&i===window.parent,u=typeof n.version<"u"&&parseInt(n.version.split(".")[0]),B=typeof u=="number"&&u>=1;let y=!0;return Array.isArray(this.allowedOrigins)&&(y=this.allowedOrigins.find(P=>P.test(a))!==void 0),!o&&l&&B&&y},this.logIncomingMessage=a=>{console.info(`Safe Apps SDK v1: A message was received from origin ${a.origin}. `,a.data)},this.onParentMessage=a=>{this.isValidMessage(a)&&(this.debugMode&&this.logIncomingMessage(a),this.handleIncomingMessage(a.data))},this.handleIncomingMessage=a=>{const{id:n}=a,i=this.callbacks.get(n);i&&(i(a),this.callbacks.delete(n))},this.send=(a,n)=>{const i=g.makeRequest(a,n);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(i,"*"),new Promise((o,l)=>{this.callbacks.set(i.id,u=>{if(!u.success){l(new Error(u.error));return}o(u)})})},this.allowedOrigins=e,this.debugMode=s,this.isServer||window.addEventListener("message",this.onParentMessage)}}const S=t=>typeof t=="object"&&t!=null&&"domain"in t&&"types"in t&&"message"in t;var m=k();class A{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(r.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const s={message:e};return(await this.communicator.send(r.signMessage,s)).data}async signTypedMessage(e){if(!S(e))throw new Error("Invalid typed data");return(await this.communicator.send(r.signTypedMessage,{typedData:e})).data}async send({txs:e,params:s}){if(!e||!e.length)throw new Error("No transactions were passed");const a={txs:e,params:s};return(await this.communicator.send(r.sendTransactions,a)).data}}const c={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"},h={defaultBlockParam:(t="latest")=>t,returnFullTxObjectParam:(t=!1)=>t,blockNumberToHex:t=>Number.isInteger(t)?`0x${t.toString(16)}`:t};class O{constructor(e){this.communicator=e,this.call=this.buildRequest({call:c.eth_call,formatters:[null,h.defaultBlockParam]}),this.getBalance=this.buildRequest({call:c.eth_getBalance,formatters:[null,h.defaultBlockParam]}),this.getCode=this.buildRequest({call:c.eth_getCode,formatters:[null,h.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:c.eth_getStorageAt,formatters:[null,h.blockNumberToHex,h.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:c.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:c.eth_getBlockByHash,formatters:[null,h.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:c.eth_getBlockByNumber,formatters:[h.blockNumberToHex,h.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:c.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:c.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:c.eth_getTransactionCount,formatters:[null,h.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:c.eth_gasPrice}),this.getEstimateGas=s=>this.buildRequest({call:c.eth_estimateGas})([s]),this.setSafeSettings=this.buildRequest({call:c.safe_setSettings})}buildRequest(e){const{call:s,formatters:a}=e;return async n=>{a&&Array.isArray(n)&&a.forEach((l,u)=>{l&&(n[u]=l(n[u]))});const i={call:s,params:n||[]};return(await this.communicator.send(r.rpcCall,i)).data}}}const x="0x1626ba7e",V="0x20c13b0b",p=4001;class d extends Error{constructor(e,s,a){super(e),this.code=s,this.data=a,Object.setPrototypeOf(this,d.prototype)}}class _{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(r.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new d("Permissions request is invalid",p);try{return(await this.communicator.send(r.wallet_requestPermissions,e)).data}catch{throw new d("Permissions rejected",p)}}isPermissionRequestValid(e){return e.every(s=>typeof s=="object"?Object.keys(s).every(a=>!!Object.values(f).includes(a)):!1)}}const b=(t,e)=>e.some(s=>s.parentCapability===t),M=()=>(t,e,s)=>{const a=s.value;return s.value=async function(){const n=new _(this.communicator);let i=await n.getPermissions();if(b(e,i)||(i=await n.requestPermissions([{[e]:{}}])),!b(e,i))throw new d("Permissions rejected",p);return a.apply(this)},s};var j=function(t,e,s,a){var n=arguments.length,i=n<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,s):a,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,s,a);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(i=(n<3?o(i):n>3?o(e,s,i):o(e,s))||i);return n>3&&i&&Object.defineProperty(e,s,i),i};class T{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(r.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(r.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(r.getSafeBalances,{currency:e})).data}async check1271Signature(e,s="0x"){const a=await this.getInfo(),n=w({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,s]}),i={call:c.eth_call,params:[{to:a.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(r.rpcCall,i)).data.slice(0,10).toLowerCase()===x}catch{return!1}}async check1271SignatureBytes(e,s="0x"){const a=await this.getInfo(),n=w({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,s]}),i={call:c.eth_call,params:[{to:a.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(r.rpcCall,i)).data.slice(0,10).toLowerCase()===V}catch{return!1}}calculateMessageHash(e){return I(e)}calculateTypedMessageHash(e){const s=typeof e.domain.chainId=="object"?e.domain.chainId.toNumber():Number(e.domain.chainId);let a=e.primaryType;if(!a){const n=Object.values(e.types),i=Object.keys(e.types).filter(o=>n.every(l=>l.every(({type:u})=>u.replace("[","").replace("]","")!==o)));if(i.length===0||i.length>1)throw new Error("Please specify primaryType");a=i[0]}return q({message:e.message,domain:{...e.domain,chainId:s,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt},types:e.types,primaryType:a})}async getOffChainSignature(e){return(await this.communicator.send(r.getOffChainSignature,e)).data}async isMessageSigned(e,s="0x"){let a;if(typeof e=="string"&&(a=async()=>{const n=this.calculateMessageHash(e);return await this.isMessageHashSigned(n,s)}),S(e)&&(a=async()=>{const n=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(n,s)}),a)return await a();throw new Error("Invalid message type")}async isMessageHashSigned(e,s="0x"){const a=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const n of a)if(await n(e,s))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(r.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(r.requestAddressBook,void 0)).data}}j([M()],T.prototype,"requestAddressBook",null);class W{constructor(e={}){const{allowedDomains:s=null,debug:a=!1}=e;this.communicator=new H(s,a),this.eth=new O(this.communicator),this.txs=new A(this.communicator),this.safe=new T(this.communicator),this.wallet=new _(this.communicator)}}const $=m.Operation,z=m.TokenType,J=m.TransactionStatus,Q=m.TransferDirection;export{g as MessageFormatter,r as Methods,$ as Operation,c as RPC_CALLS,f as RestrictedMethods,z as TokenType,J as TransactionStatus,Q as TransferDirection,W as default,v as getSDKVersion,S as isObjectEIP712TypedData};
@@ -1,4 +1,4 @@
1
- import{i as d,b as u}from"./lit-element-B3y9oplH.js";import{n as p}from"./class-map-CxwNmq0D.js";import{c as m}from"./index-Dgwg-DaP.js";import{d as f,r as h}from"./index-BVpuOhLG.js";const g=f`
1
+ import{i as d,b as u}from"./lit-element-B3y9oplH.js";import{n as p}from"./class-map-CxwNmq0D.js";import{c as m}from"./index-pOWOYTZf.js";import{d as f,r as h}from"./index-C-uQhIOu.js";const g=f`
2
2
  :host {
3
3
  position: relative;
4
4
  display: flex;
@@ -1 +1 @@
1
- import{P as t,A as i,a as u}from"./index-C__ZUWCs.js";import{W as De,b as Ce,c as Ue}from"./index-C__ZUWCs.js";import"./lit-element-B3y9oplH.js";import"./class-map-CxwNmq0D.js";import"./index-BVpuOhLG.js";import"./index-DgPN63Jh.js";import"./react-yytiy0wi.js";import"./ethers-DArfy-QF.js";import"./W3MFrameProviderSingleton-QTe845Ty.js";import"./index-C6Uar8kN.js";import"./index-BIJTdhnz.js";import"./events-DQ172AOg.js";import"./browser-ponyfill-Cl4XgbUp.js";import"./browser-ponyfill-jziBOMa-.js";import"./NetworkUtil-Yv-DdqEo.js";import"./index-gEVnIhEr.js";import"./index-nibyPLVP.js";import"./index-Bj7GkEZm.js";import"./index.es-B5B8Zcyr.js";import"./index-Dgwg-DaP.js";import"./index-Bv4pyelF.js";import"./index-BpQeHVbA.js";import"./index-CsTr0LfC.js";import"./index-DaIODAHU.js";import"./index-xHNUVGAh.js";import"./index-DSs6L904.js";import"./index-BtVa_Kh7.js";import"./index-C2G2lljO.js";import"./index-C7gttTv8.js";import"./MathUtil-BGCe3rZ3.js";const C=3e5;async function U(e){return t.handleOpenPay(e)}async function j(e,r=C){if(r<=0)throw new i(u.INVALID_PAYMENT_CONFIG,"Timeout must be greater than 0");try{await U(e)}catch(s){throw s instanceof i?s:new i(u.UNABLE_TO_INITIATE_PAYMENT,s.message)}return new Promise((s,l)=>{let o=!1;const c=setTimeout(()=>{o||(o=!0,m(),l(new i(u.GENERIC_PAYMENT_ERROR,"Payment timeout")))},r);function n(){if(o)return;const a=t.state.currentPayment,p=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:p||"Payment failed"});return}p&&!D&&!a&&(o=!0,m(),clearTimeout(c),s({success:!1,error:p}))}const b=d("currentPayment",n),y=d("error",n),S=d("isPaymentInProgress",n),m=E([b,y,S]);n()})}function Q(){return t.getExchanges()}function X(){var e;return(e=t.state.currentPayment)==null?void 0:e.result}function $(){return t.state.error}function ee(){return t.state.isPaymentInProgress}function d(e,r){return t.subscribeKey(e,r)}function E(e){return()=>{e.forEach(r=>{try{r()}catch{}})}}const te={network:"eip155:8453",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},ae={network:"eip155:8453",asset:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},se={network:"eip155:84532",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},re={network:"eip155:1",asset:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},oe={network:"eip155:10",asset:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ne={network:"eip155:42161",asset:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},me={network:"eip155:137",asset:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ie={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ce={network:"eip155:1",asset:"0xdAC17F958D2ee523a2206206994597C13D831ec7",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},pe={network:"eip155:10",asset:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ue={network:"eip155:42161",asset:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},de={network:"eip155:137",asset:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},le={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},be={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"native",metadata:{name:"Solana",symbol:"SOL",decimals:9}};export{t as PayController,De as W3mPayLoadingView,Ce as W3mPayQuoteView,Ue as W3mPayView,ne as arbitrumUSDC,ue as arbitrumUSDT,te as baseETH,se as baseSepoliaETH,ae as baseUSDC,re as ethereumUSDC,ce as ethereumUSDT,Q as getExchanges,ee as getIsPaymentInProgress,$ as getPayError,X as getPayResult,U as openPay,oe as optimismUSDC,pe as optimismUSDT,j as pay,me as polygonUSDC,de as polygonUSDT,be as solanaSOL,ie as solanaUSDC,le as solanaUSDT};
1
+ import{P as t,A as i,a as u}from"./index-BseAK0jv.js";import{W as De,b as Ce,c as Ue}from"./index-BseAK0jv.js";import"./lit-element-B3y9oplH.js";import"./class-map-CxwNmq0D.js";import"./index-C-uQhIOu.js";import"./index-CYWpV70P.js";import"./react-yytiy0wi.js";import"./ethers-DArfy-QF.js";import"./W3MFrameProviderSingleton-KZXDtdeN.js";import"./index-C6Uar8kN.js";import"./index-BUYyFeCt.js";import"./events-DQ172AOg.js";import"./browser-ponyfill-Cl4XgbUp.js";import"./browser-ponyfill-jziBOMa-.js";import"./NetworkUtil-Yv-DdqEo.js";import"./index-CSy-_M5R.js";import"./index-nibyPLVP.js";import"./index-BQzrms9Y.js";import"./index.es-CiB5ifZN.js";import"./index-pOWOYTZf.js";import"./index-DhmytMhG.js";import"./index-Dy65iyWb.js";import"./index-DqO1kUFU.js";import"./index-CRWbHzp3.js";import"./index-7a1mhp_I.js";import"./index-Bi6W-t7S.js";import"./index-0YKOyKsz.js";import"./index-C1L7bhks.js";import"./index-DUwiQnps.js";import"./MathUtil-BGCe3rZ3.js";const C=3e5;async function U(e){return t.handleOpenPay(e)}async function j(e,r=C){if(r<=0)throw new i(u.INVALID_PAYMENT_CONFIG,"Timeout must be greater than 0");try{await U(e)}catch(s){throw s instanceof i?s:new i(u.UNABLE_TO_INITIATE_PAYMENT,s.message)}return new Promise((s,l)=>{let o=!1;const c=setTimeout(()=>{o||(o=!0,m(),l(new i(u.GENERIC_PAYMENT_ERROR,"Payment timeout")))},r);function n(){if(o)return;const a=t.state.currentPayment,p=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:p||"Payment failed"});return}p&&!D&&!a&&(o=!0,m(),clearTimeout(c),s({success:!1,error:p}))}const b=d("currentPayment",n),y=d("error",n),S=d("isPaymentInProgress",n),m=E([b,y,S]);n()})}function Q(){return t.getExchanges()}function X(){var e;return(e=t.state.currentPayment)==null?void 0:e.result}function $(){return t.state.error}function ee(){return t.state.isPaymentInProgress}function d(e,r){return t.subscribeKey(e,r)}function E(e){return()=>{e.forEach(r=>{try{r()}catch{}})}}const te={network:"eip155:8453",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},ae={network:"eip155:8453",asset:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},se={network:"eip155:84532",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},re={network:"eip155:1",asset:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},oe={network:"eip155:10",asset:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ne={network:"eip155:42161",asset:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},me={network:"eip155:137",asset:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ie={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ce={network:"eip155:1",asset:"0xdAC17F958D2ee523a2206206994597C13D831ec7",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},pe={network:"eip155:10",asset:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ue={network:"eip155:42161",asset:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},de={network:"eip155:137",asset:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},le={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},be={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"native",metadata:{name:"Solana",symbol:"SOL",decimals:9}};export{t as PayController,De as W3mPayLoadingView,Ce as W3mPayQuoteView,Ue as W3mPayView,ne as arbitrumUSDC,ue as arbitrumUSDT,te as baseETH,se as baseSepoliaETH,ae as baseUSDC,re as ethereumUSDC,ce as ethereumUSDT,Q as getExchanges,ee as getIsPaymentInProgress,$ as getPayError,X as getPayResult,U as openPay,oe as optimismUSDC,pe as optimismUSDT,j as pay,me as polygonUSDC,de as polygonUSDT,be as solanaSOL,ie as solanaUSDC,le as solanaUSDT};
@@ -1,4 +1,4 @@
1
- import{i as c,b as a}from"./lit-element-B3y9oplH.js";import{n as o,o as h}from"./class-map-CxwNmq0D.js";import{e as m,n as b}from"./ref-BsAZ42-h.js";import{c as x}from"./index-Dgwg-DaP.js";import{d as f,r as $,e as g}from"./index-BVpuOhLG.js";const w=f`
1
+ import{i as c,b as a}from"./lit-element-B3y9oplH.js";import{n as o,o as h}from"./class-map-CxwNmq0D.js";import{e as m,n as b}from"./ref-BsAZ42-h.js";import{c as x}from"./index-pOWOYTZf.js";import{d as f,r as $,e as g}from"./index-C-uQhIOu.js";const w=f`
2
2
  :host {
3
3
  position: relative;
4
4
  width: 100%;