Fortmatic SDK allows you to easily integrate your app with the Ethereum blockchain, whether you already have a dApp integrated with web3 or are starting from scratch. Fortmatic provides a smooth and delightful experience for both you and your app's users.
Let's start by building a simple Ethereum wallet dApp that uses Fortmatic to send test Ether transactions to other users.
Install Fortmatic SDK to your dApp by including a script tag between the "TODO" comment lines on the CodePen editor.
Create a Fortmatic instance with your API key with the following script and replace your existing web3 provider.
Make sure to use your Testnet key for this tutorial.
// TODO: Step 2: Setup Developer API Key
let fm = new Fortmatic('YOUR_API_KEY');
web3 = new Web3(fm.getProvider());
// End Step 2
You can implement web3 functionalities just like how you would normally with MetaMask.
// TODO: Step 3: Send Transaction Implementation
// From address will automatically be replaced by the address of current user
value: web3.utils.toWei(amount, 'ether')
// End Step 3
After putting the 3 code snippets above into the editor, click on the Send Transaction button in the web preview and voilà! Your app is now blockchain enabled!
Psst...when you signup for a Fortmatic account on Rinkeby testnet, we'll automatically send 1 ETH to your account to play with 🎁