siulynot
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with
49 additions and
15 deletions
-
main.js
-
package.json
-
routes/appConfig.js
-
routes/electrumjs/electrumServers.js
-
routes/ports.js
-
routes/shepherd/auth.js
-
routes/shepherd/dashboardUpdate.js
-
routes/shepherd/electrum/keys.js
-
routes/shepherd/electrum/merkle.js
-
routes/shepherd/electrum/network.js
-
routes/shepherd/electrum/transactions.js
-
version
-
version_build
|
|
@ -288,8 +288,8 @@ function createWindow(status, hideLoadingWindow) { |
|
|
|
firstLoginPH: null, |
|
|
|
secondaryLoginPH: null, |
|
|
|
}; |
|
|
|
|
|
|
|
mainWindow.nnVoteChain = 'VOTE2018'; |
|
|
|
mainWindow.checkStringEntropy = shepherd.checkStringEntropy; |
|
|
|
|
|
|
|
/*for (let i = 0; i < process.argv.length; i++) { |
|
|
|
if (process.argv[i].indexOf('nvote') > -1) { |
|
|
|
|
|
@ -1,7 +1,7 @@ |
|
|
|
{ |
|
|
|
"name": "agama-app", |
|
|
|
"productName": "Agama", |
|
|
|
"version": "0.2.30", |
|
|
|
"version": "0.2.32", |
|
|
|
"description": "Agama Wallet Desktop App", |
|
|
|
"main": "main.js", |
|
|
|
"scripts": { |
|
|
@ -32,7 +32,7 @@ |
|
|
|
"async": "^2.6.0", |
|
|
|
"bigi": "^1.4.2", |
|
|
|
"bip39": "^2.4.0", |
|
|
|
"bitcoinforksjs-lib": "git://github.com/bitcoinjs/bitcoinjs-lib#opt-in-bitcoincash-sighash", |
|
|
|
"bitcoinforksjs-lib": "git://github.com/SuperNETorg/bitcoinjs-lib#opt-in-bitcoincash-sighash", |
|
|
|
"bitcoinjs-lib": "git://github.com/SuperNETorg/bitcoinjs-lib", |
|
|
|
"bitcoinjs-lib-zcash": "git://github.com/pbca26/bitcoinjs-lib#zcash", |
|
|
|
"bitcoinjs-lib-pos": "git://github.com/KomodoPlatform/bitcoinjs-lib-pos", |
|
|
@ -48,6 +48,7 @@ |
|
|
|
"js-sha256": "^0.7.1", |
|
|
|
"marketmaker": "git://github.com/pbca26/marketmaker", |
|
|
|
"nodejs-aes256": "^1.0.1", |
|
|
|
"passwd-strength": "https://github.com/pbca26/passwd-strength", |
|
|
|
"portscanner": "^2.1.1", |
|
|
|
"ps-node": "^0.1.5", |
|
|
|
"remote-file-size": "^3.0.3", |
|
|
|
|
|
@ -71,7 +71,7 @@ const appConfig = { |
|
|
|
experimentalFeatures: { |
|
|
|
display: true, |
|
|
|
initDisplay: true, |
|
|
|
displayName: 'Enable experimental features', |
|
|
|
displayName: 'Enable advanced features', |
|
|
|
type: 'boolean', |
|
|
|
}, |
|
|
|
dataDir: { |
|
|
|
|
|
@ -1,4 +1,15 @@ |
|
|
|
let electrumServers = { |
|
|
|
bntn: { // !estimatefee
|
|
|
|
address: 'electrum1.cipig.net', |
|
|
|
port: 10026, |
|
|
|
proto: 'tcp', |
|
|
|
txfee: 10000, |
|
|
|
abbr: 'BNTN', |
|
|
|
serverList: [ |
|
|
|
'electrum1.cipig.net:10026', |
|
|
|
'electrum2.cipig.net:10026' |
|
|
|
], |
|
|
|
}, |
|
|
|
oot: { // !estimatefee
|
|
|
|
address: 'electrum1.utrum.io', |
|
|
|
port: 10088, |
|
|
@ -83,8 +94,8 @@ let electrumServers = { |
|
|
|
txfee: 10000, |
|
|
|
abbr: 'DNR', |
|
|
|
serverList: [ |
|
|
|
'173.254.244.119:50001', |
|
|
|
'173.254.244.122:50001' |
|
|
|
'144.202.95.223:50001', |
|
|
|
'45.77.137.111:50001' |
|
|
|
], |
|
|
|
}, |
|
|
|
hodl: { // !estimatefee
|
|
|
|
|
|
@ -30,6 +30,7 @@ const assetChainPorts = { |
|
|
|
'VOTE2018': '15488', |
|
|
|
'NINJA': '8427', |
|
|
|
'BTCH': '8800', |
|
|
|
'BNTN': '14358', |
|
|
|
}; |
|
|
|
|
|
|
|
module.exports = assetChainPorts; |
|
|
@ -1,3 +1,5 @@ |
|
|
|
const passwdStrength = require('passwd-strength'); |
|
|
|
|
|
|
|
module.exports = (shepherd) => { |
|
|
|
/* |
|
|
|
* type: GET |
|
|
@ -43,5 +45,10 @@ module.exports = (shepherd) => { |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
shepherd.checkStringEntropy = (str) => { |
|
|
|
// https://tools.ietf.org/html/rfc4086#page-35
|
|
|
|
return passwdStrength(str) < 29 ? false : true; |
|
|
|
}; |
|
|
|
|
|
|
|
return shepherd; |
|
|
|
}; |
|
|
@ -152,7 +152,7 @@ module.exports = (shepherd) => { |
|
|
|
amount: sum, |
|
|
|
spendable: spendableSum, |
|
|
|
canspend, |
|
|
|
type: a === 0 ? 'public': 'private', |
|
|
|
type: a === 0 ? 'public' : 'private', |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
@ -155,7 +155,7 @@ module.exports = (shepherd) => { |
|
|
|
const _b58check = shepherd.isZcash(network.toLowerCase()) ? bitcoinZcash.address.fromBase58Check(address) : bitcoin.address.fromBase58Check(address); |
|
|
|
|
|
|
|
if (_b58check.version === _network.pubKeyHash || |
|
|
|
(address[0] === 'b' && shepherd.getNetworkData(network.toLowerCase()).pubKeyHash === 60)) { // kmd multisig edge case
|
|
|
|
_b58check.version === _network.scriptHash) { |
|
|
|
return true; |
|
|
|
} else { |
|
|
|
return false; |
|
|
@ -165,6 +165,15 @@ module.exports = (shepherd) => { |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
shepherd.get('/electrum/keys/validateaddress', (req, res, next) => { |
|
|
|
const successObj = { |
|
|
|
msg: 'success', |
|
|
|
result: shepherd.addressVersionCheck(req.query.network, req.query.address), |
|
|
|
}; |
|
|
|
|
|
|
|
res.end(JSON.stringify(successObj)); |
|
|
|
}); |
|
|
|
|
|
|
|
shepherd.post('/electrum/keys', (req, res, next) => { |
|
|
|
if (shepherd.checkToken(req.body.token)) { |
|
|
|
let _matchingKeyPairs = 0; |
|
|
|
|
|
@ -163,4 +163,4 @@ module.exports = (shepherd) => { |
|
|
|
}); |
|
|
|
|
|
|
|
return shepherd; |
|
|
|
}; |
|
|
|
}; |
|
|
@ -89,6 +89,7 @@ module.exports = (shepherd) => { |
|
|
|
coin === 'VOTE2018' || |
|
|
|
coin === 'NINJA' || |
|
|
|
coin === 'KOMODO' || |
|
|
|
coin === 'BNTN' || |
|
|
|
coinUC === 'SUPERNET' || |
|
|
|
coinUC === 'REVS' || |
|
|
|
coinUC === 'SUPERNET' || |
|
|
@ -116,7 +117,8 @@ module.exports = (shepherd) => { |
|
|
|
coinUC === 'VOTE2018' || |
|
|
|
coinUC === 'NINJA' || |
|
|
|
coinUC === 'KMD' || |
|
|
|
coinUC === 'KOMODO') { |
|
|
|
coinUC === 'KOMODO' || |
|
|
|
coinUC === 'BNTN') { |
|
|
|
return shepherd.electrumJSNetworks.komodo; |
|
|
|
} else { |
|
|
|
return shepherd.electrumJSNetworks[network]; |
|
|
|
|
|
@ -1,6 +1,8 @@ |
|
|
|
const async = require('async'); |
|
|
|
const Promise = require('bluebird'); |
|
|
|
|
|
|
|
const MAX_VOUT_LENGTH = 10; |
|
|
|
|
|
|
|
module.exports = (shepherd) => { |
|
|
|
shepherd.sortTransactions = (transactions, sortBy) => { |
|
|
|
return transactions.sort((b, a) => { |
|
|
@ -143,7 +145,7 @@ module.exports = (shepherd) => { |
|
|
|
const checkLoop = () => { |
|
|
|
index2++; |
|
|
|
|
|
|
|
if (index2 === decodedTx.inputs.length) { |
|
|
|
if (index2 === decodedTx.inputs.length || index2 === MAX_VOUT_LENGTH) { |
|
|
|
shepherd.log(`tx history decode inputs ${decodedTx.inputs.length} | ${index2} => main callback`, true); |
|
|
|
const _parsedTx = { |
|
|
|
network: decodedTx.network, |
|
|
@ -199,8 +201,9 @@ module.exports = (shepherd) => { |
|
|
|
|
|
|
|
callback(); |
|
|
|
shepherd.log(`tx history main loop ${json.length} | ${index}`, true); |
|
|
|
} else { |
|
|
|
callback2(); |
|
|
|
} |
|
|
|
callback2(); |
|
|
|
} |
|
|
|
|
|
|
|
if (_decodedInput.txid !== '0000000000000000000000000000000000000000000000000000000000000000') { |
|
|
|
|
|
@ -1,3 +1,3 @@ |
|
|
|
version=0.2.31 |
|
|
|
version=0.2.32 |
|
|
|
type=beta |
|
|
|
minversion=0.2.31 |
|
|
|
minversion=0.2.32 |
|
|
@ -1 +1 @@ |
|
|
|
0.2.31-beta |
|
|
|
0.2.32-beta |