@reown/appkit-cdn 1.8.15-e95f0d61c614677233e13ea9f055d3f75fcdba81.0 → 1.8.15-viem-upgrade.0
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/package.json +10 -10
- package/dist/ConstantsUtil-C2Ed2H2U.js +0 -24
- package/dist/ConstantsUtil-C2Ed2H2U.js.map +0 -1
- package/dist/ExchangeController-h_95bqSB.js +0 -265
- package/dist/ExchangeController-h_95bqSB.js.map +0 -1
- package/dist/HelpersUtil-xYeUfp1A.js +0 -141
- package/dist/HelpersUtil-xYeUfp1A.js.map +0 -1
- package/dist/NavigationUtil-Ci15WS4K.js +0 -9
- package/dist/NavigationUtil-Ci15WS4K.js.map +0 -1
- package/dist/PhArrowCircleDown-B41iUlWV.js +0 -74
- package/dist/PhArrowCircleDown-B41iUlWV.js.map +0 -1
- package/dist/PhArrowClockwise-BY8u5n41.js +0 -74
- package/dist/PhArrowClockwise-BY8u5n41.js.map +0 -1
- package/dist/PhArrowDown-ClD8GZ65.js +0 -74
- package/dist/PhArrowDown-ClD8GZ65.js.map +0 -1
- package/dist/PhArrowLeft-B8MXUz60.js +0 -74
- package/dist/PhArrowLeft-B8MXUz60.js.map +0 -1
- package/dist/PhArrowRight-Cewa_Slb.js +0 -74
- package/dist/PhArrowRight-Cewa_Slb.js.map +0 -1
- package/dist/PhArrowSquareOut-whgWh-lD.js +0 -74
- package/dist/PhArrowSquareOut-whgWh-lD.js.map +0 -1
- package/dist/PhArrowUp-B1HXBxie.js +0 -74
- package/dist/PhArrowUp-B1HXBxie.js.map +0 -1
- package/dist/PhArrowUpRight-CfFYe4FP.js +0 -74
- package/dist/PhArrowUpRight-CfFYe4FP.js.map +0 -1
- package/dist/PhArrowsClockwise-gL1Gkrtx.js +0 -74
- package/dist/PhArrowsClockwise-gL1Gkrtx.js.map +0 -1
- package/dist/PhArrowsDownUp-BqUEdUQr.js +0 -74
- package/dist/PhArrowsDownUp-BqUEdUQr.js.map +0 -1
- package/dist/PhArrowsLeftRight-BlZU63eY.js +0 -74
- package/dist/PhArrowsLeftRight-BlZU63eY.js.map +0 -1
- package/dist/PhBank-gbg_jlI7.js +0 -74
- package/dist/PhBank-gbg_jlI7.js.map +0 -1
- package/dist/PhBrowser-CMlD-YJw.js +0 -74
- package/dist/PhBrowser-CMlD-YJw.js.map +0 -1
- package/dist/PhCaretDown-3agTO8Jp.js +0 -74
- package/dist/PhCaretDown-3agTO8Jp.js.map +0 -1
- package/dist/PhCaretLeft-_MTni7Z5.js +0 -74
- package/dist/PhCaretLeft-_MTni7Z5.js.map +0 -1
- package/dist/PhCaretRight-Ci9fAHPG.js +0 -74
- package/dist/PhCaretRight-Ci9fAHPG.js.map +0 -1
- package/dist/PhCaretUp-vFG4Fame.js +0 -74
- package/dist/PhCaretUp-vFG4Fame.js.map +0 -1
- package/dist/PhCheck-mChGK6K_.js +0 -74
- package/dist/PhCheck-mChGK6K_.js.map +0 -1
- package/dist/PhCircleHalf-DZ7-vfxf.js +0 -74
- package/dist/PhCircleHalf-DZ7-vfxf.js.map +0 -1
- package/dist/PhClock-Bc5XWXb6.js +0 -74
- package/dist/PhClock-Bc5XWXb6.js.map +0 -1
- package/dist/PhCompass-Cu2MB-55.js +0 -74
- package/dist/PhCompass-Cu2MB-55.js.map +0 -1
- package/dist/PhCopy-BGUjyTts.js +0 -74
- package/dist/PhCopy-BGUjyTts.js.map +0 -1
- package/dist/PhCreditCard-vxFWID4B.js +0 -74
- package/dist/PhCreditCard-vxFWID4B.js.map +0 -1
- package/dist/PhCurrencyDollar-BfOoDhJr.js +0 -74
- package/dist/PhCurrencyDollar-BfOoDhJr.js.map +0 -1
- package/dist/PhDesktop-Cq6jwzbS.js +0 -74
- package/dist/PhDesktop-Cq6jwzbS.js.map +0 -1
- package/dist/PhDeviceMobile-BCtTp6jj.js +0 -74
- package/dist/PhDeviceMobile-BCtTp6jj.js.map +0 -1
- package/dist/PhDotsThree-BGgD-WIO.js +0 -74
- package/dist/PhDotsThree-BGgD-WIO.js.map +0 -1
- package/dist/PhEnvelope-CQiV0-zG.js +0 -74
- package/dist/PhEnvelope-CQiV0-zG.js.map +0 -1
- package/dist/PhFunnelSimple-BHGtxTNf.js +0 -74
- package/dist/PhFunnelSimple-BHGtxTNf.js.map +0 -1
- package/dist/PhGlobe-Q8oVkf6X.js +0 -74
- package/dist/PhGlobe-Q8oVkf6X.js.map +0 -1
- package/dist/PhIdentificationCard-Cz9LzvVR.js +0 -74
- package/dist/PhIdentificationCard-Cz9LzvVR.js.map +0 -1
- package/dist/PhImage-CP5_qKk-.js +0 -74
- package/dist/PhImage-CP5_qKk-.js.map +0 -1
- package/dist/PhInfo-CTlE1X9Z.js +0 -74
- package/dist/PhInfo-CTlE1X9Z.js.map +0 -1
- package/dist/PhLightbulb-CcLpnAAb.js +0 -74
- package/dist/PhLightbulb-CcLpnAAb.js.map +0 -1
- package/dist/PhMagnifyingGlass-n58GUAck.js +0 -74
- package/dist/PhMagnifyingGlass-n58GUAck.js.map +0 -1
- package/dist/PhPaperPlaneRight-C0sf2XV8.js +0 -74
- package/dist/PhPaperPlaneRight-C0sf2XV8.js.map +0 -1
- package/dist/PhPlus-BJxvt7Uc.js +0 -74
- package/dist/PhPlus-BJxvt7Uc.js.map +0 -1
- package/dist/PhPower-BvktxO2-.js +0 -74
- package/dist/PhPower-BvktxO2-.js.map +0 -1
- package/dist/PhPuzzlePiece-CDDyUPYo.js +0 -74
- package/dist/PhPuzzlePiece-CDDyUPYo.js.map +0 -1
- package/dist/PhQrCode-BlGI8529.js +0 -74
- package/dist/PhQrCode-BlGI8529.js.map +0 -1
- package/dist/PhQuestion-DGZj6iDZ.js +0 -74
- package/dist/PhQuestion-DGZj6iDZ.js.map +0 -1
- package/dist/PhQuestionMark-CTmeI7MQ.js +0 -74
- package/dist/PhQuestionMark-CTmeI7MQ.js.map +0 -1
- package/dist/PhSealCheck-BSlqkxnH.js +0 -74
- package/dist/PhSealCheck-BSlqkxnH.js.map +0 -1
- package/dist/PhSignOut-CEXxlRk3.js +0 -74
- package/dist/PhSignOut-CEXxlRk3.js.map +0 -1
- package/dist/PhSpinner-Do1pY8fG.js +0 -74
- package/dist/PhSpinner-Do1pY8fG.js.map +0 -1
- package/dist/PhTrash-JNKavmpg.js +0 -74
- package/dist/PhTrash-JNKavmpg.js.map +0 -1
- package/dist/PhUser-BW7E-xYg.js +0 -74
- package/dist/PhUser-BW7E-xYg.js.map +0 -1
- package/dist/PhVault-mzxUgBYN.js +0 -74
- package/dist/PhVault-mzxUgBYN.js.map +0 -1
- package/dist/PhWallet-BR9JThKU.js +0 -74
- package/dist/PhWallet-BR9JThKU.js.map +0 -1
- package/dist/PhWarning-DxuQ70WM.js +0 -74
- package/dist/PhWarning-DxuQ70WM.js.map +0 -1
- package/dist/PhWarningCircle-DCI0JC1F.js +0 -74
- package/dist/PhWarningCircle-DCI0JC1F.js.map +0 -1
- package/dist/PhX-CWNXqpGn.js +0 -74
- package/dist/PhX-CWNXqpGn.js.map +0 -1
- package/dist/SwapController-CwWMKLPL.js +0 -684
- package/dist/SwapController-CwWMKLPL.js.map +0 -1
- package/dist/WebCryptoP256-B0F1BoHd.js +0 -3299
- package/dist/WebCryptoP256-B0F1BoHd.js.map +0 -1
- package/dist/add-emiZFWKE.js +0 -20
- package/dist/add-emiZFWKE.js.map +0 -1
- package/dist/all-wallets-BsUQMPgW.js +0 -11
- package/dist/all-wallets-BsUQMPgW.js.map +0 -1
- package/dist/app-store-C_L7BoYc.js +0 -22
- package/dist/app-store-C_L7BoYc.js.map +0 -1
- package/dist/appkit-DY7XpK4K.js +0 -118074
- package/dist/appkit-DY7XpK4K.js.map +0 -1
- package/dist/appkit.js +0 -11
- package/dist/appkit.js.map +0 -1
- package/dist/apple-c3IhsqlY.js +0 -23
- package/dist/apple-c3IhsqlY.js.map +0 -1
- package/dist/arrow-bottom-BZnD_9In.js +0 -13
- package/dist/arrow-bottom-BZnD_9In.js.map +0 -1
- package/dist/arrow-bottom-circle-C9HRc3sW.js +0 -16
- package/dist/arrow-bottom-circle-C9HRc3sW.js.map +0 -1
- package/dist/arrow-left-DFlXkOXB.js +0 -13
- package/dist/arrow-left-DFlXkOXB.js.map +0 -1
- package/dist/arrow-right-_EPGORWI.js +0 -13
- package/dist/arrow-right-_EPGORWI.js.map +0 -1
- package/dist/arrow-top-CrBCvUsj.js +0 -13
- package/dist/arrow-top-CrBCvUsj.js.map +0 -1
- package/dist/async-directive-CEBoIWb8.js +0 -73
- package/dist/async-directive-CEBoIWb8.js.map +0 -1
- package/dist/bank-IrtkQnW0.js +0 -19
- package/dist/bank-IrtkQnW0.js.map +0 -1
- package/dist/basic-CCVK4Xb-.js +0 -4914
- package/dist/basic-CCVK4Xb-.js.map +0 -1
- package/dist/browser-5XoTmr4n.js +0 -1991
- package/dist/browser-5XoTmr4n.js.map +0 -1
- package/dist/browser-DGJ1T57R.js +0 -19
- package/dist/browser-DGJ1T57R.js.map +0 -1
- package/dist/card-euIrImBb.js +0 -19
- package/dist/card-euIrImBb.js.map +0 -1
- package/dist/ccip-BnHcw2Q9.js +0 -164
- package/dist/ccip-BnHcw2Q9.js.map +0 -1
- package/dist/checkmark-DOfVZz7v.js +0 -16
- package/dist/checkmark-DOfVZz7v.js.map +0 -1
- package/dist/checkmark-bold-CBk9rneH.js +0 -13
- package/dist/checkmark-bold-CBk9rneH.js.map +0 -1
- package/dist/chevron-bottom-DqxWxVi0.js +0 -13
- package/dist/chevron-bottom-DqxWxVi0.js.map +0 -1
- package/dist/chevron-left-JKsYvrX0.js +0 -13
- package/dist/chevron-left-JKsYvrX0.js.map +0 -1
- package/dist/chevron-right-0IHVmnlN.js +0 -13
- package/dist/chevron-right-0IHVmnlN.js.map +0 -1
- package/dist/chevron-top-q1UXuE7C.js +0 -13
- package/dist/chevron-top-q1UXuE7C.js.map +0 -1
- package/dist/chrome-store-C1gUHLGC.js +0 -66
- package/dist/chrome-store-C1gUHLGC.js.map +0 -1
- package/dist/class-map-CqyLxUs0.js +0 -101
- package/dist/class-map-CqyLxUs0.js.map +0 -1
- package/dist/clock-CRgBEN3N.js +0 -13
- package/dist/clock-CRgBEN3N.js.map +0 -1
- package/dist/close-DqwtanuV.js +0 -13
- package/dist/close-DqwtanuV.js.map +0 -1
- package/dist/clsx.m-D57qXwfE.js +0 -21
- package/dist/clsx.m-D57qXwfE.js.map +0 -1
- package/dist/coinPlaceholder-DGuEyon3.js +0 -13
- package/dist/coinPlaceholder-DGuEyon3.js.map +0 -1
- package/dist/compass-D3Lk_JmD.js +0 -13
- package/dist/compass-D3Lk_JmD.js.map +0 -1
- package/dist/copy-0bHy8N_r.js +0 -20
- package/dist/copy-0bHy8N_r.js.map +0 -1
- package/dist/core-C111yg8v.js +0 -16288
- package/dist/core-C111yg8v.js.map +0 -1
- package/dist/cursor-Bnlh8YKu.js +0 -8
- package/dist/cursor-Bnlh8YKu.js.map +0 -1
- package/dist/cursor-transparent-BqTVTA3D.js +0 -17
- package/dist/cursor-transparent-BqTVTA3D.js.map +0 -1
- package/dist/data-capture-BtdmOx65.js +0 -549
- package/dist/data-capture-BtdmOx65.js.map +0 -1
- package/dist/desktop-BKaI6I0c.js +0 -14
- package/dist/desktop-BKaI6I0c.js.map +0 -1
- package/dist/disconnect-CJtwIHdJ.js +0 -13
- package/dist/disconnect-CJtwIHdJ.js.map +0 -1
- package/dist/discord-oHqb6ClE.js +0 -22
- package/dist/discord-oHqb6ClE.js.map +0 -1
- package/dist/email-9QNGgeQQ.js +0 -421
- package/dist/email-9QNGgeQQ.js.map +0 -1
- package/dist/embedded-wallet-C_CLs-ZL.js +0 -952
- package/dist/embedded-wallet-C_CLs-ZL.js.map +0 -1
- package/dist/etherscan-Dkkz1Mfh.js +0 -11
- package/dist/etherscan-Dkkz1Mfh.js.map +0 -1
- package/dist/exclamation-triangle-BQbUCEhi.js +0 -9
- package/dist/exclamation-triangle-BQbUCEhi.js.map +0 -1
- package/dist/extension-C2hKzEZZ.js +0 -13
- package/dist/extension-C2hKzEZZ.js.map +0 -1
- package/dist/external-link-CIjsnb3X.js +0 -13
- package/dist/external-link-CIjsnb3X.js.map +0 -1
- package/dist/facebook-1Hufe3sI.js +0 -31
- package/dist/facebook-1Hufe3sI.js.map +0 -1
- package/dist/farcaster-DlSxA8AD.js +0 -17
- package/dist/farcaster-DlSxA8AD.js.map +0 -1
- package/dist/features-CubAsZN1.js +0 -319
- package/dist/features-CubAsZN1.js.map +0 -1
- package/dist/filters-Bx5zOyri.js +0 -13
- package/dist/filters-Bx5zOyri.js.map +0 -1
- package/dist/github-CT_NtR6h.js +0 -23
- package/dist/github-CT_NtR6h.js.map +0 -1
- package/dist/google-Dkv0ZPY6.js +0 -23
- package/dist/google-Dkv0ZPY6.js.map +0 -1
- package/dist/hashTypedData-Q6QDIxse.js +0 -262
- package/dist/hashTypedData-Q6QDIxse.js.map +0 -1
- package/dist/help-circle-Dh0SYux9.js +0 -17
- package/dist/help-circle-Dh0SYux9.js.map +0 -1
- package/dist/id-Dc_gfIHE.js +0 -17
- package/dist/id-Dc_gfIHE.js.map +0 -1
- package/dist/if-defined-B5CxFQec.js +0 -11
- package/dist/if-defined-B5CxFQec.js.map +0 -1
- package/dist/image-DPwaTi09.js +0 -9
- package/dist/image-DPwaTi09.js.map +0 -1
- package/dist/index-AsDH-m9e.js +0 -456
- package/dist/index-AsDH-m9e.js.map +0 -1
- package/dist/index-B-AePZns.js +0 -1514
- package/dist/index-B-AePZns.js.map +0 -1
- package/dist/index-B0nuzWGd.js +0 -153
- package/dist/index-B0nuzWGd.js.map +0 -1
- package/dist/index-BFK8rn8f.js +0 -985
- package/dist/index-BFK8rn8f.js.map +0 -1
- package/dist/index-BGtDVhOX.js +0 -218
- package/dist/index-BGtDVhOX.js.map +0 -1
- package/dist/index-BXRoNn9X.js +0 -147
- package/dist/index-BXRoNn9X.js.map +0 -1
- package/dist/index-BYnWTIsP.js +0 -257
- package/dist/index-BYnWTIsP.js.map +0 -1
- package/dist/index-B_yrV2-r.js +0 -7258
- package/dist/index-B_yrV2-r.js.map +0 -1
- package/dist/index-BcCvzVg5.js +0 -716
- package/dist/index-BcCvzVg5.js.map +0 -1
- package/dist/index-BeSFhM_p.js +0 -120
- package/dist/index-BeSFhM_p.js.map +0 -1
- package/dist/index-BgnNrRDq.js +0 -967
- package/dist/index-BgnNrRDq.js.map +0 -1
- package/dist/index-BqpTTobE.js +0 -984
- package/dist/index-BqpTTobE.js.map +0 -1
- package/dist/index-BxPoDEMu.js +0 -7481
- package/dist/index-BxPoDEMu.js.map +0 -1
- package/dist/index-ByLuz3My.js +0 -182
- package/dist/index-ByLuz3My.js.map +0 -1
- package/dist/index-BzPjzg08.js +0 -62
- package/dist/index-BzPjzg08.js.map +0 -1
- package/dist/index-C2E-8AS5.js +0 -249
- package/dist/index-C2E-8AS5.js.map +0 -1
- package/dist/index-C4icMnjM.js +0 -521
- package/dist/index-C4icMnjM.js.map +0 -1
- package/dist/index-C8av2G6v.js +0 -136
- package/dist/index-C8av2G6v.js.map +0 -1
- package/dist/index-CE9D5nR3.js +0 -441
- package/dist/index-CE9D5nR3.js.map +0 -1
- package/dist/index-CI83C2eb.js +0 -124
- package/dist/index-CI83C2eb.js.map +0 -1
- package/dist/index-CK8vtUMI.js +0 -181
- package/dist/index-CK8vtUMI.js.map +0 -1
- package/dist/index-CY_gr4c7.js +0 -286
- package/dist/index-CY_gr4c7.js.map +0 -1
- package/dist/index-CZmyXVNe.js +0 -198
- package/dist/index-CZmyXVNe.js.map +0 -1
- package/dist/index-CemyBXIP.js +0 -8825
- package/dist/index-CemyBXIP.js.map +0 -1
- package/dist/index-CkrKEace.js +0 -180
- package/dist/index-CkrKEace.js.map +0 -1
- package/dist/index-Cl94CXn7.js +0 -110
- package/dist/index-Cl94CXn7.js.map +0 -1
- package/dist/index-CwK6o8Hz.js +0 -18322
- package/dist/index-CwK6o8Hz.js.map +0 -1
- package/dist/index-Cy1DAN6W.js +0 -542
- package/dist/index-Cy1DAN6W.js.map +0 -1
- package/dist/index-CziMS40-.js +0 -281
- package/dist/index-CziMS40-.js.map +0 -1
- package/dist/index-D6qUKJRD.js +0 -1178
- package/dist/index-D6qUKJRD.js.map +0 -1
- package/dist/index-DDYN4XOm.js +0 -211
- package/dist/index-DDYN4XOm.js.map +0 -1
- package/dist/index-DHcBAN0Q.js +0 -9350
- package/dist/index-DHcBAN0Q.js.map +0 -1
- package/dist/index-DPEv06yg.js +0 -520
- package/dist/index-DPEv06yg.js.map +0 -1
- package/dist/index-DShG1B5f.js +0 -131
- package/dist/index-DShG1B5f.js.map +0 -1
- package/dist/index-DTOiAL1i.js +0 -52
- package/dist/index-DTOiAL1i.js.map +0 -1
- package/dist/index-DVyI9O5i.js +0 -92
- package/dist/index-DVyI9O5i.js.map +0 -1
- package/dist/index-DvXemhcG.js +0 -611
- package/dist/index-DvXemhcG.js.map +0 -1
- package/dist/index-Fvw4sbfL.js +0 -198
- package/dist/index-Fvw4sbfL.js.map +0 -1
- package/dist/index-PiXpeN5n.js +0 -3987
- package/dist/index-PiXpeN5n.js.map +0 -1
- package/dist/index-btvyw5xW.js +0 -126
- package/dist/index-btvyw5xW.js.map +0 -1
- package/dist/index-dsKNiJml.js +0 -70
- package/dist/index-dsKNiJml.js.map +0 -1
- package/dist/index-gEaD8hfK.js +0 -109
- package/dist/index-gEaD8hfK.js.map +0 -1
- package/dist/index-isOxTzum.js +0 -147
- package/dist/index-isOxTzum.js.map +0 -1
- package/dist/index-nWSgWKaF.js +0 -2277
- package/dist/index-nWSgWKaF.js.map +0 -1
- package/dist/index-qQiVpif7.js +0 -1372
- package/dist/index-qQiVpif7.js.map +0 -1
- package/dist/index-tv-dalA1.js +0 -73
- package/dist/index-tv-dalA1.js.map +0 -1
- package/dist/index.es-BzCqYMc8.js +0 -8391
- package/dist/index.es-BzCqYMc8.js.map +0 -1
- package/dist/info-4ssFoXJS.js +0 -8
- package/dist/info-4ssFoXJS.js.map +0 -1
- package/dist/info-circle-BnqHwvcX.js +0 -17
- package/dist/info-circle-BnqHwvcX.js.map +0 -1
- package/dist/jsxRuntime.module-CWsrm3KZ.js +0 -14
- package/dist/jsxRuntime.module-CWsrm3KZ.js.map +0 -1
- package/dist/lightbulb-BEEbBBZQ.js +0 -8
- package/dist/lightbulb-BEEbBBZQ.js.map +0 -1
- package/dist/localBatchGatewayRequest-Dryp85EG.js +0 -103
- package/dist/localBatchGatewayRequest-Dryp85EG.js.map +0 -1
- package/dist/mail-CJLCh290.js +0 -13
- package/dist/mail-CJLCh290.js.map +0 -1
- package/dist/metamask-sdk-4u4X6Xn3.js +0 -16699
- package/dist/metamask-sdk-4u4X6Xn3.js.map +0 -1
- package/dist/mobile-Deau0Za4.js +0 -14
- package/dist/mobile-Deau0Za4.js.map +0 -1
- package/dist/more-BeXo-Pwn.js +0 -16
- package/dist/more-BeXo-Pwn.js.map +0 -1
- package/dist/native-DOlbMZnh.js +0 -17
- package/dist/native-DOlbMZnh.js.map +0 -1
- package/dist/network-placeholder-BoityKSt.js +0 -19
- package/dist/network-placeholder-BoityKSt.js.map +0 -1
- package/dist/nftPlaceholder-PTHT5Ulj.js +0 -13
- package/dist/nftPlaceholder-PTHT5Ulj.js.map +0 -1
- package/dist/off-BWWypY2E.js +0 -13
- package/dist/off-BWWypY2E.js.map +0 -1
- package/dist/onramp-DnL6ChSq.js +0 -979
- package/dist/onramp-DnL6ChSq.js.map +0 -1
- package/dist/parseAbiParameters-DfJcIE_w.js +0 -757
- package/dist/parseAbiParameters-DfJcIE_w.js.map +0 -1
- package/dist/parseSignature-CxTkG24t.js +0 -4690
- package/dist/parseSignature-CxTkG24t.js.map +0 -1
- package/dist/pay-with-exchange-CpuGLivJ.js +0 -603
- package/dist/pay-with-exchange-CpuGLivJ.js.map +0 -1
- package/dist/play-store-DkxQRJyA.js +0 -37
- package/dist/play-store-DkxQRJyA.js.map +0 -1
- package/dist/plus-DaGtBhNd.js +0 -18
- package/dist/plus-DaGtBhNd.js.map +0 -1
- package/dist/property-8UcTqffH.js +0 -623
- package/dist/property-8UcTqffH.js.map +0 -1
- package/dist/qr-code-DGvMTPaF.js +0 -11
- package/dist/qr-code-DGvMTPaF.js.map +0 -1
- package/dist/receive-CVWmkRpl.js +0 -262
- package/dist/receive-CVWmkRpl.js.map +0 -1
- package/dist/recycle-horizontal-DDVEtj7J.js +0 -14
- package/dist/recycle-horizontal-DDVEtj7J.js.map +0 -1
- package/dist/ref-DAjgVrGH.js +0 -43
- package/dist/ref-DAjgVrGH.js.map +0 -1
- package/dist/refresh-BmNFE8Pg.js +0 -13
- package/dist/refresh-BmNFE8Pg.js.map +0 -1
- package/dist/reown-logo-B-UO-SeO.js +0 -17
- package/dist/reown-logo-B-UO-SeO.js.map +0 -1
- package/dist/search-DR_B_4SQ.js +0 -13
- package/dist/search-DR_B_4SQ.js.map +0 -1
- package/dist/secp256k1-DnXqhCKw.js +0 -2031
- package/dist/secp256k1-DnXqhCKw.js.map +0 -1
- package/dist/send-BNU8VrfM.js +0 -20
- package/dist/send-BNU8VrfM.js.map +0 -1
- package/dist/send-DHzM4I8V.js +0 -1365
- package/dist/send-DHzM4I8V.js.map +0 -1
- package/dist/socials-DsoFf1B8.js +0 -796
- package/dist/socials-DsoFf1B8.js.map +0 -1
- package/dist/swapHorizontal-BQOjfwRW.js +0 -13
- package/dist/swapHorizontal-BQOjfwRW.js.map +0 -1
- package/dist/swapHorizontalBold-DMKR9Zys.js +0 -13
- package/dist/swapHorizontalBold-DMKR9Zys.js.map +0 -1
- package/dist/swapHorizontalMedium-DVsqt18q.js +0 -21
- package/dist/swapHorizontalMedium-DVsqt18q.js.map +0 -1
- package/dist/swapHorizontalRoundedBold-CM5U-o8X.js +0 -13
- package/dist/swapHorizontalRoundedBold-CM5U-o8X.js.map +0 -1
- package/dist/swapVertical-P9UnfCR-.js +0 -13
- package/dist/swapVertical-P9UnfCR-.js.map +0 -1
- package/dist/swaps-F0roy6mK.js +0 -2121
- package/dist/swaps-F0roy6mK.js.map +0 -1
- package/dist/telegram-Bd4DGbnk.js +0 -21
- package/dist/telegram-Bd4DGbnk.js.map +0 -1
- package/dist/three-dots-M94oc7-3.js +0 -10
- package/dist/three-dots-M94oc7-3.js.map +0 -1
- package/dist/transactions-DwtZvXx1.js +0 -38
- package/dist/transactions-DwtZvXx1.js.map +0 -1
- package/dist/twitch--lJ-X_Y6.js +0 -23
- package/dist/twitch--lJ-X_Y6.js.map +0 -1
- package/dist/twitterIcon-DDp_lnzc.js +0 -11
- package/dist/twitterIcon-DDp_lnzc.js.map +0 -1
- package/dist/vanilla-CgG5xMJO.js +0 -448
- package/dist/vanilla-CgG5xMJO.js.map +0 -1
- package/dist/verify-Doojt-tK.js +0 -13
- package/dist/verify-Doojt-tK.js.map +0 -1
- package/dist/verify-filled-EHdbo2B7.js +0 -13
- package/dist/verify-filled-EHdbo2B7.js.map +0 -1
- package/dist/w3m-modal-CVsid-gN.js +0 -1725
- package/dist/w3m-modal-CVsid-gN.js.map +0 -1
- package/dist/w3m-modal-CZ4s4A2R.js +0 -2008
- package/dist/w3m-modal-CZ4s4A2R.js.map +0 -1
- package/dist/wallet-CowxEORz.js +0 -13
- package/dist/wallet-CowxEORz.js.map +0 -1
- package/dist/wallet-placeholder-B7p7Oae2.js +0 -19
- package/dist/wallet-placeholder-B7p7Oae2.js.map +0 -1
- package/dist/wallet-standard-BUMbKbZo.js +0 -523
- package/dist/wallet-standard-BUMbKbZo.js.map +0 -1
- package/dist/walletconnect-CKMr88Pk.js +0 -39
- package/dist/walletconnect-CKMr88Pk.js.map +0 -1
- package/dist/warning-circle-CjIPgJnm.js +0 -17
- package/dist/warning-circle-CjIPgJnm.js.map +0 -1
- package/dist/x-CaxhfhgU.js +0 -17
- package/dist/x-CaxhfhgU.js.map +0 -1
package/dist/index-BqpTTobE.js
DELETED
|
@@ -1,984 +0,0 @@
|
|
|
1
|
-
import { b8 as commonjsGlobal, cg as getAugmentedNamespace, ch as _esm, bp as events, b7 as getDefaultExportFromCjs } from "./appkit-DY7XpK4K.js";
|
|
2
|
-
import { d as dist$1 } from "./index-BcCvzVg5.js";
|
|
3
|
-
function _mergeNamespaces(n, m) {
|
|
4
|
-
for (var i = 0; i < m.length; i++) {
|
|
5
|
-
const e = m[i];
|
|
6
|
-
if (typeof e !== "string" && !Array.isArray(e)) {
|
|
7
|
-
for (const k in e) {
|
|
8
|
-
if (k !== "default" && !(k in n)) {
|
|
9
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
|
-
if (d) {
|
|
11
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: () => e[k]
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
|
|
21
|
-
}
|
|
22
|
-
var dist = {};
|
|
23
|
-
var provider = {};
|
|
24
|
-
var cjs = {};
|
|
25
|
-
var sdk$1 = {};
|
|
26
|
-
var communication = {};
|
|
27
|
-
var messageFormatter = {};
|
|
28
|
-
var version = {};
|
|
29
|
-
Object.defineProperty(version, "__esModule", { value: true });
|
|
30
|
-
version.getSDKVersion = void 0;
|
|
31
|
-
const getSDKVersion = () => "9.1.0";
|
|
32
|
-
version.getSDKVersion = getSDKVersion;
|
|
33
|
-
var utils$1 = {};
|
|
34
|
-
Object.defineProperty(utils$1, "__esModule", { value: true });
|
|
35
|
-
utils$1.generateRequestId = void 0;
|
|
36
|
-
const dec2hex = (dec) => dec.toString(16).padStart(2, "0");
|
|
37
|
-
const generateId = (len) => {
|
|
38
|
-
const arr = new Uint8Array(len / 2);
|
|
39
|
-
window.crypto.getRandomValues(arr);
|
|
40
|
-
return Array.from(arr, dec2hex).join("");
|
|
41
|
-
};
|
|
42
|
-
const generateRequestId = () => {
|
|
43
|
-
if (typeof window !== "undefined") {
|
|
44
|
-
return generateId(10);
|
|
45
|
-
}
|
|
46
|
-
return (/* @__PURE__ */ new Date()).getTime().toString(36);
|
|
47
|
-
};
|
|
48
|
-
utils$1.generateRequestId = generateRequestId;
|
|
49
|
-
Object.defineProperty(messageFormatter, "__esModule", { value: true });
|
|
50
|
-
messageFormatter.MessageFormatter = void 0;
|
|
51
|
-
const version_js_1 = version;
|
|
52
|
-
const utils_js_1 = utils$1;
|
|
53
|
-
class MessageFormatter {
|
|
54
|
-
}
|
|
55
|
-
messageFormatter.MessageFormatter = MessageFormatter;
|
|
56
|
-
MessageFormatter.makeRequest = (method, params) => {
|
|
57
|
-
const id = (0, utils_js_1.generateRequestId)();
|
|
58
|
-
return {
|
|
59
|
-
id,
|
|
60
|
-
method,
|
|
61
|
-
params,
|
|
62
|
-
env: {
|
|
63
|
-
sdkVersion: (0, version_js_1.getSDKVersion)()
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
MessageFormatter.makeResponse = (id, data, version2) => ({
|
|
68
|
-
id,
|
|
69
|
-
success: true,
|
|
70
|
-
version: version2,
|
|
71
|
-
data
|
|
72
|
-
});
|
|
73
|
-
MessageFormatter.makeErrorResponse = (id, error, version2) => ({
|
|
74
|
-
id,
|
|
75
|
-
success: false,
|
|
76
|
-
error,
|
|
77
|
-
version: version2
|
|
78
|
-
});
|
|
79
|
-
var methods = {};
|
|
80
|
-
Object.defineProperty(methods, "__esModule", { value: true });
|
|
81
|
-
methods.RestrictedMethods = methods.Methods = void 0;
|
|
82
|
-
var Methods;
|
|
83
|
-
(function(Methods2) {
|
|
84
|
-
Methods2["sendTransactions"] = "sendTransactions";
|
|
85
|
-
Methods2["rpcCall"] = "rpcCall";
|
|
86
|
-
Methods2["getChainInfo"] = "getChainInfo";
|
|
87
|
-
Methods2["getSafeInfo"] = "getSafeInfo";
|
|
88
|
-
Methods2["getTxBySafeTxHash"] = "getTxBySafeTxHash";
|
|
89
|
-
Methods2["getSafeBalances"] = "getSafeBalances";
|
|
90
|
-
Methods2["signMessage"] = "signMessage";
|
|
91
|
-
Methods2["signTypedMessage"] = "signTypedMessage";
|
|
92
|
-
Methods2["getEnvironmentInfo"] = "getEnvironmentInfo";
|
|
93
|
-
Methods2["getOffChainSignature"] = "getOffChainSignature";
|
|
94
|
-
Methods2["requestAddressBook"] = "requestAddressBook";
|
|
95
|
-
Methods2["wallet_getPermissions"] = "wallet_getPermissions";
|
|
96
|
-
Methods2["wallet_requestPermissions"] = "wallet_requestPermissions";
|
|
97
|
-
})(Methods || (methods.Methods = Methods = {}));
|
|
98
|
-
var RestrictedMethods;
|
|
99
|
-
(function(RestrictedMethods2) {
|
|
100
|
-
RestrictedMethods2["requestAddressBook"] = "requestAddressBook";
|
|
101
|
-
})(RestrictedMethods || (methods.RestrictedMethods = RestrictedMethods = {}));
|
|
102
|
-
(function(exports) {
|
|
103
|
-
var __createBinding = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
104
|
-
if (k2 === void 0) k2 = k;
|
|
105
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
106
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
107
|
-
desc = { enumerable: true, get: function() {
|
|
108
|
-
return m[k];
|
|
109
|
-
} };
|
|
110
|
-
}
|
|
111
|
-
Object.defineProperty(o, k2, desc);
|
|
112
|
-
}) : (function(o, m, k, k2) {
|
|
113
|
-
if (k2 === void 0) k2 = k;
|
|
114
|
-
o[k2] = m[k];
|
|
115
|
-
}));
|
|
116
|
-
var __exportStar = commonjsGlobal && commonjsGlobal.__exportStar || function(m, exports2) {
|
|
117
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
|
|
118
|
-
};
|
|
119
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
120
|
-
const messageFormatter_js_1 = messageFormatter;
|
|
121
|
-
class PostMessageCommunicator {
|
|
122
|
-
constructor(allowedOrigins = null, debugMode = false) {
|
|
123
|
-
this.allowedOrigins = null;
|
|
124
|
-
this.callbacks = /* @__PURE__ */ new Map();
|
|
125
|
-
this.debugMode = false;
|
|
126
|
-
this.isServer = typeof window === "undefined";
|
|
127
|
-
this.isValidMessage = ({ origin, data, source }) => {
|
|
128
|
-
const emptyOrMalformed = !data;
|
|
129
|
-
const sentFromParentEl = !this.isServer && source === window.parent;
|
|
130
|
-
const majorVersionNumber = typeof data.version !== "undefined" && parseInt(data.version.split(".")[0]);
|
|
131
|
-
const allowedSDKVersion = typeof majorVersionNumber === "number" && majorVersionNumber >= 1;
|
|
132
|
-
let validOrigin = true;
|
|
133
|
-
if (Array.isArray(this.allowedOrigins)) {
|
|
134
|
-
validOrigin = this.allowedOrigins.find((regExp) => regExp.test(origin)) !== void 0;
|
|
135
|
-
}
|
|
136
|
-
return !emptyOrMalformed && sentFromParentEl && allowedSDKVersion && validOrigin;
|
|
137
|
-
};
|
|
138
|
-
this.logIncomingMessage = (msg) => {
|
|
139
|
-
console.info(`Safe Apps SDK v1: A message was received from origin ${msg.origin}. `, msg.data);
|
|
140
|
-
};
|
|
141
|
-
this.onParentMessage = (msg) => {
|
|
142
|
-
if (this.isValidMessage(msg)) {
|
|
143
|
-
this.debugMode && this.logIncomingMessage(msg);
|
|
144
|
-
this.handleIncomingMessage(msg.data);
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
this.handleIncomingMessage = (payload) => {
|
|
148
|
-
const { id } = payload;
|
|
149
|
-
const cb = this.callbacks.get(id);
|
|
150
|
-
if (cb) {
|
|
151
|
-
cb(payload);
|
|
152
|
-
this.callbacks.delete(id);
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
this.send = (method, params) => {
|
|
156
|
-
const request = messageFormatter_js_1.MessageFormatter.makeRequest(method, params);
|
|
157
|
-
if (this.isServer) {
|
|
158
|
-
throw new Error("Window doesn't exist");
|
|
159
|
-
}
|
|
160
|
-
window.parent.postMessage(request, "*");
|
|
161
|
-
return new Promise((resolve, reject) => {
|
|
162
|
-
this.callbacks.set(request.id, (response) => {
|
|
163
|
-
if (!response.success) {
|
|
164
|
-
reject(new Error(response.error));
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
resolve(response);
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
};
|
|
171
|
-
this.allowedOrigins = allowedOrigins;
|
|
172
|
-
this.debugMode = debugMode;
|
|
173
|
-
if (!this.isServer) {
|
|
174
|
-
window.addEventListener("message", this.onParentMessage);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
exports.default = PostMessageCommunicator;
|
|
179
|
-
__exportStar(methods, exports);
|
|
180
|
-
})(communication);
|
|
181
|
-
var txs = {};
|
|
182
|
-
var types = {};
|
|
183
|
-
var sdk = {};
|
|
184
|
-
Object.defineProperty(sdk, "__esModule", { value: true });
|
|
185
|
-
sdk.isObjectEIP712TypedData = void 0;
|
|
186
|
-
const isObjectEIP712TypedData = (obj) => {
|
|
187
|
-
return typeof obj === "object" && obj != null && "domain" in obj && "types" in obj && "message" in obj;
|
|
188
|
-
};
|
|
189
|
-
sdk.isObjectEIP712TypedData = isObjectEIP712TypedData;
|
|
190
|
-
var rpc = {};
|
|
191
|
-
Object.defineProperty(rpc, "__esModule", { value: true });
|
|
192
|
-
var gateway = {};
|
|
193
|
-
(function(exports) {
|
|
194
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
195
|
-
exports.TransferDirection = exports.TransactionStatus = exports.TokenType = exports.Operation = void 0;
|
|
196
|
-
var safe_gateway_typescript_sdk_1 = dist$1;
|
|
197
|
-
Object.defineProperty(exports, "Operation", { enumerable: true, get: function() {
|
|
198
|
-
return safe_gateway_typescript_sdk_1.Operation;
|
|
199
|
-
} });
|
|
200
|
-
Object.defineProperty(exports, "TokenType", { enumerable: true, get: function() {
|
|
201
|
-
return safe_gateway_typescript_sdk_1.TokenType;
|
|
202
|
-
} });
|
|
203
|
-
Object.defineProperty(exports, "TransactionStatus", { enumerable: true, get: function() {
|
|
204
|
-
return safe_gateway_typescript_sdk_1.TransactionStatus;
|
|
205
|
-
} });
|
|
206
|
-
Object.defineProperty(exports, "TransferDirection", { enumerable: true, get: function() {
|
|
207
|
-
return safe_gateway_typescript_sdk_1.TransferDirection;
|
|
208
|
-
} });
|
|
209
|
-
})(gateway);
|
|
210
|
-
var messaging = {};
|
|
211
|
-
Object.defineProperty(messaging, "__esModule", { value: true });
|
|
212
|
-
(function(exports) {
|
|
213
|
-
var __createBinding = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
214
|
-
if (k2 === void 0) k2 = k;
|
|
215
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
216
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
217
|
-
desc = { enumerable: true, get: function() {
|
|
218
|
-
return m[k];
|
|
219
|
-
} };
|
|
220
|
-
}
|
|
221
|
-
Object.defineProperty(o, k2, desc);
|
|
222
|
-
}) : (function(o, m, k, k2) {
|
|
223
|
-
if (k2 === void 0) k2 = k;
|
|
224
|
-
o[k2] = m[k];
|
|
225
|
-
}));
|
|
226
|
-
var __exportStar = commonjsGlobal && commonjsGlobal.__exportStar || function(m, exports2) {
|
|
227
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
|
|
228
|
-
};
|
|
229
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
230
|
-
__exportStar(sdk, exports);
|
|
231
|
-
__exportStar(rpc, exports);
|
|
232
|
-
__exportStar(gateway, exports);
|
|
233
|
-
__exportStar(messaging, exports);
|
|
234
|
-
})(types);
|
|
235
|
-
Object.defineProperty(txs, "__esModule", { value: true });
|
|
236
|
-
txs.TXs = void 0;
|
|
237
|
-
const methods_js_1$3 = methods;
|
|
238
|
-
const index_js_1$3 = types;
|
|
239
|
-
class TXs {
|
|
240
|
-
constructor(communicator) {
|
|
241
|
-
this.communicator = communicator;
|
|
242
|
-
}
|
|
243
|
-
async getBySafeTxHash(safeTxHash) {
|
|
244
|
-
if (!safeTxHash) {
|
|
245
|
-
throw new Error("Invalid safeTxHash");
|
|
246
|
-
}
|
|
247
|
-
const response = await this.communicator.send(methods_js_1$3.Methods.getTxBySafeTxHash, { safeTxHash });
|
|
248
|
-
return response.data;
|
|
249
|
-
}
|
|
250
|
-
async signMessage(message) {
|
|
251
|
-
const messagePayload = {
|
|
252
|
-
message
|
|
253
|
-
};
|
|
254
|
-
const response = await this.communicator.send(methods_js_1$3.Methods.signMessage, messagePayload);
|
|
255
|
-
return response.data;
|
|
256
|
-
}
|
|
257
|
-
async signTypedMessage(typedData) {
|
|
258
|
-
if (!(0, index_js_1$3.isObjectEIP712TypedData)(typedData)) {
|
|
259
|
-
throw new Error("Invalid typed data");
|
|
260
|
-
}
|
|
261
|
-
const response = await this.communicator.send(methods_js_1$3.Methods.signTypedMessage, { typedData });
|
|
262
|
-
return response.data;
|
|
263
|
-
}
|
|
264
|
-
async send({ txs: txs2, params }) {
|
|
265
|
-
if (!txs2 || !txs2.length) {
|
|
266
|
-
throw new Error("No transactions were passed");
|
|
267
|
-
}
|
|
268
|
-
const messagePayload = {
|
|
269
|
-
txs: txs2,
|
|
270
|
-
params
|
|
271
|
-
};
|
|
272
|
-
const response = await this.communicator.send(methods_js_1$3.Methods.sendTransactions, messagePayload);
|
|
273
|
-
return response.data;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
txs.TXs = TXs;
|
|
277
|
-
var eth = {};
|
|
278
|
-
var constants = {};
|
|
279
|
-
Object.defineProperty(constants, "__esModule", { value: true });
|
|
280
|
-
constants.RPC_CALLS = void 0;
|
|
281
|
-
constants.RPC_CALLS = {
|
|
282
|
-
eth_call: "eth_call",
|
|
283
|
-
eth_gasPrice: "eth_gasPrice",
|
|
284
|
-
eth_getLogs: "eth_getLogs",
|
|
285
|
-
eth_getBalance: "eth_getBalance",
|
|
286
|
-
eth_getCode: "eth_getCode",
|
|
287
|
-
eth_getBlockByHash: "eth_getBlockByHash",
|
|
288
|
-
eth_getBlockByNumber: "eth_getBlockByNumber",
|
|
289
|
-
eth_getStorageAt: "eth_getStorageAt",
|
|
290
|
-
eth_getTransactionByHash: "eth_getTransactionByHash",
|
|
291
|
-
eth_getTransactionReceipt: "eth_getTransactionReceipt",
|
|
292
|
-
eth_getTransactionCount: "eth_getTransactionCount",
|
|
293
|
-
eth_estimateGas: "eth_estimateGas",
|
|
294
|
-
safe_setSettings: "safe_setSettings"
|
|
295
|
-
};
|
|
296
|
-
Object.defineProperty(eth, "__esModule", { value: true });
|
|
297
|
-
eth.Eth = void 0;
|
|
298
|
-
const constants_js_1$1 = constants;
|
|
299
|
-
const methods_js_1$2 = methods;
|
|
300
|
-
const inputFormatters = {
|
|
301
|
-
defaultBlockParam: (arg = "latest") => arg,
|
|
302
|
-
returnFullTxObjectParam: (arg = false) => arg,
|
|
303
|
-
blockNumberToHex: (arg) => Number.isInteger(arg) ? `0x${arg.toString(16)}` : arg
|
|
304
|
-
};
|
|
305
|
-
class Eth {
|
|
306
|
-
constructor(communicator) {
|
|
307
|
-
this.communicator = communicator;
|
|
308
|
-
this.call = this.buildRequest({
|
|
309
|
-
call: constants_js_1$1.RPC_CALLS.eth_call,
|
|
310
|
-
formatters: [null, inputFormatters.defaultBlockParam]
|
|
311
|
-
});
|
|
312
|
-
this.getBalance = this.buildRequest({
|
|
313
|
-
call: constants_js_1$1.RPC_CALLS.eth_getBalance,
|
|
314
|
-
formatters: [null, inputFormatters.defaultBlockParam]
|
|
315
|
-
});
|
|
316
|
-
this.getCode = this.buildRequest({
|
|
317
|
-
call: constants_js_1$1.RPC_CALLS.eth_getCode,
|
|
318
|
-
formatters: [null, inputFormatters.defaultBlockParam]
|
|
319
|
-
});
|
|
320
|
-
this.getStorageAt = this.buildRequest({
|
|
321
|
-
call: constants_js_1$1.RPC_CALLS.eth_getStorageAt,
|
|
322
|
-
formatters: [null, inputFormatters.blockNumberToHex, inputFormatters.defaultBlockParam]
|
|
323
|
-
});
|
|
324
|
-
this.getPastLogs = this.buildRequest({
|
|
325
|
-
call: constants_js_1$1.RPC_CALLS.eth_getLogs
|
|
326
|
-
});
|
|
327
|
-
this.getBlockByHash = this.buildRequest({
|
|
328
|
-
call: constants_js_1$1.RPC_CALLS.eth_getBlockByHash,
|
|
329
|
-
formatters: [null, inputFormatters.returnFullTxObjectParam]
|
|
330
|
-
});
|
|
331
|
-
this.getBlockByNumber = this.buildRequest({
|
|
332
|
-
call: constants_js_1$1.RPC_CALLS.eth_getBlockByNumber,
|
|
333
|
-
formatters: [inputFormatters.blockNumberToHex, inputFormatters.returnFullTxObjectParam]
|
|
334
|
-
});
|
|
335
|
-
this.getTransactionByHash = this.buildRequest({
|
|
336
|
-
call: constants_js_1$1.RPC_CALLS.eth_getTransactionByHash
|
|
337
|
-
});
|
|
338
|
-
this.getTransactionReceipt = this.buildRequest({
|
|
339
|
-
call: constants_js_1$1.RPC_CALLS.eth_getTransactionReceipt
|
|
340
|
-
});
|
|
341
|
-
this.getTransactionCount = this.buildRequest({
|
|
342
|
-
call: constants_js_1$1.RPC_CALLS.eth_getTransactionCount,
|
|
343
|
-
formatters: [null, inputFormatters.defaultBlockParam]
|
|
344
|
-
});
|
|
345
|
-
this.getGasPrice = this.buildRequest({
|
|
346
|
-
call: constants_js_1$1.RPC_CALLS.eth_gasPrice
|
|
347
|
-
});
|
|
348
|
-
this.getEstimateGas = (transaction) => this.buildRequest({
|
|
349
|
-
call: constants_js_1$1.RPC_CALLS.eth_estimateGas
|
|
350
|
-
})([transaction]);
|
|
351
|
-
this.setSafeSettings = this.buildRequest({
|
|
352
|
-
call: constants_js_1$1.RPC_CALLS.safe_setSettings
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
buildRequest(args) {
|
|
356
|
-
const { call, formatters } = args;
|
|
357
|
-
return async (params) => {
|
|
358
|
-
if (formatters && Array.isArray(params)) {
|
|
359
|
-
formatters.forEach((formatter, i) => {
|
|
360
|
-
if (formatter) {
|
|
361
|
-
params[i] = formatter(params[i]);
|
|
362
|
-
}
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
const payload = {
|
|
366
|
-
call,
|
|
367
|
-
params: params || []
|
|
368
|
-
};
|
|
369
|
-
const response = await this.communicator.send(methods_js_1$2.Methods.rpcCall, payload);
|
|
370
|
-
return response.data;
|
|
371
|
-
};
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
eth.Eth = Eth;
|
|
375
|
-
var safe = {};
|
|
376
|
-
const require$$0 = /* @__PURE__ */ getAugmentedNamespace(_esm);
|
|
377
|
-
var signatures = {};
|
|
378
|
-
Object.defineProperty(signatures, "__esModule", { value: true });
|
|
379
|
-
signatures.MAGIC_VALUE_BYTES = signatures.MAGIC_VALUE = void 0;
|
|
380
|
-
const MAGIC_VALUE = "0x1626ba7e";
|
|
381
|
-
signatures.MAGIC_VALUE = MAGIC_VALUE;
|
|
382
|
-
const MAGIC_VALUE_BYTES = "0x20c13b0b";
|
|
383
|
-
signatures.MAGIC_VALUE_BYTES = MAGIC_VALUE_BYTES;
|
|
384
|
-
var requirePermissions = {};
|
|
385
|
-
var wallet = {};
|
|
386
|
-
var permissions = {};
|
|
387
|
-
Object.defineProperty(permissions, "__esModule", { value: true });
|
|
388
|
-
permissions.PermissionsError = permissions.PERMISSIONS_REQUEST_REJECTED = void 0;
|
|
389
|
-
permissions.PERMISSIONS_REQUEST_REJECTED = 4001;
|
|
390
|
-
class PermissionsError extends Error {
|
|
391
|
-
constructor(message, code, data) {
|
|
392
|
-
super(message);
|
|
393
|
-
this.code = code;
|
|
394
|
-
this.data = data;
|
|
395
|
-
Object.setPrototypeOf(this, PermissionsError.prototype);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
permissions.PermissionsError = PermissionsError;
|
|
399
|
-
Object.defineProperty(wallet, "__esModule", { value: true });
|
|
400
|
-
wallet.Wallet = void 0;
|
|
401
|
-
const methods_js_1$1 = methods;
|
|
402
|
-
const permissions_js_1$1 = permissions;
|
|
403
|
-
class Wallet {
|
|
404
|
-
constructor(communicator) {
|
|
405
|
-
this.communicator = communicator;
|
|
406
|
-
}
|
|
407
|
-
async getPermissions() {
|
|
408
|
-
const response = await this.communicator.send(methods_js_1$1.Methods.wallet_getPermissions, void 0);
|
|
409
|
-
return response.data;
|
|
410
|
-
}
|
|
411
|
-
async requestPermissions(permissions2) {
|
|
412
|
-
if (!this.isPermissionRequestValid(permissions2)) {
|
|
413
|
-
throw new permissions_js_1$1.PermissionsError("Permissions request is invalid", permissions_js_1$1.PERMISSIONS_REQUEST_REJECTED);
|
|
414
|
-
}
|
|
415
|
-
try {
|
|
416
|
-
const response = await this.communicator.send(methods_js_1$1.Methods.wallet_requestPermissions, permissions2);
|
|
417
|
-
return response.data;
|
|
418
|
-
} catch {
|
|
419
|
-
throw new permissions_js_1$1.PermissionsError("Permissions rejected", permissions_js_1$1.PERMISSIONS_REQUEST_REJECTED);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
isPermissionRequestValid(permissions2) {
|
|
423
|
-
return permissions2.every((pr) => {
|
|
424
|
-
if (typeof pr === "object") {
|
|
425
|
-
return Object.keys(pr).every((method) => {
|
|
426
|
-
if (Object.values(methods_js_1$1.RestrictedMethods).includes(method)) {
|
|
427
|
-
return true;
|
|
428
|
-
}
|
|
429
|
-
return false;
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
|
-
return false;
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
wallet.Wallet = Wallet;
|
|
437
|
-
Object.defineProperty(requirePermissions, "__esModule", { value: true });
|
|
438
|
-
const index_js_1$2 = wallet;
|
|
439
|
-
const permissions_js_1 = permissions;
|
|
440
|
-
const hasPermission = (required, permissions2) => permissions2.some((permission) => permission.parentCapability === required);
|
|
441
|
-
const requirePermission = () => (_, propertyKey, descriptor) => {
|
|
442
|
-
const originalMethod = descriptor.value;
|
|
443
|
-
descriptor.value = async function() {
|
|
444
|
-
const wallet2 = new index_js_1$2.Wallet(this.communicator);
|
|
445
|
-
let currentPermissions = await wallet2.getPermissions();
|
|
446
|
-
if (!hasPermission(propertyKey, currentPermissions)) {
|
|
447
|
-
currentPermissions = await wallet2.requestPermissions([{ [propertyKey]: {} }]);
|
|
448
|
-
}
|
|
449
|
-
if (!hasPermission(propertyKey, currentPermissions)) {
|
|
450
|
-
throw new permissions_js_1.PermissionsError("Permissions rejected", permissions_js_1.PERMISSIONS_REQUEST_REJECTED);
|
|
451
|
-
}
|
|
452
|
-
return originalMethod.apply(this);
|
|
453
|
-
};
|
|
454
|
-
return descriptor;
|
|
455
|
-
};
|
|
456
|
-
requirePermissions.default = requirePermission;
|
|
457
|
-
var __decorate = commonjsGlobal && commonjsGlobal.__decorate || function(decorators, target, key, desc) {
|
|
458
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
459
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
460
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
461
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
462
|
-
};
|
|
463
|
-
var __importDefault$1 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
|
|
464
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
465
|
-
};
|
|
466
|
-
Object.defineProperty(safe, "__esModule", { value: true });
|
|
467
|
-
safe.Safe = void 0;
|
|
468
|
-
const viem_1 = require$$0;
|
|
469
|
-
const signatures_js_1 = signatures;
|
|
470
|
-
const methods_js_1 = methods;
|
|
471
|
-
const constants_js_1 = constants;
|
|
472
|
-
const index_js_1$1 = types;
|
|
473
|
-
const requirePermissions_js_1 = __importDefault$1(requirePermissions);
|
|
474
|
-
class Safe {
|
|
475
|
-
constructor(communicator) {
|
|
476
|
-
this.communicator = communicator;
|
|
477
|
-
}
|
|
478
|
-
async getChainInfo() {
|
|
479
|
-
const response = await this.communicator.send(methods_js_1.Methods.getChainInfo, void 0);
|
|
480
|
-
return response.data;
|
|
481
|
-
}
|
|
482
|
-
async getInfo() {
|
|
483
|
-
const response = await this.communicator.send(methods_js_1.Methods.getSafeInfo, void 0);
|
|
484
|
-
return response.data;
|
|
485
|
-
}
|
|
486
|
-
// There is a possibility that this method will change because we may add pagination to the endpoint
|
|
487
|
-
async experimental_getBalances({ currency = "usd" } = {}) {
|
|
488
|
-
const response = await this.communicator.send(methods_js_1.Methods.getSafeBalances, {
|
|
489
|
-
currency
|
|
490
|
-
});
|
|
491
|
-
return response.data;
|
|
492
|
-
}
|
|
493
|
-
async check1271Signature(messageHash, signature = "0x") {
|
|
494
|
-
const safeInfo = await this.getInfo();
|
|
495
|
-
const encodedIsValidSignatureCall = (0, viem_1.encodeFunctionData)({
|
|
496
|
-
abi: [
|
|
497
|
-
{
|
|
498
|
-
constant: false,
|
|
499
|
-
inputs: [
|
|
500
|
-
{
|
|
501
|
-
name: "_dataHash",
|
|
502
|
-
type: "bytes32"
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
name: "_signature",
|
|
506
|
-
type: "bytes"
|
|
507
|
-
}
|
|
508
|
-
],
|
|
509
|
-
name: "isValidSignature",
|
|
510
|
-
outputs: [
|
|
511
|
-
{
|
|
512
|
-
name: "",
|
|
513
|
-
type: "bytes4"
|
|
514
|
-
}
|
|
515
|
-
],
|
|
516
|
-
payable: false,
|
|
517
|
-
stateMutability: "nonpayable",
|
|
518
|
-
type: "function"
|
|
519
|
-
}
|
|
520
|
-
],
|
|
521
|
-
functionName: "isValidSignature",
|
|
522
|
-
args: [messageHash, signature]
|
|
523
|
-
});
|
|
524
|
-
const payload = {
|
|
525
|
-
call: constants_js_1.RPC_CALLS.eth_call,
|
|
526
|
-
params: [
|
|
527
|
-
{
|
|
528
|
-
to: safeInfo.safeAddress,
|
|
529
|
-
data: encodedIsValidSignatureCall
|
|
530
|
-
},
|
|
531
|
-
"latest"
|
|
532
|
-
]
|
|
533
|
-
};
|
|
534
|
-
try {
|
|
535
|
-
const response = await this.communicator.send(methods_js_1.Methods.rpcCall, payload);
|
|
536
|
-
return response.data.slice(0, 10).toLowerCase() === signatures_js_1.MAGIC_VALUE;
|
|
537
|
-
} catch (err) {
|
|
538
|
-
return false;
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
async check1271SignatureBytes(messageHash, signature = "0x") {
|
|
542
|
-
const safeInfo = await this.getInfo();
|
|
543
|
-
const encodedIsValidSignatureCall = (0, viem_1.encodeFunctionData)({
|
|
544
|
-
abi: [
|
|
545
|
-
{
|
|
546
|
-
constant: false,
|
|
547
|
-
inputs: [
|
|
548
|
-
{
|
|
549
|
-
name: "_data",
|
|
550
|
-
type: "bytes"
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
name: "_signature",
|
|
554
|
-
type: "bytes"
|
|
555
|
-
}
|
|
556
|
-
],
|
|
557
|
-
name: "isValidSignature",
|
|
558
|
-
outputs: [
|
|
559
|
-
{
|
|
560
|
-
name: "",
|
|
561
|
-
type: "bytes4"
|
|
562
|
-
}
|
|
563
|
-
],
|
|
564
|
-
payable: false,
|
|
565
|
-
stateMutability: "nonpayable",
|
|
566
|
-
type: "function"
|
|
567
|
-
}
|
|
568
|
-
],
|
|
569
|
-
functionName: "isValidSignature",
|
|
570
|
-
args: [messageHash, signature]
|
|
571
|
-
});
|
|
572
|
-
const payload = {
|
|
573
|
-
call: constants_js_1.RPC_CALLS.eth_call,
|
|
574
|
-
params: [
|
|
575
|
-
{
|
|
576
|
-
to: safeInfo.safeAddress,
|
|
577
|
-
data: encodedIsValidSignatureCall
|
|
578
|
-
},
|
|
579
|
-
"latest"
|
|
580
|
-
]
|
|
581
|
-
};
|
|
582
|
-
try {
|
|
583
|
-
const response = await this.communicator.send(methods_js_1.Methods.rpcCall, payload);
|
|
584
|
-
return response.data.slice(0, 10).toLowerCase() === signatures_js_1.MAGIC_VALUE_BYTES;
|
|
585
|
-
} catch (err) {
|
|
586
|
-
return false;
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
calculateMessageHash(message) {
|
|
590
|
-
return (0, viem_1.hashMessage)(message);
|
|
591
|
-
}
|
|
592
|
-
calculateTypedMessageHash(typedMessage) {
|
|
593
|
-
const chainId = typeof typedMessage.domain.chainId === "object" ? typedMessage.domain.chainId.toNumber() : Number(typedMessage.domain.chainId);
|
|
594
|
-
let primaryType = typedMessage.primaryType;
|
|
595
|
-
if (!primaryType) {
|
|
596
|
-
const fields = Object.values(typedMessage.types);
|
|
597
|
-
const primaryTypes = Object.keys(typedMessage.types).filter((typeName) => fields.every((dataTypes) => dataTypes.every(({ type }) => type.replace("[", "").replace("]", "") !== typeName)));
|
|
598
|
-
if (primaryTypes.length === 0 || primaryTypes.length > 1)
|
|
599
|
-
throw new Error("Please specify primaryType");
|
|
600
|
-
primaryType = primaryTypes[0];
|
|
601
|
-
}
|
|
602
|
-
return (0, viem_1.hashTypedData)({
|
|
603
|
-
message: typedMessage.message,
|
|
604
|
-
domain: {
|
|
605
|
-
...typedMessage.domain,
|
|
606
|
-
chainId,
|
|
607
|
-
verifyingContract: typedMessage.domain.verifyingContract,
|
|
608
|
-
salt: typedMessage.domain.salt
|
|
609
|
-
},
|
|
610
|
-
types: typedMessage.types,
|
|
611
|
-
primaryType
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
async getOffChainSignature(messageHash) {
|
|
615
|
-
const response = await this.communicator.send(methods_js_1.Methods.getOffChainSignature, messageHash);
|
|
616
|
-
return response.data;
|
|
617
|
-
}
|
|
618
|
-
async isMessageSigned(message, signature = "0x") {
|
|
619
|
-
let check;
|
|
620
|
-
if (typeof message === "string") {
|
|
621
|
-
check = async () => {
|
|
622
|
-
const messageHash = this.calculateMessageHash(message);
|
|
623
|
-
const messageHashSigned = await this.isMessageHashSigned(messageHash, signature);
|
|
624
|
-
return messageHashSigned;
|
|
625
|
-
};
|
|
626
|
-
}
|
|
627
|
-
if ((0, index_js_1$1.isObjectEIP712TypedData)(message)) {
|
|
628
|
-
check = async () => {
|
|
629
|
-
const messageHash = this.calculateTypedMessageHash(message);
|
|
630
|
-
const messageHashSigned = await this.isMessageHashSigned(messageHash, signature);
|
|
631
|
-
return messageHashSigned;
|
|
632
|
-
};
|
|
633
|
-
}
|
|
634
|
-
if (check) {
|
|
635
|
-
const isValid = await check();
|
|
636
|
-
return isValid;
|
|
637
|
-
}
|
|
638
|
-
throw new Error("Invalid message type");
|
|
639
|
-
}
|
|
640
|
-
async isMessageHashSigned(messageHash, signature = "0x") {
|
|
641
|
-
const checks = [this.check1271Signature.bind(this), this.check1271SignatureBytes.bind(this)];
|
|
642
|
-
for (const check of checks) {
|
|
643
|
-
const isValid = await check(messageHash, signature);
|
|
644
|
-
if (isValid) {
|
|
645
|
-
return true;
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
return false;
|
|
649
|
-
}
|
|
650
|
-
async getEnvironmentInfo() {
|
|
651
|
-
const response = await this.communicator.send(methods_js_1.Methods.getEnvironmentInfo, void 0);
|
|
652
|
-
return response.data;
|
|
653
|
-
}
|
|
654
|
-
async requestAddressBook() {
|
|
655
|
-
const response = await this.communicator.send(methods_js_1.Methods.requestAddressBook, void 0);
|
|
656
|
-
return response.data;
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
safe.Safe = Safe;
|
|
660
|
-
__decorate([
|
|
661
|
-
(0, requirePermissions_js_1.default)()
|
|
662
|
-
], Safe.prototype, "requestAddressBook", null);
|
|
663
|
-
var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
|
|
664
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
665
|
-
};
|
|
666
|
-
Object.defineProperty(sdk$1, "__esModule", { value: true });
|
|
667
|
-
const index_js_1 = __importDefault(communication);
|
|
668
|
-
const index_js_2 = txs;
|
|
669
|
-
const index_js_3 = eth;
|
|
670
|
-
const index_js_4 = safe;
|
|
671
|
-
const index_js_5 = wallet;
|
|
672
|
-
class SafeAppsSDK {
|
|
673
|
-
constructor(opts = {}) {
|
|
674
|
-
const { allowedDomains = null, debug = false } = opts;
|
|
675
|
-
this.communicator = new index_js_1.default(allowedDomains, debug);
|
|
676
|
-
this.eth = new index_js_3.Eth(this.communicator);
|
|
677
|
-
this.txs = new index_js_2.TXs(this.communicator);
|
|
678
|
-
this.safe = new index_js_4.Safe(this.communicator);
|
|
679
|
-
this.wallet = new index_js_5.Wallet(this.communicator);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
sdk$1.default = SafeAppsSDK;
|
|
683
|
-
(function(exports) {
|
|
684
|
-
var __createBinding = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
685
|
-
if (k2 === void 0) k2 = k;
|
|
686
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
687
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
688
|
-
desc = { enumerable: true, get: function() {
|
|
689
|
-
return m[k];
|
|
690
|
-
} };
|
|
691
|
-
}
|
|
692
|
-
Object.defineProperty(o, k2, desc);
|
|
693
|
-
}) : (function(o, m, k, k2) {
|
|
694
|
-
if (k2 === void 0) k2 = k;
|
|
695
|
-
o[k2] = m[k];
|
|
696
|
-
}));
|
|
697
|
-
var __exportStar = commonjsGlobal && commonjsGlobal.__exportStar || function(m, exports2) {
|
|
698
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
|
|
699
|
-
};
|
|
700
|
-
var __importDefault2 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
|
|
701
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
702
|
-
};
|
|
703
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
704
|
-
exports.getSDKVersion = void 0;
|
|
705
|
-
const sdk_js_1 = __importDefault2(sdk$1);
|
|
706
|
-
exports.default = sdk_js_1.default;
|
|
707
|
-
__exportStar(sdk$1, exports);
|
|
708
|
-
__exportStar(types, exports);
|
|
709
|
-
__exportStar(methods, exports);
|
|
710
|
-
__exportStar(messageFormatter, exports);
|
|
711
|
-
var version_js_12 = version;
|
|
712
|
-
Object.defineProperty(exports, "getSDKVersion", { enumerable: true, get: function() {
|
|
713
|
-
return version_js_12.getSDKVersion;
|
|
714
|
-
} });
|
|
715
|
-
__exportStar(constants, exports);
|
|
716
|
-
})(cjs);
|
|
717
|
-
var utils = {};
|
|
718
|
-
Object.defineProperty(utils, "__esModule", { value: true });
|
|
719
|
-
utils.numberToHex = utils.getLowerCase = void 0;
|
|
720
|
-
function getLowerCase(value) {
|
|
721
|
-
if (value) {
|
|
722
|
-
return value.toLowerCase();
|
|
723
|
-
}
|
|
724
|
-
return value;
|
|
725
|
-
}
|
|
726
|
-
utils.getLowerCase = getLowerCase;
|
|
727
|
-
function numberToHex(value) {
|
|
728
|
-
return `0x${value.toString(16)}`;
|
|
729
|
-
}
|
|
730
|
-
utils.numberToHex = numberToHex;
|
|
731
|
-
Object.defineProperty(provider, "__esModule", { value: true });
|
|
732
|
-
provider.SafeAppProvider = void 0;
|
|
733
|
-
const safe_apps_sdk_1 = cjs;
|
|
734
|
-
const events_1 = events;
|
|
735
|
-
const utils_1 = utils;
|
|
736
|
-
class SafeAppProvider extends events_1.EventEmitter {
|
|
737
|
-
constructor(safe2, sdk2) {
|
|
738
|
-
super();
|
|
739
|
-
this.submittedTxs = /* @__PURE__ */ new Map();
|
|
740
|
-
this.safe = safe2;
|
|
741
|
-
this.sdk = sdk2;
|
|
742
|
-
}
|
|
743
|
-
async connect() {
|
|
744
|
-
this.emit("connect", { chainId: this.chainId });
|
|
745
|
-
return;
|
|
746
|
-
}
|
|
747
|
-
async disconnect() {
|
|
748
|
-
return;
|
|
749
|
-
}
|
|
750
|
-
get chainId() {
|
|
751
|
-
return this.safe.chainId;
|
|
752
|
-
}
|
|
753
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
754
|
-
async request(request) {
|
|
755
|
-
var _a, _b, _c, _d;
|
|
756
|
-
const { method, params = [] } = request;
|
|
757
|
-
switch (method) {
|
|
758
|
-
case "eth_accounts":
|
|
759
|
-
return [this.safe.safeAddress];
|
|
760
|
-
case "net_version":
|
|
761
|
-
case "eth_chainId":
|
|
762
|
-
return (0, utils_1.numberToHex)(this.chainId);
|
|
763
|
-
case "personal_sign": {
|
|
764
|
-
const [message, address] = params;
|
|
765
|
-
if (this.safe.safeAddress.toLowerCase() !== address.toLowerCase()) {
|
|
766
|
-
throw new Error("The address or message hash is invalid");
|
|
767
|
-
}
|
|
768
|
-
const response = await this.sdk.txs.signMessage(message);
|
|
769
|
-
const signature = "signature" in response ? response.signature : void 0;
|
|
770
|
-
return signature || "0x";
|
|
771
|
-
}
|
|
772
|
-
case "eth_sign": {
|
|
773
|
-
const [address, messageHash] = params;
|
|
774
|
-
if (this.safe.safeAddress.toLowerCase() !== address.toLowerCase() || !messageHash.startsWith("0x")) {
|
|
775
|
-
throw new Error("The address or message hash is invalid");
|
|
776
|
-
}
|
|
777
|
-
const response = await this.sdk.txs.signMessage(messageHash);
|
|
778
|
-
const signature = "signature" in response ? response.signature : void 0;
|
|
779
|
-
return signature || "0x";
|
|
780
|
-
}
|
|
781
|
-
case "eth_signTypedData":
|
|
782
|
-
case "eth_signTypedData_v4": {
|
|
783
|
-
const [address, typedData] = params;
|
|
784
|
-
const parsedTypedData = typeof typedData === "string" ? JSON.parse(typedData) : typedData;
|
|
785
|
-
if (this.safe.safeAddress.toLowerCase() !== address.toLowerCase()) {
|
|
786
|
-
throw new Error("The address is invalid");
|
|
787
|
-
}
|
|
788
|
-
const response = await this.sdk.txs.signTypedMessage(parsedTypedData);
|
|
789
|
-
const signature = "signature" in response ? response.signature : void 0;
|
|
790
|
-
return signature || "0x";
|
|
791
|
-
}
|
|
792
|
-
case "eth_sendTransaction":
|
|
793
|
-
const tx = {
|
|
794
|
-
...params[0],
|
|
795
|
-
value: params[0].value || "0",
|
|
796
|
-
data: params[0].data || "0x"
|
|
797
|
-
};
|
|
798
|
-
if (typeof tx.gas === "string" && tx.gas.startsWith("0x")) {
|
|
799
|
-
tx.gas = parseInt(tx.gas, 16);
|
|
800
|
-
}
|
|
801
|
-
const resp = await this.sdk.txs.send({
|
|
802
|
-
txs: [tx],
|
|
803
|
-
params: { safeTxGas: tx.gas }
|
|
804
|
-
});
|
|
805
|
-
this.submittedTxs.set(resp.safeTxHash, {
|
|
806
|
-
from: this.safe.safeAddress,
|
|
807
|
-
hash: resp.safeTxHash,
|
|
808
|
-
gas: 0,
|
|
809
|
-
gasPrice: "0x00",
|
|
810
|
-
nonce: 0,
|
|
811
|
-
input: tx.data,
|
|
812
|
-
value: tx.value,
|
|
813
|
-
to: tx.to,
|
|
814
|
-
blockHash: null,
|
|
815
|
-
blockNumber: null,
|
|
816
|
-
transactionIndex: null
|
|
817
|
-
});
|
|
818
|
-
return resp.safeTxHash;
|
|
819
|
-
case "eth_blockNumber":
|
|
820
|
-
const block = await this.sdk.eth.getBlockByNumber(["latest"]);
|
|
821
|
-
return block.number;
|
|
822
|
-
case "eth_getBalance":
|
|
823
|
-
return this.sdk.eth.getBalance([(0, utils_1.getLowerCase)(params[0]), params[1]]);
|
|
824
|
-
case "eth_getCode":
|
|
825
|
-
return this.sdk.eth.getCode([(0, utils_1.getLowerCase)(params[0]), params[1]]);
|
|
826
|
-
case "eth_getTransactionCount":
|
|
827
|
-
return this.sdk.eth.getTransactionCount([(0, utils_1.getLowerCase)(params[0]), params[1]]);
|
|
828
|
-
case "eth_getStorageAt":
|
|
829
|
-
return this.sdk.eth.getStorageAt([(0, utils_1.getLowerCase)(params[0]), params[1], params[2]]);
|
|
830
|
-
case "eth_getBlockByNumber":
|
|
831
|
-
return this.sdk.eth.getBlockByNumber([params[0], params[1]]);
|
|
832
|
-
case "eth_getBlockByHash":
|
|
833
|
-
return this.sdk.eth.getBlockByHash([params[0], params[1]]);
|
|
834
|
-
case "eth_getTransactionByHash":
|
|
835
|
-
let txHash = params[0];
|
|
836
|
-
try {
|
|
837
|
-
const resp2 = await this.sdk.txs.getBySafeTxHash(txHash);
|
|
838
|
-
txHash = resp2.txHash || txHash;
|
|
839
|
-
} catch (e) {
|
|
840
|
-
}
|
|
841
|
-
if (this.submittedTxs.has(txHash)) {
|
|
842
|
-
return this.submittedTxs.get(txHash);
|
|
843
|
-
}
|
|
844
|
-
return this.sdk.eth.getTransactionByHash([txHash]).then((tx2) => {
|
|
845
|
-
if (tx2) {
|
|
846
|
-
tx2.hash = params[0];
|
|
847
|
-
}
|
|
848
|
-
return tx2;
|
|
849
|
-
});
|
|
850
|
-
case "eth_getTransactionReceipt": {
|
|
851
|
-
let txHash2 = params[0];
|
|
852
|
-
try {
|
|
853
|
-
const resp2 = await this.sdk.txs.getBySafeTxHash(txHash2);
|
|
854
|
-
txHash2 = resp2.txHash || txHash2;
|
|
855
|
-
} catch (e) {
|
|
856
|
-
}
|
|
857
|
-
return this.sdk.eth.getTransactionReceipt([txHash2]).then((tx2) => {
|
|
858
|
-
if (tx2) {
|
|
859
|
-
tx2.transactionHash = params[0];
|
|
860
|
-
}
|
|
861
|
-
return tx2;
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
case "eth_estimateGas": {
|
|
865
|
-
return this.sdk.eth.getEstimateGas(params[0]);
|
|
866
|
-
}
|
|
867
|
-
case "eth_call": {
|
|
868
|
-
return this.sdk.eth.call([params[0], params[1]]);
|
|
869
|
-
}
|
|
870
|
-
case "eth_getLogs":
|
|
871
|
-
return this.sdk.eth.getPastLogs([params[0]]);
|
|
872
|
-
case "eth_gasPrice":
|
|
873
|
-
return this.sdk.eth.getGasPrice();
|
|
874
|
-
case "wallet_getPermissions":
|
|
875
|
-
return this.sdk.wallet.getPermissions();
|
|
876
|
-
case "wallet_requestPermissions":
|
|
877
|
-
return this.sdk.wallet.requestPermissions(params[0]);
|
|
878
|
-
case "safe_setSettings":
|
|
879
|
-
return this.sdk.eth.setSafeSettings([params[0]]);
|
|
880
|
-
case "wallet_sendCalls": {
|
|
881
|
-
const { from, calls, chainId } = params[0];
|
|
882
|
-
if (chainId !== (0, utils_1.numberToHex)(this.chainId)) {
|
|
883
|
-
throw new Error(`Safe is not on chain ${chainId}`);
|
|
884
|
-
}
|
|
885
|
-
if (from !== this.safe.safeAddress) {
|
|
886
|
-
throw Error("Invalid from address");
|
|
887
|
-
}
|
|
888
|
-
const txs2 = calls.map((call, i) => {
|
|
889
|
-
if (!call.to) {
|
|
890
|
-
throw new Error(`Invalid call #${i}: missing "to" field`);
|
|
891
|
-
}
|
|
892
|
-
return {
|
|
893
|
-
to: call.to,
|
|
894
|
-
data: call.data ?? "0x",
|
|
895
|
-
value: call.value ?? (0, utils_1.numberToHex)(0)
|
|
896
|
-
};
|
|
897
|
-
});
|
|
898
|
-
const { safeTxHash } = await this.sdk.txs.send({ txs: txs2 });
|
|
899
|
-
const result = {
|
|
900
|
-
id: safeTxHash
|
|
901
|
-
};
|
|
902
|
-
return result;
|
|
903
|
-
}
|
|
904
|
-
case "wallet_getCallsStatus": {
|
|
905
|
-
const safeTxHash = params[0];
|
|
906
|
-
const CallStatus = {
|
|
907
|
-
[safe_apps_sdk_1.TransactionStatus.AWAITING_CONFIRMATIONS]: 100,
|
|
908
|
-
[safe_apps_sdk_1.TransactionStatus.AWAITING_EXECUTION]: 100,
|
|
909
|
-
[safe_apps_sdk_1.TransactionStatus.SUCCESS]: 200,
|
|
910
|
-
[safe_apps_sdk_1.TransactionStatus.CANCELLED]: 400,
|
|
911
|
-
[safe_apps_sdk_1.TransactionStatus.FAILED]: 500
|
|
912
|
-
};
|
|
913
|
-
const tx2 = await this.sdk.txs.getBySafeTxHash(safeTxHash);
|
|
914
|
-
const result = {
|
|
915
|
-
version: "1.0",
|
|
916
|
-
id: safeTxHash,
|
|
917
|
-
chainId: (0, utils_1.numberToHex)(this.chainId),
|
|
918
|
-
status: CallStatus[tx2.txStatus]
|
|
919
|
-
};
|
|
920
|
-
if (!tx2.txHash) {
|
|
921
|
-
return result;
|
|
922
|
-
}
|
|
923
|
-
const receipt = await this.sdk.eth.getTransactionReceipt([tx2.txHash]);
|
|
924
|
-
if (!receipt) {
|
|
925
|
-
return result;
|
|
926
|
-
}
|
|
927
|
-
const calls = ((_b = (_a = tx2.txData) == null ? void 0 : _a.dataDecoded) == null ? void 0 : _b.method) !== "multiSend" ? 1 : (
|
|
928
|
-
// Number of batched transactions
|
|
929
|
-
((_d = (_c = tx2.txData.dataDecoded.parameters) == null ? void 0 : _c[0].valueDecoded) == null ? void 0 : _d.length) ?? 1
|
|
930
|
-
);
|
|
931
|
-
const blockNumber = Number(receipt.blockNumber);
|
|
932
|
-
const gasUsed = Number(receipt.gasUsed);
|
|
933
|
-
result.receipts = Array(calls).fill({
|
|
934
|
-
logs: receipt.logs,
|
|
935
|
-
status: (0, utils_1.numberToHex)(tx2.txStatus === safe_apps_sdk_1.TransactionStatus.SUCCESS ? 1 : 0),
|
|
936
|
-
blockHash: receipt.blockHash,
|
|
937
|
-
blockNumber: (0, utils_1.numberToHex)(blockNumber),
|
|
938
|
-
gasUsed: (0, utils_1.numberToHex)(gasUsed),
|
|
939
|
-
transactionHash: tx2.txHash
|
|
940
|
-
});
|
|
941
|
-
return result;
|
|
942
|
-
}
|
|
943
|
-
case "wallet_showCallsStatus": {
|
|
944
|
-
throw new Error(`"${request.method}" not supported`);
|
|
945
|
-
}
|
|
946
|
-
case "wallet_getCapabilities": {
|
|
947
|
-
return {
|
|
948
|
-
[(0, utils_1.numberToHex)(this.chainId)]: {
|
|
949
|
-
atomicBatch: {
|
|
950
|
-
supported: true
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
};
|
|
954
|
-
}
|
|
955
|
-
default:
|
|
956
|
-
throw Error(`"${request.method}" not implemented`);
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
// this method is needed for ethers v4
|
|
960
|
-
// https://github.com/ethers-io/ethers.js/blob/427e16826eb15d52d25c4f01027f8db22b74b76c/src.ts/providers/web3-provider.ts#L41-L55
|
|
961
|
-
send(request, callback) {
|
|
962
|
-
if (!request)
|
|
963
|
-
callback("Undefined request");
|
|
964
|
-
this.request(request).then((result) => callback(null, { jsonrpc: "2.0", id: request.id, result })).catch((error) => callback(error, null));
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
provider.SafeAppProvider = SafeAppProvider;
|
|
968
|
-
(function(exports) {
|
|
969
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
970
|
-
exports.SafeAppProvider = void 0;
|
|
971
|
-
var provider_1 = provider;
|
|
972
|
-
Object.defineProperty(exports, "SafeAppProvider", { enumerable: true, get: function() {
|
|
973
|
-
return provider_1.SafeAppProvider;
|
|
974
|
-
} });
|
|
975
|
-
})(dist);
|
|
976
|
-
const index = /* @__PURE__ */ getDefaultExportFromCjs(dist);
|
|
977
|
-
const index$1 = /* @__PURE__ */ _mergeNamespaces({
|
|
978
|
-
__proto__: null,
|
|
979
|
-
default: index
|
|
980
|
-
}, [dist]);
|
|
981
|
-
export {
|
|
982
|
-
index$1 as i
|
|
983
|
-
};
|
|
984
|
-
//# sourceMappingURL=index-BqpTTobE.js.map
|