πŸš€
Get Started
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.
This documentation for the Fortmatic Javascript SDK will get you started in minutes!

Hello World Walkthrough

Let's start by building a simple Ethereum wallet dApp that uses Fortmatic to send test Ether transactions to other users.
πŸ‘‰ Go to our Hello World Tutorial on CodePen to get started.

Step 1: Include Fortmatic SDK Script

Install Fortmatic SDK to your dApp by including a script tag between the "TODO" comment lines on the CodePen editor.
1
<!-- TODO: Step 1: Include Fortmatic SDK Script -->
2
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/fortmatic.js"></script>
3
<!-- End Step 1 -->
Copied!
or download Fortmatic SDK to your project via NPM. Read More​
1
$ npm i --save [email protected]
Copied!

Step 2: Setup Developer API Key

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.
1
// TODO: Step 2: Setup Developer API Key
2
let fm = new Fortmatic('YOUR_API_KEY');
3
web3 = new Web3(fm.getProvider());
4
// End Step 2
Copied!
You need to sign up or log into your Fortmatic dashboard to get your API keys:

Step 3: Send Transaction Implementation

You can implement web3 functionalities just like how you would normally with MetaMask.
1
// TODO: Step 3: Send Transaction Implementation
2
web3.eth.sendTransaction({
3
// From address will automatically be replaced by the address of current user
4
from: '0x0000000000000000000000000000000000000000',
5
to: address,
6
value: web3.utils.toWei(amount, 'ether')
7
});
8
// End Step 3
Copied!

Your First Fortmatic dApp! πŸŽ‰

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 🎁
Last modified 1yr ago