@dcl/shop 0.1.0-30276533246.commit-f8e4e8f → 0.1.0-30277401547.commit-e877307
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.
- package/assets/{Activity-hXLcKq2h.js → Activity-_qlXQij1.js} +1 -1
- package/assets/{AnimatedBackground-dbV7gtfn.js → AnimatedBackground-DO49gSw8.js} +1 -1
- package/assets/{Assets-CMMyLxYK.js → Assets-D-VpkQ1l.js} +2 -2
- package/assets/{Assets.styles-0t7WQHO0.js → Assets.styles-BZMkOQeI.js} +1 -1
- package/assets/{Authorizations-UmG-Df3r.js → Authorizations-BFWG3QA_.js} +1 -1
- package/assets/{Button-DZEnGtFb.js → Button-DvhW1Z1S.js} +1 -1
- package/assets/{Cart-Cv-0Hvub.js → Cart-Cz7NK8QL.js} +1 -1
- package/assets/{CircularProgress-BJ3mR2Td.js → CircularProgress-BmwVvF17.js} +1 -1
- package/assets/{Collection-B2vZD-tj.js → Collection-Bc2CvIur.js} +1 -1
- package/assets/{CollectionCarousel--kzVfaO5.js → CollectionCarousel-DEYFBykF.js} +1 -1
- package/assets/{Creator-q1uyTJMB.js → Creator-7vyVsWtE.js} +1 -1
- package/assets/{ExchangeController-aW_MlhrS.js → ExchangeController-icK8vQc1.js} +1 -1
- package/assets/{GetCredits-C_zVvwJv.js → GetCredits-BE-bIUdj.js} +1 -1
- package/assets/{HelpersUtil-ClO_3Jc1.js → HelpersUtil-C_aV_Y-W.js} +1 -1
- package/assets/{ImportListings-Bkbdthc9.js → ImportListings-CusN2RYj.js} +1 -1
- package/assets/{ItemDetail-mOl_Kn1H.js → ItemDetail-blewhWwg.js} +3 -3
- package/assets/{LoadMore-EHn5w6iP.js → LoadMore-C2uaqP2N.js} +1 -1
- package/assets/{MarketCheckout-dZs9K_G4.js → MarketCheckout-CW6mGgHt.js} +1 -1
- package/assets/{MenuList-CMbA1PQj.js → MenuList-mbP1RxaG.js} +1 -1
- package/assets/{MyAssets-BJI5V-2P.js → MyAssets-HcHA9d8L.js} +1 -1
- package/assets/{MyFavorites-BguSqCh7.js → MyFavorites-DkEAv96J.js} +1 -1
- package/assets/{NotFound-i-z6JKyV.js → NotFound-B2W2MHR8.js} +1 -1
- package/assets/{NotificationsBell-C_yrd9Xo.js → NotificationsBell-BEAvIZcq.js} +1 -1
- package/assets/{StoreSettings-DZkFM1rM.js → StoreSettings-CGc7i0kZ.js} +5 -5
- package/assets/{Success-Dnd1gDEe.js → Success-5LiVLOny.js} +1 -1
- package/assets/{SwapController-3J3CaWML.js → SwapController-BZT-uJE0.js} +1 -1
- package/assets/{Tooltip-D02GGolw.js → Tooltip-V9fXstBY.js} +1 -1
- package/assets/{TradeService-CD7-qmvB.js → TradeService-D9nuCaGq.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-C03Pb4B-.js → W3MFrameProviderSingleton-Ccq1reIt.js} +3 -3
- package/assets/{WebCryptoP256-BNVfqOHe.js → WebCryptoP256-CrgJppag.js} +1 -1
- package/assets/{authorizations-Cp6LZG2p.js → authorizations-t9AL68YM.js} +1 -1
- package/assets/{basic-BiNYECPU.js → basic-BIbSgqQe.js} +1 -1
- package/assets/{biconomy-sueKb6TZ.js → biconomy-JEnDnFaz.js} +1 -1
- package/assets/{builder-DlCHGdvc.js → builder-uUlDA8Em.js} +1 -1
- package/assets/{buy-B2kHW0nr.js → buy-84sizoxr.js} +1 -1
- package/assets/{buy-gasless-C1AGMpyR.js → buy-gasless-oF_YJX_W.js} +1 -1
- package/assets/{cart-checkout-gXQTm1Je.js → cart-checkout-K77UDHy3.js} +1 -1
- package/assets/{categories-C3OIiumf.js → categories-BwvbYi6M.js} +1 -1
- package/assets/{ccip-DPUSAyAP.js → ccip-5L0bsS_C.js} +1 -1
- package/assets/{ccip-DN5nMPw-.js → ccip-wypw12me.js} +1 -1
- package/assets/{collection-DreRuzb5.js → collection-D7HQMUIe.js} +1 -1
- package/assets/{controller-3Y3P-qSA.js → controller-Cwg1NxXB.js} +2 -2
- package/assets/{core-DNLw0r_l.js → core-3ZRiSdvl.js} +4 -4
- package/assets/{custom-B2MFF440.js → custom-BVE_f5dD.js} +1 -1
- package/assets/{data-capture-BwNOBkUG.js → data-capture-BRhsLQVv.js} +1 -1
- package/assets/{email-DsF1SFzq.js → email-CldXoMar.js} +1 -1
- package/assets/{embedded-wallet-CqXzyQH3.js → embedded-wallet-vSjh73AM.js} +1 -1
- package/assets/{emotion-styled.browser.esm-KRbVdXBp.js → emotion-styled.browser.esm-vQZV14Nf.js} +1 -1
- package/assets/{engine-Bt0lIrAq.js → engine-BPP9EW4Q.js} +1 -1
- package/assets/{errors-DRre14b2.js → errors-D-hio89k.js} +1 -1
- package/assets/{estimate-l1-fee-D2kU8y3A.js → estimate-l1-fee-BLZxmPJY.js} +1 -1
- package/assets/{execute-CxJ661iN.js → execute-cH8V-8nL.js} +2 -2
- package/assets/{features-C_M-5faE.js → features-CJ1tq5LL.js} +1 -1
- package/assets/{fetchTokenMetadata-_p-iZKio.js → fetchTokenMetadata-hD4VNXHw.js} +2 -2
- package/assets/{get-ecosystem-wallet-info-86ruW1Fa.js → get-ecosystem-wallet-info-3DZHpSG2.js} +1 -1
- package/assets/{getBalance-unWh_KQT.js → getBalance-vjJ5CXDC.js} +1 -1
- package/assets/{getNFT-CIgk3nT1.js → getNFT-BTjIkFXY.js} +1 -1
- package/assets/{getNFT-BGqdTpXh.js → getNFT-D8HIjTde.js} +1 -1
- package/assets/{getThemeProps-BSd7rKgs.js → getThemeProps-qmqFWvou.js} +1 -1
- package/assets/{hashTypedData-QLpD25u5.js → hashTypedData-BrvDnrgK.js} +1 -1
- package/assets/{hashTypedData-BTWIstyF.js → hashTypedData-Y2DJnKI9.js} +1 -1
- package/assets/{import-C8mG5kpp.js → import-AgO0v-a5.js} +1 -1
- package/assets/{in-app-BhtePNrr.js → in-app-C4N5lFwd.js} +1 -1
- package/assets/{in-app-wallet-calls-CshV6paA.js → in-app-wallet-calls-CMBsSG6j.js} +1 -1
- package/assets/{index-Cy1iqq4E.js → index--8tZMj8Y.js} +1 -1
- package/assets/{index-D14A8-Ez.js → index-1cJq3bUz.js} +1 -1
- package/assets/{index-DTdfAXzC.js → index-B8GAuQX3.js} +3 -3
- package/assets/{index-jMf-NKbX.js → index-B96cJA0d.js} +1 -1
- package/assets/{index-DW7iqXK6.js → index-B9AUDrI9.js} +1 -1
- package/assets/{index-ZWDXIF6O.js → index-BFPNYe8x.js} +10 -10
- package/assets/{index-CoUgtRBd.js → index-BGTbU_0B.js} +2 -2
- package/assets/{index-DekG2ccV.js → index-BKvaZQRw.js} +1 -1
- package/assets/{index-BR3whuSX.js → index-BQOr-Vwz.js} +1 -1
- package/assets/{index-Cn4XSZr0.js → index-BQuXaLZX.js} +1 -1
- package/assets/{index-Dz09ibiS.js → index-BWgCJZHy.js} +2 -2
- package/assets/{index-DFiDXKfN.js → index-B_jKVCv0.js} +1 -1
- package/assets/{index-BjEtYT4r.js → index-BcgMkg8Z.js} +1 -1
- package/assets/{index-CjbITVZo.js → index-BjQNL760.js} +1 -1
- package/assets/{index-m5nQVxYP.js → index-BlBoDOVY.js} +1 -1
- package/assets/{index-DYq_oVmx.js → index-C-2OENmH.js} +1 -1
- package/assets/{index-By453YwH.js → index-C7UEmKEb.js} +3 -3
- package/assets/{index-ezQi9fE0.js → index-C7gHM4wY.js} +1 -1
- package/assets/{index-ByXnBudX.js → index-C8Ua1g52.js} +1 -1
- package/assets/{index-BQmilESQ.js → index-CI-UnS2-.js} +1 -1
- package/assets/{index-BW895N7Q.js → index-CV39-lnY.js} +1 -1
- package/assets/{index-CyD5tTbO.js → index-CcARyxeB.js} +1 -1
- package/assets/{index-CbMR0Bj_.js → index-Ch88GJdD.js} +1 -1
- package/assets/{index-COv1RTFu.js → index-CiKWw9L3.js} +2 -2
- package/assets/{index-DNq_ZzO9.js → index-CmhYJKse.js} +1 -1
- package/assets/{index-B5y-D5X8.js → index-CnIGe1GZ.js} +1 -1
- package/assets/{index-phHbAFw8.js → index-CsSypry2.js} +1 -1
- package/assets/{index-COdiwi90.js → index-CvkWE_vF.js} +1 -1
- package/assets/{index-DsxE94hA.js → index-D0cj2XsC.js} +1 -1
- package/assets/{index-Bm3DarTl.js → index-D2-V-v9q.js} +1 -1
- package/assets/{index-CZat8yuA.js → index-D2iLR1Fl.js} +1 -1
- package/assets/{index-CzQo6jjU.js → index-D96o2dcC.js} +1 -1
- package/assets/{index-C8v7zDBJ.js → index-DCFYAbF4.js} +1 -1
- package/assets/{index-CQCEoI0f.js → index-DGwFgPlc.js} +1 -1
- package/assets/{index-D2w8m12L.js → index-DN-OLR2r.js} +3 -3
- package/assets/{index-DOpvn00g.js → index-DNLIdOOI.js} +1 -1
- package/assets/{index-CZHmX5J8.js → index-DZxRXkvI.js} +1 -1
- package/assets/{index-CLcox4E7.js → index-Dq7pc9gT.js} +1 -1
- package/assets/{index-DkF53JBL.js → index-Dx4EbFs-.js} +1 -1
- package/assets/{index-w8qdvQSI.js → index-Dz0EI57w.js} +1 -1
- package/assets/{index-DTu4F44-.js → index-E3wxKJyS.js} +1 -1
- package/assets/{index-BHZuyKoD.js → index-HMuz0PhO.js} +1 -1
- package/assets/{index-CkOuE7FD.js → index-Hb4Ys2Tq.js} +1 -1
- package/assets/{index-DIpKr5PH.js → index-Vlg-GpRL.js} +1 -1
- package/assets/{index-DXk86Ivm.js → index-YHVXMMbH.js} +1 -1
- package/assets/{index-C_Gr4cGQ.js → index-bqj_5mVc.js} +1 -1
- package/assets/{index-BnmhOYyH.js → index-jPOTr4Wq.js} +1 -1
- package/assets/{index-OZxfsC7n.js → index-qDfBJZD7.js} +1 -1
- package/assets/{index-Cd5MdlQV.js → index-r7kjVwFs.js} +1 -1
- package/assets/{index-C2uZoNuk.js → index-rjU6xZd8.js} +1 -1
- package/assets/{index-XVXsmUHu.js → index-trxbKGTp.js} +1 -1
- package/assets/{index.es-B_VDxdYa.js → index.es-BKhU-mgO.js} +1 -1
- package/assets/{index.es-CH1EpUFZ.js → index.es-DvYEMDdQ.js} +4 -4
- package/assets/{index.es-CUbFS9-7.js → index.es-magZDVqq.js} +1 -1
- package/assets/{localBatchGatewayRequest-gUKVbACI.js → localBatchGatewayRequest-CnLOTida.js} +1 -1
- package/assets/{mana-rate-BkFbk0kZ.js → mana-rate-BpgRIQMS.js} +1 -1
- package/assets/{networks-Bd6TgNp5.js → networks-BNqJWbtk.js} +1 -1
- package/assets/{onramp-CsEoJ4ye.js → onramp-BYjThZVX.js} +1 -1
- package/assets/{openzeppelin-CvVwdooA.js → openzeppelin-Ba3p7TP4.js} +1 -1
- package/assets/{parseNft-BuGslaHc.js → parseNft-CfH76UUp.js} +2 -2
- package/assets/{parseSignature-CJjL6IIG.js → parseSignature-CuL9-kIi.js} +1 -1
- package/assets/{parseSignature-cMUHSEHb.js → parseSignature-D3qKk3uH.js} +3 -3
- package/assets/{passkeys-CU5Dd8fW.js → passkeys-DPVQjClK.js} +1 -1
- package/assets/{pay-with-exchange-D5anhnsP.js → pay-with-exchange-MNFdDdCT.js} +1 -1
- package/assets/{qr-overlay-D7N8zFXO.js → qr-overlay-DDDT3Q-c.js} +1 -1
- package/assets/{receive-D1bfspT3.js → receive-BU9aVDlN.js} +1 -1
- package/assets/{resolveImplementation-yZJLHNcT.js → resolveImplementation-OjvLy3T5.js} +1 -1
- package/assets/{rpc-DR3Pyl3d.js → rpc-DjbYCcnH.js} +1 -1
- package/assets/{secp256k1-CphVajjd.js → secp256k1-Cz5kqQCg.js} +1 -1
- package/assets/{secp256k1-zVdNPaTf.js → secp256k1-X13vDEXt.js} +1 -1
- package/assets/{secp256k1-DDxmRKuj.js → secp256k1-w4Bql-wA.js} +1 -1
- package/assets/{send-batch-transaction-DbJ2GI0Z.js → send-batch-transaction-Dxt9X3nj.js} +1 -1
- package/assets/{send-eip712-transaction-g0RXPeLW.js → send-eip712-transaction-DaAvg9MZ.js} +2 -2
- package/assets/{send-gasless-transaction-hk-PL2RZ.js → send-gasless-transaction-BquzQGsb.js} +2 -2
- package/assets/{send-CQZNNlKI.js → send-oOaeKGnc.js} +1 -1
- package/assets/{send-transaction-Qs7YNICs.js → send-transaction-BHdPLXiu.js} +2 -2
- package/assets/{sendMetaTransaction-Bky8YK8T.js → sendMetaTransaction-DNedK3Cr.js} +1 -1
- package/assets/{sendRawTransaction-FrBDfTMh.js → sendRawTransaction-DUzMWVdQ.js} +3 -3
- package/assets/{serializeTransaction-BY81pWis.js → serializeTransaction-BfDfoMJJ.js} +1 -1
- package/assets/{session-proposal-DJycTDzh.js → session-proposal-CuVqfqoo.js} +1 -1
- package/assets/{session-request-CvXHUfW2.js → session-request-CKwxSrqb.js} +2 -2
- package/assets/{signing-C-pXPlUm.js → signing-BjyyWrkp.js} +3 -3
- package/assets/{socials-ZM1DPB14.js → socials-pvmMMGV3.js} +1 -1
- package/assets/{swaps-DWHYQxSV.js → swaps-padIwW3Y.js} +1 -1
- package/assets/{thirdweb-CdJoXk5x.js → thirdweb-kveVeUIA.js} +3 -3
- package/assets/{to-serializable-transaction-D53T_ITW.js → to-serializable-transaction-108u7zPg.js} +2 -2
- package/assets/{trade-encoding-C0CKvlMZ.js → trade-encoding-DcECym8l.js} +1 -1
- package/assets/{transactionReceipt-DcSpquTW.js → transactionReceipt-Bs-2Cglz.js} +1 -1
- package/assets/{transactions-BH9skO3z.js → transactions-dcat6MM1.js} +1 -1
- package/assets/useCreditPacks-BAZLy3JX.js +1 -0
- package/assets/{useInfiniteGrid-Byw1k8Mi.js → useInfiniteGrid-BBNOO0mR.js} +1 -1
- package/assets/useManaRate-CGtpZZBQ.js +1 -0
- package/assets/{useStore-ZMBovGpH.js → useStore-Bo6L1SFA.js} +1 -1
- package/assets/{useTheme-DqyRDQjm.js → useTheme-CQjQJ5Is.js} +1 -1
- package/assets/{verifyHash-DVsBhfqm.js → verifyHash-BfupbUWA.js} +1 -1
- package/assets/{w3m-modal-BJOvzFgf.js → w3m-modal-C2yr-A_-.js} +1 -1
- package/assets/{w3m-modal-r_B_A1Y3.js → w3m-modal-CdtZ4EYL.js} +1 -1
- package/assets/{wait-for-tx-receipt-BWOrjd7S.js → wait-for-tx-receipt-BBOv1oQx.js} +1 -1
- package/assets/{wallets-CQrQiCdZ.js → wallets-CcitqMTg.js} +5 -5
- package/assets/{web-connector-b-JbgcxK.js → web-connector-BLbBOK88.js} +3 -3
- package/assets/{writeContract-CRMw42Kd.js → writeContract-Cke2dgme.js} +1 -1
- package/assets/{zoraTestnet-ziGwenPM.js → zoraTestnet-NeGGigN-.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/useCreditPacks-DA-NvTNC.js +0 -1
- package/assets/useManaRate-CslU6wit.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as b,i as g,b as m}from"./lit-element-B3y9oplH.js";import{n as v,r as h}from"./class-map-CxwNmq0D.js";import{d as y}from"./index-
|
|
1
|
+
import{a as b,i as g,b as m}from"./lit-element-B3y9oplH.js";import{n as v,r as h}from"./class-map-CxwNmq0D.js";import{d as y}from"./index-DN-OLR2r.js";import{c as w}from"./index-C7gHM4wY.js";import{j as x,e as $,i as R,p as T,R as C,M as P}from"./W3MFrameProviderSingleton-Ccq1reIt.js";const s=T({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),_={state:s,subscribe(t){return R(s,()=>t(s))},subscribeKey(t,e){return $(s,t,e)},showTooltip({message:t,triggerRect:e,variant:o}){s.open=!0,s.message=t,s.triggerRect=e,s.variant=o},hide(){s.open=!1,s.message="",s.triggerRect={width:0,height:0,top:0,left:0}}},a=x(_),j=b`
|
|
2
2
|
:host {
|
|
3
3
|
width: 100%;
|
|
4
4
|
display: block;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as c,b as a}from"./lit-element-B3y9oplH.js";import{n as o,o as h}from"./class-map-CxwNmq0D.js";import{e as m,n as b}from"./ref-BsAZ42-h.js";import{c as x}from"./index-
|
|
1
|
+
import{i as c,b as a}from"./lit-element-B3y9oplH.js";import{n as o,o as h}from"./class-map-CxwNmq0D.js";import{e as m,n as b}from"./ref-BsAZ42-h.js";import{c as x}from"./index-C7gHM4wY.js";import{d as f,r as $,e as g}from"./index-DN-OLR2r.js";const w=f`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as b,b as l}from"./lit-element-B3y9oplH.js";import{n as s}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-
|
|
1
|
+
import{i as b,b as l}from"./lit-element-B3y9oplH.js";import{n as s}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-C7gHM4wY.js";import{d as m,r as f,e as v}from"./index-DN-OLR2r.js";const h=m`
|
|
2
2
|
button {
|
|
3
3
|
border: none;
|
|
4
4
|
background: transparent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as t,a as d,i as p,b as n}from"./lit-element-B3y9oplH.js";import{n as f}from"./class-map-CxwNmq0D.js";import{c as w,t as k}from"./index-
|
|
1
|
+
import{w as t,a as d,i as p,b as n}from"./lit-element-B3y9oplH.js";import{n as f}from"./class-map-CxwNmq0D.js";import{c as w,t as k}from"./index-C7gHM4wY.js";import{r as v}from"./index-DN-OLR2r.js";const g=t`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<rect width="64" height="64" fill="#F7931A"/>
|
|
3
3
|
<g clip-path="url(#clip0_1045_17)">
|
|
4
4
|
<path d="M63.0394 39.7409C58.7654 56.8839 41.4024 67.3169 24.2574 63.0419C7.11937 58.7679 -3.31363 41.4039 0.962367 24.2619C5.23437 7.11686 22.5974 -3.31714 39.7374 0.956863C56.8814 5.23086 67.3134 22.5969 63.0394 39.7409Z" fill="#F7931A"/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as b,b as l,a as O}from"./lit-element-B3y9oplH.js";import{n as h,r as d}from"./class-map-CxwNmq0D.js";import{d as C,r as E,e as P}from"./index-
|
|
1
|
+
import{i as b,b as l,a as O}from"./lit-element-B3y9oplH.js";import{n as h,r as d}from"./class-map-CxwNmq0D.js";import{d as C,r as E,e as P}from"./index-DN-OLR2r.js";import{c as v,U as x}from"./index-C7gHM4wY.js";import"./index-Dq7pc9gT.js";import"./index-D2-V-v9q.js";import{u as g,R as S,o as $,b as R,S as T}from"./W3MFrameProviderSingleton-Ccq1reIt.js";const L=C`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: inline-block;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as k}from"./index-BV8s6ez1.js";import{az as w}from"./sendRawTransaction-
|
|
1
|
+
import{r as k}from"./index-BV8s6ez1.js";import{az as w}from"./sendRawTransaction-DUzMWVdQ.js";import{c as I,e as q}from"./hashTypedData-BrvDnrgK.js";import"./NetworkUtil-C1aEwuOK.js";import"./sentry-BV_ZSgtd.js";import"./react-BW1xvPTF.js";import"./index-BFPNYe8x.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CtVvB8eG.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};
|