For instructions on how to install and setup Metamask to work with Harmony blockchain please click here.
You can connect and sign transactions with Metamask using the Web3 library - which is fully compatible with the Harmony RPC API.
Do not forget that an important difference from One Wallet is that Metamsk sends transactions itself (extension side). While One Wallet only sign transaction, and then sending happens on browser side.
To use next example, you need to include the following libraries:
npm i '@metamask/detect-provider' --save
npm i web3 --save
npm i 'bn.js' --save
First step - you need to detect provider and connect to Metamask:
After executing this function, an interactive MetaMask window will open in which you can sign the transaction and change the gasPrice / gasLimit parameters - if it necessary.