# auramascara

> mascara module for all the requires the handy dandy fall back when metamask Isn't installed

Latest version **0.0.1** (published 2018-09-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install auramascara
pnpm add auramascara
yarn add auramascara
bun add auramascara
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2018-09-13 |
| First published | 2018-09-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 210.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | auramask |
| Maintainers | irchain-io |

## Links

- npm: https://www.npmjs.com/package/auramascara
- Repository: https://github.com/AuraMask/mascara
- Homepage: https://github.com/AuraMask/mascara#readme
- Issues: https://github.com/AuraMask/mascara/issues
- npm.io page: https://npm.io/package/auramascara

## Dependencies (7)

- [pump](https://npm.io/package/pump.md) ^1.0.2
- [iframe](https://npm.io/package/iframe.md) ^1.0.0
- [obs-store](https://npm.io/package/obs-store.md) ^2.4.1
- [iframe-stream](https://npm.io/package/iframe-stream.md) ^3.0.0
- [obj-multiplex](https://npm.io/package/obj-multiplex.md) ^1.0.0
- [json-rpc-engine](https://npm.io/package/json-rpc-engine.md) ^3.1.0
- [irc-json-rpc-middleware-stream](https://npm.io/package/irc-json-rpc-middleware-stream.md) ^1.0.0

## Recent versions

- 0.0.1 (latest) — 2018-09-13

## README

# AuraMascara [![CircleCI](https://circleci.com/gh/AuraMask/mascara.svg?style=svg)](https://circleci.com/gh/AuraMask/mascara)

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

## Disclaimer:

AuraMascara is in alpha expect breaking changes

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

```html
<script src="https://wallet.metamask.io/auramascara.js"></script>
```

or bring your own:

`npm i --save auramascara`

```js
const metamask = require('auramascara')
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:

```js
const metamask = require('auramascara')
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](./images/nomnoml.png)


## todo's:

- [ ] have an option to load metamask core off IPFS (relies on metamask issue [2163])
- [ ] [Subresource Integrity]

[metamask-extension/mascara]: https://github.com/MetaMask/metamask-extension/tree/master/mascara
[2163]: https://github.com/MetaMask/metamask-extension/issues/2163
[Subresource Integrity]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity

---
_Source: https://npm.io/package/auramascara · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
