@dcl/shop 0.1.0-29340836575.commit-42b06a2 → 0.1.0-29341264529.commit-3758d56

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 (193) hide show
  1. package/assets/{AnimatedBackground-BJT6SNQ-.js → AnimatedBackground-fvzwNhlg.js} +3 -3
  2. package/assets/Assets-C2SMY4Wn.js +1 -0
  3. package/assets/{Button-CbIdTKGq.js → Button-BMI2yWqO.js} +1 -1
  4. package/assets/{Cart-B75u5mr6.js → Cart-BzFXsMma.js} +1 -1
  5. package/assets/{CircularProgress-Bb7X2tGG.js → CircularProgress-Cjnyi6sF.js} +1 -1
  6. package/assets/{Collection-BfwKvSKq.js → Collection-DeiH22k9.js} +1 -1
  7. package/assets/{ConstantsUtil-ACwd_9jk.js → ConstantsUtil-DrbbN8Db.js} +1 -1
  8. package/assets/{Creator-BhojoAb6.js → Creator-BRKRY9NQ.js} +1 -1
  9. package/assets/{ExchangeController-cjGmwZkn.js → ExchangeController-BsoPlnUg.js} +1 -1
  10. package/assets/{GetCredits-BIr2IoRx.js → GetCredits-Df0EJOrT.js} +2 -2
  11. package/assets/{HelpersUtil-CKZAJVRF.js → HelpersUtil-CG8lWgZZ.js} +1 -1
  12. package/assets/ImportListings-DFJCBiyn.js +1 -0
  13. package/assets/ItemDetail-DiMc18RR.js +2 -0
  14. package/assets/{LoadMore-XFaiIbYi.js → LoadMore-7qZApSeo.js} +1 -1
  15. package/assets/{MenuItem-dpDClIr2.js → MenuItem-BNFaj4bv.js} +1 -1
  16. package/assets/{MyAssets-DcYeO_rz.js → MyAssets-ChOIdS7f.js} +1 -1
  17. package/assets/{MyFavorites-DADI2Z9R.js → MyFavorites-dpxOF1kK.js} +1 -1
  18. package/assets/{MyPurchases-qcUrS1KZ.js → MyPurchases-Dg0Dl_Ff.js} +1 -1
  19. package/assets/{NetworkUtil-DjnLk0yv.js → NetworkUtil-BI8jZwmc.js} +1 -1
  20. package/assets/{NotFound-0QuXU6Lt.js → NotFound-BplOnkUp.js} +1 -1
  21. package/assets/{RealCheckout-BKfIbLM5.js → RealCheckout-BRvLBHx9.js} +1 -1
  22. package/assets/{ShopFooterInner-Cg4meaND.js → ShopFooterInner-Bk4iHJAH.js} +2 -2
  23. package/assets/{SkeletonCards-D-gEhGqV.js → SkeletonCards-DSpqiDzZ.js} +1 -1
  24. package/assets/{Success-CYidtfRd.js → Success-DznSzYm_.js} +1 -1
  25. package/assets/{SwapController-DV1ke3ir.js → SwapController-DUcM1Ja2.js} +1 -1
  26. package/assets/{TradeService-DwvDhMXL.js → TradeService-CbUgwZEW.js} +1 -1
  27. package/assets/{W3MFrameProviderSingleton-ConR5N7Q.js → W3MFrameProviderSingleton-BS8u2E5h.js} +3 -3
  28. package/assets/{WebCryptoP256-D8wskqBq.js → WebCryptoP256-BNECkcp8.js} +1 -1
  29. package/assets/{basic-BdoC_4UK.js → basic-ExMbnGJU.js} +1 -1
  30. package/assets/{biconomy-BxUL0Sy9.js → biconomy-DE4NulP5.js} +1 -1
  31. package/assets/{browser-D9mB_4O0.js → browser-D_5JuNNR.js} +1 -1
  32. package/assets/{browser-ponyfill-BVDAxqNP.js → browser-ponyfill-ClcxEFdz.js} +1 -1
  33. package/assets/{buy-gasless-bwypVo2l.js → buy-gasless-BCY1xiea.js} +1 -1
  34. package/assets/{buy-CvV1hrMv.js → buy-qZ6pCz4O.js} +1 -1
  35. package/assets/{ccip-FbktUcwa.js → ccip-BItjvNVe.js} +1 -1
  36. package/assets/{ccip-C0q-bt9M.js → ccip-Dc2Sl0Cx.js} +1 -1
  37. package/assets/{chains-DH0bfsas.js → chains-BsN0T6nV.js} +1 -1
  38. package/assets/{collection-Ctw0QAmS.js → collection-DJ02EuIR.js} +1 -1
  39. package/assets/{common-DOWgY5NB.js → common-TfzpxC2l.js} +1 -1
  40. package/assets/{controller-CrdLqteO.js → controller-RTLxVvZ6.js} +2 -2
  41. package/assets/{core-BivmCj3q.js → core-DqO1PhnS.js} +4 -4
  42. package/assets/{custom-D6JXv2u-.js → custom-BYzsjJ7t.js} +1 -1
  43. package/assets/{data-capture-BZosna2M.js → data-capture-DXHtqKgM.js} +1 -1
  44. package/assets/decimals-BKxae-RP.js +1 -0
  45. package/assets/{decimals-Bq0n5t5Q.js → decimals-CapXBEic.js} +1 -1
  46. package/assets/{detectExtension-btmjA4FO.js → detectExtension-C019UiWG.js} +1 -1
  47. package/assets/{email-BW478xE_.js → email-BDtokP8K.js} +1 -1
  48. package/assets/{embedded-wallet-BfM11k_z.js → embedded-wallet-CpQg8tqs.js} +1 -1
  49. package/assets/{emotion-styled.browser.esm-Q1W1tHJu.js → emotion-styled.browser.esm-BhzSSuXb.js} +1 -1
  50. package/assets/{engine-DpbzrHw7.js → engine-BQqxATpN.js} +1 -1
  51. package/assets/{estimate-l1-fee-BL7s-Hdb.js → estimate-l1-fee-D-hSejEm.js} +1 -1
  52. package/assets/eth_estimateGas-Cu6PWoKP.js +1 -0
  53. package/assets/{eth_getStorageAt-BS7O7daL.js → eth_getStorageAt-r25nMq53.js} +1 -1
  54. package/assets/eth_getTransactionCount-IgHrxRqD.js +1 -0
  55. package/assets/{ethereum-DR7YR7E0.js → ethereum-A1QWZFDW.js} +1 -1
  56. package/assets/{ethers-Da-Ao_qK.js → ethers-DXxh-eEm.js} +1 -1
  57. package/assets/{extractIPFS-C1F-i_xX.js → extractIPFS-WJH_KjST.js} +1 -1
  58. package/assets/{features-DV9-iVU4.js → features-Df2C7VrE.js} +1 -1
  59. package/assets/{fetchTokenMetadata-DfwJpo_u.js → fetchTokenMetadata-DQlS8SuK.js} +2 -2
  60. package/assets/{fortmatic-SZ7rzSVw.js → fortmatic-Beo5lxXY.js} +1 -1
  61. package/assets/get-ecosystem-wallet-info-hp9qo9J3.js +1 -0
  62. package/assets/{getBalance-NbINlj75.js → getBalance-D4rmYxNh.js} +2 -2
  63. package/assets/{getInstalledModules-BYXy94_G.js → getInstalledModules-C8Hva7AE.js} +1 -1
  64. package/assets/{getNFT-9EcnOuoJ.js → getNFT-CBawyAHj.js} +1 -1
  65. package/assets/{getNFT-SbHQnmww.js → getNFT-Dfj2l-Ch.js} +2 -2
  66. package/assets/{hashTypedData-Zum136tW.js → hashTypedData-BHGrMNK6.js} +1 -1
  67. package/assets/{hashTypedData-D3a74WBD.js → hashTypedData-CM9F6RUI.js} +1 -1
  68. package/assets/{import-0P_hoA1O.js → import-Cx-OZqAE.js} +1 -1
  69. package/assets/{in-app-wallet-calls-C8Q6y1g4.js → in-app-wallet-calls-Dch1hsg5.js} +1 -1
  70. package/assets/{index-DzTC2ziQ.js → index-42gEBfTi.js} +2 -2
  71. package/assets/{index-DbIP1rx5.js → index-48uPzbtE.js} +1 -1
  72. package/assets/{index-CXOYo7oq.js → index-5E9VLIdh.js} +1 -1
  73. package/assets/{index-CC13YAbK.js → index-9oav_WyD.js} +1 -1
  74. package/assets/{index-DfvjGWsW.js → index-B-jeDoF7.js} +1 -1
  75. package/assets/{index-DpUGdy7y.js → index-B0fp_BTU.js} +1 -1
  76. package/assets/{index-CmaXr0F1.js → index-BAWcl7uQ.js} +1 -1
  77. package/assets/{index-SG0VKsUY.js → index-BBL-hAHr.js} +1 -1
  78. package/assets/{index-OmYojNyX.js → index-BEVNPg7X.js} +3 -3
  79. package/assets/{index-OcdcIxPc.js → index-BOJUx2yW.js} +1 -1
  80. package/assets/{index-IeuP0ICf.js → index-BSCJHKfS.js} +1 -1
  81. package/assets/{index-BhOBwctB.js → index-BXvfWw1i.js} +1 -1
  82. package/assets/{index-CKloXofb.js → index-BZvR1iax.js} +1 -1
  83. package/assets/{index-BMB3NK3d.js → index-Ba8jdmry.js} +1 -1
  84. package/assets/{index-Bc9cpCsq.js → index-Balk147I.js} +2 -2
  85. package/assets/{index-B6GWtvET.js → index-BclUryz1.js} +1 -1
  86. package/assets/{index-DGHmemmg.js → index-Bs_hiiN9.js} +1 -1
  87. package/assets/{index-BXDmfwwr.js → index-Buef3xrK.js} +1 -1
  88. package/assets/{index-CwhfvOxd.js → index-BwpJa7L4.js} +1 -1
  89. package/assets/{index-BxWOVKh-.js → index-BzjsXx68.js} +1 -1
  90. package/assets/{index-CC4qaKWP.js → index-C-qe8hE_.js} +1 -1
  91. package/assets/{index-Cg-lbodg.js → index-CIcEGlWj.js} +1 -1
  92. package/assets/{index-CTmVpGtZ.js → index-CJ21qPJU.js} +1 -1
  93. package/assets/{index-CujIBQsu.js → index-CM1EzVrf.js} +1 -1
  94. package/assets/{index-Dzx0rvp2.js → index-CN6e_bJW.js} +1 -1
  95. package/assets/{index-DwaPQrCP.js → index-CQTErWBm.js} +1 -1
  96. package/assets/{index-CLOIrTtm.js → index-CSZn1axc.js} +3 -3
  97. package/assets/{index-DgVX6Sbk.js → index-CWDqSaNg.js} +1 -1
  98. package/assets/{index-CklijPAR.js → index-CaVzt9Zg.js} +1 -1
  99. package/assets/{index-DswOfqw-.js → index-Cc4Zz6Zy.js} +1 -1
  100. package/assets/{index-CpYMcPqd.js → index-Ccl-BImo.js} +1 -1
  101. package/assets/{index-BaudpEC4.js → index-Ce01n-03.js} +1 -1
  102. package/assets/{index-DkyohT42.js → index-D6jFYOn4.js} +1 -1
  103. package/assets/{index-DxuFKp_j.js → index-DAZ3T5le.js} +1 -1
  104. package/assets/{index-Ba1UDc1K.js → index-DBVEZzhi.js} +1 -1
  105. package/assets/{index-Co3b0xUH.js → index-DGN5055N.js} +1 -1
  106. package/assets/{index-CXkvjnsE.js → index-DHzrcOiN.js} +1 -1
  107. package/assets/{index-Uh870_JT.js → index-DIkXA0Hv.js} +1 -1
  108. package/assets/{index-BlyOq4fH.js → index-DJIAaV2A.js} +1 -1
  109. package/assets/{index-DJgW7J3G.js → index-DUfRRmta.js} +1 -1
  110. package/assets/{index-BHN8EEgL.js → index-Da42Ph0g.js} +2 -2
  111. package/assets/{index-L9ytJsVy.js → index-DekR2YhX.js} +1 -1
  112. package/assets/{index-Cfnh9CTE.js → index-Dit_Tadt.js} +1 -1
  113. package/assets/{index-MZ922Rr9.js → index-Dt4XXlAo.js} +1 -1
  114. package/assets/{index-6hTlwdzk.js → index-DzTAB8XM.js} +1 -1
  115. package/assets/{index-B9Fw4Ep3.js → index-FyW6lWdg.js} +1 -1
  116. package/assets/{index-BTbIbxLi.js → index-H3dPSebS.js} +1 -1
  117. package/assets/{index-DViaNBsJ.js → index-K-cpVYNW.js} +1 -1
  118. package/assets/{index-BSJ14YsY.js → index-KXOxVBmY.js} +1 -1
  119. package/assets/{index-C0xdJx_z.js → index-L5rl4tyv.js} +39 -39
  120. package/assets/{index-D5OY3XFL.js → index-Py7lPUfJ.js} +1 -1
  121. package/assets/{index-1xS0Bm4O.js → index-VxjWNgq4.js} +1 -1
  122. package/assets/{index-iCeMrK9M.js → index-Z24VwtH-.js} +1 -1
  123. package/assets/{index-Db4LtK6M.js → index-aayYBIgE.js} +1 -1
  124. package/assets/{index-DC4HR9fs.js → index-g06cE3ON.js} +1 -1
  125. package/assets/{index-BhrRPEpc.js → index-mRwFYme8.js} +2 -2
  126. package/assets/{index-CpKwBU2L.js → index-r-eIHibn.js} +1 -1
  127. package/assets/index-r9qogMtw.js +1 -0
  128. package/assets/{index-DOaiFAxt.js → index-ue8m9AA_.js} +1 -1
  129. package/assets/{index.es-dnnBw-vJ.js → index.es-BpB0a1Th.js} +1 -1
  130. package/assets/{index.es-DCNSZRPv.js → index.es-Dfabzma5.js} +4 -4
  131. package/assets/{index.es-DnmenyEf.js → index.es-DhN91Wpt.js} +1 -1
  132. package/assets/{localBatchGatewayRequest-CDXawD1v.js → localBatchGatewayRequest-k-UZ-HMO.js} +1 -1
  133. package/assets/{mana-rate-N-v6x0qz.js → mana-rate-GO2pCGLs.js} +1 -1
  134. package/assets/{native-CRwKvIFQ.js → native-B9_hMdpy.js} +1 -1
  135. package/assets/network-QssBB6oI.js +1 -0
  136. package/assets/{networks-CzZJ25bj.js → networks-Cf-N-9Xq.js} +1 -1
  137. package/assets/{onramp-CESgld-D.js → onramp-BGEfyVAt.js} +1 -1
  138. package/assets/{openzeppelin-DixW8ZNo.js → openzeppelin-Dqbxfcec.js} +1 -1
  139. package/assets/{ownerOf-Cn9nz5bP.js → ownerOf-CljeAL21.js} +1 -1
  140. package/assets/{parseNft-f2X47e9d.js → parseNft-BC_5oKiz.js} +2 -2
  141. package/assets/{parseSignature-CppIaRA5.js → parseSignature-CtI5iMV2.js} +1 -1
  142. package/assets/{parseSignature-McHpEr0n.js → parseSignature-V_kdzkxI.js} +3 -3
  143. package/assets/{pay-with-exchange-Bz9JnKT7.js → pay-with-exchange-CZQdYVAY.js} +1 -1
  144. package/assets/{qr-overlay-BZ2ZuTji.js → qr-overlay-BuM1P1vl.js} +3 -3
  145. package/assets/{react-CsaE3SwW.js → react-CQ5qhqs6.js} +1 -1
  146. package/assets/{receive-npbDk4pC.js → receive-DmQKXpZf.js} +1 -1
  147. package/assets/{resolveImplementation-BlUu62GJ.js → resolveImplementation-Bv53gP5B.js} +1 -1
  148. package/assets/{rpc-DdACnuB3.js → rpc-BMKNIejp.js} +1 -1
  149. package/assets/{secp256k1-TbDPKKLQ.js → secp256k1--hQ4zJbr.js} +1 -1
  150. package/assets/{secp256k1-D3x8o48L.js → secp256k1-D-BnaYDw.js} +1 -1
  151. package/assets/{secp256k1-CZR5Fxz4.js → secp256k1-D6E_Hi1m.js} +1 -1
  152. package/assets/{send-batch-transaction-wv1jzgxZ.js → send-batch-transaction-Dz6j3z1q.js} +1 -1
  153. package/assets/{send-eip712-transaction-BQ1Jh0dj.js → send-eip712-transaction-DjWFMOzt.js} +2 -2
  154. package/assets/{send-gasless-transaction-Cxum3V3W.js → send-gasless-transaction-CGFByKRT.js} +2 -2
  155. package/assets/{send-cWauCK4u.js → send-qU9iYsqh.js} +1 -1
  156. package/assets/{sendRawTransaction-CuIcV-IH.js → sendRawTransaction-B7PaRJhQ.js} +3 -3
  157. package/assets/{serializeTransaction-CTMmG7wg.js → serializeTransaction-BKFBSxXm.js} +1 -1
  158. package/assets/{session-proposal-DlfPHqdx.js → session-proposal-B5Mu6CaX.js} +1 -1
  159. package/assets/{session-request-Bu2Ik6Mh.js → session-request-C5RIloQJ.js} +2 -2
  160. package/assets/{sha256-BUe9Q0c_.js → sha256-CzoB8HGh.js} +1 -1
  161. package/assets/{signing-B3Sjg_g9.js → signing-Ck4I48Ky.js} +5 -5
  162. package/assets/{socials-Bk9elnPL.js → socials-CjlOiNOa.js} +1 -1
  163. package/assets/{swaps-beoCSNlb.js → swaps-DUV5kVh5.js} +1 -1
  164. package/assets/{thirdweb-B4qZM6uq.js → thirdweb-46ahlzaq.js} +3 -3
  165. package/assets/{totalSupply-DdpNCyrm.js → totalSupply-juJGV40_.js} +1 -1
  166. package/assets/{trade-encoding-Dvpuinzl.js → trade-encoding-BnwDZb1r.js} +1 -1
  167. package/assets/{transactionReceipt-B73S0_Of.js → transactionReceipt-CjIrYUrd.js} +1 -1
  168. package/assets/{transactions-DtrS-H7Q.js → transactions-C4k8y4fS.js} +1 -1
  169. package/assets/{useInfiniteGrid-D56AG3-z.js → useInfiniteGrid-BA-VoNAn.js} +1 -1
  170. package/assets/{utils-B4mWdtoU.js → utils-CebgHLxz.js} +1 -1
  171. package/assets/{verifyHash-BJmKXlOz.js → verifyHash-CRPE73-q.js} +1 -1
  172. package/assets/{w3m-modal-BUYhQlp4.js → w3m-modal-CSsFueoj.js} +1 -1
  173. package/assets/{w3m-modal-Cy1dZm26.js → w3m-modal-DlKBtHap.js} +1 -1
  174. package/assets/{wait-for-tx-receipt-DccLQgL9.js → wait-for-tx-receipt-C6eRPabX.js} +1 -1
  175. package/assets/{wallet-kind-Bl1SYx87.js → wallet-kind-BiP1tBJS.js} +1 -1
  176. package/assets/{wallets-D-cw5_G0.js → wallets-DNThg_Tf.js} +6 -6
  177. package/assets/{web-connector-bpLkDDIf.js → web-connector-Bsz2goeK.js} +3 -3
  178. package/assets/{writeContract-TJzHuhGT.js → writeContract-CQyj5ohz.js} +1 -1
  179. package/assets/{zora-sepolia-C6KXT9LD.js → zora-sepolia-BXcKZl5q.js} +1 -1
  180. package/assets/{zoraTestnet-DYTax4Wr.js → zoraTestnet-D4vOnerF.js} +1 -1
  181. package/index.html +8 -8
  182. package/package.json +2 -2
  183. package/assets/Assets-BbxH_ajc.js +0 -1
  184. package/assets/FilterBar-SMt4LPR3.js +0 -1
  185. package/assets/ImportListings-DHGrAPrQ.js +0 -1
  186. package/assets/ItemDetail-CST4l0Yr.js +0 -2
  187. package/assets/Market-Bi1QC-8t.js +0 -1
  188. package/assets/decimals-LEmdHeeV.js +0 -1
  189. package/assets/eth_estimateGas-DxarRY3q.js +0 -1
  190. package/assets/eth_getTransactionCount-DxKpHM0b.js +0 -1
  191. package/assets/get-ecosystem-wallet-info-DQ6CC5qV.js +0 -1
  192. package/assets/index-BfX0Iuek.js +0 -1
  193. package/assets/network-CNUk9d-U.js +0 -1
@@ -1 +1 @@
1
- import{r as k}from"./index-BV8s6ez1.js";import{az as w}from"./sendRawTransaction-CuIcV-IH.js";import{c as I,e as q}from"./hashTypedData-Zum136tW.js";import"./NetworkUtil-DjnLk0yv.js";import"./ethers-Da-Ao_qK.js";import"./react-CsaE3SwW.js";import"./index-C0xdJx_z.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-B7PaRJhQ.js";import{c as I,e as q}from"./hashTypedData-BHGrMNK6.js";import"./NetworkUtil-BI8jZwmc.js";import"./ethers-DXxh-eEm.js";import"./react-CQ5qhqs6.js";import"./index-L5rl4tyv.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};