add blockchain install scripts

This commit is contained in:
Josh Harvey 2017-07-01 16:02:46 +03:00
parent 0e9e27b97b
commit 178f576cfb
39 changed files with 3938 additions and 750 deletions

View file

@ -139,6 +139,15 @@ function isHd (settings, cryptoCode) {
.then(r => r.wallet.supportsHd)
}
function cryptoNetwork (settings, cryptoCode) {
const plugin = configManager.cryptoScoped(cryptoCode, settings.config).wallet
const wallet = ph.load(ph.WALLET, plugin)
const account = settings.accounts[plugin]
if (!wallet.cryptoNetwork) return Promise.resolve(false)
return wallet.cryptoNetwork(account, cryptoCode)
}
module.exports = {
balance: mem(balance, {maxAge: FETCH_INTERVAL}),
sendCoins,
@ -146,5 +155,6 @@ module.exports = {
getStatus,
sweep,
isHd,
newFunding
newFunding,
cryptoNetwork
}