1.0.4 • Published 5 years ago

metamask-forwader v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

MetaMask Forwader

About

  • On passing the url of your dapp and calling this module it opens the extension store acccording to the browser and the forwader page .After the user completes onboarding on MetaMask ,the forwader page redirects the user to your dapp

Working

  • the forwader keeps refreshing till it detects web3 is injected
  • After the user completes the onboarding ,MetaMask passes a postmessage to the forwader page indicating the onboarding has completed
  • the forwader then redirects the user to your dapp

Installation

$ npm install metamask-forwader
or
$ yarn add metamask-forwader

Usage

import React,{Component} from 'react';
var  forwader =  require('metamask-forwader')
 
class App extends Component {
  constructor() {
    super();
 }
  render() {
   let  url =  window.location.href //the url of your dapp
   forwader(url)
  }
}