├── plan.md
├── README.ar-AE.md
├── README.fr-FR.md
├── README.ru-RU.md
├── README.zh-HK.md
├── packages
├── tools
│ ├── index.js
│ └── utils.js
├── constants
│ ├── index.js
│ ├── keys.js
│ └── chains.js
├── assets
│ ├── images
│ │ ├── close.png
│ │ ├── MetaMask.png
│ │ ├── bgBtHide.png
│ │ ├── bgBtShow.png
│ │ └── WalletConnect.png
│ └── logos
│ │ ├── metamask.png
│ │ ├── BlockWallet.png
│ │ ├── burnerwallet.png
│ │ ├── fortmatic.svg
│ │ ├── torus.svg
│ │ ├── imtoken.svg
│ │ ├── binancechainwallet.svg
│ │ ├── venly.svg
│ │ ├── coinbase.svg
│ │ ├── walletconnect.svg
│ │ ├── walletconnect-circle.svg
│ │ ├── authereum.svg
│ │ ├── portis.svg
│ │ ├── metamask.svg
│ │ └── bitski.svg
├── index.js
├── providers
│ ├── index.js
│ ├── connectors
│ │ ├── burnerconnect.js
│ │ ├── binancechainwallet.js
│ │ ├── torus.js
│ │ ├── index.js
│ │ ├── authereum.js
│ │ ├── blockmallet.js
│ │ ├── metamask.js
│ │ ├── portis.js
│ │ ├── fortmatic.js
│ │ ├── walletlink.js
│ │ └── walletconnect.js
│ └── providers
│ │ └── index.js
└── base
│ └── index.jsx
├── images
└── preview.png
├── public
├── favicon.ico
└── index.html
├── babel.config.js
├── examples
├── assets
│ ├── Bean.gif
│ ├── logo.png
│ ├── images.png
│ └── logos
│ │ ├── metamask.png
│ │ ├── BlockWallet.png
│ │ ├── burnerwallet.png
│ │ ├── fortmatic.svg
│ │ ├── torus.svg
│ │ ├── imtoken.svg
│ │ ├── binancechainwallet.svg
│ │ ├── venly.svg
│ │ ├── coinbase.svg
│ │ ├── walletconnect.svg
│ │ ├── walletconnect-circle.svg
│ │ ├── authereum.svg
│ │ ├── portis.svg
│ │ ├── metamask.svg
│ │ └── bitski.svg
├── main.js
├── App.vue
└── components
│ └── HelloWorld.vue
├── index.js
├── .gitignore
├── .npmignore
├── vue.config.js
├── LICENSE
├── package.json
├── .github
└── workflows
│ └── main.yml
├── NetWork.md
├── README.zh-CN.md
├── README.ja-JP.md
└── README.md
/plan.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/README.ar-AE.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/README.fr-FR.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/README.ru-RU.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/README.zh-HK.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/packages/tools/index.js:
--------------------------------------------------------------------------------
1 | export * from "./utils";
--------------------------------------------------------------------------------
/packages/constants/index.js:
--------------------------------------------------------------------------------
1 | export * from "./chains";
2 | export * from "./keys";
3 |
--------------------------------------------------------------------------------
/images/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/images/preview.png
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/examples/assets/Bean.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/examples/assets/Bean.gif
--------------------------------------------------------------------------------
/examples/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/examples/assets/logo.png
--------------------------------------------------------------------------------
/examples/assets/images.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/examples/assets/images.png
--------------------------------------------------------------------------------
/packages/assets/images/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/packages/assets/images/close.png
--------------------------------------------------------------------------------
/examples/assets/logos/metamask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/examples/assets/logos/metamask.png
--------------------------------------------------------------------------------
/packages/assets/logos/metamask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/packages/assets/logos/metamask.png
--------------------------------------------------------------------------------
/examples/assets/logos/BlockWallet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/examples/assets/logos/BlockWallet.png
--------------------------------------------------------------------------------
/packages/assets/images/MetaMask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/packages/assets/images/MetaMask.png
--------------------------------------------------------------------------------
/packages/assets/images/bgBtHide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/packages/assets/images/bgBtHide.png
--------------------------------------------------------------------------------
/packages/assets/images/bgBtShow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/packages/assets/images/bgBtShow.png
--------------------------------------------------------------------------------
/packages/assets/logos/BlockWallet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/packages/assets/logos/BlockWallet.png
--------------------------------------------------------------------------------
/examples/assets/logos/burnerwallet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/examples/assets/logos/burnerwallet.png
--------------------------------------------------------------------------------
/packages/assets/logos/burnerwallet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/packages/assets/logos/burnerwallet.png
--------------------------------------------------------------------------------
/packages/assets/images/WalletConnect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Daudxu/eth-wallet-modal/HEAD/packages/assets/images/WalletConnect.png
--------------------------------------------------------------------------------
/packages/index.js:
--------------------------------------------------------------------------------
1 | import { Base } from "./base";
2 |
3 | export * from "./constants";
4 | export * from "./providers";
5 |
6 | export default Base;
7 |
--------------------------------------------------------------------------------
/examples/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 |
4 | const app = createApp(App);
5 |
6 | app.mount("#app");
7 |
8 |
--------------------------------------------------------------------------------
/packages/constants/keys.js:
--------------------------------------------------------------------------------
1 | export const ETH_DAPP_WALLET_CONNECT_MODAL_ID = "ETH_DAPP_WALLET_CONNECT_MODAL_ID";
2 | export const INJECTED_PROVIDER_ID = "injected";
--------------------------------------------------------------------------------
/packages/providers/index.js:
--------------------------------------------------------------------------------
1 | import * as connectors from "./connectors";
2 | import * as providers from "./providers";
3 |
4 | export { connectors, providers };
5 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | // index.js
2 | if (process.env.NODE_ENV === 'production') { // 通过环境变量来决定入口文件
3 | module.exports = require('./lib/eth-wallet-modal.umd.min.js')
4 | } else {
5 | module.exports = require('./lib/eth-wallet-modal.umd.js')
6 | }
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 | .history
5 | lib
6 |
7 | # local env files
8 | .env.local
9 | .env.*.local
10 |
11 | # Log files
12 | npm-debug.log*
13 | yarn-debug.log*
14 | yarn-error.log*
15 | pnpm-debug.log*
16 |
17 | # Editor directories and files
18 | .idea
19 | .vscode
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
--------------------------------------------------------------------------------
/packages/tools/utils.js:
--------------------------------------------------------------------------------
1 | import { CHAIN_DATA_LIST } from "../constants"
2 |
3 | export function getChainId (network) {
4 | const chains = Object.values(CHAIN_DATA_LIST);
5 | const match = (
6 | chains,
7 | x => x.network === network,
8 | undefined
9 | );
10 | if (!match) {
11 | throw new Error(`No chainId found match ${network}`);
12 | }
13 | return match.chainId;
14 | }
--------------------------------------------------------------------------------
/packages/providers/connectors/burnerconnect.js:
--------------------------------------------------------------------------------
1 | import BurnerConnectProvider from '@burner-wallet/burner-connect-provider'
2 |
3 | const ConnectToBurnerConnect = async (options) => {
4 | options.defaultNetwork = options.defaultNetwork || options.chainId
5 |
6 | const provider = new BurnerConnectProvider(options)
7 |
8 | await provider.enable()
9 |
10 | return provider
11 | }
12 |
13 | export default ConnectToBurnerConnect
14 |
--------------------------------------------------------------------------------
/examples/assets/logos/fortmatic.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/assets/logos/fortmatic.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/assets/logos/torus.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/assets/logos/torus.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | node_modules/.bin/
5 | build/
6 | config/
7 | static/
8 | .babelrc
9 | .editorconfig
10 | .gitignore
11 | .npmignore
12 | .postcssrc.js
13 | index.html
14 | package-lock.json
15 | npm-debug.log*
16 | yarn-debug.log*
17 | yarn-error.log*
18 | .history
19 | #Editordirectoriesandfiles
20 | .idea
21 | .vscode
22 | *.suo
23 | *.ntvs*
24 | *.njsproj
25 | *.sln
26 | #忽略目录
27 | examples/
28 | packages/
29 | public/
30 | #忽略指定文件
31 | vue.config.js
32 | babel.config.js
33 | *.map
34 |
--------------------------------------------------------------------------------
/packages/providers/connectors/binancechainwallet.js:
--------------------------------------------------------------------------------
1 | const ConnectToBinanceChainWallet = async () => {
2 | let provider = null;
3 | if (typeof window.BinanceChain !== "undefined") {
4 | provider = window.BinanceChain;
5 | try {
6 | await provider.request({ method: "eth_requestAccounts" });
7 | } catch (error) {
8 | throw new Error("User Rejected");
9 | }
10 | } else {
11 | throw new Error("No Binance Chain Wallet found");
12 | }
13 | return provider;
14 | };
15 |
16 | export default ConnectToBinanceChainWallet;
17 |
--------------------------------------------------------------------------------
/examples/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 | Dapp ETH Wallet Modal plugin. 6 |
7 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |