Disclaimer: We recommend not to use your ‘main’ wallet during development. Always use a separate or thow-away wallet to not expose your wallet and lose funds due to errors!
In this tutorial you learn how to use MetaMask in your web3 project. It may seem quite straight forward to connect to a MetaMask account, there are many caveats, that you take into account:
You can directly access the example on GitHub Pages.
https://harmony-devdao.github.io/wallet-integration-mm/
Clone the repository or check the code inside the GitHub Pages deployment
https://github.com/harmony-devdao/wallet-integration-mm
MetaMask is a browser extension wallet which don’t provide a lot of security, but are secure as long as you keep your mnemonic and private keys save and your computer doesn’t get compromised. There is also the risk of installing a fraudulent Browser extension, which is just designed to steal your private keys. Always be cautious!