All Projects → JoinColony → node-metamask

JoinColony / node-metamask

Licence: MIT license
🦊 Connect to MetaMask from node.js

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to node-metamask

gcc-output-parser
gcc error parsing library
Stars: ✭ 17 (-78.48%)
Mutual labels:  node-js
ptkdev-logger
🦒 Beautiful Logger for Node.js: the best alternative to the console.log statement
Stars: ✭ 117 (+48.1%)
Mutual labels:  node-js
facebook-node-sdk
Modeled from the (Facebook Javascript SDK), now with the facebook-node-sdk you can now easily write the same code and share between your server (nodejs) and the client (Facebook Javascript SDK).
Stars: ✭ 519 (+556.96%)
Mutual labels:  node-js
Discord-EmojiToRole
A discord.js bot that assigns roles based on reactions to a message.
Stars: ✭ 55 (-30.38%)
Mutual labels:  node-js
SimpleRemoteDesktop
Remote desktop client based on h264 steam. like splashtop and other
Stars: ✭ 17 (-78.48%)
Mutual labels:  node-js
serverless-plugin-browserifier
Reduce the size and speed up your Node.js based lambda's using browserify.
Stars: ✭ 26 (-67.09%)
Mutual labels:  node-js
phaChat
a web chat by node.js 一个基于 node.js 的多人 web 聊天室
Stars: ✭ 18 (-77.22%)
Mutual labels:  node-js
inspireNuggetsSlackBot
A simple Slackbot that displays random inspiring techie quotes and jokes for developers/designers.
Stars: ✭ 15 (-81.01%)
Mutual labels:  node-js
express-boilerplate
ExpressJS boilerplate with Socket.IO, Mongoose for scalable projects.
Stars: ✭ 83 (+5.06%)
Mutual labels:  node-js
qewd-transform-json
Transforms JavaScript Objects using a Template Object
Stars: ✭ 33 (-58.23%)
Mutual labels:  node-js
node-tw-e-invoice
An unofficial Node.js interface of Taiwan MOF E-Invoice API . 台灣財政部電子發票 API 的 非官方 Node.js 介面。
Stars: ✭ 22 (-72.15%)
Mutual labels:  node-js
generator-node-bahmutov
My personal Node project boilerplate generator
Stars: ✭ 39 (-50.63%)
Mutual labels:  node-js
ExpressJS-SocketIO-Boilerplate
📦 Simple Express.js & Socket.io Boilerplate
Stars: ✭ 31 (-60.76%)
Mutual labels:  node-js
zulipbot
GitHub workflow-optimizing bot by @zulip
Stars: ✭ 70 (-11.39%)
Mutual labels:  node-js
A41SLBOT
All For One Bot is an open-source discord server bot built for All For One SL™ discord server.
Stars: ✭ 83 (+5.06%)
Mutual labels:  node-js
Node-js-functionalities
This repository contains very useful restful API's and functionalities in node-js containing many important tutorial code for mastering node-js, all tutorials have been published on medium.com, tutorials link is given below
Stars: ✭ 69 (-12.66%)
Mutual labels:  node-js
Petals
A project to help restaurants in post covid world made with Flutter, VueJs and NodeJs.
Stars: ✭ 17 (-78.48%)
Mutual labels:  node-js
MetaMask.Blazor
Use MetaMask with Blazor WebAssembly
Stars: ✭ 26 (-67.09%)
Mutual labels:  metamask
filsnap
MetaMask snap for interacting with Filecoin dapps.
Stars: ✭ 60 (-24.05%)
Mutual labels:  metamask
playground-for-node
Simple examples that help you get started with Appwrite + Node.js (=❤️)
Stars: ✭ 39 (-50.63%)
Mutual labels:  node-js

node-metamask

Connect Node.js to MetaMask.

"Why would I ever want to do that?" - Sometimes you might have scripts or libraries that run in Node and require signed transactions that you would like to use MetaMask for (instead of dealing with private keys). This tool functions as a web3 provider that can be used with pretty much any MetaMask instance remotely. Please, only use this package locally to prevent PITM attacks (if you're brave enough to try it on mainnet).

Sounds crazy? It probably is. Also highly experimental. Please use with caution.

Install

yarn add node-metamask

Usage

const MetaMaskConnector = require('node-metamask');
const connector = new MetaMaskConnector({
  port: 3333, // this is the default port
  onConnect() { console.log('MetaMask client connected') }, // Function to run when MetaMask is connected (optional)
});

connector.start().then(() => {
  // Now go to http://localhost:3333 in your MetaMask enabled web browser.
  const web3 = new Web3(connector.getProvider());
  // Use web3 as you would normally do. Sign transactions in the browser.
});

When you're done with your MetaMask business, run the following code to clean up:

connector.stop();

Disclaimer

As I said, this is highly experimental. Tested only with web3 v1.0 (in node) and web3 0.20.3 (MetaMask, in the browser). Also it might not work with all functions supported by web3.

Contribute

Please report any bugs you find so we can improve this.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].