Skip to content

Instantly share code, notes, and snippets.

View derekalia's full-sized avatar
🎯
Focusing

Derek Alia derekalia

🎯
Focusing
View GitHub Profile
@BennyM
BennyM / init.js
Created September 20, 2017 14:43
Use eth-lightwallet with Web3ProviderEngine
var keyStore = ...init as usual...;
var engine = new Web3ProviderEngine();
var opts = {
getAccounts: (cb) => {
let addresses = keyStore.getAddresses();
let prefixedAddresses = addresses.map(add => {
return '0x' + add;
});
cb(null, prefixedAddresses);
},

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

/**
* Ethereum Account Scanner
*
* To run this, you need your own geth node, accepting RPC
* connections on a port you can access.
*
* Install pre-requisites:
* sudo npm install -g web3
*
* Usage: