@dcl/shop 1.2.1-31141894504.commit-b6f2fa5 → 1.2.1-31142410827.commit-447715b

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 (174) hide show
  1. package/_assets/{Activity-CM1koIWA.js → Activity-CxjV6VXk.js} +3 -3
  2. package/_assets/{AnimatedBackground-Dq4kMaMJ.js → AnimatedBackground-BiXIwT8i.js} +1 -1
  3. package/_assets/{Assets-CrYK64oM.js → Assets-DVK807CG.js} +2 -2
  4. package/_assets/{Assets.styles-DQJDvpwk.js → Assets.styles-A3yRI2MU.js} +1 -1
  5. package/_assets/{Authorizations-CLlifjsF.js → Authorizations-D1FoQR5j.js} +1 -1
  6. package/_assets/{Cart-BTdBdLSV.js → Cart-CMAKp-wK.js} +1 -1
  7. package/_assets/{CircularProgress-5u3Axs4r.js → CircularProgress-D5sNhvlC.js} +1 -1
  8. package/_assets/{Collection-CrmOtKVR.js → Collection-Bqw8AoVr.js} +1 -1
  9. package/_assets/{CollectionCarousel-BNRsg5LI.js → CollectionCarousel-DMTJO3vn.js} +2 -2
  10. package/_assets/{Confetti-CcphdN06.js → Confetti-CDwPqeLK.js} +1 -1
  11. package/_assets/{Creator-Cpmty4q3.js → Creator-6eREKFWS.js} +1 -1
  12. package/_assets/{ErrorNotice-DcMjmsY0.js → ErrorNotice-BQwK_TDE.js} +1 -1
  13. package/_assets/{ExchangeController-DuNjedyi.js → ExchangeController-BX6K_R7F.js} +1 -1
  14. package/_assets/{Faq-BZT-Tuv2.js → Faq-D_JBmT_h.js} +1 -1
  15. package/_assets/{GetCredits-CQ4C143X.js → GetCredits-Q0Mgpypn.js} +1 -1
  16. package/_assets/{Grow-C1qF8Gbp.js → Grow-DXIhfb0h.js} +1 -1
  17. package/_assets/{HelpersUtil-YUnnMEbv.js → HelpersUtil-BTJgul2J.js} +1 -1
  18. package/_assets/{ItemDetail-DIJVogYi.js → ItemDetail--g9bExAk.js} +2 -2
  19. package/_assets/LazyEmoteControls-DLE3wPcI.js +2 -0
  20. package/_assets/{LoadMore-ChE3Ywf2.js → LoadMore-D20OD6Vd.js} +1 -1
  21. package/_assets/{ManaPricingBanner.styles-YQt9G2FY.js → ManaPricingBanner.styles-DGbgCot9.js} +1 -1
  22. package/_assets/{MyAssets-g4TFZ7e2.js → MyAssets-D-pR6nEY.js} +2 -2
  23. package/_assets/{MyFavorites-BHIx442Q.js → MyFavorites-BZJTE-15.js} +1 -1
  24. package/_assets/{NotFound-Mnz4Ucj1.js → NotFound-CY50b1nf.js} +1 -1
  25. package/_assets/{NotificationsBell-Cfum40NV.js → NotificationsBell-B4g5IIot.js} +1 -1
  26. package/_assets/{OutfitDetail-DYlB-_2t.js → OutfitDetail-BVF3gVX4.js} +1 -1
  27. package/_assets/{OutfitPreview-CKBV79hH.js → OutfitPreview-BH8Vtdqe.js} +1 -1
  28. package/_assets/{OutfitStudio-D5ASiVh6.js → OutfitStudio-CkkYfM7v.js} +1 -1
  29. package/_assets/{StoreSettings-EwiANufQ.js → StoreSettings-ByjR6E4Q.js} +21 -21
  30. package/_assets/{Success-DEpy1BVd.js → Success-ChdN3XnW.js} +1 -1
  31. package/_assets/{SwapController-CoZyRCI2.js → SwapController-BSn7c8IX.js} +1 -1
  32. package/_assets/{Tooltip-bEqHt7Cn.js → Tooltip-C20chtvP.js} +1 -1
  33. package/_assets/{TradeService-zAix_pZH.js → TradeService-C1HwlfJG.js} +1 -1
  34. package/_assets/{W3MFrameProviderSingleton-DUGxXY3k.js → W3MFrameProviderSingleton-DM1LkzC3.js} +3 -3
  35. package/_assets/{WebCryptoP256-D8VfrUWY.js → WebCryptoP256-DtXjN3TD.js} +1 -1
  36. package/_assets/{authorizations-BG0JBYIM.js → authorizations-BIUtCNZm.js} +1 -1
  37. package/_assets/{basic-C5bTQfXn.js → basic-CKrSeG36.js} +1 -1
  38. package/_assets/{biconomy-DMDUbT_l.js → biconomy-CraeH257.js} +1 -1
  39. package/_assets/{builder-J1muoe18.js → builder-C8bXNaZ5.js} +1 -1
  40. package/_assets/{buy-C7GNfKVo.js → buy-Dvc_dX-A.js} +1 -1
  41. package/_assets/{buy-gasless-CGeRTZTF.js → buy-gasless-C2CSfMz_.js} +1 -1
  42. package/_assets/{categories-BvYy29PG.js → categories-C5jojgbc.js} +1 -1
  43. package/_assets/{ccip-nElUyFDJ.js → ccip-BTuFCSPg.js} +1 -1
  44. package/_assets/{ccip-Be222yLp.js → ccip-Bb0XTJKs.js} +1 -1
  45. package/_assets/{collectionPage.styles-BbghKEPw.js → collectionPage.styles-BQBK8RFg.js} +2 -2
  46. package/_assets/{controller-C2j748IT.js → controller-BslzK_oR.js} +2 -2
  47. package/_assets/{core-f097495A.js → core-A4i7e9_h.js} +4 -4
  48. package/_assets/{createSvgIcon-BPThy2SY.js → createSvgIcon-DtyE83ul.js} +1 -1
  49. package/_assets/{custom-Gy3d1Q7v.js → custom-IpjkpKYP.js} +1 -1
  50. package/_assets/{data-capture-UKTvYwdc.js → data-capture-BylIfDOD.js} +1 -1
  51. package/_assets/{email-DvKEgj9J.js → email-C_gUvpJ8.js} +1 -1
  52. package/_assets/{embedded-wallet-_WiZLd4T.js → embedded-wallet-BZVHH3C_.js} +1 -1
  53. package/_assets/{emotion-styled.browser.esm-D9bzEYCr.js → emotion-styled.browser.esm-BvfQxvDt.js} +1 -1
  54. package/_assets/{engine-6_t87ask.js → engine-B73Qkzgt.js} +1 -1
  55. package/_assets/{errors-Cpi20Vs-.js → errors-CX9EJ2UZ.js} +1 -1
  56. package/_assets/{estimate-l1-fee-DU4tQjK9.js → estimate-l1-fee-Bjxio48q.js} +1 -1
  57. package/_assets/{execute-BQ_MXUy5.js → execute-BR9GMA2A.js} +2 -2
  58. package/_assets/{features-CK3qf9ZN.js → features-CoryLSMJ.js} +1 -1
  59. package/_assets/{fetchTokenMetadata-BDm74qDJ.js → fetchTokenMetadata-BcVWHlEL.js} +2 -2
  60. package/_assets/{field.styles-C157dq4J.js → field.styles-BX2ce_24.js} +1 -1
  61. package/_assets/{get-ecosystem-wallet-info-B6cEjh69.js → get-ecosystem-wallet-info-BFR9-DCg.js} +1 -1
  62. package/_assets/{getBalance-7z75fs4x.js → getBalance-OP0XWTi2.js} +1 -1
  63. package/_assets/{getNFT-kDrfcrTP.js → getNFT--XquMmAd.js} +1 -1
  64. package/_assets/{getNFT-DHw--2hM.js → getNFT-BsALO_-5.js} +1 -1
  65. package/_assets/{grid.styles-BH-KolVj.js → grid.styles-D3oxiL_A.js} +1 -1
  66. package/_assets/{hashTypedData-CaDI86G1.js → hashTypedData-BZTDP8kP.js} +1 -1
  67. package/_assets/{hashTypedData-BGaOoxNv.js → hashTypedData-CJy6tOpf.js} +1 -1
  68. package/_assets/{in-app-DrqEBa0Y.js → in-app-bTj5LvvL.js} +1 -1
  69. package/_assets/{in-app-wallet-calls-BAuhvyqE.js → in-app-wallet-calls-V54KdLrU.js} +1 -1
  70. package/_assets/{index-SOqtqcZc.js → index-0lnGEb9H.js} +1 -1
  71. package/_assets/{index-Dl52ODHX.js → index-2eCGZaTL.js} +1 -1
  72. package/_assets/{index-DQABJ8K0.js → index-B2t9sa1E.js} +15 -15
  73. package/_assets/{index-DdAqmPp5.js → index-B6qDcfLC.js} +1 -1
  74. package/_assets/{index-ltLkjfx-.js → index-BAAdKhhE.js} +1 -1
  75. package/_assets/{index-jVj4M1cT.js → index-BFqY25SM.js} +1 -1
  76. package/_assets/{index-Z9Zfp-cE.js → index-BQGrMQAe.js} +1 -1
  77. package/_assets/{index--uqlDZSN.js → index-BTO7S5s4.js} +3 -3
  78. package/_assets/{index-wq8907gu.js → index-Bam-2vzo.js} +1 -1
  79. package/_assets/{index-CgxH7rfI.js → index-Bc5nlTSa.js} +1 -1
  80. package/_assets/{index-I5oIRknD.js → index-BfDKCK-b.js} +1 -1
  81. package/_assets/{index-D5jn8moe.js → index-BhMQwy2J.js} +1 -1
  82. package/_assets/{index-Cw_lQM7v.js → index-Bi2VdHZq.js} +3 -3
  83. package/_assets/{index-SJTLPDcF.js → index-Brb4suFu.js} +1 -1
  84. package/_assets/{index-CkMBkM8p.js → index-Bs-rgt8S.js} +1 -1
  85. package/_assets/{index-B2SrFRWu.js → index-BsvoYnWP.js} +1 -1
  86. package/_assets/{index-DmNnfRqv.js → index-Bu1qaX74.js} +1 -1
  87. package/_assets/{index-D5G95QTd.js → index-BzlJrLzv.js} +1 -1
  88. package/_assets/{index-nfyZZM7e.js → index-C8Kc50nN.js} +1 -1
  89. package/_assets/{index-dkB19blA.js → index-C8xBYuq6.js} +1 -1
  90. package/_assets/{index-C5p9LpAs.js → index-CD7rVCS9.js} +3 -3
  91. package/_assets/{index-B8eN0pGm.js → index-CEAo9zba.js} +1 -1
  92. package/_assets/{index-BRyz9uc0.js → index-CJKoD8At.js} +1 -1
  93. package/_assets/{index-BXKEFlSU.js → index-CLKNbQ2Y.js} +1 -1
  94. package/_assets/{index-DYmMl9gi.js → index-CNeTXjRv.js} +2 -2
  95. package/_assets/{index-NZ2EL1Va.js → index-CNfRDyX8.js} +1 -1
  96. package/_assets/{index-D-gAiVLP.js → index-CVzFwkR2.js} +1 -1
  97. package/_assets/{index-BNYb6-ew.js → index-CWbpUhbz.js} +1 -1
  98. package/_assets/{index-BO1L1qum.js → index-Ceqm243m.js} +1 -1
  99. package/_assets/{index-C54FYEkY.js → index-Cf_haBRI.js} +1 -1
  100. package/_assets/{index-DFA-jQh0.js → index-CfuAIPVB.js} +1 -1
  101. package/_assets/{index-Belqsjsz.js → index-CoZGIPvy.js} +2 -2
  102. package/_assets/{index-BjuwD4ba.js → index-Coc88CNs.js} +1 -1
  103. package/_assets/{index-CHtt63_F.js → index-D-JDvnI6.js} +1 -1
  104. package/_assets/{index-DuI636q2.js → index-D8uCQOfi.js} +1 -1
  105. package/_assets/{index-BOFN8WyJ.js → index-D9DKKnsH.js} +1 -1
  106. package/_assets/{index-BcqoTa3F.js → index-DReHody5.js} +1 -1
  107. package/_assets/{index-weRQS8GT.js → index-DSeFRPGN.js} +2 -2
  108. package/_assets/{index-DrKpI5CV.js → index-DV6xJ5R3.js} +1 -1
  109. package/_assets/{index-BUVnfVaQ.js → index-DVvKTSOr.js} +1 -1
  110. package/_assets/{index-sl5wwK2w.js → index-Dz2XpmN8.js} +1 -1
  111. package/_assets/{index-CZ3-3d7g.js → index-PfvTvnFS.js} +1 -1
  112. package/_assets/{index-B1zKymDP.js → index-Tv4r9Lwx.js} +1 -1
  113. package/_assets/{index-eTdhHjMt.js → index-UKtYEQEQ.js} +1 -1
  114. package/_assets/{index-Bn_uaVAp.js → index-YzDw7lnB.js} +1 -1
  115. package/_assets/{index-xKy8W33s.js → index-gDU5HG0M.js} +1 -1
  116. package/_assets/{index-Bi66sVRq.js → index-iQ7iCCBF.js} +1 -1
  117. package/_assets/{index-BvWni_zR.js → index-lkLKW4IC.js} +1 -1
  118. package/_assets/{index-BiduFohT.js → index-md2wV3Vc.js} +1 -1
  119. package/_assets/{index-9sMHHA07.js → index-rkAdeG6n.js} +1 -1
  120. package/_assets/{index-CvCTehG1.js → index-w6ENWwBi.js} +1 -1
  121. package/_assets/{index-C83EM4_2.js → index-zp7bpiif.js} +1 -1
  122. package/_assets/{index.es-x1vwNVlm.js → index.es-Cf1qw100.js} +4 -4
  123. package/_assets/{index.es-CEBpPlnr.js → index.es-D-iJF_vP.js} +1 -1
  124. package/_assets/{index.es-DNO5glcp.js → index.es-D8QRPbHG.js} +1 -1
  125. package/_assets/{localBatchGatewayRequest-BBjlnRHt.js → localBatchGatewayRequest-mmyGx97_.js} +1 -1
  126. package/_assets/{networks-C13WwFhP.js → networks-auA2rGBi.js} +1 -1
  127. package/_assets/{onramp-CT1_T902.js → onramp-DnEfmJx7.js} +1 -1
  128. package/_assets/{openzeppelin-RUjzfcX-.js → openzeppelin-IGdhY6bS.js} +1 -1
  129. package/_assets/{parseNft-BAvhvBPX.js → parseNft-BiFdLjSe.js} +2 -2
  130. package/_assets/{parseSignature-Czi9dqhR.js → parseSignature-J8MdklGZ.js} +1 -1
  131. package/_assets/{parseSignature-BEQJi4cu.js → parseSignature-QJftY_rY.js} +3 -3
  132. package/_assets/{passkeys-Du42r5sF.js → passkeys-D2Xshh23.js} +1 -1
  133. package/_assets/{pay-with-exchange-CrTCM_iG.js → pay-with-exchange-Cu035sqT.js} +1 -1
  134. package/_assets/{qr-overlay-CG31oj34.js → qr-overlay-DYgMyv1Q.js} +1 -1
  135. package/_assets/{receive-DGKxxBjv.js → receive-CsNpdfnW.js} +1 -1
  136. package/_assets/{resolveImplementation-8tujOofo.js → resolveImplementation-DTQI53AV.js} +1 -1
  137. package/_assets/{rpc-sUrtbSyk.js → rpc-KnP3VACd.js} +1 -1
  138. package/_assets/{secp256k1-CvuUaHW6.js → secp256k1-CNuJw6t5.js} +1 -1
  139. package/_assets/{secp256k1-ilN5uvc6.js → secp256k1-D9mIimtB.js} +1 -1
  140. package/_assets/{secp256k1-DgwVchLn.js → secp256k1-HByYfqH7.js} +1 -1
  141. package/_assets/{send-OsD6mp8d.js → send-CMCnYIdY.js} +1 -1
  142. package/_assets/{send-batch-transaction-Dv9gFlBz.js → send-batch-transaction-C1sbN2my.js} +1 -1
  143. package/_assets/{send-eip712-transaction-CInEXRsx.js → send-eip712-transaction-BAJeY5fb.js} +2 -2
  144. package/_assets/{send-gasless-transaction-XefHv_Ab.js → send-gasless-transaction-B44KlVWh.js} +2 -2
  145. package/_assets/{send-transaction-DxKCtc6J.js → send-transaction-DT0LgivN.js} +2 -2
  146. package/_assets/{sendMetaTransaction-DeQMn9dR.js → sendMetaTransaction-etVFqqtW.js} +1 -1
  147. package/_assets/{sendRawTransaction-CcN1UESp.js → sendRawTransaction-CP59S8fY.js} +3 -3
  148. package/_assets/{serializeTransaction-LQsz0xpR.js → serializeTransaction-D82eIJpu.js} +1 -1
  149. package/_assets/{session-proposal-3C-xhn_b.js → session-proposal-CTk25Dr-.js} +1 -1
  150. package/_assets/{session-request-Bi-TCd-V.js → session-request-C1qUxOZG.js} +2 -2
  151. package/_assets/{signing-DTvtfW1Y.js → signing-D2OJn6T_.js} +3 -3
  152. package/_assets/{skeleton.styles-BvHHSxH_.js → skeleton.styles-CEQXSxcg.js} +1 -1
  153. package/_assets/{socials-EGhIb5vA.js → socials-Clt3JNMD.js} +1 -1
  154. package/_assets/{styled-Dsdo2L_S.js → styled-DRUYplNz.js} +1 -1
  155. package/_assets/{swaps-BWOQdX7L.js → swaps-hOclSX6h.js} +1 -1
  156. package/_assets/{thirdweb-Bq55eHvp.js → thirdweb-DH3-POmB.js} +3 -3
  157. package/_assets/{to-serializable-transaction-BdqklZjW.js → to-serializable-transaction-CTdC8nHQ.js} +2 -2
  158. package/_assets/{transactionReceipt-C327RjFG.js → transactionReceipt-u3fxiMLd.js} +1 -1
  159. package/_assets/{transactions-DH_45ulx.js → transactions-CrPkr7No.js} +1 -1
  160. package/_assets/{useCreditPacks-ohAn5pNf.js → useCreditPacks-BKNj_K3V.js} +1 -1
  161. package/_assets/{useImportable-CTHYEKOm.js → useImportable-Dxzd_Mzq.js} +1 -1
  162. package/_assets/{useInfiniteGrid-aYtSr9OS.js → useInfiniteGrid-BJjThIIr.js} +1 -1
  163. package/_assets/{useTheme-DErq2cgw.js → useTheme-Rk_Pnmot.js} +1 -1
  164. package/_assets/{verifyHash-Dmswiq1P.js → verifyHash-GC24awPW.js} +1 -1
  165. package/_assets/{w3m-modal-zYlOO-nX.js → w3m-modal-C_4LJHJd.js} +1 -1
  166. package/_assets/{w3m-modal-CSxNzBHa.js → w3m-modal-D8ODxmhx.js} +1 -1
  167. package/_assets/{wait-for-tx-receipt-DUa6TPtN.js → wait-for-tx-receipt-DxjVHpLa.js} +1 -1
  168. package/_assets/{wallets-D4CLBrkx.js → wallets-CLONLSgR.js} +5 -5
  169. package/_assets/{web-connector-DfuXXolQ.js → web-connector-Bg3R-MOR.js} +3 -3
  170. package/_assets/{writeContract-CuhRFcNu.js → writeContract-B0hqGC9P.js} +1 -1
  171. package/_assets/{zoraTestnet-j-CjVgGQ.js → zoraTestnet-BrHNrHjI.js} +1 -1
  172. package/index.html +11 -11
  173. package/package.json +2 -2
  174. package/_assets/LazyEmoteControls-B9ed76Uk.js +0 -2
@@ -1 +1 @@
1
- import{r as k}from"./index-BV8s6ez1.js";import{az as w}from"./sendRawTransaction-CcN1UESp.js";import{c as I,e as q}from"./hashTypedData-CaDI86G1.js";import"./NetworkUtil-DXqql1Wz.js";import"./sentry-Dx-KuLV3.js";import"./react-BYHuwl8r.js";import"./index-DQABJ8K0.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-BDpbhgX6.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-CP59S8fY.js";import{c as I,e as q}from"./hashTypedData-BZTDP8kP.js";import"./NetworkUtil-DXqql1Wz.js";import"./sentry-Dx-KuLV3.js";import"./react-BYHuwl8r.js";import"./index-B2t9sa1E.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-BDpbhgX6.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};