Browse Source
Merge pull request #221 from SuperNETorg/v0.24
V0.24
pkg_automation_electrum
pbca26
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
56 additions and
27 deletions
-
routes/electrumjs/electrumServers.js
-
routes/shepherd/electrum/auth.js
-
routes/shepherd/electrum/coins.js
-
routes/shepherd/quitDaemon.js
-
version
-
version_build
|
|
@ -17,13 +17,18 @@ let electrumServers = { |
|
|
|
}, |
|
|
|
mnz: { // !estimatefee
|
|
|
|
address: '173.212.225.176', |
|
|
|
port: 50053, |
|
|
|
port: 10002, |
|
|
|
proto: 'tcp', |
|
|
|
txfee: 10000, |
|
|
|
abbr: 'MNZ', |
|
|
|
serverList: [ |
|
|
|
'173.212.225.176:50053', |
|
|
|
'136.243.45.140:50053' |
|
|
|
'173.212.225.176:10002', |
|
|
|
'136.243.45.140:10002', |
|
|
|
'18.216.195.109:10002', |
|
|
|
'52.41.58.116:10002', |
|
|
|
'52.67.48.29 :10002', |
|
|
|
'13.124.87.194:10002', |
|
|
|
'52.63.107.102:10002' |
|
|
|
], |
|
|
|
}, |
|
|
|
wlc: { // !estimatefee
|
|
|
@ -50,13 +55,18 @@ let electrumServers = { |
|
|
|
}, |
|
|
|
komodo: { // !estimatefee
|
|
|
|
address: '173.212.225.176', |
|
|
|
port: 50011, |
|
|
|
port: 10001, |
|
|
|
proto: 'tcp', |
|
|
|
txfee: 10000, |
|
|
|
abbr: 'KMD', |
|
|
|
serverList: [ |
|
|
|
'173.212.225.176:50011', |
|
|
|
'136.243.45.140:50011' |
|
|
|
'173.212.225.176:10001', |
|
|
|
'136.243.45.140:10001', |
|
|
|
'18.216.195.109:10001', |
|
|
|
'52.41.58.116:10001', |
|
|
|
'52.67.48.29 :10001', |
|
|
|
'13.124.87.194:10001', |
|
|
|
'52.63.107.102:10001' |
|
|
|
], |
|
|
|
}, |
|
|
|
dogecoin: { // !estimatefee
|
|
|
|
|
|
@ -34,7 +34,7 @@ module.exports = (shepherd) => { |
|
|
|
res.end(JSON.stringify(successObj)); |
|
|
|
}); |
|
|
|
|
|
|
|
shepherd.get('/electrum/dev/logout', (req, res, next) => { |
|
|
|
shepherd.post('/electrum/lock', (req, res, next) => { |
|
|
|
shepherd.electrumCoins.auth = false; |
|
|
|
shepherd.electrumKeys = {}; |
|
|
|
|
|
|
@ -46,5 +46,19 @@ module.exports = (shepherd) => { |
|
|
|
res.end(JSON.stringify(successObj)); |
|
|
|
}); |
|
|
|
|
|
|
|
shepherd.post('/electrum/logout', (req, res, next) => { |
|
|
|
shepherd.electrumCoins = { |
|
|
|
auth: false, |
|
|
|
}; |
|
|
|
shepherd.electrumKeys = {}; |
|
|
|
|
|
|
|
const obj = { |
|
|
|
msg: 'success', |
|
|
|
result: 'result', |
|
|
|
}; |
|
|
|
|
|
|
|
res.end(JSON.stringify(obj)); |
|
|
|
}); |
|
|
|
|
|
|
|
return shepherd; |
|
|
|
}; |
|
|
@ -26,17 +26,6 @@ module.exports = (shepherd) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
shepherd.get('/electrum/coins/remove', (req, res, next) => { |
|
|
|
delete shepherd.electrumCoins[req.query.coin]; |
|
|
|
|
|
|
|
const successObj = { |
|
|
|
msg: 'success', |
|
|
|
result, |
|
|
|
}; |
|
|
|
|
|
|
|
res.end(JSON.stringify(successObj)); |
|
|
|
}); |
|
|
|
|
|
|
|
shepherd.get('/electrum/coins/add', (req, res, next) => { |
|
|
|
const result = shepherd.addElectrumCoin(req.query.coin); |
|
|
|
|
|
|
|
|
|
@ -134,16 +134,32 @@ module.exports = (shepherd) => { |
|
|
|
}); |
|
|
|
|
|
|
|
shepherd.post('/coins/remove', (req, res) => { |
|
|
|
const _chain = req.body.chain; |
|
|
|
if (req.body.mode === 'native') { |
|
|
|
const _chain = req.body.chain; |
|
|
|
|
|
|
|
delete shepherd.coindInstanceRegistry[_chain ? _chain : 'komodo']; |
|
|
|
|
|
|
|
const obj = { |
|
|
|
msg: 'success', |
|
|
|
result: 'result', |
|
|
|
}; |
|
|
|
|
|
|
|
delete shepherd.coindInstanceRegistry[_chain ? _chain : 'komodo']; |
|
|
|
res.end(JSON.stringify(obj)); |
|
|
|
} else { |
|
|
|
delete shepherd.electrumCoins[req.body.chain === 'komodo' ? 'KMD' : req.body.chain]; |
|
|
|
|
|
|
|
const obj = { |
|
|
|
msg: 'success', |
|
|
|
result: 'result', |
|
|
|
}; |
|
|
|
if (Object.keys(shepherd.electrumCoins).length - 1 === 0) { |
|
|
|
shepherd.electrumCoins.auth = false; |
|
|
|
shepherd.electrumKeys = {}; |
|
|
|
} |
|
|
|
|
|
|
|
const obj = { |
|
|
|
msg: 'success', |
|
|
|
result: 'result', |
|
|
|
}; |
|
|
|
|
|
|
|
res.end(JSON.stringify(obj)); |
|
|
|
res.end(JSON.stringify(obj)); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
return shepherd; |
|
|
|
|
|
@ -1,3 +1,3 @@ |
|
|
|
version=0.2.0.24a |
|
|
|
version=0.2.0.24b |
|
|
|
type=e-beta |
|
|
|
minversion=0.2.0.2 |
|
|
@ -1 +1 @@ |
|
|
|
0.2.0.24a-beta |
|
|
|
0.2.0.24b-beta |