fortmatic
TypeScript icon, indicating that this package has built-in type declarations

2.4.0 • Public • Published

Fortmatic Javascript SDK

Fortmatic JavaScript SDK lets developers conveniently connect their web apps to the Ethereum blockchain - allowing end-users to interact with their apps on any modern browser, without requiring them to download any browser extensions or mobile dApp browsers.

Documentation

See the Developer Documentation.

Installation

Integrating your app with Fortmatic will need our npm package:

# Via NPM:
npm install --save fortmatic

# Via Yarn:
yarn add fortmatic

Alternatively you can load via CDN with by adding a script tag to your app’s <head>:

<script src="https://cdn.jsdelivr.net/npm/fortmatic/dist/fortmatic.js"></script>

Usage

Sign up or log in to the Developer Dashboard to receive API keys that will allow your app to interact with the Ethereum blockchain through Fortmatic.

You can then integrate by simply replacing your web3 provider with Fortmatic provider. Now, instead of the MetaMask Chrome Extension opening, a Fortmatic modal will show instead—requiring no additional user downloads. Fortmatic works across all modern desktop, mobile Chrome, Safari and Firefox browsers.

import Fortmatic from 'fortmatic';

// Create client and replace web3 provider
const fm = new Fortmatic('YOUR_API_KEY');
web3 = new Web3(fm.getProvider());

// Send transactions the way your are used to
web3.eth.sendTransaction({/* ... */});

Package Sidebar

Install

npm i fortmatic

Weekly Downloads

19,116

Version

2.4.0

License

MIT

Unpacked Size

97.6 kB

Total Files

30

Last publish

Collaborators

  • ritalestermagic
  • romin-halltari
  • darrentmagic
  • magictristan
  • musicbender
  • jay.hwang
  • benmagic
  • josh_scanlan
  • sgdheeban
  • magic_mikeb
  • magiclabs_fe
  • amagic
  • ayv8er
  • mikeysight
  • damianjachyra
  • jasonatmagic
  • bcleary06
  • lishang106
  • seanli
  • jmjin
  • ethella
  • dizigen
  • dc-magic
  • hcote