Skip to content

Commit

Permalink
Pre alpha for light wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
sakdeniz committed Feb 10, 2019
1 parent 25f619c commit 3e6cf30
Show file tree
Hide file tree
Showing 10 changed files with 1,132 additions and 63 deletions.
12 changes: 9 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ const config={headers: {'Content-Type': 'application/x-www-form-urlencoded'},res
const randomBytes=crypto.randomBytes(256);
const rpcuser=crypto.createHash('sha256').update(randomBytes, 'utf8').digest('hex');
const rpcpassword=crypto.createHash('md5').update(randomBytes, 'utf8').digest('hex');
const zmq=require('zeromq');
//const zmq=require('zeromq');
const bitcore=require('bitcore-lib'); // npm install encrypt-s/bitcore-lib
const clock=require('human-readable-time');
const printf=require('printf');
const sock=zmq.socket('sub');
//const sock=zmq.socket('sub');
const hrt=new clock('%D%/%M%/%YY% %hh%:%mm%:%ss%');
const Block=bitcore.Block;
const Transaction=bitcore.Transaction;
Expand All @@ -35,6 +35,7 @@ var appDataPath;
var executablePath;
var daemonPath;
var welcomeWin;
var lwWin;
var bswin;
var downloadWin;
var eWindow;
Expand Down Expand Up @@ -647,7 +648,7 @@ function startProcess()
{
ntp=" -ntpservers=pool.ntp.org -ntpminmeasures=1";
}
var parameters = ["-rpcuser=" + rpcuser + " -rpcport=" + rpcport +" -rpcpassword=" + rpcpassword + testnet + reindex + reindexchainstate + zapwallettxes + printtoconsole + bootstrap + zmq + " -debug=0 -server -rpcbind=127.0.0.1 -rpcallowip=127.0.0.1 -uacomment=NEXT" + addnode + ntp];
var parameters = ["-rpcuser=" + rpcuser + " -rpcport=" + rpcport +" -rpcpassword=" + rpcpassword + testnet + reindex + reindexchainstate + zapwallettxes + printtoconsole + bootstrap + zmq + " -listen=0 -debug=1 -server -rpcbind=127.0.0.1 -rpcallowip=127.0.0.1 -uacomment=NEXT" + addnode + ntp];
console.log("Daemon Parameters : [" + parameters + "]");
const defaults = {cwd:binDir,env:process.env,shell:bShell,windowsVerbatimArguments:true};
console.log("App Path : "+app.getAppPath());
Expand Down Expand Up @@ -1066,6 +1067,11 @@ function handleCommand(line)
welcomeWin.hide();
Init(true);
}
if (line.startsWith("next:start_lw:"))
{
var server=require("./server-lw");
welcomeWin.loadURL(`file://${__dirname}/dist/static/lw/index.html?version=${version}&coins=`+JSON.stringify(coins)+`&coin=`+store.get('coin')+`&update_preference=`+store.get('update_preference')+`&update_daemon_preference=`+store.get('update_daemon_preference'));
}
}

function displayError(title,message)
Expand Down
166 changes: 153 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
"bitcoin-core": "^2.0.0",
"bitcoinjs-lib": "^3.3.2",
"bitcore-lib": "github:encrypt-s/bitcore-lib",
"bitcore-message": "^1.0.4",
"bitcore-mnemonic": "^1.7.0",
"bootstrap": "^4.1.2",
"chartist": "^0.11.0",
"clipboard": "^1.7.1",
Expand All @@ -56,6 +58,7 @@
"ini-builder": "^1.1.1",
"iniparser": "^1.0.5",
"jsonq": "^1.1.0",
"lowdb": "^1.0.0",
"moment": "^2.22.2",
"net": "^1.0.2",
"printf": "^0.3.0",
Expand Down
Loading

0 comments on commit 3e6cf30

Please sign in to comment.