@web3jskit/walletkit 0.4.5 → 0.5.1
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/README.md +494 -145
- package/README.zh.md +569 -0
- package/dist/assets/svg/browserWalletIcon.d.ts +2 -0
- package/dist/assets/svg/browserWalletIcon.d.ts.map +1 -0
- package/dist/{src/assets → assets}/svg/dataBase.d.ts +1 -1
- package/dist/assets/svg/dataBase.d.ts.map +1 -0
- package/dist/assets/svg/metaMaskWallet.d.ts +2 -0
- package/dist/assets/svg/metaMaskWallet.d.ts.map +1 -0
- package/dist/btcConnector-BPOSvvaA.js +1 -0
- package/dist/btcConnector-Bc6dNLGT.js +1 -0
- package/dist/btcConnector-CWSxooB_.mjs +68 -0
- package/dist/btcConnector-H4vacfvE.mjs +58 -0
- package/dist/components/ConnectButton/ConnectedInfo.d.ts +2 -0
- package/dist/components/ConnectButton/ConnectedInfo.d.ts.map +1 -0
- package/dist/components/ConnectButton/index.d.ts +9 -0
- package/dist/components/ConnectButton/index.d.ts.map +1 -0
- package/dist/components/ConnectModal/index.d.ts +7 -0
- package/dist/components/ConnectModal/index.d.ts.map +1 -0
- package/dist/{src/components → components}/Dropdown/index.d.ts +2 -7
- package/dist/components/Dropdown/index.d.ts.map +1 -0
- package/dist/components/InfoModal/index.d.ts +3 -0
- package/dist/components/InfoModal/index.d.ts.map +1 -0
- package/dist/components/Modal/index.d.ts +15 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/components/ModalHeader/index.d.ts +8 -0
- package/dist/components/ModalHeader/index.d.ts.map +1 -0
- package/dist/{src/components → components}/SVGs/backArrowSvg.d.ts +1 -0
- package/dist/components/SVGs/backArrowSvg.d.ts.map +1 -0
- package/dist/{src/components → components}/SVGs/closeSvg.d.ts +1 -0
- package/dist/components/SVGs/closeSvg.d.ts.map +1 -0
- package/dist/{src/components → components}/SVGs/copiedSvg.d.ts +1 -0
- package/dist/components/SVGs/copiedSvg.d.ts.map +1 -0
- package/dist/{src/components → components}/SVGs/copySvg.d.ts +1 -0
- package/dist/components/SVGs/copySvg.d.ts.map +1 -0
- package/dist/{src/components → components}/SVGs/exitSvg.d.ts +1 -0
- package/dist/components/SVGs/exitSvg.d.ts.map +1 -0
- package/dist/components/SVGs/spinSvg.d.ts +5 -0
- package/dist/components/SVGs/spinSvg.d.ts.map +1 -0
- package/dist/{src/components → components}/SVGs/vectorSvg.d.ts +1 -0
- package/dist/components/SVGs/vectorSvg.d.ts.map +1 -0
- package/dist/{src/components → components}/Text/index.d.ts +3 -1
- package/dist/components/Text/index.d.ts.map +1 -0
- package/dist/components/ThemeToggle.d.ts +5 -0
- package/dist/components/ThemeToggle.d.ts.map +1 -0
- package/dist/components/WalletItem/index.d.ts +9 -0
- package/dist/components/WalletItem/index.d.ts.map +1 -0
- package/dist/components/WalletKitProvider/ChainProvider.d.ts +27 -0
- package/dist/components/WalletKitProvider/ChainProvider.d.ts.map +1 -0
- package/dist/components/WalletKitProvider/I18nProvider.d.ts +15 -0
- package/dist/components/WalletKitProvider/I18nProvider.d.ts.map +1 -0
- package/dist/components/WalletKitProvider/ThemeProvider.d.ts +25 -0
- package/dist/components/WalletKitProvider/ThemeProvider.d.ts.map +1 -0
- package/dist/components/WalletKitProvider/index.d.ts +23 -0
- package/dist/components/WalletKitProvider/index.d.ts.map +1 -0
- package/dist/config/iconDatabase.d.ts +11 -0
- package/dist/config/iconDatabase.d.ts.map +1 -0
- package/dist/config/netConfig.d.ts +16 -0
- package/dist/config/netConfig.d.ts.map +1 -0
- package/dist/config/walletConfig.d.ts +28 -0
- package/dist/config/walletConfig.d.ts.map +1 -0
- package/dist/core/connectors/Bitget_Wallet/btcConnector.d.ts +36 -0
- package/dist/core/connectors/Bitget_Wallet/btcConnector.d.ts.map +1 -0
- package/dist/core/connectors/Bitget_Wallet/deepLinkConnector.d.ts +15 -0
- package/dist/core/connectors/Bitget_Wallet/deepLinkConnector.d.ts.map +1 -0
- package/dist/core/connectors/Bitget_Wallet/solConnector.d.ts +13 -0
- package/dist/core/connectors/Bitget_Wallet/solConnector.d.ts.map +1 -0
- package/dist/core/connectors/GelWallet/evmConnector.d.ts +27 -0
- package/dist/core/connectors/GelWallet/evmConnector.d.ts.map +1 -0
- package/dist/core/connectors/GelWallet/solConnector.d.ts +15 -0
- package/dist/core/connectors/GelWallet/solConnector.d.ts.map +1 -0
- package/dist/core/connectors/GelWallet/tronConnector.d.ts +8 -0
- package/dist/core/connectors/GelWallet/tronConnector.d.ts.map +1 -0
- package/dist/core/connectors/MetaMask/deepLinkConnector.d.ts +15 -0
- package/dist/core/connectors/MetaMask/deepLinkConnector.d.ts.map +1 -0
- package/dist/core/connectors/OKX_Wallet/btcConnector.d.ts +40 -0
- package/dist/core/connectors/OKX_Wallet/btcConnector.d.ts.map +1 -0
- package/dist/core/connectors/OKX_Wallet/deepLinkConnector.d.ts +15 -0
- package/dist/core/connectors/OKX_Wallet/deepLinkConnector.d.ts.map +1 -0
- package/dist/core/connectors/OKX_Wallet/solConnector.d.ts +12 -0
- package/dist/core/connectors/OKX_Wallet/solConnector.d.ts.map +1 -0
- package/dist/core/connectors/OKX_Wallet/tronConnector.d.ts +12 -0
- package/dist/core/connectors/OKX_Wallet/tronConnector.d.ts.map +1 -0
- package/dist/core/connectors/Phantom/btcConnector.d.ts +32 -0
- package/dist/core/connectors/Phantom/btcConnector.d.ts.map +1 -0
- package/dist/core/connectors/Phantom/deepLinkConnector.d.ts +15 -0
- package/dist/core/connectors/Phantom/deepLinkConnector.d.ts.map +1 -0
- package/dist/core/connectors/Phantom/solConnector.d.ts +12 -0
- package/dist/core/connectors/Phantom/solConnector.d.ts.map +1 -0
- package/dist/core/connectors/TokenPocket/deepLinkConnector.d.ts +17 -0
- package/dist/core/connectors/TokenPocket/deepLinkConnector.d.ts.map +1 -0
- package/dist/core/connectors/TronLink/deepLinkConnector.d.ts +17 -0
- package/dist/core/connectors/TronLink/deepLinkConnector.d.ts.map +1 -0
- package/dist/core/connectors/TronLink/tronConnector.d.ts +13 -0
- package/dist/core/connectors/TronLink/tronConnector.d.ts.map +1 -0
- package/dist/core/connectors/Trust_Wallet/deepLinkConnector.d.ts +15 -0
- package/dist/core/connectors/Trust_Wallet/deepLinkConnector.d.ts.map +1 -0
- package/dist/core/connectors/_evm/createConnectors.d.ts +4 -0
- package/dist/core/connectors/_evm/createConnectors.d.ts.map +1 -0
- package/dist/core/connectors/_evm/createEmitter.d.ts +35 -0
- package/dist/core/connectors/_evm/createEmitter.d.ts.map +1 -0
- package/dist/core/connectors/_evm/evmConnector.d.ts +51 -0
- package/dist/core/connectors/_evm/evmConnector.d.ts.map +1 -0
- package/dist/core/connectors/_gelwallet/gelWalletConnector.d.ts +26 -0
- package/dist/core/connectors/_gelwallet/gelWalletConnector.d.ts.map +1 -0
- package/dist/core/connectors/_sol/resolveAddress.d.ts +2 -0
- package/dist/core/connectors/_sol/resolveAddress.d.ts.map +1 -0
- package/dist/core/connectors/_sol/solConnector.d.ts +32 -0
- package/dist/core/connectors/_sol/solConnector.d.ts.map +1 -0
- package/dist/core/connectors/_tron/tronConnector.d.ts +30 -0
- package/dist/core/connectors/_tron/tronConnector.d.ts.map +1 -0
- package/dist/core/connectors/baseConnector.d.ts +36 -0
- package/dist/core/connectors/baseConnector.d.ts.map +1 -0
- package/dist/core/connectors/createConnectors.d.ts +20 -0
- package/dist/core/connectors/createConnectors.d.ts.map +1 -0
- package/dist/core/errors/base.d.ts +24 -0
- package/dist/core/errors/base.d.ts.map +1 -0
- package/dist/core/errors/request.d.ts +80 -0
- package/dist/core/errors/request.d.ts.map +1 -0
- package/dist/core/errors/rpc.d.ts +290 -0
- package/dist/core/errors/rpc.d.ts.map +1 -0
- package/dist/core/errors/unit.d.ts +11 -0
- package/dist/core/errors/unit.d.ts.map +1 -0
- package/dist/core/errors/utils.d.ts +8 -0
- package/dist/core/errors/utils.d.ts.map +1 -0
- package/dist/core/types/chain.d.ts +49 -0
- package/dist/core/types/chain.d.ts.map +1 -0
- package/dist/core/types/config.d.ts +7 -0
- package/dist/core/types/config.d.ts.map +1 -0
- package/dist/core/types/connector.d.ts +104 -0
- package/dist/core/types/connector.d.ts.map +1 -0
- package/dist/core/types/events.d.ts +2 -0
- package/dist/core/types/events.d.ts.map +1 -0
- package/dist/core/types/unit.d.ts +2 -0
- package/dist/core/types/unit.d.ts.map +1 -0
- package/dist/core/types/utils.d.ts +61 -0
- package/dist/core/types/utils.d.ts.map +1 -0
- package/dist/core/utils/decodePhantom.d.ts +2 -0
- package/dist/core/utils/decodePhantom.d.ts.map +1 -0
- package/dist/core/utils/deepEqual.d.ts +3 -0
- package/dist/core/utils/deepEqual.d.ts.map +1 -0
- package/dist/core/utils/deserialize.d.ts +4 -0
- package/dist/core/utils/deserialize.d.ts.map +1 -0
- package/dist/core/utils/filterWallets.d.ts +4 -0
- package/dist/core/utils/filterWallets.d.ts.map +1 -0
- package/dist/core/utils/rpc.d.ts +21 -0
- package/dist/core/utils/rpc.d.ts.map +1 -0
- package/dist/core/utils/serialize.d.ts +16 -0
- package/dist/core/utils/serialize.d.ts.map +1 -0
- package/dist/core/utils/silentConnect.d.ts +5 -0
- package/dist/core/utils/silentConnect.d.ts.map +1 -0
- package/dist/core/utils/stringify.d.ts +5 -0
- package/dist/core/utils/stringify.d.ts.map +1 -0
- package/dist/core/utils/uid.d.ts +2 -0
- package/dist/core/utils/uid.d.ts.map +1 -0
- package/dist/core/utils/util.d.ts +11 -0
- package/dist/core/utils/util.d.ts.map +1 -0
- package/dist/dapp.es-BPGP9PnL.mjs +15917 -0
- package/dist/dapp.es-sLnregcu.js +103 -0
- package/dist/deepLinkConnector-BEhA9fXM.js +1 -0
- package/dist/deepLinkConnector-BoFKaohV.js +1 -0
- package/dist/deepLinkConnector-C9yLvhQ0.js +1 -0
- package/dist/deepLinkConnector-CJskbSoZ.mjs +43 -0
- package/dist/deepLinkConnector-COkumXeY.js +1 -0
- package/dist/deepLinkConnector-CeF0BGa0.mjs +43 -0
- package/dist/deepLinkConnector-Cv1mS_6-.mjs +34 -0
- package/dist/deepLinkConnector-DVJJth-5.mjs +34 -0
- package/dist/deepLinkConnector-Dd1GhvIt.mjs +33 -0
- package/dist/deepLinkConnector-DjP2afmX.js +1 -0
- package/dist/deepLinkConnector-DmY8duGW.mjs +42 -0
- package/dist/deepLinkConnector-JrGcvOeL.mjs +34 -0
- package/dist/deepLinkConnector-k6omMzz2.js +1 -0
- package/dist/deepLinkConnector-uAd7NNtg.js +1 -0
- package/dist/errors/index.d.ts +4 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/evmConnector-CCvp7d3d.js +1 -0
- package/dist/evmConnector-CoauAOGL.mjs +163 -0
- package/dist/gelWalletConnector-B3UtBzAC.mjs +76 -0
- package/dist/gelWalletConnector-DWtJW90d.js +1 -0
- package/dist/hooks/useWalletKit.d.ts +113 -0
- package/dist/hooks/useWalletKit.d.ts.map +1 -0
- package/dist/index-9qmfDVzH-C-zsxX98.mjs +25638 -0
- package/dist/index-9qmfDVzH-C6VVZD9P.js +28 -0
- package/dist/index-B3LF1VeP-58KzZv6u.js +1 -0
- package/dist/index-B3LF1VeP-IR-fSZI0.mjs +120 -0
- package/dist/index-CCHY2zSF-OxZZmzOg.mjs +45 -0
- package/dist/index-CCHY2zSF-ocS_tvXl.js +1 -0
- package/dist/index-CQkA0oWr.js +138 -0
- package/dist/index-CqeMS3Gf-C4g86ca5.js +1 -0
- package/dist/index-CqeMS3Gf-DXS8RsUh.mjs +67 -0
- package/dist/index-DGMGsMkJ-BTPPfxmS.js +1 -0
- package/dist/index-DGMGsMkJ-CHecRdpD.mjs +27 -0
- package/dist/index-djQ_DEqj.mjs +9254 -0
- package/dist/index-yUF_S07V-Cm9-qVkc.js +1 -0
- package/dist/index-yUF_S07V-DHeRsyE0.mjs +48 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +27 -0
- package/dist/index.js +1 -0
- package/dist/index.umd.js +57350 -0
- package/dist/locals/i18n.d.ts +5 -0
- package/dist/locals/i18n.d.ts.map +1 -0
- package/dist/locals/languages/en.json.d.ts +43 -0
- package/dist/locals/languages/ja.json.d.ts +43 -0
- package/dist/locals/languages/ko.json.d.ts +43 -0
- package/dist/locals/languages/ms.json.d.ts +43 -0
- package/dist/locals/languages/th.json.d.ts +43 -0
- package/dist/locals/languages/vi.json.d.ts +43 -0
- package/dist/locals/languages/zh.json.d.ts +43 -0
- package/dist/locals/languages/zhTW.json.d.ts +43 -0
- package/dist/locals/resources.d.ts +347 -0
- package/dist/locals/resources.d.ts.map +1 -0
- package/dist/solConnector-6iJX98IC.mjs +41 -0
- package/dist/solConnector-B0hCu-c0.js +1 -0
- package/dist/solConnector-BF2LX1V2.js +1 -0
- package/dist/solConnector-BJTonslk.mjs +11 -0
- package/dist/solConnector-BZeW9sSK.js +1 -0
- package/dist/solConnector-DiPxszBo.mjs +11 -0
- package/dist/solConnector-RfQtdzBT.js +1 -0
- package/dist/solConnector-uPbRCSOa.mjs +11 -0
- package/dist/stores/helperStore.d.ts +92 -0
- package/dist/stores/helperStore.d.ts.map +1 -0
- package/dist/{src/stores → stores}/index.d.ts +15 -6
- package/dist/stores/index.d.ts.map +1 -0
- package/dist/{src/stores → stores}/modalStore.d.ts +5 -4
- package/dist/stores/modalStore.d.ts.map +1 -0
- package/dist/style.css +492 -0
- package/dist/tronConnector-BlFA83pA.js +1 -0
- package/dist/tronConnector-BsjZsmAJ.js +1 -0
- package/dist/tronConnector-CUOxt6Cw.mjs +35 -0
- package/dist/tronConnector-DfZzS07Y.mjs +13 -0
- package/dist/tronConnector-fKlrodno.js +1 -0
- package/dist/tronConnector-ofdgn1lq.mjs +21 -0
- package/dist/types/chain.d.ts +12 -0
- package/dist/types/chain.d.ts.map +1 -0
- package/dist/types/configType.d.ts +3 -0
- package/dist/types/configType.d.ts.map +1 -0
- package/dist/{src/types → types}/error.d.ts +1 -0
- package/dist/types/error.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/{src/types → types}/store.d.ts +1 -0
- package/dist/types/store.d.ts.map +1 -0
- package/dist/{src/utils → utils}/formatter.d.ts +1 -0
- package/dist/utils/formatter.d.ts.map +1 -0
- package/dist/{src/utils → utils}/generateAvatar.d.ts +1 -0
- package/dist/utils/generateAvatar.d.ts.map +1 -0
- package/dist/utils/proxy.d.ts +5 -0
- package/dist/utils/proxy.d.ts.map +1 -0
- package/package.json +96 -45
- package/dist/package.json +0 -47
- package/dist/src/assets/svg/dataBase.js +0 -5
- package/dist/src/assets/svg/dataBase.js.map +0 -1
- package/dist/src/assets/svg/metaMaskWallet.d.ts +0 -1
- package/dist/src/assets/svg/metaMaskWallet.js +0 -35
- package/dist/src/assets/svg/metaMaskWallet.js.map +0 -1
- package/dist/src/components/ConnectButton/ConnectedInfo.d.ts +0 -1
- package/dist/src/components/ConnectButton/ConnectedInfo.js +0 -21
- package/dist/src/components/ConnectButton/ConnectedInfo.js.map +0 -1
- package/dist/src/components/ConnectButton/index.d.ts +0 -8
- package/dist/src/components/ConnectButton/index.js +0 -16
- package/dist/src/components/ConnectButton/index.js.map +0 -1
- package/dist/src/components/ConnectButton/style.d.ts +0 -2
- package/dist/src/components/ConnectButton/style.js +0 -13
- package/dist/src/components/ConnectButton/style.js.map +0 -1
- package/dist/src/components/Connecting/index.d.ts +0 -6
- package/dist/src/components/Connecting/index.js +0 -11
- package/dist/src/components/Connecting/index.js.map +0 -1
- package/dist/src/components/Connecting/style.d.ts +0 -2
- package/dist/src/components/Connecting/style.js +0 -52
- package/dist/src/components/Connecting/style.js.map +0 -1
- package/dist/src/components/Dropdown/index.js +0 -24
- package/dist/src/components/Dropdown/index.js.map +0 -1
- package/dist/src/components/Dropdown/style.d.ts +0 -15
- package/dist/src/components/Dropdown/style.js +0 -66
- package/dist/src/components/Dropdown/style.js.map +0 -1
- package/dist/src/components/GetWallet/index.d.ts +0 -7
- package/dist/src/components/GetWallet/index.js +0 -21
- package/dist/src/components/GetWallet/index.js.map +0 -1
- package/dist/src/components/GetWallet/style.d.ts +0 -2
- package/dist/src/components/GetWallet/style.js +0 -117
- package/dist/src/components/GetWallet/style.js.map +0 -1
- package/dist/src/components/Header/ModalHeader.d.ts +0 -8
- package/dist/src/components/Header/ModalHeader.js +0 -9
- package/dist/src/components/Header/ModalHeader.js.map +0 -1
- package/dist/src/components/Header/style.d.ts +0 -2
- package/dist/src/components/Header/style.js +0 -74
- package/dist/src/components/Header/style.js.map +0 -1
- package/dist/src/components/Icon/index.d.ts +0 -23
- package/dist/src/components/Icon/index.js +0 -48
- package/dist/src/components/Icon/index.js.map +0 -1
- package/dist/src/components/Introduce/index.d.ts +0 -6
- package/dist/src/components/Introduce/index.js +0 -11
- package/dist/src/components/Introduce/index.js.map +0 -1
- package/dist/src/components/Introduce/style.d.ts +0 -2
- package/dist/src/components/Introduce/style.js +0 -97
- package/dist/src/components/Introduce/style.js.map +0 -1
- package/dist/src/components/Modal/ConnectModal.d.ts +0 -7
- package/dist/src/components/Modal/ConnectModal.js +0 -123
- package/dist/src/components/Modal/ConnectModal.js.map +0 -1
- package/dist/src/components/Modal/WalletInfoModal.d.ts +0 -1
- package/dist/src/components/Modal/WalletInfoModal.js +0 -46
- package/dist/src/components/Modal/WalletInfoModal.js.map +0 -1
- package/dist/src/components/Modal/index.d.ts +0 -13
- package/dist/src/components/Modal/index.js +0 -55
- package/dist/src/components/Modal/index.js.map +0 -1
- package/dist/src/components/Modal/style.d.ts +0 -5
- package/dist/src/components/Modal/style.js +0 -187
- package/dist/src/components/Modal/style.js.map +0 -1
- package/dist/src/components/SVGs/backArrowSvg.js +0 -4
- package/dist/src/components/SVGs/backArrowSvg.js.map +0 -1
- package/dist/src/components/SVGs/closeSvg.js +0 -4
- package/dist/src/components/SVGs/closeSvg.js.map +0 -1
- package/dist/src/components/SVGs/copiedSvg.js +0 -4
- package/dist/src/components/SVGs/copiedSvg.js.map +0 -1
- package/dist/src/components/SVGs/copySvg.js +0 -4
- package/dist/src/components/SVGs/copySvg.js.map +0 -1
- package/dist/src/components/SVGs/exitSvg.js +0 -4
- package/dist/src/components/SVGs/exitSvg.js.map +0 -1
- package/dist/src/components/SVGs/spinSvg.d.ts +0 -4
- package/dist/src/components/SVGs/spinSvg.js +0 -4
- package/dist/src/components/SVGs/spinSvg.js.map +0 -1
- package/dist/src/components/SVGs/vectorSvg.js +0 -4
- package/dist/src/components/SVGs/vectorSvg.js.map +0 -1
- package/dist/src/components/Text/index.js +0 -32
- package/dist/src/components/Text/index.js.map +0 -1
- package/dist/src/components/WalletKitProvider/ChainProvider.d.ts +0 -23
- package/dist/src/components/WalletKitProvider/ChainProvider.js +0 -66
- package/dist/src/components/WalletKitProvider/ChainProvider.js.map +0 -1
- package/dist/src/components/WalletKitProvider/I18nProvider.d.ts +0 -13
- package/dist/src/components/WalletKitProvider/I18nProvider.js +0 -42
- package/dist/src/components/WalletKitProvider/I18nProvider.js.map +0 -1
- package/dist/src/components/WalletKitProvider/ThemeProvider.d.ts +0 -8
- package/dist/src/components/WalletKitProvider/ThemeProvider.js +0 -14
- package/dist/src/components/WalletKitProvider/ThemeProvider.js.map +0 -1
- package/dist/src/components/WalletKitProvider/index.d.ts +0 -18
- package/dist/src/components/WalletKitProvider/index.js +0 -14
- package/dist/src/components/WalletKitProvider/index.js.map +0 -1
- package/dist/src/components/WalletList/index.d.ts +0 -8
- package/dist/src/components/WalletList/index.js +0 -18
- package/dist/src/components/WalletList/index.js.map +0 -1
- package/dist/src/components/WalletList/style.d.ts +0 -2
- package/dist/src/components/WalletList/style.js +0 -102
- package/dist/src/components/WalletList/style.js.map +0 -1
- package/dist/src/components/WalletTriggerButton/index.d.ts +0 -13
- package/dist/src/components/WalletTriggerButton/index.js +0 -37
- package/dist/src/components/WalletTriggerButton/index.js.map +0 -1
- package/dist/src/components/WalletTriggerButton/style.d.ts +0 -2
- package/dist/src/components/WalletTriggerButton/style.js +0 -63
- package/dist/src/components/WalletTriggerButton/style.js.map +0 -1
- package/dist/src/errors/index.d.ts +0 -2
- package/dist/src/errors/index.js +0 -6
- package/dist/src/errors/index.js.map +0 -1
- package/dist/src/hooks/useWalletKit.d.ts +0 -80
- package/dist/src/hooks/useWalletKit.js +0 -38
- package/dist/src/hooks/useWalletKit.js.map +0 -1
- package/dist/src/index.d.ts +0 -9
- package/dist/src/index.js +0 -10
- package/dist/src/index.js.map +0 -1
- package/dist/src/locals/i18n.d.ts +0 -2
- package/dist/src/locals/i18n.js +0 -17
- package/dist/src/locals/i18n.js.map +0 -1
- package/dist/src/locals/languages/en.json +0 -30
- package/dist/src/locals/languages/zh.json +0 -30
- package/dist/src/locals/resources.d.ts +0 -66
- package/dist/src/locals/resources.js +0 -11
- package/dist/src/locals/resources.js.map +0 -1
- package/dist/src/modals/connectModal/index.d.ts +0 -0
- package/dist/src/modals/connectModal/index.js +0 -2
- package/dist/src/modals/connectModal/index.js.map +0 -1
- package/dist/src/stores/SlotsWalletStore.d.ts +0 -18
- package/dist/src/stores/SlotsWalletStore.js +0 -33
- package/dist/src/stores/SlotsWalletStore.js.map +0 -1
- package/dist/src/stores/index.js +0 -25
- package/dist/src/stores/index.js.map +0 -1
- package/dist/src/stores/modalStore.js +0 -41
- package/dist/src/stores/modalStore.js.map +0 -1
- package/dist/src/styled/index.d.ts +0 -17
- package/dist/src/styled/index.js +0 -76
- package/dist/src/styled/index.js.map +0 -1
- package/dist/src/test/getwalletprovider.test.d.ts +0 -1
- package/dist/src/test/getwalletprovider.test.js +0 -10
- package/dist/src/test/getwalletprovider.test.js.map +0 -1
- package/dist/src/test/setup.d.ts +0 -1
- package/dist/src/test/setup.js +0 -7
- package/dist/src/test/setup.js.map +0 -1
- package/dist/src/theme/index.d.ts +0 -61
- package/dist/src/theme/index.js +0 -99
- package/dist/src/theme/index.js.map +0 -1
- package/dist/src/types/configType.d.ts +0 -2
- package/dist/src/types/configType.js +0 -2
- package/dist/src/types/configType.js.map +0 -1
- package/dist/src/types/error.js +0 -5
- package/dist/src/types/error.js.map +0 -1
- package/dist/src/types/slotsType.d.ts +0 -23
- package/dist/src/types/slotsType.js +0 -2
- package/dist/src/types/slotsType.js.map +0 -1
- package/dist/src/types/store.js +0 -2
- package/dist/src/types/store.js.map +0 -1
- package/dist/src/utils/formatter.js +0 -6
- package/dist/src/utils/formatter.js.map +0 -1
- package/dist/src/utils/generateAvatar.js +0 -32
- package/dist/src/utils/generateAvatar.js.map +0 -1
- package/dist/src/wallets/GelWallet/index.d.ts +0 -0
- package/dist/src/wallets/GelWallet/index.js +0 -2
- package/dist/src/wallets/GelWallet/index.js.map +0 -1
- package/dist/src/wallets/SlotsWallets/index.d.ts +0 -3
- package/dist/src/wallets/SlotsWallets/index.js +0 -26
- package/dist/src/wallets/SlotsWallets/index.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CQkA0oWr.js"),i=o=>({request:async({method:e,params:n})=>new Promise(()=>{if(console.log("OKX------request",e,n),e==="openDApp"){const t=`${o.deepLink}?dappUrl=${encodeURIComponent(window==null?void 0:window.location.href)}`;console.log("OKX-----deepLink",t),window.location.href=t}})});class c extends s.BaseConnector{constructor(e){const n=i(e);super(e,n),this.connect=async()=>{const t=await this.getProvider();try{return this.beforeConnecting(),await t.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(r){return console.error(r),this.resetStatus(),Promise.reject(r)}},this.reconnection=async()=>{console.log("reconnection")},this.disconnect=async()=>{this.resetStatus()},this.getAccounts=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CQkA0oWr.js"),i=o=>({request:async({method:e,params:n})=>new Promise(()=>{if(console.log("MetaMask------request",e,n),e==="openDApp"){const t=`${o.deepLink}/${window.location.href}`;console.log("MetaMask------deepLink",t),window.location.href=t}})});class c extends r.BaseConnector{constructor(e){const n=i(e);super(e,n),this.connect=async()=>{const t=await this.getProvider();try{return this.beforeConnecting(),await t.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(s){return console.error(s),this.resetStatus(),Promise.reject(s)}},this.reconnection=async()=>{console.log("reconnection")},this.disconnect=async()=>{this.resetStatus()},this.getAccounts=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CQkA0oWr.js"),i=o=>({request:async({method:e,params:n})=>new Promise(()=>{if(console.log("Bitget------request",e,n),e==="openDApp"){const t=`${o.deepLink}?action=dapp&url=${window.location.href}`;console.log("Bitget------deepLink",t),window.location.href=t}})});class c extends s.BaseConnector{constructor(e){const n=i(e);super(e,n),this.connect=async()=>{const t=await this.getProvider();try{return this.beforeConnecting(),await t.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(r){return console.error(r),this.resetStatus(),Promise.reject(r)}},this.reconnection=async()=>{console.log("reconnection")},this.disconnect=async()=>{this.resetStatus()},this.getAccounts=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=c;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { B as r } from "./index-djQ_DEqj.mjs";
|
|
2
|
+
const i = (o) => ({
|
|
3
|
+
request: async ({ method: e, params: t }) => (console.log("Tron-----request", e, t), new Promise(() => {
|
|
4
|
+
if (e === "openDApp") {
|
|
5
|
+
const n = `${o.deepLink}?param=${encodeURIComponent(
|
|
6
|
+
JSON.stringify({
|
|
7
|
+
url: window == null ? void 0 : window.location.href,
|
|
8
|
+
action: "open",
|
|
9
|
+
protocol: "tronlink",
|
|
10
|
+
version: "1.0"
|
|
11
|
+
})
|
|
12
|
+
)}`;
|
|
13
|
+
console.log("Tron-----deepLink", n), window.location.href = n;
|
|
14
|
+
}
|
|
15
|
+
}))
|
|
16
|
+
});
|
|
17
|
+
class a extends r {
|
|
18
|
+
constructor(e) {
|
|
19
|
+
const t = i(e);
|
|
20
|
+
super(e, t), this.connect = async () => {
|
|
21
|
+
const n = await this.getProvider();
|
|
22
|
+
try {
|
|
23
|
+
return this.beforeConnecting(), n.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
|
|
24
|
+
} catch (s) {
|
|
25
|
+
return this.resetStatus(), Promise.reject(s);
|
|
26
|
+
}
|
|
27
|
+
}, this.reconnection = async () => {
|
|
28
|
+
console.log("reconnection");
|
|
29
|
+
}, this.disconnect = async () => {
|
|
30
|
+
this.resetStatus();
|
|
31
|
+
}, this.switchChain = () => {
|
|
32
|
+
}, this.getAccounts = () => {
|
|
33
|
+
}, this.getChainId = () => {
|
|
34
|
+
}, this.__onAccountsChanged = () => {
|
|
35
|
+
}, this.__onChainChanged = () => {
|
|
36
|
+
}, this.__onConnect = () => {
|
|
37
|
+
}, this.__onDisconnect = () => {
|
|
38
|
+
}, this.deepLink = e.deepLink;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
a as default
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CQkA0oWr.js"),i=o=>({request:async({method:e,params:n})=>(console.log("TokenPocket-----request",e,n),new Promise(()=>{if(e==="openDApp"){const t=`${o.deepLink}?param=${encodeURIComponent(JSON.stringify({url:window==null?void 0:window.location.href}))}`;console.log("TokenPocket-----deepLink",t),window.location.href=t}}))});class c extends r.BaseConnector{constructor(e){const n=i(e);super(e,n),this.connect=async()=>{const t=await this.getProvider();try{return this.beforeConnecting(),t.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(s){return this.resetStatus(),Promise.reject(s)}},this.reconnection=async()=>{console.log("reconnection")},this.disconnect=async()=>{this.resetStatus()},this.switchChain=()=>{},this.getAccounts=()=>{},this.getChainId=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=c;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { B as l, b as p, c } from "./index-djQ_DEqj.mjs";
|
|
2
|
+
const h = (o, e) => `https://phantom.app/ul/v1/${o}?${e.toString()}`, d = (o) => ({
|
|
3
|
+
request: async ({ method: e, params: r }) => (console.log("Phantom-----request", e, r), new Promise(() => {
|
|
4
|
+
if (e === "openDApp") {
|
|
5
|
+
const n = encodeURIComponent(window.location.href), t = `${o.deepLink}/${n}?ref=${n}`;
|
|
6
|
+
console.log("Phantom------deepLink", t), window.location.href = t;
|
|
7
|
+
} else if (e === "login") {
|
|
8
|
+
const n = p.box.keyPair(), t = c.encode(n.publicKey), s = n.secretKey;
|
|
9
|
+
localStorage.setItem("clientPrivateKey", c.encode(s));
|
|
10
|
+
const i = new URLSearchParams({
|
|
11
|
+
dapp_encryption_public_key: t,
|
|
12
|
+
app_url: window.location.href,
|
|
13
|
+
redirect_link: window.location.href
|
|
14
|
+
}), a = h("connect", i);
|
|
15
|
+
window.location.href = a;
|
|
16
|
+
}
|
|
17
|
+
}))
|
|
18
|
+
});
|
|
19
|
+
class w extends l {
|
|
20
|
+
constructor(e) {
|
|
21
|
+
const r = d(e);
|
|
22
|
+
super(e, r), this.connect = async () => {
|
|
23
|
+
const n = await this.getProvider();
|
|
24
|
+
try {
|
|
25
|
+
return this.beforeConnecting(), await n.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
|
|
26
|
+
} catch (t) {
|
|
27
|
+
return console.error(t), this.resetStatus(), Promise.reject(t);
|
|
28
|
+
}
|
|
29
|
+
}, this.reconnection = async () => {
|
|
30
|
+
console.log("reconnection");
|
|
31
|
+
}, this.disconnect = async () => {
|
|
32
|
+
this.resetStatus();
|
|
33
|
+
}, this.getAccounts = () => {
|
|
34
|
+
}, this.__onAccountsChanged = () => {
|
|
35
|
+
}, this.__onChainChanged = () => {
|
|
36
|
+
}, this.__onConnect = () => {
|
|
37
|
+
}, this.__onDisconnect = () => {
|
|
38
|
+
}, this.deepLink = e.deepLink;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
w as default
|
|
43
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { B as r } from "./index-djQ_DEqj.mjs";
|
|
2
|
+
const i = (o) => ({
|
|
3
|
+
request: async ({ method: e, params: n }) => new Promise(() => {
|
|
4
|
+
if (console.log("MetaMask------request", e, n), e === "openDApp") {
|
|
5
|
+
const t = `${o.deepLink}/${window.location.href}`;
|
|
6
|
+
console.log("MetaMask------deepLink", t), window.location.href = t;
|
|
7
|
+
}
|
|
8
|
+
})
|
|
9
|
+
});
|
|
10
|
+
class a extends r {
|
|
11
|
+
constructor(e) {
|
|
12
|
+
const n = i(e);
|
|
13
|
+
super(e, n), this.connect = async () => {
|
|
14
|
+
const t = await this.getProvider();
|
|
15
|
+
try {
|
|
16
|
+
return this.beforeConnecting(), await t.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
|
|
17
|
+
} catch (s) {
|
|
18
|
+
return console.error(s), this.resetStatus(), Promise.reject(s);
|
|
19
|
+
}
|
|
20
|
+
}, this.reconnection = async () => {
|
|
21
|
+
console.log("reconnection");
|
|
22
|
+
}, this.disconnect = async () => {
|
|
23
|
+
this.resetStatus();
|
|
24
|
+
}, this.getAccounts = () => {
|
|
25
|
+
}, this.__onAccountsChanged = () => {
|
|
26
|
+
}, this.__onChainChanged = () => {
|
|
27
|
+
}, this.__onConnect = () => {
|
|
28
|
+
}, this.__onDisconnect = () => {
|
|
29
|
+
}, this.deepLink = e.deepLink;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
a as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { B as r } from "./index-djQ_DEqj.mjs";
|
|
2
|
+
const c = (o) => ({
|
|
3
|
+
request: async ({ method: e, params: t }) => new Promise(() => {
|
|
4
|
+
if (console.log("OKX------request", e, t), e === "openDApp") {
|
|
5
|
+
const n = `${o.deepLink}?dappUrl=${encodeURIComponent(window == null ? void 0 : window.location.href)}`;
|
|
6
|
+
console.log("OKX-----deepLink", n), window.location.href = n;
|
|
7
|
+
}
|
|
8
|
+
})
|
|
9
|
+
});
|
|
10
|
+
class a extends r {
|
|
11
|
+
constructor(e) {
|
|
12
|
+
const t = c(e);
|
|
13
|
+
super(e, t), this.connect = async () => {
|
|
14
|
+
const n = await this.getProvider();
|
|
15
|
+
try {
|
|
16
|
+
return this.beforeConnecting(), await n.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
|
|
17
|
+
} catch (s) {
|
|
18
|
+
return console.error(s), this.resetStatus(), Promise.reject(s);
|
|
19
|
+
}
|
|
20
|
+
}, this.reconnection = async () => {
|
|
21
|
+
console.log("reconnection");
|
|
22
|
+
}, this.disconnect = async () => {
|
|
23
|
+
this.resetStatus();
|
|
24
|
+
}, this.getAccounts = () => {
|
|
25
|
+
}, this.__onAccountsChanged = () => {
|
|
26
|
+
}, this.__onChainChanged = () => {
|
|
27
|
+
}, this.__onConnect = () => {
|
|
28
|
+
}, this.__onDisconnect = () => {
|
|
29
|
+
}, this.deepLink = e.deepLink;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
a as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { B as r } from "./index-djQ_DEqj.mjs";
|
|
2
|
+
const i = (s) => ({
|
|
3
|
+
request: async ({ method: e, params: n }) => new Promise(() => {
|
|
4
|
+
if (console.log("Trust------request", e, n), e === "openDApp") {
|
|
5
|
+
const t = `${s.deepLink}?url=${window.location.href}`;
|
|
6
|
+
console.log("Trust------deepLink", t), window.location.href = t;
|
|
7
|
+
}
|
|
8
|
+
})
|
|
9
|
+
});
|
|
10
|
+
class a extends r {
|
|
11
|
+
constructor(e) {
|
|
12
|
+
const n = i(e);
|
|
13
|
+
super(e, n), this.connect = async () => {
|
|
14
|
+
const t = await this.getProvider();
|
|
15
|
+
try {
|
|
16
|
+
return this.beforeConnecting(), await t.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
|
|
17
|
+
} catch (o) {
|
|
18
|
+
return console.error(o), this.resetStatus(), Promise.reject(o);
|
|
19
|
+
}
|
|
20
|
+
}, this.reconnection = async () => {
|
|
21
|
+
}, this.disconnect = async () => {
|
|
22
|
+
this.resetStatus();
|
|
23
|
+
}, this.getAccounts = () => {
|
|
24
|
+
}, this.__onAccountsChanged = () => {
|
|
25
|
+
}, this.__onChainChanged = () => {
|
|
26
|
+
}, this.__onConnect = () => {
|
|
27
|
+
}, this.__onDisconnect = () => {
|
|
28
|
+
}, this.deepLink = e.deepLink;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
a as default
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CQkA0oWr.js"),i=r=>({request:async({method:e,params:n})=>new Promise(()=>{if(console.log("Trust------request",e,n),e==="openDApp"){const t=`${r.deepLink}?url=${window.location.href}`;console.log("Trust------deepLink",t),window.location.href=t}})});class c extends o.BaseConnector{constructor(e){const n=i(e);super(e,n),this.connect=async()=>{const t=await this.getProvider();try{return this.beforeConnecting(),await t.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(s){return console.error(s),this.resetStatus(),Promise.reject(s)}},this.reconnection=async()=>{},this.disconnect=async()=>{this.resetStatus()},this.getAccounts=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=c;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { B as r } from "./index-djQ_DEqj.mjs";
|
|
2
|
+
const i = (o) => ({
|
|
3
|
+
request: async ({ method: e, params: n }) => (console.log("TokenPocket-----request", e, n), new Promise(() => {
|
|
4
|
+
if (e === "openDApp") {
|
|
5
|
+
const t = `${o.deepLink}?param=${encodeURIComponent(
|
|
6
|
+
JSON.stringify({
|
|
7
|
+
url: window == null ? void 0 : window.location.href
|
|
8
|
+
// chain: 'EOS', // dapp支持的网络
|
|
9
|
+
// "source": "xxx", // 来源,开发者自定义
|
|
10
|
+
})
|
|
11
|
+
)}`;
|
|
12
|
+
console.log("TokenPocket-----deepLink", t), window.location.href = t;
|
|
13
|
+
}
|
|
14
|
+
}))
|
|
15
|
+
});
|
|
16
|
+
class a extends r {
|
|
17
|
+
constructor(e) {
|
|
18
|
+
const n = i(e);
|
|
19
|
+
super(e, n), this.connect = async () => {
|
|
20
|
+
const t = await this.getProvider();
|
|
21
|
+
try {
|
|
22
|
+
return this.beforeConnecting(), t.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
|
|
23
|
+
} catch (s) {
|
|
24
|
+
return this.resetStatus(), Promise.reject(s);
|
|
25
|
+
}
|
|
26
|
+
}, this.reconnection = async () => {
|
|
27
|
+
console.log("reconnection");
|
|
28
|
+
}, this.disconnect = async () => {
|
|
29
|
+
this.resetStatus();
|
|
30
|
+
}, this.switchChain = () => {
|
|
31
|
+
}, this.getAccounts = () => {
|
|
32
|
+
}, this.getChainId = () => {
|
|
33
|
+
}, this.__onAccountsChanged = () => {
|
|
34
|
+
}, this.__onChainChanged = () => {
|
|
35
|
+
}, this.__onConnect = () => {
|
|
36
|
+
}, this.__onDisconnect = () => {
|
|
37
|
+
}, this.deepLink = e.deepLink;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
a as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { B as r } from "./index-djQ_DEqj.mjs";
|
|
2
|
+
const i = (o) => ({
|
|
3
|
+
request: async ({ method: e, params: n }) => new Promise(() => {
|
|
4
|
+
if (console.log("Bitget------request", e, n), e === "openDApp") {
|
|
5
|
+
const t = `${o.deepLink}?action=dapp&url=${window.location.href}`;
|
|
6
|
+
console.log("Bitget------deepLink", t), window.location.href = t;
|
|
7
|
+
}
|
|
8
|
+
})
|
|
9
|
+
});
|
|
10
|
+
class a extends r {
|
|
11
|
+
constructor(e) {
|
|
12
|
+
const n = i(e);
|
|
13
|
+
super(e, n), this.connect = async () => {
|
|
14
|
+
const t = await this.getProvider();
|
|
15
|
+
try {
|
|
16
|
+
return this.beforeConnecting(), await t.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
|
|
17
|
+
} catch (s) {
|
|
18
|
+
return console.error(s), this.resetStatus(), Promise.reject(s);
|
|
19
|
+
}
|
|
20
|
+
}, this.reconnection = async () => {
|
|
21
|
+
console.log("reconnection");
|
|
22
|
+
}, this.disconnect = async () => {
|
|
23
|
+
this.resetStatus();
|
|
24
|
+
}, this.getAccounts = () => {
|
|
25
|
+
}, this.__onAccountsChanged = () => {
|
|
26
|
+
}, this.__onChainChanged = () => {
|
|
27
|
+
}, this.__onConnect = () => {
|
|
28
|
+
}, this.__onDisconnect = () => {
|
|
29
|
+
}, this.deepLink = e.deepLink;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
a as default
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CQkA0oWr.js"),i=o=>({request:async({method:e,params:t})=>(console.log("Tron-----request",e,t),new Promise(()=>{if(e==="openDApp"){const n=`${o.deepLink}?param=${encodeURIComponent(JSON.stringify({url:window==null?void 0:window.location.href,action:"open",protocol:"tronlink",version:"1.0"}))}`;console.log("Tron-----deepLink",n),window.location.href=n}}))});class c extends s.BaseConnector{constructor(e){const t=i(e);super(e,t),this.connect=async()=>{const n=await this.getProvider();try{return this.beforeConnecting(),n.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(r){return this.resetStatus(),Promise.reject(r)}},this.reconnection=async()=>{console.log("reconnection")},this.disconnect=async()=>{this.resetStatus()},this.switchChain=()=>{},this.getAccounts=()=>{},this.getChainId=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CQkA0oWr.js"),l=(o,e)=>`https://phantom.app/ul/v1/${o}?${e.toString()}`,p=o=>({request:async({method:e,params:c})=>(console.log("Phantom-----request",e,c),new Promise(()=>{if(e==="openDApp"){const n=encodeURIComponent(window.location.href),t=`${o.deepLink}/${n}?ref=${n}`;console.log("Phantom------deepLink",t),window.location.href=t}else if(e==="login"){const n=r.nacl.box.keyPair(),t=r.bs58.encode(n.publicKey),i=n.secretKey;localStorage.setItem("clientPrivateKey",r.bs58.encode(i));const s=new URLSearchParams({dapp_encryption_public_key:t,app_url:window.location.href,redirect_link:window.location.href}),a=l("connect",s);window.location.href=a}}))});class h extends r.BaseConnector{constructor(e){const c=p(e);super(e,c),this.connect=async()=>{const n=await this.getProvider();try{return this.beforeConnecting(),await n.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(t){return console.error(t),this.resetStatus(),Promise.reject(t)}},this.reconnection=async()=>{console.log("reconnection")},this.disconnect=async()=>{this.resetStatus()},this.getAccounts=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9D,eAAO,MAAM,eAAe,EAAE,YAG7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./gelWalletConnector-DWtJW90d.js"),o=require("./index-CQkA0oWr.js");class p extends m.GelWalletConnector{constructor(w){super(w,o.ChainType.EVM),this.getChainId=async()=>{const r=await(await this.getProvider()).request({method:"eth_chainId"});return Number(r)},this.connect=async t=>{try{const r=await this.getProvider();this.addEventListener(),this.beforeConnecting();const s=(await r.request({method:"eth_requestAccounts",params:[{chainId:t||o.numberToHex(this.store.getState().currentNetworkId)}]}))[0];return this.connectSuccess(s),s}catch(r){throw this.removeEventListener(),this.connectError(),r}},this.reconnection=async()=>{try{const t=await this.getProvider();this.addEventListener(),this.beforeConnecting();const e=(await t.request({method:"eth_accounts"}))[0];e?this.connectSuccess(e):this.__onDisconnect()}catch{this.removeEventListener(),this.connectError()}},this.disconnect=async()=>{this.__onDisconnect()},this.signMessage=async t=>await(await this.getProvider()).request({method:"personal_sign",params:[t,this.walletAddress]}),this.signTransaction=async t=>{const r=await this.getProvider();try{return await r.request({method:"eth_signTransaction",params:[t]})}catch(e){throw console.error("signTransaction:error",e),e}},this.sendTransaction=async t=>await(await this.getProvider()).request({method:"eth_sendTransaction",params:[t]}),this.multipleRequests=async t=>await await(await this.getProvider()).multipleRequest({chainType:o.ChainType.EVM,events:t}),this.waitForTransactionReceipt=async(t,r=6e4)=>{const e=await this.getProvider(),s=Date.now();for(;Date.now()-s<r;)try{const n=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(n)return n;await new Promise(a=>setTimeout(a,1e3))}catch(n){throw n}throw new Error("Transaction receipt timeout")},this.readContract=async t=>{try{const{abi:r,address:e,functionName:s,args:n=[],rpcUrl:a,from:h}=t,c=this.store.getState().currentNetwork,l=a||(c==null?void 0:c.rpcUrls[0])||"",d=o.encodeFunctionData({abi:r,functionName:s,args:n}),u=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:Math.floor(Math.random()*1e5),jsonrpc:"2.0",method:"eth_call",params:[h?{from:h,to:e,data:d}:{to:e,data:d},"latest"]})}),i=await u.json();if(i.error)throw new Error(i.error.message);return!i.result||i.result==="0x"?u:o.decodeFunctionResult({abi:r,functionName:s,data:i.result})}catch(r){throw r}},this.writeContract=async t=>{const r=await this.getProvider();try{const e=o.encodeFunctionData({abi:t.abi,functionName:t.functionName,args:t.args||[]}),s={from:this.walletAddress,to:t.address,data:e,value:t.value};return await r.request({method:"eth_sendTransaction",params:[s]})}catch(e){const s=e;throw s.code===o.UserRejectedRequestError.code?new o.UserRejectedRequestError(s):s}},this.multicall=async(t,r)=>{try{const e=this.store.getState().currentNetwork;return await o.multicallRpc(t,{...r,network:e})}catch(e){const s=e;throw s.code===o.UserRejectedRequestError.code?new o.UserRejectedRequestError(s):s}},this.switchNetwork=async t=>{const r=await this.getProvider();try{await r.request({method:"wallet_switchEthereumChain",params:[{chainId:o.numberToHex(t)}]})}catch(e){if((e==null?void 0:e.code)===4902){const n=this.supportedNetworks.find(a=>a.chainId===t);if(n){const a={...n,chainId:o.numberToHex(n==null?void 0:n.chainId)};await r.request({method:"wallet_addEthereumChain",params:[a]})}return}const s=e;throw s.code===o.UserRejectedRequestError.code?new o.UserRejectedRequestError(s):s}}}}exports.default=p;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { G as g } from "./gelWalletConnector-B3UtBzAC.mjs";
|
|
2
|
+
import { a as l, n as h, e as m, d as y, U as n, m as f } from "./index-djQ_DEqj.mjs";
|
|
3
|
+
class C extends g {
|
|
4
|
+
constructor(p) {
|
|
5
|
+
super(p, l.EVM), this.getChainId = async () => {
|
|
6
|
+
const r = await (await this.getProvider()).request({ method: "eth_chainId" });
|
|
7
|
+
return Number(r);
|
|
8
|
+
}, this.connect = async (e) => {
|
|
9
|
+
try {
|
|
10
|
+
const r = await this.getProvider();
|
|
11
|
+
this.addEventListener(), this.beforeConnecting();
|
|
12
|
+
const s = (await r.request({
|
|
13
|
+
method: "eth_requestAccounts",
|
|
14
|
+
params: [
|
|
15
|
+
{
|
|
16
|
+
chainId: e || h(this.store.getState().currentNetworkId)
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}))[0];
|
|
20
|
+
return this.connectSuccess(s), s;
|
|
21
|
+
} catch (r) {
|
|
22
|
+
throw this.removeEventListener(), this.connectError(), r;
|
|
23
|
+
}
|
|
24
|
+
}, this.reconnection = async () => {
|
|
25
|
+
try {
|
|
26
|
+
const e = await this.getProvider();
|
|
27
|
+
this.addEventListener(), this.beforeConnecting();
|
|
28
|
+
const t = (await e.request({
|
|
29
|
+
method: "eth_accounts"
|
|
30
|
+
}))[0];
|
|
31
|
+
t ? this.connectSuccess(t) : this.__onDisconnect();
|
|
32
|
+
} catch {
|
|
33
|
+
this.removeEventListener(), this.connectError();
|
|
34
|
+
}
|
|
35
|
+
}, this.disconnect = async () => {
|
|
36
|
+
this.__onDisconnect();
|
|
37
|
+
}, this.signMessage = async (e) => await (await this.getProvider()).request({
|
|
38
|
+
method: "personal_sign",
|
|
39
|
+
params: [e, this.walletAddress]
|
|
40
|
+
}), this.signTransaction = async (e) => {
|
|
41
|
+
const r = await this.getProvider();
|
|
42
|
+
try {
|
|
43
|
+
return await r.request({
|
|
44
|
+
method: "eth_signTransaction",
|
|
45
|
+
params: [e]
|
|
46
|
+
});
|
|
47
|
+
} catch (t) {
|
|
48
|
+
throw console.error("signTransaction:error", t), t;
|
|
49
|
+
}
|
|
50
|
+
}, this.sendTransaction = async (e) => await (await this.getProvider()).request({
|
|
51
|
+
method: "eth_sendTransaction",
|
|
52
|
+
params: [e]
|
|
53
|
+
}), this.multipleRequests = async (e) => await await (await this.getProvider()).multipleRequest({
|
|
54
|
+
chainType: l.EVM,
|
|
55
|
+
events: e
|
|
56
|
+
}), this.waitForTransactionReceipt = async (e, r = 6e4) => {
|
|
57
|
+
const t = await this.getProvider(), s = Date.now();
|
|
58
|
+
for (; Date.now() - s < r; )
|
|
59
|
+
try {
|
|
60
|
+
const o = await t.request({
|
|
61
|
+
method: "eth_getTransactionReceipt",
|
|
62
|
+
params: [e]
|
|
63
|
+
});
|
|
64
|
+
if (o) return o;
|
|
65
|
+
await new Promise((a) => setTimeout(a, 1e3));
|
|
66
|
+
} catch (o) {
|
|
67
|
+
throw o;
|
|
68
|
+
}
|
|
69
|
+
throw new Error("Transaction receipt timeout");
|
|
70
|
+
}, this.readContract = async (e) => {
|
|
71
|
+
try {
|
|
72
|
+
const { abi: r, address: t, functionName: s, args: o = [], rpcUrl: a, from: d } = e, c = this.store.getState().currentNetwork, v = a || (c == null ? void 0 : c.rpcUrls[0]) || "", u = m({
|
|
73
|
+
abi: r,
|
|
74
|
+
functionName: s,
|
|
75
|
+
args: o
|
|
76
|
+
}), w = await fetch(v, {
|
|
77
|
+
method: "POST",
|
|
78
|
+
headers: {
|
|
79
|
+
"Content-Type": "application/json"
|
|
80
|
+
},
|
|
81
|
+
body: JSON.stringify({
|
|
82
|
+
id: Math.floor(Math.random() * 1e5),
|
|
83
|
+
jsonrpc: "2.0",
|
|
84
|
+
method: "eth_call",
|
|
85
|
+
params: [d ? { from: d, to: t, data: u } : { to: t, data: u }, "latest"]
|
|
86
|
+
})
|
|
87
|
+
}), i = await w.json();
|
|
88
|
+
if (i.error)
|
|
89
|
+
throw new Error(i.error.message);
|
|
90
|
+
return !i.result || i.result === "0x" ? w : y({
|
|
91
|
+
abi: r,
|
|
92
|
+
functionName: s,
|
|
93
|
+
data: i.result
|
|
94
|
+
});
|
|
95
|
+
} catch (r) {
|
|
96
|
+
throw r;
|
|
97
|
+
}
|
|
98
|
+
}, this.writeContract = async (e) => {
|
|
99
|
+
const r = await this.getProvider();
|
|
100
|
+
try {
|
|
101
|
+
const t = m({
|
|
102
|
+
abi: e.abi,
|
|
103
|
+
functionName: e.functionName,
|
|
104
|
+
args: e.args || []
|
|
105
|
+
}), s = {
|
|
106
|
+
from: this.walletAddress,
|
|
107
|
+
to: e.address,
|
|
108
|
+
data: t,
|
|
109
|
+
value: e.value
|
|
110
|
+
};
|
|
111
|
+
return await r.request({
|
|
112
|
+
method: "eth_sendTransaction",
|
|
113
|
+
params: [s]
|
|
114
|
+
});
|
|
115
|
+
} catch (t) {
|
|
116
|
+
const s = t;
|
|
117
|
+
throw s.code === n.code ? new n(s) : s;
|
|
118
|
+
}
|
|
119
|
+
}, this.multicall = async (e, r) => {
|
|
120
|
+
try {
|
|
121
|
+
const t = this.store.getState().currentNetwork;
|
|
122
|
+
return await f(
|
|
123
|
+
e,
|
|
124
|
+
{
|
|
125
|
+
...r,
|
|
126
|
+
network: t
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
} catch (t) {
|
|
130
|
+
const s = t;
|
|
131
|
+
throw s.code === n.code ? new n(s) : s;
|
|
132
|
+
}
|
|
133
|
+
}, this.switchNetwork = async (e) => {
|
|
134
|
+
const r = await this.getProvider();
|
|
135
|
+
try {
|
|
136
|
+
await r.request({
|
|
137
|
+
method: "wallet_switchEthereumChain",
|
|
138
|
+
params: [{ chainId: h(e) }]
|
|
139
|
+
});
|
|
140
|
+
} catch (t) {
|
|
141
|
+
if ((t == null ? void 0 : t.code) === 4902) {
|
|
142
|
+
const o = this.supportedNetworks.find((a) => a.chainId === e);
|
|
143
|
+
if (o) {
|
|
144
|
+
const a = {
|
|
145
|
+
...o,
|
|
146
|
+
chainId: h(o == null ? void 0 : o.chainId)
|
|
147
|
+
};
|
|
148
|
+
await r.request({
|
|
149
|
+
method: "wallet_addEthereumChain",
|
|
150
|
+
params: [a]
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const s = t;
|
|
156
|
+
throw s.code === n.code ? new n(s) : s;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
export {
|
|
162
|
+
C as default
|
|
163
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { B as p, a as f, C } from "./index-djQ_DEqj.mjs";
|
|
2
|
+
class y extends p {
|
|
3
|
+
constructor(u, v) {
|
|
4
|
+
super(u, null), this.getProvider = async () => {
|
|
5
|
+
var t, s, o, r;
|
|
6
|
+
let e;
|
|
7
|
+
if (this.provider)
|
|
8
|
+
e = this.provider;
|
|
9
|
+
else {
|
|
10
|
+
const n = await import("./dapp.es-BPGP9PnL.mjs").then((c) => c.b), i = (n == null ? void 0 : n.GelWallet) ?? (n == null ? void 0 : n.Web3Kit) ?? (n == null ? void 0 : n.default);
|
|
11
|
+
if (!i) throw new Error("GelWallet SDK not found in @web3jskit/dapp");
|
|
12
|
+
const a = (t = this.chainType) == null ? void 0 : t.toLowerCase();
|
|
13
|
+
if ((s = window.Web3Kit) != null && s._instance)
|
|
14
|
+
e = window.Web3Kit._instance.provider[a];
|
|
15
|
+
else {
|
|
16
|
+
const c = ((r = (o = this.store) == null ? void 0 : o.getState()) == null ? void 0 : r.useTestWallet) || !1;
|
|
17
|
+
typeof i.config == "function" && i.config({
|
|
18
|
+
hideEvokingButton: !1,
|
|
19
|
+
takeover: {
|
|
20
|
+
ethereum: !0,
|
|
21
|
+
solana: !0,
|
|
22
|
+
tronLink: !0
|
|
23
|
+
},
|
|
24
|
+
useTestWallet: c
|
|
25
|
+
});
|
|
26
|
+
const h = new i();
|
|
27
|
+
if (this.instance = h, e = await new Promise((l) => {
|
|
28
|
+
const d = () => {
|
|
29
|
+
h.provider && h.provider[a] ? l(h.provider[a]) : setTimeout(d, 100);
|
|
30
|
+
};
|
|
31
|
+
d();
|
|
32
|
+
}), window.Web3Kit = window.Web3Kit || {}, window.Web3Kit._instance = h, this.chainType === f.EVM) {
|
|
33
|
+
const l = e.request, d = async ({ methodName: w, ...m }) => await l({
|
|
34
|
+
chainType: this.chainType,
|
|
35
|
+
methodName: w,
|
|
36
|
+
...m
|
|
37
|
+
});
|
|
38
|
+
e.request = d;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
this.provider = e;
|
|
42
|
+
}
|
|
43
|
+
return this.provider || {};
|
|
44
|
+
}, this.addEventListener = async () => {
|
|
45
|
+
window.addEventListener("message", this.handleWeb3KitEvent);
|
|
46
|
+
}, this.removeEventListener = async () => {
|
|
47
|
+
window.removeEventListener("message", this.handleWeb3KitEvent);
|
|
48
|
+
}, this.handleWeb3KitEvent = (e) => {
|
|
49
|
+
const t = e.data;
|
|
50
|
+
t.target === "jsweb3-did" && (t.eventName === "disconnect" ? this.__onDisconnect() : t.eventName === "accountsChanged" ? this.__onAccountsChanged(t) : t.eventName === "chainChanged" && this.__onChainChanged(t));
|
|
51
|
+
}, this.__onAccountsChanged = (e) => {
|
|
52
|
+
var o, r, n, i, a;
|
|
53
|
+
if (!((o = e.data.connectedWebs) == null ? void 0 : o.find((c) => c.net.chainType === this.chainType)))
|
|
54
|
+
return;
|
|
55
|
+
const s = (a = (i = (n = (r = e.data) == null ? void 0 : r.account) == null ? void 0 : n.seriesWallets) == null ? void 0 : i[this.chainType]) == null ? void 0 : a.walletAddress;
|
|
56
|
+
s && (this.connectSuccess(s), this.walletEventEmitter.emit("accountsChanged", s));
|
|
57
|
+
}, this.__onChainChanged = (e) => {
|
|
58
|
+
const t = e.data.net.chainId;
|
|
59
|
+
this.store.getState().setCurrentNetwork(Number(t)), this.walletEventEmitter.emit("chainChanged", e.data.net);
|
|
60
|
+
}, this.__onConnect = () => {
|
|
61
|
+
}, this.__onDisconnect = async () => {
|
|
62
|
+
const e = await this.getProvider();
|
|
63
|
+
this.resetStatus(), this.removeEventListener(), this.walletEventEmitter.emit("disconnect"), e == null || e.request({
|
|
64
|
+
method: "wallet_revokePermissions",
|
|
65
|
+
params: [
|
|
66
|
+
{
|
|
67
|
+
eth_accounts: {}
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
}, this.chainType = v, this.connectorType = C.Run;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
y as G
|
|
76
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("./index-CQkA0oWr.js");class f extends u.BaseConnector{constructor(v,w){super(v,null),this.getProvider=async()=>{var t,s,a,r;let e;if(this.provider)e=this.provider;else{const n=await Promise.resolve().then(()=>require("./dapp.es-sLnregcu.js")).then(c=>c.dapp_es),i=(n==null?void 0:n.GelWallet)??(n==null?void 0:n.Web3Kit)??(n==null?void 0:n.default);if(!i)throw new Error("GelWallet SDK not found in @web3jskit/dapp");const o=(t=this.chainType)==null?void 0:t.toLowerCase();if((s=window.Web3Kit)!=null&&s._instance)e=window.Web3Kit._instance.provider[o];else{const c=((r=(a=this.store)==null?void 0:a.getState())==null?void 0:r.useTestWallet)||!1;typeof i.config=="function"&&i.config({hideEvokingButton:!1,takeover:{ethereum:!0,solana:!0,tronLink:!0},useTestWallet:c});const h=new i;if(this.instance=h,e=await new Promise(l=>{const d=()=>{h.provider&&h.provider[o]?l(h.provider[o]):setTimeout(d,100)};d()}),window.Web3Kit=window.Web3Kit||{},window.Web3Kit._instance=h,this.chainType===u.ChainType.EVM){const l=e.request,d=async({methodName:m,...p})=>await l({chainType:this.chainType,methodName:m,...p});e.request=d}}this.provider=e}return this.provider||{}},this.addEventListener=async()=>{window.addEventListener("message",this.handleWeb3KitEvent)},this.removeEventListener=async()=>{window.removeEventListener("message",this.handleWeb3KitEvent)},this.handleWeb3KitEvent=e=>{const t=e.data;t.target==="jsweb3-did"&&(t.eventName==="disconnect"?this.__onDisconnect():t.eventName==="accountsChanged"?this.__onAccountsChanged(t):t.eventName==="chainChanged"&&this.__onChainChanged(t))},this.__onAccountsChanged=e=>{var a,r,n,i,o;if(!((a=e.data.connectedWebs)==null?void 0:a.find(c=>c.net.chainType===this.chainType)))return;const s=(o=(i=(n=(r=e.data)==null?void 0:r.account)==null?void 0:n.seriesWallets)==null?void 0:i[this.chainType])==null?void 0:o.walletAddress;s&&(this.connectSuccess(s),this.walletEventEmitter.emit("accountsChanged",s))},this.__onChainChanged=e=>{const t=e.data.net.chainId;this.store.getState().setCurrentNetwork(Number(t)),this.walletEventEmitter.emit("chainChanged",e.data.net)},this.__onConnect=()=>{},this.__onDisconnect=async()=>{const e=await this.getProvider();this.resetStatus(),this.removeEventListener(),this.walletEventEmitter.emit("disconnect"),e==null||e.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]})},this.chainType=w,this.connectorType=u.ConnectorType.Run}}exports.GelWalletConnector=f;
|