@dcl/shop 0.1.0-29342337543.commit-e62debf → 0.1.0-29406413150.commit-a91cd9f

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 (164) hide show
  1. package/assets/{AnimatedBackground-De9Qp4KR.js → AnimatedBackground-BnwRfsiv.js} +3 -3
  2. package/assets/{Assets-1bNeklxr.js → Assets-D-a9hqWT.js} +1 -1
  3. package/assets/{Button-u4Y_U_Lz.js → Button-Dywi_vIa.js} +2 -2
  4. package/assets/{Cart-gIn2SSad.js → Cart-DVjQHvBQ.js} +1 -1
  5. package/assets/{CircularProgress-j19iz-El.js → CircularProgress-og3LyasF.js} +3 -3
  6. package/assets/{Collection-BZksCNg9.js → Collection-CbMYzkC9.js} +1 -1
  7. package/assets/{Creator-pYPGRDX3.js → Creator-DQJPFH3p.js} +1 -1
  8. package/assets/{ExchangeController-C6LdMnhd.js → ExchangeController-qNcM_tdT.js} +1 -1
  9. package/assets/{GetCredits-BFYRErFS.js → GetCredits-CrQ1Yqnd.js} +2 -2
  10. package/assets/{HelpersUtil-BMey9OQC.js → HelpersUtil-DwV51RvI.js} +1 -1
  11. package/assets/{ImportListings-BJS8ANY1.js → ImportListings-CM9NUDqh.js} +1 -1
  12. package/assets/{ItemDetail-BfnmM6Wd.js → ItemDetail-D8tmZfcC.js} +2 -2
  13. package/assets/{MenuItem-ynqlyh9y.js → MenuItem-DVXN6fPs.js} +2 -2
  14. package/assets/{MyAssets-n058kEFs.js → MyAssets-DrTGapSq.js} +1 -1
  15. package/assets/{MyFavorites-D2YHdh9H.js → MyFavorites-DPxWR9i_.js} +1 -1
  16. package/assets/{MyPurchases-Cj9XFiMA.js → MyPurchases-UlV2Ejo9.js} +1 -1
  17. package/assets/{NotFound-30ZleK4O.js → NotFound-dQCK8o3W.js} +1 -1
  18. package/assets/{RealCheckout-DdB_2aXB.js → RealCheckout-D9TYwWxz.js} +1 -1
  19. package/assets/{ShopFooterInner-C2m2Dyez.js → ShopFooterInner-Biy4Ywkz.js} +3 -3
  20. package/assets/Success-Bad6c-Jo.js +1 -0
  21. package/assets/{SwapController-2gLg4R4h.js → SwapController-CQZXQ4Q5.js} +1 -1
  22. package/assets/{TradeService-CxOFjzRK.js → TradeService-DuSSbU0G.js} +1 -1
  23. package/assets/{W3MFrameProviderSingleton-BwXooI70.js → W3MFrameProviderSingleton-B6_3Zs6I.js} +3 -3
  24. package/assets/{WebCryptoP256-Dtj06UwI.js → WebCryptoP256-CMFEoyaK.js} +1 -1
  25. package/assets/{basic-Dq2uHR0o.js → basic-Dq5ood5R.js} +1 -1
  26. package/assets/{biconomy-h_5HWh_l.js → biconomy-C3pzeqHG.js} +1 -1
  27. package/assets/{buy-KvjWmHql.js → buy-BXsYo32e.js} +1 -1
  28. package/assets/{buy-gasless-DuWzXmm_.js → buy-gasless-CB45oj-8.js} +1 -1
  29. package/assets/{ccip-nHQJrzNM.js → ccip-C2qRMCzb.js} +1 -1
  30. package/assets/{ccip-9mCO1EZs.js → ccip-zOJ8fkH-.js} +1 -1
  31. package/assets/{collection-ae9B_wBl.js → collection-B34IwUC5.js} +1 -1
  32. package/assets/{controller-Bm814olt.js → controller-0cnw-xyq.js} +2 -2
  33. package/assets/{core-2GzKX_V0.js → core-CRifUzKO.js} +4 -4
  34. package/assets/{custom-Dg9059mJ.js → custom-BRRAon-U.js} +1 -1
  35. package/assets/{data-capture-Cs7uNAyj.js → data-capture-cSGzOBZI.js} +1 -1
  36. package/assets/decimals-B19-5xj3.js +1 -0
  37. package/assets/{decimals-BozxDRnr.js → decimals-DFdgeb5g.js} +1 -1
  38. package/assets/{detectExtension-BcudqjHr.js → detectExtension-D3QIkn81.js} +1 -1
  39. package/assets/{email-CkxGvJ7n.js → email-Bt1Wqrpu.js} +1 -1
  40. package/assets/{embedded-wallet-DCvtWtAo.js → embedded-wallet-BAvMzBcs.js} +1 -1
  41. package/assets/{emotion-styled.browser.esm-aJQM59uX.js → emotion-styled.browser.esm-DeLQmdM_.js} +1 -1
  42. package/assets/{engine-DJykDFYI.js → engine-C-4f510Q.js} +1 -1
  43. package/assets/{estimate-l1-fee-BHy3gQeo.js → estimate-l1-fee-TD6Eeaga.js} +1 -1
  44. package/assets/{eth_estimateGas-4echzN6X.js → eth_estimateGas-c0ilyWBq.js} +1 -1
  45. package/assets/{eth_getStorageAt-gLuffVw8.js → eth_getStorageAt-CiqYqck8.js} +1 -1
  46. package/assets/{eth_getTransactionCount-CPFlNa2B.js → eth_getTransactionCount-CFplLmOA.js} +1 -1
  47. package/assets/{extractIPFS-BuYfN-sn.js → extractIPFS-COa8X7sF.js} +1 -1
  48. package/assets/{features-C0YNwzWv.js → features-7-b4Om7J.js} +1 -1
  49. package/assets/{fetchTokenMetadata-DPimZ4m_.js → fetchTokenMetadata-BTszSGhS.js} +2 -2
  50. package/assets/{get-ecosystem-wallet-info-CgRHuJjM.js → get-ecosystem-wallet-info-T0L6dsNV.js} +1 -1
  51. package/assets/{getBalance-CRqNHI0S.js → getBalance-BArf24DT.js} +1 -1
  52. package/assets/{getInstalledModules-QJB7fy_4.js → getInstalledModules-CzBtswDW.js} +1 -1
  53. package/assets/{getNFT-D8bkf2cV.js → getNFT-CmB-EUw9.js} +2 -2
  54. package/assets/{getNFT-D0APw_WL.js → getNFT-iLCDuS_Q.js} +1 -1
  55. package/assets/{hashTypedData-BaiVsItZ.js → hashTypedData-CoXLJrY2.js} +1 -1
  56. package/assets/{hashTypedData-C3gUj3RL.js → hashTypedData-Duzplq5M.js} +1 -1
  57. package/assets/{import-DI2r0vcY.js → import-1qZmk-ve.js} +1 -1
  58. package/assets/{in-app-wallet-calls-Bb3GeV4R.js → in-app-wallet-calls-B7ySKt0n.js} +1 -1
  59. package/assets/{index-BObGhUwb.js → index-BBQ72VSQ.js} +1 -1
  60. package/assets/{index-CdYVhV-8.js → index-BGGbgdSQ.js} +1 -1
  61. package/assets/{index-B_Ooxv1v.js → index-BHjzvMc_.js} +1 -1
  62. package/assets/{index-Cpng5QLO.js → index-BTusn-cp.js} +1 -1
  63. package/assets/{index-DvAy35iS.js → index-BW6d6BbH.js} +28 -28
  64. package/assets/{index-BFep7uQJ.js → index-BZDBkXn3.js} +1 -1
  65. package/assets/{index-DL8xJTzj.js → index-BdDGInRO.js} +1 -1
  66. package/assets/{index-BGmSS9--.js → index-BdGF7Khq.js} +1 -1
  67. package/assets/{index-1EmEZY58.js → index-Be9jJ2sK.js} +1 -1
  68. package/assets/{index-D03fBLru.js → index-BftIY8GG.js} +1 -1
  69. package/assets/{index-BeV9LW2a.js → index-Bh_U9TSe.js} +1 -1
  70. package/assets/{index-CEEwIfoI.js → index-BhrfOLeY.js} +1 -1
  71. package/assets/{index-BplwFt6_.js → index-Bn1ikbQg.js} +3 -3
  72. package/assets/{index-B96emzZW.js → index-BnIGy6dE.js} +1 -1
  73. package/assets/{index-KbyFXy1r.js → index-Bo1FAQNs.js} +1 -1
  74. package/assets/{index-8qREWc4C.js → index-BrsEF-BM.js} +1 -1
  75. package/assets/{index-BJcsuoFJ.js → index-BvrzCkDl.js} +2 -2
  76. package/assets/{index-CxNuM1Pe.js → index-C0dr4jyr.js} +1 -1
  77. package/assets/{index-CmnC7TX_.js → index-C1X_Y6wr.js} +3 -3
  78. package/assets/{index-zdwEHMJV.js → index-C2WEBoZJ.js} +1 -1
  79. package/assets/{index-DoxdT7ta.js → index-C344ardt.js} +1 -1
  80. package/assets/{index-DQ-JVIh_.js → index-C3h4AdEY.js} +1 -1
  81. package/assets/{index-dh70gAb1.js → index-C6WtN49a.js} +1 -1
  82. package/assets/{index-V84TKWVc.js → index-C92KiAOk.js} +1 -1
  83. package/assets/{index-B_vGP-LB.js → index-CTabxOqV.js} +1 -1
  84. package/assets/{index-CGu_c1E3.js → index-CbH9kfUc.js} +1 -1
  85. package/assets/{index-DgnsXd1K.js → index-Ce0_-pFA.js} +1 -1
  86. package/assets/{index-Cm0Bd7M5.js → index-Cpy2Et_p.js} +1 -1
  87. package/assets/{index-CUDTJiCv.js → index-CuI-U7nJ.js} +1 -1
  88. package/assets/{index-sdenODYs.js → index-Cw9pJ_Ha.js} +1 -1
  89. package/assets/{index-BYJZLO0l.js → index-CwzaSU41.js} +1 -1
  90. package/assets/{index-7vBeJ6h0.js → index-Cz2F4NKm.js} +1 -1
  91. package/assets/{index-kJ2Om4DY.js → index-D-ixZxf4.js} +1 -1
  92. package/assets/{index-DXpWAbYJ.js → index-D36yN0Bf.js} +1 -1
  93. package/assets/{index-C18kHZS6.js → index-D3awFASU.js} +1 -1
  94. package/assets/{index-CTrKkOgC.js → index-D3y-kuFx.js} +1 -1
  95. package/assets/{index-B33BKn4f.js → index-DCd0GVdP.js} +2 -2
  96. package/assets/{index-DxTXRx_1.js → index-DUM-eWFe.js} +1 -1
  97. package/assets/{index-CZx6HzWG.js → index-DfrLYsxF.js} +1 -1
  98. package/assets/{index-B9VcNONK.js → index-Di33sB2B.js} +1 -1
  99. package/assets/{index-DYbx7tio.js → index-DnTfBax2.js} +1 -1
  100. package/assets/{index-D_4bro34.js → index-DsCvbsUU.js} +1 -1
  101. package/assets/{index-CZE9iM0w.js → index-DurG2hyR.js} +1 -1
  102. package/assets/{index-BJI9-eQ3.js → index-MbmnIks7.js} +1 -1
  103. package/assets/{index-2ABFVZj7.js → index-ScY6mRRU.js} +1 -1
  104. package/assets/{index-CS6NyySB.js → index-T3Ioic-d.js} +1 -1
  105. package/assets/{index-4fviM57_.js → index-TyqRL5ux.js} +1 -1
  106. package/assets/{index-BVmP09nN.js → index-UB1Y0F7Y.js} +2 -2
  107. package/assets/{index-BXZNWPQo.js → index-cziX_kqw.js} +1 -1
  108. package/assets/{index-UUD5CaBO.js → index-euu_zF1P.js} +1 -1
  109. package/assets/{index-CWRdMktG.js → index-hlRGU2X9.js} +1 -1
  110. package/assets/{index-Cedadicw.js → index-hzzqz-oN.js} +1 -1
  111. package/assets/{index-C2KSBy5B.js → index-sdNj_XXp.js} +1 -1
  112. package/assets/{index.es-DkJWnksP.js → index.es-1POdP2bT.js} +1 -1
  113. package/assets/{index.es-COvtwZfe.js → index.es-B3cqCuuu.js} +1 -1
  114. package/assets/{index.es-BM0IDFYO.js → index.es-DwtUIInR.js} +4 -4
  115. package/assets/{localBatchGatewayRequest-BX9seGap.js → localBatchGatewayRequest-UGxosVgP.js} +1 -1
  116. package/assets/{mana-rate-BmhpEynZ.js → mana-rate-DbXjP8PT.js} +1 -1
  117. package/assets/network-CnO47bm0.js +1 -0
  118. package/assets/{networks-D5uQp84i.js → networks-zejNBfN0.js} +1 -1
  119. package/assets/{onramp-BcSAlX0-.js → onramp-uaAenXK_.js} +1 -1
  120. package/assets/{openzeppelin-BNaf3Kr3.js → openzeppelin-CNJo1xvT.js} +1 -1
  121. package/assets/{ownerOf-3r-8WATC.js → ownerOf-ClGvWr7v.js} +1 -1
  122. package/assets/{parseNft-Bc_K1PCu.js → parseNft-Dmi4dKW_.js} +2 -2
  123. package/assets/{parseSignature-fjZSf4e-.js → parseSignature-C2I1o9hQ.js} +3 -3
  124. package/assets/{parseSignature-C6RtDqHk.js → parseSignature-DqHdoBSK.js} +1 -1
  125. package/assets/{pay-with-exchange-DWMiqDBV.js → pay-with-exchange-CZLFCtg1.js} +1 -1
  126. package/assets/{qr-overlay-BevbfqIg.js → qr-overlay-CLbuZX6n.js} +1 -1
  127. package/assets/{receive-C3dfyqOo.js → receive-lRcrhl2d.js} +1 -1
  128. package/assets/{resolveImplementation-DXxkRbEQ.js → resolveImplementation-CSXfyN2u.js} +1 -1
  129. package/assets/{rpc-CUZ4dR7x.js → rpc-B07HiX5J.js} +1 -1
  130. package/assets/{secp256k1-Bd5EX38Z.js → secp256k1-BiQ03web.js} +1 -1
  131. package/assets/{secp256k1-Cf36qiOc.js → secp256k1-CbZoHEaI.js} +1 -1
  132. package/assets/{secp256k1-D3J1vgG3.js → secp256k1-CwJslARV.js} +1 -1
  133. package/assets/{send-C-bE7JsL.js → send-BViJVaUq.js} +1 -1
  134. package/assets/{send-batch-transaction-x2iJTEAe.js → send-batch-transaction-CxjHPlkH.js} +1 -1
  135. package/assets/{send-eip712-transaction-s2GicVHp.js → send-eip712-transaction-BP9m4G9l.js} +2 -2
  136. package/assets/{send-gasless-transaction-CZ-7RvQf.js → send-gasless-transaction-ChxzGYfX.js} +2 -2
  137. package/assets/{sendRawTransaction-DDaLAHUQ.js → sendRawTransaction-BN4kGE5P.js} +3 -3
  138. package/assets/{serializeTransaction-9vMytB_d.js → serializeTransaction-BcmfsEg1.js} +1 -1
  139. package/assets/{session-proposal-RKf_pb2T.js → session-proposal-BRstm0bQ.js} +1 -1
  140. package/assets/{session-request-D7IOp8Re.js → session-request-C4lEtLnN.js} +2 -2
  141. package/assets/{sha256-B7mufoJi.js → sha256-DkvO414S.js} +1 -1
  142. package/assets/{signing-2DKT9LNu.js → signing-D3pU2o1I.js} +4 -4
  143. package/assets/{socials-L3VYxM6J.js → socials-DXBXCHxv.js} +1 -1
  144. package/assets/{swaps-CRa3_MsX.js → swaps-4ySgWDaa.js} +1 -1
  145. package/assets/{thirdweb-CG-tYItw.js → thirdweb-DjdWszGQ.js} +3 -3
  146. package/assets/{totalSupply-ppOlQsps.js → totalSupply-Cp-tbUyO.js} +1 -1
  147. package/assets/{trade-encoding-CmkOOQWS.js → trade-encoding-CgWHvMsc.js} +1 -1
  148. package/assets/{transactionReceipt-CGXAX_4G.js → transactionReceipt-Y7v69biI.js} +1 -1
  149. package/assets/{transactions-DqEiSEGD.js → transactions-DHEcEI8t.js} +1 -1
  150. package/assets/{useInfiniteGrid-DBBDC6CU.js → useInfiniteGrid-Dvh83G5j.js} +1 -1
  151. package/assets/{verifyHash-CJuroX1V.js → verifyHash-DYm9NRaH.js} +1 -1
  152. package/assets/{w3m-modal-SC-8Yppy.js → w3m-modal-BJW5AFLD.js} +1 -1
  153. package/assets/{w3m-modal-BGeUUrbk.js → w3m-modal-DO45d0QA.js} +1 -1
  154. package/assets/{wait-for-tx-receipt-BNoaz4x5.js → wait-for-tx-receipt-rpydharh.js} +1 -1
  155. package/assets/{wallet-kind-D56TeB0g.js → wallet-kind-C_qy0E-X.js} +1 -1
  156. package/assets/{wallets-C3sYPWeN.js → wallets-Bl61iVPq.js} +6 -6
  157. package/assets/{web-connector-Ci6UxTsz.js → web-connector-BrGZ8Hxc.js} +3 -3
  158. package/assets/{writeContract-DjDZhUiF.js → writeContract-sz1xzStO.js} +1 -1
  159. package/assets/{zoraTestnet-DecFal9Q.js → zoraTestnet-U_QF4fFv.js} +1 -1
  160. package/index.html +8 -8
  161. package/package.json +2 -2
  162. package/assets/Success-DKBdybry.js +0 -1
  163. package/assets/decimals-CmjPenXw.js +0 -1
  164. package/assets/network-CirTws7i.js +0 -1
@@ -1 +1 @@
1
- import{r as k}from"./index-BV8s6ez1.js";import{az as w}from"./sendRawTransaction-DDaLAHUQ.js";import{c as I,e as q}from"./hashTypedData-BaiVsItZ.js";import"./NetworkUtil-BI8jZwmc.js";import"./ethers-DXxh-eEm.js";import"./react-CQ5qhqs6.js";import"./index-DvAy35iS.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-BN4kGE5P.js";import{c as I,e as q}from"./hashTypedData-CoXLJrY2.js";import"./NetworkUtil-BI8jZwmc.js";import"./ethers-DXxh-eEm.js";import"./react-CQ5qhqs6.js";import"./index-BW6d6BbH.js";const v=()=>"9.1.0",C=t=>t.toString(16).padStart(2,"0"),R=t=>{const e=new Uint8Array(t/2);return window.crypto.getRandomValues(e),Array.from(e,C).join("")},E=()=>typeof window<"u"?R(10):new Date().getTime().toString(36);class g{}g.makeRequest=(t,e)=>({id:E(),method:t,params:e,env:{sdkVersion:v()}});g.makeResponse=(t,e,s)=>({id:t,success:!0,version:s,data:e});g.makeErrorResponse=(t,e,s)=>({id:t,success:!1,error:e,version:s});var r;(function(t){t.sendTransactions="sendTransactions",t.rpcCall="rpcCall",t.getChainInfo="getChainInfo",t.getSafeInfo="getSafeInfo",t.getTxBySafeTxHash="getTxBySafeTxHash",t.getSafeBalances="getSafeBalances",t.signMessage="signMessage",t.signTypedMessage="signTypedMessage",t.getEnvironmentInfo="getEnvironmentInfo",t.getOffChainSignature="getOffChainSignature",t.requestAddressBook="requestAddressBook",t.wallet_getPermissions="wallet_getPermissions",t.wallet_requestPermissions="wallet_requestPermissions"})(r||(r={}));var f;(function(t){t.requestAddressBook="requestAddressBook"})(f||(f={}));class H{constructor(e=null,s=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:a,data:n,source:i})=>{const o=!n,l=!this.isServer&&i===window.parent,u=typeof n.version<"u"&&parseInt(n.version.split(".")[0]),B=typeof u=="number"&&u>=1;let y=!0;return Array.isArray(this.allowedOrigins)&&(y=this.allowedOrigins.find(P=>P.test(a))!==void 0),!o&&l&&B&&y},this.logIncomingMessage=a=>{console.info(`Safe Apps SDK v1: A message was received from origin ${a.origin}. `,a.data)},this.onParentMessage=a=>{this.isValidMessage(a)&&(this.debugMode&&this.logIncomingMessage(a),this.handleIncomingMessage(a.data))},this.handleIncomingMessage=a=>{const{id:n}=a,i=this.callbacks.get(n);i&&(i(a),this.callbacks.delete(n))},this.send=(a,n)=>{const i=g.makeRequest(a,n);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(i,"*"),new Promise((o,l)=>{this.callbacks.set(i.id,u=>{if(!u.success){l(new Error(u.error));return}o(u)})})},this.allowedOrigins=e,this.debugMode=s,this.isServer||window.addEventListener("message",this.onParentMessage)}}const S=t=>typeof t=="object"&&t!=null&&"domain"in t&&"types"in t&&"message"in t;var m=k();class A{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(r.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const s={message:e};return(await this.communicator.send(r.signMessage,s)).data}async signTypedMessage(e){if(!S(e))throw new Error("Invalid typed data");return(await this.communicator.send(r.signTypedMessage,{typedData:e})).data}async send({txs:e,params:s}){if(!e||!e.length)throw new Error("No transactions were passed");const a={txs:e,params:s};return(await this.communicator.send(r.sendTransactions,a)).data}}const c={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"},h={defaultBlockParam:(t="latest")=>t,returnFullTxObjectParam:(t=!1)=>t,blockNumberToHex:t=>Number.isInteger(t)?`0x${t.toString(16)}`:t};class O{constructor(e){this.communicator=e,this.call=this.buildRequest({call:c.eth_call,formatters:[null,h.defaultBlockParam]}),this.getBalance=this.buildRequest({call:c.eth_getBalance,formatters:[null,h.defaultBlockParam]}),this.getCode=this.buildRequest({call:c.eth_getCode,formatters:[null,h.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:c.eth_getStorageAt,formatters:[null,h.blockNumberToHex,h.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:c.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:c.eth_getBlockByHash,formatters:[null,h.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:c.eth_getBlockByNumber,formatters:[h.blockNumberToHex,h.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:c.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:c.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:c.eth_getTransactionCount,formatters:[null,h.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:c.eth_gasPrice}),this.getEstimateGas=s=>this.buildRequest({call:c.eth_estimateGas})([s]),this.setSafeSettings=this.buildRequest({call:c.safe_setSettings})}buildRequest(e){const{call:s,formatters:a}=e;return async n=>{a&&Array.isArray(n)&&a.forEach((l,u)=>{l&&(n[u]=l(n[u]))});const i={call:s,params:n||[]};return(await this.communicator.send(r.rpcCall,i)).data}}}const x="0x1626ba7e",V="0x20c13b0b",p=4001;class d extends Error{constructor(e,s,a){super(e),this.code=s,this.data=a,Object.setPrototypeOf(this,d.prototype)}}class _{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(r.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new d("Permissions request is invalid",p);try{return(await this.communicator.send(r.wallet_requestPermissions,e)).data}catch{throw new d("Permissions rejected",p)}}isPermissionRequestValid(e){return e.every(s=>typeof s=="object"?Object.keys(s).every(a=>!!Object.values(f).includes(a)):!1)}}const b=(t,e)=>e.some(s=>s.parentCapability===t),M=()=>(t,e,s)=>{const a=s.value;return s.value=async function(){const n=new _(this.communicator);let i=await n.getPermissions();if(b(e,i)||(i=await n.requestPermissions([{[e]:{}}])),!b(e,i))throw new d("Permissions rejected",p);return a.apply(this)},s};var j=function(t,e,s,a){var n=arguments.length,i=n<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,s):a,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,s,a);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(i=(n<3?o(i):n>3?o(e,s,i):o(e,s))||i);return n>3&&i&&Object.defineProperty(e,s,i),i};class T{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(r.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(r.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(r.getSafeBalances,{currency:e})).data}async check1271Signature(e,s="0x"){const a=await this.getInfo(),n=w({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,s]}),i={call:c.eth_call,params:[{to:a.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(r.rpcCall,i)).data.slice(0,10).toLowerCase()===x}catch{return!1}}async check1271SignatureBytes(e,s="0x"){const a=await this.getInfo(),n=w({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,s]}),i={call:c.eth_call,params:[{to:a.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(r.rpcCall,i)).data.slice(0,10).toLowerCase()===V}catch{return!1}}calculateMessageHash(e){return I(e)}calculateTypedMessageHash(e){const s=typeof e.domain.chainId=="object"?e.domain.chainId.toNumber():Number(e.domain.chainId);let a=e.primaryType;if(!a){const n=Object.values(e.types),i=Object.keys(e.types).filter(o=>n.every(l=>l.every(({type:u})=>u.replace("[","").replace("]","")!==o)));if(i.length===0||i.length>1)throw new Error("Please specify primaryType");a=i[0]}return q({message:e.message,domain:{...e.domain,chainId:s,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt},types:e.types,primaryType:a})}async getOffChainSignature(e){return(await this.communicator.send(r.getOffChainSignature,e)).data}async isMessageSigned(e,s="0x"){let a;if(typeof e=="string"&&(a=async()=>{const n=this.calculateMessageHash(e);return await this.isMessageHashSigned(n,s)}),S(e)&&(a=async()=>{const n=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(n,s)}),a)return await a();throw new Error("Invalid message type")}async isMessageHashSigned(e,s="0x"){const a=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const n of a)if(await n(e,s))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(r.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(r.requestAddressBook,void 0)).data}}j([M()],T.prototype,"requestAddressBook",null);class W{constructor(e={}){const{allowedDomains:s=null,debug:a=!1}=e;this.communicator=new H(s,a),this.eth=new O(this.communicator),this.txs=new A(this.communicator),this.safe=new T(this.communicator),this.wallet=new _(this.communicator)}}const $=m.Operation,z=m.TokenType,J=m.TransactionStatus,Q=m.TransferDirection;export{g as MessageFormatter,r as Methods,$ as Operation,c as RPC_CALLS,f as RestrictedMethods,z as TokenType,J as TransactionStatus,Q as TransferDirection,W as default,v as getSDKVersion,S as isObjectEIP712TypedData};
@@ -1,4 +1,4 @@
1
- import{w as k,i as W,b as v}from"./lit-element-B3y9oplH.js";import{n as y}from"./class-map-CxwNmq0D.js";import{c as I}from"./index-Cpng5QLO.js";import"./index-kJ2Om4DY.js";import{Q as M}from"./browser-D_5JuNNR.js";import{d as O,r as N}from"./index-BplwFt6_.js";const Q=.1,_=2.5,$=7;function x(t,a,d){return t===a?!1:(t-a<0?a-t:t-a)<=d+Q}function A(t,a){const d=Array.prototype.slice.call(M.create(t,{errorCorrectionLevel:a}).modules.data,0),l=Math.sqrt(d.length);return d.reduce((h,f,p)=>(p%l===0?h.push([f]):h[h.length-1].push(f))&&h,[])}const q={generate({uri:t,size:a,logoSize:d,padding:l=8,dotColor:h="var(--apkt-colors-black)"}){const p=[],u=A(t,"Q"),n=(a-2*l)/u.length,E=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];E.forEach(({x:i,y:e})=>{const s=(u.length-$)*n*i+l,r=(u.length-$)*n*e+l,c=.45;for(let o=0;o<E.length;o+=1){const m=n*($-o*2);p.push(k`
1
+ import{w as k,i as W,b as v}from"./lit-element-B3y9oplH.js";import{n as y}from"./class-map-CxwNmq0D.js";import{c as I}from"./index-BTusn-cp.js";import"./index-D-ixZxf4.js";import{Q as M}from"./browser-D_5JuNNR.js";import{d as O,r as N}from"./index-Bn1ikbQg.js";const Q=.1,_=2.5,$=7;function x(t,a,d){return t===a?!1:(t-a<0?a-t:t-a)<=d+Q}function A(t,a){const d=Array.prototype.slice.call(M.create(t,{errorCorrectionLevel:a}).modules.data,0),l=Math.sqrt(d.length);return d.reduce((h,f,p)=>(p%l===0?h.push([f]):h[h.length-1].push(f))&&h,[])}const q={generate({uri:t,size:a,logoSize:d,padding:l=8,dotColor:h="var(--apkt-colors-black)"}){const p=[],u=A(t,"Q"),n=(a-2*l)/u.length,E=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];E.forEach(({x:i,y:e})=>{const s=(u.length-$)*n*i+l,r=(u.length-$)*n*e+l,c=.45;for(let o=0;o<E.length;o+=1){const m=n*($-o*2);p.push(k`
2
2
  <rect
3
3
  fill=${o===2?"var(--apkt-colors-black)":"var(--apkt-colors-white)"}
4
4
  width=${o===0?m-10:m}
@@ -1,4 +1,4 @@
1
- import{i as g,b as e}from"./lit-element-B3y9oplH.js";import{r as f,n as w,o as v}from"./class-map-CxwNmq0D.js";import{d as y,r as k,e as P}from"./index-BplwFt6_.js";import{c as b}from"./index-Cpng5QLO.js";import"./index-dh70gAb1.js";import{H as x}from"./HelpersUtil-BMey9OQC.js";import{R as u,E as A}from"./W3MFrameProviderSingleton-BwXooI70.js";import"./index-Cm0Bd7M5.js";import"./index-CdYVhV-8.js";const I=y`
1
+ import{i as g,b as e}from"./lit-element-B3y9oplH.js";import{r as f,n as w,o as v}from"./class-map-CxwNmq0D.js";import{d as y,r as k,e as P}from"./index-Bn1ikbQg.js";import{c as b}from"./index-BTusn-cp.js";import"./index-C6WtN49a.js";import{H as x}from"./HelpersUtil-DwV51RvI.js";import{R as u,E as A}from"./W3MFrameProviderSingleton-B6_3Zs6I.js";import"./index-Cpy2Et_p.js";import"./index-BGGbgdSQ.js";const I=y`
2
2
  :host {
3
3
  display: block;
4
4
  }