├── .gitignore ├── README.md ├── index.html ├── index.js ├── package-lock.json ├── package.json ├── snap.config.json └── utils ├── babyjub.js └── poseidon.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | build/ 3 | dist/ 4 | .DS_Store 5 | .node-* 6 | *.log 7 | state_*.json 8 | .env 9 | __pycache__ 10 | *.pyc 11 | .idea/ 12 | genkeys/ 13 | *.deployed 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # eddsa-metamask-plugin 2 | 3 | A MetaMask plugin for signing EdDSA data. Currently only works in the [MetaMask Snaps](https://github.com/MetaMask/metamask-extension/tree/snaps). More information can be found in the [wiki](https://github.com/MetaMask/metamask-snaps-beta/wiki). 4 | 5 | ## How to use this plugin 6 | 7 | - [Install the MetaMask Extension - Snaps branch](https://github.com/MetaMask/metamask-extension/tree/snaps) 8 | - [Install the Metamask snaps-skunkworks](https://github.com/MetaMask/snaps-skunkworks) 9 | - Clone this repo 10 | - Go to the root folder of this repo 11 | - Run `npm install` 12 | - Run `mm-snap build` and then `mm-snap serve` 13 | - Browse to `localhost:8085` in the browser you installed the MetaMask Beta in 14 | - Follow the intstructions given on the website 15 | 16 | This plugin uses a very slightly modified [snarkjs](https://github.com/iden3/snarkjs) package found [here](https://github.com/Brechtpd/snarkjs). The modifications were done to make the package compatible with [SES (Secure EcmaScript)](https://github.com/Agoric/SES). 17 | 18 | - After `npm install`, go and find `calculateWitnes.js` file inside `node_modules` and remove `-->` and `--->` otherwise `build` will not work (it isn't SES compatible). 19 | 20 | - It works only with Chrome (Install Metamask extension on Chrome) 21 | 22 | - It was updated to work with Metamask Snaps -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |