Skip to content
Permalink
Browse files

Pre alpha for light wallet

  • Loading branch information...
sakdeniz committed Feb 10, 2019
1 parent 25f619c commit 3e6cf30788ff1cbfa7b98c563c6e26898f2dcb05
12 main.js
@@ -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;
@@ -35,6 +35,7 @@ var appDataPath;
var executablePath;
var daemonPath;
var welcomeWin;
var lwWin;
var bswin;
var downloadWin;
var eWindow;
@@ -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());
@@ -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)

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -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",
@@ -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",
Oops, something went wrong.

0 comments on commit 3e6cf30

Please sign in to comment.
You can’t perform that action at this time.