Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harshjv/metamask-bridge
Use MetaMask with Node.js
https://github.com/harshjv/metamask-bridge
ethereum metamask nodejs
Last synced: 22 days ago
JSON representation
Use MetaMask with Node.js
- Host: GitHub
- URL: https://github.com/harshjv/metamask-bridge
- Owner: harshjv
- License: mit
- Created: 2019-01-10T10:57:51.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-10T11:17:43.000Z (about 6 years ago)
- Last Synced: 2024-11-07T23:45:16.029Z (2 months ago)
- Topics: ethereum, metamask, nodejs
- Language: HTML
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# MetaMask Bridge
[![Standard Code Style](https://img.shields.io/badge/codestyle-standard-brightgreen.svg)](https://github.com/standard/standard)Use MetaMask with Node.js.
> :warning: Highly experimental!
## Demo
```
git clone [email protected]:harshjv/metamask-bridge.git
cd metamask-bridge
npm install
node index.js
open http://localhost:4000/
```## Example
See [example.js](./example.js).
## API
## ethereum('enable')(callback)
```
ethereum('enable')((err, accounts) => {
console.log('ethereum.enable', err, accounts)
})
```## web3(methodName)(arguments)(callback)
> If `methodName` ends with '()', it will be treated like a function call.
```
web3('eth.getBlock()')(1)((err, block) => {
console.log('web3.eth.getBlock(1)', err, block)
})web3('eth.accounts')()((err, accounts) => {
console.log('eth.accounts', err, accounts)
})
```## License
MIT