Git Product home page Git Product logo

eth-lightwallet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eth-lightwallet's Issues

Can't deploy a contract

TIA
Am I supposed to be able to deploy a contract over web3 using eth-lightwallet?
I have a valid Solidity contract. The js code is taken from Web3 deploy in Solidity Browser. When run from geth with loadScript() is works.

If I use the same code in the context of a js with the eth-wallet API I get an:
Error: Gas price too low for acceptance .

Code is as follows:

`var ethClient = "http://localhost:xxxx";
var web3 = new Web3();
var global_keystore;

// setting up a web3 provider but using a keystore to get access to account information
function setWeb3Provider(keystore) {
var web3Provider = new HookedWeb3Provider({
host: ethClient,
transaction_signer: keystore
});
web3.setProvider(web3Provider);
}

function setSeed() {
var password = prompt('Enter Password to encrypt your seed', 'Password');
var providedSeed = document.getElementById('seed').value;
lightwallet.keystore.deriveKeyFromPassword(password, function (err, pwDerivedKey) {
global_keystore = new lightwallet.keystore(
providedSeed,
pwDerivedKey);
global_keystore.generateNewAddress(pwDerivedKey, 2);
setWeb3Provider(global_keystore);
});
}

function create() {
var addresses = global_keystore.getAddresses();
var c = web3.eth.contract(myAbi);
var cInstance = c.new(
{
from: addresses[0],
data: '........',
gas: 3000000000000
}, function(e, contract){
console.log(e, contract);
if (typeof contract != 'undefined') {
console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash);
console.log(contract.address);
}
});
}
`

Further explanation of not running node?

"LightWallet is a HD wallet that can store your private keys encrypted in the browser to allow you to run Ethereum dapps even if you're not running a local Ethereum node"

Can you explain the above sentence a bit? Currently, I would like to call a contract that exists on the Ethereum test node (the one accessible from Mist). Is this possible? Do I need their ip address? Are new accounts created with lightwallet able to receive ether? Any information on this would be useful.

Thanks

Webpack: Uncaught TypeError: EC is not a constructor

When importing with Webpack require("eth-lightwallet") Uncaught TypeError: EC is not a constructor is thrown.

Not sure if this is related to lightwallet it self. It seems that there is some dependency cycles in those crypo libs. Attached npm project with this issue
test-webpack.zip

npm start -> http://localhost:8080 -> open dev console

Currently workaround is to include full js file form dist require("node_modules/eth-lightwallet/dist/lightwallet.js");

TypeError: undefined is not a function from lightwallet.keystore.deriveKeyFromPassword()

Getting the following error in lightwallet.keystore.deriveKeyFromPassword in nodejs

Version

    "eth-lightwallet": "^2.2.0",

Error

> TypeError: undefined is not a function
    at new KeyStore (/Users/aeufemio/projects/digixglobal/web/accountmanager/node_modules/eth-lightwallet/lib/keystore.js:80:27)
    at cb (/Users/aeufemio/projects/digixglobal/web/accountmanager/node_modules/eth-lightwallet/lib/keystore.js:433:5)
    at /Users/aeufemio/projects/digixglobal/web/accountmanager/node_modules/eth-lightwallet/node_modules/scrypt-async/scrypt-async.js:474:9
    at Immediate._onImmediate (/Users/aeufemio/projects/digixglobal/web/accountmanager/node_modules/eth-lightwallet/node_modules/scrypt-async/scrypt-async.js:433:11)
    at processImmediate [as _immediateCallback] (timers.js:367:17)

Return the newly generated address in keystore.generateNewAddress()

Can the generateNewAddress(derivedPwKey, N) function be modified to return the newly generated address(es) as a convenience instead of returning undefined? The most likely thing a client does after generating new address(es) is to access them. This enhancement would save the client the extra step to call keystore.getAddresses() and obtain the last N addresses to gain access to those new addresses.
Of course, the return would be an array type of new addresses.

Astronomical issue with private keys to sign tx.

secret seed is "erupt consider beyond twist bike enroll you salute weasel emerge divert hundred"

with keystore password "password"
with hdPath = "m/44'/60'/0'"

the private key that is returned is a 62 character hex value.

example code:
(using lightwallet.keystore.deriveKeyFromPassword(password, function(err, pwDerivedKey))

var keystore = new lightwallet.keystore(secretSeed, pwDerivedKey);
var hdPath = "m/44'/60'/0'"; //as defined in SLIP44

keystore.addHdDerivationPath(hdPath, pwDerivedKey, {curve: 'secp256k1', purpose: 'sign'});
keystore.generateNewAddress(pwDerivedKey, 1, hdPath); //Generate a new address

var incompleteAddress = keystore.getAddresses(hdPath)[0];
keystore.setDefaultHdDerivationPath(hdPath);
var hexSeedETH = keystore.exportPrivateKey(incompleteAddress, pwDerivedKey);

..

hexSeedETH.length = 62.

something like a:

function pad(num, size) {
var s = num+"";
while (s.length < size) {
s = "0" + s;
}
return s;
}

with a:

hexSeedETH = pad(hexSeedETH, 64);

returns valid private keys that can sign for this address for the ethereumjs-tx module, and this library's signtx function.

Question: How to provide password to signTransaction()

My implementation of sendEth() in the example webwallet.html always prompts for password with a dialog box even though the global_keystore is set. Is it possible to request password from a web form and pass it, and prevent the browser dialog box in KeyStore.prototype.signTransaction and passwordProvider?

ripemd160 is not supported

Hi, when doing :
var randomSeed = lightwallet.keystore.generateRandomSeed(extraEntropy)

it throw :
Error: ripemd160 is not supported (we accept pull requests) Trace de la pile : module.exports@http://localhost:8080/app.js:151561:19 module.exports@http://localhost:8080/app.js:151550:11 Hash.ripemd160@http://localhost:8080/app.js:198294:11 Hash.sha256ripemd160@http://localhost:8080/app.js:198299:11 HDPrivateKey.prototype._buildFromBuffers@http://localhost:8080/app.js:207826:22 HDPrivateKey.prototype._buildFromObject@http://localhost:8080/app.js:207714:11 HDPrivateKey@http://localhost:8080/app.js:207469:6 HDPrivateKey.fromSeed@http://localhost:8080/app.js:207760:11 Mnemonic.prototype.toHDPrivateKey@http://localhost:8080/app.js:208956:11 KeyStore@http://localhost:8080/app.js:170272:19 newWallet/<@http://localhost:8080/app.js:143693:24 KeyStore.deriveKeyFromPassword/cb@http://localhost:8080/app.js:170628:8 scrypt/</<@http://localhost:8080/app.js:210140:10 scrypt/interruptedFor/<@http://localhost:8080/app.js:210099:12 onNextTick@http://localhost:8080/app.js:78599:10 Item.prototype.run@http://localhost:8080/app.js:2340:6 drainQueue@http://localhost:8080/app.js:2310:18

As it is no (longer ?) supported, does anyone use it or everyone has forked eth-lightwallet to use another hash ?

Thank you

AssertionError invalid chainCode size in Microsoft Edge

Hi,

I'm using eth-lightwallet to generate accounts in the browser. Everything works great in Firefox (45.0.2, Windows and Ubuntu) and Chrome (49.0.2623, Windows, Ubuntu and Android).

But in Microsoft Edge (25.10586.0.0) I get the following error and I traced it back to bitcore-lib (https://github.com/bitpay/bitcore-lib):

AssertionError: chainCode has not the expected size: found 64, expected 32

The assertion error is raised here:

https://github.com/bitpay/bitcore-lib/blob/b3b18d532ff86855a142688413f60364aec4048a/lib/hdprivatekey.js#L464

My first guess is this buffer is initialized/filled twice in Microsoft Edge for some reason.
Could it be eth-lightwallet misusing bitcore-lib?
Can anyone confirm this part of bitcore-lib works in an app in Microsoft Edge?

How can we fix this?

Thank you !

txutil.functionTx & signTx producing invalid "to" address

I'm using txutil.functionTx and signTx to create a raw transaction and then sign it. It all works, but when I broadcast to geth, geth shows a valid tx hash but shows "to: &12345"

e.g. i set

txObject {
to: 0x12345
}

Then in geth it shows the tx is addressed to &12345.

Of course these txs never get confirmed.

Update: Looks like txutil.valueTx also has the same issue.

example webwallet.html does not work

I downloaded the latest release, unpacked and ran eth-lightwallet-2.2.3/example/webwallet.html from that on ubuntu 15.10 in the latest Chrome. I have issues with the retrieving address:

  1. When creating a new wallet it shows Retrieving addresses... in the Show Addresses section which remains and seems stuck. Clicking Show or Refresh does not change this.
  2. Importing the wallet from the seed and password shows an address in the From / Caller dropdowns (suggesting seed and PW are ok). Still I seem to be unable to get retrieving addresses.

Lightwallet on meteor

Please fix light wallet so it can be installed in a meteor project and used server side. You'll see the problem if you install the module in a meteor project.

import eth-lightwallet with es6

Hi,
I would like to import the lightwallet to my project (Truffle), when I do
import { lightwallet } from 'eth-lightwallet'
, I have an error :
_ethLightwallet.lightwallet is undefined

The README say lightwallet is exposed, how do I get it ?

Thank you

generateNewAddress bug with deserialized KeyStore

I create a new keyStore, and generate one new address and then serialize it to localStorage. When I deserialize that keyStore I can see the one address that was previously generated. However if I then issue another generateNewAddress(pwDerivedKey) and the keyStore stays at just the one address, and then if I generateNewAddress again I then see two.

Global leaks

Hi,

As I was testing my application, my testing framework (lab) detected a bunch of global leaks:

The following leaks were detected:signTx, legacyDecryptString, multiEncryptString, _bitcore, legacyGenerateEncKey, asymEncryptString, asymDecryptString, recoverAddress, multiDecryptString, signMsg, upgradeOldSerialized, ethUtil, pathKsData, concatSig

Is there a reason why globals were necessary here? Can I safely ignore that?

Thanks!

Keep a hash of the password

We should keep a hash of the password to validate against whenever one is submitted by a user. That way we never attempt to generate keys using an invalid seed decrypted by an incorrect password.

Not working when installed with NPM3

What error exactly do you get here?

This is bad practice and it should be resolved somehow. In NPM3 the node_modules directory structure is flat, so there is no such path when you install the module with NPM3.

Node >5.0.0 is bundled with NPM3 by default, so this might be a problem for a lot of people.

hdpath String is not yet implemented ?

when going to generate index 1 address (1st address)

var lightwallet = require("eth-lightwallet");
var keythereum = require("keythereum");
var secretSeed = "police club trick jealous together tunnel clarify sustain enforce vast absurd matrix";
var password = "test";
var _getPrivAddressByIndex = function(indexNum) {
    if(indexNum <= 0) throw Error("address index should be starting from 1")
    lightwallet.keystore.deriveKeyFromPassword(password, function (err, pwDerivedKey) {
        console.time();
        var ks = new lightwallet.keystore(secretSeed, pwDerivedKey);
        // lightwallet module doesn't have the method to get the given index address and secret
        // ex) if indexNum is 1003, hdPathString is "m/0'/0'/1'"
        // And the generate is 3
        // 1- 999 is "m/0'/0'/0'"
        // 1000- 1999 is "m/0'/1'/0'"
        // 2000 -2999 is "m/0'/2'/0'"
        var hdPathString = "m/0'/" + (indexNum - indexNum % 1000) / 1000  + "'/" + 0 + "'"
        var generateAddressNum = (indexNum % 1000 == 0)? 1: indexNum % 1000;
        console.log("hdpath " + hdPathString)
        console.log("number of addresses to generate " +  generateAddressNum)
        ks.generateNewAddress(pwDerivedKey, generateAddressNum, hdPathString);
        var addresses = ks.getAddresses();
        var address = addresses[generateAddressNum - 1];
        var exportedPriv = ks.exportPrivateKey(address, pwDerivedKey)
        console.log("generated address and private key is " + JSON.stringify([address, exportedPriv]));
        return [address, exportedPriv]
    });
}
var addressAndPriv = _getPrivAddressByIndex(1);

Then the result is

$ node exampleEtherGenerateAddress.js 
hdpath m/0'/0'/0'
number of addresses to generate 1
{ 'm/0\'/0\'/0\'': 
   { info: { curve: 'secp256k1', purpose: 'sign' },
     encHdPathPriv: 
      { encStr: 'Qp3li7Cr6eFI8dybiziRX7/56R/EnKUZVgwh2022/caO4HXO5efSFaLGHXmQacAWVdowxerOYrME5ZHU870+MZ39/447YfkDIfI2UnwCf/dKRNQc8Rijvsp0y4cJBulhcbyWef/rDAUBcZON79BOR8ddMQ/szqhxhr1DFjK4Bw==',
        nonce: 'dpuxp5OVtokxIYCzsLdSJfFBCusnnvcN' },
     hdIndex: 0,
     encPrivKeys: {},
     addresses: [] } }
generated address and private key is ["14adb0788d887ec5d5bb71a7d37a8389a896558f","74b081765d2546a3831f0d4c23a20986cd2e6a6381479fe156dc32287dc5117b"]

and when going to generate 999th

var lightwallet = require("eth-lightwallet");
var keythereum = require("keythereum");
var secretSeed = "police club trick jealous together tunnel clarify sustain enforce vast absurd matrix";
var password = "test";
var _getPrivAddressByIndex = function(indexNum) {
    if(indexNum <= 0) throw Error("address index should be starting from 1")
    lightwallet.keystore.deriveKeyFromPassword(password, function (err, pwDerivedKey) {
        console.time();
        var ks = new lightwallet.keystore(secretSeed, pwDerivedKey);
        // lightwallet module doesn't have the method to get the given index address and secret
        // ex) if indexNum is 1003, hdPathString is "m/0'/0'/1'"
        // And the generate is 3
        // 1- 999 is "m/0'/0'/0'"
        // 1000- 1999 is "m/0'/1'/0'"
        // 2000 -2999 is "m/0'/2'/0'"
        var hdPathString = "m/0'/" + (indexNum - indexNum % 1000) / 1000  + "'/" + 0 + "'"
        var generateAddressNum = (indexNum % 1000 == 0)? 1: indexNum % 1000;
        console.log("hdpath " + hdPathString)
        console.log("number of addresses to generate " +  generateAddressNum)
        ks.generateNewAddress(pwDerivedKey, generateAddressNum, hdPathString);
        var addresses = ks.getAddresses();
        var address = addresses[generateAddressNum - 1];
        var exportedPriv = ks.exportPrivateKey(address, pwDerivedKey)
        console.log("generated address and private key is " + JSON.stringify([address, exportedPriv]));
        return [address, exportedPriv]
    });
}
var addressAndPriv = _getPrivAddressByIndex(999);

then the result is

$ node exampleEtherGenerateAddress.js 
hdpath m/0'/0'/0'
number of addresses to generate 999
{ 'm/0\'/0\'/0\'': 
   { info: { curve: 'secp256k1', purpose: 'sign' },
     encHdPathPriv: 
      { encStr: 'I2BD7emNYC9n8d5Uvw4ruGEfLY7Xdtn58tlnBbgRVdB09Uw4ttOnjx+atzX5QfnQb8nEn1v40iJIWLRXwuFQnghFh27AJuPxuVD/CBMqNNOm0Ukv3xcOey8g7XG5uwwXtd3XUQuDmBcvRFa22wDSo4kH0kRDw4ocfPqDU5xjYA==',
        nonce: 'R7rQ1hd0JjfJwfFHpfugrC/x+HvvDQq5' },
     hdIndex: 0,
     encPrivKeys: {},
     addresses: [] } }
generated address and private key is ["aa07af9bf584e64e355bd51101cb8f8e0e9bfc4b","9365b6dd26e705c9d6123c1f2790910bfbf21e3a033efe8dba2deb4938ee7cdf"]

but when 2001th

var lightwallet = require("eth-lightwallet");
var keythereum = require("keythereum");
var secretSeed = "police club trick jealous together tunnel clarify sustain enforce vast absurd matrix";
var password = "test";
var _getPrivAddressByIndex = function(indexNum) {
    if(indexNum <= 0) throw Error("address index should be starting from 1")
    lightwallet.keystore.deriveKeyFromPassword(password, function (err, pwDerivedKey) {
        console.time();
        var ks = new lightwallet.keystore(secretSeed, pwDerivedKey);
        // lightwallet module doesn't have the method to get the given index address and secret
        // ex) if indexNum is 1003, hdPathString is "m/0'/0'/1'"
        // And the generate is 3
        // 1- 999 is "m/0'/0'/0'"
        // 1000- 1999 is "m/0'/1'/0'"
        // 2000 -2999 is "m/0'/2'/0'"
        var hdPathString = "m/0'/" + (indexNum - indexNum % 1000) / 1000  + "'/" + 0 + "'"
        var generateAddressNum = (indexNum % 1000 == 0)? 1: indexNum % 1000;
        console.log("hdpath " + hdPathString)
        console.log("number of addresses to generate " +  generateAddressNum)
        ks.generateNewAddress(pwDerivedKey, generateAddressNum, hdPathString);
        var addresses = ks.getAddresses();
        var address = addresses[generateAddressNum - 1];
        var exportedPriv = ks.exportPrivateKey(address, pwDerivedKey)
        console.log("generated address and private key is " + JSON.stringify([address, exportedPriv]));
        return [address, exportedPriv]
    });
}
var addressAndPriv = _getPrivAddressByIndex(2011);

Then it fails

$ node testGenerateAddress.js 
hdpath m/0'/2'/0'
number of addresses to generate 11
hdpath m/0'/2'/0'
number of addresses to generate 11
/Users/tom/Documents/workspace_js/AsianPayPoloniexEtherwallet/node_modules/eth-lightwallet/lib/keystore.js:135
  var secretbox = nacl.util.decodeBase64(encryptedStr.encStr);
                                                     ^

TypeError: Cannot read property 'encStr' of undefined
    at Function.KeyStore._decryptString (/Users/tom/Documents/workspace_js/AsianPayPoloniexEtherwallet/node_modules/eth-lightwallet/lib/keystore.js:135:54)
    at KeyStore.isDerivedKeyCorrect (/Users/tom/Documents/workspace_js/AsianPayPoloniexEtherwallet/node_modules/eth-lightwallet/lib/keystore.js:115:29)
    at KeyStore.generateNewAddress (/Users/tom/Documents/workspace_js/AsianPayPoloniexEtherwallet/node_modules/eth-lightwallet/lib/keystore.js:444:12)
    at /Users/tom/Documents/workspace_js/AsianPayPoloniexEtherwallet/exampleEtherGenerateAddress.js:20:12
    at cb (/Users/tom/Documents/workspace_js/AsianPayPoloniexEtherwallet/node_modules/eth-lightwallet/lib/keystore.js:531:7)
    at /Users/tom/Documents/workspace_js/AsianPayPoloniexEtherwallet/node_modules/scrypt-async/scrypt-async.js:474:9
    at Immediate._onImmediate (/Users/tom/Documents/workspace_js/AsianPayPoloniexEtherwallet/node_modules/scrypt-async/scrypt-async.js:433:11)
    at tryOnImmediate (timers.js:543:15)
    at processImmediate [as _immediateCallback] (timers.js:523:5)

('KeyStore.generateNewAddress: No seed set') when seed is set according to debug

 Hi, I am using eth-lightwallet on a NodeJS server. I am getting a stack trace when I try and get the private key from the keystore. It is flagging this line "keystore.generateNewAddress(pwDerivedKey);" I cannot see how it is related. When I comment out the line "account.prv_key = keystore.exportPrivateKey(sendingAddr, pwDerivedKey);" it appears to work flawlessly. Am I doing something wrong? I am new to Node and suspect it has something to do with the asynchronous nature of Node. I have included the code and the stacktrace below. Thank you


lightwallet.keystore.deriveKeyFromPassword('mypassword',
    function (err, pwDerivedKey) {
      var seed = lightwallet.keystore.generateRandomSeed();
      var keystore = new lightwallet.keystore(seed, pwDerivedKey);

      keystore.generateNewAddress(pwDerivedKey);
      account.address = keystore.getAddresses()[0];
      account.prv_key = keystore.exportPrivateKey(sendingAddr, pwDerivedKey);
    })


/Users/username/WebstormProjects/eth-project/nodejs-server/node_modules/eth-lightwallet/lib/keystore.js:389
    throw new Error('KeyStore.generateNewAddress: No seed set');
    ^

Error: KeyStore.generateNewAddress: No seed set
    at KeyStore.generateNewAddress (/Users/username/WebstormProjects/eth-project/nodejs-server/node_modules/eth-lightwallet/lib/keystore.js:389:11)
    at /Users/username/WebstormProjects/eth-project/nodejs-server/controllers/ActorService.js:39:20
    at cb (/Users/username/WebstormProjects/eth-project/nodejs-server/node_modules/eth-lightwallet/lib/keystore.js:459:7)
    at /Users/username/WebstormProjects/eth-project/nodejs-server/node_modules/eth-lightwallet/node_modules/scrypt-async/scrypt-async.js:474:9
    at Immediate._onImmediate (/Users/username/WebstormProjects/eth-project/nodejs-server/node_modules/eth-lightwallet/node_modules/scrypt-async/scrypt-async.js:433:11)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

Meteor 1.3 Integration

hi i'm trying to use https://github.com/ConsenSys/eth-lightwallet w Meteor 1.3. Meteor install commands:

meteor create ethereum-app
cd ethereum-app
meteor npm install
meteor npm install --save eth-lightwallet

but when using eth-lightwallet from w/in meteor. Just copy the following line into main.js (for example):

import lightwallet from 'eth-lightwallet';

and starting the meteor app with:

meteor

i get:

Unable to resolve some modules:

  "build/Release/sha3" in
/home/reto/Development/ethereum-app/node_modules/eth-lightwallet/node_modules/ethereumjs-util/node_modules/keccakjs/node_modules/sha3/package.json
(web.browser)

does somebody have a idea on how to solve this?

Transfer calls instead of Function calls

When i send ether to an account (using the blockapps api) it appears on http://blockapps.net/demo/ as a function call instead of an ether transfer.

Of course the money ends up in the right place which is what matters, but still, I think the call from helpers to the api is wrong for transfering ether.

Minify process fails with this library

I noticed a week ago that including lightwallet.js would cause my minify build process to fail, but if I used the lightwallet.min.js it would build fine.

I just updated to lightwallet to 2.2.5 and now it seems both normal and min versions cause my minify to fail.

It also fails to compress here: http://jscompress.com/

txParams optionally instead of rawTx

i have to serialize my unsigned tx just so lightwallet can deserialize it. seems silly.

params hash is like

{
  to: '0x1234',
  from: '0x4321',
  value: 100,
  nonce: 0
}

ethereumjs-tx now also accepts web3 style tx params keys (gasLimit -> gas)

deserialize function is not part of the API ?

Why is this function not part of the API ? I guess I should be able to deserialize a wallet that I have serialized before ?
Is this something that is missing in the code - or am I doing something wrong?

Thanks.
Stefaan

Install error

Hi
I have this error trying to build in ubuntu:

npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the secp256k1 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls secp256k1

Any idea?
Need more data?

How do I run html page?

Im trying to run the example. Do I need to host the html page locally using iis? I'm very confused. I open the webwallet.html but its like a dead page. I have the web3. hooked-web3-provider as folder besides the eth-lightwallet folder too. Im running windows 7 64-bit

please help. thanks

unable to pass input data with a value tx

in the valueTx method, we are unable to pass in some input data:
https://github.com/ConsenSys/eth-lightwallet/blob/master/lib/txutils.js#L92

is this by design?

the following code is commented to show the additional line:

function valueTx (txObject) {
  // txObject contains gasPrice, gasLimit, value, nonce

  var txObjectCopy = {};
  txObjectCopy.to = add0x(txObject.to);
  txObjectCopy.gasPrice = add0x(txObject.gasPrice);
  txObjectCopy.gasLimit = add0x(txObject.gasLimit);
  txObjectCopy.nonce = add0x(txObject.nonce);
  txObjectCopy.value = add0x(txObject.value);
  //NB NB NB added this here - should we do a pull request?
  txObjectCopy.data = txObject.data;

  var tx = new Transaction(txObjectCopy);

  return tx.serialize().toString('hex');
}

BTW - thanks so much for your efforts, really great little library!

Broken in electron

Uncaught Exception:
Error: Module version mismatch. Expected 46, got 14.
at Error (native)
at Object.module.(anonymous function) (ATOM_SHELL_ASAR.js:137:20)
at Object.module.(anonymous function) as .node
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/Users/aeufemio/projects/digixglobal/apps/wallet/app/node_modules/eth-lightwallet/node_modules/ethereumjs-tx/node_modules/ethereumjs-util/index.js:1:93)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)

Support standardized Hex format(s)

There's 2 commons hex formats at the moment

  • prefixed hex strings 0x123456
  • Buffers new Buffer('123456', 'hex') ( ideal memory footprint )

Currently eth-lightwallet expects non-prefixed strings.
Maybe wrap all public fn inputs in a format normalizer fn

[Question] How can I use eth-lightwallet to verify a signature?

I have the following message: '0xdeadbeefdeadbeefdeadbeef' and I'm using eth-lightwallet to sign it like this:

signedMsg = lightwallet.signing.signMsg(keystore, pwDerivedKey, '0xdeadbeefdeadbeefdeadbeef', '0xd5311ad626f09d0f9d1b1f7cdb84fdd600efbc1d');

It gives me this back: 0x348bdaeacdc93823b136f7d4f87a1c10be001de19a844c2d6751647a0c7fe5ee5451791e9696e08f815d851ad840c5a10a96cae9a5735d7c920bbfb39dfd30041c. How can I verify a signed msg later? Using recoverAddress? is there an example of how to do that?

Keystore vs keystore

theres almost no distinction in wording/format of lightwallet.keystore vs the keystore obj.
its class-like, so i would capitalize it

var keystore = Keystore.deserialize(serialized_keystore)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.