GithubHelp home page GithubHelp logo

jkosior / mascara Goto Github PK

View Code? Open in Web Editor NEW

This project forked from metamask/mascara

0.0 0.0 0.0 247 KB

(beta) Add MetaMask to your dapp even if the user doesn't have the extension installed

License: Other

JavaScript 96.70% HTML 3.30%

mascara's Introduction

MetaMascara

MetaMascara(mascara) brings metamask when metamask is not installed.

Disclaimer:

MetaMascar is in alpha expect breaking changes

to use as a CDN put this script tag in the <head> of your html file:

<script src="https://wallet.metamask.io/metamascara.js"></script>

or bring your own:

npm i --save metamascara

const metamask = require('metamascara')
const EthJs = require('ethjs')

// mascara will use the environmental provider if the user brings one
// in the form of metamask extension, mist or parity
// other wise it will make one for you :}

const ethereumProvider = metamask.createDefaultProvider()

const eth = new EthJs(ethereumProvider)

// do stuff...

Developing:

For development with metamask-extension/mascara to point the iframe at localhost just do:

const metamask = require('metamascara')
const ethereumProvider = metamask.createDefaultProvider({
    host: 'http://localhost:9001'
  }) // or what ever port you use

How does it work and how to use it:

Mascara is an iframe that acts as a proxy between your dapp and metamask core. The metamask core is the global context housed in a service worker, it does the key management for every dapp the user visits.

nomnom

todo's:

mascara's People

Contributors

frankiebee avatar danfinlay avatar alextsg avatar monokh avatar digitaldonkey avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.