@dcl/shop 0.1.0-29820201061.commit-6e93aab → 0.1.0-29820315471.commit-e34db25

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 (170) hide show
  1. package/assets/{AnimatedBackground-DAWtZAKT.js → AnimatedBackground-DQ46urVV.js} +1 -1
  2. package/assets/{Assets-BfwpVa8T.js → Assets-5wZu90xj.js} +1 -1
  3. package/assets/Cart-DDgcOTzw.js +3 -0
  4. package/assets/Cart-DXZzP7Af.css +1 -0
  5. package/assets/{CircularProgress-DbOPAlwJ.js → CircularProgress-CfcEerVP.js} +1 -1
  6. package/assets/{Collection-D9pgNA_k.js → Collection-Bi7w1GKJ.js} +1 -1
  7. package/assets/{CollectionCarousel-Bv4JmxDk.js → CollectionCarousel-Bu8qPKKJ.js} +1 -1
  8. package/assets/{Creator-BUh9bTpd.js → Creator-B13Gi9z4.js} +1 -1
  9. package/assets/{CssVarsProvider-w2c1yhxv.js → CssVarsProvider-CvtfLfCd.js} +1 -1
  10. package/assets/{ExchangeController-SpKxAxin.js → ExchangeController-B9D_7PXu.js} +1 -1
  11. package/assets/{GetCredits-N_TH5qjR.js → GetCredits-C3rj35ez.js} +1 -1
  12. package/assets/{HelpersUtil-Dk0fX2VO.js → HelpersUtil-CNtn9Kzj.js} +1 -1
  13. package/assets/{ImportListings-DeGUWpef.js → ImportListings-hNp1sEuT.js} +1 -1
  14. package/assets/{ItemDetail-oeRcJNYq.js → ItemDetail-BqrPvIRT.js} +2 -2
  15. package/assets/{LoadMore-CG-U1l6R.js → LoadMore-CwKrPv19.js} +1 -1
  16. package/assets/{MarketCheckout-ok-4xTbs.js → MarketCheckout-D-VQDb7F.js} +1 -1
  17. package/assets/{MyAssets-CvtYfSpu.js → MyAssets-CzmZ_l10.js} +1 -1
  18. package/assets/{MyFavorites-Dd22LHHj.js → MyFavorites-CdAcz-wK.js} +1 -1
  19. package/assets/{MyPurchases-V1RhxGky.js → MyPurchases-Bw8Lb-63.js} +1 -1
  20. package/assets/{NotFound-DiPtPjNv.js → NotFound-C3wbCG4q.js} +1 -1
  21. package/assets/{StoreSettings-DnT3y2OO.js → StoreSettings-BhJ4tKkZ.js} +1 -1
  22. package/assets/{Success-Cty_2pyi.js → Success-CiXoIPVr.js} +1 -1
  23. package/assets/{SwapController-DaN0jm-H.js → SwapController-53Vi_fXW.js} +1 -1
  24. package/assets/{TradeService-BvnZvZgd.js → TradeService-C8gY38rG.js} +1 -1
  25. package/assets/{W3MFrameProviderSingleton-0X-5xnm-.js → W3MFrameProviderSingleton-CaYG210l.js} +3 -3
  26. package/assets/{WebCryptoP256-CTN3luLA.js → WebCryptoP256-DtgFm5FB.js} +1 -1
  27. package/assets/{basic-QSXc4V2D.js → basic-Ch9NQwrH.js} +1 -1
  28. package/assets/{biconomy-CqIIitTh.js → biconomy-TNDCvsRI.js} +1 -1
  29. package/assets/{buy-BB1nNoHF.js → buy-BPkraJ17.js} +1 -1
  30. package/assets/{buy-gasless-Dk-vGVaA.js → buy-gasless-uVyAhlxN.js} +1 -1
  31. package/assets/{cart-checkout-Dq_IfS2V.js → cart-checkout-Co7t_k8J.js} +1 -1
  32. package/assets/{categories-B5rMzFhG.js → categories-pY-U0UXm.js} +1 -1
  33. package/assets/{ccip-CwgUOIwr.js → ccip-BAHa2VFa.js} +1 -1
  34. package/assets/{ccip-DgWVV-Cq.js → ccip-scmwpqQC.js} +1 -1
  35. package/assets/{collection-Cx_FbJvw.js → collection-BdgBOuhz.js} +1 -1
  36. package/assets/{controller-C-XHoEvy.js → controller-DGvMtERc.js} +2 -2
  37. package/assets/{core-CfiWie_R.js → core-DflkIDmd.js} +4 -4
  38. package/assets/{custom-DKVEEouT.js → custom-DclbkPm_.js} +1 -1
  39. package/assets/{data-capture-DRU0RrJn.js → data-capture-D7FmI-WY.js} +1 -1
  40. package/assets/{decimals-ClpY8V96.js → decimals-B34hEReu.js} +1 -1
  41. package/assets/{decimals-DonBY3ph.js → decimals-Cd90iC1A.js} +1 -1
  42. package/assets/{detectExtension-B_mnipYI.js → detectExtension-BCqIz4gv.js} +1 -1
  43. package/assets/{email-Du5ktVIv.js → email-B6HsCs0u.js} +1 -1
  44. package/assets/{embedded-wallet-D8702brY.js → embedded-wallet-cye2mSzK.js} +1 -1
  45. package/assets/{emotion-styled.browser.esm-D4okznSw.js → emotion-styled.browser.esm-B-hzcBrK.js} +1 -1
  46. package/assets/{engine-CjhboEJw.js → engine-CMumcr4T.js} +1 -1
  47. package/assets/{errors-DLCfzexO.js → errors-qUwGIanA.js} +1 -1
  48. package/assets/{estimate-l1-fee-D65JAyU_.js → estimate-l1-fee-DebL8v3Z.js} +1 -1
  49. package/assets/{eth_estimateGas-Dx8A0rQf.js → eth_estimateGas-2pKUTcbV.js} +1 -1
  50. package/assets/{eth_getStorageAt-Dn97nH7-.js → eth_getStorageAt-CFTZVftG.js} +1 -1
  51. package/assets/{eth_getTransactionCount-BsbZubbz.js → eth_getTransactionCount-39Gh8JUo.js} +1 -1
  52. package/assets/{extractIPFS-3p5_lVI2.js → extractIPFS-PVH2EVQE.js} +1 -1
  53. package/assets/{features-CEnnVGh1.js → features-D9Taji2F.js} +1 -1
  54. package/assets/{fetchTokenMetadata-BBl6hFMA.js → fetchTokenMetadata-DM2B3NZz.js} +2 -2
  55. package/assets/{get-ecosystem-wallet-info-DJRhUKR8.js → get-ecosystem-wallet-info-kEbf8Llc.js} +1 -1
  56. package/assets/{getBalance-BjOc81GX.js → getBalance-B4GGi_h8.js} +1 -1
  57. package/assets/{getInstalledModules-B5lc4vdM.js → getInstalledModules-W39oQBw8.js} +1 -1
  58. package/assets/{getNFT-DzSkkUED.js → getNFT-COMLY0k-.js} +1 -1
  59. package/assets/{getNFT-CL_MHRMI.js → getNFT-_ore7rdY.js} +2 -2
  60. package/assets/{getOverlayAlpha-CMi-RtY0.js → getOverlayAlpha-BX66SxOu.js} +1 -1
  61. package/assets/{hashTypedData-CtS-a__q.js → hashTypedData-C9Vn70Lp.js} +1 -1
  62. package/assets/{hashTypedData-DgGGaq3_.js → hashTypedData-CxL0SEsX.js} +1 -1
  63. package/assets/{import-dApKnRUE.js → import-C7kEB_S5.js} +1 -1
  64. package/assets/{in-app-wallet-calls-DXDKPfo-.js → in-app-wallet-calls-Dv5D-qmW.js} +1 -1
  65. package/assets/{index-BZrziql9.js → index--KLajle8.js} +1 -1
  66. package/assets/{index-B_gop-2P.js → index-3j2VRNSj.js} +2 -2
  67. package/assets/{index-kj576VV8.js → index-B1ztebBZ.js} +1 -1
  68. package/assets/{index-AXY2OKOi.js → index-B6A_pOmU.js} +1 -1
  69. package/assets/{index-BKHArmb8.js → index-BB3seE1H.js} +1 -1
  70. package/assets/{index-CXCPKgIL.js → index-BHvu7he_.js} +1 -1
  71. package/assets/{index-D-FlYCrT.js → index-BNabonCc.js} +1 -1
  72. package/assets/{index-DNyAB5T9.js → index-BPURGbOI.js} +2 -2
  73. package/assets/{index-E3u-0qkh.js → index-BXG5dCKJ.js} +1 -1
  74. package/assets/{index-DSMcEg86.js → index-BZ2A41zN.js} +1 -1
  75. package/assets/{index-BtWvPi-C.js → index-Bbub8cs6.js} +3 -3
  76. package/assets/{index-Ct3-b-XG.js → index-BdsoQlUk.js} +1 -1
  77. package/assets/{index-BEP5YEOP.js → index-BhokrOsa.js} +1 -1
  78. package/assets/{index-CTL73XUb.js → index-BmTc8K12.js} +1 -1
  79. package/assets/{index-mQ3fD2pW.js → index-BoB0Y302.js} +1 -1
  80. package/assets/{index-F3bWVhlW.js → index-BtOJu30H.js} +1 -1
  81. package/assets/{index-COYa4blu.js → index-BvjAr8nY.js} +1 -1
  82. package/assets/{index-Nzz-X3JR.js → index-BznxuYKb.js} +1 -1
  83. package/assets/{index-BtHD2PwE.js → index-C-PXxORu.js} +1 -1
  84. package/assets/{index-CC9ohYjq.js → index-CF-ZZ_LW.js} +1 -1
  85. package/assets/{index-ClOq-XK_.js → index-CFcehHl6.js} +1 -1
  86. package/assets/{index-LsWSCTxf.js → index-CTJrkNxC.js} +1 -1
  87. package/assets/{index-DW6hvVBk.js → index-CUImhRoy.js} +1 -1
  88. package/assets/{index-Bdviiw0D.js → index-CcFuTBt3.js} +1 -1
  89. package/assets/{index-9TPYgQJV.js → index-CcSs3xun.js} +1 -1
  90. package/assets/{index-BeeqvCzC.js → index-CigjJrdx.js} +1 -1
  91. package/assets/{index-CF8dJQWx.js → index-CkezkMvS.js} +2 -2
  92. package/assets/{index-EpjNSbck.js → index-CobH2y5K.js} +1 -1
  93. package/assets/{index-B0dfVx8-.js → index-CzWl3qk_.js} +1 -1
  94. package/assets/{index-DQcdNd4L.js → index-D1hhOo8i.js} +1 -1
  95. package/assets/{index-CDOVd3Or.js → index-D5DA5XrX.js} +1 -1
  96. package/assets/{index-BTrFeJpK.js → index-D9VTjnkt.js} +1 -1
  97. package/assets/{index-VljTVp5r.js → index-DCPsmlPD.js} +1 -1
  98. package/assets/{index-m3ikjlZ9.js → index-DEN3gLrI.js} +1 -1
  99. package/assets/{index-1iy3MjeD.js → index-DTSgeQ5D.js} +1 -1
  100. package/assets/{index-D82p0tCN.js → index-DXDtFVPs.js} +1 -1
  101. package/assets/{index-Bi5nB_Xd.js → index-DbYRql_-.js} +1 -1
  102. package/assets/{index-Dl878bh3.js → index-Dc1jVnMf.js} +3 -3
  103. package/assets/{index-DAotFwIM.js → index-DpRVy6UQ.js} +1 -1
  104. package/assets/{index-D4haZmAC.js → index-DuRVCvRc.js} +1 -1
  105. package/assets/{index-Cldj-HLd.js → index-I594L5Wd.js} +1 -1
  106. package/assets/{index-DvCxAuAV.js → index-Tvwwbs5L.js} +1 -1
  107. package/assets/{index-rIXEHCUI.js → index-VhulZp0_.js} +1 -1
  108. package/assets/{index-NmO7Zc6p.js → index-W7cyhQOk.js} +1 -1
  109. package/assets/{index-D-0UbgZb.js → index-boL29_Yj.js} +1 -1
  110. package/assets/{index-D2MCniIy.js → index-d4x-ttpO.js} +10 -10
  111. package/assets/{index-Dd1qZUR_.js → index-nyWvMhrR.js} +1 -1
  112. package/assets/{index-C2ou7t9Z.js → index-sBxcn5Yg.js} +1 -1
  113. package/assets/{index-BfjvLXhz.js → index-txCoS8XJ.js} +1 -1
  114. package/assets/{index-DFvNyoxW.js → index-vqW6dFQp.js} +1 -1
  115. package/assets/{index-9RhtGjkQ.js → index-xAQNqr4T.js} +1 -1
  116. package/assets/{index.es-BKvDPMdj.js → index.es-CX7mxtcH.js} +4 -4
  117. package/assets/{index.es-jAGAALqM.js → index.es-DHRIRbEx.js} +1 -1
  118. package/assets/{index.es-D4zORoHW.js → index.es-Dzc3VMLo.js} +1 -1
  119. package/assets/{localBatchGatewayRequest-DSTbEhrP.js → localBatchGatewayRequest-DPQULVCl.js} +1 -1
  120. package/assets/{mana-rate-8umEj7_T.js → mana-rate-BWFOkvpC.js} +1 -1
  121. package/assets/{networks-cttqYPBD.js → networks-h2z6LNz5.js} +1 -1
  122. package/assets/{onramp-O3BTWx9-.js → onramp-DkkFwfD-.js} +1 -1
  123. package/assets/{openzeppelin-CQac0BGV.js → openzeppelin-Dt8oZ76u.js} +1 -1
  124. package/assets/{ownerOf-BNp_oN81.js → ownerOf-D61ptJju.js} +1 -1
  125. package/assets/{parseNft-CaODLwGA.js → parseNft-DF9_xc-W.js} +2 -2
  126. package/assets/{parseSignature-Bx6QTnH6.js → parseSignature-BGy6ebQm.js} +1 -1
  127. package/assets/{parseSignature-BUlJFwOG.js → parseSignature-CoN-flwV.js} +3 -3
  128. package/assets/{pay-with-exchange-3gqLKVFv.js → pay-with-exchange-CrvAas-k.js} +1 -1
  129. package/assets/{payments-DpS98zAJ.js → payments-DEbBixXM.js} +1 -1
  130. package/assets/{qr-overlay-BTYTNs3e.js → qr-overlay-_AYDDd2P.js} +1 -1
  131. package/assets/{receive-GjDfyQpR.js → receive-BikF2OCK.js} +1 -1
  132. package/assets/{resolveImplementation-C6kQvPP-.js → resolveImplementation-CyERb8Bt.js} +1 -1
  133. package/assets/{rpc-DuJlT0HH.js → rpc-Bj2mehcE.js} +1 -1
  134. package/assets/{secp256k1-CPZ3QzZL.js → secp256k1-4S_gx5U_.js} +1 -1
  135. package/assets/{secp256k1-BmaDbfrn.js → secp256k1-BlXhQE61.js} +1 -1
  136. package/assets/{secp256k1-BWbqqT7z.js → secp256k1-BwiABSKe.js} +1 -1
  137. package/assets/{send-CO-2udGX.js → send-B7leZ2sF.js} +1 -1
  138. package/assets/{send-batch-transaction-D2YAYdks.js → send-batch-transaction-NCJfUQmg.js} +1 -1
  139. package/assets/{send-eip712-transaction-CcIzmXkO.js → send-eip712-transaction-DyB2yZtW.js} +2 -2
  140. package/assets/{send-gasless-transaction-B_Vu9cKC.js → send-gasless-transaction-DxbiAsWR.js} +2 -2
  141. package/assets/{sendRawTransaction-zZ1gmwwW.js → sendRawTransaction-CXnui5Km.js} +3 -3
  142. package/assets/{serializeTransaction-BLhvSCIg.js → serializeTransaction-BA8Lx_h7.js} +1 -1
  143. package/assets/{session-proposal-CMJwwypi.js → session-proposal-ZPunDXaI.js} +1 -1
  144. package/assets/{session-request-Bnr_sX_J.js → session-request-D_b2ouvA.js} +2 -2
  145. package/assets/{sha256-Cz0lQzvl.js → sha256-D2Fo41ck.js} +1 -1
  146. package/assets/{signing-CvokIB4x.js → signing-CP2v_dlr.js} +4 -4
  147. package/assets/{socials-D4DuECHq.js → socials-xqF7U9Yn.js} +1 -1
  148. package/assets/{swaps-D_hLEEKg.js → swaps-B3ujQJZz.js} +1 -1
  149. package/assets/{thirdweb-C_WUiq8w.js → thirdweb-B7ea2PEt.js} +3 -3
  150. package/assets/{totalSupply-V6l7KoX8.js → totalSupply-D22_m4j2.js} +1 -1
  151. package/assets/{trade-encoding-CxOU66Zo.js → trade-encoding-cvcruSuW.js} +1 -1
  152. package/assets/{transactionReceipt-DxcBIxbU.js → transactionReceipt-9wnHZrRL.js} +1 -1
  153. package/assets/{transactions-CT0Iato6.js → transactions-Nu8-9WNT.js} +1 -1
  154. package/assets/{useInfiniteGrid-_2151jJs.js → useInfiniteGrid-ClIfwXAY.js} +1 -1
  155. package/assets/{useStore-_juYfQlk.js → useStore-BPgnQXlK.js} +1 -1
  156. package/assets/useTheme-BwxUDr5G.js +1 -0
  157. package/assets/{useTheme-CvQWZTyO.js → useTheme-HWLX9NSW.js} +1 -1
  158. package/assets/{verifyHash-Ch4HpC7b.js → verifyHash-DMHtO2BR.js} +1 -1
  159. package/assets/{w3m-modal-CqER6RMY.js → w3m-modal-Cx_nmtny.js} +1 -1
  160. package/assets/{w3m-modal-s_TWH6MQ.js → w3m-modal-wqk18fis.js} +1 -1
  161. package/assets/{wait-for-tx-receipt-CuxFpJ4i.js → wait-for-tx-receipt-BPkFazzP.js} +1 -1
  162. package/assets/{wallets-Pcb-CnJi.js → wallets-CmM_4Vm-.js} +6 -6
  163. package/assets/{web-connector-D2Rc0Q2d.js → web-connector-B01y8d6Z.js} +3 -3
  164. package/assets/{writeContract-6OJ2j59X.js → writeContract-BTRFLrl9.js} +1 -1
  165. package/assets/{zoraTestnet-DWGOJRav.js → zoraTestnet-Bq4RAmQw.js} +1 -1
  166. package/index.html +11 -11
  167. package/package.json +2 -2
  168. package/assets/Cart-BMcaDkFj.js +0 -3
  169. package/assets/Cart-BU0ex2lY.css +0 -1
  170. package/assets/useTheme-hl4D5Ddl.js +0 -1
@@ -1,4 +1,4 @@
1
- import{i as l,b}from"./lit-element-B3y9oplH.js";import{n as r}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-rIXEHCUI.js";import{d as h,r as v,e as f}from"./index-Dl878bh3.js";const m=h`
1
+ import{i as l,b}from"./lit-element-B3y9oplH.js";import{n as r}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-VhulZp0_.js";import{d as h,r as v,e as f}from"./index-Dc1jVnMf.js";const m=h`
2
2
  button {
3
3
  background-color: transparent;
4
4
  padding: ${({spacing:t})=>t[1]};
@@ -1,4 +1,4 @@
1
- import{i as h,b as v}from"./lit-element-B3y9oplH.js";import{n as d}from"./class-map-CxwNmq0D.js";import"./index-E3u-0qkh.js";import{d as m,r as f}from"./index-Dl878bh3.js";import{c as u,U as p}from"./index-rIXEHCUI.js";const g=m`
1
+ import{i as h,b as v}from"./lit-element-B3y9oplH.js";import{n as d}from"./class-map-CxwNmq0D.js";import"./index-BXG5dCKJ.js";import{d as m,r as f}from"./index-Dc1jVnMf.js";import{c as u,U as p}from"./index-VhulZp0_.js";const g=m`
2
2
  :host {
3
3
  display: block;
4
4
  width: var(--local-width);
@@ -1 +1 @@
1
- import{r as k}from"./index-BV8s6ez1.js";import{az as w}from"./sendRawTransaction-zZ1gmwwW.js";import{c as I,e as q}from"./hashTypedData-DgGGaq3_.js";import"./NetworkUtil-CLSFaUe_.js";import"./sentry-BPJvc5GU.js";import"./react-yytiy0wi.js";import"./index-D2MCniIy.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.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 J{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 Q=m.Operation,X=m.TokenType,Y=m.TransactionStatus,Z=m.TransferDirection;export{g as MessageFormatter,r as Methods,Q as Operation,c as RPC_CALLS,f as RestrictedMethods,X as TokenType,Y as TransactionStatus,Z as TransferDirection,J as default,v as getSDKVersion,S as isObjectEIP712TypedData};
1
+ import{r as k}from"./index-BV8s6ez1.js";import{az as w}from"./sendRawTransaction-CXnui5Km.js";import{c as I,e as q}from"./hashTypedData-CxL0SEsX.js";import"./NetworkUtil-CLSFaUe_.js";import"./sentry-BPJvc5GU.js";import"./react-yytiy0wi.js";import"./index-d4x-ttpO.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.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 J{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 Q=m.Operation,X=m.TokenType,Y=m.TransactionStatus,Z=m.TransferDirection;export{g as MessageFormatter,r as Methods,Q as Operation,c as RPC_CALLS,f as RestrictedMethods,X as TokenType,Y as TransactionStatus,Z as TransferDirection,J as default,v as getSDKVersion,S as isObjectEIP712TypedData};