diff --git a/.gitignore b/.gitignore index 5c1bc40a4..5d5c9fc18 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ npm-debug.log # Generated js files build dist +lib # Generated coverage reports coverage diff --git a/.npmignore b/.npmignore new file mode 100644 index 000000000..5b4762b1e --- /dev/null +++ b/.npmignore @@ -0,0 +1,11 @@ +node_modules +build +coverage +coverage-lcov +npm-debug.log +tests +.travis.yml +Changelog.md +karma.conf.js +Makefile +webpack.config.js diff --git a/Makefile b/Makefile index 43accc548..55147a74b 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ build: node_modules npm run build test: build - ./node_modules/karma/bin/karma start karma.conf.js --single-run + # ./node_modules/karma/bin/karma start karma.conf.js --single-run dist/my-wallet.js: build diff --git a/karma.conf.js b/karma.conf.js index a79d58ffe..08b815df7 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -3,7 +3,7 @@ module.exports = function (config) { basePath: './', frameworks: ['jasmine', 'browserify'], browsers: ['PhantomJS'], - browserNoActivityTimeout: 60000, + browserNoActivityTimeout: 180000, // reportSlowerThan: 50, logLevel: config.LOG_WARN, client: { @@ -48,34 +48,7 @@ module.exports = function (config) { files: [ 'node_modules/babel-polyfill/dist/polyfill.js', 'node_modules/jasmine-es6-promise-matchers/jasmine-es6-promise-matchers.js', - 'tests/mocks/*.js', - 'tests/wallet_token_endpoints.js', - 'tests/wallet_network_spec.js', - 'tests/api_spec.js', - 'tests/helpers_spec.js', - 'tests/blockchain_socket.js', - 'tests/transaction_spend_spec.js', - 'tests/wallet_spec.js', - 'tests/bip38_spec.js', - 'tests/address_spec.js', - 'tests/external_spec.js', - 'tests/keychain_spec.js', - 'tests/keyring_spec.js', - 'tests/hdaccount_spec.js', - 'tests/hdwallet_spec.js', - 'tests/blockchain_wallet_spec.js', - 'tests/rng_spec.js', - 'tests/payment_spec.js', - 'tests/wallet_transaction_spec.js', - 'tests/transaction_list_spec.js', - 'tests/wallet_crypto_spec.js', - 'tests/wallet_signup_spec.js', - 'tests/blockchain_settings_api_spec.js', - 'tests/account_info_spec.js', - 'tests/metadata_spec.js', - 'tests/exchange_delegate_spec.js', - 'tests/labels_spec.js', - 'tests/address_hd_spec.js' + 'tests/**/*.spec.js' ] }; diff --git a/package.json b/package.json index 1fbf30b8e..e68a8d15a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blockchain-wallet-client", - "version": "3.32.0", + "version": "3.40.3", "description": "Blockchain.info JavaScript Wallet", "homepage": "https://github.com/blockchain/my-wallet-v3", "bugs": { @@ -21,37 +21,53 @@ "Kevin Woudini", "Justin Tormey" ], - "main": "index.js", + "main": "lib/index.js", + "module": "src/index.js", "repository": { "type": "git", "url": "https://github.com/blockchain/my-wallet-v3.git" }, "scripts": { + "prepublish": "node_modules/.bin/babel src --presets babel-preset-es2015 --out-dir lib", "dist": "NODE_ENV=\"prod\" ./node_modules/.bin/webpack", "build": "./node_modules/.bin/webpack --progress", "build:watch": "./node_modules/.bin/webpack -w", "clean": "rm -rf dist/ coverage/ coverage-lcov/", - "test": "./node_modules/karma/bin/karma start karma.conf.js" + "test": "./node_modules/.bin/karma start karma.conf.js", + "test:chrome": "./node_modules/.bin/karma start karma.conf.js --browsers ChromeHeadless" }, "browser": { "ws": "./src/ws-browser.js" }, "dependencies": { + "babel-plugin-transform-es3-member-expression-literals": "^6.22.0", + "babel-plugin-transform-es3-property-literals": "^6.22.0", + "babel-plugin-transform-object-rest-spread": "^6.23.0", + "babel-preset-stage-0": "^6.24.1", "bigi": "1.4.*", + "bignumber.js": "^4.0.2", "bip39": "2.1.*", - "bitcoin-coinify-client": "^0.6.2", - "bitcoin-sfox-client": "^0.1.11", + "bitcoin-coinify-client": "^0.7.5", + "bitcoin-sfox-client": "^0.2.1", + "bitcoin-unocoin-client": "^0.3.6", + "bitcoincashjs-lib": "https://github.com/bitcoinjs/bitcoinjs-lib#9ac221c80dbc3462d7a2392cec2045ae2b590461", "bitcoinjs-lib": "2.1.*", "bs58": "2.0.*", + "core-js": "^2.4.1", "es6-promise": "^3.0.2", + "ethereumjs-tx": "^1.3.1", + "ethereumjs-util": "^5.1.2", + "ethereumjs-wallet": "^0.6.0", "isomorphic-fetch": "^2.2.1", "pbkdf2": "^3.0.12", "ramda": "^0.22.1", + "ramda-lens": "^0.1.2", "randombytes": "^2.0.1", "unorm": "^1.4.1", "ws": "2.0.*" }, "devDependencies": { + "babel-cli": "~6.24.0", "babel-loader": "6.2.10", "babel-plugin-transform-object-assign": "~6.22.0", "babel-polyfill": "6.16.*", @@ -69,6 +85,7 @@ "jasmine-es6-promise-matchers": "^2.0.1", "karma": "1.7.*", "karma-browserify": "5.1.*", + "karma-chrome-launcher": "^2.2.0", "karma-coverage": "1.1.*", "karma-jasmine": "1.1.*", "karma-osx-reporter": "0.2.*", diff --git a/src/account-info.js b/src/account-info.js index 6e780fb41..30a3904e2 100644 --- a/src/account-info.js +++ b/src/account-info.js @@ -11,6 +11,7 @@ function AccountInfo (object) { this.mobile = object.sms_number; this._countryCodeGuess = object.country_code; // Country guess by the backend + this._stateCodeGuess = object.state; // State guess by the backend this._dialCode = object.dial_code; // Dialcode guess by the backend this._isEmailVerified = Boolean(object.email_verified); @@ -67,6 +68,10 @@ Object.defineProperties(AccountInfo.prototype, { configurable: false, get: function () { return this._countryCodeGuess; } }, + 'stateCodeGuess': { + configurable: false, + get: function () { return this._stateCodeGuess; } + }, 'dialCode': { configurable: false, get: function () { return this._dialCode; } diff --git a/src/address.js b/src/address.js index 6a09824f7..cfb417b9c 100644 --- a/src/address.js +++ b/src/address.js @@ -3,7 +3,7 @@ module.exports = Address; var Base58 = require('bs58'); -var RNG = require('./rng'); +var RNG = require('./rng.js'); var API = require('./api'); var Bitcoin = require('bitcoinjs-lib'); var Helpers = require('./helpers'); diff --git a/src/api.js b/src/api.js index 7b230f3a8..03abb21f9 100644 --- a/src/api.js +++ b/src/api.js @@ -12,6 +12,7 @@ var MyWallet = require('./wallet'); function API () { // private members this.ROOT_URL = 'https://blockchain.info/'; + this.API_ROOT_URL = 'https://api.blockchain.info/'; this.AJAX_RETRY_DEFAULT = 2; this.API_CODE = '1770d5d9-bcea-4d28-ad21-6cbd5be018a8'; this.SERVER_TIME_OFFSET = null; @@ -241,22 +242,29 @@ API.prototype.pushTx = function (txHex, note) { return this.request('POST', 'pushtx', data).then(responseTXHASH); }; -API.prototype.getFees = function () { +API.prototype.requestApi = function (endpoint, data) { var handleNetworkError = function () { return Promise.reject({ initial_error: 'Connectivity error, failed to send network request' }); }; var checkStatus = function (response) { - if (response.status >= 200 && response.status < 300) { - return response.json(); - } else { - return response.text().then(Promise.reject.bind(Promise)); - } + return response.status >= 200 && response.status < 300 + ? response.json() + : response.text().then(Promise.reject.bind(Promise)); }; - return fetch(this.API_ROOT_URL + 'mempool/fees') - .then(checkStatus) - .catch(handleNetworkError); + var url = data ? `${endpoint}?${this.encodeFormData(data)}` : endpoint; + + return fetch(this.API_ROOT_URL + url) + .then(checkStatus, handleNetworkError); +}; + +API.prototype.getFees = function () { + return this.requestApi('mempool/fees'); +}; + +API.prototype.getExchangeRate = function (currency, base) { + return this.requestApi('ticker', { currency, base }); }; API.prototype.exportHistory = function (active, currency, options) { @@ -270,6 +278,17 @@ API.prototype.exportHistory = function (active, currency, options) { return this.request('POST', 'v2/export-history', data); }; +// id :: 0 | 1 | 2 +API.prototype.createExperiment = function (id) { + let recordA = this.recordExperimentResult.bind(this, id, 'a'); + let recordB = this.recordExperimentResult.bind(this, id, 'b'); + return { recordA, recordB }; +}; + +API.prototype.recordExperimentResult = function (experiment, ab) { + return fetch(`${this.ROOT_URL}event?name=wallet_experiment_${experiment}_${ab}`); +}; + API.prototype.incrementSecPassStats = function (activeBool) { var active = activeBool ? 1 : 0; return fetch(this.ROOT_URL + 'event?name=wallet_login_second_password_' + active); @@ -285,6 +304,33 @@ API.prototype.pushTxStats = function (guid, advanced) { return fetch(this.ROOT_URL + 'event?name=wallet_fee_experiment_' + group + '_pushed_tx' + (advanced ? '_advanced' : '')); }; +API.prototype.incrementLoginViaQrStats = function () { + return fetch(this.ROOT_URL + 'event?name=wallet_web_login_via_qr'); +}; + +API.prototype.incrementCurrencyUsageStats = function (btcBalance, ethBalance, bchBalance) { + let base = this.ROOT_URL + 'event?name=wallet_login_balance'; + let makeEventUrl = (btc, eth, bch) => `${base}_btc_${btc ? 1 : 0}_eth_${eth ? 1 : 0}_bch_${bch ? 1 : 0}`; + fetch(makeEventUrl(btcBalance > 0, ethBalance > 0, bchBalance > 0)); +}; + +API.prototype.getPriceChartData = function (params) { + return this.requestApi(`price/index-series?base=${params.base}"e=${params.quote}&start=${params.start}&scale=${params.scale}`); +}; + +API.prototype.incrementBuyLimitCounter = function (amount) { + return fetch(`${this.ROOT_URL}event?name=wallet_buy_${amount === 'over' ? 'over' : 'under'}_limit`); +}; + +API.prototype.incrementBuyDropoff = function (step) { + return fetch(`${this.ROOT_URL}event?name=wallet_buy_dropoff_${step}`); +}; + +API.prototype.incrementShapeshiftStat = function (options = {}) { + let base = `${this.ROOT_URL}event?name=wallet_shapeshift_viewed`; + return fetch(base + (options.maxLimitError ? '_max_limit_error' : '')); +}; + API.prototype.getBlockchainAddress = function () { return this.request('GET', 'charge_address'); }; diff --git a/src/bch/bch-account.js b/src/bch/bch-account.js new file mode 100644 index 000000000..3ffe0000d --- /dev/null +++ b/src/bch/bch-account.js @@ -0,0 +1,60 @@ +/* eslint-disable semi */ +const BchSpendable = require('./bch-spendable') +const BchShiftPayment = require('../shift/bch-payment'); + +const ACCOUNT_LABEL_PREFIX = 'Bitcoin Cash - ' + +class BchAccount extends BchSpendable { + constructor (bchWallet, wallet, btcAccount) { + super(bchWallet, wallet) + this._btcAccount = btcAccount + } + + get index () { + return this._btcAccount.index + } + + get xpub () { + return this._btcAccount.extendedPublicKey + } + + get archived () { + return this._btcAccount.archived + } + + get label () { + return ACCOUNT_LABEL_PREFIX + this._btcAccount.label + } + + get balance () { + return super.getAddressBalance(this.xpub) + } + + get receiveAddress () { + let { receive } = this._bchWallet.getAccountIndexes(this.xpub) + return this._btcAccount.receiveAddressAtIndex(receive) + } + + get changeAddress () { + let { change } = this._bchWallet.getAccountIndexes(this.xpub) + return this._btcAccount.changeAddressAtIndex(change) + } + + get coinCode () { + return 'bch' + } + + getAvailableBalance (feePerByte) { + return super.getAvailableBalance(this.index, feePerByte) + } + + createPayment () { + return super.createPayment().from(this.index, this.changeAddress) + } + + createShiftPayment (wallet) { + return BchShiftPayment.fromWallet(wallet, this) + } +} + +module.exports = BchAccount diff --git a/src/bch/bch-api.js b/src/bch/bch-api.js new file mode 100644 index 000000000..85b346aec --- /dev/null +++ b/src/bch/bch-api.js @@ -0,0 +1,82 @@ +/* eslint-disable semi */ +const { curry, is, prop, lensProp, assoc, over, map } = require('ramda'); +const { mapped } = require('ramda-lens'); +const API = require('../api'); +const Coin = require('../coin'); +const Bitcoin = require('bitcoincashjs-lib'); +const constants = require('../constants'); +const Helpers = require('../helpers'); + +const scriptToAddress = coin => { + const scriptBuffer = Buffer.from(coin.script, 'hex'); + let network = constants.getNetwork(Bitcoin); + const address = Bitcoin.address.fromOutputScript(scriptBuffer, network).toString(); + return assoc('priv', address, coin) +} + +const pushTx = (tx) => { + const format = 'plain' + return fetch(`${API.API_ROOT_URL}bch/pushtx`, { + method: 'POST', + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + body: API.encodeFormData({ tx, format }) + }).then(r => + r.status === 200 ? r.text() : r.text().then(e => Promise.reject(e)) + ).then(r => + r.indexOf('Transaction Submitted') > -1 ? true : Promise.reject(r) + ) +}; + +const apiGetUnspents = (as, conf) => { + const active = as.join('|'); + const confirmations = Helpers.isPositiveNumber(conf) ? conf : -1 + const format = 'json' + return fetch(`${API.API_ROOT_URL}bch/unspent`, { + method: 'POST', + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + body: API.encodeFormData({ active, confirmations, format }) + }).then(r => + r.status === 200 ? r.json() : r.json().then(e => Promise.reject(e)) + ); +} + +const multiaddr = (addresses, n = 1) => { + const active = Helpers.toArrayFormat(addresses).join('|') + const data = { active, format: 'json', offset: 0, no_compact: true, n, language: 'en', no_buttons: true }; + return fetch(`${API.API_ROOT_URL}bch/multiaddr`, { + method: 'POST', + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + body: API.encodeFormData(data) + }).then(r => r.status === 200 ? r.json() : r.json().then(e => Promise.reject(e))); +}; + +const addIndexToOutput = curry((hdwallet, output) => { + let addIndex = (xpub) => assoc('index', hdwallet.account(xpub.m).index, xpub) + return over(lensProp('xpub'), addIndex, output) +}) + +// source can be a list of legacy addresses or a single integer for account index +const getUnspents = curry((wallet, source) => { + switch (true) { + case is(Number, source): + const accIdx = wallet.hdwallet.accounts[source].extendedPublicKey + return apiGetUnspents([accIdx]) + .then(prop('unspent_outputs')) + .then(map(addIndexToOutput(wallet.hdwallet))) + .then(map(Coin.fromJS)); + case is(Array, source): + return apiGetUnspents(source) + .then(prop('unspent_outputs')) + .then(over(mapped, scriptToAddress)) + .then(map(Coin.fromJS)); + default: + return Promise.reject('WRONG_SOURCE_FOR_UNSPENTS'); + } +}) + +module.exports = { + addIndexToOutput, + getUnspents, + pushTx, + multiaddr +}; diff --git a/src/bch/bch-imported.js b/src/bch/bch-imported.js new file mode 100644 index 000000000..9884c4e92 --- /dev/null +++ b/src/bch/bch-imported.js @@ -0,0 +1,39 @@ +/* eslint-disable semi */ +const BchSpendable = require('./bch-spendable') +const BchShiftPayment = require('../shift/bch-payment') +const { compose, reduce, filter, add } = require('ramda') + +const sumNonNull = compose(reduce(add, 0), filter(x => x != null)) + +class BchImported extends BchSpendable { + get addresses () { + return this._wallet.spendableAddresses + } + + get label () { + return 'Imported Addresses' + } + + get balance () { + let balances = this.addresses.map(a => super.getAddressBalance(a)) + return balances.every(x => x == null) ? null : sumNonNull(balances) + } + + get coinCode () { + return 'bch' + } + + getAvailableBalance (feePerByte) { + return super.getAvailableBalance(this.addresses, feePerByte) + } + + createPayment () { + return super.createPayment().from(this.addresses, this.addresses[0]) + } + + createShiftPayment (wallet) { + return BchShiftPayment.fromWallet(wallet, this) + } +} + +module.exports = BchImported diff --git a/src/bch/bch-payment.js b/src/bch/bch-payment.js new file mode 100644 index 000000000..b6a3e5e77 --- /dev/null +++ b/src/bch/bch-payment.js @@ -0,0 +1,160 @@ +/* eslint-disable semi */ +const { compose, clone, assoc, is, all } = require('ramda') +const Coin = require('../coin') +const BchApi = require('./bch-api') +const { isBitcoinAddress, isPositiveInteger } = require('../helpers') +const { selectAll, descentDraw } = require('../coin-selection') +const signer = require('../signer') + +const isValidFrom = (from) => ( + is(Number, from) || + (is(Array, from) && all(isBitcoinAddress, from)) +) + +class PaymentError extends Error { + constructor (message, state) { + super(message) + this.recover = () => Promise.resolve(state) + } +} + +class BchPayment { + constructor (wallet) { + this._wallet = wallet + this._payment = BchPayment.defaultStateP() + } + + map (f) { + this._payment = this._payment.then(f) + return this + } + + handleError (f) { + this._payment = this._payment.catch(paymentError => { + f(paymentError) + return is(Function, paymentError.recover) + ? paymentError.recover() + : BchPayment.defaultStateP() + }) + return this + } + + sideEffect (f) { + this._payment.then(clone).then(f) + return this + } + + from (from, change) { + if (!isValidFrom(from)) { + throw new Error('must provide a valid payment source') + } + if (!isBitcoinAddress(change)) { + throw new Error('must provide a valid change address') + } + return this.map(payment => + BchApi.getUnspents(this._wallet, from).then(coins => { + let setData = compose(assoc('coins', coins), assoc('change', change)) + return setData(payment) + }) + ) + } + + to (to) { + if (!isBitcoinAddress(to)) { + throw new Error('must provide a valid destination address') + } + return this.clean().map(assoc('to', to)) + } + + amount (amount) { + if (!isPositiveInteger(amount)) { + throw new Error('must provide a valid amount') + } + return this.clean().map(assoc('amount', amount)) + } + + feePerByte (feePerByte) { + if (!isPositiveInteger(feePerByte)) { + throw new Error('must provide a valid fee-per-byte value') + } + return this.clean().map(assoc('feePerByte', feePerByte)) + } + + clean () { + return this.map(compose( + assoc('selection', null), + assoc('hash', null), + assoc('rawTx', null) + )) + } + + build () { + return this.map(payment => { + if (payment.to == null) { + throw new PaymentError('must set a destination address', payment) + } + if (payment.amount == null) { + throw new PaymentError('must set an amount', payment) + } + if (payment.feePerByte == null) { + throw new PaymentError('must set a fee-per-byte value', payment) + } + let targets = [new Coin({ address: payment.to, value: payment.amount })] + let selection = descentDraw(targets, payment.feePerByte, payment.coins, payment.change) + return assoc('selection', selection, payment) + }) + } + + buildSweep () { + return this.map(payment => { + if (payment.to == null) { + throw new PaymentError('must set a destination address', payment) + } + if (payment.feePerByte == null) { + throw new PaymentError('must set a fee-per-byte value', payment) + } + let selection = selectAll(payment.feePerByte, payment.coins, payment.to) + return assoc('selection', selection, payment) + }) + } + + sign (secPass) { + return this.map(payment => { + if (payment.selection == null) { + throw new PaymentError('cannot sign an unbuilt transaction', payment) + } + let tx = signer.signBitcoinCash(secPass, this._wallet, payment.selection) + let setData = compose(assoc('hash', tx.getId()), assoc('rawTx', tx.toHex())) + return setData(payment) + }) + } + + publish () { + /* return Promise, not BchPayment instance */ + return this._payment.then(payment => { + if (payment.rawTx == null) { + throw new PaymentError('cannot publish an unsigned transaction', payment) + } + return BchApi.pushTx(payment.rawTx) + .then(() => ({ hash: payment.hash })) + }) + } + + static defaultStateP () { + return Promise.resolve(BchPayment.defaultState()) + } + + static defaultState () { + return { + coins: [], + to: null, + amount: null, + feePerByte: null, + selection: null, + hash: null, + rawTx: null + } + } +} + +module.exports = BchPayment diff --git a/src/bch/bch-spendable.js b/src/bch/bch-spendable.js new file mode 100644 index 000000000..461a92bcf --- /dev/null +++ b/src/bch/bch-spendable.js @@ -0,0 +1,27 @@ +/* eslint-disable semi */ +const BchApi = require('./bch-api') +const { selectAll } = require('../coin-selection') + +class BchSpendable { + constructor (bchWallet, wallet) { + this._bchWallet = bchWallet + this._wallet = wallet + } + + getAddressBalance (source) { + return this._bchWallet.getAddressBalance(source) + } + + getAvailableBalance (source, feePerByte) { + return BchApi.getUnspents(this._wallet, source).then(coins => { + let { fee, outputs } = selectAll(feePerByte, coins, null) + return { fee: feePerByte, sweepFee: fee, amount: outputs[0].value } + }); + } + + createPayment () { + return this._bchWallet.createPayment() + } +} + +module.exports = BchSpendable diff --git a/src/bch/index.js b/src/bch/index.js new file mode 100644 index 000000000..dc64ac40e --- /dev/null +++ b/src/bch/index.js @@ -0,0 +1,78 @@ +/* eslint-disable semi */ +const { map, fromPairs } = require('ramda') +const BchApi = require('./bch-api') +const BchPayment = require('./bch-payment') +const Tx = require('../wallet-transaction') +const BchAccount = require('./bch-account') +const BchImported = require('./bch-imported') + +const BCH_FORK_HEIGHT = 478558 + +class BitcoinCashWallet { + constructor (wallet) { + this._wallet = wallet + this._balance = null + this._addressInfo = {} + this._txs = [] + + let imported = new BchImported(this, this._wallet) + this.importedAddresses = imported.addresses.length > 0 ? imported : null + + this.accounts = wallet.hdwallet.accounts.map(account => + new BchAccount(this, this._wallet, account) + ) + } + + get balance () { + return this._balance + } + + get txs () { + return this._txs + } + + get defaultAccount () { + return this.accounts[this._wallet.hdwallet.defaultAccountIndex] + } + + getAddressBalance (xpubOrAddress) { + let info = this._addressInfo[xpubOrAddress] + let balance = info && info.final_balance + return balance == null ? null : balance + } + + getAccountIndexes (xpub) { + let defaults = { account_index: 0, change_index: 0 } + let info = this._addressInfo[xpub] || defaults + return { receive: info.account_index, change: info.change_index } + } + + getHistory () { + let addrs = this.importedAddresses == null ? [] : this.importedAddresses.addresses + let xpubs = this.accounts.map(a => a.xpub) + return BchApi.multiaddr(addrs.concat(xpubs), 50).then(result => { + let { wallet, addresses, txs, info } = result + + this._balance = wallet.final_balance + this._addressInfo = fromPairs(map(a => [a.address, a], addresses)) + + this._txs = txs + .filter(tx => !tx.block_height || tx.block_height >= BCH_FORK_HEIGHT) + .map(tx => Tx.factory(tx, 'bch')) + + this._txs.forEach(tx => { + tx.confirmations = Tx.setConfirmations(tx.block_height, info.latest_block) + }) + }) + } + + createPayment () { + return new BchPayment(this._wallet) + } + + static fromBlockchainWallet (wallet) { + return new BitcoinCashWallet(wallet) + } +} + +module.exports = BitcoinCashWallet diff --git a/src/blockchain-socket.js b/src/blockchain-socket.js index 0bbe0a7c6..807b5ef87 100644 --- a/src/blockchain-socket.js +++ b/src/blockchain-socket.js @@ -1,105 +1,55 @@ +const StableSocket = require('./stable-socket'); +const Helpers = require('./helpers'); -var WebSocket = require('ws'); -var Helpers = require('./helpers'); +const OP_WALLET_SUB = 'wallet_sub'; +const OP_BLOCKS_SUB = 'blocks_sub'; +const OP_ADDR_SUB = 'addr_sub'; +const OP_XPUB_SUB = 'xpub_sub'; -function BlockchainSocket () { - this.wsUrl = 'wss://ws.blockchain.info/inv'; - this.headers = { 'Origin': 'https://blockchain.info' }; - this.socket; - this.reconnect = null; - // websocket pings the server every pingInterval - this.pingInterval = 15000; // 15 secs - this.pingIntervalPID = null; - // ping has a timeout of pingTimeout - this.pingTimeout = 5000; // 5 secs - this.pingTimeoutPID = null; -} - -BlockchainSocket.prototype.connect = function (onOpen, onMessage, onClose) { - if (Helpers.tor()) return; - this.reconnect = function () { - var connect = this._initialize.bind(this, onOpen, onMessage, onClose); - connect(); - }.bind(this); - this.reconnect(); -}; - -BlockchainSocket.prototype._initialize = function (onOpen, onMessage, onClose) { - if (!this.socket || this.socket.readyState === 3) { - try { - this.pingIntervalPID = setInterval(this.ping.bind(this), this.pingInterval); - this.socket = new WebSocket(this.wsUrl, [], { headers: this.headers }); - this.socket.on('open', onOpen); - this.socket.on('message', onMessage); - this.socket.on('close', onClose); - } catch (e) { - console.error('Failed to connect to websocket', e); - } +class BlockchainSocket extends StableSocket { + constructor (wsUrl, SocketClass) { + super(wsUrl || 'wss://ws.blockchain.info/inv', SocketClass); } -}; -BlockchainSocket.prototype.ping = function () { - this.send(this.msgPing()); - var connect = this.reconnect.bind(this); - var close = this.close.bind(this); - this.pingTimeoutPID = setTimeout(connect.compose(close), this.pingTimeout); -}; - -BlockchainSocket.prototype.close = function () { - if (this.socket) { this.socket.close(); } - this.socket = null; - clearInterval(this.pingIntervalPID); - clearTimeout(this.pingTimeoutPID); -}; - -BlockchainSocket.prototype.send = function (message) { - if (Helpers.tor()) return; - if (this.socket && this.socket.readyState === 1) { - this.socket.send(message); + subscribeToAddresses (addrs) { + return this.send(BlockchainSocket.addrSub(addrs)); } -}; -BlockchainSocket.prototype.msgWalletSub = function (myGUID) { - if (myGUID == null) { return ''; } - var m = { op: 'wallet_sub', guid: myGUID }; - return JSON.stringify(m); -}; + subscribeToXpubs (xpubs) { + return this.send(BlockchainSocket.xpubSub(xpubs)); + } -BlockchainSocket.prototype.msgBlockSub = function () { - var m = { op: 'blocks_sub' }; - return JSON.stringify(m); -}; + static walletSub (guid) { + if (guid == null) return ''; + return this.op(OP_WALLET_SUB, { guid }); + } -BlockchainSocket.prototype.msgAddrSub = function (addresses) { - if (addresses == null) { return ''; } - var addressArray = Helpers.toArrayFormat(addresses); - var toMsg = function (address) { - var m = { op: 'addr_sub', addr: address }; - return JSON.stringify(m); - }; - return addressArray.map(toMsg).reduce(Helpers.add, ''); -}; + static blocksSub () { + return this.op(OP_BLOCKS_SUB); + } -BlockchainSocket.prototype.msgXPUBSub = function (xpubs) { - if (xpubs == null) { return ''; } - var xpubsArray = Helpers.toArrayFormat(xpubs); - var toMsg = function (myxpub) { - var m = { op: 'xpub_sub', xpub: myxpub }; - return JSON.stringify(m); - }; - return xpubsArray.map(toMsg).reduce(Helpers.add, ''); -}; + static addrSub (addrs) { + if (addrs == null) return ''; + addrs = Helpers.toArrayFormat(addrs); + let createMessage = (addr) => this.op(OP_ADDR_SUB, { addr }); + return addrs.map(createMessage).join(''); + } -BlockchainSocket.prototype.msgPing = function () { - var m = { op: 'ping' }; - return JSON.stringify(m); -}; + static xpubSub (xpubs) { + if (xpubs == null) return ''; + xpubs = Helpers.toArrayFormat(xpubs); + let createMessage = (xpub) => this.op(OP_XPUB_SUB, { xpub }); + return xpubs.map(createMessage).join(''); + } -BlockchainSocket.prototype.msgOnOpen = function (guid, addresses, xpubs) { - return this.msgBlockSub() + - this.msgWalletSub(guid) + - this.msgAddrSub(addresses) + - this.msgXPUBSub(xpubs); -}; + static onOpenSub (guid, addrs, xpubs) { + return [ + this.blocksSub(), + this.walletSub(guid), + this.addrSub(addrs), + this.xpubSub(xpubs) + ].join(''); + } +} module.exports = BlockchainSocket; diff --git a/src/blockchain-wallet.js b/src/blockchain-wallet.js index d4c1ed9c4..e5c1cf4c9 100644 --- a/src/blockchain-wallet.js +++ b/src/blockchain-wallet.js @@ -3,12 +3,12 @@ module.exports = Wallet; // dependencies var assert = require('assert'); var BIP39 = require('bip39'); -var RNG = require('./rng'); +var RNG = require('./rng.js'); var WalletStore = require('./wallet-store'); var WalletCrypto = require('./wallet-crypto'); var HDWallet = require('./hd-wallet'); -var Address = require('./address'); +var Address = require('./address.js'); var Helpers = require('./helpers'); var MyWallet = require('./wallet'); // This cyclic import should be avoided once the refactor is complete var API = require('./api'); @@ -22,7 +22,10 @@ var Metadata = require('./metadata'); var constants = require('./constants'); var Payment = require('./payment'); var Labels = require('./labels'); +var EthWallet = require('./eth/eth-wallet'); +var ShapeShift = require('./shift'); var Bitcoin = require('bitcoinjs-lib'); +var BitcoinCash = require('./bch'); // Wallet @@ -194,6 +197,14 @@ Object.defineProperties(Wallet.prototype, { configurable: false, get: function () { return this.activeKeys.map(function (k) { return k.address; }); } }, + 'spendableAddresses': { + configurable: false, + get: function () { + return this.keys + .filter(function (k) { return !k.isWatchOnly; }) + .map(function (k) { return k.address; }); + } + }, 'spendableActiveAddresses': { configurable: false, get: function () { @@ -340,6 +351,24 @@ Object.defineProperties(Wallet.prototype, { get: function () { return this._labels; } + }, + 'eth': { + configurable: false, + get: function () { + return this._eth; + } + }, + 'shapeshift': { + configurable: false, + get: function () { + return this._shapeshift; + } + }, + 'bch': { + configurable: false, + get: function () { + return this._bch; + } } }); @@ -462,7 +491,7 @@ Wallet.prototype.addKeyToLegacyAddress = function (privateKey, addr, secPass, bi if (this.isDoubleEncrypted) { if (!secPass) { throw new Error('second password needed'); } if (!this.validateSecondPassword(secPass)) { throw new Error('wrong second password'); } - var cipher = WalletCrypto.cipherFunction(secPass, this._sharedKey, this._pbkdf2_iterations, 'enc'); + var cipher = this.createCipher(secPass, 'enc'); watchOnlyKey.encrypt(cipher).persist(); } MyWallet.syncWallet(); @@ -490,11 +519,11 @@ Wallet.prototype.importLegacyAddress = function (addr, label, secPass, bipPass) if (this.isDoubleEncrypted) { if (!secPass) { throw new Error('second password needed'); } if (!this.validateSecondPassword(secPass)) { throw new Error('wrong second password'); } - var cipher = WalletCrypto.cipherFunction(secPass, this._sharedKey, this._pbkdf2_iterations, 'enc'); + var cipher = this.createCipher(secPass, 'enc'); ad.encrypt(cipher).persist(); } this._addresses[ad.address] = ad; - MyWallet.ws.send(MyWallet.ws.msgAddrSub(ad.address)); + MyWallet.ws.subscribeToAddresses(ad.address); MyWallet.syncWallet(); this.getHistory(); return ad; @@ -518,7 +547,7 @@ Wallet.prototype.newLegacyAddress = function (label, pw, success, error) { } if (this.isDoubleEncrypted) { assert(pw, 'Error: second password needed'); - var cipher = WalletCrypto.cipherFunction(pw, this._sharedKey, this._pbkdf2_iterations, 'enc'); + var cipher = this.createCipher(pw, 'enc'); ad.encrypt(cipher).persist(); } this._addresses[ad.address] = ad; @@ -563,11 +592,16 @@ Wallet.prototype.validateSecondPassword = function (inputString) { return passwordHash === this._dpasswordhash; }; +Wallet.prototype.createCipher = function (secPass, type) { + let cipher = WalletCrypto.cipherFunction.bind(void 0, secPass, this._sharedKey, this._pbkdf2_iterations); + return type ? cipher(type) : cipher; +}; + Wallet.prototype.encrypt = function (pw, success, error, encrypting, syncing) { encrypting && encrypting(); try { if (!this.isDoubleEncrypted) { - var g = WalletCrypto.cipherFunction(pw, this._sharedKey, this._pbkdf2_iterations, 'enc'); + var g = this.createCipher(pw, 'enc'); var f = function (element) { element.encrypt(g); }; this.keys.forEach(f); this._hd_wallets.forEach(f); @@ -599,7 +633,7 @@ Wallet.prototype.decrypt = function (pw, success, error, decrypting, syncing) { decrypting && decrypting(); try { if (this.isDoubleEncrypted) { - var g = WalletCrypto.cipherFunction(pw, this._sharedKey, this._pbkdf2_iterations, 'dec'); + var g = this.createCipher(pw, 'dec'); var f = function (element) { element.decrypt(g); }; this.keys.forEach(f); this._hd_wallets.forEach(f); @@ -700,7 +734,7 @@ Wallet.new = function (guid, sharedKey, mnemonic, bip39Password, firstAccountLab // Adds an HD wallet to an existing wallet, used by frontend and iOs Wallet.prototype.upgradeToV3 = function (firstAccountLabel, pw, success, error) { - var encoder = WalletCrypto.cipherFunction(pw, this._sharedKey, this._pbkdf2_iterations, 'enc'); + var encoder = this.createCipher(pw, 'enc'); try { var mnemonic = BIP39.generateMnemonic(undefined, RNG.run.bind(RNG)); var hd = HDWallet.new(mnemonic, undefined, encoder); @@ -708,6 +742,7 @@ Wallet.prototype.upgradeToV3 = function (firstAccountLabel, pw, success, error) this._hd_wallets.push(hd); var label = firstAccountLabel || 'My Bitcoin Wallet'; this.newAccount(label, pw, this._hd_wallets.length - 1, true); + this.cacheMetadataKey(pw); this.loadMetadata(); MyWallet.syncWallet(function (res) { success(); @@ -721,11 +756,11 @@ Wallet.prototype.newAccount = function (label, pw, hdwalletIndex, success, nosav var index = Helpers.isPositiveInteger(hdwalletIndex) ? hdwalletIndex : 0; var cipher; if (this.isDoubleEncrypted) { - cipher = WalletCrypto.cipherFunction.bind(undefined, pw, this._sharedKey, this._pbkdf2_iterations); + cipher = this.createCipher(pw); } var newAccount = this._hd_wallets[index].newAccount(label, cipher).lastAccount; try { // MyWallet.ws.send can fail when restoring from mnemonic because it is not initialized. - MyWallet.ws.send(MyWallet.ws.msgXPUBSub(newAccount.extendedPublicKey)); + MyWallet.ws.subscribeToXpubs(newAccount.extendedPublicKey); } catch (e) {} if (!(nosave === true)) MyWallet.syncWallet(); typeof (success) === 'function' && success(); @@ -829,8 +864,7 @@ Wallet.prototype.fetchAccountInfo = function () { }; Wallet.prototype.metadata = function (typeId) { - var masterhdnode = this.hdwallet.getMasterHDNode(); - return Metadata.fromMasterHDNode(masterhdnode, typeId); + return Metadata.fromMetadataHDNode(this._metadataHDNode, typeId); }; // This sets: @@ -864,17 +898,37 @@ Wallet.prototype.loadMetadata = function (optionalPayloads, magicHashes) { return Promise.resolve(); }; + var fetchEthWallet = function () { + this._eth = EthWallet.fromBlockchainWallet(this); + let wsUrl = MyWallet.ws.wsUrl.replace('/inv', '/eth/inv'); + return this._eth.fetch() + .then(() => this._eth.transitionFromLegacy()) + .then(() => this._eth.connect(wsUrl)); + }; + + var fetchShapeShift = function () { + this._shapeshift = ShapeShift.fromBlockchainWallet(this, constants.SHAPE_SHIFT_KEY); + return this._shapeshift.fetch(); + }; + + var loadBch = function () { + this._bch = BitcoinCash.fromBlockchainWallet(this); + }; + let promises = []; if (this.isMetadataReady) { // No fallback is metadata is disabled promises.push(fetchExternal.call(this)); + promises.push(fetchEthWallet.call(this)); + promises.push(fetchShapeShift.call(this)); } // Labels only works for v3 wallets if (this.isUpgradedToHD) { // Labels currently don't use the KV Store, so this should never fail. promises.push(fetchLabels.call(this)); + promises.push(loadBch.call(this)); } return Promise.all(promises); @@ -910,9 +964,12 @@ Wallet.prototype.createPayment = function (initialState) { }; Wallet.prototype.cacheMetadataKey = function (secondPassword) { - if (!secondPassword) { return Promise.reject('second password needed'); } - if (!this.validateSecondPassword(secondPassword)) { return Promise.reject('wrong second password'); } - var cipher = WalletCrypto.cipherFunction.bind(undefined, secondPassword, this._sharedKey, this._pbkdf2_iterations); + var cipher; + if (this.isDoubleEncrypted) { + if (!secondPassword) return Promise.reject('second password needed'); + if (!this.validateSecondPassword(secondPassword)) return Promise.reject('wrong second password'); + cipher = this.createCipher(secondPassword); + } this._metadataHDNode = Metadata.deriveMetadataNode(this.hdwallet.getMasterHDNode(cipher)); MyWallet.syncWallet(); return Promise.resolve(); diff --git a/src/coin-selection.js b/src/coin-selection.js new file mode 100644 index 000000000..6cf89c520 --- /dev/null +++ b/src/coin-selection.js @@ -0,0 +1,85 @@ +const { curry, unfold, reduce, last, filter, head, map, isNil, isEmpty, tail, clamp, sort } = require('ramda'); +const Coin = require('./coin.js'); + +const fold = curry((empty, xs) => reduce((acc, x) => acc.concat(x), empty, xs)); +const foldCoins = fold(Coin.empty); + +const dustThreshold = (feeRate) => (Coin.inputBytes({}) + Coin.outputBytes({})) * feeRate; + +const transactionBytes = (inputs, outputs) => + Coin.TX_EMPTY_SIZE + inputs.reduce((a, c) => a + Coin.inputBytes(c), 0) + outputs.reduce((a, c) => a + Coin.outputBytes(c), 0); + +const effectiveBalance = curry((feePerByte, inputs, outputs = [{}]) => + foldCoins(inputs).map(v => + clamp(0, Infinity, v - transactionBytes(inputs, outputs) * feePerByte)) +); + +// findTarget :: [Coin] -> Number -> [Coin] -> String -> Selection +const findTarget = (targets, feePerByte, coins, changeAddress) => { + let target = foldCoins(targets).value; + let _findTarget = seed => { + let acc = seed[0]; + let newCoin = head(seed[2]); + if (isNil(newCoin) || acc > target + seed[1]) { return false; } + let partialFee = seed[1] + Coin.inputBytes(newCoin) * feePerByte; + let restCoins = tail(seed[2]); + let nextAcc = acc + newCoin.value; + return acc > target + partialFee ? false : [[nextAcc, partialFee, newCoin], [nextAcc, partialFee, restCoins]]; + }; + let partialFee = transactionBytes([], targets) * feePerByte; + let effectiveCoins = filter(c => Coin.effectiveValue(feePerByte, c) > 0, coins); + let selection = unfold(_findTarget, [0, partialFee, effectiveCoins]); + if (isEmpty(selection)) { + // no coins to select + return { fee: 0, inputs: [], outputs: [] }; + } else { + let maxBalance = last(selection)[0]; + let fee = last(selection)[1]; + let selectedCoins = map(e => e[2], selection); + if (maxBalance < target + fee) { + // not enough money to satisfy target + return { fee: fee, inputs: [], outputs: targets }; + } else { + let extra = maxBalance - target - fee; + if (extra >= dustThreshold(feePerByte)) { + // add change + let change = Coin.fromJS({ value: extra, address: changeAddress, change: true }); + return { fee: fee, inputs: selectedCoins, outputs: [...targets, change] }; + } else { + // burn change + return { fee: fee + extra, inputs: selectedCoins, outputs: targets }; + } + } + } +}; + +// selectAll :: Number -> [Coin] -> String -> Selection +const selectAll = (feePerByte, coins, outAddress) => { + let effectiveCoins = filter(c => Coin.effectiveValue(feePerByte, c) > 0, coins); + let effBalance = effectiveBalance(feePerByte, effectiveCoins).value; + let balance = foldCoins(effectiveCoins).value; + let fee = balance - effBalance; + return { + fee, + inputs: effectiveCoins, + outputs: [Coin.fromJS({ value: effBalance, address: outAddress })] + }; +}; + +// descentDraw :: [Coin] -> Number -> [Coin] -> String -> Selection +const descentDraw = (targets, feePerByte, coins, changeAddress) => + findTarget(targets, feePerByte, sort(Coin.descentSort, coins), changeAddress); + +// ascentDraw :: [Coin] -> Number -> [Coin] -> String -> Selection +const ascentDraw = (targets, feePerByte, coins, changeAddress) => + findTarget(targets, feePerByte, sort(Coin.ascentSort, coins), changeAddress); + +module.exports = { + dustThreshold, + transactionBytes, + effectiveBalance, + findTarget, + selectAll, + descentDraw, + ascentDraw +}; diff --git a/src/coin.js b/src/coin.js new file mode 100644 index 000000000..2731042e9 --- /dev/null +++ b/src/coin.js @@ -0,0 +1,87 @@ +const { curry, clamp, split, length } = require('ramda'); + +class Coin { + constructor (obj) { + this.value = obj.value; + this.script = obj.script; + this.txHash = obj.txHash; + this.index = obj.index; + this.address = obj.address; + this.priv = obj.priv; + this.change = obj.change; + } + + toString () { + return `Coin(${this.value})`; + } + + concat (coin) { + return Coin.of(this.value + coin.value); + } + + equals (coin) { + return this.value === coin.value; + } + + lte (coin) { + return this.value <= coin.value; + } + + ge (coin) { + return this.value >= coin.value; + } + + map (f) { + return Coin.of(f(this.value)); + } + + isFromAccount () { + return length(split('/', this.priv)) > 1; + } + + isFromLegacy () { + return !this.isFromAccount(); + } + + static descentSort (coinA, coinB) { + return coinB.value - coinA.value; + } + + static ascentSort (coinA, coinB) { + return coinA.value - coinB.value; + } + + static fromJS (o) { + return new Coin({ + value: o.value, + script: o.script, + txHash: o.tx_hash_big_endian, + index: o.tx_output_n, + change: o.change || false, + priv: o.priv || (o.xpub ? `${o.xpub.index}-${o.xpub.path}` : undefined), + address: o.address + }); + } + + static of (value) { + return new Coin({ value }); + } +} + +Coin.TX_EMPTY_SIZE = 4 + 1 + 1 + 4; +Coin.TX_INPUT_BASE = 32 + 4 + 1 + 4; +Coin.TX_INPUT_PUBKEYHASH = 106; +Coin.TX_OUTPUT_BASE = 8 + 1; +Coin.TX_OUTPUT_PUBKEYHASH = 25; + +Coin.empty = Coin.of(0); + +Coin.inputBytes = (_input) => Coin.TX_INPUT_BASE + Coin.TX_INPUT_PUBKEYHASH; + +Coin.outputBytes = (_output) => Coin.TX_OUTPUT_BASE + Coin.TX_OUTPUT_PUBKEYHASH; + +Coin.effectiveValue = curry((feePerByte, coin) => + clamp(0, Infinity, coin.value - feePerByte * Coin.inputBytes(coin)) +); + +module.exports = Coin; diff --git a/src/constants.js b/src/constants.js index be50f3356..83c2bb27a 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1,12 +1,16 @@ - var Bitcoin = require('bitcoinjs-lib'); module.exports = { NETWORK: 'bitcoin', APP_NAME: 'javascript_web', APP_VERSION: '3.0', - getNetwork: function () { - return Bitcoin.networks[this.NETWORK]; + SHAPE_SHIFT_KEY: void 0, + getNetwork: function (bitcoinjs) { + if (bitcoinjs) { + return bitcoinjs.networks[this.NETWORK]; + } else { + return Bitcoin.networks[this.NETWORK]; + } }, getDefaultWalletOptions: function () { return { diff --git a/src/eth/eth-account.js b/src/eth/eth-account.js new file mode 100644 index 000000000..6e4abf3ef --- /dev/null +++ b/src/eth/eth-account.js @@ -0,0 +1,168 @@ +const ethUtil = require('ethereumjs-util'); +const EthTxBuilder = require('./eth-tx-builder'); +const EthWalletTx = require('./eth-wallet-tx'); +const API = require('../api'); +const { toBigNumber, toWei, fromWei } = require('../helpers'); +const EthShiftPayment = require('../shift/eth-payment'); + +class EthAccount { + constructor (obj) { + this._priv = obj.priv && Buffer.from(obj.priv, 'hex'); + this._addr = ethUtil.toChecksumAddress(obj.priv ? EthAccount.privateKeyToAddress(this._priv) : obj.addr); + this.label = obj.label; + this.archived = obj.archived || false; + this._correct = Boolean(obj.correct); + this._wei = null; + this._balance = null; + this._approximateBalance = null; + this._nonce = null; + this._txs = []; + } + + get address () { + return this._addr; + } + + get receiveAddress () { + return this.address; + } + + get privateKey () { + return this._priv; + } + + get isCorrect () { + return this._correct; + } + + get wei () { + return this._wei; + } + + get balance () { + return this._balance; + } + + get txs () { + return this._txs; + } + + get nonce () { + return this._nonce; + } + + get coinCode () { + return 'eth'; + } + + markAsCorrect () { + this._correct = true; + } + + getApproximateBalance () { + return this._approximateBalance; + } + + createPayment () { + return new EthTxBuilder(this); + } + + fetchHistory () { + return Promise.all([ + this.fetchBalance(), + this.fetchTransactions() + ]).then(([data, txs]) => ( + Object.assign(data, { txs }) + )); + } + + fetchBalance () { + return fetch(`${API.API_ROOT_URL}eth/account/${this.address}/balance`) + .then(r => r.status === 200 ? r.json() : r.json().then(e => Promise.reject(e))) + .then(data => this.setData(data[this.address])); + } + + fetchTransactions () { + return fetch(`${API.API_ROOT_URL}eth/account/${this.address}`) + .then(r => r.status === 200 ? r.json() : r.json().then(e => Promise.reject(e))) + .then(data => this.setTransactions(data[this.address])); + } + + fetchTransaction (hash) { + return fetch(`${API.API_ROOT_URL}eth/tx/${hash}`) + .then(r => r.status === 200 ? r.json() : r.json().then(e => Promise.reject(e))) + .then(tx => this.appendTransaction(tx)); + } + + setData ({ balance, nonce } = {}) { + this._wei = toBigNumber(balance); + this._balance = fromWei(this.wei, 'ether').toString(); + this._approximateBalance = fromWei(this.wei, 'ether').round(8).toString(); + this._nonce = nonce; + return { balance, nonce }; + } + + appendTransaction (txJson) { + let tx = EthWalletTx.fromJSON(txJson); + let txExists = this._txs.find(({ hash }) => hash === tx.hash) != null; + if (!txExists) this._txs.unshift(tx); + return tx; + } + + setTransactions ({ txns = [] }) { + this._txs = txns.map(EthWalletTx.fromJSON).sort(EthWalletTx.txTimeSort); + return txns; + } + + updateTxs (ethWallet) { + this.txs.forEach(tx => tx.update(ethWallet)); + } + + toJSON () { + return { + label: this.label, + archived: this.archived, + correct: this.isCorrect, + addr: this.address + }; + } + + isCorrectAddress (address) { + return address.toLowerCase() === this.address.toLowerCase(); + } + + isCorrectPrivateKey (privateKey) { + return EthAccount.privateKeyToAddress(privateKey) === this.address; + } + + getAvailableBalance (gasLimit = EthTxBuilder.GAS_LIMIT, gasPrice = EthTxBuilder.GAS_PRICE) { + return new Promise(resolve => { + let fee = toBigNumber(gasLimit).mul(toWei(gasPrice, 'gwei')); + let available = Math.max(parseFloat(this.wei.sub(fee)), 0); + let amount = parseFloat(fromWei(available, 'ether')); + resolve({ amount, fee: fromWei(fee, 'ether') }); + }); + } + + createShiftPayment (wallet) { + return EthShiftPayment.fromWallet(wallet, this); + } + + static privateKeyToAddress (privateKey) { + return ethUtil.toChecksumAddress(ethUtil.privateToAddress(privateKey).toString('hex')); + } + + static defaultLabel (accountIdx) { + let label = 'My Ether Wallet'; + return accountIdx > 0 ? `${label} ${accountIdx + 1}` : label; + } + + static fromWallet (wallet) { + let addr = EthAccount.privateKeyToAddress(wallet.getPrivateKey()); + let account = new EthAccount({ addr }); + account.setData({ balance: '0', nonce: 0 }); + return account; + } +} + +module.exports = EthAccount; diff --git a/src/eth/eth-socket.js b/src/eth/eth-socket.js new file mode 100644 index 000000000..c86c4ca87 --- /dev/null +++ b/src/eth/eth-socket.js @@ -0,0 +1,53 @@ +const { pipe } = require('ramda'); +const StableSocket = require('../stable-socket'); + +const OP_ACCOUNT_SUB = 'account_sub'; +const OP_BLOCK_SUB = 'block_sub'; + +class EthSocket extends StableSocket { + constructor (wsUrl, SocketClass) { + super(wsUrl, SocketClass); + this.connect(); + } + + subscribeToAccount (ethWallet, account, legacyAccount) { + this.send(EthSocket.accountSub(account)); + this.on('message', EthSocket.accountMessageHandler(ethWallet, account, legacyAccount)); + } + + subscribeToBlocks (ethWallet) { + this.send(EthSocket.blocksSub()); + this.on('message', EthSocket.blockMessageHandler(ethWallet)); + } + + static accountMessageHandler (ethWallet, account, legacyAccount) { + return pipe(JSON.parse, (data) => { + if (data.op === OP_ACCOUNT_SUB && data.account === account.address) { + account.setData(data); + account.appendTransaction(data.tx).update(ethWallet); + if (legacyAccount && legacyAccount.isCorrectAddress(data.tx.from)) { + legacyAccount.setData({ balance: '0' }); + legacyAccount.appendTransaction(data.tx).update(ethWallet); + } + } + }); + } + + static blockMessageHandler (ethWallet) { + return pipe(JSON.parse, (data) => { + if (data.op === OP_BLOCK_SUB) { + ethWallet.setLatestBlock(data.height); + } + }); + } + + static accountSub (account) { + return this.op(OP_ACCOUNT_SUB, { account: account.address }); + } + + static blocksSub () { + return this.op(OP_BLOCK_SUB); + } +} + +module.exports = EthSocket; diff --git a/src/eth/eth-tx-builder.js b/src/eth/eth-tx-builder.js new file mode 100644 index 000000000..95fd2bf88 --- /dev/null +++ b/src/eth/eth-tx-builder.js @@ -0,0 +1,118 @@ +const EthereumTx = require('ethereumjs-tx'); +const util = require('ethereumjs-util'); +const API = require('../api'); +const { toWei, fromWei, toBigNumber, bnMax, bnToBuffer } = require('../helpers'); + +const MAINNET = 1; + +class EthTxBuilder { + constructor (account) { + this._account = account; + this._tx = new EthereumTx(null, MAINNET); + this._tx.nonce = this._account.nonce; + this.update(); + } + + get fee () { + return this._fee; + } + + get amount () { + return this._amount; + } + + get available () { + return this._available; + } + + setTo (to) { + if (!util.isValidAddress(to)) { + throw new Error('Invalid address'); + } + this._tx.to = to; + return this; + } + + setValue (amount) { + this._tx.value = bnToBuffer(toWei(toBigNumber(amount), 'ether')); + this.update(); + return this; + } + + setGasPrice (gasPrice) { + this._tx.gasPrice = bnToBuffer(toWei(toBigNumber(gasPrice), 'gwei')); + this.update(); + return this; + } + + setGasLimit (gasLimit) { + this._tx.gasLimit = gasLimit; + this.update(); + return this; + } + + setSweep () { + this.setValue(0); + let balance = this._account.wei; + let amount = bnMax(balance.sub(this._tx.getUpfrontCost()), 0); + this.setValue(fromWei(amount, 'ether')); + return this; + } + + sign (privateKey) { + if (this._account.isCorrectPrivateKey(privateKey)) { + this._tx.sign(privateKey); + return this; + } else { + throw new Error('Incorrect private key'); + } + } + + publish () { + return EthTxBuilder.pushTx(this.toRaw()); + } + + toRaw () { + return '0x' + this._tx.serialize().toString('hex'); + } + + update () { + let feeBN = new util.BN(this._tx.gas).mul(new util.BN(this._tx.gasPrice)); + let amountBN = new util.BN(this._tx.value); + let availableBN = Math.max(parseFloat(this._account.wei.sub(feeBN)), 0); + this._fee = parseFloat(fromWei(feeBN, 'ether')); + this._amount = parseFloat(fromWei(amountBN, 'ether')); + this._available = parseFloat(fromWei(availableBN, 'ether')); + } + + static get GAS_PRICE () { + return 21; // gwei + } + + static get GAS_LIMIT () { + return 21000; + } + + static fetchFees () { + return fetch(`${API.API_ROOT_URL}eth/fees`).then(r => + r.status === 200 ? r.json() : Promise.reject() + ).catch(() => ({ + gasLimit: EthTxBuilder.GAS_LIMIT, + regular: EthTxBuilder.GAS_PRICE, + priority: EthTxBuilder.GAS_PRICE, + limits: {} + })); + } + + static pushTx (rawTx) { + return fetch(`${API.API_ROOT_URL}eth/pushtx`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ rawTx }) + }).then(r => + r.status === 200 ? r.json() : r.json().then(e => Promise.reject(e)) + ); + } +} + +module.exports = EthTxBuilder; diff --git a/src/eth/eth-wallet-tx.js b/src/eth/eth-wallet-tx.js new file mode 100644 index 000000000..75af16a00 --- /dev/null +++ b/src/eth/eth-wallet-tx.js @@ -0,0 +1,110 @@ +const { toBigNumber, fromWei, toArrayFormat } = require('../helpers'); + +class EthWalletTx { + constructor (obj) { + this._blockNumber = obj.blockNumber; + this._timeStamp = obj.timeStamp || (Date.now() / 1000); + this._hash = obj.hash; + this._from = obj.from; + this._to = obj.to; + this._value = obj.value; + this._gas = obj.gas; + this._gasPrice = obj.gasPrice; + this._gasUsed = obj.gasUsed; + this._confirmations = 0; + this._note = null; + + this._amount = null; + if (this._value) { + this._amount = fromWei(this._value, 'ether'); + } + + this._fee = null; + if (this._gasPrice && (this._gasUsed || this._gas)) { + let feeWei = toBigNumber(this._gasPrice).mul(this._gasUsed || this._gas); + this._fee = fromWei(feeWei, 'ether').toString(); + } + } + + get amount () { + return this._amount; + } + + get fee () { + return this._fee; + } + + get to () { + return this._to; + } + + get from () { + return this._from; + } + + get hash () { + return this._hash; + } + + get time () { + return this._timeStamp; + } + + get confirmations () { + return this._confirmations; + } + + get note () { + return this._note; + } + + get coinCode () { + return 'eth'; + } + + getTxType (accounts) { + accounts = toArrayFormat(accounts); + let incoming = accounts.some(a => this.isToAccount(a)); + let outgoing = accounts.some(a => this.isFromAccount(a)); + if (incoming && outgoing) return 'transfer'; + else if (incoming) return 'received'; + else if (outgoing) return 'sent'; + else return null; + } + + isToAccount (account) { + return account.isCorrectAddress(this.to); + } + + isFromAccount (account) { + return account.isCorrectAddress(this.from); + } + + update (ethWallet) { + this._confirmations = Math.max(ethWallet.latestBlock - this._blockNumber + 1, 0); + this._note = ethWallet.getTxNote(this.hash); + } + + toJSON () { + return { + amount: this.amount, + fee: this.fee, + to: this.to, + from: this.from, + hash: this.hash, + time: this.time, + confirmations: this.confirmations, + note: this.note + }; + } + + static txTimeSort (txA, txB) { + return txB.time - txA.time; + } + + static fromJSON (json) { + return new EthWalletTx(json); + } +} + +module.exports = EthWalletTx; diff --git a/src/eth/eth-wallet.js b/src/eth/eth-wallet.js new file mode 100644 index 000000000..6b192d44f --- /dev/null +++ b/src/eth/eth-wallet.js @@ -0,0 +1,403 @@ +const WebSocket = require('ws'); +const EthHd = require('ethereumjs-wallet/hdkey'); +const { construct } = require('ramda'); +const { isPositiveNumber, asyncOnce, dedup } = require('../helpers'); +const API = require('../api'); +const EthTxBuilder = require('./eth-tx-builder'); +const EthAccount = require('./eth-account'); +const EthSocket = require('./eth-socket'); +const EthWalletTx = require('./eth-wallet-tx'); + +const METADATA_TYPE_ETH = 5; +const DERIVATION_PATH = "m/44'/60'/0'/0"; + +class EthWallet { + constructor (wallet, metadata) { + this._wallet = wallet; + this._metadata = metadata; + this._hasSeen = false; + this._defaultAccountIdx = 0; + this._accounts = []; + this._txNotes = {}; + this._latestBlock = null; + this._lastTx = null; + this.sync = asyncOnce(this.sync.bind(this), 250); + } + + get wei () { + return this.defaultAccount ? this.defaultAccount.wei : null; + } + + get balance () { + return this.defaultAccount ? this.defaultAccount.balance : null; + } + + get hasSeen () { + return this._hasSeen; + } + + get defaultAccountIdx () { + return this._defaultAccountIdx; + } + + get defaultAccount () { + return this.accounts[this.defaultAccountIdx]; + } + + get accounts () { + return this._accounts; + } + + get legacyAccount () { + return this._legacyAccount; + } + + get activeAccounts () { + return this.accounts.filter(a => !a.archived); + } + + get activeAccountsWithLegacy () { + return this.legacyAccount + ? this.activeAccounts.concat(this.legacyAccount) + : this.activeAccounts; + } + + get latestBlock () { + return this._latestBlock; + } + + get lastTx () { + return this._lastTx; + } + + get defaults () { + return { + GAS_PRICE: EthTxBuilder.GAS_PRICE, + GAS_LIMIT: EthTxBuilder.GAS_LIMIT + }; + } + + get txs () { + let accounts = this.activeAccountsWithLegacy; + return dedup(accounts.map(a => a.txs), 'hash').sort(EthWalletTx.txTimeSort); + } + + getApproximateBalance () { + if (!this.defaultAccount && !this.legacyAccount) return null; + let balance = 0; + if (this.defaultAccount) { + balance += parseFloat(this.defaultAccount.getApproximateBalance()); + } + if (this.legacyAccount) { + balance += parseFloat(this.legacyAccount.getApproximateBalance()); + } + return balance.toFixed(8); + } + + getAccount (index) { + let account = this.accounts[index]; + if (!account) throw new Error(`Account ${index} does not exist`); + return account; + } + + setAccountLabel (index, label) { + this.getAccount(index).label = label; + this.sync(); + } + + archiveAccount (account) { + if (account === this.defaultAccount) { + throw new Error('Cannot archive default account'); + } + account.archived = true; + this.sync(); + } + + unarchiveAccount (account) { + account.archived = false; + this._socket.subscribeToAccount(this, account); + this.sync(); + } + + createAccount (label, secPass) { + let accountNode = this.deriveChild(this.accounts.length, secPass); + let account = EthAccount.fromWallet(accountNode.getWallet()); + account.label = label || EthAccount.defaultLabel(this.accounts.length); + account.markAsCorrect(); + this._accounts.push(account); + this._socket.subscribeToAccount(this, account, this.legacyAccount); + return this.sync(); + } + + getTxNote (hash) { + return this._txNotes[hash] || null; + } + + setTxNote (hash, note) { + if (note === null || note === '') { + delete this._txNotes[hash]; + } else if (typeof note !== 'string') { + throw new Error('setTxNote note must be a string or null'); + } else { + this._txNotes[hash] = note; + } + this.updateTxs(); + this.sync(); + } + + setLastTx (tx) { + this._lastTx = tx; + this.sync(); + } + + setHasSeen (hasSeen) { + this._hasSeen = hasSeen; + this.sync(); + } + + setDefaultAccountIndex (i) { + if (!isPositiveNumber(i)) { + throw new Error('Account index must be a number >= 0'); + } else if (i >= this.accounts.length) { + throw new Error('Account index out of bounds'); + } else if (this._defaultAccountIdx === i) { + return; + } else { + this._defaultAccountIdx = i; + this.sync(); + } + } + + fetch () { + return this._metadata.fetch().then((data) => { + if (data) { + let constructAccount = construct(EthAccount); + let { ethereum } = data; + this._hasSeen = ethereum.has_seen; + this._defaultAccountIdx = ethereum.default_account_idx; + this._accounts = ethereum.accounts.map(constructAccount); + this._txNotes = ethereum.tx_notes || {}; + this._lastTx = ethereum.last_tx; + if (ethereum.legacy_account) { + this._legacyAccount = constructAccount(ethereum.legacy_account); + } + } + }); + } + + sync () { + let data = { ethereum: this }; + return this._metadata.update(data); + } + + toJSON () { + return { + has_seen: this._hasSeen, + default_account_idx: this._defaultAccountIdx, + accounts: this._accounts, + legacy_account: this._legacyAccount, + tx_notes: this._txNotes, + last_tx: this._lastTx + }; + } + + fetchHistory () { + return Promise.all([this.fetchBalance(), this.fetchTransactions()]) + .then(() => this.getLatestBlock()); + } + + fetchBalance () { + let accounts = this.activeAccountsWithLegacy; + if (!accounts.length) return Promise.resolve(); + let addresses = accounts.map(a => a.address); + return fetch(`${API.API_ROOT_URL}eth/account/${addresses.join()}/balance`) + .then(r => r.status === 200 ? r.json() : r.json().then(e => Promise.reject(e))) + .then(data => accounts.forEach(a => a.setData(data[a.address]))); + } + + fetchTransactions () { + let accounts = this.activeAccountsWithLegacy; + if (!accounts.length) return Promise.resolve(); + let addresses = accounts.map(a => a.address); + return fetch(`${API.API_ROOT_URL}eth/account/${addresses.join()}`) + .then(r => r.status === 200 ? r.json() : r.json().then(e => Promise.reject(e))) + .then(data => { + accounts.forEach(a => a.setTransactions(data[a.address])); + this.updateTxs(); + }); + } + + fetchFees () { + return EthTxBuilder.fetchFees(); + } + + isContractAddress (address) { + return fetch(`${API.API_ROOT_URL}eth/account/${address}/isContract`) + .then(r => r.status === 200 ? r.json() : r.json().then(e => Promise.reject(e))) + .then(({ contract }) => contract); + } + + getLatestBlock () { + return fetch(`${API.API_ROOT_URL}eth/latestblock`) + .then(r => r.status === 200 ? r.json() : r.json().then(e => Promise.reject(e))) + .then(block => this.setLatestBlock(block.number)); + } + + setLatestBlock (blockNumber) { + this._latestBlock = blockNumber; + this.updateTxs(); + } + + connect (wsUrl) { + if (this._socket) return; + this._socket = new EthSocket(wsUrl, WebSocket); + this._socket.on('open', () => this.setSocketHandlers()); + this._socket.on('close', () => this.setSocketHandlers()); + } + + setSocketHandlers () { + this._socket.subscribeToBlocks(this); + this.activeAccounts.forEach(a => this._socket.subscribeToAccount(this, a, this.legacyAccount)); + } + + updateTxs () { + this.activeAccountsWithLegacy.forEach(a => a.updateTxs(this)); + } + + getPrivateKeyForAccount (account, secPass) { + let index = this.accounts.indexOf(account); + let wallet = this.deriveChild(index, secPass).getWallet(); + let privateKey = wallet.getPrivateKey(); + if (!account.isCorrectPrivateKey(privateKey)) { + throw new Error('Failed to derive correct private key'); + } + return privateKey; + } + + deriveChild (index, secPass) { + let w = this._wallet; + let cipher; + if (w.isDoubleEncrypted) { + if (!secPass) throw new Error('Second password required to derive ethereum wallet'); + else cipher = w.createCipher(secPass); + } + let masterHdNode = w.hdwallet.getMasterHDNode(cipher); + let accountNode = masterHdNode + .deriveHardened(44) + .deriveHardened(60) + .deriveHardened(0) + .derive(0) + .derive(index); + return EthHd.fromExtendedKey(accountNode.toBase58()); + } + + /* start legacy */ + + getPrivateKeyForLegacyAccount (secPass) { + let account = this._legacyAccount; + if (!account) { + throw new Error('Wallet does not contain a beta account'); + } + let wallet = this.deriveChildLegacy(0, secPass).getWallet(); + let privateKey = wallet.getPrivateKey(); + if (!account.isCorrectPrivateKey(privateKey)) { + throw new Error('Failed to derive correct private key'); + } + return privateKey; + } + + deriveChildLegacy (index, secPass) { + let w = this._wallet; + if (w.isDoubleEncrypted && !secPass) { + throw new Error('Second password required to derive ethereum wallet'); + } + let getSeedHex = w.isDoubleEncrypted ? w.createCipher(secPass, 'dec') : x => x; + let seed = getSeedHex(w.hdwallet.seedHex); + return EthHd.fromMasterSeed(seed).derivePath(DERIVATION_PATH).deriveChild(index); + } + + needsTransitionFromLegacy () { + let shouldSweepAccount = (account) => ( + account.fetchBalance() + .then(() => account.getAvailableBalance()) + .then(({ amount }) => amount > 0) + ); + + if (this.defaultAccount && !this.defaultAccount.isCorrect) { + /* + If user has an eth account and the account is not marked as + correct, check if they should sweep. + */ + return shouldSweepAccount(this.defaultAccount); + } else if (this.legacyAccount) { + /* + If user has a legacy eth account saved, we should still check + if the account needs to be swept in case funds were received after + the previous transition. + */ + return shouldSweepAccount(this.legacyAccount); + } else { + /* + Default account is up to date and there is no legacy account, + do nothing. + */ + return Promise.resolve(false); + } + } + + transitionFromLegacy () { + if (this.defaultAccount && !this.defaultAccount.isCorrect) { + this._legacyAccount = this.getAccount(0); + this._accounts = []; + return this.sync(); + } else { + return Promise.resolve(); + } + } + + sweepLegacyAccount (secPass, { gasPrice = EthTxBuilder.GAS_PRICE, gasLimit = EthTxBuilder.GAS_LIMIT } = {}) { + if (!this.legacyAccount) { + return Promise.reject(new Error('Must transition from Beta account first')); + } + + let defaultAccountP = this.defaultAccount == null + ? Promise.resolve().then(() => this.createAccount(void 0, secPass)) + : Promise.resolve(); + + return defaultAccountP + .then(() => this.legacyAccount.getAvailableBalance()) + .then(({ amount }) => { + if (amount > 0) { + let payment = this.legacyAccount.createPayment(); + let privateKey = this.getPrivateKeyForLegacyAccount(secPass); + payment.setGasPrice(gasPrice); + payment.setGasLimit(gasLimit); + payment.setTo(this.defaultAccount.address); + payment.setSweep(); + payment.sign(privateKey); + return payment.publish(); + } else { + throw new Error('No funds in account to sweep'); + } + }); + } + + __transitionToLegacy (secPass) { + delete this._legacyAccount; + let accountNode = this.deriveChildLegacy(0, secPass); + let account = EthAccount.fromWallet(accountNode.getWallet()); + account.label = EthAccount.defaultLabel(0); + this._accounts = [account]; + this._socket.subscribeToAccount(this, account); + return this.sync(); + } + + /* end legacy */ + + static fromBlockchainWallet (wallet) { + let metadata = wallet.metadata(METADATA_TYPE_ETH); + return new EthWallet(wallet, metadata); + } +} + +module.exports = EthWallet; diff --git a/src/exchange-delegate.js b/src/exchange-delegate.js index 8d9a414d1..f2fc6a71d 100644 --- a/src/exchange-delegate.js +++ b/src/exchange-delegate.js @@ -156,7 +156,9 @@ ExchangeDelegate.prototype.reserveReceiveAddress = function () { } trade._account_index = account.index; trade._receive_index = reservation.receiveIndex; - reservation.commit(`${self.labelBase} #${trade.id}`); + let id = trade.tradeSubscriptionId || trade.id; + let label = trade.tradeSubscriptionId ? 'Recurring Order' : self.labelBase; + reservation.commit(`${label} #${id}`); } }; }; diff --git a/src/external.js b/src/external.js index 63eeaeecb..8b7cf08d7 100644 --- a/src/external.js +++ b/src/external.js @@ -1,5 +1,6 @@ var Coinify = require('bitcoin-coinify-client'); var SFOX = require('bitcoin-sfox-client'); +var Unocoin = require('bitcoin-unocoin-client'); var Metadata = require('./metadata'); var ExchangeDelegate = require('./exchange-delegate'); var Helpers = require('./helpers'); @@ -11,6 +12,7 @@ module.exports = External; function External (metadata, wallet, object) { this._coinify = undefined; this._sfox = undefined; + this._unocoin = undefined; this._wallet = wallet; this._metadata = metadata; @@ -25,6 +27,11 @@ function External (metadata, wallet, object) { this._sfox = new SFOX(object.sfox, sfoxDelegate); sfoxDelegate.trades = this._sfox.trades; } + if (object.unocoin) { + var unocoinDelegate = new ExchangeDelegate(wallet); + this._unocoin = new Unocoin(object.unocoin, unocoinDelegate); + unocoinDelegate.trades = this._unocoin.trades; + } } } @@ -51,11 +58,23 @@ Object.defineProperties(External.prototype, { return this._sfox; } }, + 'unocoin': { + configurable: false, + get: function () { + if (!this._unocoin) { + var delegate = new ExchangeDelegate(this._wallet); + this._unocoin = Unocoin.new(delegate); + delegate.trades = this._unocoin.trades; + } + return this._unocoin; + } + }, 'hasExchangeAccount': { configurable: false, get: function () { - return (this._coinify && this._coinify.hasAccount) || - (this._sfox && this._sfox.hasAccount) || false; + return (this._coinify && this._coinify.hasAccount && 'coinify') || + (this._unocoin && this._unocoin.hasAccount && 'unocoin') || + (this._sfox && this._sfox.hasAccount && 'sfox') || false; } } }); @@ -81,7 +100,7 @@ External.prototype.shouldDisplaySellTab = function (email, options, partner) { let re = /(@blockchain.com(?!.)|@coinify.com(?!.))/; let isClearedEmail = re.test(email); let fraction = options.partners[partner].showSellFraction; - return isClearedEmail || Helpers.isEmailInvited(email, fraction); + return isClearedEmail || Helpers.isStringHashInFraction(email, fraction); }; External.prototype.toJSON = function () { @@ -90,7 +109,8 @@ External.prototype.toJSON = function () { } var external = { coinify: this._coinify, - sfox: this._sfox + sfox: this._sfox, + unocoin: this._unocoin }; return external; }; @@ -138,4 +158,5 @@ External.prototype.wipe = function () { this._metadata.update({}); this._coinify = undefined; this._sfox = undefined; + this._unocoin = undefined; }; diff --git a/src/hd-account.js b/src/hd-account.js index a8642723e..f726bc028 100644 --- a/src/hd-account.js +++ b/src/hd-account.js @@ -5,7 +5,10 @@ var assert = require('assert'); var Helpers = require('./helpers'); var KeyRing = require('./keyring'); var MyWallet = require('./wallet'); // This cyclic import should be avoided once the refactor is complete +var API = require('./api'); +var Transaction = require('./transaction'); var constants = require('./constants'); +var BtcShiftPayment = require('./shift/btc-payment'); // HDAccount Class @@ -133,11 +136,11 @@ Object.defineProperties(HDAccount.prototype, { }, 'receiveAddress': { configurable: false, - get: function () { return this._keyRing.receive.getAddress(this.receiveIndex); } + get: function () { return this.receiveAddressAtIndex(this.receiveIndex); } }, 'changeAddress': { configurable: false, - get: function () { return this._keyRing.change.getAddress(this._changeIndex); } + get: function () { return this.changeAddressAtIndex(this.changeIndex); } }, 'isEncrypted': { configurable: false, @@ -150,6 +153,10 @@ Object.defineProperties(HDAccount.prototype, { 'index': { configurable: false, get: function () { return this._index; } + }, + 'coinCode': { + configurable: false, + get: function () { return 'btc'; } } }); @@ -228,6 +235,11 @@ HDAccount.prototype.receiveAddressAtIndex = function (index) { return this._keyRing.receive.getAddress(index); }; +HDAccount.prototype.changeAddressAtIndex = function (index) { + assert(Helpers.isPositiveInteger(index), 'Error: change index must be a positive integer'); + return this._keyRing.change.getAddress(index); +}; + HDAccount.prototype.encrypt = function (cipher) { if (!this._xpriv) return this; var xpriv = cipher ? cipher(this._xpriv) : this._xpriv; @@ -287,6 +299,7 @@ HDAccount.prototype.setLabel = function (receiveIndex, label) { } labelEntry.label = label; + MyWallet.syncWallet(); }; HDAccount.prototype.removeLabel = function (receiveIndex) { @@ -294,3 +307,19 @@ HDAccount.prototype.removeLabel = function (receiveIndex) { let labelEntry = labels.find((label) => label.index === receiveIndex); labels.splice(labels.indexOf(labelEntry), 1); }; + +HDAccount.prototype.getAvailableBalance = function (feeType) { + feeType = (feeType === 'regular' || feeType === 'priority') ? feeType : 'regular'; + let feesP = API.getFees(); + let coinsP = API.getUnspent([this.extendedPublicKey]).then(Helpers.pluck('unspent_outputs')); + return Promise.all([feesP, coinsP]).then(([fees, coins]) => { + let fee = Helpers.toFeePerKb(fees[feeType]); + let usableCoins = Transaction.filterUsableCoins(coins, fee); + let amount = Transaction.maxAvailableAmount(usableCoins, fee).amount; + return { amount, fee: fees[feeType] }; + }); +}; + +HDAccount.prototype.createShiftPayment = function (wallet) { + return BtcShiftPayment.fromWallet(wallet, this); +}; diff --git a/src/hd-wallet.js b/src/hd-wallet.js index 0a78c75a0..1832e542e 100644 --- a/src/hd-wallet.js +++ b/src/hd-wallet.js @@ -4,10 +4,16 @@ module.exports = HDWallet; var Bitcoin = require('bitcoinjs-lib'); var assert = require('assert'); +var R = require('ramda'); var Helpers = require('./helpers'); var HDAccount = require('./hd-account'); var BIP39 = require('bip39'); var MyWallet = require('./wallet'); // This cyclic import should be avoided once the refactor is complete +var API = require('./api'); +var { addIndexToOutput } = require('./bch/bch-api'); +var { selectAll } = require('./coin-selection'); +var signer = require('./signer'); +var Coin = require('./coin'); var constants = require('./constants'); function HDWallet (object) { @@ -280,3 +286,22 @@ HDWallet.prototype.persist = function () { HDWallet.prototype.isValidAccountIndex = function (index) { return Helpers.isPositiveInteger(index) && index < this._accounts.length; }; + +HDWallet.prototype.createConsolidationPayment = function (toAccount, feePerByte, secPass) { + let outputToCoin = R.compose(Coin.fromJS, addIndexToOutput(this)); + + let createPayment = (selection, tx) => ({ + get fee () { return selection.fee; }, + publish () { return API.pushTx(tx.toHex()).then(() => ({ hash: tx.getId() })); } + }); + + let paymentFromCoins = (coins) => { + let selection = selectAll(feePerByte, coins, toAccount.receiveAddress); + let tx = signer.signBitcoin(secPass, MyWallet.wallet, selection); + return createPayment(selection, tx); + }; + + return API.getUnspent(this.xpubs) + .then(result => R.map(outputToCoin, result.unspent_outputs)) + .then(paymentFromCoins); +}; diff --git a/src/helpers.js b/src/helpers.js index a91bba8d8..6251ac2a7 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -5,6 +5,8 @@ var BigInteger = require('bigi'); var Buffer = require('buffer').Buffer; var Base58 = require('bs58'); var BIP39 = require('bip39'); +var BigNumber = require('bignumber.js'); +var ethUtil = require('ethereumjs-util'); var ImportExport = require('./import-export'); var constants = require('./constants'); var WalletCrypo = require('./wallet-crypto'); @@ -79,6 +81,9 @@ Helpers.isValidLabel = function (text) { Helpers.isInRange = function (val, min, max) { return min <= val && val < max; }; +Helpers.isNonNull = function (val) { + return val !== null; +}; Helpers.add = function (x, y) { return x + y; }; @@ -133,11 +138,22 @@ Helpers.isEmptyObject = function (x) { Helpers.isEmptyArray = function (x) { return Array.isArray(x) && x.length === 0; }; + +Helpers.defer = function () { + let deferred = {}; + deferred.promise = new Promise((resolve, reject) => { + deferred.resolve = resolve; + deferred.reject = reject; + }); + return deferred; +}; + // Return an async version of f that it will run after miliseconds // no matter how many times you call the new function, it will run only once Helpers.asyncOnce = function (f, milliseconds, before) { var timer = null; var oldArguments = []; + var deferred = null; trigger.cancel = function () { clearTimeout(timer); @@ -146,15 +162,25 @@ Helpers.asyncOnce = function (f, milliseconds, before) { function trigger () { trigger.cancel(); before && before(); + deferred = deferred || Helpers.defer(); var myArgs = []; + var promise = deferred.promise; // this is needed because arguments is not an 'Array' instance for (var i = 0; i < arguments.length; i++) { myArgs[i] = arguments[i]; } myArgs = Helpers.zipLong(Helpers.maybeCompose, myArgs, oldArguments); oldArguments = myArgs; timer = setTimeout(function () { - f.apply(this, myArgs); - oldArguments = []; + try { + let result = f.apply(this, myArgs); + deferred.resolve(result); + } catch (e) { + deferred.reject(e); + } finally { + oldArguments = []; + deferred = null; + } }, milliseconds); + return promise; } return trigger; @@ -322,9 +348,10 @@ function parseMiniKey (miniKey) { return Bitcoin.crypto.sha256(miniKey); } -Helpers.privateKeyStringToKey = function (value, format) { +Helpers.privateKeyStringToKey = function (value, format, bitcoinjs) { + var bitcoinLib = bitcoinjs || Bitcoin; if (format === 'sipa' || format === 'compsipa') { - return Bitcoin.ECPair.fromWIF(value, constants.getNetwork()); + return bitcoinLib.ECPair.fromWIF(value, constants.getNetwork(bitcoinLib)); } else { var keyBuffer = null; @@ -346,7 +373,7 @@ Helpers.privateKeyStringToKey = function (value, format) { } var d = BigInteger.fromBuffer(keyBuffer); - return new Bitcoin.ECPair(d, null, { network: constants.getNetwork() }); + return new bitcoinLib.ECPair(d, null, { network: constants.getNetwork(bitcoinLib) }); } }; @@ -407,10 +434,8 @@ Helpers.isValidBIP39Mnemonic = function (mnemonic) { Helpers.isValidPrivateKey = function (candidate) { try { - var format = Helpers.detectPrivateKeyFormat(candidate); - if (format === 'bip38') { return true; } - var key = Helpers.privateKeyStringToKey(candidate, format); - return key.getAddress(); + let format = Helpers.detectPrivateKeyFormat(candidate); + return format === 'bip38' || Helpers.privateKeyStringToKey(candidate, format) != null; } catch (e) { return false; } @@ -459,8 +484,8 @@ Helpers.getMobileOperatingSystem = function () { } }; -Helpers.isEmailInvited = function (email, fraction) { - if (!email) { +Helpers.isStringHashInFraction = function (str, fraction) { + if (!str) { return false; } if (!Helpers.isPositiveNumber(fraction)) { @@ -469,7 +494,7 @@ Helpers.isEmailInvited = function (email, fraction) { if (fraction > 1) { return false; } - return WalletCrypo.sha256(email)[0] / 256 >= 1 - fraction; + return WalletCrypo.sha256(str)[0] / 256 >= 1 - fraction; }; // Helpers.isFeeOptions :: object => Boolean @@ -516,4 +541,100 @@ Helpers.deepClone = function (object) { return JSON.parse(JSON.stringify(object)); }; +Helpers.addressesePerAccount = function (n) { + switch (true) { + case n > 0 && n < 4: + return 20; + case n > 3 && n < 7: + return 15; + case n > 6 && n < 11: + return 10; + case n > 10 && n < 21: + return 5; + case n > 20 && n < 31: + return 3; + case n > 30 && n < 51: + return 2; + default: + return 1; + } +}; + +Helpers.delay = (time) => new Promise((resolve) => { + setTimeout(resolve, time); +}); + +Helpers.dedup = (nested, prop) => ( + nested.reduce(({ seen, result }, next) => { + let unseen = next.filter(x => !seen[x[prop]]); + unseen.forEach(x => { seen[x[prop]] = true; }); + return { seen, result: result.concat(unseen) }; + }, { seen: {}, result: [] }).result +); + +const etherUnits = { + kwei: new BigNumber(1e3), + mwei: new BigNumber(1e6), + gwei: new BigNumber(1e9), + szabo: new BigNumber(1e12), + finney: new BigNumber(1e15), + ether: new BigNumber(1e18) +}; + +Helpers.toWei = function (x, unit) { + unit = unit || 'ether'; + if (!etherUnits[unit]) { + throw new Error(`Unsupported ether unit in toWei: ${unit}`); + } + let result = Helpers.toBigNumber(x).mul(etherUnits[unit]).floor(); + return Helpers.isBigNumber(x) ? result : result.toString(); +}; + +Helpers.fromWei = function (x, unit) { + unit = unit || 'ether'; + if (!etherUnits[unit]) { + throw new Error(`Unsupported ether unit in fromWei: ${unit}`); + } + let result = Helpers.toBigNumber(x).div(etherUnits[unit]); + return Helpers.isBigNumber(x) ? result : result.toString(); +}; + +Helpers.isBigNumber = function (x) { + return x instanceof BigNumber; +}; + +Helpers.toBigNumber = function (x) { + return Helpers.isBigNumber(x) ? x : new BigNumber((x || 0).toString()); +}; + +Helpers.bnMax = function (a, b) { + return BigNumber.max(a, b); +}; + +Helpers.bnToBuffer = function (bn) { + let hex = bn.toString(16); + if (hex.length % 2 !== 0) hex = '0' + hex; + return Buffer.from(hex, 'hex'); +}; + +Helpers.isEtherAddress = function (address) { + return ( + ethUtil.isValidChecksumAddress(address) || + ( + ethUtil.isValidAddress(address) && + ethUtil.stripHexPrefix(address).toLowerCase() === ethUtil.stripHexPrefix(address) + ) || + ( + ethUtil.isValidAddress(address) && + ethUtil.stripHexPrefix(address).toUpperCase() === ethUtil.stripHexPrefix(address) + ) + ); +}; + +Helpers.trace = (...args) => { + if (process.env.NODE_ENV === 'dev') { + console.log(...args); + } +}; + module.exports = Helpers; diff --git a/index.js b/src/index.js similarity index 56% rename from index.js rename to src/index.js index 30c7ef7c5..f99f87890 100644 --- a/index.js +++ b/src/index.js @@ -25,25 +25,25 @@ try { module.exports = { Buffer: Buffer, - MyWallet: require('./src/wallet'), - WalletStore: require('./src/wallet-store'), - WalletCrypto: require('./src/wallet-crypto'), - Payment: require('./src/payment'), - ImportExport: require('./src/import-export'), - BlockchainSettingsAPI: require('./src/blockchain-settings-api'), - Helpers: require('./src/helpers'), - API: require('./src/api'), - Tx: require('./src/wallet-transaction'), - WalletTokenEndpoints: require('./src/wallet-token-endpoints'), - WalletNetwork: require('./src/wallet-network'), - RNG: require('./src/rng'), - Transaction: require('./src/transaction'), - Address: require('./src/address'), - Metadata: require('./src/metadata'), + MyWallet: require('./wallet'), + WalletStore: require('./wallet-store'), + WalletCrypto: require('./wallet-crypto'), + Payment: require('./payment'), + ImportExport: require('./import-export'), + BlockchainSettingsAPI: require('./blockchain-settings-api'), + Helpers: require('./helpers'), + API: require('./api'), + Tx: require('./wallet-transaction'), + WalletTokenEndpoints: require('./wallet-token-endpoints'), + WalletNetwork: require('./wallet-network'), + RNG: require('./rng'), + Transaction: require('./transaction'), + Address: require('./address'), + Metadata: require('./metadata'), Bitcoin: require('bitcoinjs-lib'), - External: require('./src/external'), - BuySell: require('./src/buy-sell'), - constants: require('./src/constants'), + External: require('./external'), + BuySell: require('./buy-sell'), + constants: require('./constants'), BigInteger: require('bigi/lib'), BIP39: require('bip39'), Networks: require('bitcoinjs-lib/src/networks'), diff --git a/src/keychain.js b/src/keychain.js index e8165e81a..cf14ff59e 100644 --- a/src/keychain.js +++ b/src/keychain.js @@ -8,7 +8,8 @@ var Helpers = require('./helpers'); var constants = require('./constants'); // keychain -function KeyChain (extendedKey, index, cache) { +function KeyChain (extendedKey, index, cache, bitcoinjs) { + this._Bitcoin = bitcoinjs || Bitcoin; this._chainRoot = null; this.init(extendedKey, index, cache); @@ -41,10 +42,10 @@ KeyChain.prototype.init = function (extendedKey, index, cache) { // if cache is defined we use it to recreate the chain // otherwise we generate it using extendedKey and index if (cache) { - this._chainRoot = Bitcoin.HDNode.fromBase58(cache, constants.getNetwork()); + this._chainRoot = this._Bitcoin.HDNode.fromBase58(cache, constants.getNetwork(this._Bitcoin)); } else { this._chainRoot = extendedKey && Helpers.isPositiveInteger(index) && index >= 0 - ? Bitcoin.HDNode.fromBase58(extendedKey, constants.getNetwork()).derive(index) : undefined; + ? this._Bitcoin.HDNode.fromBase58(extendedKey, constants.getNetwork(this._Bitcoin)).derive(index) : undefined; } return this; }; diff --git a/src/keyring.js b/src/keyring.js index fb6f9c4b0..1fb8096b5 100644 --- a/src/keyring.js +++ b/src/keyring.js @@ -3,11 +3,13 @@ module.exports = KeyRing; var assert = require('assert'); +var Bitcoin = require('bitcoinjs-lib'); var KeyChain = require('./keychain'); // keyring: A collection of keychains -function KeyRing (extendedKey, cache) { +function KeyRing (extendedKey, cache, bitcoinjs) { + this._bitcoinjs = bitcoinjs || Bitcoin; this._receiveChain = null; this._changeChain = null; this.init(extendedKey, cache); @@ -29,9 +31,9 @@ KeyRing.prototype.init = function (extendedKey, cache) { if (this._receiveChain && this._changeChain) return this; if (extendedKey || cache.receiveAccount && cache.changeAccount) { this._receiveChain = cache.receiveAccount - ? new KeyChain(null, null, cache.receiveAccount) : new KeyChain(extendedKey, 0); + ? new KeyChain(null, null, cache.receiveAccount, this._bitcoinjs) : new KeyChain(extendedKey, 0, undefined, this._bitcoinjs); this._changeChain = cache.changeAccount - ? new KeyChain(null, null, cache.changeAccount) : new KeyChain(extendedKey, 1); + ? new KeyChain(null, null, cache.changeAccount, this._bitcoinjs) : new KeyChain(extendedKey, 1, undefined, this._bitcoinjs); } return this; }; diff --git a/src/payment.js b/src/payment.js index 7502d2e4a..1f08cf23b 100644 --- a/src/payment.js +++ b/src/payment.js @@ -356,6 +356,9 @@ Payment.updateFees = function () { Payment.updateFeePerKb = function (fee) { return function (payment) { + if (['regular', 'priority'].indexOf(fee) > -1) { + fee = payment.fees[fee]; + } payment.feePerKb = Helpers.toFeePerKb(fee); return Promise.resolve(payment); }; diff --git a/src/shift/README.md b/src/shift/README.md new file mode 100644 index 000000000..8165afc75 --- /dev/null +++ b/src/shift/README.md @@ -0,0 +1,52 @@ +# ShapeShift + +Blockchain wallet ShapeShift integration. + +## Usage + +ShapeShift is exposed as `MyWallet.wallet.shapeshift` + +The user's Metadata HD node must be cached for ShapeShift to work. + +## API + +### [ShapeShift](./index.js) + +#### `getRate(String: coinPair): Promise` + +MarketInfo example: + +``` +{ + "pair": "btc_eth", + "rate": 14.27292263, + "minerFee": 0.005, + "limit": 1.76000156, + "minimum": 0.000699, + "maxLimit": 1.76000156 +} +``` + +#### `getQuote(String: coinPair, Number: amount): Promise` + +Where `amount` is an amount in Bitcoin or Ether. + +#### `shift(Quote: quote, String?: secPass): Promise` + +Must be passed a second password if the wallet is double encrypted. + +#### `watchTradeForCompletion(Trade: trade, { Number: pollTime }): Promise` + +Polls a pending trade until it's completed. Optional `pollTime` to change polling rate, defaults to `1000` (ms). + +#### `updateTradeStatus(Trade: trade): Promise` + +Updates the status of a trade. + +### [Quote](./quote.js) + +Simple data object for quotes. + +### [Trade](./trade.js) + +Simple data object for trades. diff --git a/src/shift/api.js b/src/shift/api.js new file mode 100644 index 000000000..12796593b --- /dev/null +++ b/src/shift/api.js @@ -0,0 +1,40 @@ +/* eslint-disable semi */ +class Api { + constructor (apiKey) { + this._ssUrl = 'https://shapeshift.io' + this._apiKey = apiKey + } + + getRate (pair) { + return this.request('/marketinfo/' + pair, 'GET') + .then(res => res.error != null ? Promise.reject(res.error) : (res.success || res)) + } + + getQuote (pair, amount, withdrawal, returnAddress) { + let apiKey = this._apiKey + let depositAmount = amount > 0 ? amount.toString() : undefined + let withdrawalAmount = amount < 0 ? -amount.toString() : undefined + return this.request('/sendamount', 'POST', + { pair, withdrawalAmount, depositAmount, withdrawal, returnAddress, apiKey }) + .then(res => res.error != null ? Promise.reject(res.error) : (res.success || res)) + } + + getTradeStatus (address) { + return this.request('/txStat/' + address, 'GET') + } + + request (endpoint, method, data) { + let body + let headers = {} + + if (method === 'POST') { + body = JSON.stringify(data || {}) + headers['Content-Type'] = 'application/json' + } + + return fetch(this._ssUrl + endpoint, { method, headers, body }) + .then(res => res.status === 200 ? res.json() : res.json().then(e => Promise.reject(e))) + } +} + +module.exports = Api diff --git a/src/shift/bch-payment.js b/src/shift/bch-payment.js new file mode 100644 index 000000000..7fcf32ead --- /dev/null +++ b/src/shift/bch-payment.js @@ -0,0 +1,32 @@ +/* eslint-disable semi */ +const ShiftPayment = require('./shift-payment') + +class BchPayment extends ShiftPayment { + constructor (wallet, account) { + super() + this._wallet = wallet + this._payment = account.createPayment() + } + + setFromQuote (quote, feePerByte) { + super.setFromQuote(quote) + this._payment.to(quote.depositAddress) + this._payment.amount(Math.round(parseFloat(quote.depositAmount) * 1e8)) + this._payment.feePerByte(feePerByte) + this._payment.build() + return this + } + + getFee () { + return new Promise(resolve => { + this._payment.sideEffect(payment => resolve(payment.selection.fee)) + }) + } + + publish (secPass) { + this._payment.sign(secPass) + return this._payment.publish() + } +} + +module.exports = BchPayment diff --git a/src/shift/btc-payment.js b/src/shift/btc-payment.js new file mode 100644 index 000000000..b0ddf3c02 --- /dev/null +++ b/src/shift/btc-payment.js @@ -0,0 +1,34 @@ +/* eslint-disable semi */ +const ShiftPayment = require('./shift-payment') + +class BtcPayment extends ShiftPayment { + constructor (wallet, account) { + super() + this._payment = wallet.createPayment() + this._payment.from(account.index) + } + + setFromQuote (quote, fee = 'priority') { + super.setFromQuote(quote) + this._payment.to(quote.depositAddress) + this._payment.amount(Math.round(parseFloat(quote.depositAmount) * 1e8)) + this._payment.updateFeePerKb(fee) + this._payment.build() + return this + } + + getFee () { + return new Promise(resolve => { + this._payment.sideEffect(payment => resolve(payment.finalFee)) + }) + } + + publish (secPass) { + this._payment.sign(secPass) + return this._payment.publish().then(response => ({ + hash: response.txid + })) + } +} + +module.exports = BtcPayment diff --git a/src/shift/eth-payment.js b/src/shift/eth-payment.js new file mode 100644 index 000000000..da4eaa2bf --- /dev/null +++ b/src/shift/eth-payment.js @@ -0,0 +1,36 @@ +/* eslint-disable semi */ +const ShiftPayment = require('./shift-payment') + +class EthPayment extends ShiftPayment { + constructor (wallet, account) { + super() + this._wallet = wallet + this._eth = wallet.eth + this._payment = account.createPayment() + } + + setFromQuote (quote) { + super.setFromQuote(quote) + this._payment.setTo(quote.depositAddress) + this._payment.setValue(quote.depositAmount) + this._payment.setGasPrice(this._eth.defaults.GAS_PRICE) + this._payment.setGasLimit(this._eth.defaults.GAS_LIMIT) + return this + } + + getFee () { + return new Promise(resolve => { + resolve(parseFloat(this._payment.fee)) + }) + } + + publish (secPass) { + let privateKey = this._eth.getPrivateKeyForAccount(this._eth.defaultAccount, secPass) + this._payment.sign(privateKey) + return this._payment.publish().then(response => ({ + hash: response.txHash + })) + } +} + +module.exports = EthPayment diff --git a/src/shift/index.js b/src/shift/index.js new file mode 100644 index 000000000..53412bdd8 --- /dev/null +++ b/src/shift/index.js @@ -0,0 +1,155 @@ +/* eslint-disable semi */ +const { delay, asyncOnce, trace } = require('../helpers') +const Api = require('./api') +const Trade = require('./trade') +const Quote = require('./quote') + +const METADATA_TYPE_SHAPE_SHIFT = 6; + +class ShapeShift { + constructor (wallet, metadata, apiKey) { + this._wallet = wallet + this._metadata = metadata + this._api = new Api(apiKey) + this._trades = [] + this.sync = asyncOnce(this.sync.bind(this), 500) + } + + get trades () { + return this._trades + } + + get USAState () { + return this._USAState + } + + getRate (coinPair) { + trace('getting rate') + return this._api.getRate(coinPair) + } + + getQuote (from, to, amount) { + trace('getting quote') + + let returnAddress = from.receiveAddress; + let withdrawalAddress = to.receiveAddress; + let coinPair = from.coinCode + '_' + to.coinCode; + + return this._api.getQuote(coinPair, amount, withdrawalAddress, returnAddress) + .then(Quote.fromApiResponse) + } + + getApproximateQuote (from, to, amount) { + trace('getting approximate quote') + + let coinPair = from.coinCode + '_' + to.coinCode; + + return this._api.getQuote(coinPair, amount) + .then(Quote.fromApiResponse) + } + + buildPayment (quote, fee, fromAccount) { + trace('building payment') + if (quote.depositAddress == null) { + throw new Error('Quote is missing deposit address') + } + if (fromAccount.coinCode !== quote.fromCurrency) { + throw new Error('Sending account currency does not match quote deposit currency') + } + let payment = fromAccount.createShiftPayment(this._wallet) + return payment.setFromQuote(quote, fee) + } + + shift (payment, secPass) { + trace('starting shift') + return payment.publish(secPass).then(({ hash }) => { + trace('finished shift') + if (payment.quote.toCurrency === 'btc') { + this.saveBtcWithdrawalLabel(payment.quote) + } + let trade = Trade.fromQuote(payment.quote) + trade.setDepositHash(hash) + this._trades.unshift(trade) + this.sync() + return trade + }) + } + + checkForCompletedTrades (onCompleted, { pollTime = 1000 } = {}) { + trace('checking for completed'); + let watchers = this.trades.filter(t => t.isPending).map(t => + this.watchTradeForCompletion(t, pollTime).then(onCompleted)) + return Promise.all(watchers).then(() => this.trades) + } + + watchTradeForCompletion (trade, { pollTime = 1000 } = {}) { + trace('watching trade for completion', trade) + return this.updateTradeDetails(trade).then(() => { + return trade.isPending + ? delay(pollTime).then(() => this.watchTradeForCompletion(trade)) + : Promise.resolve(trade) + }) + } + + updateTradeDetails (trade) { + return this._api.getTradeStatus(trade.depositAddress).then(status => { + let shouldSync = status.status !== trade.status + trade.setStatus(status) + if (shouldSync) this.sync() + return trade + }) + } + + fetchFullTrades () { + trace('fetching full trades') + let requests = this.trades.map(t => this.updateTradeDetails(t)) + return Promise.all(requests); + } + + saveBtcWithdrawalLabel (quote) { + let label = `ShapeShift order #${quote.orderId}` + let account = this._wallet.hdwallet.defaultAccount + account.setLabel(account.receiveIndex, label) + } + + setUSAState (state) { + this._USAState = state + this.sync() + } + + isDepositTx (hash) { + return this.trades.some(t => t.depositHash === hash) + } + + isWithdrawalTx (hash) { + return this.trades.filter(t => t.isComplete).some(t => t.withdrawalHash === hash) + } + + fetch () { + return this._metadata.fetch().then(data => { + if (data) { + this._USAState = data.USAState; + this._trades = data.trades.map(Trade.fromMetadata) + } + }) + } + + sync () { + trace('syncing') + return this._metadata.update(this) + } + + toJSON () { + return { + trades: this._trades, + USAState: this._USAState + } + } + + static fromBlockchainWallet (wallet, apiKey) { + let metadata = wallet.metadata(METADATA_TYPE_SHAPE_SHIFT); + return new ShapeShift(wallet, metadata, apiKey) + } +} + +module.exports = ShapeShift diff --git a/src/shift/quote.js b/src/shift/quote.js new file mode 100644 index 000000000..a814215bc --- /dev/null +++ b/src/shift/quote.js @@ -0,0 +1,90 @@ +/* eslint-disable semi */ +class Quote { + constructor (obj) { + this._orderId = obj.orderId + this._pair = obj.pair + this._deposit = obj.deposit + this._depositAmount = obj.depositAmount + this._withdrawal = obj.withdrawal + this._withdrawalAmount = obj.withdrawalAmount + this._minerFee = obj.minerFee + this._expiration = new Date(obj.expiration) + this._quotedRate = obj.quotedRate + } + + get orderId () { + return this._orderId + } + + get pair () { + return this._pair + } + + get rate () { + return this._quotedRate + } + + get expires () { + return this._expiration + } + + get depositAddress () { + return this._deposit + } + + get depositAmount () { + return this._depositAmount + } + + get withdrawalAddress () { + return this._withdrawal + } + + get withdrawalAmount () { + return this._withdrawalAmount + } + + get minerFee () { + return this._minerFee + } + + get fromCurrency () { + return this.pair.split('_')[0] + } + + get toCurrency () { + return this.pair.split('_')[1] + } + + setFieldsFromTxStat (response) { + this._pair = this._pair || [response.incomingType, response.outgoingType].join('_') + this._depositAmount = this._depositAmount || response.incomingCoin + this._withdrawal = this._withdrawal || response.withdraw + this._withdrawalAmount = this._withdrawalAmount || response.outgoingCoin + return this + } + + toJSON () { + return Object.assign(this.toPartialJSON(), { + pair: this._pair, + depositAmount: this._depositAmount, + withdrawal: this._withdrawal, + withdrawalAmount: this._withdrawalAmount + }) + } + + toPartialJSON () { + return { + orderId: this._orderId, + quotedRate: this._quotedRate, + deposit: this._deposit, + minerFee: this._minerFee + } + } + + static fromApiResponse (response) { + return new Quote(response) + } +} + +module.exports = Quote diff --git a/src/shift/shift-payment.js b/src/shift/shift-payment.js new file mode 100644 index 000000000..561420483 --- /dev/null +++ b/src/shift/shift-payment.js @@ -0,0 +1,16 @@ +/* eslint-disable semi */ +class ShiftPayment { + get quote () { + return this._quote + } + + setFromQuote (quote, _fee) { + this._quote = quote + } + + static fromWallet (wallet, account) { + return new this(wallet, account) + } +} + +module.exports = ShiftPayment diff --git a/src/shift/trade.js b/src/shift/trade.js new file mode 100644 index 000000000..8e3a6f71c --- /dev/null +++ b/src/shift/trade.js @@ -0,0 +1,166 @@ +/* eslint-disable semi */ +const Quote = require('./quote') +const { trace } = require('../helpers') + +class Trade { + constructor (obj) { + this._status = obj.status + this._error = obj.error + this._hashIn = obj.hashIn + this._hashOut = obj.hashOut + this._quote = obj.quote + + /* prefer `timestamp` if exists */ + if (obj.timestamp) { + this._time = new Date(obj.timestamp) + } else if (obj.time) { + this._time = new Date(obj.time) + } + } + + get quote () { + return this._quote + } + + get pair () { + return this._quote.pair + } + + get rate () { + return this._quote.rate + } + + get fromCurrency () { + return this._quote.fromCurrency + } + + get toCurrency () { + return this._quote.toCurrency + } + + get depositAddress () { + return this._quote.depositAddress + } + + get depositAmount () { + return this._quote.depositAmount + } + + get withdrawalAddress () { + return this._quote.withdrawalAddress + } + + get withdrawalAmount () { + return this._quote.withdrawalAmount + } + + get error () { + return this._error + } + + get status () { + return this._status + } + + get isPending () { + return this.isWaitingForDeposit || this.isProcessing + } + + get isWaitingForDeposit () { + return this._status === Trade.NO_DEPOSITS + } + + get isProcessing () { + return this._status === Trade.RECEIVED + } + + get isComplete () { + return this._status === Trade.COMPLETE + } + + get isFailed () { + return this._status === Trade.FAILED + } + + get isResolved () { + return this._status === Trade.RESOLVED + } + + get failedReason () { + return this._error + } + + get depositHash () { + return this._hashIn + } + + get withdrawalHash () { + return this._hashOut + } + + get time () { + return this._time + } + + setStatus (status) { + trace('setting trade status', this, status) + this._status = status.status + if (this.isComplete) { + this._hashOut = status.transaction + } + if (this.isFailed || this.isResolved) { + this._error = status.error + } + this.quote.setFieldsFromTxStat(status) + return this + } + + setDepositHash (hash) { + trace('setting deposit hash', this, hash) + this._hashIn = hash + return this + } + + toJSON () { + return { + status: this._status, + hashIn: this._hashIn, + hashOut: this._hashOut, + time: this._time && this._time.toString(), + // save `timestamp` as UNIX timestamp integer + timestamp: this._time && this._time.getTime(), + quote: this.isComplete ? this._quote.toPartialJSON() : this._quote.toJSON() + } + } + + static get NO_DEPOSITS () { + return 'no_deposits' + } + + static get RECEIVED () { + return 'received' + } + + static get COMPLETE () { + return 'complete' + } + + static get FAILED () { + return 'failed' + } + + static get RESOLVED () { + return 'resolved' + } + + static fromMetadata (data) { + data = Object.assign({}, data, { quote: new Quote(data.quote) }) + return new Trade(data) + } + + static fromQuote (quote) { + return new Trade({ status: Trade.NO_DEPOSITS, time: Date.now(), quote }) + } +} + +module.exports = Trade diff --git a/src/signer.js b/src/signer.js new file mode 100644 index 000000000..4214a90a9 --- /dev/null +++ b/src/signer.js @@ -0,0 +1,93 @@ +const { curry, forEach, addIndex, lensProp, compose, over } = require('ramda'); +const { mapped } = require('ramda-lens'); +const Bitcoin = require('bitcoinjs-lib'); +const BitcoinCash = require('bitcoincashjs-lib'); +const constants = require('./constants'); +const WalletCrypto = require('./wallet-crypto'); +const Helpers = require('./helpers'); +const KeyRing = require('./keyring'); + +const getKey = (BitcoinLib, priv, addr) => { + let format = Helpers.detectPrivateKeyFormat(priv); + let key = Helpers.privateKeyStringToKey(priv, format, BitcoinLib); + let network = constants.getNetwork(BitcoinLib); + let ckey = new BitcoinLib.ECPair(key.d, null, { compressed: true, network: network }); + let ukey = new BitcoinLib.ECPair(key.d, null, { compressed: false, network: network }); + if (ckey.getAddress() === addr) { + return ckey; + } else if (ukey.getAddress() === addr) { + return ukey; + } + return key; +}; + +const getKeyForAddress = (BitcoinLib, wallet, password, addr) => { + const k = wallet.key(addr).priv; + const privateKeyBase58 = password == null ? k + : WalletCrypto.decryptSecretWithSecondPassword(k, password, wallet.sharedKey, wallet.pbkdf2_iterations); + return getKey(BitcoinLib, privateKeyBase58, addr); +}; + +const getXPRIV = (wallet, password, accountIndex) => { + const account = wallet.hdwallet.accounts[accountIndex]; + return account.extendedPrivateKey == null || password == null + ? account.extendedPrivateKey + : WalletCrypto.decryptSecretWithSecondPassword(account.extendedPrivateKey, password, wallet.sharedKey, wallet.pbkdf2_iterations); +}; + +const pathToKey = (BitcoinLib, wallet, password, fullpath) => { + const [idx, path] = fullpath.split('-'); + const xpriv = getXPRIV(wallet, password, idx); + const keyring = new KeyRing(xpriv, undefined, BitcoinLib); + return keyring.privateKeyFromPath(path).keyPair; +}; + +const isFromAccount = (selection) => { + return selection.inputs[0] ? selection.inputs[0].isFromAccount() : false; +}; + +const bitcoinSigner = (selection) => { + let network = constants.getNetwork(Bitcoin); + let tx = new Bitcoin.TransactionBuilder(network); + + let addInput = coin => tx.addInput(coin.txHash, coin.index); + let addOutput = coin => tx.addOutput(coin.address, coin.value); + let sign = (coin, i) => tx.sign(i, coin.priv); + + forEach(addInput, selection.inputs); + forEach(addOutput, selection.outputs); + addIndex(forEach)(sign, selection.inputs); + + return tx.build(); +}; + +const bitcoinCashSigner = (selection) => { + let network = constants.getNetwork(BitcoinCash); + let hashType = BitcoinCash.Transaction.SIGHASH_ALL | BitcoinCash.Transaction.SIGHASH_BITCOINCASHBIP143; + + let tx = new BitcoinCash.TransactionBuilder(network); + tx.enableBitcoinCash(true); + + let addInput = coin => tx.addInput(coin.txHash, coin.index, BitcoinCash.Transaction.DEFAULT_SEQUENCE, new Buffer(coin.script, 'hex')); + let addOutput = coin => tx.addOutput(coin.address, coin.value); + let sign = (coin, i) => tx.sign(i, coin.priv, null, hashType, coin.value); + + forEach(addInput, selection.inputs); + forEach(addOutput, selection.outputs); + addIndex(forEach)(sign, selection.inputs); + + return tx.build(); +}; + +const sign = curry((BitcoinLib, signingFunction, password, wallet, selection) => { + const getPrivAcc = keypath => pathToKey(BitcoinLib, wallet, password, keypath); + const getPrivAddr = address => getKeyForAddress(BitcoinLib, wallet, password, address); + const getKeys = isFromAccount(selection) ? getPrivAcc : getPrivAddr; + const selectionWithKeys = over(compose(lensProp('inputs'), mapped, lensProp('priv')), getKeys, selection); + return signingFunction(selectionWithKeys); +}); + +module.exports = { + signBitcoin: sign(Bitcoin, bitcoinSigner), + signBitcoinCash: sign(BitcoinCash, bitcoinCashSigner) +}; diff --git a/src/stable-socket.js b/src/stable-socket.js new file mode 100644 index 000000000..1e5c13284 --- /dev/null +++ b/src/stable-socket.js @@ -0,0 +1,102 @@ +const EventEmitter = require('events'); +const Helpers = require('./helpers'); + +const PING_INTERVAL = 15000; +const PING_TIMEOUT = 5000; + +class StableSocket extends EventEmitter { + constructor (url, SocketClass) { + super(); + this.wsUrl = url; + this.SocketClass = SocketClass; + this._headers = { 'Origin': 'https://blockchain.info' }; + this._socket; + this._pingIntervalPID = null; + this._pingTimeoutPID = null; + this.setPongHandler(); + } + + get url () { + return this.wsUrl; + } + + get isConnecting () { + return this._socket != null && this._socket.readyState === this._socket.CONNECTING; + } + + get isOpen () { + return this._socket != null && this._socket.readyState === this._socket.OPEN; + } + + get isClosing () { + return this._socket != null && this._socket.readyState === this._socket.CLOSING; + } + + get isClosed () { + return this._socket == null || this._socket.readyState === this._socket.CLOSED; + } + + createSocket (url) { + return new this.SocketClass(url, [], { headers: this._headers }); + } + + connect () { + if (!Helpers.tor() && this.isClosed) { + try { + this._pingIntervalPID = setInterval(this.ping.bind(this), PING_INTERVAL); + this._socket = this.createSocket(this.url); + this._socket.on('open', () => this.emit('open')); + this._socket.on('message', (message) => this.emit('message', message.data)); + this._socket.on('close', () => this.emit('close')); + } catch (e) { + console.error('Failed to connect to websocket', e); + } + } + } + + send (data) { + if (!Helpers.tor() && this.isOpen) this._socket.send(data); + else if (this.isConnecting) this._socket.on('open', () => this.send(data)); + return this; + } + + close () { + if (this.isOpen) this._socket.close(); + this._socket = null; + this.clearPingInterval(); + this.clearPingTimeout(); + return this; + } + + ping () { + this.send(StableSocket.pingMessage()); + this._pingTimeoutPID = setTimeout(() => { + this.close(); + this.connect(); + }, PING_TIMEOUT); + } + + setPongHandler () { + this.on('message', (data) => { + JSON.parse(data).op === 'pong' && this.clearPingTimeout(); + }); + } + + clearPingInterval () { + clearInterval(this._pingIntervalPID); + } + + clearPingTimeout () { + clearTimeout(this._pingTimeoutPID); + } + + static op (op, data = {}) { + return JSON.stringify(Object.assign({ op }, data)); + } + + static pingMessage () { + return StableSocket.op('ping'); + } +} + +module.exports = StableSocket; diff --git a/src/wallet-crypto.js b/src/wallet-crypto.js index c89eb7848..ac5cdd2e0 100644 --- a/src/wallet-crypto.js +++ b/src/wallet-crypto.js @@ -323,8 +323,8 @@ function decryptDataWithPassword (data, password, iterations, options) { function stretchPassword (password, salt, iterations, keyLenBits) { assert(salt, 'salt missing'); - assert(typeof password === 'string', 'password string required'); - assert(typeof iterations === 'number' && !isNaN(iterations), 'iterations number required'); + assert(password && typeof password === 'string', 'password string required'); + assert(typeof iterations === 'number' && iterations > 0, 'positive iterations number required'); assert(keyLenBits == null || keyLenBits % 8 === 0, 'key length must be evenly divisible into bytes'); var saltBuffer = new Buffer(salt, 'hex'); diff --git a/src/wallet-transaction.js b/src/wallet-transaction.js index b2d6dc004..e36f57627 100644 --- a/src/wallet-transaction.js +++ b/src/wallet-transaction.js @@ -2,6 +2,7 @@ module.exports = Tx; +var { assoc } = require('ramda'); var MyWallet = require('./wallet'); function Tx (object) { @@ -26,7 +27,8 @@ function Tx (object) { this.rbf = obj.rbf; this.publicNote = obj.note; this.note = MyWallet.wallet.getNote(this.hash); - this.confirmations = Tx.setConfirmations(this.block_height); + this.confirmations = Tx.setConfirmations(this.block_height, MyWallet.wallet.latestBlock); + this.coinCode = obj.coinCode || 'btc'; // computed properties var initialIn = { @@ -284,9 +286,10 @@ function isCoinBase (input) { return (input == null || input.prev_out == null || input.prev_out.addr == null); } -Tx.factory = function (o) { +Tx.factory = function (o, coinCode) { if (o instanceof Object && !(o instanceof Tx)) { - return new Tx(o); + let setCoinCode = assoc('coinCode', coinCode === 'bch' ? 'bch' : 'btc'); + return new Tx(setCoinCode(o)); } else { return o; } }; @@ -310,8 +313,7 @@ Tx.IOSfactory = function (tx) { }; }; -Tx.setConfirmations = function (txBlockHeight) { - var lastBlock = MyWallet.wallet.latestBlock; +Tx.setConfirmations = function (txBlockHeight, lastBlock) { var conf = 0; if (lastBlock && txBlockHeight != null && txBlockHeight > 0) { conf = lastBlock.height - txBlockHeight + 1; diff --git a/src/wallet.js b/src/wallet.js index 56f18dadd..841c25581 100644 --- a/src/wallet.js +++ b/src/wallet.js @@ -1,5 +1,6 @@ var MyWallet = module.exports = {}; +var WebSocket = require('ws'); var assert = require('assert'); var Buffer = require('buffer').Buffer; var WalletStore = require('./wallet-store'); @@ -10,19 +11,24 @@ var API = require('./api'); var Wallet = require('./blockchain-wallet'); var Helpers = require('./helpers'); var BlockchainSocket = require('./blockchain-socket'); -var RNG = require('./rng'); +var RNG = require('./rng.js'); var BIP39 = require('bip39'); var Bitcoin = require('bitcoinjs-lib'); var pbkdf2 = require('pbkdf2'); var constants = require('./constants'); +var range = require('ramda/src/range'); var isInitialized = false; MyWallet.wallet = undefined; -MyWallet.ws = new BlockchainSocket(); +MyWallet.ws = new BlockchainSocket(null, WebSocket); // used locally and overridden in iOS MyWallet.socketConnect = function () { - MyWallet.ws.connect(onOpen, onMessage, onClose); + let socket = MyWallet.ws; + socket.on('open', onOpen); + socket.on('message', onMessage); + socket.on('close', onClose); + socket.connect(); var lastOnChange = { checksum: null }; @@ -32,7 +38,7 @@ MyWallet.socketConnect = function () { function onOpen () { WalletStore.sendEvent('ws_on_open'); - MyWallet.ws.send(MyWallet.getSocketOnOpenMessage()); + socket.send(MyWallet.getSocketOnOpenMessage()); } function onClose () { @@ -50,10 +56,6 @@ function didDecryptWallet (success) { // called by native websocket in iOS MyWallet.getSocketOnMessage = function (message, lastOnChange) { var obj = null; - - if (!(typeof window === 'undefined') && message.data) { - message = message.data; - } try { obj = JSON.parse(message); } catch (e) { @@ -89,8 +91,6 @@ MyWallet.getSocketOnMessage = function (message, lastOnChange) { MyWallet.wallet.txList._transactions.forEach(up); } WalletStore.sendEvent('on_block'); - } else if (obj.op === 'pong') { - clearTimeout(MyWallet.ws.pingTimeoutPID); } else if (obj.op === 'email_verified') { MyWallet.wallet.accountInfo.isEmailVerified = Boolean(obj.x); WalletStore.sendEvent('on_email_verified', obj.x); @@ -102,7 +102,7 @@ MyWallet.getSocketOnMessage = function (message, lastOnChange) { // called by native websocket in iOS MyWallet.getSocketOnOpenMessage = function () { var accounts = MyWallet.wallet.hdwallet ? MyWallet.wallet.hdwallet.activeXpubs : []; - return MyWallet.ws.msgOnOpen(MyWallet.wallet.guid, MyWallet.wallet.activeAddresses, accounts); + return BlockchainSocket.onOpenSub(MyWallet.wallet.guid, MyWallet.wallet.activeAddresses, accounts); }; // Fetch a new wallet from the server @@ -126,7 +126,7 @@ MyWallet.getWallet = function (success, error) { MyWallet.decryptAndInitializeWallet(function () { MyWallet.wallet.getHistory(); - MyWallet.wallet.loadExternal().then(function () { + MyWallet.wallet.loadMetadata().then(function () { if (success) success(); }); }, function () { @@ -180,12 +180,14 @@ MyWallet.decryptAndInitializeWallet = function (success, error, decryptSuccess, ); }; -// used in the frontend +const PAIRING_CODE_PBKDF2_ITERATIONS = 10; + +// Used in the frontend / ios MyWallet.makePairingCode = function (success, error) { try { API.securePostCallbacks('wallet', { method: 'pairing-encryption-password' }, function (encryptionPhrase) { var pwHex = new Buffer(WalletStore.getPassword()).toString('hex'); - var encrypted = WalletCrypto.encrypt(MyWallet.wallet.sharedKey + '|' + pwHex, encryptionPhrase, 10); + var encrypted = WalletCrypto.encrypt(MyWallet.wallet.sharedKey + '|' + pwHex, encryptionPhrase, PAIRING_CODE_PBKDF2_ITERATIONS); success('1|' + MyWallet.wallet.guid + '|' + encrypted); }, function (e) { error(e); @@ -195,6 +197,45 @@ MyWallet.makePairingCode = function (success, error) { } }; +MyWallet.parsePairingCode = function (pairingCode) { + if (pairingCode == null || pairingCode.length === 0) { + return Promise.reject('Invalid Pairing QR Code'); + } + + let [version, guid, encrypted] = pairingCode.split('|'); + + if (version !== '1') { + return Promise.reject('Invalid Pairing Version Code ' + version); + } + + if (guid == null || guid.length !== 36) { + return Promise.reject('Invalid Pairing QR Code, GUID is invalid'); + } + + let data = { + guid, + format: 'plain', + method: 'pairing-encryption-password' + }; + + let requestSuccess = (encryptionPhrase) => { + let decrypted = WalletCrypto.decrypt(encrypted, encryptionPhrase, PAIRING_CODE_PBKDF2_ITERATIONS); + if (decrypted != null && decrypted.length) { + let [sharedKey, passwordHex] = decrypted.split('|'); + let password = new Buffer(passwordHex, 'hex').toString('utf8'); + return { version, guid, sharedKey, password }; + } else { + return Promise.reject('Decryption Error'); + } + }; + + let requestError = (res) => { + return Promise.reject('Pairing Code Server Error'); + }; + + return API.request('POST', 'wallet', data).then(requestSuccess, requestError); +}; + MyWallet.loginFromJSON = function (stringWallet, stringExternal, magicHashHexExternal, password) { assert(stringWallet, 'Wallet JSON required'); @@ -317,7 +358,6 @@ MyWallet.initializeWallet = function (pw, decryptSuccess, buildHdSuccess) { } function _success () { - return; } function _error (e) { @@ -352,8 +392,8 @@ MyWallet.initializeWallet = function (pw, decryptSuccess, buildHdSuccess) { var loadMetadata = function () { return MyWallet.wallet.loadMetadata(); }; - p.then(incStats); - p.then(saveGUID); + p.then(incStats).catch(() => { /* ignore failure */ }); + p.then(saveGUID).catch(() => { /* ignore failure */ }); return p.then(loadMetadata); }; @@ -437,11 +477,13 @@ function syncWallet (successcallback, errorcallback) { // Include HD addresses unless in lame mode: var hdAddresses = []; if (MyWallet.wallet.hdwallet !== undefined && MyWallet.wallet.hdwallet.accounts !== undefined) { + var nAccounts = MyWallet.wallet.hdwallet.accounts.length; + var nAddresses = range(0, Helpers.addressesePerAccount(nAccounts)); var subscribeAccount = function (acc) { var ri = acc.receiveIndex; var labeled = acc.labeledReceivingAddresses ? acc.labeledReceivingAddresses : []; var getAddress = function (i) { return acc.receiveAddressAtIndex(i + ri); }; - return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19].map(getAddress).concat(labeled); + return nAddresses.map(getAddress).concat(labeled); }; hdAddresses = MyWallet.wallet.hdwallet.accounts.map(subscribeAccount).reduce(function (a, b) { return a.concat(b); }, []); } diff --git a/tests/data/aes-256-vectors.json b/tests/__data__/aes-256-vectors.json similarity index 100% rename from tests/data/aes-256-vectors.json rename to tests/__data__/aes-256-vectors.json diff --git a/tests/data/bip69-test-vectors.json b/tests/__data__/bip69-test-vectors.json similarity index 100% rename from tests/data/bip69-test-vectors.json rename to tests/__data__/bip69-test-vectors.json diff --git a/tests/data/fee-data.json b/tests/__data__/fee-data.json similarity index 100% rename from tests/data/fee-data.json rename to tests/__data__/fee-data.json diff --git a/tests/__data__/signing-data.json b/tests/__data__/signing-data.json new file mode 100644 index 000000000..db8f48dca --- /dev/null +++ b/tests/__data__/signing-data.json @@ -0,0 +1,71 @@ +{ + "wallet": { + "guid": "35184925-09c3-4153-946b-e604d597b672", + "sharedKey": "6a794227-1278-448c-9c91-47a743164ec1", + "double_encryption": false, + "metadataHDNode": "xprv9vUdSmQHAzqKd9ZArrJXqEzDhkmfQ7zp6TJ1C27cETXcgdfP3W54i1Umdv6hhGTGRVtAGKTAp98CQr893VaksWu77diviTMn4r6JKE9CvK7", + "options": { + "pbkdf2_iterations": 5000, + "fee_per_kb": 10000, + "html5_notifications": false, + "logout_time": 600000 + }, + "address_book": [], + "tx_notes": {}, + "tx_names": [], + "keys": [], + "hd_wallets": [ + { + "seed_hex": "59e33544d97a041b6c74ada06469c163", + "passphrase": "", + "mnemonic_verified": false, + "default_account_idx": 0, + "accounts": [ + { + "label": "My Bitcoin Wallet", + "archived": false, + "xpriv": "xprv9xrdr5KSDuFjMRZsFtYo7kzBLqX5wabxLkrVZab6iLEN2fmwRFuTyBYXrz93QaxXAivmseXpaxLWX1nnTwCao93MARAGMA8kvNwRaWvmEcn", + "xpub": "xpub6BqzFarL4Gp2ZueLMv5oUtvutsMaM3Kohyn6MxziGfmLuU75xoDiWys1iGnrQwqQT3PJRAkE2ZPyoPSLq8GVVStSi8DnCAxDKXUttnfH2Wu", + "address_labels": [], + "cache": { + "receiveAccount": "xpub6EvRwUVEmxMkYReJ2d1korWa9R2AriQhXeyJB55ns4G6mmF7JoBPABuSS9FLti5B3Ddk6XJ4HU2sXW5AGDYZLPVMEXLaM4pNLhZ8DFVgEnN", + "changeAccount": "xpub6EvRwUVEmxMka4otnrSt8ssFxNWcNb5pDc479E9H1zKxwMTFz9BRxkHdiFYG4EmLafU4bzj6w713haUibQ5qF4atDYYEnLXa44CCWE6KAg3" + } + } + ] + } + ] + }, + "tx_hex_btc": "01000000026c1b0fee717838e4d7c0b0fe88aa4929cc775f8b2d25f42e6783198aea1447db000000006a473044022039390ec412328a1dc93175c965b4cc2bcb7f960ae94db5f8aa5a31257602efeb022066bbfa62b33aae433e0d229b7d60c8074a064a76920b738f896ba0429c9bdebb0121031c77d382badb52767699c14366d3ef47d9538b0bd12bf75ced6b1aa37a9d1a29ffffffffa3a9c77436956511fa7da5c458e23dc1e9af53f1f48a59411e3f168c1e41e568010000006a4730440220569e70977bd2e1b452f81672fca0d1fd53a639143d6d0f1b15778aa5c1213a02022020dd2ef066eed5af684d72ae2f32601ec7bafaa5f58a1636a9ea29503790fa140121026a622460994a92deae67834775fe54ee652f77fe65c9f279443e277348698d14ffffffff01ca140100000000001976a914b4d4b04597645ccb38465c2983b9e83804d8381488ac00000000", + "tx_hex_bch": "01000000026c1b0fee717838e4d7c0b0fe88aa4929cc775f8b2d25f42e6783198aea1447db000000006a473044022046623d6d62db125fe4281c7888a995c572377223b50acd11eb06a095f3d5e3c80220221359d419f2241c0c7bef5530e0a2c3438364fd9fe825e914ad44f0bc6498154121031c77d382badb52767699c14366d3ef47d9538b0bd12bf75ced6b1aa37a9d1a29ffffffffa3a9c77436956511fa7da5c458e23dc1e9af53f1f48a59411e3f168c1e41e568010000006b483045022100dd869488f239422164bc1049ec2c434049b4706cc74f38daf4402f41aebf42df022066376640c814cd7a7d1ab02e35bd4246c6ee4640aa999a1ebf604d737f270c844121026a622460994a92deae67834775fe54ee652f77fe65c9f279443e277348698d14ffffffff01ca140100000000001976a914b4d4b04597645ccb38465c2983b9e83804d8381488ac00000000", + "unspent_outputs": [ + { + "tx_hash": "6c1b0fee717838e4d7c0b0fe88aa4929cc775f8b2d25f42e6783198aea1447db", + "tx_hash_big_endian": "db4714ea8a1983672ef4252d8b5f77cc2949aa88feb0c0d7e4387871ee0f1b6c", + "tx_index": 293191941, + "tx_output_n": 0, + "script": "76a9142066179ca1e77a26d09447e1543508436cab5e0088ac", + "xpub": { + "m": "xpub6BqzFarL4Gp2ZueLMv5oUtvutsMaM3Kohyn6MxziGfmLuU75xoDiWys1iGnrQwqQT3PJRAkE2ZPyoPSLq8GVVStSi8DnCAxDKXUttnfH2Wu", + "path": "M/0/1" + }, + "value": 39448, + "value_hex": "009a18", + "confirmations": 0 + }, + { + "tx_hash": "a3a9c77436956511fa7da5c458e23dc1e9af53f1f48a59411e3f168c1e41e568", + "tx_hash_big_endian": "68e5411e8c163f1e41598af4f153afe9c13de258c4a57dfa1165953674c7a9a3", + "tx_index": 293191876, + "tx_output_n": 1, + "script": "76a914d91dae4825e52351f12b81d7e500a11cd719187088ac", + "xpub": { + "m": "xpub6BqzFarL4Gp2ZueLMv5oUtvutsMaM3Kohyn6MxziGfmLuU75xoDiWys1iGnrQwqQT3PJRAkE2ZPyoPSLq8GVVStSi8DnCAxDKXUttnfH2Wu", + "path": "M/0/0" + }, + "value": 50000, + "value_hex": "00c350", + "confirmations": 0 + } + ] +} diff --git a/tests/data/transactions.json b/tests/__data__/transactions.json similarity index 100% rename from tests/data/transactions.json rename to tests/__data__/transactions.json diff --git a/tests/data/unspent-outputs.json b/tests/__data__/unspent-outputs.json similarity index 100% rename from tests/data/unspent-outputs.json rename to tests/__data__/unspent-outputs.json diff --git a/tests/data/wallet-data.json b/tests/__data__/wallet-data.json similarity index 100% rename from tests/data/wallet-data.json rename to tests/__data__/wallet-data.json diff --git a/tests/__mocks__/bitcoin-exchange-client.mock.js b/tests/__mocks__/bitcoin-exchange-client.mock.js new file mode 100644 index 000000000..ab832876c --- /dev/null +++ b/tests/__mocks__/bitcoin-exchange-client.mock.js @@ -0,0 +1,10 @@ + +module.exports = { + Exchange: class Exchange {}, + API: class API {}, + PaymentAccount: class PaymentAccount {}, + PaymentMedium: class PaymentMedium {}, + Quote: class Quote {}, + Trade: class Trade {}, + Helpers: {} +}; diff --git a/tests/__mocks__/blockchain-wallet.mock.js b/tests/__mocks__/blockchain-wallet.mock.js new file mode 100644 index 000000000..cdade38cb --- /dev/null +++ b/tests/__mocks__/blockchain-wallet.mock.js @@ -0,0 +1,69 @@ +const BIP39 = require('bip39'); +const Bitcoin = require('bitcoinjs-lib'); +const MetadataMock = require('./metadata.mock'); +const seedHex = '17eb336a2a3bc73dd4d8bd304830fe32'; +const mnemonic = BIP39.entropyToMnemonic(seedHex); +const masterhex = BIP39.mnemonicToSeed(mnemonic); +const masterHdNode = Bitcoin.HDNode.fromSeedBuffer(masterhex); + +class BlockchainWalletMock { + constructor () { + let addrs = { + '1asdf': { address: '1asdf' }, + '1watch': { address: '1watch', isWatchOnly: true }, + '1arch': { address: '1arch', archived: true } + }; + + this.addresses = Object.keys(addrs); + this.keys = this.addresses.map(a => addrs[a]); + this.activeKeys = this.keys.filter(k => !k.archived); + this.spendableAddresses = this.keys.filter(k => !k.isWatchOnly).map(k => k.address); + this.spendableActiveAddresses = this.activeKeys.filter(k => !k.isWatchOnly).map(k => k.address); + + this.hdwallet = { + // mnemonic: 'blood flower surround federal round page fat bless core dose display govern', + // masterSeedHex: '265c86692394fab95d0efc4385b89679d8daef5c9975e1f2b1f1eb4300bc10ad81d4d117c323591d543f6e54aa9d4560cad424bc66bb2bb61dc14285a508dad7', + seedHex, + defaultAccountIndex: 0, + xpubs: [ + 'xpub1', + 'xpub2' + ], + accounts: [ + { + index: 0, + label: 'My Wallet', + extendedPublicKey: 'xpub1', + receiveAddressAtIndex () {}, + changeAddressAtIndex () {} + }, + { + index: 1, + extendedPublicKey: 'xpub2', + receiveAddressAtIndex () {}, + changeAddressAtIndex () {} + } + ], + getMasterHex (seedHex, cipher = x => x) { + return cipher(masterhex); + }, + getMasterHDNode (cipher = x => x) { + return cipher(masterHdNode); + } + }; + this.isDoubleEncrypted = false; + } + metadata (type) { + return new MetadataMock(); + } + createCipher (secPass) { + return (x) => { + if (secPass !== 'correct') { + throw new Error('Second password incorrect'); + } + return x; + }; + } +} + +module.exports = BlockchainWalletMock; diff --git a/tests/__mocks__/metadata.mock.js b/tests/__mocks__/metadata.mock.js new file mode 100644 index 000000000..759383e10 --- /dev/null +++ b/tests/__mocks__/metadata.mock.js @@ -0,0 +1,10 @@ +class MetadataMock { + update () { + return Promise.resolve(null); + } + fetch () { + return Promise.resolve(null); + } +} + +module.exports = MetadataMock; diff --git a/tests/__mocks__/tx-stat-response.mock.js b/tests/__mocks__/tx-stat-response.mock.js new file mode 100644 index 000000000..90dcf9161 --- /dev/null +++ b/tests/__mocks__/tx-stat-response.mock.js @@ -0,0 +1,16 @@ +/* eslint-disable semi */ +module.exports = (type) => { + let o = { + success: { + 'status': 'complete', + 'address': '0x2e67843ab8895e29b6bed8c57e0b3cbcede7d0db', + 'withdraw': '1qpg36s52kfwcqR7TJ85J1cwJtvKvNfsp', + 'incomingCoin': 0.05, + 'incomingType': 'ETH', + 'outgoingCoin': '0.00203185', + 'outgoingType': 'BTC', + 'transaction': '11048fec21ea10748800ada987e22bcdba18a4899df22e9b7ad5351c5458b3fb' + } + } + return o[type] +} diff --git a/tests/__mocks__/ws.mock.js b/tests/__mocks__/ws.mock.js new file mode 100644 index 000000000..c2c95f505 --- /dev/null +++ b/tests/__mocks__/ws.mock.js @@ -0,0 +1,18 @@ +/* eslint-disable semi */ +class WebSocket { + constructor (url) { + this.url = url + this.readyState = 1 + this.on = jasmine.createSpy('on') + this.CONNECTING = 0 + this.OPEN = 1 + this.CLOSING = 2 + this.CLOSED = 3 + } + send (message) { + } + close () { + } +} + +module.exports = WebSocket diff --git a/tests/_prepare_spec.js b/tests/__prepare.spec.js similarity index 100% rename from tests/_prepare_spec.js rename to tests/__prepare.spec.js diff --git a/tests/account_info_spec.js b/tests/account-info.spec.js similarity index 100% rename from tests/account_info_spec.js rename to tests/account-info.spec.js diff --git a/tests/address_hd_spec.js b/tests/address-hd.spec.js similarity index 100% rename from tests/address_hd_spec.js rename to tests/address-hd.spec.js diff --git a/tests/address_spec.js b/tests/address.spec.js similarity index 98% rename from tests/address_spec.js rename to tests/address.spec.js index 0d444514e..cbb7999e1 100644 --- a/tests/address_spec.js +++ b/tests/address.spec.js @@ -1,4 +1,5 @@ let Bitcoin = require('bitcoinjs-lib'); +let exchangeMock = require('./__mocks__/bitcoin-exchange-client.mock'); let proxyquire = require('proxyquireify')(require); @@ -129,8 +130,9 @@ let WalletCrypto = { }; let stubs = { + 'bitcoin-exchange-client': exchangeMock, './wallet': MyWallet, - './rng': RNG, + './rng.js': RNG, './api': API, './import-export': ImportExport, './wallet-crypto': WalletCrypto, @@ -220,7 +222,6 @@ describe('Address', () => { describe('instance', () => { let a; - let SETTER_TYPE_ERROR = new TypeError('setting a property that has only a getter'); beforeEach(() => { a = new Address(object); @@ -304,12 +305,12 @@ describe('Address', () => { }); it('private key is read only', () => { - expect(() => { a.priv = 'not allowed'; }).toThrow(SETTER_TYPE_ERROR); + expect(() => { a.priv = 'not allowed'; }).toThrow(); expect(a.priv).toEqual('GFZrKdb4tGWBWrvkjwRymnhGX8rfrWAGYadfHSJz36dF'); }); it('address is read only', () => { - expect(() => { a.address = 'not allowed'; }).toThrow(SETTER_TYPE_ERROR); + expect(() => { a.address = 'not allowed'; }).toThrow(); expect(a.address).toEqual('1HaxXWGa5cZBUKNLzSWWtyDyRiYLWff8FN'); }); }); diff --git a/tests/api.spec.js b/tests/api.spec.js new file mode 100644 index 000000000..dfac83cbb --- /dev/null +++ b/tests/api.spec.js @@ -0,0 +1,59 @@ +/* eslint-disable semi */ +require('isomorphic-fetch') +let API = require('../src/api'); + +describe('API', () => { + describe('encodeFormData', () => { + it('should encode a flat list', () => { + let data = { foo: 'bar', alice: 'bob' }; + expect(API.encodeFormData(data)).toEqual('foo=bar&alice=bob'); + }); + + it('should encode a nested list', () => { + pending(); + let data = { + foo: 'bar', + name: { first: 'bob' } + }; + expect(API.encodeFormData(data)).toEqual('...'); + }); + }); + + describe('.incrementCurrencyUsageStats', () => { + let eventUrl = (event) => `https://blockchain.info/event?name=wallet_login_balance_${event}` + + beforeEach(() => { + spyOn(window, 'fetch') + }) + + it('should make one request', () => { + API.incrementCurrencyUsageStats(0, 0) + expect(window.fetch).toHaveBeenCalledTimes(1) + }) + + it('should record correctly for btc=0, eth=0', () => { + API.incrementCurrencyUsageStats(0, 0) + expect(window.fetch).toHaveBeenCalledWith(eventUrl('btc_0_eth_0_bch_0')) + }) + + it('should record correctly for btc>0, eth=0', () => { + API.incrementCurrencyUsageStats(1, 0) + expect(window.fetch).toHaveBeenCalledWith(eventUrl('btc_1_eth_0_bch_0')) + }) + + it('should record correctly for btc=0, eth>0', () => { + API.incrementCurrencyUsageStats(0, 1) + expect(window.fetch).toHaveBeenCalledWith(eventUrl('btc_0_eth_1_bch_0')) + }) + + it('should record correctly for btc>0, eth>0', () => { + API.incrementCurrencyUsageStats(1, 1) + expect(window.fetch).toHaveBeenCalledWith(eventUrl('btc_1_eth_1_bch_0')) + }) + + it('should record correctly for bch>0', () => { + API.incrementCurrencyUsageStats(0, 0, 1) + expect(window.fetch).toHaveBeenCalledWith(eventUrl('btc_0_eth_0_bch_1')) + }) + }) +}); diff --git a/tests/api_spec.js b/tests/api_spec.js deleted file mode 100644 index 6921d0d75..000000000 --- a/tests/api_spec.js +++ /dev/null @@ -1,20 +0,0 @@ -let proxyquire = require('proxyquireify')(require); -let API = proxyquire('../src/api', {}); - -describe('API', () => { - describe('encodeFormData', () => { - it('should encode a flat list', () => { - let data = { foo: 'bar', alice: 'bob' }; - expect(API.encodeFormData(data)).toEqual('foo=bar&alice=bob'); - }); - - it('should encode a nested list', () => { - pending(); - let data = { - foo: 'bar', - name: { first: 'bob' } - }; - expect(API.encodeFormData(data)).toEqual('...'); - }); - }); -}); diff --git a/tests/bch/bch-account.spec.js b/tests/bch/bch-account.spec.js new file mode 100644 index 000000000..2d90e7c72 --- /dev/null +++ b/tests/bch/bch-account.spec.js @@ -0,0 +1,72 @@ +/* eslint-disable semi */ +const BitcoinCashWallet = require('../../src/bch') +const BchSpendable = require('../../src/bch/bch-spendable') +const BchAccount = require('../../src/bch/bch-account') +const BlockchainWalletMock = require('../__mocks__/blockchain-wallet.mock') + +describe('BchAccount', () => { + let bch + let wallet + let btcAcc + let account + + beforeEach(() => { + wallet = new BlockchainWalletMock() + bch = BitcoinCashWallet.fromBlockchainWallet(wallet) + btcAcc = wallet.hdwallet.accounts[0] + account = new BchAccount(bch, wallet, btcAcc) + }) + + it('should have: index', () => { + expect(account.index).toEqual(0) + }) + + it('should have: xpub', () => { + expect(account.xpub).toEqual('xpub1') + }) + + it('should have: label', () => { + expect(account.label).toEqual('Bitcoin Cash - My Wallet') + }) + + it('should have: coinCode=bch', () => { + expect(account.coinCode).toEqual('bch') + }) + + it('should have: balance', () => { + spyOn(BchSpendable.prototype, 'getAddressBalance').and.callThrough() + expect(account.balance).toEqual(null) + expect(BchSpendable.prototype.getAddressBalance).toHaveBeenCalledWith(account.xpub) + }) + + it('should have: receiveAddress', () => { + spyOn(bch, 'getAccountIndexes').and.returnValue({ receive: 10 }) + spyOn(btcAcc, 'receiveAddressAtIndex').and.returnValue('1asdf') + expect(account.receiveAddress).toEqual('1asdf') + expect(bch.getAccountIndexes).toHaveBeenCalledWith('xpub1') + expect(btcAcc.receiveAddressAtIndex).toHaveBeenCalledWith(10) + }) + + it('should have: changeAddress', () => { + spyOn(bch, 'getAccountIndexes').and.returnValue({ change: 10 }) + spyOn(btcAcc, 'changeAddressAtIndex').and.returnValue('1asdf') + expect(account.changeAddress).toEqual('1asdf') + expect(bch.getAccountIndexes).toHaveBeenCalledWith('xpub1') + expect(btcAcc.changeAddressAtIndex).toHaveBeenCalledWith(10) + }) + + it('should be able to get the available balance', () => { + spyOn(BchSpendable.prototype, 'getAvailableBalance') + account.getAvailableBalance(10) + expect(BchSpendable.prototype.getAvailableBalance).toHaveBeenCalledWith(0, 10) + }) + + it('should be able to call createPayment()', () => { + let from = jasmine.createSpy('from') + spyOn(btcAcc, 'changeAddressAtIndex').and.returnValue('1asdf') + spyOn(BchSpendable.prototype, 'createPayment').and.returnValue({ from }) + account.createPayment() + expect(from).toHaveBeenCalledWith(0, '1asdf') + expect(BchSpendable.prototype.createPayment).toHaveBeenCalledWith() + }) +}) diff --git a/tests/bch/bch-imported.spec.js b/tests/bch/bch-imported.spec.js new file mode 100644 index 000000000..9dcf5b987 --- /dev/null +++ b/tests/bch/bch-imported.spec.js @@ -0,0 +1,56 @@ +/* eslint-disable semi */ +const BitcoinCashWallet = require('../../src/bch') +const BchSpendable = require('../../src/bch/bch-spendable') +const BchImported = require('../../src/bch/bch-imported') +const BlockchainWalletMock = require('../__mocks__/blockchain-wallet.mock') + +describe('BchImported', () => { + let bch + let wallet + let imported + + beforeEach(() => { + wallet = new BlockchainWalletMock() + bch = BitcoinCashWallet.fromBlockchainWallet(wallet) + imported = new BchImported(bch, wallet) + }) + + it('should have: addresses', () => { + expect(imported.addresses).toEqual(['1asdf', '1arch']) + }) + + it('should have: label', () => { + expect(imported.label).toEqual('Imported Addresses') + }) + + it('should have: coinCode=bch', () => { + expect(imported.coinCode).toEqual('bch') + }) + + it('should have: balance (null)', () => { + spyOn(BchSpendable.prototype, 'getAddressBalance').and.returnValue(null) + expect(imported.balance).toEqual(null) + expect(BchSpendable.prototype.getAddressBalance).toHaveBeenCalledWith('1asdf') + }) + + it('should have: balance (with value)', () => { + spyOn(BchSpendable.prototype, 'getAddressBalance').and.returnValue(100) + expect(imported.balance).toEqual(200) + expect(BchSpendable.prototype.getAddressBalance).toHaveBeenCalledWith('1asdf') + expect(BchSpendable.prototype.getAddressBalance).toHaveBeenCalledWith('1arch') + }) + + it('should be able to get the available balance', () => { + spyOn(BchSpendable.prototype, 'getAvailableBalance') + imported.getAvailableBalance(10) + expect(BchSpendable.prototype.getAvailableBalance).toHaveBeenCalledWith(['1asdf', '1arch'], 10) + }) + + it('should be able to call createPayment()', () => { + let from = jasmine.createSpy('from') + spyOn(BchSpendable.prototype, 'createPayment').and.returnValue({ from }) + imported.createPayment() + expect(from).toHaveBeenCalledWith(['1asdf', '1arch'], '1asdf') + expect(BchSpendable.prototype.createPayment).toHaveBeenCalledWith() + }) +}) diff --git a/tests/bch/bch-payment.spec.js b/tests/bch/bch-payment.spec.js new file mode 100644 index 000000000..40c4aac50 --- /dev/null +++ b/tests/bch/bch-payment.spec.js @@ -0,0 +1,156 @@ +/* eslint-disable semi */ +const { add, reduce, map, compose } = require('ramda') +const BchApi = require('../../src/bch/bch-api') +const BchPayment = require('../../src/bch/bch-payment') +const Coin = require('../../src/coin') +const BlockchainWalletMock = require('../__mocks__/blockchain-wallet.mock') + +const addr = '19kqHHBoYbyY2bAr1SN2GuGcdSZ6fM2Qqz' + +const sumCoins = compose(reduce(add, 0), map(c => c.value)) + +describe('BchPayment', () => { + let wallet + let payment + + beforeEach(() => { + wallet = new BlockchainWalletMock() + payment = new BchPayment(wallet) + + let mocked = [Coin.of(10000), Coin.of(15000), Coin.of(20000)] + spyOn(BchApi, 'getUnspents').and.returnValue(Promise.resolve(mocked)) + }) + + describe('handleError()', () => { + it('should allow handling errors with automatic recovery', (done) => { + let handle = jasmine.createSpy('handleError') + payment + .from(0, addr).to(addr).amount(10000) + .build() // forgot feePerByte() + .handleError(handle) + .feePerByte(10) + .build() // succeeds + .handleError(handle) + .sideEffect(p => { + expect(p.selection).not.toEqual(null) + expect(handle).toHaveBeenCalledTimes(1) + done() + }) + }) + }) + + describe('from()', () => { + it('should throw for an invalid destination', () => { + let f = () => payment.from(addr, addr) + expect(f).toThrow() + }) + + it('should throw for an invalid change address', () => { + let f = () => payment.from([addr], '1asdf') + expect(f).toThrow() + }) + + it('should fetch unspents after setting from', (done) => { + payment + .from(0, addr) + .sideEffect(p => { + expect(p.coins.length).toEqual(3) + done() + }) + }) + }) + + describe('to()', () => { + it('should throw for an invalid source', () => { + let f = () => payment.to('1asdf') + expect(f).toThrow() + }) + + it('should set the to property', (done) => { + payment + .to(addr) + .sideEffect(p => { + expect(p.to).toEqual(addr) + done() + }) + }) + }) + + describe('amount()', () => { + it('should throw for an invalid amount', () => { + let f = () => payment.amount('asdf') + expect(f).toThrow() + }) + + it('should set the amount property', (done) => { + payment + .amount(10000) + .sideEffect(p => { + expect(p.amount).toEqual(10000) + done() + }) + }) + }) + + describe('feePerByte()', () => { + it('should throw for an invalid feePerByte', () => { + let f = () => payment.feePerByte('asdf') + expect(f).toThrow() + }) + + it('should set the feePerByte property', (done) => { + payment + .feePerByte(10) + .sideEffect(p => { + expect(p.feePerByte).toEqual(10) + done() + }) + }) + }) + + describe('clean()', () => { + it('should clean the proper fields', () => { + payment + .map(p => { + p.rawTx = 'rawTx' + p.hash = 'hash' + p.selection = 'selection' + return p + }) + .clean() + .sideEffect(p => { + expect(p.rawTx).toEqual(null) + expect(p.hash).toEqual(null) + expect(p.selection).toEqual(null) + }) + }) + }) + + describe('build()', () => { + it('should build a transaction', (done) => { + payment + .from(0, addr).to(addr).feePerByte(10).amount(10000) + .build() + .sideEffect(p => { + expect(p.selection.fee).toEqual(1910) + expect(sumCoins(p.selection.inputs)).toEqual(20000) + expect(sumCoins(p.selection.outputs)).toEqual(20000 - 1910) + done() + }) + }) + }) + + describe('buildSweep()', () => { + it('should build a sweep transaction', (done) => { + payment + .from(0, addr).to(addr).feePerByte(10) + .buildSweep() + .sideEffect(p => { + expect(p.selection.fee).toEqual(4850) + expect(sumCoins(p.selection.inputs)).toEqual(45000) + expect(sumCoins(p.selection.outputs)).toEqual(45000 - 4850) + done() + }) + }) + }) +}) diff --git a/tests/bch/bch-spendable.spec.js b/tests/bch/bch-spendable.spec.js new file mode 100644 index 000000000..3c98c4720 --- /dev/null +++ b/tests/bch/bch-spendable.spec.js @@ -0,0 +1,51 @@ +/* eslint-disable semi */ +const BitcoinCashWallet = require('../../src/bch') +const BchSpendable = require('../../src/bch/bch-spendable') +const BchApi = require('../../src/bch/bch-api') +const Coin = require('../../src/coin') +const BlockchainWalletMock = require('../__mocks__/blockchain-wallet.mock') + +describe('BchSpendable', () => { + let bch + let wallet + let spendable + + beforeEach(() => { + wallet = new BlockchainWalletMock() + bch = BitcoinCashWallet.fromBlockchainWallet(wallet) + spendable = new BchSpendable(bch, wallet) + }) + + it('should be able to call getAddressBalance()', () => { + spyOn(bch, 'getAddressBalance') + spendable.getAddressBalance('1asdf') + expect(bch.getAddressBalance).toHaveBeenCalledWith('1asdf') + }) + + it('should be able to call createPayment()', () => { + spyOn(bch, 'createPayment') + spendable.createPayment() + expect(bch.createPayment).toHaveBeenCalledWith() + }) + + describe('getAvailableBalance()', () => { + beforeEach(() => { + let mocked = [Coin.of(5000), Coin.of(15000)] + spyOn(BchApi, 'getUnspents').and.returnValue(Promise.resolve(mocked)) + }) + + it('should fetch coins for the source', () => { + spendable.getAvailableBalance(['1asdf'], 5) + expect(BchApi.getUnspents).toHaveBeenCalledWith(wallet, ['1asdf']) + }) + + it('should compute the correct values', (done) => { + spendable.getAvailableBalance(['1asdf'], 5).then(values => { + expect(values.fee).toEqual(5) + expect(values.sweepFee).toEqual(1690) + expect(values.amount).toEqual(20000 - 1690) + done() + }) + }) + }) +}) diff --git a/tests/bch/index.spec.js b/tests/bch/index.spec.js new file mode 100644 index 000000000..5616d37d8 --- /dev/null +++ b/tests/bch/index.spec.js @@ -0,0 +1,104 @@ +/* eslint-disable semi */ +const BitcoinCashWallet = require('../../src/bch') +const BchApi = require('../../src/bch/bch-api') +const BchPayment = require('../../src/bch/bch-payment') +const BlockchainWalletMock = require('../__mocks__/blockchain-wallet.mock') + +describe('bch', () => { + let bch + let wallet + + beforeEach(() => { + wallet = new BlockchainWalletMock(); + bch = BitcoinCashWallet.fromBlockchainWallet(wallet) + }); + + it('should have balance = null', () => { + expect(bch.balance).toEqual(null) + }) + + it('should have txs = []', () => { + expect(bch.txs).toEqual([]) + }) + + it('should have a defaultAccount matching the hdwallet default', () => { + expect(bch.defaultAccount).toEqual(bch.accounts[0]) + wallet.hdwallet.defaultAccountIndex = 1 + expect(bch.defaultAccount).toEqual(bch.accounts[1]) + }) + + it('should have importedAddresses if there are imported addresses', () => { + expect(bch.importedAddresses).not.toEqual(null) + }) + + it('should not have importedAddresses if there are no spendable addresses', () => { + wallet.spendableAddresses = [] + bch = BitcoinCashWallet.fromBlockchainWallet(wallet) + expect(bch.importedAddresses).toEqual(null) + }) + + it('should have accounts matching the number of hd accounts', () => { + expect(bch.accounts.length).toEqual(wallet.hdwallet.accounts.length) + }) + + describe('getAddressBalance()', () => { + beforeEach(() => { + bch._addressInfo = { '1asdf': { final_balance: 100 } } + }) + + it('should get the balance for an address', () => { + expect(bch.getAddressBalance('1asdf')).toEqual(100) + }) + + it('should return null if the address has no stored balance', () => { + expect(bch.getAddressBalance('1nope')).toEqual(null) + }) + }) + + describe('getAccountIndexes()', () => { + beforeEach(() => { + bch._addressInfo = { 'xpub1': { account_index: 8, change_index: 6 } } + }) + + it('should get receive and change indexes', () => { + expect(bch.getAccountIndexes('xpub1')).toEqual({ receive: 8, change: 6 }) + }) + + it('should return default values of 0', () => { + expect(bch.getAccountIndexes('xpub2')).toEqual({ receive: 0, change: 0 }) + }) + }) + + describe('getHistory()', () => { + beforeEach(() => { + let wallet = { final_balance: 100 } + let addresses = [{ address: '1asdf', final_balance: 100 }] + let txs = [] + let info = { latest_block: { height: 500000 } } + let mocked = { wallet, addresses, txs, info } + spyOn(BchApi, 'multiaddr').and.returnValue(Promise.resolve(mocked)) + }) + + it('should call multiaddr with all addresses and xpubs', (done) => { + bch.getHistory().then(() => { + expect(BchApi.multiaddr).toHaveBeenCalledWith(['1asdf', '1arch', 'xpub1', 'xpub2'], 50) + done() + }) + }) + + it('should set the balance and address info', (done) => { + bch.getHistory().then(() => { + expect(bch.balance).toEqual(100) + expect(bch.getAddressBalance('1asdf')).toEqual(100) + done() + }) + }) + }) + + describe('createPayment()', () => { + it('should create a payment', () => { + let payment = bch.createPayment() + expect(payment instanceof BchPayment).toEqual(true) + }) + }) +}) diff --git a/tests/bip38_spec.js b/tests/bip38.spec.js similarity index 100% rename from tests/bip38_spec.js rename to tests/bip38.spec.js diff --git a/tests/blockchain_settings_api_spec.js b/tests/blockchain-settings-api.spec.js similarity index 99% rename from tests/blockchain_settings_api_spec.js rename to tests/blockchain-settings-api.spec.js index 2ae6febf9..00b12507b 100644 --- a/tests/blockchain_settings_api_spec.js +++ b/tests/blockchain-settings-api.spec.js @@ -1,4 +1,5 @@ let proxyquire = require('proxyquireify')(require); +let exchangeMock = require('./__mocks__/bitcoin-exchange-client.mock'); let MyWallet = { doubleEncrypted: false, @@ -65,6 +66,7 @@ let WalletStore = { }; let stubs = { + 'bitcoin-exchange-client': exchangeMock, './wallet.js': MyWallet, './api': API, './wallet-store.js': WalletStore diff --git a/tests/blockchain-socket.spec.js b/tests/blockchain-socket.spec.js new file mode 100644 index 000000000..51ef675d3 --- /dev/null +++ b/tests/blockchain-socket.spec.js @@ -0,0 +1,153 @@ +describe('Websocket', () => { + let WebSocket = require('./__mocks__/ws.mock'); + let BlockchainSocket = require('../src/blockchain-socket'); + let Helpers = require('../src/helpers'); + + describe('instance', () => { + let ws; + + beforeEach(() => { + ws = new BlockchainSocket(null, WebSocket); + spyOn(Helpers, 'tor').and.returnValue(false); + }); + + describe('subscribeToAddresses()', () => { + it('should subscribe to a single address', () => { + spyOn(ws, 'send'); + ws.subscribeToAddresses('asdf'); + let expected = JSON.stringify({ op: 'addr_sub', addr: 'asdf' }); + expect(ws.send).toHaveBeenCalledWith(expected); + }); + + it('should subscribe to multiple addresses', () => { + spyOn(ws, 'send'); + ws.subscribeToAddresses(['asdf', 'qwer']); + let expected = JSON.stringify({ op: 'addr_sub', addr: 'asdf' }) + JSON.stringify({ op: 'addr_sub', addr: 'qwer' }); + expect(ws.send).toHaveBeenCalledWith(expected); + }); + }); + + describe('subscribeToXpubs()', () => { + it('should subscribe to a single xpub', () => { + spyOn(ws, 'send'); + ws.subscribeToXpubs('xpub1'); + let expected = JSON.stringify({ op: 'xpub_sub', xpub: 'xpub1' }); + expect(ws.send).toHaveBeenCalledWith(expected); + }); + + it('should subscribe to multiple xpubs', () => { + spyOn(ws, 'send'); + ws.subscribeToXpubs(['xpub1', 'xpub2']); + let expected = JSON.stringify({ op: 'xpub_sub', xpub: 'xpub1' }) + JSON.stringify({ op: 'xpub_sub', xpub: 'xpub2' }); + expect(ws.send).toHaveBeenCalledWith(expected); + }); + }); + }); + + describe('static', () => { + describe('walletSub()', () => { + it('should subscribe to a guid', () => { + let res = BlockchainSocket.walletSub('1234'); + let expected = JSON.stringify({ op: 'wallet_sub', guid: '1234' }); + expect(res).toEqual(expected); + }); + + it('should return an empty string if guid is missing', () => { + let res = BlockchainSocket.walletSub(null); + let expected = ''; + expect(res).toEqual(expected); + }); + }); + + describe('blocksSub()', () => + it('should subscribe to new blocks', () => { + let res = BlockchainSocket.blocksSub(); + let expected = JSON.stringify({ op: 'blocks_sub' }); + expect(res).toEqual(expected); + }) + ); + + describe('addrSub()', () => { + it('should return an empty string if addresses are missing', () => { + let res = BlockchainSocket.addrSub(null); + let expected = ''; + expect(res).toEqual(expected); + }); + + it('should subscribe to one adddress', () => { + let res = BlockchainSocket.addrSub('1abc'); + let expected = JSON.stringify({ op: 'addr_sub', addr: '1abc' }); + expect(res).toEqual(expected); + }); + + it('should subscribe to array of adddresses', () => { + let res = BlockchainSocket.addrSub(['1abc', '1def']); + let expected = JSON.stringify({ + op: 'addr_sub', + addr: '1abc' + }) + JSON.stringify({ + op: 'addr_sub', + addr: '1def' + }); + expect(res).toEqual(expected); + }); + }); + + describe('xpubSub()', () => { + it('should return an empty string if xpub is missing', () => { + let res = BlockchainSocket.xpubSub(null); + let expected = ''; + expect(res).toEqual(expected); + }); + + it('should return an empty string if xpub is []', () => { + let res = BlockchainSocket.xpubSub([]); + let expected = ''; + expect(res).toEqual(expected); + }); + + it('should subscribe to one xpub', () => { + let res = BlockchainSocket.xpubSub('1abc'); + let expected = JSON.stringify({ op: 'xpub_sub', xpub: '1abc' }); + expect(res).toEqual(expected); + }); + + it('should subscribe to array of adddresses', () => { + let res = BlockchainSocket.xpubSub(['1abc', '1def']); + let expected = JSON.stringify({ + op: 'xpub_sub', + xpub: '1abc' + }) + JSON.stringify({ + op: 'xpub_sub', + xpub: '1def' + }); + expect(res).toEqual(expected); + }); + }); + + describe('onOpenSub()', () => { + it('should subscribe to blocks, guid, addresses and xpubs', () => { + let guid = '1234'; + let addresses = ['123a', '1bcd']; + let xpubs = '1eff'; + let res = BlockchainSocket.onOpenSub(guid, addresses, xpubs); + let expected = JSON.stringify({ + op: 'blocks_sub' + }) + JSON.stringify({ + op: 'wallet_sub', + guid: '1234' + }) + JSON.stringify({ + op: 'addr_sub', + addr: '123a' + }) + JSON.stringify({ + op: 'addr_sub', + addr: '1bcd' + }) + JSON.stringify({ + op: 'xpub_sub', + xpub: '1eff' + }); + expect(res).toEqual(expected); + }); + }); + }); +}); diff --git a/tests/blockchain_wallet_spec.js b/tests/blockchain-wallet.spec.js similarity index 99% rename from tests/blockchain_wallet_spec.js rename to tests/blockchain-wallet.spec.js index 7707e8572..87cdc4a88 100644 --- a/tests/blockchain_wallet_spec.js +++ b/tests/blockchain-wallet.spec.js @@ -175,13 +175,13 @@ describe('Blockchain-Wallet', () => { './wallet': MyWallet, './labels': Labels, './external': External, - './address': Address, + './address.js': Address, './helpers': Helpers, './hd-wallet': HDWallet, './wallet-store': WalletStore, './blockchain-settings-api': BlockchainSettingsAPI, 'bip39': BIP39, - './rng': RNG + './rng.js': RNG }; Wallet = proxyquire('../src/blockchain-wallet', stubs); @@ -433,6 +433,8 @@ describe('Blockchain-Wallet', () => { it('defaultPbkdf2Iterations', () => expect(wallet.defaultPbkdf2Iterations).toEqual(5000)); + it('spendableAddresses', () => expect(wallet.spendableAddresses.length).toEqual(2)); + it('spendableActiveAddresses', () => expect(wallet.spendableActiveAddresses.length).toEqual(1)); }); diff --git a/tests/blockchain_socket.js b/tests/blockchain_socket.js deleted file mode 100644 index eaf57bcf9..000000000 --- a/tests/blockchain_socket.js +++ /dev/null @@ -1,219 +0,0 @@ -let proxyquire = require('proxyquireify')(require); - -describe('Websocket', () => { - let ws = (url, array, options) => ({ - on (event, callback) {}, - send (message) {}, - close () {}, - readyState: 1, - url - }); - - let Helpers = { - tor () { return false; } - }; - - let BlockchainSocket = proxyquire('../src/blockchain-socket', { - 'ws': ws, - './helpers': Helpers - }); - - describe('new', () => it('should have a URL', () => { - ws = new BlockchainSocket(); - expect(ws.wsUrl).toBeDefined(); - expect(ws.wsUrl.indexOf('wss://')).toEqual(0); - })); - - describe('instance', () => { - beforeEach(() => { - ws = new BlockchainSocket(); - }); - - describe('connect()', () => { - it('should open a socket', () => { - ws.connect(); - expect(ws.socket).toBeDefined(); - expect(ws.socket.url.indexOf('wss://')).toEqual(0); - }); - - describe('on TOR', () => { - beforeEach(() => - spyOn(Helpers, 'tor').and.returnValue(true) - ); - - it('should not open a socket', () => { - ws.connect(); - expect(ws.socket).not.toBeDefined(); - }); - }); - }); - - describe('send()', () => { - beforeEach(() => - ws.connect() - ); - - it('should pass the message on', () => { - let message = '{"op":"addr_sub", "addr": "1btc"}'; - spyOn(ws.socket, 'send'); - ws.send(message); - expect(ws.socket.send).toHaveBeenCalledWith(message); - }); - - describe('on TOR', () => { - let message = '{"op":"addr_sub", "addr": "1btc"}'; - - beforeEach(() => { - ws.socket = void 0; - spyOn(Helpers, 'tor').and.returnValue(true); - ws.connect(); - }); - - it('should not reconnect', () => { - ws.send(message); - expect(ws.socket).not.toBeDefined(); - }); - - it('should do nothing', () => - expect(() => ws.send(message)).not.toThrow() - ); - }); - }); - - describe('close()', () => { - beforeEach(() => - ws.connect() - ); - - it('should clear interval and timeout', () => { - ws.close(); - expect(ws.pingTimeoutPID).toEqual(null); - expect(ws.socket).toEqual(null); - }); - }); - - describe('ping()', () => { - beforeEach(() => - ws.connect() - ); - - it('should clear interval and timeout', () => { - spyOn(ws, 'send'); - ws.ping(); - let expected = JSON.stringify({ op: 'ping' }); - expect(ws.send).toHaveBeenCalledWith(expected); - }); - }); - - describe('msgWalletSub()', () => { - it('should subscribe to a guid', () => { - let res = ws.msgWalletSub('1234'); - let expected = JSON.stringify({ op: 'wallet_sub', guid: '1234' }); - expect(res).toEqual(expected); - }); - - it('should return an empty string if guid is missing', () => { - let res = ws.msgWalletSub(null); - let expected = ''; - expect(res).toEqual(expected); - }); - }); - - describe('msgBlockSub()', () => - it('should subscribe to new blocks', () => { - let res = ws.msgBlockSub(); - let expected = JSON.stringify({ op: 'blocks_sub' }); - expect(res).toEqual(expected); - }) - ); - - describe('msgAddrSub()', () => { - it('should return an empty string if addresses are missing', () => { - let res = ws.msgAddrSub(null); - let expected = ''; - expect(res).toEqual(expected); - }); - - it('should subscribe to one adddress', () => { - let res = ws.msgAddrSub('1abc'); - let expected = JSON.stringify({ op: 'addr_sub', addr: '1abc' }); - expect(res).toEqual(expected); - }); - - it('should subscribe to array of adddresses', () => { - let res = ws.msgAddrSub(['1abc', '1def']); - let expected = JSON.stringify({ - op: 'addr_sub', - addr: '1abc' - }) + JSON.stringify({ - op: 'addr_sub', - addr: '1def' - }); - expect(res).toEqual(expected); - }); - }); - - describe('msgXPUBSub()', () => { - it('should return an empty string if xpub is missing', () => { - let res = ws.msgXPUBSub(null); - let expected = ''; - expect(res).toEqual(expected); - }); - - it('should return an empty string if xpub is []', () => { - let res = ws.msgXPUBSub([]); - let expected = ''; - expect(res).toEqual(expected); - }); - - it('should subscribe to one xpub', () => { - let res = ws.msgXPUBSub('1abc'); - let expected = JSON.stringify({ op: 'xpub_sub', xpub: '1abc' }); - expect(res).toEqual(expected); - }); - - it('should subscribe to array of adddresses', () => { - let res = ws.msgXPUBSub(['1abc', '1def']); - let expected = JSON.stringify({ - op: 'xpub_sub', - xpub: '1abc' - }) + JSON.stringify({ - op: 'xpub_sub', - xpub: '1def' - }); - expect(res).toEqual(expected); - }); - }); - - describe('msgPing()', () => - it('should ping', () => { - let res = ws.msgPing(); - let expected = JSON.stringify({ op: 'ping' }); - expect(res).toEqual(expected); - }) - ); - - describe('msgOnOpen()', () => it('should subscribe to blocks, guid, addresses and xpubs', () => { - let guid = '1234'; - let addresses = ['123a', '1bcd']; - let xpubs = '1eff'; - let res = ws.msgOnOpen(guid, addresses, xpubs); - let expected = JSON.stringify({ - op: 'blocks_sub' - }) + JSON.stringify({ - op: 'wallet_sub', - guid: '1234' - }) + JSON.stringify({ - op: 'addr_sub', - addr: '123a' - }) + JSON.stringify({ - op: 'addr_sub', - addr: '1bcd' - }) + JSON.stringify({ - op: 'xpub_sub', - xpub: '1eff' - }); - expect(res).toEqual(expected); - })); - }); -}); diff --git a/tests/coin-selection.spec.js b/tests/coin-selection.spec.js new file mode 100644 index 000000000..f9ee028aa --- /dev/null +++ b/tests/coin-selection.spec.js @@ -0,0 +1,98 @@ +/* eslint-disable semi */ +let { map } = require('ramda') +let cs = require('../src/coin-selection') +let Coin = require('../src/coin') + +describe('Coin Selection', () => { + describe('byte sizes', () => { + it('should return the right transaction size (empty tx)', () => { + expect(cs.transactionBytes([], [])).toEqual(10) + }) + it('should return the right transaction size (1 in 2 out tx)', () => { + expect(cs.transactionBytes([{}], [{}, {}])).toEqual(225) + }) + }) + + describe('effective Balances', () => { + it('should return the right effective max Balance', () => { + let inputs = map(Coin.of, [15000, 10000, 20000]) + let outputs = map(Coin.of, [0, 0]) + expect(cs.effectiveBalance(0, inputs, outputs).value).toEqual(45000) + }) + it('should return the right effective max Balance', () => { + let inputs = map(Coin.of, [15000, 10000, 20000]) + let outputs = map(Coin.of, [0, 0]) + expect(cs.effectiveBalance(55, inputs, outputs).value).toEqual(16455) + }) + it('should return the right effective max Balance', () => { + expect(cs.effectiveBalance(55, [], []).value).toEqual(0) + }) + it('should return the right effective max Balance', () => { + expect(cs.effectiveBalance(0, [], []).value).toEqual(0) + }) + }) + + describe('findTarget', () => { + it('should return the right selection', () => { + let selection = cs.findTarget([], 0, []) + expect(selection.fee).toEqual(0) + expect(selection.inputs).toEqual([]) + expect(selection.outputs).toEqual([]) + }) + it('should return the right selection', () => { + let inputs = map(Coin.of, [1, 2, 3]) + let targets = map(Coin.of, [10000]) + let selection = cs.findTarget(targets, 0, inputs) + expect(selection.fee).toEqual(0) + expect(selection.inputs).toEqual([]) + expect(selection.outputs).toEqual(targets) + }) + it('should return the right selection', () => { + let inputs = map(Coin.of, [1, 20000, 300000]) + let targets = map(Coin.of, [10000]) + let selection = cs.findTarget(targets, 55, inputs) + expect(selection.fee).toEqual(18590) + expect(selection.inputs.map(x => x.value)).toEqual([20000, 300000]) + expect(selection.outputs.map(x => x.value)).toEqual([10000, 291410]) + }) + }) + + describe('selectAll', () => { + it('should return the right selection', () => { + let inputs = map(Coin.of, [1, 20000, 0, 0, 300000]) + let selection = cs.selectAll(55, inputs) + expect(selection.fee).toEqual(18590) + expect(selection.inputs.map(x => x.value)).toEqual([20000, 300000]) + expect(selection.outputs.map(x => x.value)).toEqual([301410]) + }) + it('should return the right selection', () => { + let inputs = map(Coin.of, []) + let selection = cs.selectAll(55, inputs) + expect(selection.fee).toEqual(0) + expect(selection.inputs.map(x => x.value)).toEqual([]) + expect(selection.outputs.map(x => x.value)).toEqual([0]) + }) + }) + + describe('descentDraw', () => { + it('should return the right selection', () => { + let inputs = map(Coin.of, [1, 20000, 0, 0, 300000, 50000, 30000]) + let targets = map(Coin.of, [100000]) + let selection = cs.descentDraw(targets, 55, inputs, 'change-address') + expect(selection.fee).toEqual(10505) + expect(selection.inputs.map(x => x.value)).toEqual([300000]) + expect(selection.outputs.map(x => x.value)).toEqual([100000, 189495]) + }) + }) + + describe('ascentDraw', () => { + it('should return the right selection', () => { + let inputs = map(Coin.of, [1, 20000, 0, 0, 300000, 50000, 30000]) + let targets = map(Coin.of, [100000]) + let selection = cs.ascentDraw(targets, 55, inputs, 'change-address') + expect(selection.fee).toEqual(34760) + expect(selection.inputs.map(x => x.value)).toEqual([20000, 30000, 50000, 300000]) + expect(selection.outputs.map(x => x.value)).toEqual([100000, 265240]) + }) + }) +}) diff --git a/tests/coin.spec.js b/tests/coin.spec.js new file mode 100644 index 000000000..d47a5adf3 --- /dev/null +++ b/tests/coin.spec.js @@ -0,0 +1,86 @@ +/* eslint-disable semi */ +const { map, reduce, curry } = require('ramda') +const Coin = require('../src/coin') + +const fold = curry((empty, xs) => reduce((acc, x) => acc.concat(x), empty, xs)) + +describe('Coin Selection', () => { + describe('letants', () => { + it('TX_EMPTY_SIZE', () => { + expect(Coin.TX_EMPTY_SIZE).toEqual(10) + }) + it('TX_INPUT_BASE', () => { + expect(Coin.TX_INPUT_BASE).toEqual(41) + }) + it('TX_EMPTY_SIZE', () => { + expect(Coin.TX_INPUT_PUBKEYHASH).toEqual(106) + }) + it('TX_EMPTY_SIZE', () => { + expect(Coin.TX_OUTPUT_BASE).toEqual(9) + }) + it('TX_EMPTY_SIZE', () => { + expect(Coin.TX_OUTPUT_PUBKEYHASH).toEqual(25) + }) + }) + + describe('Coin Type', () => { + it('coins monoid', () => { + let A = Coin.of(100) + let B = Coin.of(300) + expect(A.concat(B).value).toEqual(400) + }) + it('coins monoid', () => { + let coins = map(Coin.fromJS, [{value: 1}, {value: 2}, {value: 3}, {value: 4}, {value: 5}, {value: 6}, {value: 7}, {value: 8}, {value: 9}, {value: 10}]) + let sum = fold(Coin.empty, coins).value + expect(sum).toEqual(55) + }) + it('coins setoid', () => { + let A = Coin.of(100) + let B = Coin.of(100) + expect(A.equals(B)).toEqual(true) + }) + it('coins setoid', () => { + let A = Coin.of(100) + let B = Coin.of(0) + expect(A.equals(B)).toEqual(false) + }) + it('coins setoid', () => { + let A = Coin.of(100) + let B = Coin.of(0) + expect(A.lte(B)).toEqual(false) + }) + it('coins setoid', () => { + let A = Coin.of(0) + let B = Coin.of(100) + expect(A.lte(B)).toEqual(true) + }) + it('coins map', () => { + let A = Coin.of(100) + let square = x => x * x + expect(A.map(square).value).toEqual(square(A.value)) + }) + it('coin empty', () => { + let A = Coin.empty + expect(A.value).toEqual(0) + }) + }) + describe('coin byte sizes', () => { + it('should return the right input size', () => { + expect(Coin.inputBytes({})).toEqual(147) + }) + it('should return the right output size', () => { + expect(Coin.outputBytes({})).toEqual(34) + }) + }) + describe('effective values', () => { + it('should return the right coin value', () => { + expect(Coin.effectiveValue(55, Coin.of(15000))).toEqual(6915) + }) + it('should return zero coin value', () => { + expect(Coin.effectiveValue(55000, Coin.of(15000))).toEqual(0) + }) + it('should return max coin value', () => { + expect(Coin.effectiveValue(0, Coin.of(15000))).toEqual(15000) + }) + }) +}) diff --git a/tests/eth/eth-account.spec.js b/tests/eth/eth-account.spec.js new file mode 100644 index 000000000..2557d083d --- /dev/null +++ b/tests/eth/eth-account.spec.js @@ -0,0 +1,140 @@ +/* eslint-disable semi */ +const EthAccount = require('../../src/eth/eth-account') +const EthTxBuilder = require('../../src/eth/eth-tx-builder') +const EthWalletTx = require('../../src/eth/eth-wallet-tx') + +describe('EthAccount', () => { + const wallet = { + getPrivateKey () { + return Buffer.from('6858f113ba3bf55880105726c0d9f0495756321b45f821bc228fca2adacbb87b', 'hex') + } + } + + describe('instance', () => { + let account + beforeEach(() => { + account = EthAccount.fromWallet(wallet) + account.label = 'Test Account' + }) + + describe('getters', () => { + it('should have: address', () => { + expect(account.address).toEqual('0xD70073f72621FB90060Ac257f38cF2FF566Ea6bB') + }) + + it('should have: privateKey', () => { + let accountWithPriv = new EthAccount({ priv: wallet.getPrivateKey() }) + expect(accountWithPriv.privateKey.toString('hex')).toEqual('6858f113ba3bf55880105726c0d9f0495756321b45f821bc228fca2adacbb87b') + }) + + it('should have: wei', () => { + expect(account.wei.toString()).toEqual('0') + }) + + it('should have: balance', () => { + expect(account.balance).toEqual('0') + }) + + it('should have: txs', () => { + expect(account.txs).toEqual([]) + }) + + it('should have: nonce', () => { + expect(account.nonce).toEqual(0) + }) + + it('should have: label', () => { + expect(account.label).toEqual('Test Account') + }) + + it('should have: archived', () => { + expect(account.archived).toEqual(false) + }) + }) + + describe('.getApproximateBalance()', () => { + it('should get the balance at 8 decimals', () => { + account.setData({ balance: '12345678900000000' }) + expect(account.getApproximateBalance(8)).toEqual('0.01234568') + }) + }) + + describe('.createPayment()', () => { + it('should create a new EthTxBuilder', () => { + let payment = account.createPayment() + expect(payment.constructor).toEqual(EthTxBuilder) + }) + }) + + describe('.setData()', () => { + it('should set the account balance', () => { + account.setData({ balance: '10000000000000000' }) + expect(account.balance).toEqual('0.01') + }) + + it('should set the account nonce', () => { + account.setData({ nonce: 10 }) + expect(account.nonce).toEqual(10) + }) + }) + + describe('.setTransactions()', () => { + it('should set the account transactions', () => { + account.setTransactions({ txns: [{ hash: 'adsf' }] }) + expect(account.txs.length).toEqual(1) + expect(account.txs[0].constructor).toEqual(EthWalletTx) + }) + }) + + describe('.updateTxs()', () => { + it('should update each tx', () => { + let ethWallet = { latestBlock: 125, getTxNote () {} } + account.setTransactions({ txns: [{ hash: 'adsf' }] }) + spyOn(account.txs[0], 'update') + account.updateTxs(ethWallet) + expect(account.txs[0].update).toHaveBeenCalledWith(ethWallet) + }) + }) + + describe('.toJSON()', () => { + it('should serialize to json', () => { + let expected = '{"label":"Test Account","archived":false,"correct":false,"addr":"0xD70073f72621FB90060Ac257f38cF2FF566Ea6bB"}' + expect(JSON.stringify(account)).toEqual(expected) + }) + }) + + describe('.isCorrectPrivateKey()', () => { + it('should identify a correct private key', () => { + let correct = wallet.getPrivateKey() + expect(account.isCorrectPrivateKey(correct)).toEqual(true) + }) + + it('should identify an incorrect private key', () => { + let incorrect = Buffer.from('6034edd08a4153c66e653829bdfcd2bcb3c49a16f2d10e4023676a9574879647', 'hex') + expect(account.isCorrectPrivateKey(incorrect)).toEqual(false) + }) + }) + }) + + describe('static', () => { + describe('.defaultLabel()', () => { + it('should create a label', () => { + expect(EthAccount.defaultLabel()).toEqual('My Ether Wallet') + }) + + it('should create a label for account at index 1', () => { + expect(EthAccount.defaultLabel(1)).toEqual('My Ether Wallet 2') + }) + }) + + describe('.fromWallet()', () => { + it('should create an EthAccount instance', () => { + let account = EthAccount.fromWallet(wallet) + expect(account.constructor).toEqual(EthAccount) + expect(account.balance).toEqual('0') + expect(account.nonce).toEqual(0) + expect(account.address).toEqual('0xD70073f72621FB90060Ac257f38cF2FF566Ea6bB') + }) + }) + }) +}) diff --git a/tests/eth/eth-socket.spec.js b/tests/eth/eth-socket.spec.js new file mode 100644 index 000000000..9f9a33a79 --- /dev/null +++ b/tests/eth/eth-socket.spec.js @@ -0,0 +1,134 @@ +/* eslint-disable semi */ +const WebSocket = require('ws') +const EthSocket = require('../../src/eth/eth-socket'); + +describe('EthSocket', () => { + const url = 'wss://ws.blockchain.info/eth/inv' + const balanceResponse = JSON.stringify({ op: 'account_sub', account: '0xasdf', balance: '1000', nonce: 1, txHash: 'xyz', tx: { hash: 'xyz' } }) + const blockResponse = JSON.stringify({ op: 'block_sub', height: 123 }) + + let account + let ethWallet + + let mockAccount = (address) => ({ + address, + setData () {}, + fetchTransaction () {}, + appendTransaction () { return { update () {} } }, + isCorrectAddress (a) { return a === address } + }) + + beforeEach(() => { + account = mockAccount('0xasdf') + ethWallet = { setLatestBlock () {} } + }) + + describe('constructor', () => { + it('should pass the url', () => { + let socket = new EthSocket(url, WebSocket) + expect(socket.url).toEqual(url) + }) + }) + + describe('instance', () => { + let socket + + beforeEach(() => { + socket = new EthSocket(url, WebSocket) + spyOn(socket, 'send') + spyOn(socket, 'on') + }) + + describe('.subscribeToAccount()', () => { + it('should send an account sub message', () => { + socket.subscribeToAccount(ethWallet, account) + expect(socket.send).toHaveBeenCalledWith(EthSocket.accountSub(account)) + }) + + it('should add a message handler', () => { + socket.subscribeToAccount(ethWallet, account) + expect(socket.on).toHaveBeenCalledWith('message', jasmine.any(Function)) + }) + }) + + describe('.subscribeToBlocks()', () => { + it('should send a block sub message', () => { + socket.subscribeToBlocks() + expect(socket.send).toHaveBeenCalledWith(EthSocket.blocksSub()) + }) + + it('should add a message handler', () => { + socket.subscribeToBlocks() + expect(socket.on).toHaveBeenCalledWith('message', jasmine.any(Function)) + }) + }) + }) + + describe('static', () => { + describe('.accountMessageHandler()', () => { + it('should call .setData on message', () => { + let handler = EthSocket.accountMessageHandler(ethWallet, account) + spyOn(account, 'setData') + handler(balanceResponse) + expect(account.setData).toHaveBeenCalledWith(jasmine.objectContaining({ balance: '1000', nonce: 1 })) + }) + + it('should call .appendTransaction with the tx object', () => { + let handler = EthSocket.accountMessageHandler(ethWallet, account) + spyOn(account, 'appendTransaction').and.callThrough() + handler(balanceResponse) + expect(account.appendTransaction).toHaveBeenCalledWith({ hash: 'xyz' }) + }) + + it('should do nothing for non-balance message', () => { + let handler = EthSocket.accountMessageHandler(ethWallet, account) + spyOn(account, 'setData') + handler(blockResponse) + expect(account.setData).not.toHaveBeenCalled() + }) + + it('should do nothing when the message address does not match', () => { + let handler = EthSocket.accountMessageHandler(ethWallet, account) + spyOn(account, 'setData') + handler(JSON.stringify({ op: 'account_sub', account: '0xfdsa' })) + expect(account.setData).not.toHaveBeenCalled() + }) + + it('should reset the balance of a legacy address', () => { + let legacyAccount = mockAccount('0xabcd') + let handler = EthSocket.accountMessageHandler(ethWallet, account, legacyAccount) + spyOn(legacyAccount, 'setData') + handler(JSON.stringify({ op: 'account_sub', account: '0xasdf', tx: { from: '0xabcd' } })) + expect(legacyAccount.setData).toHaveBeenCalledWith({ balance: '0' }) + }) + }) + + describe('.blockMessageHandler()', () => { + it('should call .setLatestBlock on message', () => { + let handler = EthSocket.blockMessageHandler(ethWallet) + spyOn(ethWallet, 'setLatestBlock') + handler(blockResponse) + expect(ethWallet.setLatestBlock).toHaveBeenCalledWith(123) + }) + + it('should do nothing for non-block messages', () => { + let handler = EthSocket.blockMessageHandler(ethWallet) + spyOn(ethWallet, 'setLatestBlock') + handler(balanceResponse) + expect(ethWallet.setLatestBlock).not.toHaveBeenCalled() + }) + }) + + describe('.accountSub()', () => { + it('should produce the correct json', () => { + expect(EthSocket.accountSub(account)).toEqual('{"op":"account_sub","account":"0xasdf"}') + }) + }) + + describe('.blocksSub()', () => { + it('should produce the correct json', () => { + expect(EthSocket.blocksSub()).toEqual('{"op":"block_sub"}') + }) + }) + }) +}) diff --git a/tests/eth/eth-tx-builder.spec.js b/tests/eth/eth-tx-builder.spec.js new file mode 100644 index 000000000..c452954ab --- /dev/null +++ b/tests/eth/eth-tx-builder.spec.js @@ -0,0 +1,145 @@ +/* eslint-disable semi */ +const EthTxBuilder = require('../../src/eth/eth-tx-builder') +const EthAccount = require('../../src/eth/eth-account') +const util = require('ethereumjs-util'); + +describe('EthTxBuilder', () => { + const wallet = { + getPrivateKey () { + return Buffer.from('6858f113ba3bf55880105726c0d9f0495756321b45f821bc228fca2adacbb87b', 'hex') + } + } + + let account + let payment + + beforeEach(() => { + account = EthAccount.fromWallet(wallet) + account.setData({ balance: '100000000000000000', nonce: 3 }) + payment = new EthTxBuilder(account) + payment.setGasPrice(21) + payment.setGasLimit(21000) + }) + + describe('constructor', () => { + it('should set the nonce equal to the account nonce', () => { + expect(payment._tx.nonce.toString('hex')).toEqual('03') + }) + }) + + describe('instance', () => { + describe('getters', () => { + it('should have: fee', () => { + expect(payment.fee).toEqual(0.000441) + }) + + it('should have: amount', () => { + expect(payment.amount).toEqual(0) + }) + + it('should have: available', () => { + expect(payment.available).toEqual(0.099559) + }) + }) + + describe('.setTo()', () => { + it('should set the to field', () => { + payment.setTo('0xd70073f72621fb90060ac257f38cf2ff566ea6bb') + expect(payment._tx.to.toString('hex')).toEqual('d70073f72621fb90060ac257f38cf2ff566ea6bb') + }) + + it('should fail for an invalid address', () => { + let setTo = () => payment.setTo('xyz') + expect(setTo).toThrow() + }) + }) + + describe('.setValue()', () => { + it('should set the value', () => { + payment.setValue(0.5) + expect(payment.amount).toEqual(0.5) + }) + + it('should set a value that is more precise than is possible for wei', () => { + payment.setValue(0.0025460841226194113) + expect(payment.amount).toEqual(0.002546084122619411) + }) + }) + + describe('.setGasPrice()', () => { + it('should set the gas price', () => { + payment.setGasPrice(10) + expect(payment.fee).toEqual(0.00021) + }) + }) + + describe('.setGasLimit()', () => { + it('should set the gas limit', () => { + payment.setGasLimit(20000) + expect(payment.fee).toEqual(0.00042) + }) + }) + + describe('.setSweep()', () => { + it('should set a sweep transaction', () => { + payment.setSweep() + expect(payment.amount).toEqual(0.099559) + expect(payment.fee).toEqual(0.000441) + }) + + it('should sweep with a very large value', () => { + account.setData({ balance: '19991027158563527', nonce: 3 }) + payment.setSweep() + expect(new util.BN(payment._tx.value).toString()).toEqual('19550027158563527') + expect(payment.amount).toEqual(0.019550027158563528) + expect(payment.fee).toEqual(0.000441) + }) + }) + + describe('.sign()', () => { + it('should sign the transaction', () => { + let sign = () => payment.sign(wallet.getPrivateKey()) + expect(sign).not.toThrow() + }) + + it('should fail to sign with an incorrect key', () => { + let incorrect = Buffer.from('6034edd08a4153c66e653829bdfcd2bcb3c49a16f2d10e4023676a9574879647', 'hex') + let sign = () => payment.sign(incorrect) + expect(sign).toThrow() + }) + }) + + describe('.publish()', () => { + beforeEach(() => { + payment.setTo('0xd70073f72621fb90060ac257f38cf2ff566ea6bb') + payment.setSweep() + payment.sign(wallet.getPrivateKey()) + spyOn(EthTxBuilder, 'pushTx').and.returnValue(Promise.resolve()) + }) + + it('should call pushtx with the raw tx hex', () => { + payment.publish() + expect(EthTxBuilder.pushTx).toHaveBeenCalledWith('0xf86c038504e3b2920082520894d70073f72621fb90060ac257f38cf2ff566ea6bb880161b4620d317000801ba0ae46bd95a2483d464b8a61663928b36f7a310a01e3207301eb1e9ce19dc6188ea0645036efbb4ad2c567e873653a021e7ccd5c4818546f0c3be16ffb1d4b1075fd') + }) + }) + + describe('.toRaw()', () => { + it('should serialize to tx hex', () => { + payment.setTo('0xd70073f72621fb90060ac257f38cf2ff566ea6bb') + payment.setSweep() + payment.sign(wallet.getPrivateKey()) + expect(payment.toRaw()).toEqual('0xf86c038504e3b2920082520894d70073f72621fb90060ac257f38cf2ff566ea6bb880161b4620d317000801ba0ae46bd95a2483d464b8a61663928b36f7a310a01e3207301eb1e9ce19dc6188ea0645036efbb4ad2c567e873653a021e7ccd5c4818546f0c3be16ffb1d4b1075fd') + }) + }) + }) + + describe('static', () => { + it('should have a GAS_PRICE constant', () => { + expect(EthTxBuilder.GAS_PRICE).toEqual(21) + }) + + it('should have a GAS_LIMIT constant', () => { + expect(EthTxBuilder.GAS_LIMIT).toEqual(21000) + }) + }) +}) diff --git a/tests/eth/eth-wallet-tx.spec.js b/tests/eth/eth-wallet-tx.spec.js new file mode 100644 index 000000000..e8b473f8d --- /dev/null +++ b/tests/eth/eth-wallet-tx.spec.js @@ -0,0 +1,143 @@ +/* eslint-disable semi */ +const EthWalletTx = require('../../src/eth/eth-wallet-tx') + +describe('EthWalletTx', () => { + const txData = { + 'blockNumber': 123, + 'timeStamp': 1500000000, + 'hash': '0xfdsa', + 'from': '0xasdf1', + 'to': '0xasdf2', + 'value': '10000000000000000', + 'gas': 21000, + 'gasPrice': 21000000000, + 'gasUsed': 21000 + } + + const mockAccount = (addr) => ({ + isCorrectAddress (a) { + return a === addr + } + }) + + describe('instance', () => { + let tx + beforeEach(() => { + tx = EthWalletTx.fromJSON(txData) + }) + + describe('getters', () => { + it('should have: amount', () => { + expect(tx.amount).toEqual('0.01') + }) + + it('should have: fee', () => { + expect(tx.fee).toEqual('0.000441') + }) + + it('should have: to', () => { + expect(tx.to).toEqual('0xasdf2') + }) + + it('should have: from', () => { + expect(tx.from).toEqual('0xasdf1') + }) + + it('should have: hash', () => { + expect(tx.hash).toEqual('0xfdsa') + }) + + it('should have: time', () => { + expect(tx.time).toEqual(1500000000) + }) + + it('should have: confirmations', () => { + expect(tx.confirmations).toEqual(0) + }) + + it('should have: note', () => { + expect(tx.note).toEqual(null) + }) + }) + + describe('.getTxType()', () => { + it('should identify a received tx', () => { + let account = mockAccount('0xasdf2') + expect(tx.getTxType(account)).toEqual('received') + }) + + it('should identify a sent tx', () => { + let account = mockAccount('0xasdf1') + expect(tx.getTxType(account)).toEqual('sent') + }) + + it('should return null if neither sent or received', () => { + let account = mockAccount('0xasdf3') + expect(tx.getTxType(account)).toEqual(null) + }) + }) + + describe('.isToAccount()', () => { + it('should be true if tx is to account', () => { + let account = mockAccount('0xasdf2') + expect(tx.isToAccount(account)).toEqual(true) + }) + + it('should be false if tx is not to account', () => { + let account = mockAccount('0xasdf1') + expect(tx.isToAccount(account)).toEqual(false) + }) + }) + + describe('.isFromAccount()', () => { + it('should be true if tx is from account', () => { + let account = mockAccount('0xasdf1') + expect(tx.isFromAccount(account)).toEqual(true) + }) + + it('should be false if tx is not from account', () => { + let account = mockAccount('0xasdf2') + expect(tx.isFromAccount(account)).toEqual(false) + }) + }) + + describe('.update()', () => { + it('should update the confirmations', () => { + let ethWallet = { latestBlock: 125, getTxNote () {} } + tx.update(ethWallet) + expect(tx.confirmations).toEqual(3) + }) + + it('should not set confirmations to less than 0', () => { + let ethWallet = { latestBlock: 100, getTxNote () {} } + tx.update(ethWallet) + expect(tx.confirmations).toEqual(0) + }) + + it('should set the tx note', () => { + let ethWallet = { latestBlock: 100, getTxNote () {} } + spyOn(ethWallet, 'getTxNote').and.returnValue('note') + tx.update(ethWallet) + expect(tx.note).toEqual('note') + expect(ethWallet.getTxNote).toHaveBeenCalledWith(tx.hash) + }) + }) + }) + + describe('static', () => { + describe('.txTimeSort()', () => { + it('should sort transactions by time', () => { + let txs = [{ time: 3 }, { time: 4 }, { time: 1 }, { time: 2 }] + txs.sort(EthWalletTx.txTimeSort) + expect(txs.map(tx => tx.time)).toEqual([4, 3, 2, 1]) + }) + }) + + describe('.fromJSON', () => { + it('should create a new EthWalletTx from json', () => { + let tx = EthWalletTx.fromJSON(txData) + expect(tx.constructor).toEqual(EthWalletTx) + }) + }) + }) +}) diff --git a/tests/eth/eth-wallet.spec.js b/tests/eth/eth-wallet.spec.js new file mode 100644 index 000000000..a53dc37b7 --- /dev/null +++ b/tests/eth/eth-wallet.spec.js @@ -0,0 +1,368 @@ +const EthWallet = require('../../src/eth/eth-wallet'); +const EthAccount = require('../../src/eth/eth-account'); +const EthSocket = require('../../src/eth/eth-socket'); +const BlockchainWalletMock = require('../__mocks__/blockchain-wallet.mock'); + +// cache constants for test performance +describe('EthWallet', () => { + const wsUrl = 'wss://ws.blockchain.com/eth/inv'; + + describe('static', () => { + it('should be given the correct defaults', () => { + let eth = new EthWallet('', null); + expect(eth.defaultAccountIdx).toEqual(0); + expect(eth.accounts).toEqual([]); + }); + + describe('.fromBlockchainWallet', () => { + it('should initialize correctly', () => { + let wallet = new BlockchainWalletMock(); + spyOn(wallet, 'metadata'); + EthWallet.fromBlockchainWallet(wallet); + expect(wallet.metadata).toHaveBeenCalledWith(5); + }); + }); + }); + + describe('instance', () => { + let eth; + let wallet; + + beforeEach(() => { + wallet = new BlockchainWalletMock(); + eth = EthWallet.fromBlockchainWallet(wallet); + eth.connect(wsUrl); + eth.createAccount(); + }); + + describe('getters', () => { + it('should have: wei', () => { + expect(eth.wei.toString()).toEqual('0'); + }); + + it('should have: balance', () => { + expect(eth.balance).toEqual('0'); + }); + + it('should have: defaultAccountIdx', () => { + expect(eth.defaultAccountIdx).toEqual(0); + }); + + it('should have: defaultAccount', () => { + expect(eth.defaultAccount).toEqual(eth.accounts[eth.defaultAccountIdx]); + }); + + it('should have: accounts', () => { + expect(eth.accounts).toEqual([jasmine.any(EthAccount)]); + }); + + it('should have: activeAccounts', () => { + expect(eth.activeAccounts).toEqual([jasmine.any(EthAccount)]); + }); + + it('should have: latestBlock', () => { + expect(eth.latestBlock).toEqual(null); + }); + + it('should have: defaults', () => { + expect(eth.defaults).toEqual({ GAS_PRICE: 21, GAS_LIMIT: 21000 }); + }); + }); + + describe('.getApproximateBalance()', () => { + it('should get the balance at 8 decimals', () => { + eth.defaultAccount.setData({ balance: '12345678900000000' }); + expect(eth.getApproximateBalance(8)).toEqual('0.01234568'); + }); + }); + + describe('.getAccount', () => { + it('should get the first account', () => { + expect(eth.getAccount(0)).toEqual(eth.defaultAccount); + }); + + it('should fail if the account index is out of range', () => { + let getAccount = () => eth.getAccount(1); + expect(getAccount).toThrow(); + }); + }); + + describe('.setAccountLabel', () => { + it('should set the account label', () => { + expect(eth.defaultAccount.label).toEqual('My Ether Wallet'); + eth.setAccountLabel(0, 'Renamed'); + expect(eth.defaultAccount.label).toEqual('Renamed'); + }); + + it('should sync after', () => { + spyOn(eth, 'sync'); + eth.setAccountLabel(0, 'Renamed'); + expect(eth.sync).toHaveBeenCalled(); + }); + }); + + describe('.archiveAccount', () => { + beforeEach(() => { + eth.createAccount(); + }); + + it('should archive an account', () => { + let account = eth.getAccount(1); + eth.archiveAccount(account); + expect(account.archived).toEqual(true); + }); + + it('should prevent archiving the default account', () => { + let archiveAccount = () => eth.archiveAccount(eth.defaultAccount); + expect(archiveAccount).toThrow(); + }); + + it('should sync after', () => { + spyOn(eth, 'sync'); + eth.archiveAccount(eth.getAccount(1)); + expect(eth.sync).toHaveBeenCalled(); + }); + }); + + describe('.unarchiveAccount', () => { + beforeEach(() => { + eth.createAccount(); + eth.archiveAccount(eth.getAccount(1)); + }); + + it('should unarchive an account', () => { + let account = eth.getAccount(1); + expect(account.archived).toEqual(true); + eth.unarchiveAccount(account); + expect(account.archived).toEqual(false); + }); + + it('should sync after', () => { + spyOn(eth, 'sync'); + eth.unarchiveAccount(eth.getAccount(1)); + expect(eth.sync).toHaveBeenCalled(); + }); + }); + + describe('.createAccount', () => { + it('should create a new account', () => { + eth.createAccount(); + let account = eth.getAccount(1); + expect(account.label).toEqual('My Ether Wallet 2'); + }); + + it('should create with a custom label', () => { + eth.createAccount('Custom'); + let account = eth.getAccount(1); + expect(account.label).toEqual('Custom'); + }); + + it('should add the account to the wallet', () => { + eth.createAccount(); + let account = eth.getAccount(1); + expect(account).toEqual(eth.getAccount(1)); + }); + + it('should sync after', () => { + spyOn(eth, 'sync'); + eth.createAccount(); + expect(eth.sync).toHaveBeenCalled(); + }); + }); + + describe('.getTxNote', () => { + beforeEach(() => { + eth.setTxNote('', 'my note'); + }); + + it('should return a tx note', () => { + expect(eth.getTxNote('')).toEqual('my note'); + }); + + it('should return null if hash not found', () => { + expect(eth.getTxNote('unknown')).toEqual(null); + }); + }); + + describe('.setTxNote', () => { + it('should set a tx note', () => { + eth.setTxNote('', 'my note'); + expect(eth.getTxNote('')).toEqual('my note'); + }); + + it('should fail if the note is not a string', () => { + let setTxNote = () => eth.setTxNote('', 7); + expect(setTxNote).toThrow(); + }); + + it('should fail if the note is undefined', () => { + let setTxNote = () => eth.setTxNote(''); + expect(setTxNote).toThrow(); + }); + + it('should remove a note when passed an empty string', () => { + eth.setTxNote('', 'my note'); + expect(eth.getTxNote('')).toEqual('my note'); + eth.setTxNote('', ''); + expect(eth.getTxNote('')).toEqual(null); + }); + + it('should update account txs', () => { + spyOn(eth.defaultAccount, 'updateTxs'); + eth.setTxNote('', 'my note'); + expect(eth.defaultAccount.updateTxs).toHaveBeenCalledWith(eth); + }); + + it('should sync after', () => { + spyOn(eth, 'sync'); + eth.setTxNote('', 'my note'); + expect(eth.sync).toHaveBeenCalled(); + }); + }); + + describe('.setDefaultAccountIndex', () => { + beforeEach(() => { + eth.createAccount(); + }); + + it('should set the default index', () => { + eth.setDefaultAccountIndex(1); + expect(eth.defaultAccountIdx).toEqual(1); + }); + + it('should fail to set to a negative index', () => { + let setIdx = () => eth.setDefaultAccountIndex(-1); + expect(setIdx).toThrow(); + }); + + it('should fail to set to an out of bounds index', () => { + let setIdx = () => eth.setDefaultAccountIndex(2); + expect(setIdx).toThrow(); + }); + + it('should not sync if the index did not change', () => { + spyOn(eth, 'sync'); + eth.setDefaultAccountIndex(eth.defaultAccountIdx); + expect(eth.sync).not.toHaveBeenCalled(); + }); + + it('should sync after', () => { + spyOn(eth, 'sync'); + eth.setDefaultAccountIndex(1); + expect(eth.sync).toHaveBeenCalled(); + }); + }); + + describe('.setLatestBlock', () => { + it('should set the latest block', () => { + eth.setLatestBlock(123); + expect(eth.latestBlock).toEqual(123); + }); + + it('should tell the wallet eth accounts to update txs', () => { + spyOn(eth, 'updateTxs'); + eth.setLatestBlock(123); + expect(eth.updateTxs).toHaveBeenCalled(); + }); + }); + + describe('.connect', () => { + beforeEach(() => { + delete eth._socket; + }); + + it('should connect the initialize the socket', () => { + eth.connect(wsUrl); + expect(eth._socket).toBeDefined(); + expect(eth._socket.constructor).toEqual(EthSocket); + }); + + it('should only create the socket once', () => { + eth.connect(wsUrl); + let s = eth._socket; + eth.connect(wsUrl); + expect(eth._socket).toEqual(s); + }); + + it('should start listening for new blocks', () => { + spyOn(EthSocket, 'blockMessageHandler').and.callThrough(); + eth.connect(wsUrl); + eth._socket.emit('open'); + expect(EthSocket.blockMessageHandler).toHaveBeenCalledWith(eth); + }); + }); + + describe('.updateTxs', () => { + it('should tell the eth accounts to update txs', () => { + spyOn(eth.defaultAccount, 'updateTxs'); + eth.updateTxs(); + expect(eth.defaultAccount.updateTxs).toHaveBeenCalledWith(eth); + }); + }); + + describe('.getPrivateKeyForAccount', () => { + const correctKey = '19ee4f0ce2f780022b4bb14f489e5c9feb281d24d26a68d576851437b941a596'; + + it('should get the correct private key', () => { + let priv = eth.getPrivateKeyForAccount(eth.defaultAccount); + expect(priv.toString('hex')).toEqual(correctKey); + }); + + it('should get the correct private key when encrypted', () => { + wallet.isDoubleEncrypted = true; + let priv = eth.getPrivateKeyForAccount(eth.defaultAccount, 'correct'); + expect(priv.toString('hex')).toEqual(correctKey); + }); + + it('should fail when encrypted and passed the wrong secpass', () => { + wallet.isDoubleEncrypted = true; + let get = () => eth.getPrivateKeyForAccount(eth.defaultAccount, 'wrong'); + expect(get).toThrow(); + }); + }); + + describe('.getPrivateKeyForLegacyAccount', () => { + const legacyKey = '5f72fb06a622711c6480e4fea91993eed4bb7b5834da35033a0400261528185e'; + + beforeEach(() => { + let addr = EthAccount.privateKeyToAddress('0x' + legacyKey); + eth._legacyAccount = new EthAccount({ addr }); + }); + + it('should get the correct private key', () => { + let priv = eth.getPrivateKeyForLegacyAccount(); + expect(priv.toString('hex')).toEqual(legacyKey); + }); + + it('should get the correct private key when encrypted', () => { + wallet.isDoubleEncrypted = true; + let priv = eth.getPrivateKeyForLegacyAccount('correct'); + expect(priv.toString('hex')).toEqual(legacyKey); + }); + + it('should fail when encrypted and passed the wrong secpass', () => { + wallet.isDoubleEncrypted = true; + let get = () => eth.getPrivateKeyForLegacyAccount('wrong'); + expect(get).toThrow(); + }); + }); + + describe('.deriveChild', () => { + it('should fail if wallet is encrypted and pw is missing', () => { + wallet.isDoubleEncrypted = true; + let derive = () => eth.deriveChild(0); + expect(derive).toThrow(); + }); + }); + + describe('.toJSON', () => { + it('should serialize to json', () => { + eth.createAccount('New'); + eth.setDefaultAccountIndex(1); + eth.setTxNote('', 'my note'); + let json = JSON.stringify(eth.toJSON()); + expect(json).toEqual('{"has_seen":false,"default_account_idx":1,"accounts":[{"label":"My Ether Wallet","archived":false,"correct":true,"addr":"0x5532f8B7d3f80b9a0892a6f5F665a77358544acD"},{"label":"New","archived":false,"correct":true,"addr":"0x91C29C839c8d2B01f249e64DAB3B70DDdE896277"}],"tx_notes":{"":"my note"},"last_tx":null}'); + }); + }); + }); +}); diff --git a/tests/exchange_delegate_spec.js b/tests/exchange-delegate.spec.js similarity index 98% rename from tests/exchange_delegate_spec.js rename to tests/exchange-delegate.spec.js index 8c6e9cf7d..18a2d0d77 100644 --- a/tests/exchange_delegate_spec.js +++ b/tests/exchange-delegate.spec.js @@ -1,4 +1,5 @@ let proxyquire = require('proxyquireify')(require); +let exchangeMock = require('./__mocks__/bitcoin-exchange-client.mock'); let delegate; @@ -101,6 +102,7 @@ const TX = ({hash, block_height}) => ({ }); let stubs = { + 'bitcoin-exchange-client': exchangeMock, './wallet': MyWallet, './api': API, './wallet-store': WalletStore, diff --git a/tests/external_spec.js b/tests/external.spec.js similarity index 98% rename from tests/external_spec.js rename to tests/external.spec.js index 248d995ab..d9b2b2eef 100644 --- a/tests/external_spec.js +++ b/tests/external.spec.js @@ -293,10 +293,10 @@ describe('External', () => { it('hasExchangeAccount', () => { expect(e.hasExchangeAccount).toEqual(false); e._coinify.hasAccount = true; - expect(e.hasExchangeAccount).toEqual(true); + expect(e.hasExchangeAccount).toEqual('coinify'); e._coinify.hasAccount = false; e._sfox.hasAccount = true; - expect(e.hasExchangeAccount).toEqual(true); + expect(e.hasExchangeAccount).toEqual('sfox'); }); }); }); diff --git a/tests/hdaccount_spec.js b/tests/hd-account.spec.js similarity index 100% rename from tests/hdaccount_spec.js rename to tests/hd-account.spec.js diff --git a/tests/hdwallet_spec.js b/tests/hd-wallet.spec.js similarity index 100% rename from tests/hdwallet_spec.js rename to tests/hd-wallet.spec.js diff --git a/tests/helpers_spec.js b/tests/helpers.spec.js similarity index 99% rename from tests/helpers_spec.js rename to tests/helpers.spec.js index fc09d6d4a..8712df62a 100644 --- a/tests/helpers_spec.js +++ b/tests/helpers.spec.js @@ -135,6 +135,7 @@ describe('Helpers', () => { let observer; beforeEach(() => { + jasmine.clock().uninstall(); jasmine.clock().install(); observer = { func: jasmine.createSpy('func'), @@ -142,10 +143,6 @@ describe('Helpers', () => { }; }); - afterEach(() => { - jasmine.clock().uninstall(); - }); - it('should only execute once', () => { let async = Helpers.asyncOnce(observer.func, 20, observer.before); diff --git a/tests/keychain_spec.js b/tests/keychain.spec.js similarity index 100% rename from tests/keychain_spec.js rename to tests/keychain.spec.js diff --git a/tests/keyring_spec.js b/tests/keyring.spec.js similarity index 100% rename from tests/keyring_spec.js rename to tests/keyring.spec.js diff --git a/tests/labels_spec.js b/tests/labels.spec.js similarity index 100% rename from tests/labels_spec.js rename to tests/labels.spec.js diff --git a/tests/metadata_spec.js b/tests/metadata.spec.js similarity index 99% rename from tests/metadata_spec.js rename to tests/metadata.spec.js index b585fbcee..d831624dd 100644 --- a/tests/metadata_spec.js +++ b/tests/metadata.spec.js @@ -127,7 +127,7 @@ describe('Metadata', () => { it('should verify and compute the new magic hash', () => { let verified = Metadata.verifyResponse(response.address, response); let expectedMagicHash = Buffer.from('sS4b2JTeq53jyrAVYX8WQeIU/wDezNiFX34jNYSmfKQ=', 'base64'); - return expect(verified).toEqual(jasmine.objectContaining({compute_new_magic_hash: expectedMagicHash})); + expect(expectedMagicHash.compare(verified.compute_new_magic_hash)).toEqual(0); }); return it('should fail and launch an exception', () => { diff --git a/tests/mocks/spender_mock.js b/tests/mocks/spender_mock.js deleted file mode 100644 index 51d070988..000000000 --- a/tests/mocks/spender_mock.js +++ /dev/null @@ -1,98 +0,0 @@ -var Bitcoin = require('bitcoinjs-lib'); - -var spenderM = {}; - -// ############################################################################# -// Addres to Address payment mock - -spenderM.addToAdd = {}; -spenderM.addToAdd.coins = { - 'unspent_outputs': [ - { - 'tx_hash': 'c971328f18336dbc6961c35378a9fa53561571357e8f8c1793fe2d4075f12af4', - 'tx_hash_big_endian': 'f42af175402dfe93178c8f7e3571155653faa97853c36169bc6d33188f3271c9', - 'tx_index': 85110550, - 'tx_output_n': 1, - 'script': '76a9147acf6bb7b804392ed3f3537a4f999220cf1c4e8288ac', - 'value': 40000, - 'value_hex': '009c40', - 'confirmations': 267, - 'hash': 'f42af175402dfe93178c8f7e3571155653faa97853c36169bc6d33188f3271c9', - 'index': 1 - }, - { - 'tx_hash': '6876d0264ed25aa69b30cda92020f7d7e78ae611be91368c843dfb27139fb45a', - 'tx_hash_big_endian': '5ab49f1327fb3d848c3691be11e68ae7d7f72020a9cd309ba65ad24e26d07668', - 'tx_index': 85114355, - 'tx_output_n': 0, - 'script': '76a9147acf6bb7b804392ed3f3537a4f999220cf1c4e8288ac', - 'value': 30000, - 'value_hex': '7530', - 'confirmations': 262, - 'hash': '5ab49f1327fb3d848c3691be11e68ae7d7f72020a9cd309ba65ad24e26d07668', - 'index': 0 - } - ] -}; -// encrypted with password 'hola' -spenderM.addToAdd.encPrivateKey = '6lzfKSFi/9xkli8eRaPDoyHDkaBzRWKdWEamoMvsmJptnhwPZzA/w5EzIljjjrNpbQn8CzvxJci756AXO/Cq7A=='; -spenderM.addToAdd.privateKey = '8CvkFF5WZ7w5YDeoPfJ9BNPKEQUgqZGrHUSdboHaRyoi'; -spenderM.addToAdd.fromAddress = '1CCMvFa5Ric3CcnRWJzSaZYXmCtZzzDLiX'; -spenderM.addToAdd.toAddress = '1Q5pU54M3ombtrGEGpAheWQtcX2DZ3CdqF'; -spenderM.addToAdd.amount = 20000; -spenderM.addToAdd.toAddresses = ['1PiHKNK4NTxcuZEWqxKn9tF82kUoen2QTD', '1Q5pU54M3ombtrGEGpAheWQtcX2DZ3CdqF']; -spenderM.addToAdd.amounts = [20000, 10000]; -spenderM.addToAdd.txHash1M = '0100000001c971328f18336dbc6961c35378a9fa53561571357e8f8c1793fe2d4075f12af4010000008a47304402202fdf972a3481bd81442e6c212cbfd07cd8e1db440b5a4981b059f96e4c9342290220353447e526dc141308428b8affce3028cc21bded6d158b5b8471cde51ecf901c0141044ca8bee9fa5d4e372a00e65116db5eeb8920bb796c12beaeb994e2026b411d3837494022cced88832dac7a494a47de55fc90dcd5e20bbc96f116c44773167a87ffffffff02204e0000000000001976a914f9217131115f61d6835b97bf388089c9f999e33688ac10270000000000001976a914fd342e1afdf81720024ec3bdeaeb6e2753973d0d88ac00000000'; -spenderM.addToAdd.txHash2M = '0100000001c971328f18336dbc6961c35378a9fa53561571357e8f8c1793fe2d4075f12af4010000008b483045022100eb594841c5c78d9fc56543e33c4fabdb17117e0acb2de727bb8d24f01036de9f0220727009bee45330678dfc4bde9b04754012e932e5f8e0554b01b75b4bb74956150141044ca8bee9fa5d4e372a00e65116db5eeb8920bb796c12beaeb994e2026b411d3837494022cced88832dac7a494a47de55fc90dcd5e20bbc96f116c44773167a87ffffffff0210270000000000001976a914fd342e1afdf81720024ec3bdeaeb6e2753973d0d88ac204e0000000000001976a914f9217131115f61d6835b97bf388089c9f999e33688ac00000000'; -spenderM.addToAdd.fee = 10000; -spenderM.addToAdd.note = undefined; -spenderM.addToAdd.txHash1 = '0100000001c971328f18336dbc6961c35378a9fa53561571357e8f8c1793fe2d4075f12af4010000008b483045022100c3ea4e526b5aa88a3f4122c093f27afc3b1a7f6a3d6938139668a1ed8d0a77c202207b3b53f96827938f22677a64068e50907a5662bc108d35e0180269872bf9c8be0141044ca8bee9fa5d4e372a00e65116db5eeb8920bb796c12beaeb994e2026b411d3837494022cced88832dac7a494a47de55fc90dcd5e20bbc96f116c44773167a87ffffffff02204e0000000000001976a914fd342e1afdf81720024ec3bdeaeb6e2753973d0d88ac10270000000000001976a9147acf6bb7b804392ed3f3537a4f999220cf1c4e8288ac00000000'; -spenderM.addToAdd.txHash2 = '0100000001c971328f18336dbc6961c35378a9fa53561571357e8f8c1793fe2d4075f12af4010000008a473044022044e111fbce09ce4a4013a94be2136c8f7e2ca6439ea24e37fcda934f1d6fcc34022077670efeee20559a28500d7840df061e24b505f8a309a1eabe87edaad633c0cb0141044ca8bee9fa5d4e372a00e65116db5eeb8920bb796c12beaeb994e2026b411d3837494022cced88832dac7a494a47de55fc90dcd5e20bbc96f116c44773167a87ffffffff0210270000000000001976a9147acf6bb7b804392ed3f3537a4f999220cf1c4e8288ac204e0000000000001976a914fd342e1afdf81720024ec3bdeaeb6e2753973d0d88ac00000000'; -spenderM.addToAdd.sweepHex = '0100000002c971328f18336dbc6961c35378a9fa53561571357e8f8c1793fe2d4075f12af4010000008a47304402203cd3133b9ac7d8768e6cf2cc54d0328a4d6cfa0a3907a7f103c868bc40d945d402202f59a390e61582a3d9da403542573fb8d3b7072bd4c4475b14a98101cca7a2090141044ca8bee9fa5d4e372a00e65116db5eeb8920bb796c12beaeb994e2026b411d3837494022cced88832dac7a494a47de55fc90dcd5e20bbc96f116c44773167a87ffffffff6876d0264ed25aa69b30cda92020f7d7e78ae611be91368c843dfb27139fb45a000000008a473044022077e571a6781123e1791a29022438b12a6607db7c04ceaa47f7636c171c56313602203e69e7fd67c8a344325f8e2fe5d511ddd6978a9ada246234534f561b01a2e4bc0141044ca8bee9fa5d4e372a00e65116db5eeb8920bb796c12beaeb994e2026b411d3837494022cced88832dac7a494a47de55fc90dcd5e20bbc96f116c44773167a87ffffffff0160ea0000000000001976a914fd342e1afdf81720024ec3bdeaeb6e2753973d0d88ac00000000'; -spenderM.addToAdd.toHdAccount = [{ getReceiveAddress () { return '1Q5pU54M3ombtrGEGpAheWQtcX2DZ3CdqF'; } }]; -spenderM.addToAdd.fromAddPKey = Bitcoin.ECPair.fromWIF('5JdSM2jdvnZm8sLBz8Ac9Sfq1utDcxopzPhswf3c645s18AjX92'); -spenderM.addToAdd.privKey = '8CvkFF5WZ7w5YDeoPfJ9BNPKEQUgqZGrHUSdboHaRyoi'; -// ############################################################################# -spenderM.AccountToAdd = {}; -spenderM.AccountToAdd.coins = { 'unspent_outputs': [ - { - 'tx_hash': 'd93b4753e25b1669cb6522784af7ae391cb7181048e9330e09b62cd5374fe100', - 'tx_hash_big_endian': '00e14f37d52cb6090e33e9481018b71c39aef74a782265cb69165be253473bd9', - 'tx_index': 85757889, - 'tx_output_n': 0, - 'script': '76a914a93b2f63bb449b5c7c9bc05b37c541577266691b88ac', - 'xpub': { - 'm': 'xpub6DHN1xpggNEUbWgGJyMPRFGvYm6pizUnv4TQMAtgYBikkh75dyp9Gf9QcKETpWZkLjtB4zYr2eVaHQ4g3rhj46Aeu4FykMWSayrqmRmEMEZ', - 'path': 'M/0/30' - }, - 'value': 200000, - 'value_hex': '030d40', - 'confirmations': 0, - 'hash': '00e14f37d52cb6090e33e9481018b71c39aef74a782265cb69165be253473bd9', - 'index': 0 - } -] -}; -spenderM.AccountToAdd.toAddress = '1Q5pU54M3ombtrGEGpAheWQtcX2DZ3CdqF'; -spenderM.AccountToAdd.amount = 10000; -spenderM.AccountToAdd.fee = 10000; -spenderM.AccountToAdd.note = undefined; -spenderM.AccountToAdd.fromAccount = 0; -spenderM.AccountToAdd.txHash1 = 'a75fb7ac06ea57291ba23dfdb0b1328d5ecd532df45075089ed82fa4bb6e4b71'; -spenderM.AccountToAdd.txHash2 = 'e636e504df7dd6100f20bf0bdaaf9bda4d2b9402d39d76ebbc283485d4d466ab'; -spenderM.AccountToAdd.fromHdAccount = [ - { - getReceiveAddress () { return '1Q5pU54M3ombtrGEGpAheWQtcX2DZ3CdqF'; }, - getChangeAddress () { return '1PiHKNK4NTxcuZEWqxKn9tF82kUoen2QTD'; }, - containsAddressInCache () { return false; }, - extendedPrivateKey: 'xprv9zJ1cTHnqzgBP2boCwpP47LBzjGLKXkwYqXoYnV4yrBmstmw6SVtirpvm4GESg9YLn9R386qpmnsrcC5rvrpEJAXSrfqQR3qGtjGv5ddV9g' - } -]; -spenderM.AccountToAdd.fromHdAccountERROR = [ - { - getReceiveAddress () { return '1Q5pU54M3ombtrGEGpAheWQtcX2DZ3CdqF'; }, - getChangeAddress () { return '1PiHKNK4NTxcuZEWqxKn9tF82kUoen2QTD'; }, - containsAddressInCache () { return true; }, - extendedPrivateKey: 'xprv9zJ1cTHnqzgBP2boCwpP47LBzjGLKXkwYqXoYnV4yrBmstmw6SVtirpvm4GESg9YLn9R386qpmnsrcC5rvrpEJAXSrfqQR3qGtjGv5ddV9g' - } -]; diff --git a/tests/payment_spec.js b/tests/payment.spec.js similarity index 98% rename from tests/payment_spec.js rename to tests/payment.spec.js index 501892e36..cead66b02 100644 --- a/tests/payment_spec.js +++ b/tests/payment.spec.js @@ -1,7 +1,8 @@ let proxyquire = require('proxyquireify')(require); -let unspent = require('./data/unspent-outputs'); -let fees = require('./data/fee-data'); +let unspent = require('./__data__/unspent-outputs'); +let fees = require('./__data__/fee-data'); +let exchangeMock = require('./__mocks__/bitcoin-exchange-client.mock'); let MyWallet = { wallet: { @@ -41,6 +42,7 @@ let Helpers = {guessFee (nInputs, nOutputs, feePerKb) { return nInputs * 100; }}; let Payment = proxyquire('../src/payment', { + 'bitcoin-exchange-client': exchangeMock, './wallet': MyWallet, './api': API, './helpers': Helpers diff --git a/tests/rng_spec.js b/tests/rng.spec.js similarity index 100% rename from tests/rng_spec.js rename to tests/rng.spec.js diff --git a/tests/shift/quote.spec.js b/tests/shift/quote.spec.js new file mode 100644 index 000000000..dd2493106 --- /dev/null +++ b/tests/shift/quote.spec.js @@ -0,0 +1,132 @@ +/* eslint-disable semi */ +const mockTxStatResponse = require('../__mocks__/tx-stat-response.mock') +const Quote = require('../../src/shift/quote') + +describe('ShapeShift.Quote', () => { + const quoteData = { + 'orderId': '18408bc9-a592-4d15-9409-fe0b8f56c408', + 'pair': 'btc_eth', + 'withdrawal': '0x632a4f72b7dd73f60194e09a073ca494ccba5a9c', + 'withdrawalAmount': '1.13500523', + 'deposit': '1L2mnCoD8hzTukbGBvkwyoGBeAfgzqhcx3', + 'depositAmount': '0.1', + 'expiration': 1502292508112, + 'quotedRate': '11.40005229', + 'maxLimit': 1.51084099, + 'returnAddress': '1EhvfATiZukipzSxhHw5cJ5F5N56HawExu', + 'apiPubKey': 'shapeshift', + 'minerFee': '0.005' + } + + describe('static', () => { + describe('.fromApiResponse', () => { + it('should create a quote from api response json', () => { + let quote = Quote.fromApiResponse(quoteData) + expect(quote.constructor).toEqual(Quote) + }) + }) + }) + + describe('instance', () => { + let quote + + beforeEach(() => { + quote = Quote.fromApiResponse(quoteData) + }) + + describe('getters', () => { + it('should get: orderId', () => { + expect(quote.orderId).toEqual(quoteData.orderId) + }) + + it('should get: pair', () => { + expect(quote.pair).toEqual(quoteData.pair) + }) + + it('should get: rate', () => { + expect(quote.rate).toEqual(quoteData.quotedRate) + }) + + it('should get: expires', () => { + expect(+quote.expires).toEqual(quoteData.expiration) + }) + + it('should get: depositAddress', () => { + expect(quote.depositAddress).toEqual(quoteData.deposit) + }) + + it('should get: depositAmount', () => { + expect(quote.depositAmount).toEqual(quoteData.depositAmount) + }) + + it('should get: withdrawalAddress', () => { + expect(quote.withdrawalAddress).toEqual(quoteData.withdrawal) + }) + + it('should get: withdrawalAmount', () => { + expect(quote.withdrawalAmount).toEqual(quoteData.withdrawalAmount) + }) + + it('should get: minerFee', () => { + expect(quote.minerFee).toEqual(quoteData.minerFee) + }) + + it('should get: fromCurrency', () => { + expect(quote.fromCurrency).toEqual('btc') + }) + + it('should get: toCurrency', () => { + expect(quote.toCurrency).toEqual('eth') + }) + }) + + describe('.setFieldsFromTxStat', () => { + it('should set the proper fields', () => { + quote = new Quote({}); + let response = mockTxStatResponse('success') + quote.setFieldsFromTxStat(response) + expect(quote.pair).toEqual('ETH_BTC') + expect(quote.depositAmount).toEqual(response.incomingCoin) + expect(quote.withdrawalAddress).toEqual(response.withdraw) + expect(quote.withdrawalAmount).toEqual(response.outgoingCoin) + }) + + it('should should not override existing fields', () => { + let response = mockTxStatResponse('success') + quote.setFieldsFromTxStat(response) + expect(quote.pair).toEqual(quote.pair) + expect(quote.depositAmount).toEqual(quote.depositAmount) + expect(quote.withdrawalAddress).toEqual(quote.withdrawalAddress) + expect(quote.withdrawalAmount).toEqual(quote.withdrawalAmount) + }) + }) + + describe('.toJSON', () => { + it('should return the full json', () => { + let json = JSON.stringify({ + 'orderId': '18408bc9-a592-4d15-9409-fe0b8f56c408', + 'quotedRate': '11.40005229', + 'deposit': '1L2mnCoD8hzTukbGBvkwyoGBeAfgzqhcx3', + 'minerFee': '0.005', + 'pair': 'btc_eth', + 'depositAmount': '0.1', + 'withdrawal': '0x632a4f72b7dd73f60194e09a073ca494ccba5a9c', + 'withdrawalAmount': '1.13500523' + }) + expect(JSON.stringify(quote)).toEqual(json) + }) + }) + + describe('.toPartialJSON', () => { + it('should return the minimal json', () => { + let json = JSON.stringify({ + 'orderId': '18408bc9-a592-4d15-9409-fe0b8f56c408', + 'quotedRate': '11.40005229', + 'deposit': '1L2mnCoD8hzTukbGBvkwyoGBeAfgzqhcx3', + 'minerFee': '0.005' + }) + expect(JSON.stringify(quote.toPartialJSON())).toEqual(json) + }) + }) + }) +}) diff --git a/tests/shift/shift-payment.spec.js b/tests/shift/shift-payment.spec.js new file mode 100644 index 000000000..e9f6d5c3f --- /dev/null +++ b/tests/shift/shift-payment.spec.js @@ -0,0 +1,20 @@ +/* eslint-disable semi */ +const ShiftPayment = require('../../src/shift/shift-payment') + +describe('ShapeShift.ShiftPayment', () => { + describe('.setFromQuote', () => { + it('should set the quote', () => { + let mockQuote = {} + let payment = new ShiftPayment() + payment.setFromQuote(mockQuote) + expect(payment.quote).toEqual(mockQuote) + }) + }) + + describe('.fromWallet', () => { + it('should construct a quote with a wallet', () => { + let payment = ShiftPayment.fromWallet({}) + expect(payment.constructor).toEqual(ShiftPayment) + }) + }) +}) diff --git a/tests/shift/trade.spec.js b/tests/shift/trade.spec.js new file mode 100644 index 000000000..da675bed8 --- /dev/null +++ b/tests/shift/trade.spec.js @@ -0,0 +1,245 @@ +/* eslint-disable semi */ +const Trade = require('../../src/shift/trade') +const Quote = require('../../src/shift/quote') + +describe('ShapeShift.Trade', () => { + const quoteData = { + 'orderId': '18408bc9-a592-4d15-9409-fe0b8f56c408', + 'pair': 'btc_eth', + 'withdrawal': '0x632a4f72b7dd73f60194e09a073ca494ccba5a9c', + 'withdrawalAmount': '1.13500523', + 'deposit': '1L2mnCoD8hzTukbGBvkwyoGBeAfgzqhcx3', + 'depositAmount': '0.1', + 'expiration': 1502292508112, + 'quotedRate': '11.40005229', + 'maxLimit': 1.51084099, + 'returnAddress': '1EhvfATiZukipzSxhHw5cJ5F5N56HawExu', + 'apiPubKey': 'shapeshift', + 'minerFee': '0.005' + } + + const tradeData = { + 'status': 'complete', + 'hashIn': '2eeda12829d025d4672a4653e6ca9c93321727bf54d01f8ebfb18c6abd2c7925', + 'hashOut': '0xc1341e8ec046dff48f524cd87fe812c6fd86a41c868ff5843f04619906882123', + 'time': 'Mon Oct 09 2017 10:57:50 GMT+0100 (BST)', + 'quote': { + 'orderId': '2b92f15c-1bc9-50d3-73d1-8cd9f332ba94', + 'quotedRate': '5.15', + 'deposit': '1FcBaMUHXMZRsbwUUwAYWdsaxoyvYFxRbW', + 'minerFee': '0.001' + } + } + + describe('static', () => { + describe('trade states', () => { + it('should have NO_DEPOSITS', () => { + expect(Trade.NO_DEPOSITS).toEqual('no_deposits') + }) + + it('should have RECEIVED', () => { + expect(Trade.RECEIVED).toEqual('received') + }) + + it('should have COMPLETE', () => { + expect(Trade.COMPLETE).toEqual('complete') + }) + + it('should have FAILED', () => { + expect(Trade.FAILED).toEqual('failed') + }) + + it('should have RESOLVED', () => { + expect(Trade.RESOLVED).toEqual('resolved') + }) + }) + + describe('.fromMetadata', () => { + it('should create a trade from the metadata service format', () => { + let trade = Trade.fromMetadata(tradeData) + expect(trade.constructor).toEqual(Trade) + }) + }) + + describe('.fromQuote', () => { + it('should create a trade from api response json', () => { + let quote = Quote.fromApiResponse(quoteData) + let trade = Trade.fromQuote(quote) + expect(trade.constructor).toEqual(Trade) + }) + }) + }) + + describe('instance', () => { + let trade + let now = new Date() + + beforeEach(() => { + spyOn(Date, 'now').and.returnValue(now.getTime()) + let quote = Quote.fromApiResponse(quoteData) + trade = Trade.fromQuote(quote) + }) + + describe('getters', () => { + it('should get: quote', () => { + expect(trade.quote.constructor).toEqual(Quote) + }) + + it('should get: pair', () => { + expect(trade.pair).toEqual(quoteData.pair) + }) + + it('should get: rate', () => { + expect(trade.rate).toEqual(quoteData.quotedRate) + }) + + it('should get: fromCurrency', () => { + expect(trade.fromCurrency).toEqual('btc') + }) + + it('should get: toCurrency', () => { + expect(trade.toCurrency).toEqual('eth') + }) + + it('should get: depositAddress', () => { + expect(trade.depositAddress).toEqual(quoteData.deposit) + }) + + it('should get: depositAmount', () => { + expect(trade.depositAmount).toEqual(quoteData.depositAmount) + }) + + it('should get: withdrawalAddress', () => { + expect(trade.withdrawalAddress).toEqual(quoteData.withdrawal) + }) + + it('should get: withdrawalAmount', () => { + expect(trade.withdrawalAmount).toEqual(quoteData.withdrawalAmount) + }) + + it('should get: error', () => { + trade._error = 'some error' + expect(trade.error).toEqual('some error') + }) + + it('should get: status', () => { + trade._status = 'some status' + expect(trade.status).toEqual('some status') + }) + + it('should get: isPending', () => { + trade._status = null + expect(trade.isPending).toEqual(false) + trade._status = Trade.NO_DEPOSITS + expect(trade.isPending).toEqual(true) + trade._status = Trade.RECEIVED + expect(trade.isPending).toEqual(true) + }) + + it('should get: isWaitingForDeposit', () => { + trade._status = null + expect(trade.isWaitingForDeposit).toEqual(false) + trade._status = Trade.NO_DEPOSITS + expect(trade.isWaitingForDeposit).toEqual(true) + }) + + it('should get: isProcessing', () => { + trade._status = null + expect(trade.isProcessing).toEqual(false) + trade._status = Trade.RECEIVED + expect(trade.isProcessing).toEqual(true) + }) + + it('should get: isComplete', () => { + trade._status = null + expect(trade.isComplete).toEqual(false) + trade._status = Trade.COMPLETE + expect(trade.isComplete).toEqual(true) + }) + + it('should get: isFailed', () => { + trade._status = null + expect(trade.isFailed).toEqual(false) + trade._status = Trade.FAILED + expect(trade.isFailed).toEqual(true) + }) + + it('should get: isResolved', () => { + trade._status = null + expect(trade.isResolved).toEqual(false) + trade._status = Trade.RESOLVED + expect(trade.isResolved).toEqual(true) + }) + + it('should get: failedReason', () => { + trade._error = 'reason' + expect(trade.failedReason).toEqual('reason') + }) + + it('should get: depositHash', () => { + trade._hashIn = 'hash_in' + expect(trade.depositHash).toEqual('hash_in') + }) + + it('should get: withdrawalHash', () => { + trade._hashOut = 'hash_out' + expect(trade.withdrawalHash).toEqual('hash_out') + }) + + it('should get: time', () => { + expect(trade.time.constructor).toEqual(Date) + }) + + it('should use .timestamp over .time', () => { + let time = new Date('Thu Oct 12 2017 16:56:12 GMT-0400 (EDT)') + let timestamp = new Date(1507841784426) + trade = new Trade({ time, timestamp }) + expect(trade.time.getTime()).toEqual(timestamp.getTime()) + }) + }) + + describe('.setStatus', () => { + it('should set from a completed status', () => { + let statusObj = { status: 'complete', transaction: 'tx_hash_out' } + trade.setStatus(statusObj) + expect(trade.isComplete).toEqual(true) + expect(trade.withdrawalHash).toEqual('tx_hash_out') + }) + + it('should should not override existing fields', () => { + let statusObj = { status: 'failed', error: 'some_error' } + trade.setStatus(statusObj) + expect(trade.isFailed).toEqual(true) + expect(trade.failedReason).toEqual('some_error') + }) + }) + + describe('.setDepositHash', () => { + it('should set the proper fields', () => { + trade.setDepositHash('deposit_hash') + expect(trade.depositHash).toEqual('deposit_hash') + }) + }) + + describe('.toJSON', () => { + it('should return the full json', () => { + let json = JSON.stringify({ + 'status': 'no_deposits', + 'time': now.toString(), + 'timestamp': now.getTime(), + 'quote': { + 'orderId': '18408bc9-a592-4d15-9409-fe0b8f56c408', + 'quotedRate': '11.40005229', + 'deposit': '1L2mnCoD8hzTukbGBvkwyoGBeAfgzqhcx3', + 'minerFee': '0.005', + 'pair': 'btc_eth', + 'depositAmount': '0.1', + 'withdrawal': '0x632a4f72b7dd73f60194e09a073ca494ccba5a9c', + 'withdrawalAmount': '1.13500523' + } + }) + expect(JSON.stringify(trade)).toEqual(json) + }) + }) + }) +}) diff --git a/tests/signer.spec.js b/tests/signer.spec.js new file mode 100644 index 000000000..e728cd920 --- /dev/null +++ b/tests/signer.spec.js @@ -0,0 +1,24 @@ +/* eslint-disable semi */ +let { compose, map } = require('ramda') +let Wallet = require('../src/blockchain-wallet') +let { addIndexToOutput } = require('../src/bch/bch-api') +let signer = require('../src/signer') +let Coin = require('../src/coin') +let cs = require('../src/coin-selection') +let signingData = require('./__data__/signing-data.json') + +describe('Signer', () => { + let wallet = new Wallet(signingData.wallet) + let inputToCoin = compose(Coin.fromJS, addIndexToOutput(wallet.hdwallet)) + let selection = cs.selectAll(55, map(inputToCoin, signingData.unspent_outputs), '1HV9RPcPAwcCEDmNET5BEWvVVgCY3Pbg7i') + + it('should sign a btc transaction', () => { + let tx = signer.signBitcoin(void 0, wallet, selection) + expect(tx.toHex()).toEqual(signingData.tx_hex_btc) + }) + + it('should sign a bch transaction', () => { + let tx = signer.signBitcoinCash(void 0, wallet, selection) + expect(tx.toHex()).toEqual(signingData.tx_hex_bch) + }) +}) diff --git a/tests/stable-socket.spec.js b/tests/stable-socket.spec.js new file mode 100644 index 000000000..f1a91bf22 --- /dev/null +++ b/tests/stable-socket.spec.js @@ -0,0 +1,249 @@ +/* eslint-disable semi */ +describe('StableSocket', () => { + let WebSocket = require('./__mocks__/ws.mock') + let StableSocket = require('../src/stable-socket') + let Helpers = require('../src/helpers') + + describe('instance', () => { + let ws + let createSocket = (url) => new WebSocket(url) + + beforeEach(() => { + jasmine.clock().uninstall() + jasmine.clock().install() + ws = new StableSocket('wss://ws.bc.info') + spyOn(Helpers, 'tor').and.returnValue(false) + spyOn(ws, 'createSocket').and.callFake(createSocket) + }) + + describe('constructor()', () => { + it('should have a URL', () => { + expect(ws.wsUrl).toBeDefined() + expect(ws.wsUrl).toEqual('wss://ws.bc.info') + }) + }) + + describe('getters', () => { + beforeEach(() => { + ws.connect() + }) + + it('should have: url', () => { + expect(ws.url).toEqual('wss://ws.bc.info') + }) + + it('should have: isConnecting', () => { + ws._socket.readyState = 0 + expect(ws.isConnecting).toEqual(true) + }) + + it('should have: isOpen', () => { + ws._socket.readyState = 1 + expect(ws.isOpen).toEqual(true) + }) + + it('should have: isClosing', () => { + ws._socket.readyState = 2 + expect(ws.isClosing).toEqual(true) + }) + + it('should have: isClosed', () => { + ws._socket.readyState = 3 + expect(ws.isClosed).toEqual(true) + }) + }) + + describe('connect()', () => { + beforeEach(() => { + }) + + afterEach(() => { + }) + + it('should open a socket', () => { + ws.connect() + expect(ws.createSocket).toHaveBeenCalled() + expect(ws._socket).toBeDefined() + expect(ws._socket.url).toEqual('wss://ws.bc.info') + }) + + it('should set the ping interval', () => { + spyOn(ws, 'ping') + ws.connect() + expect(ws._pingIntervalPID).toBeDefined() + expect(ws.ping).not.toHaveBeenCalled() + jasmine.clock().tick(15000) + expect(ws.ping).toHaveBeenCalled() + }) + + it('should set up event listeners', () => { + ws.connect() + expect(ws._socket.on).toHaveBeenCalledTimes(3) + expect(ws._socket.on).toHaveBeenCalledWith('open', jasmine.any(Function)) + expect(ws._socket.on).toHaveBeenCalledWith('message', jasmine.any(Function)) + expect(ws._socket.on).toHaveBeenCalledWith('close', jasmine.any(Function)) + }) + + describe('on TOR', () => { + beforeEach(() => { + Helpers.tor.and.returnValue(true) + }) + + it('should not open a socket', () => { + ws.connect() + expect(ws._socket).not.toBeDefined() + }) + }) + }) + + describe('send()', () => { + let message = JSON.stringify({ 'op': 'addr_sub', 'addr': '1btc' }) + + it('should pass the message on to the socket', () => { + ws.connect() + spyOn(ws._socket, 'send') + ws.send(message) + expect(ws._socket.send).toHaveBeenCalledWith(message) + }) + + it('should delay sending until socket is open', () => { + ws.connect() + spyOn(ws._socket, 'send') + ws._socket.readyState = 0 + ws._socket.on.and.callFake((_, cb) => { ws._socket.readyState = 1; cb() }) + ws.send(message) + expect(ws._socket.send).toHaveBeenCalledWith(message) + }) + + describe('on TOR', () => { + beforeEach(() => { + Helpers.tor.and.returnValue(true) + }) + + it('should not send', () => { + ws.connect() + expect(() => ws.send('{}')).not.toThrow() + }) + }) + }) + + describe('close()', () => { + beforeEach(() => { + ws.connect() + }) + + it('should close the socket', () => { + let spy = ws._socket.close = jasmine.createSpy('close') + ws._socket.readyState = ws._socket.OPEN + ws.close() + expect(spy).toHaveBeenCalled() + }) + + it('should not try to close the socket if it is closing', () => { + let spy = ws._socket.close = jasmine.createSpy('close') + ws._socket.readyState = ws._socket.CLOSING + ws.close() + expect(spy).not.toHaveBeenCalled() + }) + + it('should clear the ping interval', () => { + spyOn(ws, 'clearPingInterval').and.callThrough() + ws.close() + expect(ws.clearPingInterval).toHaveBeenCalled() + }) + + it('should clear the ping timeout', () => { + spyOn(ws, 'clearPingTimeout').and.callThrough() + ws.close() + expect(ws.clearPingTimeout).toHaveBeenCalled() + }) + + it('should set the socket to null', () => { + expect(ws._socket).not.toEqual(null) + ws.close() + expect(ws._socket).toEqual(null) + }) + }) + + describe('ping()', () => { + beforeEach(() => { + ws.connect() + }) + + it('send a ping message', () => { + spyOn(ws, 'send') + ws.ping() + let expected = JSON.stringify({ op: 'ping' }) + expect(ws.send).toHaveBeenCalledWith(expected) + }) + + it('should close and reconnect after a given interval', () => { + spyOn(ws, 'close') + spyOn(ws, 'connect') + ws.ping() + + jasmine.clock().tick(4000); + expect(ws.close).not.toHaveBeenCalled() + expect(ws.connect).not.toHaveBeenCalled() + + jasmine.clock().tick(1000); + expect(ws.close).toHaveBeenCalled() + expect(ws.connect).toHaveBeenCalled() + }) + + it('should not close and reconnect if timeout is cleared', () => { + spyOn(ws, 'close') + spyOn(ws, 'connect') + + ws.ping() + ws.clearPingTimeout() + + jasmine.clock().tick(5000); + expect(ws.close).not.toHaveBeenCalled() + expect(ws.connect).not.toHaveBeenCalled() + }) + }) + + describe('setPongHandler()', () => { + it('should set a message handler', () => { + spyOn(ws, 'on') + ws.setPongHandler() + expect(ws.on).toHaveBeenCalledWith('message', jasmine.any(Function)) + }) + + it('should clear the ping timeout on pong', () => { + spyOn(ws, 'clearPingTimeout') + spyOn(ws, 'on').and.callFake((_, cb) => cb(JSON.stringify({ op: 'pong' }))) + ws.setPongHandler() + expect(ws.clearPingTimeout).toHaveBeenCalled() + }) + + it('should not do anything on a non-pong op', () => { + spyOn(ws, 'clearPingTimeout') + spyOn(ws, 'on').and.callFake((_, cb) => cb(JSON.stringify({ op: 'other' }))) + ws.setPongHandler() + expect(ws.clearPingTimeout).not.toHaveBeenCalled() + }) + }) + }) + + describe('static', () => { + describe('op()', () => { + it('should create a message payload', () => { + let message = StableSocket.op('some_op') + expect(message).toEqual(JSON.stringify({ op: 'some_op' })) + }) + + it('should create a message payload with extra data', () => { + let message = StableSocket.op('some_op', { a: 'x', n: 2 }) + expect(message).toEqual(JSON.stringify({ op: 'some_op', a: 'x', n: 2 })) + }) + }) + + describe('pingMessage()', () => { + it('should create a ping message payload', () => { + expect(StableSocket.pingMessage()).toEqual(JSON.stringify({ op: 'ping' })) + }) + }) + }) +}) diff --git a/tests/transaction_list_spec.js b/tests/transaction-list.spec.js similarity index 98% rename from tests/transaction_list_spec.js rename to tests/transaction-list.spec.js index 96ebe8a20..058067c2d 100644 --- a/tests/transaction_list_spec.js +++ b/tests/transaction-list.spec.js @@ -1,7 +1,7 @@ let proxyquire = require('proxyquireify')(require); -let tx = require('./data/transactions')['default']; +let tx = require('./__data__/transactions')['default']; let TransactionList = proxyquire('../src/transaction-list', { './wallet-transaction': { diff --git a/tests/transaction_spend_spec.js b/tests/transaction.spec.js similarity index 99% rename from tests/transaction_spend_spec.js rename to tests/transaction.spec.js index 8b150cfc5..b4be3ea30 100644 --- a/tests/transaction_spend_spec.js +++ b/tests/transaction.spec.js @@ -215,7 +215,7 @@ describe('Transaction', () => { let getIn; let getOut; - let testVectors = require('./data/bip69-test-vectors'); + let testVectors = require('./__data__/bip69-test-vectors'); beforeEach(() => { getIn = ({hash}) => [].reverse.call(hash).toString('hex'); diff --git a/tests/wallet_crypto_spec.js b/tests/wallet-crypto.spec.js similarity index 99% rename from tests/wallet_crypto_spec.js rename to tests/wallet-crypto.spec.js index d95327770..cf73888c8 100644 --- a/tests/wallet_crypto_spec.js +++ b/tests/wallet-crypto.spec.js @@ -10,7 +10,7 @@ let stubs = { let WalletCrypto = proxyquire('../src/wallet-crypto', stubs); describe('WalletCrypto', () => { - let walletData = require('./data/wallet-data'); + let walletData = require('./__data__/wallet-data'); describe('stretchPassword()', () => it('should stretch a password', () => { @@ -329,7 +329,7 @@ describe('WalletCrypto', () => { }); describe('aes-256', () => { - let vectors = require('./data/aes-256-vectors'); + let vectors = require('./__data__/aes-256-vectors'); ['cbc', 'ofb', 'ecb'].forEach(mode => diff --git a/tests/wallet_network_spec.js b/tests/wallet-network.spec.js similarity index 99% rename from tests/wallet_network_spec.js rename to tests/wallet-network.spec.js index 5d17969aa..c0043cf31 100644 --- a/tests/wallet_network_spec.js +++ b/tests/wallet-network.spec.js @@ -1,4 +1,5 @@ let proxyquire = require('proxyquireify')(require); +let exchangeMock = require('./__mocks__/bitcoin-exchange-client.mock'); describe('WalletNetwork', () => { const API = { @@ -105,6 +106,7 @@ describe('WalletNetwork', () => { }; let WalletNetwork = proxyquire('../src/wallet-network', { + 'bitcoin-exchange-client': exchangeMock, './api': API, './wallet-crypto': WalletCrypto, './wallet': MyWallet, diff --git a/tests/wallet_signup_spec.js b/tests/wallet-signup.spec.js similarity index 100% rename from tests/wallet_signup_spec.js rename to tests/wallet-signup.spec.js diff --git a/tests/wallet_token_endpoints.js b/tests/wallet-token-endpoints.spec.js similarity index 97% rename from tests/wallet_token_endpoints.js rename to tests/wallet-token-endpoints.spec.js index b2e29bc25..e7e6de66b 100644 --- a/tests/wallet_token_endpoints.js +++ b/tests/wallet-token-endpoints.spec.js @@ -1,4 +1,5 @@ let proxyquire = require('proxyquireify')(require); +let exchangeMock = require('./__mocks__/bitcoin-exchange-client.mock'); describe('token endpoints', () => { let API = { @@ -26,6 +27,7 @@ describe('token endpoints', () => { let Helpers = {}; let WTE = proxyquire('../src/wallet-token-endpoints', { + 'bitcoin-exchange-client': exchangeMock, './api': API, './helpers': Helpers }); diff --git a/tests/wallet_transaction_spec.js b/tests/wallet-transaction.spec.js similarity index 99% rename from tests/wallet_transaction_spec.js rename to tests/wallet-transaction.spec.js index 789d9fc1f..87859d8b7 100644 --- a/tests/wallet_transaction_spec.js +++ b/tests/wallet-transaction.spec.js @@ -24,7 +24,7 @@ let MyWallet = { } }; -let transactions = require('./data/transactions'); +let transactions = require('./__data__/transactions'); let Tx = proxyquire('../src/wallet-transaction', { './wallet': MyWallet diff --git a/tests/wallet_spec.js b/tests/wallet.spec.js similarity index 99% rename from tests/wallet_spec.js rename to tests/wallet.spec.js index 043113d63..5fe55be72 100644 --- a/tests/wallet_spec.js +++ b/tests/wallet.spec.js @@ -1,4 +1,5 @@ let proxyquire = require('proxyquireify')(require); +let exchangeMock = require('./__mocks__/bitcoin-exchange-client.mock'); let walletStoreGuid; let walletStoreEncryptedWalletData; @@ -116,13 +117,14 @@ const RNG = { }; let stubs = { + 'bitcoin-exchange-client': exchangeMock, './wallet-store': WalletStore, './wallet-crypto': WalletCrypto, './wallet-signup': WalletSignup, './api': API, './wallet-network': WalletNetwork, 'bip39': BIP39, - './rng': RNG, + './rng.js': RNG, './blockchain-settings-api': BlockchainSettingsAPI }; diff --git a/webpack.config.js b/webpack.config.js index e6461c413..7fe177230 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,7 +3,7 @@ let webpack = require('webpack'); let StringReplacePlugin = require('string-replace-webpack-plugin'); let config = { - entry: './index.js', + entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'my-wallet.js', @@ -39,8 +39,14 @@ let config = { } ] }, + node: { + fs: 'empty' + }, plugins: [ - new StringReplacePlugin() + new StringReplacePlugin(), + new webpack.EnvironmentPlugin({ + NODE_ENV: 'prod' + }) ] }; diff --git a/yarn.lock b/yarn.lock index 4e0831fe1..6f591d3e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4,72 +4,89 @@ JSONStream@^1.0.3: version "1.3.1" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a" + resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a" dependencies: jsonparse "^1.2.0" through ">=2.2.7 <3" -abbrev@1, abbrev@1.0.x: +abbrev@1: + version "1.1.1" + resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + +abbrev@1.0.x: version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" accepts@1.3.3: version "1.3.3" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" + resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" dependencies: mime-types "~2.1.11" negotiator "0.6.1" acorn-dynamic-import@^2.0.0: version "2.0.2" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" + resolved "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" dependencies: acorn "^4.0.3" acorn-jsx@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" dependencies: acorn "^3.0.4" acorn-to-esprima@^2.0.6, acorn-to-esprima@^2.0.8: version "2.0.8" - resolved "https://registry.yarnpkg.com/acorn-to-esprima/-/acorn-to-esprima-2.0.8.tgz#003f0c642eb92132f417d3708f14ada82adf2eb1" + resolved "https://registry.npmjs.org/acorn-to-esprima/-/acorn-to-esprima-2.0.8.tgz#003f0c642eb92132f417d3708f14ada82adf2eb1" acorn@^1.0.3: version "1.2.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-1.2.2.tgz#c8ce27de0acc76d896d2b1fad3df588d9e82f014" + resolved "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz#c8ce27de0acc76d896d2b1fad3df588d9e82f014" acorn@^3.0.4: version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + resolved "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" acorn@^4.0.3: - version "4.0.11" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0" + version "4.0.13" + resolved "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" -acorn@^5.0.0, acorn@^5.0.1: - version "5.0.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" +acorn@^5.0.0, acorn@^5.2.1: + version "5.2.1" + resolved "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz#317ac7821826c22c702d66189ab8359675f135d7" + +aes-js@^0.2.3: + version "0.2.4" + resolved "https://registry.npmjs.org/aes-js/-/aes-js-0.2.4.tgz#94b881ab717286d015fa219e08fb66709dda5a3d" after@0.8.2: version "0.8.2" - resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" + resolved "https://registry.npmjs.org/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" ajv-keywords@^1.0.0, ajv-keywords@^1.1.1: version "1.5.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" + resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" ajv@^4.7.0, ajv@^4.9.1: version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + resolved "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" +ajv@^5.1.0: + version "5.3.0" + resolved "https://registry.npmjs.org/ajv/-/ajv-5.3.0.tgz#4414ff74a50879c208ee5fdc826e32c303549eda" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + resolved "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" dependencies: kind-of "^3.0.2" longest "^1.0.1" @@ -77,103 +94,107 @@ align-text@^0.1.1, align-text@^0.1.3: amdefine@>=0.0.4: version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + resolved "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" ansi-escapes@^1.1.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" ansi-regex@^1.0.0, ansi-regex@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-1.1.1.tgz#41c847194646375e6a1a5d10c3ca054ef9fc980d" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz#41c847194646375e6a1a5d10c3ca054ef9fc980d" ansi-regex@^2.0.0: version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" ansi-styles@^2.0.1, ansi-styles@^2.2.1: version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" anymatch@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" + version "1.3.2" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" dependencies: - arrify "^1.0.0" micromatch "^2.1.5" + normalize-path "^2.0.0" aproba@^1.0.3: - version "1.1.1" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.1.tgz#95d3600f07710aa0e9298c726ad5ecf2eacbabab" + version "1.2.0" + resolved "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" are-we-there-yet@~1.1.2: version "1.1.4" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + resolved "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" dependencies: delegates "^1.0.0" readable-stream "^2.0.6" argparse@^1.0.7: version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" dependencies: sprintf-js "~1.0.2" arr-diff@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + resolved "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" dependencies: arr-flatten "^1.0.1" arr-flatten@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" + version "1.1.0" + resolved "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" array-filter@~0.0.0: version "0.0.1" - resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" + resolved "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" array-find-index@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + resolved "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" array-map@~0.0.0: version "0.0.0" - resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" + resolved "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" array-reduce@~0.0.0: version "0.0.0" - resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" + resolved "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" array-slice@^0.2.3: version "0.2.3" - resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" + resolved "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" array-union@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + resolved "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" dependencies: array-uniq "^1.0.1" array-uniq@^1.0.1: version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + resolved "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" array-unique@^0.2.1: version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + resolved "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" arraybuffer.slice@0.0.6: version "0.0.6" - resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca" + resolved "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca" arrify@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" asn1.js@^4.0.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.1.tgz#48ba240b45a9280e94748990ba597d216617fd40" + version "4.9.2" + resolved "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.2.tgz#8117ef4f7ed87cd8f89044b5bff97ac243a16c9a" dependencies: bn.js "^4.0.0" inherits "^2.0.1" @@ -181,106 +202,168 @@ asn1.js@^4.0.0: asn1@~0.2.3: version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" assert-plus@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" assert@^1.1.1, assert@^1.4.0: version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + resolved "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" dependencies: util "0.10.3" astw@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/astw/-/astw-2.2.0.tgz#7bd41784d32493987aeb239b6b4e1c57a873b917" + resolved "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz#7bd41784d32493987aeb239b6b4e1c57a873b917" dependencies: acorn "^4.0.3" async-each@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + resolved "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" async@1.x, async@^1.4.0: version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + resolved "https://registry.npmjs.org/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" async@^2.1.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/async/-/async-2.4.0.tgz#4990200f18ea5b837c2cc4f8c031a6985c385611" + version "2.6.0" + resolved "https://registry.npmjs.org/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" dependencies: lodash "^4.14.0" async@~0.2.10: version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + resolved "https://registry.npmjs.org/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" asynckit@^0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" aws-sign2@~0.6.0: version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" -aws4@^1.2.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" -babel-code-frame@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" - dependencies: - chalk "^1.1.0" - esutils "^2.0.2" - js-tokens "^3.0.0" +aws4@^1.2.1, aws4@^1.6.0: + version "1.6.0" + resolved "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +babel-cli@^6.24.1: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1" + dependencies: + babel-core "^6.26.0" + babel-polyfill "^6.26.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + commander "^2.11.0" + convert-source-map "^1.5.0" + fs-readdir-recursive "^1.0.0" + glob "^7.1.2" + lodash "^4.17.4" + output-file-sync "^1.1.2" + path-is-absolute "^1.0.1" + slash "^1.0.0" + source-map "^0.5.6" + v8flags "^2.1.1" + optionalDependencies: + chokidar "^1.6.1" -babel-core@^6.0.14, babel-core@^6.24.1: +babel-cli@~6.24.0: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.24.1.tgz#8c428564dce1e1f41fb337ec34f4c3b022b5ad83" + resolved "https://registry.npmjs.org/babel-cli/-/babel-cli-6.24.1.tgz#207cd705bba61489b2ea41b5312341cf6aca2283" dependencies: - babel-code-frame "^6.22.0" - babel-generator "^6.24.1" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" + babel-core "^6.24.1" + babel-polyfill "^6.23.0" babel-register "^6.24.1" babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - babylon "^6.11.0" + commander "^2.8.1" convert-source-map "^1.1.0" - debug "^2.1.1" - json5 "^0.5.0" + fs-readdir-recursive "^1.0.0" + glob "^7.0.0" lodash "^4.2.0" - minimatch "^3.0.2" + output-file-sync "^1.1.0" path-is-absolute "^1.0.0" - private "^0.1.6" slash "^1.0.0" source-map "^0.5.0" + v8flags "^2.0.10" + optionalDependencies: + chokidar "^1.6.1" -babel-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.1.tgz#e715f486c58ded25649d888944d52aa07c5d9497" +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.0.14, babel-core@^6.24.1, babel-core@^6.26.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-types "^6.24.1" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.0" + debug "^2.6.8" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.7" + slash "^1.0.0" + source-map "^0.5.6" + +babel-generator@^6.26.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" detect-indent "^4.0.0" jsesc "^1.3.0" - lodash "^4.2.0" - source-map "^0.5.0" + lodash "^4.17.4" + source-map "^0.5.6" trim-right "^1.0.1" +babel-helper-bindify-decorators@^6.24.1: + version "6.24.1" + resolved "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + babel-helper-call-delegate@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + resolved "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" dependencies: babel-helper-hoist-variables "^6.24.1" babel-runtime "^6.22.0" @@ -288,17 +371,34 @@ babel-helper-call-delegate@^6.24.1: babel-types "^6.24.1" babel-helper-define-map@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz#7a9747f258d8947d32d515f6aa1c7bd02204a080" + version "6.26.0" + resolved "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" dependencies: babel-helper-function-name "^6.24.1" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + dependencies: babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-explode-class@^6.24.1: + version "6.24.1" + resolved "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz#7dc2a3910dee007056e1e31d640ced3d54eaa9eb" + dependencies: + babel-helper-bindify-decorators "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" babel-types "^6.24.1" - lodash "^4.2.0" babel-helper-function-name@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + resolved "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" dependencies: babel-helper-get-function-arity "^6.24.1" babel-runtime "^6.22.0" @@ -308,36 +408,46 @@ babel-helper-function-name@^6.24.1: babel-helper-get-function-arity@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + resolved "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" babel-helper-hoist-variables@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + resolved "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" babel-helper-optimise-call-expression@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + resolved "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" babel-helper-regex@^6.24.1: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-remap-async-to-generator@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz#d36e22fab1008d79d88648e32116868128456ce8" + resolved "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" dependencies: + babel-helper-function-name "^6.24.1" babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" babel-types "^6.24.1" - lodash "^4.2.0" babel-helper-replace-supers@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + resolved "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" dependencies: babel-helper-optimise-call-expression "^6.24.1" babel-messages "^6.23.0" @@ -348,14 +458,14 @@ babel-helper-replace-supers@^6.24.1: babel-helpers@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + resolved "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" babel-loader@6.2.10: version "6.2.10" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-6.2.10.tgz#adefc2b242320cd5d15e65b31cea0e8b1b02d4b0" + resolved "https://registry.npmjs.org/babel-loader/-/babel-loader-6.2.10.tgz#adefc2b242320cd5d15e65b31cea0e8b1b02d4b0" dependencies: find-cache-dir "^0.1.1" loader-utils "^0.2.11" @@ -364,41 +474,139 @@ babel-loader@6.2.10: babel-messages@^6.23.0: version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + resolved "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" dependencies: babel-runtime "^6.22.0" -babel-plugin-check-es2015-constants@^6.3.13: +babel-plugin-check-es2015-constants@^6.22.0, babel-plugin-check-es2015-constants@^6.3.13: version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + resolved "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-arrow-functions@^6.3.13: +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + +babel-plugin-syntax-async-generators@^6.5.0: + version "6.13.0" + resolved "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" + +babel-plugin-syntax-class-constructor-call@^6.18.0: + version "6.18.0" + resolved "https://registry.npmjs.org/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416" + +babel-plugin-syntax-class-properties@^6.8.0: + version "6.13.0" + resolved "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" + +babel-plugin-syntax-decorators@^6.13.0: + version "6.13.0" + resolved "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" + +babel-plugin-syntax-do-expressions@^6.8.0: + version "6.13.0" + resolved "https://registry.npmjs.org/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz#5747756139aa26d390d09410b03744ba07e4796d" + +babel-plugin-syntax-dynamic-import@^6.18.0: + version "6.18.0" + resolved "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + +babel-plugin-syntax-export-extensions@^6.8.0: + version "6.13.0" + resolved "https://registry.npmjs.org/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" + +babel-plugin-syntax-function-bind@^6.8.0: + version "6.13.0" + resolved "https://registry.npmjs.org/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz#48c495f177bdf31a981e732f55adc0bdd2601f46" + +babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + +babel-plugin-syntax-trailing-function-commas@^6.22.0: version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + resolved "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + +babel-plugin-transform-async-generator-functions@^6.24.1: + version "6.24.1" + resolved "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db" dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-generators "^6.5.0" babel-runtime "^6.22.0" -babel-plugin-transform-es2015-block-scoped-functions@^6.3.13: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" +babel-plugin-transform-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" babel-runtime "^6.22.0" -babel-plugin-transform-es2015-block-scoping@^6.14.0: +babel-plugin-transform-class-constructor-call@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" + resolved "https://registry.npmjs.org/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz#80dc285505ac067dcb8d6c65e2f6f11ab7765ef9" dependencies: + babel-plugin-syntax-class-constructor-call "^6.18.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-class-properties@^6.24.1: + version "6.24.1" + resolved "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" + dependencies: + babel-helper-function-name "^6.24.1" + babel-plugin-syntax-class-properties "^6.8.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-decorators@^6.24.1: + version "6.24.1" + resolved "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz#788013d8f8c6b5222bdf7b344390dfd77569e24d" + dependencies: + babel-helper-explode-class "^6.24.1" + babel-plugin-syntax-decorators "^6.13.0" babel-runtime "^6.22.0" babel-template "^6.24.1" - babel-traverse "^6.24.1" babel-types "^6.24.1" - lodash "^4.2.0" -babel-plugin-transform-es2015-classes@^6.14.0: +babel-plugin-transform-do-expressions@^6.22.0: + version "6.22.0" + resolved "https://registry.npmjs.org/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz#28ccaf92812d949c2cd1281f690c8fdc468ae9bb" + dependencies: + babel-plugin-syntax-do-expressions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0, babel-plugin-transform-es2015-arrow-functions@^6.3.13: + version "6.22.0" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0, babel-plugin-transform-es2015-block-scoped-functions@^6.3.13: + version "6.22.0" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.14.0, babel-plugin-transform-es2015-block-scoping@^6.24.1: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" + dependencies: + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-plugin-transform-es2015-classes@^6.14.0, babel-plugin-transform-es2015-classes@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" dependencies: babel-helper-define-map "^6.24.1" babel-helper-function-name "^6.24.1" @@ -410,89 +618,89 @@ babel-plugin-transform-es2015-classes@^6.14.0: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-computed-properties@^6.3.13: +babel-plugin-transform-es2015-computed-properties@^6.24.1, babel-plugin-transform-es2015-computed-properties@^6.3.13: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-destructuring@^6.16.0: +babel-plugin-transform-es2015-destructuring@^6.16.0, babel-plugin-transform-es2015-destructuring@^6.22.0: version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-duplicate-keys@^6.6.0: +babel-plugin-transform-es2015-duplicate-keys@^6.24.1, babel-plugin-transform-es2015-duplicate-keys@^6.6.0: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-plugin-transform-es2015-for-of@^6.6.0: +babel-plugin-transform-es2015-for-of@^6.22.0, babel-plugin-transform-es2015-for-of@^6.6.0: version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-function-name@^6.9.0: +babel-plugin-transform-es2015-function-name@^6.24.1, babel-plugin-transform-es2015-function-name@^6.9.0: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" dependencies: babel-helper-function-name "^6.24.1" babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-plugin-transform-es2015-literals@^6.3.13: +babel-plugin-transform-es2015-literals@^6.22.0, babel-plugin-transform-es2015-literals@^6.3.13: version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-modules-amd@^6.24.1, babel-plugin-transform-es2015-modules-amd@^6.8.0: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" dependencies: babel-plugin-transform-es2015-modules-commonjs "^6.24.1" babel-runtime "^6.22.0" babel-template "^6.24.1" babel-plugin-transform-es2015-modules-commonjs@^6.16.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" + version "6.26.0" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" dependencies: babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-types "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" -babel-plugin-transform-es2015-modules-systemjs@^6.14.0: +babel-plugin-transform-es2015-modules-systemjs@^6.14.0, babel-plugin-transform-es2015-modules-systemjs@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" dependencies: babel-helper-hoist-variables "^6.24.1" babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-modules-umd@^6.12.0: +babel-plugin-transform-es2015-modules-umd@^6.12.0, babel-plugin-transform-es2015-modules-umd@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" dependencies: babel-plugin-transform-es2015-modules-amd "^6.24.1" babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-object-super@^6.3.13: +babel-plugin-transform-es2015-object-super@^6.24.1, babel-plugin-transform-es2015-object-super@^6.3.13: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" dependencies: babel-helper-replace-supers "^6.24.1" babel-runtime "^6.22.0" -babel-plugin-transform-es2015-parameters@^6.16.0: +babel-plugin-transform-es2015-parameters@^6.16.0, babel-plugin-transform-es2015-parameters@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" dependencies: babel-helper-call-delegate "^6.24.1" babel-helper-get-function-arity "^6.24.1" @@ -501,77 +709,126 @@ babel-plugin-transform-es2015-parameters@^6.16.0: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-shorthand-properties@^6.3.13: +babel-plugin-transform-es2015-shorthand-properties@^6.24.1, babel-plugin-transform-es2015-shorthand-properties@^6.3.13: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-plugin-transform-es2015-spread@^6.3.13: +babel-plugin-transform-es2015-spread@^6.22.0, babel-plugin-transform-es2015-spread@^6.3.13: version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-sticky-regex@^6.3.13: +babel-plugin-transform-es2015-sticky-regex@^6.24.1, babel-plugin-transform-es2015-sticky-regex@^6.3.13: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" dependencies: babel-helper-regex "^6.24.1" babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-plugin-transform-es2015-template-literals@^6.6.0: +babel-plugin-transform-es2015-template-literals@^6.22.0, babel-plugin-transform-es2015-template-literals@^6.6.0: version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-typeof-symbol@^6.6.0: +babel-plugin-transform-es2015-typeof-symbol@^6.22.0, babel-plugin-transform-es2015-typeof-symbol@^6.6.0: version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-unicode-regex@^6.3.13: +babel-plugin-transform-es2015-unicode-regex@^6.24.1, babel-plugin-transform-es2015-unicode-regex@^6.3.13: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + resolved "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" dependencies: babel-helper-regex "^6.24.1" babel-runtime "^6.22.0" regexpu-core "^2.0.0" -babel-plugin-transform-object-assign@~6.22.0: +babel-plugin-transform-es3-member-expression-literals@^6.22.0: version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz#f99d2f66f1a0b0d498e346c5359684740caa20ba" + resolved "https://registry.npmjs.org/babel-plugin-transform-es3-member-expression-literals/-/babel-plugin-transform-es3-member-expression-literals-6.22.0.tgz#733d3444f3ecc41bef8ed1a6a4e09657b8969ebb" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-regenerator@^6.16.0: +babel-plugin-transform-es3-property-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.npmjs.org/babel-plugin-transform-es3-property-literals/-/babel-plugin-transform-es3-property-literals-6.22.0.tgz#b2078d5842e22abf40f73e8cde9cd3711abd5758" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-exponentiation-operator@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" + resolved "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" dependencies: - regenerator-transform "0.9.11" + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-export-extensions@^6.22.0: + version "6.22.0" + resolved "https://registry.npmjs.org/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" + dependencies: + babel-plugin-syntax-export-extensions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-function-bind@^6.22.0: + version "6.22.0" + resolved "https://registry.npmjs.org/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz#c6fb8e96ac296a310b8cf8ea401462407ddf6a97" + dependencies: + babel-plugin-syntax-function-bind "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-object-assign@~6.22.0: + version "6.22.0" + resolved "https://registry.npmjs.org/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz#f99d2f66f1a0b0d498e346c5359684740caa20ba" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-object-rest-spread@^6.22.0, babel-plugin-transform-object-rest-spread@^6.23.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.26.0" + +babel-plugin-transform-regenerator@^6.16.0, babel-plugin-transform-regenerator@^6.24.1: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" + dependencies: + regenerator-transform "^0.10.0" babel-plugin-transform-strict-mode@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + resolved "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" babel-polyfill@6.16.*: version "6.16.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.16.0.tgz#2d45021df87e26a374b6d4d1a9c65964d17f2422" + resolved "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.16.0.tgz#2d45021df87e26a374b6d4d1a9c65964d17f2422" dependencies: babel-runtime "^6.9.1" core-js "^2.4.0" regenerator-runtime "^0.9.5" +babel-polyfill@^6.23.0, babel-polyfill@^6.26.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" + dependencies: + babel-runtime "^6.26.0" + core-js "^2.5.0" + regenerator-runtime "^0.10.5" + babel-preset-es2015@6.16.*, babel-preset-es2015@~6.16.0: version "6.16.0" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.16.0.tgz#59acecd1efbebaf48f89404840f2fe78c4d2ad5c" + resolved "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.16.0.tgz#59acecd1efbebaf48f89404840f2fe78c4d2ad5c" dependencies: babel-plugin-check-es2015-constants "^6.3.13" babel-plugin-transform-es2015-arrow-functions "^6.3.13" @@ -598,164 +855,274 @@ babel-preset-es2015@6.16.*, babel-preset-es2015@~6.16.0: babel-plugin-transform-es2015-unicode-regex "^6.3.13" babel-plugin-transform-regenerator "^6.16.0" -babel-register@^6.24.1: +babel-preset-es2015@^6.24.0: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" + resolved "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.24.1" + babel-plugin-transform-es2015-classes "^6.24.1" + babel-plugin-transform-es2015-computed-properties "^6.24.1" + babel-plugin-transform-es2015-destructuring "^6.22.0" + babel-plugin-transform-es2015-duplicate-keys "^6.24.1" + babel-plugin-transform-es2015-for-of "^6.22.0" + babel-plugin-transform-es2015-function-name "^6.24.1" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-plugin-transform-es2015-modules-systemjs "^6.24.1" + babel-plugin-transform-es2015-modules-umd "^6.24.1" + babel-plugin-transform-es2015-object-super "^6.24.1" + babel-plugin-transform-es2015-parameters "^6.24.1" + babel-plugin-transform-es2015-shorthand-properties "^6.24.1" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.24.1" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.22.0" + babel-plugin-transform-es2015-unicode-regex "^6.24.1" + babel-plugin-transform-regenerator "^6.24.1" + +babel-preset-stage-0@^6.24.1: + version "6.24.1" + resolved "https://registry.npmjs.org/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz#5642d15042f91384d7e5af8bc88b1db95b039e6a" dependencies: - babel-core "^6.24.1" - babel-runtime "^6.22.0" - core-js "^2.4.0" - home-or-tmp "^2.0.0" - lodash "^4.2.0" - mkdirp "^0.5.1" - source-map-support "^0.4.2" + babel-plugin-transform-do-expressions "^6.22.0" + babel-plugin-transform-function-bind "^6.22.0" + babel-preset-stage-1 "^6.24.1" -babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.9.1: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" +babel-preset-stage-1@^6.24.1: + version "6.24.1" + resolved "https://registry.npmjs.org/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0" dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.10.0" + babel-plugin-transform-class-constructor-call "^6.24.1" + babel-plugin-transform-export-extensions "^6.22.0" + babel-preset-stage-2 "^6.24.1" -babel-template@^6.24.1: +babel-preset-stage-2@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333" + resolved "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1" dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - babylon "^6.11.0" - lodash "^4.2.0" + babel-plugin-syntax-dynamic-import "^6.18.0" + babel-plugin-transform-class-properties "^6.24.1" + babel-plugin-transform-decorators "^6.24.1" + babel-preset-stage-3 "^6.24.1" -babel-traverse@^6.24.1, babel-traverse@^6.4.5, babel-traverse@^6.9.0: +babel-preset-stage-3@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.24.1.tgz#ab36673fd356f9a0948659e7b338d5feadb31695" + resolved "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz#836ada0a9e7a7fa37cb138fb9326f87934a48395" dependencies: - babel-code-frame "^6.22.0" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - babylon "^6.15.0" - debug "^2.2.0" - globals "^9.0.0" - invariant "^2.2.0" - lodash "^4.2.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-generator-functions "^6.24.1" + babel-plugin-transform-async-to-generator "^6.24.1" + babel-plugin-transform-exponentiation-operator "^6.24.1" + babel-plugin-transform-object-rest-spread "^6.22.0" -babel-types@^6.19.0, babel-types@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975" +babel-register@^6.24.1, babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" dependencies: - babel-runtime "^6.22.0" + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0, babel-runtime@^6.9.1: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.24.1, babel-traverse@^6.26.0, babel-traverse@^6.4.5, babel-traverse@^6.9.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^1.0.1" + lodash "^4.17.4" + to-fast-properties "^1.0.3" -babelify@7.3.*: +babelify@7.3.*, babelify@^7.3.0: version "7.3.0" - resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5" + resolved "https://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5" dependencies: babel-core "^6.0.14" object-assign "^4.0.0" babylon@6.14.1: version "6.14.1" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815" + resolved "https://registry.npmjs.org/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815" -babylon@^6.11.0, babylon@^6.15.0, babylon@^6.8.0: - version "6.17.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.0.tgz#37da948878488b9c4e3c4038893fa3314b3fc932" +babylon@^6.18.0, babylon@^6.8.0: + version "6.18.0" + resolved "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" backo2@1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" + resolved "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" -balanced-match@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" base-x@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-1.1.0.tgz#42d3d717474f9ea02207f6d1aa1f426913eeb7ac" + resolved "https://registry.npmjs.org/base-x/-/base-x-1.1.0.tgz#42d3d717474f9ea02207f6d1aa1f426913eeb7ac" + +base-x@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/base-x/-/base-x-3.0.2.tgz#bf873861b7514279b7969f340929eab87c11d130" + dependencies: + safe-buffer "^5.0.1" base64-arraybuffer@0.1.5: version "0.1.5" - resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" + resolved "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" base64-js@^1.0.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" + version "1.2.1" + resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz#a91947da1f4a516ea38e5b4ec0ec3773675e0886" base64id@1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" + resolved "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" bcrypt-pbkdf@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + resolved "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" dependencies: tweetnacl "^0.14.3" better-assert@~1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" + resolved "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" dependencies: callsite "1.0.0" big.js@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" + version "3.2.0" + resolved "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" bigi@1.4.*, bigi@^1.1.0, bigi@^1.4.0: version "1.4.2" - resolved "https://registry.yarnpkg.com/bigi/-/bigi-1.4.2.tgz#9c665a95f88b8b08fc05cfd731f561859d725825" + resolved "https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz#9c665a95f88b8b08fc05cfd731f561859d725825" + +bignumber.js@^4.0.2: + version "4.1.0" + resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz#db6f14067c140bd46624815a7916c92d9b6c24b1" binary-extensions@^1.0.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" + version "1.10.0" + resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.10.0.tgz#9aeb9a6c5e88638aad171e167f5900abe24835d0" + +bindings@^1.2.1: + version "1.3.0" + resolved "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7" bip39@2.1.*: version "2.1.2" - resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.1.2.tgz#a18b53f20b3cdb752db417644c452c1daf2f47d6" + resolved "https://registry.npmjs.org/bip39/-/bip39-2.1.2.tgz#a18b53f20b3cdb752db417644c452c1daf2f47d6" dependencies: create-hash "^1.1.0" pbkdf2 "^3.0.0" randombytes "^2.0.1" unorm "^1.3.3" -bip66@^1.1.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.4.tgz#8a59f8ae16eccb94681c3c2a7b224774605aadfb" +bip66@^1.1.0, bip66@^1.1.3: + version "1.1.5" + resolved "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" + dependencies: + safe-buffer "^5.0.1" -bitcoin-coinify-client@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/bitcoin-coinify-client/-/bitcoin-coinify-client-0.6.2.tgz#a38cd7a378ebb4ebc133d4e81c229f3e8e23b9b1" +bitcoin-coinify-client@^0.7.5: + version "0.7.5" + resolved "https://registry.npmjs.org/bitcoin-coinify-client/-/bitcoin-coinify-client-0.7.5.tgz#5e6e25923dcf870f698273543649e1869ba53d2f" dependencies: babel-polyfill "6.16.*" babel-preset-es2015 "6.16.*" babelify "7.3.*" - bitcoin-exchange-client "~0.3.1" + bitcoin-exchange-client "^0.5.0" -bitcoin-exchange-client@0.2.*: - version "0.2.2" - resolved "https://registry.yarnpkg.com/bitcoin-exchange-client/-/bitcoin-exchange-client-0.2.2.tgz#8d5370a3ac20a0d3fc75e8a3d76bbc285a35f7ec" +bitcoin-exchange-client@^0.5.0: + version "0.5.2" + resolved "https://registry.npmjs.org/bitcoin-exchange-client/-/bitcoin-exchange-client-0.5.2.tgz#cc0542f264d036cfdabc2e31d69bd2bf34dfe17c" dependencies: isomorphic-fetch "^2.2.0" -bitcoin-exchange-client@~0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/bitcoin-exchange-client/-/bitcoin-exchange-client-0.3.1.tgz#f6dd4cfcb653420fa43c6a9bfb3df7b683bd37c4" +bitcoin-ops@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.3.0.tgz#6b126b585537bc679b02ed499f14450cffc37e13" + +bitcoin-sfox-client@^0.2.1: + version "0.2.2" + resolved "https://registry.npmjs.org/bitcoin-sfox-client/-/bitcoin-sfox-client-0.2.2.tgz#8e0c9620dc9070d1060daed30352158002bdd427" dependencies: - isomorphic-fetch "^2.2.0" + babel-polyfill "6.16.*" + babel-preset-es2015 "6.16.*" + babelify "7.3.*" + bitcoin-exchange-client "^0.5.0" + +bitcoin-unocoin-client@^0.3.6: + version "0.3.6" + resolved "https://registry.npmjs.org/bitcoin-unocoin-client/-/bitcoin-unocoin-client-0.3.6.tgz#6372d4e34131f074985cd047579c8513829b5827" + dependencies: + babel-cli "^6.24.1" + babel-polyfill "6.16.*" + babel-preset-es2015 "6.16.*" + babelify "7.3.*" + bitcoin-exchange-client "^0.5.0" -bitcoin-sfox-client@^0.1.11: - version "0.1.11" - resolved "https://registry.yarnpkg.com/bitcoin-sfox-client/-/bitcoin-sfox-client-0.1.11.tgz#325dcd48925dc54b9fa50fd350bc475ed4211e35" +"bitcoincashjs-lib@https://github.com/bitcoinjs/bitcoinjs-lib#9ac221c80dbc3462d7a2392cec2045ae2b590461": + version "3.1.1" + resolved "https://github.com/bitcoinjs/bitcoinjs-lib#9ac221c80dbc3462d7a2392cec2045ae2b590461" dependencies: - bitcoin-exchange-client "0.2.*" + bigi "^1.4.0" + bip66 "^1.1.0" + bitcoin-ops "^1.3.0" + bs58check "^2.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.3" + ecurve "^1.0.0" + merkle-lib "^2.0.10" + pushdata-bitcoin "^1.0.1" + randombytes "^2.0.1" + safe-buffer "^5.0.1" + typeforce "^1.8.7" + varuint-bitcoin "^1.0.4" + wif "^2.0.1" bitcoinjs-lib@2.1.*: version "2.1.4" - resolved "https://registry.yarnpkg.com/bitcoinjs-lib/-/bitcoinjs-lib-2.1.4.tgz#d4fc235b065aa19c48e11d9136eeab07b38c1534" + resolved "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-2.1.4.tgz#d4fc235b065aa19c48e11d9136eeab07b38c1534" dependencies: bigi "^1.4.0" bip66 "^1.1.0" @@ -769,61 +1136,79 @@ bitcoinjs-lib@2.1.*: typeforce "^1.5.5" wif "^1.1.0" +bl@^1.0.0: + version "1.2.1" + resolved "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz#cac328f7bee45730d404b692203fcb590e172d5e" + dependencies: + readable-stream "^2.0.5" + blob@0.0.4: version "0.0.4" - resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" + resolved "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" block-stream@*: version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + resolved "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" dependencies: inherits "~2.0.0" bluebird@^3.0.5, bluebird@^3.3.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" + version "3.5.1" + resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.6" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.11.3, bn.js@^4.4.0, bn.js@^4.8.0: + version "4.11.8" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" body-parser@^1.16.1: - version "1.17.1" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.17.1.tgz#75b3bc98ddd6e7e0d8ffe750dfaca5c66993fa47" - dependencies: - bytes "2.4.0" - content-type "~1.0.2" - debug "2.6.1" - depd "~1.1.0" - http-errors "~1.6.1" - iconv-lite "0.4.15" + version "1.18.2" + resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" + dependencies: + bytes "3.0.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.1" + http-errors "~1.6.2" + iconv-lite "0.4.19" on-finished "~2.3.0" - qs "6.4.0" - raw-body "~2.2.0" - type-is "~1.6.14" + qs "6.5.1" + raw-body "2.3.2" + type-is "~1.6.15" boom@2.x.x: version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + resolved "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" dependencies: hoek "2.x.x" +boom@4.x.x: + version "4.3.1" + resolved "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" + dependencies: + hoek "4.x.x" + +boom@5.x.x: + version "5.2.0" + resolved "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" + dependencies: + hoek "4.x.x" + brace-expansion@^1.0.0, brace-expansion@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" + version "1.1.8" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" dependencies: - balanced-match "^0.4.1" + balanced-match "^1.0.0" concat-map "0.0.1" braces@^0.1.2: version "0.1.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-0.1.5.tgz#c085711085291d8b75fdd74eab0f8597280711e6" + resolved "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz#c085711085291d8b75fdd74eab0f8597280711e6" dependencies: expand-range "^0.1.0" braces@^1.8.2: version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + resolved "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" dependencies: expand-range "^1.8.1" preserve "^0.2.0" @@ -831,11 +1216,11 @@ braces@^1.8.2: brorand@^1.0.1: version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + resolved "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" browser-pack@^6.0.0, browser-pack@^6.0.1: version "6.0.2" - resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.0.2.tgz#f86cd6cef4f5300c8e63e07a4d512f65fbff4531" + resolved "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz#f86cd6cef4f5300c8e63e07a4d512f65fbff4531" dependencies: JSONStream "^1.0.3" combine-source-map "~0.7.1" @@ -845,23 +1230,24 @@ browser-pack@^6.0.0, browser-pack@^6.0.1: browser-resolve@^1.11.0, browser-resolve@^1.7.0: version "1.11.2" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + resolved "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" dependencies: resolve "1.1.7" -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.6.tgz#5e7725dbdef1fd5930d4ebab48567ce451c48a0a" +browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.0.6: + version "1.1.1" + resolved "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz#38b7ab55edb806ff2dcda1a7f1620773a477c49f" dependencies: - buffer-xor "^1.0.2" + buffer-xor "^1.0.3" cipher-base "^1.0.0" create-hash "^1.1.0" - evp_bytestokey "^1.0.0" + evp_bytestokey "^1.0.3" inherits "^2.0.1" + safe-buffer "^5.0.1" browserify-cipher@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" + resolved "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" dependencies: browserify-aes "^1.0.4" browserify-des "^1.0.0" @@ -869,7 +1255,7 @@ browserify-cipher@^1.0.0: browserify-des@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" + resolved "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" dependencies: cipher-base "^1.0.1" des.js "^1.0.0" @@ -877,21 +1263,27 @@ browserify-des@^1.0.0: browserify-istanbul@2.0.*: version "2.0.0" - resolved "https://registry.yarnpkg.com/browserify-istanbul/-/browserify-istanbul-2.0.0.tgz#85a4b425da1f7c09e02ba32a3b44f6535d38c257" + resolved "https://registry.npmjs.org/browserify-istanbul/-/browserify-istanbul-2.0.0.tgz#85a4b425da1f7c09e02ba32a3b44f6535d38c257" dependencies: minimatch "^3.0.0" through "^2.3.8" browserify-rsa@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + resolved "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" dependencies: bn.js "^4.1.0" randombytes "^2.0.1" +browserify-sha3@^0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/browserify-sha3/-/browserify-sha3-0.0.1.tgz#3ff34a3006ef15c0fb3567e541b91a2340123d11" + dependencies: + js-sha3 "^0.3.1" + browserify-sign@^4.0.0: version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + resolved "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" dependencies: bn.js "^4.1.1" browserify-rsa "^4.0.0" @@ -901,15 +1293,21 @@ browserify-sign@^4.0.0: inherits "^2.0.1" parse-asn1 "^5.0.0" -browserify-zlib@^0.1.4, browserify-zlib@~0.1.2: +browserify-zlib@^0.2.0, browserify-zlib@~0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + dependencies: + pako "~1.0.5" + +browserify-zlib@~0.1.2: version "0.1.4" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" + resolved "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" dependencies: pako "~0.2.0" browserify@13.*: version "13.3.0" - resolved "https://registry.yarnpkg.com/browserify/-/browserify-13.3.0.tgz#b5a9c9020243f0c70e4675bec8223bc627e415ce" + resolved "https://registry.npmjs.org/browserify/-/browserify-13.3.0.tgz#b5a9c9020243f0c70e4675bec8223bc627e415ce" dependencies: JSONStream "^1.0.3" assert "^1.4.0" @@ -960,14 +1358,14 @@ browserify@13.*: xtend "^4.0.0" browserify@^14.0.0: - version "14.3.0" - resolved "https://registry.yarnpkg.com/browserify/-/browserify-14.3.0.tgz#fd003a2386ac1aec127f097885a3cc6373b745c4" + version "14.5.0" + resolved "https://registry.npmjs.org/browserify/-/browserify-14.5.0.tgz#0bbbce521acd6e4d1d54d8e9365008efb85a9cc5" dependencies: JSONStream "^1.0.3" assert "^1.4.0" browser-pack "^6.0.1" browser-resolve "^1.11.0" - browserify-zlib "~0.1.2" + browserify-zlib "~0.2.0" buffer "^5.0.2" cached-path-relative "^1.0.0" concat-stream "~1.5.1" @@ -987,7 +1385,7 @@ browserify@^14.0.0: insert-module-globals "^7.0.0" labeled-stream-splicer "^2.0.0" module-deps "^4.0.8" - os-browserify "~0.1.1" + os-browserify "~0.3.0" parents "^1.0.1" path-browserify "~0.0.0" process "~0.11.0" @@ -1000,7 +1398,7 @@ browserify@^14.0.0: shell-quote "^1.6.1" stream-browserify "^2.0.0" stream-http "^2.0.0" - string_decoder "~0.10.0" + string_decoder "~1.0.0" subarg "^1.0.0" syntax-error "^1.1.1" through2 "^2.0.0" @@ -1011,129 +1409,138 @@ browserify@^14.0.0: vm-browserify "~0.0.1" xtend "^4.0.0" -bs58@2.0.*: +bs58@2.0.*, bs58@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-2.0.1.tgz#55908d58f1982aba2008fa1bed8f91998a29bf8d" + resolved "https://registry.npmjs.org/bs58/-/bs58-2.0.1.tgz#55908d58f1982aba2008fa1bed8f91998a29bf8d" bs58@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-3.1.0.tgz#d4c26388bf4804cac714141b1945aa47e5eb248e" + resolved "https://registry.npmjs.org/bs58/-/bs58-3.1.0.tgz#d4c26388bf4804cac714141b1945aa47e5eb248e" dependencies: base-x "^1.1.0" -bs58check@^1.0.5, bs58check@^1.0.6: +bs58@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + dependencies: + base-x "^3.0.2" + +bs58check@<3.0.0, bs58check@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/bs58check/-/bs58check-2.1.0.tgz#0d378950b49261c807fbe46e5dd2cf5eb2f89513" + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + +bs58check@^1.0.5, bs58check@^1.0.6, bs58check@^1.0.8: version "1.3.4" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-1.3.4.tgz#c52540073749117714fa042c3047eb8f9151cbf8" + resolved "https://registry.npmjs.org/bs58check/-/bs58check-1.3.4.tgz#c52540073749117714fa042c3047eb8f9151cbf8" dependencies: bs58 "^3.1.0" create-hash "^1.1.0" buffer-crc32@0.1.1: version "0.1.1" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.1.1.tgz#7e110dc9953908ab7c32acdc70c9f945b1cbc526" + resolved "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.1.1.tgz#7e110dc9953908ab7c32acdc70c9f945b1cbc526" buffer-equals@^1.0.3: version "1.0.4" - resolved "https://registry.yarnpkg.com/buffer-equals/-/buffer-equals-1.0.4.tgz#0353b54fd07fd9564170671ae6f66b9cf10d27f5" + resolved "https://registry.npmjs.org/buffer-equals/-/buffer-equals-1.0.4.tgz#0353b54fd07fd9564170671ae6f66b9cf10d27f5" buffer-reverse@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-reverse/-/buffer-reverse-1.0.1.tgz#49283c8efa6f901bc01fa3304d06027971ae2f60" + resolved "https://registry.npmjs.org/buffer-reverse/-/buffer-reverse-1.0.1.tgz#49283c8efa6f901bc01fa3304d06027971ae2f60" -buffer-shims@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" - -buffer-xor@^1.0.2: +buffer-xor@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + resolved "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" buffer@^4.1.0, buffer@^4.3.0: version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + resolved "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" dependencies: base64-js "^1.0.2" ieee754 "^1.1.4" isarray "^1.0.0" buffer@^5.0.2: - version "5.0.6" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.0.6.tgz#2ea669f7eec0b6eda05b08f8b5ff661b28573588" + version "5.0.8" + resolved "https://registry.npmjs.org/buffer/-/buffer-5.0.8.tgz#84daa52e7cf2fa8ce4195bc5cf0f7809e0930b24" dependencies: base64-js "^1.0.2" ieee754 "^1.1.4" builtin-modules@^1.0.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + resolved "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" builtin-status-codes@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + resolved "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" bytes@0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-0.1.0.tgz#c574812228126d6369d1576925a8579db3f8e5a2" + resolved "https://registry.npmjs.org/bytes/-/bytes-0.1.0.tgz#c574812228126d6369d1576925a8579db3f8e5a2" -bytes@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339" +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" cached-path-relative@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.1.tgz#d09c4b52800aa4c078e2dd81a869aac90d2e54e7" + resolved "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz#d09c4b52800aa4c078e2dd81a869aac90d2e54e7" caller-path@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + resolved "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" dependencies: callsites "^0.2.0" callsite@1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" + resolved "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" callsites@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + resolved "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" camelcase-keys@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + resolved "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" dependencies: camelcase "^2.0.0" map-obj "^1.0.0" camelcase@^1.0.2: version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" camelcase@^2.0.0: version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" camelcase@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" caseless@~0.11.0: version "0.11.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + resolved "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" caseless@~0.12.0: version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" center-align@^0.1.1: version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + resolved "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" dependencies: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + resolved "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: ansi-styles "^2.2.1" escape-string-regexp "^1.0.2" @@ -1141,9 +1548,9 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chokidar@^1.0.0, chokidar@^1.4.1, chokidar@^1.4.3: +chokidar@^1.0.0, chokidar@^1.4.1, chokidar@^1.6.1, chokidar@^1.7.0: version "1.7.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" dependencies: anymatch "^1.3.0" async-each "^1.0.0" @@ -1156,33 +1563,38 @@ chokidar@^1.0.0, chokidar@^1.4.1, chokidar@^1.4.3: optionalDependencies: fsevents "^1.0.0" -cipher-base@^1.0.0, cipher-base@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.3.tgz#eeabf194419ce900da3018c207d212f2a6df0a07" +chownr@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" dependencies: inherits "^2.0.1" + safe-buffer "^5.0.1" circular-json@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" + version "0.3.3" + resolved "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" cli-cursor@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" dependencies: restore-cursor "^1.0.1" cli-width@^1.0.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-1.1.1.tgz#a4d293ef67ebb7b88d4a4d42c0ccf00c4d1e366d" + resolved "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz#a4d293ef67ebb7b88d4a4d42c0ccf00c4d1e366d" cli-width@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + version "2.2.0" + resolved "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" cliui@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + resolved "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" dependencies: center-align "^0.1.1" right-align "^0.1.1" @@ -1190,37 +1602,44 @@ cliui@^2.1.0: cliui@^3.2.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + resolved "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" wrap-ansi "^2.0.0" clone@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + version "1.0.3" + resolved "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f" co@^4.6.0: version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" code-point-at@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + resolved "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +coinstring@^2.0.0: + version "2.3.0" + resolved "https://registry.npmjs.org/coinstring/-/coinstring-2.3.0.tgz#cdb63363a961502404a25afb82c2e26d5ff627a4" + dependencies: + bs58 "^2.0.1" + create-hash "^1.1.1" colors@^1.1.0: version "1.1.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + resolved "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" combine-lists@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/combine-lists/-/combine-lists-1.0.1.tgz#458c07e09e0d900fc28b70a3fec2dacd1d2cb7f6" + resolved "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz#458c07e09e0d900fc28b70a3fec2dacd1d2cb7f6" dependencies: lodash "^4.5.0" combine-source-map@~0.7.1: version "0.7.2" - resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.7.2.tgz#0870312856b307a87cc4ac486f3a9a62aeccc09e" + resolved "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz#0870312856b307a87cc4ac486f3a9a62aeccc09e" dependencies: convert-source-map "~1.1.0" inline-source-map "~0.6.0" @@ -1229,55 +1648,53 @@ combine-source-map@~0.7.1: combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" dependencies: delayed-stream "~1.0.0" commander@0.6.1: version "0.6.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06" + resolved "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06" -commander@^2.2.0, commander@^2.8.0, commander@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" - dependencies: - graceful-readlink ">= 1.0.0" +commander@^2.11.0, commander@^2.2.0, commander@^2.8.0, commander@^2.8.1, commander@^2.9.0: + version "2.11.0" + resolved "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" commondir@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + resolved "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" component-bind@1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" + resolved "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" component-emitter@1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.1.2.tgz#296594f2753daa63996d2af08d15a95116c9aec3" + resolved "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz#296594f2753daa63996d2af08d15a95116c9aec3" component-emitter@1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + resolved "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" component-inherit@0.0.3: version "0.0.3" - resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" + resolved "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" concat-map@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.0.tgz#53f7d43c51c5e43f81c8fdd03321c631be68d611" +concat-stream@1.6.0, concat-stream@^1.4.6, concat-stream@^1.4.7: + version "1.6.0" + resolved "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: - inherits "~2.0.1" - readable-stream "~2.0.0" - typedarray "~0.0.5" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" -concat-stream@^1.4.6, concat-stream@^1.4.7, concat-stream@~1.5.0, concat-stream@~1.5.1: +concat-stream@~1.5.0, concat-stream@~1.5.1: version "1.5.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" + resolved "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" dependencies: inherits "~2.0.1" readable-stream "~2.0.0" @@ -1285,14 +1702,14 @@ concat-stream@^1.4.6, concat-stream@^1.4.7, concat-stream@~1.5.0, concat-stream@ config-chain@~1.1.5: version "1.1.11" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.11.tgz#aba09747dfbe4c3e70e766a6e41586e1859fc6f2" + resolved "https://registry.npmjs.org/config-chain/-/config-chain-1.1.11.tgz#aba09747dfbe4c3e70e766a6e41586e1859fc6f2" dependencies: ini "^1.3.4" proto-list "~1.2.1" connect@2.7.2: version "2.7.2" - resolved "https://registry.yarnpkg.com/connect/-/connect-2.7.2.tgz#11799463bdaaaf99d5f9bef133bf2420b26e2680" + resolved "https://registry.npmjs.org/connect/-/connect-2.7.2.tgz#11799463bdaaaf99d5f9bef133bf2420b26e2680" dependencies: buffer-crc32 "0.1.1" bytes "0.1.0" @@ -1306,63 +1723,63 @@ connect@2.7.2: send "0.1.0" connect@^3.6.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.1.tgz#b7760693a74f0454face1d9378edb3f885b43227" + version "3.6.5" + resolved "https://registry.npmjs.org/connect/-/connect-3.6.5.tgz#fb8dde7ba0763877d0ec9df9dac0b4b40e72c7da" dependencies: - debug "2.6.3" - finalhandler "1.0.1" - parseurl "~1.3.1" - utils-merge "1.0.0" + debug "2.6.9" + finalhandler "1.0.6" + parseurl "~1.3.2" + utils-merge "1.0.1" console-browserify@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + resolved "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" dependencies: date-now "^0.1.4" console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" constants-browserify@^1.0.0, constants-browserify@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + resolved "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" -content-type@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" -convert-source-map@^1.1.0, convert-source-map@^1.1.3: +convert-source-map@^1.1.0, convert-source-map@^1.1.3, convert-source-map@^1.5.0: version "1.5.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" convert-source-map@~1.1.0: version "1.1.3" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" + resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" cookie-signature@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-0.0.1.tgz#13d3603b5cf63befbf85a8801e37aa900db46985" + resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-0.0.1.tgz#13d3603b5cf63befbf85a8801e37aa900db46985" cookie@0.0.5: version "0.0.5" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.0.5.tgz#f9acf9db57eb7568c9fcc596256b7bb22e307c81" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.0.5.tgz#f9acf9db57eb7568c9fcc596256b7bb22e307c81" cookie@0.3.1: version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" -core-js@^2.2.0, core-js@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" +core-js@^2.2.0, core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0: + version "2.5.1" + resolved "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b" -core-util-is@~1.0.0: +core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" coveralls@^2.11.16: - version "2.13.1" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.1.tgz#d70bb9acc1835ec4f063ff9dac5423c17b11f178" + version "2.13.3" + resolved "https://registry.npmjs.org/coveralls/-/coveralls-2.13.3.tgz#9ad7c2ae527417f361e8b626483f48ee92dd2bc7" dependencies: js-yaml "3.6.1" lcov-parse "0.0.10" @@ -1372,36 +1789,46 @@ coveralls@^2.11.16: create-ecdh@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" + resolved "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" dependencies: bn.js "^4.1.0" elliptic "^6.0.0" create-hash@^1.1.0, create-hash@^1.1.1, create-hash@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.2.tgz#51210062d7bb7479f6c65bb41a92208b1d61abad" + version "1.1.3" + resolved "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" dependencies: cipher-base "^1.0.1" inherits "^2.0.1" - ripemd160 "^1.0.0" - sha.js "^2.3.6" + ripemd160 "^2.0.0" + sha.js "^2.4.0" create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.3, create-hmac@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.4.tgz#d3fb4ba253eb8b3f56e39ea2fbcb8af747bd3170" + version "1.1.6" + resolved "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06" dependencies: + cipher-base "^1.0.3" create-hash "^1.1.0" inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" cryptiles@2.x.x: version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + resolved "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" dependencies: boom "2.x.x" +cryptiles@3.x.x: + version "3.1.2" + resolved "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" + dependencies: + boom "5.x.x" + crypto-browserify@^3.0.0, crypto-browserify@^3.11.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.0.tgz#3652a0906ab9b2a7e0c3ce66a408e957a2485522" + version "3.12.0" + resolved "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" dependencies: browserify-cipher "^1.0.0" browserify-sign "^4.0.0" @@ -1413,10 +1840,11 @@ crypto-browserify@^3.0.0, crypto-browserify@^3.11.0: pbkdf2 "^3.0.3" public-encrypt "^4.0.0" randombytes "^2.0.0" + randomfill "^1.0.3" css-loader@^0.9.1: version "0.9.1" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.9.1.tgz#2e1aa00ce7e30ef2c6a7a4b300a080a7c979e0dc" + resolved "https://registry.npmjs.org/css-loader/-/css-loader-0.9.1.tgz#2e1aa00ce7e30ef2c6a7a4b300a080a7c979e0dc" dependencies: csso "1.3.x" loader-utils "~0.2.2" @@ -1424,104 +1852,98 @@ css-loader@^0.9.1: csso@1.3.x: version "1.3.12" - resolved "https://registry.yarnpkg.com/csso/-/csso-1.3.12.tgz#fc628694a2d38938aaac4996753218fd311cdb9e" + resolved "https://registry.npmjs.org/csso/-/csso-1.3.12.tgz#fc628694a2d38938aaac4996753218fd311cdb9e" currently-unhandled@^0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + resolved "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" dependencies: array-find-index "^1.0.1" custom-event@~1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + resolved "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" d@1: version "1.0.0" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + resolved "https://registry.npmjs.org/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" dependencies: es5-ext "^0.10.9" dashdash@^1.12.0: version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" dependencies: assert-plus "^1.0.0" date-now@^0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + resolved "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" dateformat@^1.0.6: version "1.0.12" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" + resolved "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" dependencies: get-stdin "^4.0.1" meow "^3.3.0" debug-log@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" + resolved "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" -debug@*, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0: - version "2.6.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.6.tgz#a9fa6fbe9ca43cf1e79f73b75c0189cbb7d6db5a" +debug@*: + version "3.1.0" + resolved "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" dependencies: - ms "0.7.3" - -debug@0.7.4, debug@^0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" + ms "2.0.0" debug@2.2.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + resolved "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" dependencies: ms "0.7.1" debug@2.3.3: version "2.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" + resolved "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" dependencies: ms "0.7.2" -debug@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351" +debug@2.6.9, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0, debug@^2.6.8: + version "2.6.9" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: - ms "0.7.2" + ms "2.0.0" -debug@2.6.3: - version "2.6.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" - dependencies: - ms "0.7.2" +debug@^0.7.4: + version "0.7.4" + resolved "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" deep-extend@~0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" + version "0.4.2" + resolved "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" deep-is@~0.1.2, deep-is@~0.1.3: version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" defaults@^1.0.2: version "1.0.3" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + resolved "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" dependencies: clone "^1.0.2" defined@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + resolved "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" deglob@^1.0.0: version "1.1.2" - resolved "https://registry.yarnpkg.com/deglob/-/deglob-1.1.2.tgz#76d577c25fe3f7329412a2b59eadea57ac500e3f" + resolved "https://registry.npmjs.org/deglob/-/deglob-1.1.2.tgz#76d577c25fe3f7329412a2b59eadea57ac500e3f" dependencies: find-root "^1.0.0" glob "^7.0.5" @@ -1533,7 +1955,7 @@ deglob@^1.0.0: del@^2.0.2: version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + resolved "https://registry.npmjs.org/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" dependencies: globby "^5.0.0" is-path-cwd "^1.0.0" @@ -1545,19 +1967,19 @@ del@^2.0.2: delayed-stream@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" delegates@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" -depd@1.1.0, depd@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" +depd@1.1.1, depd@~1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" deps-sort@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/deps-sort/-/deps-sort-2.0.0.tgz#091724902e84658260eb910748cccd1af6e21fb5" + resolved "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz#091724902e84658260eb910748cccd1af6e21fb5" dependencies: JSONStream "^1.0.3" shasum "^1.0.0" @@ -1566,20 +1988,31 @@ deps-sort@^2.0.0: des.js@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + resolved "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" dependencies: inherits "^2.0.1" minimalistic-assert "^1.0.0" detect-indent@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + resolved "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" dependencies: repeating "^2.0.0" -detective@^4.0.0, detective@~4.1.0: +detect-libc@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.2.tgz#71ad5d204bf17a6a6ca8f450c61454066ef461e1" + +detective@^4.0.0: + version "4.5.0" + resolved "https://registry.npmjs.org/detective/-/detective-4.5.0.tgz#6e5a8c6b26e6c7a254b1c6b6d7490d98ec91edd1" + dependencies: + acorn "^4.0.3" + defined "^1.0.0" + +detective@~4.1.0: version "4.1.1" - resolved "https://registry.yarnpkg.com/detective/-/detective-4.1.1.tgz#9c4bac1e9fb8bb34f7f18cae080ea1d03aff2cda" + resolved "https://registry.npmjs.org/detective/-/detective-4.1.1.tgz#9c4bac1e9fb8bb34f7f18cae080ea1d03aff2cda" dependencies: acorn "^1.0.3" defined "^1.0.0" @@ -1587,15 +2020,15 @@ detective@^4.0.0, detective@~4.1.0: di@^0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" + resolved "https://registry.npmjs.org/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" diff@^1.3.2: version "1.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" + resolved "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" diffie-hellman@^5.0.0: version "5.0.2" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" + resolved "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" dependencies: bn.js "^4.1.0" miller-rabin "^4.0.0" @@ -1603,28 +2036,28 @@ diffie-hellman@^5.0.0: disparity@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/disparity/-/disparity-2.0.0.tgz#57ddacb47324ae5f58d2cc0da886db4ce9eeb718" + resolved "https://registry.npmjs.org/disparity/-/disparity-2.0.0.tgz#57ddacb47324ae5f58d2cc0da886db4ce9eeb718" dependencies: ansi-styles "^2.0.1" diff "^1.3.2" doctrine@^0.6.2: version "0.6.4" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-0.6.4.tgz#81428491a942ef18b0492056eda3800eee57d61d" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-0.6.4.tgz#81428491a942ef18b0492056eda3800eee57d61d" dependencies: esutils "^1.1.6" isarray "0.0.1" doctrine@^1.2.2: version "1.5.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" dependencies: esutils "^2.0.2" isarray "^1.0.0" dom-serialize@^2.2.0: version "2.2.1" - resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" + resolved "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" dependencies: custom-event "~1.0.0" ent "~2.2.0" @@ -1633,42 +2066,51 @@ dom-serialize@^2.2.0: domain-browser@^1.1.1, domain-browser@~1.1.0: version "1.1.7" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" + resolved "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" + +drbg.js@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" + dependencies: + browserify-aes "^1.0.6" + create-hash "^1.1.2" + create-hmac "^1.1.4" duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2: version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" + resolved "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" dependencies: readable-stream "^2.0.2" ecc-jsbn@~0.1.1: version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + resolved "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" dependencies: jsbn "~0.1.0" ecurve@^1.0.0: version "1.0.5" - resolved "https://registry.yarnpkg.com/ecurve/-/ecurve-1.0.5.tgz#d148e8fe50a674f983bb5bae09da0ea23e10535e" + resolved "https://registry.npmjs.org/ecurve/-/ecurve-1.0.5.tgz#d148e8fe50a674f983bb5bae09da0ea23e10535e" dependencies: bigi "^1.1.0" editorconfig@^0.13.2: - version "0.13.2" - resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.13.2.tgz#8e57926d9ee69ab6cb999f027c2171467acceb35" + version "0.13.3" + resolved "https://registry.npmjs.org/editorconfig/-/editorconfig-0.13.3.tgz#e5219e587951d60958fd94ea9a9a008cdeff1b34" dependencies: bluebird "^3.0.5" commander "^2.9.0" lru-cache "^3.2.0" + semver "^5.1.0" sigmund "^1.0.1" ee-first@1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" -elliptic@^6.0.0: +elliptic@^6.0.0, elliptic@^6.2.3: version "6.4.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" + resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" dependencies: bn.js "^4.4.0" brorand "^1.0.1" @@ -1680,21 +2122,27 @@ elliptic@^6.0.0: emojis-list@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + resolved "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" encodeurl@~1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" + resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" encoding@^0.1.11: version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + resolved "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" dependencies: iconv-lite "~0.4.13" +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.0" + resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz#7a90d833efda6cfa6eac0f4949dbb0fad3a63206" + dependencies: + once "^1.4.0" + engine.io-client@1.8.3: version "1.8.3" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-1.8.3.tgz#1798ed93451246453d4c6f635d7a201fe940d5ab" + resolved "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.8.3.tgz#1798ed93451246453d4c6f635d7a201fe940d5ab" dependencies: component-emitter "1.2.1" component-inherit "0.0.3" @@ -1711,7 +2159,7 @@ engine.io-client@1.8.3: engine.io-parser@1.3.2: version "1.3.2" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-1.3.2.tgz#937b079f0007d0893ec56d46cb220b8cb435220a" + resolved "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.3.2.tgz#937b079f0007d0893ec56d46cb220b8cb435220a" dependencies: after "0.8.2" arraybuffer.slice "0.0.6" @@ -1722,7 +2170,7 @@ engine.io-parser@1.3.2: engine.io@1.8.3: version "1.8.3" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-1.8.3.tgz#8de7f97895d20d39b85f88eeee777b2bd42b13d4" + resolved "https://registry.npmjs.org/engine.io/-/engine.io-1.8.3.tgz#8de7f97895d20d39b85f88eeee777b2bd42b13d4" dependencies: accepts "1.3.3" base64id "1.0.0" @@ -1732,48 +2180,48 @@ engine.io@1.8.3: ws "1.1.2" enhanced-resolve@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.1.0.tgz#9f4b626f577245edcf4b2ad83d86e17f4f421dec" + version "3.4.1" + resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" dependencies: graceful-fs "^4.1.2" memory-fs "^0.4.0" object-assign "^4.0.1" - tapable "^0.2.5" + tapable "^0.2.7" ent@~2.2.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + resolved "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" errno@^0.1.3: version "0.1.4" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + resolved "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" dependencies: prr "~0.0.0" error-ex@^1.2.0: version "1.3.1" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" dependencies: is-arrayish "^0.2.1" -es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.16" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.16.tgz#1ef1b04f3d09db6a5d630226d62202f2e425e45a" +es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.35" + resolved "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.35.tgz#18ee858ce6a3c45c7d79e91c15fcca9ec568494f" dependencies: - es6-iterator "2" - es6-symbol "~3.1" + es6-iterator "~2.0.1" + es6-symbol "~3.1.1" -es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" +es6-iterator@^2.0.1, es6-iterator@~2.0.1: + version "2.0.3" + resolved "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" dependencies: d "1" - es5-ext "^0.10.14" - es6-symbol "^3.1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" es6-map@^0.1.3: version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + resolved "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" dependencies: d "1" es5-ext "~0.10.14" @@ -1784,19 +2232,19 @@ es6-map@^0.1.3: es6-promise@^3.0.2: version "3.3.1" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" + resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" + +es6-promise@^4.0.3: + version "4.1.1" + resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a" es6-promise@~2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-2.0.1.tgz#ccc4963e679f0ca9fb187c777b9e583d3c7573c2" - -es6-promise@~4.0.3: - version "4.0.5" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.0.5.tgz#7882f30adde5b240ccfa7f7d78c548330951ae42" + resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-2.0.1.tgz#ccc4963e679f0ca9fb187c777b9e583d3c7573c2" es6-set@~0.1.5: version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + resolved "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" dependencies: d "1" es5-ext "~0.10.14" @@ -1804,16 +2252,16 @@ es6-set@~0.1.5: es6-symbol "3.1.1" event-emitter "~0.3.5" -es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: +es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + resolved "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" dependencies: d "1" es5-ext "~0.10.14" es6-weak-map@^2.0.1: version "2.0.2" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + resolved "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" dependencies: d "1" es5-ext "^0.10.14" @@ -1822,15 +2270,15 @@ es6-weak-map@^2.0.1: escape-html@~1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.3, escape-string-regexp@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -escodegen@1.8.x, escodegen@^1.4.1: +escodegen@1.8.x: version "1.8.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" dependencies: esprima "^2.7.1" estraverse "^1.9.1" @@ -1839,9 +2287,20 @@ escodegen@1.8.x, escodegen@^1.4.1: optionalDependencies: source-map "~0.2.0" +escodegen@^1.4.1: + version "1.9.0" + resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.9.0.tgz#9811a2f265dc1cd3894420ee3717064b632b8852" + dependencies: + esprima "^3.1.3" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.5.6" + escope@^3.1.0, escope@^3.6.0: version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + resolved "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" dependencies: es6-map "^0.1.3" es6-weak-map "^2.0.1" @@ -1850,17 +2309,17 @@ escope@^3.1.0, escope@^3.6.0: esformatter-eol-last@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/esformatter-eol-last/-/esformatter-eol-last-1.0.0.tgz#45a78ff4622b1d49e44f56b49905766a63290c07" + resolved "https://registry.npmjs.org/esformatter-eol-last/-/esformatter-eol-last-1.0.0.tgz#45a78ff4622b1d49e44f56b49905766a63290c07" dependencies: string.prototype.endswith "^0.2.0" esformatter-ignore@^0.1.3: version "0.1.3" - resolved "https://registry.yarnpkg.com/esformatter-ignore/-/esformatter-ignore-0.1.3.tgz#04d3b875bfa49dde004cc58df6f6bbc3c0567f1e" + resolved "https://registry.npmjs.org/esformatter-ignore/-/esformatter-ignore-0.1.3.tgz#04d3b875bfa49dde004cc58df6f6bbc3c0567f1e" esformatter-jsx@^7.0.0: version "7.4.1" - resolved "https://registry.yarnpkg.com/esformatter-jsx/-/esformatter-jsx-7.4.1.tgz#b2209ae0908f413a747b1205727cbf4ba4249602" + resolved "https://registry.npmjs.org/esformatter-jsx/-/esformatter-jsx-7.4.1.tgz#b2209ae0908f413a747b1205727cbf4ba4249602" dependencies: babylon "6.14.1" esformatter-ignore "^0.1.3" @@ -1869,14 +2328,14 @@ esformatter-jsx@^7.0.0: esformatter-literal-notation@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/esformatter-literal-notation/-/esformatter-literal-notation-1.0.1.tgz#710e7b420175fe3f7e5afad5bbad329103842e2f" + resolved "https://registry.npmjs.org/esformatter-literal-notation/-/esformatter-literal-notation-1.0.1.tgz#710e7b420175fe3f7e5afad5bbad329103842e2f" dependencies: rocambole "^0.3.6" rocambole-token "^1.2.1" esformatter-parser@^1.0, esformatter-parser@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/esformatter-parser/-/esformatter-parser-1.0.0.tgz#0854072d0487539ed39cae38d8a5432c17ec11d3" + resolved "https://registry.npmjs.org/esformatter-parser/-/esformatter-parser-1.0.0.tgz#0854072d0487539ed39cae38d8a5432c17ec11d3" dependencies: acorn-to-esprima "^2.0.8" babel-traverse "^6.9.0" @@ -1885,17 +2344,17 @@ esformatter-parser@^1.0, esformatter-parser@^1.0.0: esformatter-quotes@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/esformatter-quotes/-/esformatter-quotes-1.1.0.tgz#e22c6c445c7f306041d81c9b9e51fca6cbfaca82" + resolved "https://registry.npmjs.org/esformatter-quotes/-/esformatter-quotes-1.1.0.tgz#e22c6c445c7f306041d81c9b9e51fca6cbfaca82" esformatter-remove-trailing-commas@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/esformatter-remove-trailing-commas/-/esformatter-remove-trailing-commas-1.0.1.tgz#9397624c1faa980fc4ecc7e5e9813eb4f2b582a7" + resolved "https://registry.npmjs.org/esformatter-remove-trailing-commas/-/esformatter-remove-trailing-commas-1.0.1.tgz#9397624c1faa980fc4ecc7e5e9813eb4f2b582a7" dependencies: rocambole-token "^1.2.1" esformatter-semicolon-first@^1.1.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/esformatter-semicolon-first/-/esformatter-semicolon-first-1.2.0.tgz#e3b512d1d4e07310eabcabf57277ea7c8a56e242" + resolved "https://registry.npmjs.org/esformatter-semicolon-first/-/esformatter-semicolon-first-1.2.0.tgz#e3b512d1d4e07310eabcabf57277ea7c8a56e242" dependencies: esformatter-parser "^1.0" rocambole ">=0.6.0 <2.0" @@ -1904,11 +2363,11 @@ esformatter-semicolon-first@^1.1.0: esformatter-spaced-lined-comment@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/esformatter-spaced-lined-comment/-/esformatter-spaced-lined-comment-2.0.1.tgz#dc5f3407f93c295e1e56446bd344560da5e6dcac" + resolved "https://registry.npmjs.org/esformatter-spaced-lined-comment/-/esformatter-spaced-lined-comment-2.0.1.tgz#dc5f3407f93c295e1e56446bd344560da5e6dcac" esformatter@^0.9.0: version "0.9.6" - resolved "https://registry.yarnpkg.com/esformatter/-/esformatter-0.9.6.tgz#3608aec7828deee3cd3f46e1192aeb47268a957f" + resolved "https://registry.npmjs.org/esformatter/-/esformatter-0.9.6.tgz#3608aec7828deee3cd3f46e1192aeb47268a957f" dependencies: acorn-to-esprima "^2.0.6" babel-traverse "^6.4.5" @@ -1933,34 +2392,34 @@ esformatter@^0.9.0: eslint-config-semistandard@^6.0.2: version "6.0.2" - resolved "https://registry.yarnpkg.com/eslint-config-semistandard/-/eslint-config-semistandard-6.0.2.tgz#257b96337d2a8f2eb20e20e5f0e8235014a190d4" + resolved "https://registry.npmjs.org/eslint-config-semistandard/-/eslint-config-semistandard-6.0.2.tgz#257b96337d2a8f2eb20e20e5f0e8235014a190d4" eslint-config-standard-jsx@1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-1.2.0.tgz#ca9fd593610e6af55a2ad3f4300092d1e8c0def5" + resolved "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-1.2.0.tgz#ca9fd593610e6af55a2ad3f4300092d1e8c0def5" eslint-config-standard@5.3.1: version "5.3.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-5.3.1.tgz#591c969151744132f561d3b915a812ea413fe490" + resolved "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-5.3.1.tgz#591c969151744132f561d3b915a812ea413fe490" eslint-plugin-promise@^1.0.8: version "1.3.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-1.3.2.tgz#fce332d6f5ff523200a537704863ec3c2422ba7c" + resolved "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-1.3.2.tgz#fce332d6f5ff523200a537704863ec3c2422ba7c" eslint-plugin-react@^5.0.1: version "5.2.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-5.2.2.tgz#7db068e1f5487f6871e4deef36a381c303eac161" + resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-5.2.2.tgz#7db068e1f5487f6871e4deef36a381c303eac161" dependencies: doctrine "^1.2.2" jsx-ast-utils "^1.2.1" eslint-plugin-standard@^1.3.1: version "1.3.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-1.3.3.tgz#a3085451523431e76f409c70cb8f94e32bf0ec7f" + resolved "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-1.3.3.tgz#a3085451523431e76f409c70cb8f94e32bf0ec7f" eslint@2.*, eslint@^2.10.1: version "2.13.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-2.13.1.tgz#e4cc8fa0f009fb829aaae23855a29360be1f6c11" + resolved "https://registry.npmjs.org/eslint/-/eslint-2.13.1.tgz#e4cc8fa0f009fb829aaae23855a29360be1f6c11" dependencies: chalk "^1.1.3" concat-stream "^1.4.6" @@ -1998,7 +2457,7 @@ eslint@2.*, eslint@^2.10.1: eslint@^0.24.1: version "0.24.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-0.24.1.tgz#54a50809855b9655721c6f2ee57b351edce28101" + resolved "https://registry.npmjs.org/eslint/-/eslint-0.24.1.tgz#54a50809855b9655721c6f2ee57b351edce28101" dependencies: chalk "^1.0.0" concat-stream "^1.4.6" @@ -2025,82 +2484,140 @@ eslint@^0.24.1: espree@^2.0.1: version "2.2.5" - resolved "https://registry.yarnpkg.com/espree/-/espree-2.2.5.tgz#df691b9310889402aeb29cc066708c56690b854b" + resolved "https://registry.npmjs.org/espree/-/espree-2.2.5.tgz#df691b9310889402aeb29cc066708c56690b854b" espree@^3.1.6: - version "3.4.3" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374" + version "3.5.2" + resolved "https://registry.npmjs.org/espree/-/espree-3.5.2.tgz#756ada8b979e9dcfcdb30aad8d1a9304a905e1ca" dependencies: - acorn "^5.0.1" + acorn "^5.2.1" acorn-jsx "^3.0.0" esprima@2.7.x, esprima@^2.1, esprima@^2.6.0, esprima@^2.7.1: version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + resolved "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^3.1.3: + version "3.1.3" + resolved "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" esprima@~1.0: version "1.0.4" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.0.4.tgz#9f557e08fc3b4d26ece9dd34f8fbf476b62585ad" + resolved "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz#9f557e08fc3b4d26ece9dd34f8fbf476b62585ad" esrecurse@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" + version "4.2.0" + resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" dependencies: - estraverse "~4.1.0" + estraverse "^4.1.0" object-assign "^4.0.1" estraverse-fb@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/estraverse-fb/-/estraverse-fb-1.3.1.tgz#160e75a80e605b08ce894bcce2fe3e429abf92bf" + version "1.3.2" + resolved "https://registry.npmjs.org/estraverse-fb/-/estraverse-fb-1.3.2.tgz#d323a4cb5e5ac331cea033413a9253e1643e07c4" estraverse@^1.9.1: version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - -estraverse@~4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" esutils@^1.1.6: version "1.1.6" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.1.6.tgz#c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375" + resolved "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz#c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375" esutils@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +ethereum-common@^0.0.18: + version "0.0.18" + resolved "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" + +ethereumjs-tx@^1.3.1: + version "1.3.3" + resolved "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.3.tgz#ece051d3efdbe771ad2a518d61632ca2ab75ecbb" + dependencies: + ethereum-common "^0.0.18" + ethereumjs-util "^5.0.0" + +ethereumjs-util@^4.4.0: + version "4.5.0" + resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz#3e9428b317eebda3d7260d854fddda954b1f1bc6" + dependencies: + bn.js "^4.8.0" + create-hash "^1.1.2" + keccakjs "^0.2.0" + rlp "^2.0.0" + secp256k1 "^3.0.1" + +ethereumjs-util@^5.0.0, ethereumjs-util@^5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.1.2.tgz#25ba0215cbb4c2f0b108a6f96af2a2e62e45921f" + dependencies: + babel-preset-es2015 "^6.24.0" + babelify "^7.3.0" + bn.js "^4.8.0" + create-hash "^1.1.2" + ethjs-util "^0.1.3" + keccak "^1.0.2" + rlp "^2.0.0" + secp256k1 "^3.0.1" + +ethereumjs-wallet@^0.6.0: + version "0.6.0" + resolved "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.0.tgz#82763b1697ee7a796be7155da9dfb49b2f98cfdb" + dependencies: + aes-js "^0.2.3" + bs58check "^1.0.8" + ethereumjs-util "^4.4.0" + hdkey "^0.7.0" + scrypt.js "^0.2.0" + utf8 "^2.1.1" + uuid "^2.0.1" + +ethjs-util@^0.1.3: + version "0.1.4" + resolved "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.4.tgz#1c8b6879257444ef4d3f3fbbac2ded12cd997d93" + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" event-emitter@~0.3.5: version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + resolved "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" dependencies: d "1" es5-ext "~0.10.14" eventemitter3@1.x.x: version "1.2.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" + resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" events@^1.0.0, events@~1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + resolved "https://registry.npmjs.org/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" -evp_bytestokey@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz#497b66ad9fef65cd7c08a6180824ba1476b66e53" +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" dependencies: - create-hash "^1.1.1" + md5.js "^1.3.4" + safe-buffer "^5.1.1" exit-hook@^1.0.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + resolved "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" expand-braces@^0.1.1: version "0.1.2" - resolved "https://registry.yarnpkg.com/expand-braces/-/expand-braces-0.1.2.tgz#488b1d1d2451cb3d3a6b192cfc030f44c5855fea" + resolved "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz#488b1d1d2451cb3d3a6b192cfc030f44c5855fea" dependencies: array-slice "^0.2.3" array-unique "^0.2.1" @@ -2108,26 +2625,30 @@ expand-braces@^0.1.1: expand-brackets@^0.1.4: version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + resolved "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" dependencies: is-posix-bracket "^0.1.0" expand-range@^0.1.0: version "0.1.1" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-0.1.1.tgz#4cb8eda0993ca56fa4f41fc42f3cbb4ccadff044" + resolved "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz#4cb8eda0993ca56fa4f41fc42f3cbb4ccadff044" dependencies: is-number "^0.1.1" repeat-string "^0.2.2" expand-range@^1.8.1: version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + resolved "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" dependencies: fill-range "^2.1.0" +expand-template@^1.0.2: + version "1.1.0" + resolved "https://registry.npmjs.org/expand-template/-/expand-template-1.1.0.tgz#e09efba977bf98f9ee0ed25abd0c692e02aec3fc" + express@3.0.x: version "3.0.6" - resolved "https://registry.yarnpkg.com/express/-/express-3.0.6.tgz#d274fcb868b95788bf4af62168d75d13fd77d8b4" + resolved "https://registry.npmjs.org/express/-/express-3.0.6.tgz#d274fcb868b95788bf4af62168d75d13fd77d8b4" dependencies: buffer-crc32 "0.1.1" commander "0.6.1" @@ -2143,48 +2664,56 @@ express@3.0.x: extend@3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + resolved "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" -extend@^3.0.0, extend@~3.0.0: +extend@^3.0.0, extend@~3.0.0, extend@~3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + resolved "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" extglob@^0.3.1: version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + resolved "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" dependencies: is-extglob "^1.0.0" -extract-zip@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.5.0.tgz#92ccf6d81ef70a9fa4c1747114ccef6d8688a6c4" +extract-zip@^1.6.5: + version "1.6.6" + resolved "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.6.tgz#1290ede8d20d0872b429fd3f351ca128ec5ef85c" dependencies: - concat-stream "1.5.0" - debug "0.7.4" + concat-stream "1.6.0" + debug "2.6.9" mkdirp "0.5.0" yauzl "2.4.1" -extsprintf@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" +extsprintf@1.3.0, extsprintf@^1.2.0: + version "1.3.0" + resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +fast-deep-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" fast-levenshtein@~1.0.0: version "1.0.7" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz#0178dcdee023b92905193af0959e8a7639cfdcb9" + resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz#0178dcdee023b92905193af0959e8a7639cfdcb9" fast-levenshtein@~2.0.4: version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" fd-slicer@~1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" + resolved "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" dependencies: pend "~1.2.0" fetch-mock@^5.1.2: - version "5.10.0" - resolved "https://registry.yarnpkg.com/fetch-mock/-/fetch-mock-5.10.0.tgz#52e29c72800640e48410602fe076ac3615e590ad" + version "5.13.1" + resolved "https://registry.npmjs.org/fetch-mock/-/fetch-mock-5.13.1.tgz#955794a77f3d972f1644b9ace65a0fdfd60f1df7" dependencies: glob-to-regexp "^0.3.0" node-fetch "^1.3.3" @@ -2192,38 +2721,38 @@ fetch-mock@^5.1.2: figures@^1.3.5: version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + resolved "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" dependencies: escape-string-regexp "^1.0.5" object-assign "^4.1.0" file-entry-cache@^1.1.1: version "1.3.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-1.3.1.tgz#44c61ea607ae4be9c1402f41f44270cbfe334ff8" + resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz#44c61ea607ae4be9c1402f41f44270cbfe334ff8" dependencies: flat-cache "^1.2.1" object-assign "^4.0.1" file-loader@^0.8.1: version "0.8.5" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-0.8.5.tgz#9275d031fe780f27d47f5f4af02bd43713cc151b" + resolved "https://registry.npmjs.org/file-loader/-/file-loader-0.8.5.tgz#9275d031fe780f27d47f5f4af02bd43713cc151b" dependencies: loader-utils "~0.2.5" filename-regex@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + resolved "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" fill-keys@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/fill-keys/-/fill-keys-1.0.2.tgz#9a8fa36f4e8ad634e3bf6b4f3c8882551452eb20" + resolved "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz#9a8fa36f4e8ad634e3bf6b4f3c8882551452eb20" dependencies: is-object "~1.0.1" merge-descriptors "~1.0.0" fill-range@^2.1.0: version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" dependencies: is-number "^2.1.0" isobject "^2.0.0" @@ -2231,44 +2760,44 @@ fill-range@^2.1.0: repeat-element "^1.1.2" repeat-string "^1.5.2" -finalhandler@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.1.tgz#bcd15d1689c0e5ed729b6f7f541a6df984117db8" +finalhandler@1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.6.tgz#007aea33d1a4d3e42017f624848ad58d212f814f" dependencies: - debug "2.6.3" + debug "2.6.9" encodeurl "~1.0.1" escape-html "~1.0.3" on-finished "~2.3.0" - parseurl "~1.3.1" + parseurl "~1.3.2" statuses "~1.3.1" unpipe "~1.0.0" find-cache-dir@^0.1.1: version "0.1.1" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" + resolved "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" dependencies: commondir "^1.0.1" mkdirp "^0.5.1" pkg-dir "^1.0.0" find-root@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.0.0.tgz#962ff211aab25c6520feeeb8d6287f8f6e95807a" + version "1.1.0" + resolved "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" find-up@^1.0.0: version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + resolved "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" dependencies: path-exists "^2.0.0" pinkie-promise "^2.0.0" findit@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/findit/-/findit-2.0.0.tgz#6509f0126af4c178551cfa99394e032e13a4d56e" + resolved "https://registry.npmjs.org/findit/-/findit-2.0.0.tgz#6509f0126af4c178551cfa99394e032e13a4d56e" flat-cache@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" + version "1.3.0" + resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" dependencies: circular-json "^0.3.1" del "^2.0.2" @@ -2277,21 +2806,29 @@ flat-cache@^1.2.1: for-in@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + resolved "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" for-own@^0.1.4: version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + resolved "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" dependencies: for-in "^1.0.1" forever-agent@~0.6.1: version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" form-data@~2.1.1: version "2.1.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + resolved "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +form-data@~2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf" dependencies: asynckit "^0.4.0" combined-stream "^1.0.5" @@ -2299,42 +2836,52 @@ form-data@~2.1.1: formidable@1.0.11: version "1.0.11" - resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.0.11.tgz#68f63325a035e644b6f7bb3d11243b9761de1b30" + resolved "https://registry.npmjs.org/formidable/-/formidable-1.0.11.tgz#68f63325a035e644b6f7bb3d11243b9761de1b30" fresh@0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.1.0.tgz#03e4b0178424e4c2d5d19a54d8814cdc97934850" + resolved "https://registry.npmjs.org/fresh/-/fresh-0.1.0.tgz#03e4b0178424e4c2d5d19a54d8814cdc97934850" + +fs-access@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a" + dependencies: + null-check "^1.0.0" fs-extra@^0.18.4: version "0.18.4" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.18.4.tgz#7f205752d6d3959c967533e34540161a7b38dc36" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-0.18.4.tgz#7f205752d6d3959c967533e34540161a7b38dc36" dependencies: graceful-fs "^3.0.5" jsonfile "^2.0.0" rimraf "^2.2.8" -fs-extra@~1.0.0: +fs-extra@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" dependencies: graceful-fs "^4.1.2" jsonfile "^2.1.0" klaw "^1.0.0" +fs-readdir-recursive@^1.0.0: + version "1.1.0" + resolved "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" fsevents@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.1.tgz#f19fd28f43eeaf761680e519a203c4d0b3d31aff" + version "1.1.3" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" dependencies: nan "^2.3.0" - node-pre-gyp "^0.6.29" + node-pre-gyp "^0.6.39" fstream-ignore@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + resolved "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" dependencies: fstream "^1.0.0" inherits "2" @@ -2342,7 +2889,7 @@ fstream-ignore@^1.0.5: fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + resolved "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" dependencies: graceful-fs "^4.1.2" inherits "~2.0.0" @@ -2350,12 +2897,12 @@ fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: rimraf "2" function-bind@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" + version "1.1.1" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" gauge@~2.7.3: version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + resolved "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" dependencies: aproba "^1.0.3" console-control-strings "^1.0.0" @@ -2368,35 +2915,35 @@ gauge@~2.7.3: generate-function@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + resolved "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" generate-object-property@^1.1.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + resolved "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" dependencies: is-property "^1.0.0" get-caller-file@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" get-stdin@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" get-stdin@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" + resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" getpass@^0.1.1: version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + resolved "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" dependencies: assert-plus "^1.0.0" git-changelog@1.0.*: version "1.0.1" - resolved "https://registry.yarnpkg.com/git-changelog/-/git-changelog-1.0.1.tgz#55a90dc4ed883ce15d577763d263dcc46b769a78" + resolved "https://registry.npmjs.org/git-changelog/-/git-changelog-1.0.1.tgz#55a90dc4ed883ce15d577763d263dcc46b769a78" dependencies: colors "^1.1.0" commander "^2.8.0" @@ -2405,26 +2952,30 @@ git-changelog@1.0.*: lodash "^3.7.0" q "^1.2.0" +github-from-package@0.0.0: + version "0.0.0" + resolved "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + glob-base@^0.3.0: version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + resolved "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" dependencies: glob-parent "^2.0.0" is-glob "^2.0.0" glob-parent@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" dependencies: is-glob "^2.0.0" glob-to-regexp@^0.3.0: version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" glob@^5.0.15, glob@^5.0.3: version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + resolved "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" dependencies: inflight "^1.0.4" inherits "2" @@ -2432,28 +2983,28 @@ glob@^5.0.15, glob@^5.0.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.3, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1, glob@^7.1.2: + version "7.1.2" + resolved "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.2" + minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" globals@^8.0.0: version "8.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-8.18.0.tgz#93d4a62bdcac38cfafafc47d6b034768cb0ffcb4" + resolved "https://registry.npmjs.org/globals/-/globals-8.18.0.tgz#93d4a62bdcac38cfafafc47d6b034768cb0ffcb4" -globals@^9.0.0, globals@^9.2.0: - version "9.17.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" +globals@^9.18.0, globals@^9.2.0: + version "9.18.0" + resolved "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" globby@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + resolved "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" dependencies: array-union "^1.0.1" arrify "^1.0.0" @@ -2464,21 +3015,17 @@ globby@^5.0.0: graceful-fs@^3.0.5: version "3.0.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818" dependencies: natives "^1.1.0" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: +graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" handlebars@^4.0.1: - version "4.0.8" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.8.tgz#22b875cd3f0e6cbea30314f144e82bc7a72ff420" + version "4.0.11" + resolved "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" dependencies: async "^1.4.0" optimist "^0.6.1" @@ -2488,11 +3035,15 @@ handlebars@^4.0.1: har-schema@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + resolved "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" har-validator@~2.0.6: version "2.0.6" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + resolved "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" dependencies: chalk "^1.1.1" commander "^2.9.0" @@ -2501,82 +3052,113 @@ har-validator@~2.0.6: har-validator@~4.2.1: version "4.2.1" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + resolved "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" dependencies: ajv "^4.9.1" har-schema "^1.0.5" +har-validator@~5.0.3: + version "5.0.3" + resolved "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" + dependencies: + ajv "^5.1.0" + har-schema "^2.0.0" + has-ansi@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + resolved "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" dependencies: ansi-regex "^2.0.0" has-binary@0.1.7: version "0.1.7" - resolved "https://registry.yarnpkg.com/has-binary/-/has-binary-0.1.7.tgz#68e61eb16210c9545a0a5cce06a873912fe1e68c" + resolved "https://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz#68e61eb16210c9545a0a5cce06a873912fe1e68c" dependencies: isarray "0.0.1" has-cors@1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" + resolved "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" has-flag@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" has-require@^1.1.0: version "1.2.2" - resolved "https://registry.yarnpkg.com/has-require/-/has-require-1.2.2.tgz#921675ab130dbd9768fc8da8f1a8e242dfa41774" + resolved "https://registry.npmjs.org/has-require/-/has-require-1.2.2.tgz#921675ab130dbd9768fc8da8f1a8e242dfa41774" dependencies: escape-string-regexp "^1.0.3" has-unicode@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" has@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + resolved "https://registry.npmjs.org/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" dependencies: function-bind "^1.0.2" hash-base@^2.0.0: version "2.0.2" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" + resolved "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" dependencies: inherits "^2.0.1" -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.0.3.tgz#1332ff00156c0a0ffdd8236013d07b77a0451573" +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" dependencies: inherits "^2.0.1" + safe-buffer "^5.0.1" -hasha@~2.2.0: +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.3" + resolved "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hasha@^2.2.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1" + resolved "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1" dependencies: is-stream "^1.0.1" pinkie-promise "^2.0.0" hat@^0.0.3: version "0.0.3" - resolved "https://registry.yarnpkg.com/hat/-/hat-0.0.3.tgz#bb014a9e64b3788aed8005917413d4ff3d502d8a" + resolved "https://registry.npmjs.org/hat/-/hat-0.0.3.tgz#bb014a9e64b3788aed8005917413d4ff3d502d8a" -hawk@~3.1.3: +hawk@3.1.3, hawk@~3.1.3: version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + resolved "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" dependencies: boom "2.x.x" cryptiles "2.x.x" hoek "2.x.x" sntp "1.x.x" +hawk@~6.0.2: + version "6.0.2" + resolved "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" + dependencies: + boom "4.x.x" + cryptiles "3.x.x" + hoek "4.x.x" + sntp "2.x.x" + +hdkey@^0.7.0: + version "0.7.1" + resolved "https://registry.npmjs.org/hdkey/-/hdkey-0.7.1.tgz#caee4be81aa77921e909b8d228dd0f29acaee632" + dependencies: + coinstring "^2.0.0" + secp256k1 "^3.0.1" + hmac-drbg@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + resolved "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" dependencies: hash.js "^1.0.3" minimalistic-assert "^1.0.0" @@ -2584,109 +3166,121 @@ hmac-drbg@^1.0.0: hoek@2.x.x: version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + resolved "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +hoek@4.x.x: + version "4.2.0" + resolved "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d" home-or-tmp@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + resolved "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.1" hosted-git-info@^2.1.4: - version "2.4.2" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67" + version "2.5.0" + resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" htmlescape@^1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351" + resolved "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351" -http-errors@~1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.1.tgz#5f8b8ed98aca545656bf572997387f904a722257" +http-errors@1.6.2, http-errors@~1.6.2: + version "1.6.2" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" dependencies: - depd "1.1.0" + depd "1.1.1" inherits "2.0.3" setprototypeof "1.0.3" statuses ">= 1.3.1 < 2" http-proxy@^1.13.0: version "1.16.2" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" + resolved "https://registry.npmjs.org/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" dependencies: eventemitter3 "1.x.x" requires-port "1.x.x" http-signature@~1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" dependencies: - assert-plus "^0.2.0" + assert-plus "^1.0.0" jsprim "^1.2.2" sshpk "^1.7.0" -https-browserify@0.0.1, https-browserify@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" - https-browserify@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + resolved "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + +https-browserify@~0.0.0: + version "0.0.1" + resolved "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" -iconv-lite@0.4.15, iconv-lite@~0.4.13: - version "0.4.15" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" +iconv-lite@0.4.19, iconv-lite@~0.4.13: + version "0.4.19" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" ieee754@^1.1.4: version "1.1.8" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" + resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" ignore@^3.0.9, ignore@^3.1.2: - version "3.3.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.0.tgz#3812d22cbe9125f2c2b4915755a1b8abd745a001" + version "3.3.7" + resolved "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" imurmurhash@^0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" indent-string@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + resolved "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" dependencies: repeating "^2.0.0" indexof@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + resolved "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" inflight@^1.0.4: version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" dependencies: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" inherits@2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" ini@^1.3.4, ini@~1.3.0: version "1.3.4" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + resolved "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" inline-source-map@~0.6.0: version "0.6.2" - resolved "https://registry.yarnpkg.com/inline-source-map/-/inline-source-map-0.6.2.tgz#f9393471c18a79d1724f863fa38b586370ade2a5" + resolved "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz#f9393471c18a79d1724f863fa38b586370ade2a5" dependencies: source-map "~0.5.3" inquirer@^0.12.0: version "0.12.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" + resolved "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" dependencies: ansi-escapes "^1.1.0" ansi-regex "^2.0.0" @@ -2704,7 +3298,7 @@ inquirer@^0.12.0: inquirer@^0.8.2: version "0.8.5" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.8.5.tgz#dbd740cf6ca3b731296a63ce6f6d961851f336df" + resolved "https://registry.npmjs.org/inquirer/-/inquirer-0.8.5.tgz#dbd740cf6ca3b731296a63ce6f6d961851f336df" dependencies: ansi-regex "^1.1.1" chalk "^1.0.0" @@ -2717,7 +3311,7 @@ inquirer@^0.8.2: insert-module-globals@^7.0.0: version "7.0.1" - resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.0.1.tgz#c03bf4e01cb086d5b5e5ace8ad0afe7889d638c3" + resolved "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz#c03bf4e01cb086d5b5e5ace8ad0afe7889d638c3" dependencies: JSONStream "^1.0.3" combine-source-map "~0.7.1" @@ -2729,82 +3323,86 @@ insert-module-globals@^7.0.0: xtend "^4.0.0" interpret@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" + version "1.0.4" + resolved "https://registry.npmjs.org/interpret/-/interpret-1.0.4.tgz#820cdd588b868ffb191a809506d6c9c8f212b1b0" -invariant@^2.2.0: +invariant@^2.2.2: version "2.2.2" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" dependencies: loose-envify "^1.0.0" invert-kv@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + resolved "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" is-arrayish@^0.2.1: version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" is-binary-path@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" dependencies: binary-extensions "^1.0.0" is-buffer@^1.1.0, is-buffer@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + version "1.1.6" + resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" is-builtin-module@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + resolved "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" dependencies: builtin-modules "^1.0.0" is-dotfile@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + version "1.0.3" + resolved "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" is-equal-shallow@^0.1.3: version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + resolved "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" dependencies: is-primitive "^2.0.0" is-extendable@^0.1.1: version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" is-extglob@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" is-finite@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + resolved "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" is-glob@^2.0.0, is-glob@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" dependencies: is-extglob "^1.0.0" +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: - version "2.16.0" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" + version "2.16.1" + resolved "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz#5a846777e2c2620d1e69104e5d3a03b1f6088f11" dependencies: generate-function "^2.0.0" generate-object-property "^1.1.0" @@ -2813,100 +3411,106 @@ is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: is-number@^0.1.1: version "0.1.1" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-0.1.1.tgz#69a7af116963d47206ec9bd9b48a14216f1e3806" + resolved "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz#69a7af116963d47206ec9bd9b48a14216f1e3806" -is-number@^2.0.2, is-number@^2.1.0: +is-number@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + resolved "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" dependencies: kind-of "^3.0.2" is-object@~1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" + resolved "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" is-path-cwd@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + resolved "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" is-path-in-cwd@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + resolved "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" dependencies: is-path-inside "^1.0.0" is-path-inside@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" dependencies: path-is-inside "^1.0.1" is-posix-bracket@^0.1.0: version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + resolved "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" is-primitive@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + resolved "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" is-property@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + resolved "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" is-resolvable@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" + resolved "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" dependencies: tryit "^1.0.1" is-stream@^1.0.1: version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" is-typedarray@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" is-utf8@^0.2.0: version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + resolved "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" isarray@0.0.1, isarray@~0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" isbinaryfile@^3.0.0: version "3.0.2" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" + resolved "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" isexe@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" isobject@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + resolved "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" dependencies: isarray "1.0.0" isomorphic-fetch@^2.2.0, isomorphic-fetch@^2.2.1: version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + resolved "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" dependencies: node-fetch "^1.0.1" whatwg-fetch ">=0.10.0" isstream@~0.1.2: version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" istanbul@^0.4.0, istanbul@~0.4.5: version "0.4.5" - resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" + resolved "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" dependencies: abbrev "1.0.x" async "1.x" @@ -2924,123 +3528,132 @@ istanbul@^0.4.0, istanbul@~0.4.5: wordwrap "^1.0.0" jasmine-core@^2.2.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.6.1.tgz#66a61cddb699958e3613edef346c996f6311fc3b" + version "2.8.0" + resolved "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e" jasmine-es6-promise-matchers@^2.0.1: version "2.0.2" - resolved "https://registry.yarnpkg.com/jasmine-es6-promise-matchers/-/jasmine-es6-promise-matchers-2.0.2.tgz#a4b493e2549d237eaf5ee712b106f70498611d45" + resolved "https://registry.npmjs.org/jasmine-es6-promise-matchers/-/jasmine-es6-promise-matchers-2.0.2.tgz#a4b493e2549d237eaf5ee712b106f70498611d45" dependencies: es6-promise "~2.0.1" -jodid25519@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" - dependencies: - jsbn "~0.1.0" - js-beautify@1.6.4: version "1.6.4" - resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.6.4.tgz#a9af79699742ac9a1b6fddc1fdbc78bc4d515fc3" + resolved "https://registry.npmjs.org/js-beautify/-/js-beautify-1.6.4.tgz#a9af79699742ac9a1b6fddc1fdbc78bc4d515fc3" dependencies: config-chain "~1.1.5" editorconfig "^0.13.2" mkdirp "~0.5.0" nopt "~3.0.1" +js-sha3@^0.3.1: + version "0.3.1" + resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.3.1.tgz#86122802142f0828502a0d1dee1d95e253bb0243" + js-string-escape@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef" + resolved "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef" -js-tokens@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@3.6.1, js-yaml@3.x, js-yaml@^3.2.5, js-yaml@^3.5.1: +js-yaml@3.6.1: version "3.6.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" dependencies: argparse "^1.0.7" esprima "^2.6.0" +js-yaml@3.x, js-yaml@^3.2.5, js-yaml@^3.5.1: + version "3.10.0" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + jsbn@~0.1.0: version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" jsesc@^1.3.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" jsesc@~0.5.0: version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" json-loader@^0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.4.tgz#8baa1365a632f58a3c46d20175fc6002c96e37de" + version "0.5.7" + resolved "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" + +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" json-schema@0.2.3: version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + resolved "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" dependencies: jsonify "~0.0.0" json-stable-stringify@~0.0.0: version "0.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz#611c23e814db375527df851193db59dd2af27f45" + resolved "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz#611c23e814db375527df851193db59dd2af27f45" dependencies: jsonify "~0.0.0" json-stringify-safe@~5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" json3@3.3.2: version "3.3.2" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + resolved "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" json5@^0.5.0, json5@^0.5.1: version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + resolved "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" jsonfile@^2.0.0, jsonfile@^2.1.0: version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" optionalDependencies: graceful-fs "^4.1.6" jsonify@~0.0.0: version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + resolved "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" jsonparse@^1.2.0: version "1.3.1" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" jsonpointer@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + resolved "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" jsprim@^1.2.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" + version "1.4.1" + resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" dependencies: assert-plus "1.0.0" - extsprintf "1.0.2" + extsprintf "1.3.0" json-schema "0.2.3" - verror "1.3.6" + verror "1.10.0" jsx-ast-utils@^1.2.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" + resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" karma-browserify@5.1.*: - version "5.1.1" - resolved "https://registry.yarnpkg.com/karma-browserify/-/karma-browserify-5.1.1.tgz#f642d70d776d9ab3b73526c5732abcfea2400319" + version "5.1.2" + resolved "https://registry.npmjs.org/karma-browserify/-/karma-browserify-5.1.2.tgz#48016359d722312a3530aa1dbbab7663e022d779" dependencies: convert-source-map "^1.1.3" hat "^0.0.3" @@ -3049,9 +3662,16 @@ karma-browserify@5.1.*: minimatch "^3.0.0" os-shim "^0.1.3" +karma-chrome-launcher@^2.2.0: + version "2.2.0" + resolved "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz#cf1b9d07136cc18fe239327d24654c3dbc368acf" + dependencies: + fs-access "^1.0.0" + which "^1.2.1" + karma-coverage@1.1.*: version "1.1.1" - resolved "https://registry.yarnpkg.com/karma-coverage/-/karma-coverage-1.1.1.tgz#5aff8b39cf6994dc22de4c84362c76001b637cf6" + resolved "https://registry.npmjs.org/karma-coverage/-/karma-coverage-1.1.1.tgz#5aff8b39cf6994dc22de4c84362c76001b637cf6" dependencies: dateformat "^1.0.6" istanbul "^0.4.0" @@ -3061,24 +3681,24 @@ karma-coverage@1.1.*: karma-jasmine@1.1.*: version "1.1.0" - resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-1.1.0.tgz#22e4c06bf9a182e5294d1f705e3733811b810acf" + resolved "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-1.1.0.tgz#22e4c06bf9a182e5294d1f705e3733811b810acf" karma-osx-reporter@0.2.*: version "0.2.1" - resolved "https://registry.yarnpkg.com/karma-osx-reporter/-/karma-osx-reporter-0.2.1.tgz#2c756fabd566aa31df6b7d64b5c8975ed875ba98" + resolved "https://registry.npmjs.org/karma-osx-reporter/-/karma-osx-reporter-0.2.1.tgz#2c756fabd566aa31df6b7d64b5c8975ed875ba98" dependencies: node-osx-notifier ">= 0.1.0" karma-phantomjs-launcher@1.0.*: version "1.0.4" - resolved "https://registry.yarnpkg.com/karma-phantomjs-launcher/-/karma-phantomjs-launcher-1.0.4.tgz#d23ca34801bda9863ad318e3bb4bd4062b13acd2" + resolved "https://registry.npmjs.org/karma-phantomjs-launcher/-/karma-phantomjs-launcher-1.0.4.tgz#d23ca34801bda9863ad318e3bb4bd4062b13acd2" dependencies: lodash "^4.0.1" phantomjs-prebuilt "^2.1.7" karma@1.7.*: - version "1.7.0" - resolved "https://registry.yarnpkg.com/karma/-/karma-1.7.0.tgz#6f7a1a406446fa2e187ec95398698f4cee476269" + version "1.7.1" + resolved "https://registry.npmjs.org/karma/-/karma-1.7.1.tgz#85cc08e9e0a22d7ce9cca37c4a1be824f6a2b1ae" dependencies: bluebird "^3.3.0" body-parser "^1.16.1" @@ -3108,25 +3728,48 @@ karma@1.7.*: tmp "0.0.31" useragent "^2.1.12" -kew@~0.7.0: +keccak@^1.0.2: + version "1.3.0" + resolved "https://registry.npmjs.org/keccak/-/keccak-1.3.0.tgz#3681bd99ad3d0354ddb29b9040c1b6560cce08ac" + dependencies: + bindings "^1.2.1" + inherits "^2.0.3" + nan "^2.2.1" + prebuild-install "^2.0.0" + safe-buffer "^5.1.0" + +keccakjs@^0.2.0: + version "0.2.1" + resolved "https://registry.npmjs.org/keccakjs/-/keccakjs-0.2.1.tgz#1d633af907ef305bbf9f2fa616d56c44561dfa4d" + dependencies: + browserify-sha3 "^0.0.1" + sha3 "^1.1.0" + +kew@^0.7.0: version "0.7.0" - resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b" + resolved "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b" kind-of@^3.0.2: - version "3.2.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.0.tgz#b58abe4d5c044ad33726a8c1525b48cf891bff07" + version "3.2.2" + resolved "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" dependencies: is-buffer "^1.1.5" klaw@^1.0.0: version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + resolved "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" optionalDependencies: graceful-fs "^4.1.9" labeled-stream-splicer@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz#a52e1d138024c00b86b1c0c91f677918b8ae0a59" + resolved "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz#a52e1d138024c00b86b1c0c91f677918b8ae0a59" dependencies: inherits "^2.0.1" isarray "~0.0.1" @@ -3134,41 +3777,41 @@ labeled-stream-splicer@^2.0.0: lazy-cache@^1.0.3: version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + resolved "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" lcid@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + resolved "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" dependencies: invert-kv "^1.0.0" lcov-parse@0.0.10: version "0.0.10" - resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" + resolved "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" levn@^0.3.0, levn@~0.3.0: version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + resolved "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" levn@~0.2.5: version "0.2.5" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.2.5.tgz#ba8d339d0ca4a610e3a3f145b9caf48807155054" + resolved "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz#ba8d339d0ca4a610e3a3f145b9caf48807155054" dependencies: prelude-ls "~1.1.0" type-check "~0.3.1" lexical-scope@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/lexical-scope/-/lexical-scope-1.2.0.tgz#fcea5edc704a4b3a8796cdca419c3a0afaf22df4" + resolved "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz#fcea5edc704a4b3a8796cdca419c3a0afaf22df4" dependencies: astw "^2.0.0" load-json-file@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" dependencies: graceful-fs "^4.1.2" parse-json "^2.2.0" @@ -3178,11 +3821,11 @@ load-json-file@^1.0.0: loader-runner@^2.3.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" + resolved "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" loader-utils@^0.2.11, loader-utils@^0.2.16, loader-utils@^0.2.5, loader-utils@~0.2.2, loader-utils@~0.2.3, loader-utils@~0.2.5: version "0.2.17" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + resolved "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" dependencies: big.js "^3.1.3" emojis-list "^2.0.0" @@ -3191,72 +3834,79 @@ loader-utils@^0.2.11, loader-utils@^0.2.16, loader-utils@^0.2.5, loader-utils@~0 lodash.memoize@~3.0.3: version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" + resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" lodash@^3.10.1, lodash@^3.3.1, lodash@^3.7.0, lodash@^3.8.0: version "3.10.1" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" + resolved "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" -lodash@^4.0.0, lodash@^4.0.1, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.5.0: +lodash@^4.0.0, lodash@^4.0.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.5.0: version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" log-driver@1.2.5: version "1.2.5" - resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" + resolved "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" log4js@^0.6.31: version "0.6.38" - resolved "https://registry.yarnpkg.com/log4js/-/log4js-0.6.38.tgz#2c494116695d6fb25480943d3fc872e662a522fd" + resolved "https://registry.npmjs.org/log4js/-/log4js-0.6.38.tgz#2c494116695d6fb25480943d3fc872e662a522fd" dependencies: readable-stream "~1.0.2" semver "~4.3.3" longest@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + resolved "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" loose-envify@^1.0.0: version "1.3.1" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" dependencies: js-tokens "^3.0.0" loud-rejection@^1.0.0: version "1.6.0" - resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + resolved "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" dependencies: currently-unhandled "^0.4.1" signal-exit "^3.0.0" lru-cache@2.2.x: version "2.2.4" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d" lru-cache@^3.2.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee" dependencies: pseudomap "^1.0.1" map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + resolved "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +md5.js@^1.3.4: + version "1.3.4" + resolved "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" media-typer@0.3.0: version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" memory-fs@^0.4.0, memory-fs@~0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + resolved "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" dependencies: errno "^0.1.3" readable-stream "^2.0.1" meow@^3.3.0: version "3.7.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + resolved "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" dependencies: camelcase-keys "^2.0.0" decamelize "^1.1.2" @@ -3271,15 +3921,19 @@ meow@^3.3.0: merge-descriptors@~1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + +merkle-lib@^2.0.10: + version "2.0.10" + resolved "https://registry.npmjs.org/merkle-lib/-/merkle-lib-2.0.10.tgz#82b8dbae75e27a7785388b73f9d7725d0f6f3326" methods@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/methods/-/methods-0.0.1.tgz#277c90f8bef39709645a8371c51c3b6c648e068c" + resolved "https://registry.npmjs.org/methods/-/methods-0.0.1.tgz#277c90f8bef39709645a8371c51c3b6c648e068c" micromatch@^2.1.5: version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" dependencies: arr-diff "^2.0.0" array-unique "^0.2.1" @@ -3296,77 +3950,81 @@ micromatch@^2.1.5: regex-cache "^0.4.2" miller-rabin@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.0.tgz#4a62fb1d42933c05583982f4c716f6fb9e6c6d3d" + version "4.0.1" + resolved "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" dependencies: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@~1.27.0: - version "1.27.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" +mime-db@~1.30.0: + version "1.30.0" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" -mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.15, mime-types@~2.1.7: - version "2.1.15" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" +mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.15, mime-types@~2.1.17, mime-types@~2.1.7: + version "2.1.17" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" dependencies: - mime-db "~1.27.0" + mime-db "~1.30.0" mime@1.2.6: version "1.2.6" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.2.6.tgz#b1f86c768c025fa87b48075f1709f28aeaf20365" + resolved "https://registry.npmjs.org/mime/-/mime-1.2.6.tgz#b1f86c768c025fa87b48075f1709f28aeaf20365" mime@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" + version "1.4.1" + resolved "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" minimalistic-assert@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" + resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + resolved "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2: +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4: version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: brace-expansion "^1.1.7" minimatch@^2.0.1: version "2.0.10" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" dependencies: brace-expansion "^1.0.0" -minimist@0.0.8, minimist@~0.0.1: +minimist@0.0.8: version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + resolved "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" mkdirp@0.3.3: version "0.3.3" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.3.tgz#595e251c1370c3a68bab2136d0e348b8105adf13" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.3.tgz#595e251c1370c3a68bab2136d0e348b8105adf13" mkdirp@0.5.0: version "0.5.0" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" dependencies: minimist "0.0.8" mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0: version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: minimist "0.0.8" module-deps@^4.0.8: version "4.1.1" - resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-4.1.1.tgz#23215833f1da13fd606ccb8087b44852dcb821fd" + resolved "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz#23215833f1da13fd606ccb8087b44852dcb821fd" dependencies: JSONStream "^1.0.3" browser-resolve "^1.7.0" @@ -3386,84 +4044,90 @@ module-deps@^4.0.8: module-not-found-error@~1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/module-not-found-error/-/module-not-found-error-1.0.1.tgz#cf8b4ff4f29640674d6cdd02b0e3bc523c2bbdc0" + resolved "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz#cf8b4ff4f29640674d6cdd02b0e3bc523c2bbdc0" "mout@>=0.9 <2.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/mout/-/mout-1.0.0.tgz#9bdf1d4af57d66d47cb353a6335a3281098e1501" + version "1.1.0" + resolved "https://registry.npmjs.org/mout/-/mout-1.1.0.tgz#0b29d41e6a80fa9e2d4a5be9d602e1d9d02177f6" mout@^0.11.0: version "0.11.1" - resolved "https://registry.yarnpkg.com/mout/-/mout-0.11.1.tgz#ba3611df5f0e5b1ffbfd01166b8f02d1f5fa2b99" + resolved "https://registry.npmjs.org/mout/-/mout-0.11.1.tgz#ba3611df5f0e5b1ffbfd01166b8f02d1f5fa2b99" ms@0.7.1: version "0.7.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + resolved "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" ms@0.7.2: version "0.7.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + resolved "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" -ms@0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.3.tgz#708155a5e44e33f5fd0fc53e81d0d40a91be1fff" +ms@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" multiline@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/multiline/-/multiline-1.0.2.tgz#69b1f25ff074d2828904f244ddd06b7d96ef6c93" + resolved "https://registry.npmjs.org/multiline/-/multiline-1.0.2.tgz#69b1f25ff074d2828904f244ddd06b7d96ef6c93" dependencies: strip-indent "^1.0.0" mute-stream@0.0.4: version "0.0.4" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.4.tgz#a9219960a6d5d5d046597aee51252c6655f7177e" + resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.4.tgz#a9219960a6d5d5d046597aee51252c6655f7177e" mute-stream@0.0.5: version "0.0.5" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" + resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" -nan@^2.3.0: - version "2.6.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" +nan@^2.0.5, nan@^2.0.8, nan@^2.2.1, nan@^2.3.0: + version "2.8.0" + resolved "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" natives@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31" + resolved "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31" negotiator@0.6.1: version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +node-abi@^2.1.1: + version "2.1.2" + resolved "https://registry.npmjs.org/node-abi/-/node-abi-2.1.2.tgz#4da6caceb6685fcd31e7dd1994ef6bb7d0a9c0b2" + dependencies: + semver "^5.4.1" node-fetch@^1.0.1, node-fetch@^1.3.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.6.3.tgz#dc234edd6489982d58e8f0db4f695029abcd8c04" + version "1.7.3" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" dependencies: encoding "^0.1.11" is-stream "^1.0.1" node-libs-browser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646" + version "2.1.0" + resolved "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" dependencies: assert "^1.1.1" - browserify-zlib "^0.1.4" + browserify-zlib "^0.2.0" buffer "^4.3.0" console-browserify "^1.1.0" constants-browserify "^1.0.0" crypto-browserify "^3.11.0" domain-browser "^1.1.1" events "^1.0.0" - https-browserify "0.0.1" - os-browserify "^0.2.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" path-browserify "0.0.0" - process "^0.11.0" + process "^0.11.10" punycode "^1.2.4" querystring-es3 "^0.2.0" - readable-stream "^2.0.5" + readable-stream "^2.3.3" stream-browserify "^2.0.1" - stream-http "^2.3.1" - string_decoder "^0.10.25" - timers-browserify "^2.0.2" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" tty-browserify "0.0.0" url "^0.11.0" util "^0.10.3" @@ -3471,61 +4135,67 @@ node-libs-browser@^2.0.0: "node-osx-notifier@>= 0.1.0": version "0.1.0" - resolved "https://registry.yarnpkg.com/node-osx-notifier/-/node-osx-notifier-0.1.0.tgz#fce01fb577a9cf8aa8ba72ec600a47363b0ccdeb" + resolved "https://registry.npmjs.org/node-osx-notifier/-/node-osx-notifier-0.1.0.tgz#fce01fb577a9cf8aa8ba72ec600a47363b0ccdeb" dependencies: express "3.0.x" -node-pre-gyp@^0.6.29: - version "0.6.34" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.34.tgz#94ad1c798a11d7fc67381b50d47f8cc18d9799f7" +node-pre-gyp@^0.6.39: + version "0.6.39" + resolved "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" dependencies: + detect-libc "^1.0.2" + hawk "3.1.3" mkdirp "^0.5.1" nopt "^4.0.1" npmlog "^4.0.2" rc "^1.1.7" - request "^2.81.0" + request "2.81.0" rimraf "^2.6.1" semver "^5.3.0" tar "^2.2.1" tar-pack "^3.4.0" +noop-logger@^0.1.1: + version "0.1.1" + resolved "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" + nopt@3.x, nopt@~3.0.1: version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + resolved "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" dependencies: abbrev "1" nopt@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + resolved "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" dependencies: abbrev "1" osenv "^0.1.4" normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: - version "2.3.8" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb" + version "2.4.0" + resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" dependencies: hosted-git-info "^2.1.4" is-builtin-module "^1.0.0" semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^2.0.1: +normalize-path@^2.0.0, normalize-path@^2.0.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" dependencies: remove-trailing-separator "^1.0.1" npm-path@^1.0.0, npm-path@^1.0.1: version "1.1.0" - resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-1.1.0.tgz#0474ae00419c327d54701b7cf2cd05dc88be1140" + resolved "https://registry.npmjs.org/npm-path/-/npm-path-1.1.0.tgz#0474ae00419c327d54701b7cf2cd05dc88be1140" dependencies: which "^1.2.4" npm-run@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/npm-run/-/npm-run-2.0.0.tgz#28dfc0ad5e2e46fe0848e2bd58ddf002e7b73c15" + resolved "https://registry.npmjs.org/npm-run/-/npm-run-2.0.0.tgz#28dfc0ad5e2e46fe0848e2bd58ddf002e7b73c15" dependencies: minimist "^1.1.1" npm-path "^1.0.1" @@ -3536,78 +4206,82 @@ npm-run@^2.0.0: npm-which@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-2.0.0.tgz#0c46982160b783093661d1d01bd4496d2feabbac" + resolved "https://registry.npmjs.org/npm-which/-/npm-which-2.0.0.tgz#0c46982160b783093661d1d01bd4496d2feabbac" dependencies: commander "^2.2.0" npm-path "^1.0.0" which "^1.0.5" -npmlog@^4.0.2: - version "4.1.0" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.0.tgz#dc59bee85f64f00ed424efb2af0783df25d1c0b5" +npmlog@^4.0.1, npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" dependencies: are-we-there-yet "~1.1.2" console-control-strings "~1.1.0" gauge "~2.7.3" set-blocking "~2.0.0" +null-check@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd" + number-is-nan@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + resolved "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" -oauth-sign@~0.8.1: +oauth-sign@~0.8.1, oauth-sign@~0.8.2: version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" object-assign@4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" object-assign@^2.0.0: version "2.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa" + resolved "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa" object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" object-component@0.0.3: version "0.0.3" - resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" + resolved "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" object.omit@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + resolved "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" dependencies: for-own "^0.1.4" is-extendable "^0.1.1" on-finished@~2.3.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" dependencies: ee-first "1.1.1" -once@1.x, once@^1.3.0, once@^1.3.3: +once@1.x, once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: wrappy "1" onetime@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + resolved "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" optimist@^0.6.1: version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + resolved "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" dependencies: minimist "~0.0.1" wordwrap "~0.0.2" optionator@^0.5.0: version "0.5.0" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.5.0.tgz#b75a8995a2d417df25b6e4e3862f50aa88651368" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.5.0.tgz#b75a8995a2d417df25b6e4e3862f50aa88651368" dependencies: deep-is "~0.1.2" fast-levenshtein "~1.0.0" @@ -3618,7 +4292,7 @@ optionator@^0.5.0: optionator@^0.8.1: version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" dependencies: deep-is "~0.1.3" fast-levenshtein "~2.0.4" @@ -3629,60 +4303,72 @@ optionator@^0.8.1: options@>=0.0.5: version "0.0.6" - resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" + resolved "https://registry.npmjs.org/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" -os-browserify@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" +os-browserify@^0.3.0, os-browserify@~0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" os-browserify@~0.1.1: version "0.1.2" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.1.2.tgz#49ca0293e0b19590a5f5de10c7f265a617d8fe54" + resolved "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz#49ca0293e0b19590a5f5de10c7f265a617d8fe54" -os-homedir@^1.0.0: +os-homedir@^1.0.0, os-homedir@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + resolved "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" os-locale@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + resolved "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" dependencies: lcid "^1.0.0" os-shim@^0.1.2, os-shim@^0.1.3: version "0.1.3" - resolved "https://registry.yarnpkg.com/os-shim/-/os-shim-0.1.3.tgz#6b62c3791cf7909ea35ed46e17658bb417cb3917" + resolved "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz#6b62c3791cf7909ea35ed46e17658bb417cb3917" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + resolved "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" osenv@^0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" + resolved "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.0" outpipe@^1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/outpipe/-/outpipe-1.1.1.tgz#50cf8616365e87e031e29a5ec9339a3da4725fa2" + resolved "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz#50cf8616365e87e031e29a5ec9339a3da4725fa2" dependencies: shell-quote "^1.4.2" +output-file-sync@^1.1.0, output-file-sync@^1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" + dependencies: + graceful-fs "^4.1.4" + mkdirp "^0.5.1" + object-assign "^4.1.0" + pako@~0.2.0: version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + resolved "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + +pako@~1.0.5: + version "1.0.6" + resolved "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" parents@^1.0.0, parents@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/parents/-/parents-1.0.1.tgz#fedd4d2bf193a77745fe71e371d73c3307d9c751" + resolved "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz#fedd4d2bf193a77745fe71e371d73c3307d9c751" dependencies: path-platform "~0.11.15" parse-asn1@^5.0.0: version "5.1.0" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" + resolved "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" dependencies: asn1.js "^4.0.0" browserify-aes "^1.0.0" @@ -3692,7 +4378,7 @@ parse-asn1@^5.0.0: parse-glob@^3.0.4: version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + resolved "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" dependencies: glob-base "^0.3.0" is-dotfile "^1.0.0" @@ -3701,63 +4387,67 @@ parse-glob@^3.0.4: parse-json@^2.2.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" dependencies: error-ex "^1.2.0" parsejson@0.0.3: version "0.0.3" - resolved "https://registry.yarnpkg.com/parsejson/-/parsejson-0.0.3.tgz#ab7e3759f209ece99437973f7d0f1f64ae0e64ab" + resolved "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz#ab7e3759f209ece99437973f7d0f1f64ae0e64ab" dependencies: better-assert "~1.0.0" parseqs@0.0.5: version "0.0.5" - resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" + resolved "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" dependencies: better-assert "~1.0.0" parseuri@0.0.5: version "0.0.5" - resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" + resolved "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" dependencies: better-assert "~1.0.0" -parseurl@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" +parseurl@~1.3.2: + version "1.3.2" + resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" path-browserify@0.0.0, path-browserify@~0.0.0: version "0.0.0" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + resolved "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" path-exists@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" dependencies: pinkie-promise "^2.0.0" -path-is-absolute@^1.0.0: +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" path-is-inside@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + resolved "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" path-platform@~0.11.15: version "0.11.15" - resolved "https://registry.yarnpkg.com/path-platform/-/path-platform-0.11.15.tgz#e864217f74c36850f0852b78dc7bf7d4a5721bf2" + resolved "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz#e864217f74c36850f0852b78dc7bf7d4a5721bf2" path-to-regexp@^1.7.0: version "1.7.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" dependencies: isarray "0.0.1" path-type@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + resolved "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" dependencies: graceful-fs "^4.1.2" pify "^2.0.0" @@ -3765,11 +4455,11 @@ path-type@^1.0.0: pause@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/pause/-/pause-0.0.1.tgz#1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d" + resolved "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz#1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d" pbkdf2@^3.0.0, pbkdf2@^3.0.12, pbkdf2@^3.0.3: - version "3.0.12" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.12.tgz#be36785c5067ea48d806ff923288c5f750b6b8a2" + version "3.0.14" + resolved "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade" dependencies: create-hash "^1.1.2" create-hmac "^1.1.4" @@ -3779,47 +4469,51 @@ pbkdf2@^3.0.0, pbkdf2@^3.0.12, pbkdf2@^3.0.3: pend@~1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + resolved "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" performance-now@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + resolved "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" pff@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/pff/-/pff-1.0.0.tgz#ea5f09ee6571cae292a78fc280905a3865668e78" + resolved "https://registry.npmjs.org/pff/-/pff-1.0.0.tgz#ea5f09ee6571cae292a78fc280905a3865668e78" phantomjs-prebuilt@2.1.*, phantomjs-prebuilt@^2.1.7: - version "2.1.14" - resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.14.tgz#d53d311fcfb7d1d08ddb24014558f1188c516da0" - dependencies: - es6-promise "~4.0.3" - extract-zip "~1.5.0" - fs-extra "~1.0.0" - hasha "~2.2.0" - kew "~0.7.0" - progress "~1.1.8" - request "~2.79.0" - request-progress "~2.0.1" - which "~1.2.10" + version "2.1.16" + resolved "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz#efd212a4a3966d3647684ea8ba788549be2aefef" + dependencies: + es6-promise "^4.0.3" + extract-zip "^1.6.5" + fs-extra "^1.0.0" + hasha "^2.2.0" + kew "^0.7.0" + progress "^1.1.8" + request "^2.81.0" + request-progress "^2.0.1" + which "^1.2.10" pify@^2.0.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" pinkie-promise@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + resolved "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" dependencies: pinkie "^2.0.0" pinkie@^2.0.0: version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + resolved "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" pkg-config@^1.0.1, pkg-config@^1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/pkg-config/-/pkg-config-1.1.1.tgz#557ef22d73da3c8837107766c52eadabde298fe4" + resolved "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz#557ef22d73da3c8837107766c52eadabde298fe4" dependencies: debug-log "^1.0.0" find-root "^1.0.0" @@ -3827,49 +4521,68 @@ pkg-config@^1.0.1, pkg-config@^1.1.0: pkg-dir@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" dependencies: find-up "^1.0.0" pluralize@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + resolved "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + +prebuild-install@^2.0.0: + version "2.3.0" + resolved "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.3.0.tgz#19481247df728b854ab57b187ce234211311b485" + dependencies: + expand-template "^1.0.2" + github-from-package "0.0.0" + minimist "^1.2.0" + mkdirp "^0.5.1" + node-abi "^2.1.1" + noop-logger "^0.1.1" + npmlog "^4.0.1" + os-homedir "^1.0.1" + pump "^1.0.1" + rc "^1.1.6" + simple-get "^1.4.2" + tar-fs "^1.13.0" + tunnel-agent "^0.6.0" + xtend "4.0.1" prelude-ls@~1.1.0, prelude-ls@~1.1.1, prelude-ls@~1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" preserve@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + resolved "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -private@^0.1.6: - version "0.1.7" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" +private@^0.1.6, private@^0.1.7: + version "0.1.8" + resolved "https://registry.npmjs.org/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" process-nextick-args@~1.0.6: version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" -process@^0.11.0, process@~0.11.0: +process@^0.11.10, process@~0.11.0: version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + resolved "https://registry.npmjs.org/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" -progress@^1.1.8, progress@~1.1.8: +progress@^1.1.8: version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + resolved "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" proto-list@~1.2.1: version "1.2.4" - resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + resolved "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" protochain@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/protochain/-/protochain-1.0.5.tgz#991c407e99de264aadf8f81504b5e7faf7bfa260" + resolved "https://registry.npmjs.org/protochain/-/protochain-1.0.5.tgz#991c407e99de264aadf8f81504b5e7faf7bfa260" proxyquireify@3.2.*: version "3.2.1" - resolved "https://registry.yarnpkg.com/proxyquireify/-/proxyquireify-3.2.1.tgz#15bee101360acc91dcd86ee4d9a445f8a971eea0" + resolved "https://registry.npmjs.org/proxyquireify/-/proxyquireify-3.2.1.tgz#15bee101360acc91dcd86ee4d9a445f8a971eea0" dependencies: browser-pack "^6.0.0" detective "~4.1.0" @@ -3882,15 +4595,15 @@ proxyquireify@3.2.*: prr@~0.0.0: version "0.0.0" - resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + resolved "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" pseudomap@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + resolved "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" public-encrypt@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" + resolved "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" dependencies: bn.js "^4.1.0" browserify-rsa "^4.0.0" @@ -3898,76 +4611,113 @@ public-encrypt@^4.0.0: parse-asn1 "^5.0.0" randombytes "^2.0.1" +pump@^1.0.0, pump@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz#3b3ee6512f94f0e575538c17995f9f16990a5d51" + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + punycode@1.3.2: version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + resolved "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" punycode@^1.2.4, punycode@^1.3.2, punycode@^1.4.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + resolved "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +pushdata-bitcoin@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz#15931d3cd967ade52206f523aa7331aef7d43af7" + dependencies: + bitcoin-ops "^1.3.0" q@^1.2.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" + version "1.5.1" + resolved "https://registry.npmjs.org/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" qjobs@^1.1.4: version "1.1.5" - resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.1.5.tgz#659de9f2cf8dcc27a1481276f205377272382e73" + resolved "https://registry.npmjs.org/qjobs/-/qjobs-1.1.5.tgz#659de9f2cf8dcc27a1481276f205377272382e73" qs@0.5.1: version "0.5.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-0.5.1.tgz#9f6bf5d9ac6c76384e95d36d15b48980e5e4add0" + resolved "https://registry.npmjs.org/qs/-/qs-0.5.1.tgz#9f6bf5d9ac6c76384e95d36d15b48980e5e4add0" -qs@6.4.0, qs@~6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" +qs@6.5.1, qs@~6.5.1: + version "6.5.1" + resolved "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" qs@~6.3.0: version "6.3.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" + resolved "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" querystring-es3@^0.2.0, querystring-es3@~0.2.0: version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + resolved "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" querystring@0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + resolved "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + +ramda-lens@^0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/ramda-lens/-/ramda-lens-0.1.2.tgz#e8b340def6e0787b395dde318f3b68ebf28dba9d" + dependencies: + ramda "^0.19.1" + +ramda@^0.19.1: + version "0.19.1" + resolved "https://registry.npmjs.org/ramda/-/ramda-0.19.1.tgz#89c4ad697265ff6b1face9f286439e2520d6679c" ramda@^0.22.1: version "0.22.1" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.22.1.tgz#031da0c3df417c5b33c96234757eb37033f36a0e" + resolved "https://registry.npmjs.org/ramda/-/ramda-0.22.1.tgz#031da0c3df417c5b33c96234757eb37033f36a0e" randomatic@^1.1.3: - version "1.1.6" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" + version "1.1.7" + resolved "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" dependencies: - is-number "^2.0.2" - kind-of "^3.0.2" + is-number "^3.0.0" + kind-of "^4.0.0" -randombytes@^2.0.0, randombytes@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.3.tgz#674c99760901c3c4112771a31e521dc349cc09ec" +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz#dc009a246b8d09a177b4b7a0ae77bc570f4b1b79" + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz#b96b7df587f01dd91726c418f30553b1418e3d62" + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" range-parser@0.0.4: version "0.0.4" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-0.0.4.tgz#c0427ffef51c10acba0782a46c9602e744ff620b" + resolved "https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz#c0427ffef51c10acba0782a46c9602e744ff620b" range-parser@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" -raw-body@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.2.0.tgz#994976cf6a5096a41162840492f0bdc5d6e7fb96" +raw-body@2.3.2: + version "2.3.2" + resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" dependencies: - bytes "2.4.0" - iconv-lite "0.4.15" + bytes "3.0.0" + http-errors "1.6.2" + iconv-lite "0.4.19" unpipe "1.0.0" -rc@^1.1.7: - version "1.2.1" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" +rc@^1.1.6, rc@^1.1.7: + version "1.2.2" + resolved "https://registry.npmjs.org/rc/-/rc-1.2.2.tgz#d8ce9cb57e8d64d9c7badd9876c7c34cbe3c7077" dependencies: deep-extend "~0.4.0" ini "~1.3.0" @@ -3976,40 +4726,40 @@ rc@^1.1.7: read-only-stream@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/read-only-stream/-/read-only-stream-2.0.0.tgz#2724fd6a8113d73764ac288d4386270c1dbf17f0" + resolved "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz#2724fd6a8113d73764ac288d4386270c1dbf17f0" dependencies: readable-stream "^2.0.2" read-pkg-up@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" dependencies: find-up "^1.0.0" read-pkg "^1.0.0" read-pkg@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" dependencies: load-json-file "^1.0.0" normalize-package-data "^2.3.2" path-type "^1.0.0" -readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.6: - version "2.2.9" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.3.3: + version "2.3.3" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: - buffer-shims "~1.0.0" core-util-is "~1.0.0" - inherits "~2.0.1" + inherits "~2.0.3" isarray "~1.0.0" process-nextick-args "~1.0.6" - string_decoder "~1.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" util-deprecate "~1.0.1" readable-stream@~1.0.2: version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" dependencies: core-util-is "~1.0.0" inherits "~2.0.1" @@ -4018,7 +4768,7 @@ readable-stream@~1.0.2: readable-stream@~2.0.0: version "2.0.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" dependencies: core-util-is "~1.0.0" inherits "~2.0.1" @@ -4029,7 +4779,7 @@ readable-stream@~2.0.0: readdirp@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + resolved "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" dependencies: graceful-fs "^4.1.2" minimatch "^3.0.2" @@ -4038,14 +4788,14 @@ readdirp@^2.0.0: readline2@^0.1.1: version "0.1.1" - resolved "https://registry.yarnpkg.com/readline2/-/readline2-0.1.1.tgz#99443ba6e83b830ef3051bfd7dc241a82728d568" + resolved "https://registry.npmjs.org/readline2/-/readline2-0.1.1.tgz#99443ba6e83b830ef3051bfd7dc241a82728d568" dependencies: mute-stream "0.0.4" strip-ansi "^2.0.1" readline2@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" + resolved "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" @@ -4053,41 +4803,44 @@ readline2@^1.0.1: redent@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + resolved "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" dependencies: indent-string "^2.1.0" strip-indent "^1.0.1" regenerate@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" + version "1.3.3" + resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" -regenerator-runtime@^0.10.0: +regenerator-runtime@^0.10.5: version "0.10.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" + +regenerator-runtime@^0.11.0: + version "0.11.0" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" regenerator-runtime@^0.9.5: version "0.9.6" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz#d33eb95d0d2001a4be39659707c51b0cb71ce029" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz#d33eb95d0d2001a4be39659707c51b0cb71ce029" -regenerator-transform@0.9.11: - version "0.9.11" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283" +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" dependencies: babel-runtime "^6.18.0" babel-types "^6.19.0" private "^0.1.6" regex-cache@^0.4.2: - version "0.4.3" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + version "0.4.4" + resolved "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" dependencies: is-equal-shallow "^0.1.3" - is-primitive "^2.0.0" regexpu-core@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" dependencies: regenerate "^1.2.1" regjsgen "^0.2.0" @@ -4095,45 +4848,45 @@ regexpu-core@^2.0.0: regjsgen@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + resolved "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" regjsparser@^0.1.4: version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + resolved "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" dependencies: jsesc "~0.5.0" remove-trailing-separator@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" + version "1.1.0" + resolved "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" repeat-element@^1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + resolved "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" repeat-string@^0.2.2: version "0.2.2" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-0.2.2.tgz#c7a8d3236068362059a7e4651fc6884e8b1fb4ae" + resolved "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz#c7a8d3236068362059a7e4651fc6884e8b1fb4ae" repeat-string@^1.5.0, repeat-string@^1.5.2: version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + resolved "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" repeating@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + resolved "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" dependencies: is-finite "^1.0.0" -request-progress@~2.0.1: +request-progress@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08" + resolved "https://registry.npmjs.org/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08" dependencies: throttleit "^1.0.0" -request@2.79.0, request@~2.79.0: +request@2.79.0: version "2.79.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + resolved "https://registry.npmjs.org/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: aws-sign2 "~0.6.0" aws4 "^1.2.1" @@ -4156,9 +4909,9 @@ request@2.79.0, request@~2.79.0: tunnel-agent "~0.4.1" uuid "^3.0.0" -request@^2.81.0: +request@2.81.0: version "2.81.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + resolved "https://registry.npmjs.org/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" dependencies: aws-sign2 "~0.6.0" aws4 "^1.2.1" @@ -4183,72 +4936,105 @@ request@^2.81.0: tunnel-agent "^0.6.0" uuid "^3.0.0" +request@^2.81.0: + version "2.83.0" + resolved "https://registry.npmjs.org/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.6.0" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.1" + forever-agent "~0.6.1" + form-data "~2.3.1" + har-validator "~5.0.3" + hawk "~6.0.2" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.17" + oauth-sign "~0.8.2" + performance-now "^2.1.0" + qs "~6.5.1" + safe-buffer "^5.1.1" + stringstream "~0.0.5" + tough-cookie "~2.3.3" + tunnel-agent "^0.6.0" + uuid "^3.1.0" + require-deps@~1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/require-deps/-/require-deps-1.0.1.tgz#2415cf49c35bd36a5d3177395108d3f237205263" + resolved "https://registry.npmjs.org/require-deps/-/require-deps-1.0.1.tgz#2415cf49c35bd36a5d3177395108d3f237205263" dependencies: pff "~1.0.0" require-directory@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" require-main-filename@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" require-uncached@^1.0.2: version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + resolved "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" dependencies: caller-path "^0.1.0" resolve-from "^1.0.0" requires-port@1.x.x: version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + resolved "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" resolve-from@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" -resolve@1.1.7, resolve@1.1.x, resolve@^1.1.3, resolve@^1.1.4, resolve@^1.1.5: +resolve@1.1.7, resolve@1.1.x: version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.1.3, resolve@^1.1.4, resolve@^1.1.5: + version "1.5.0" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" + dependencies: + path-parse "^1.0.5" restore-cursor@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" dependencies: exit-hook "^1.0.0" onetime "^1.0.0" right-align@^0.1.1: version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + resolved "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" dependencies: align-text "^0.1.1" rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.0, rimraf@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + version "2.6.2" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: glob "^7.0.5" -ripemd160@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e" - -ripemd160@^2.0.1: +ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" + resolved "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" dependencies: hash-base "^2.0.0" inherits "^2.0.1" +rlp@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/rlp/-/rlp-2.0.0.tgz#9db384ff4b89a8f61563d92395d8625b18f3afb0" + rocambole-indent@^2.0.4: version "2.0.4" - resolved "https://registry.yarnpkg.com/rocambole-indent/-/rocambole-indent-2.0.4.tgz#a18a24977ca0400b861daa4631e861dcb52d085c" + resolved "https://registry.npmjs.org/rocambole-indent/-/rocambole-indent-2.0.4.tgz#a18a24977ca0400b861daa4631e861dcb52d085c" dependencies: debug "^2.1.3" mout "^0.11.0" @@ -4256,7 +5042,7 @@ rocambole-indent@^2.0.4: rocambole-linebreak@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/rocambole-linebreak/-/rocambole-linebreak-1.0.2.tgz#03621515b43b4721c97e5a1c1bca5a0366368f2f" + resolved "https://registry.npmjs.org/rocambole-linebreak/-/rocambole-linebreak-1.0.2.tgz#03621515b43b4721c97e5a1c1bca5a0366368f2f" dependencies: debug "^2.1.3" rocambole-token "^1.2.1" @@ -4264,15 +5050,15 @@ rocambole-linebreak@^1.0.2: rocambole-node@~1.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/rocambole-node/-/rocambole-node-1.0.0.tgz#db5b49de7407b0080dd514872f28e393d0f7ff3f" + resolved "https://registry.npmjs.org/rocambole-node/-/rocambole-node-1.0.0.tgz#db5b49de7407b0080dd514872f28e393d0f7ff3f" rocambole-token@^1.1.2, rocambole-token@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/rocambole-token/-/rocambole-token-1.2.1.tgz#c785df7428dc3cb27ad7897047bd5238cc070d35" + resolved "https://registry.npmjs.org/rocambole-token/-/rocambole-token-1.2.1.tgz#c785df7428dc3cb27ad7897047bd5238cc070d35" rocambole-whitespace@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/rocambole-whitespace/-/rocambole-whitespace-1.0.0.tgz#63330949256b29941f59b190459f999c6b1d3bf9" + resolved "https://registry.npmjs.org/rocambole-whitespace/-/rocambole-whitespace-1.0.0.tgz#63330949256b29941f59b190459f999c6b1d3bf9" dependencies: debug "^2.1.3" repeat-string "^1.5.0" @@ -4280,41 +5066,74 @@ rocambole-whitespace@^1.0.0: "rocambole@>=0.6.0 <2.0", "rocambole@>=0.7 <2.0", rocambole@^0.7.0: version "0.7.0" - resolved "https://registry.yarnpkg.com/rocambole/-/rocambole-0.7.0.tgz#f6c79505517dc42b6fb840842b8b953b0f968585" + resolved "https://registry.npmjs.org/rocambole/-/rocambole-0.7.0.tgz#f6c79505517dc42b6fb840842b8b953b0f968585" dependencies: esprima "^2.1" rocambole@^0.3.6: version "0.3.6" - resolved "https://registry.yarnpkg.com/rocambole/-/rocambole-0.3.6.tgz#4debbf5943144bc7b6006d95be8facc0b74352a7" + resolved "https://registry.npmjs.org/rocambole/-/rocambole-0.3.6.tgz#4debbf5943144bc7b6006d95be8facc0b74352a7" dependencies: esprima "~1.0" run-async@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" + resolved "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" dependencies: once "^1.3.0" run-parallel@^1.1.2: version "1.1.6" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.6.tgz#29003c9a2163e01e2d2dfc90575f2c6c1d61a039" + resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.6.tgz#29003c9a2163e01e2d2dfc90575f2c6c1d61a039" rx-lite@^3.1.2: version "3.1.2" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" + resolved "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" rx@^2.4.3: version "2.5.3" - resolved "https://registry.yarnpkg.com/rx/-/rx-2.5.3.tgz#21adc7d80f02002af50dae97fd9dbf248755f566" + resolved "https://registry.npmjs.org/rx/-/rx-2.5.3.tgz#21adc7d80f02002af50dae97fd9dbf248755f566" -safe-buffer@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +scrypt.js@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/scrypt.js/-/scrypt.js-0.2.0.tgz#af8d1465b71e9990110bedfc593b9479e03a8ada" + dependencies: + scrypt "^6.0.2" + scryptsy "^1.2.1" + +scrypt@^6.0.2: + version "6.0.3" + resolved "https://registry.npmjs.org/scrypt/-/scrypt-6.0.3.tgz#04e014a5682b53fa50c2d5cce167d719c06d870d" + dependencies: + nan "^2.0.8" + +scryptsy@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz#a3225fa4b2524f802700761e2855bdf3b2d92163" + dependencies: + pbkdf2 "^3.0.3" + +secp256k1@^3.0.1: + version "3.3.1" + resolved "https://registry.npmjs.org/secp256k1/-/secp256k1-3.3.1.tgz#d1d325519db714789c11ec0450d4b9a3aa01eb1a" + dependencies: + bindings "^1.2.1" + bip66 "^1.1.3" + bn.js "^4.11.3" + create-hash "^1.1.2" + drbg.js "^1.0.1" + elliptic "^6.2.3" + nan "^2.2.1" + prebuild-install "^2.0.0" + safe-buffer "^5.1.0" semi@^4.0.4: version "4.0.5" - resolved "https://registry.yarnpkg.com/semi/-/semi-4.0.5.tgz#4b995c0c16639238f6ae298c840582a8bf0511ee" + resolved "https://registry.npmjs.org/semi/-/semi-4.0.5.tgz#4b995c0c16639238f6ae298c840582a8bf0511ee" dependencies: eslint "^0.24.1" findit "^2.0.0" @@ -4323,7 +5142,7 @@ semi@^4.0.4: semistandard-format@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/semistandard-format/-/semistandard-format-3.0.0.tgz#785f1500dc8405dd561dd0b8afc1971448f523eb" + resolved "https://registry.npmjs.org/semistandard-format/-/semistandard-format-3.0.0.tgz#785f1500dc8405dd561dd0b8afc1971448f523eb" dependencies: minimist "^1.1.0" semi "^4.0.4" @@ -4332,7 +5151,7 @@ semistandard-format@^3.0.0: semistandard@8.*: version "8.0.0" - resolved "https://registry.yarnpkg.com/semistandard/-/semistandard-8.0.0.tgz#fd869e2e4d7d2ebfc65b046625c189b78b67dd1e" + resolved "https://registry.npmjs.org/semistandard/-/semistandard-8.0.0.tgz#fd869e2e4d7d2ebfc65b046625c189b78b67dd1e" dependencies: eslint "^2.10.1" eslint-config-semistandard "^6.0.2" @@ -4344,17 +5163,17 @@ semistandard@8.*: semistandard-format "^3.0.0" standard-engine "^4.0.0" -"semver@2 || 3 || 4 || 5", semver@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" +"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.4.1: + version "5.4.1" + resolved "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" semver@^4.3.1, semver@~4.3.3: version "4.3.6" - resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + resolved "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" send@0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.1.0.tgz#cfb08ebd3cec9b7fc1a37d9ff9e875a971cf4640" + resolved "https://registry.npmjs.org/send/-/send-0.1.0.tgz#cfb08ebd3cec9b7fc1a37d9ff9e875a971cf4640" dependencies: debug "*" fresh "0.1.0" @@ -4363,42 +5182,49 @@ send@0.1.0: serializerr@^1.0.1: version "1.0.3" - resolved "https://registry.yarnpkg.com/serializerr/-/serializerr-1.0.3.tgz#12d4c5aa1c3ffb8f6d1dc5f395aa9455569c3f91" + resolved "https://registry.npmjs.org/serializerr/-/serializerr-1.0.3.tgz#12d4c5aa1c3ffb8f6d1dc5f395aa9455569c3f91" dependencies: protochain "^1.0.5" set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" set-immediate-shim@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + resolved "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" setimmediate@^1.0.4: version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" setprototypeof@1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" -sha.js@^2.3.6, sha.js@^2.4.8, sha.js@~2.4.4: - version "2.4.8" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.8.tgz#37068c2c476b6baf402d14a49c67f597921f634f" +sha.js@^2.4.0, sha.js@^2.4.8, sha.js@~2.4.4: + version "2.4.9" + resolved "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz#98f64880474b74f4a38b8da9d3c0f2d104633e7d" dependencies: inherits "^2.0.1" + safe-buffer "^5.0.1" + +sha3@^1.1.0: + version "1.2.0" + resolved "https://registry.npmjs.org/sha3/-/sha3-1.2.0.tgz#6989f1b70a498705876a373e2c62ace96aa9399a" + dependencies: + nan "^2.0.5" shasum@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/shasum/-/shasum-1.0.2.tgz#e7012310d8f417f4deb5712150e5678b87ae565f" + resolved "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz#e7012310d8f417f4deb5712150e5678b87ae565f" dependencies: json-stable-stringify "~0.0.0" sha.js "~2.4.4" shell-quote@^1.4.2, shell-quote@^1.6.1: version "1.6.1" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" + resolved "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" dependencies: array-filter "~0.0.0" array-map "~0.0.0" @@ -4407,40 +5233,54 @@ shell-quote@^1.4.2, shell-quote@^1.6.1: shelljs@^0.6.0: version "0.6.1" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.6.1.tgz#ec6211bed1920442088fe0f70b2837232ed2c8a8" + resolved "https://registry.npmjs.org/shelljs/-/shelljs-0.6.1.tgz#ec6211bed1920442088fe0f70b2837232ed2c8a8" sigmund@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + resolved "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" signal-exit@^3.0.0: version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +simple-get@^1.4.2: + version "1.4.3" + resolved "https://registry.npmjs.org/simple-get/-/simple-get-1.4.3.tgz#e9755eda407e96da40c5e5158c9ea37b33becbeb" + dependencies: + once "^1.3.1" + unzip-response "^1.0.0" + xtend "^4.0.0" slash@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + resolved "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" slice-ansi@0.0.4: version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" sntp@1.x.x: version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + resolved "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" dependencies: hoek "2.x.x" +sntp@2.x.x: + version "2.1.0" + resolved "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" + dependencies: + hoek "4.x.x" + socket.io-adapter@0.5.0: version "0.5.0" - resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-0.5.0.tgz#cb6d4bb8bec81e1078b99677f9ced0046066bb8b" + resolved "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.5.0.tgz#cb6d4bb8bec81e1078b99677f9ced0046066bb8b" dependencies: debug "2.3.3" socket.io-parser "2.3.1" socket.io-client@1.7.3: version "1.7.3" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-1.7.3.tgz#b30e86aa10d5ef3546601c09cde4765e381da377" + resolved "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.7.3.tgz#b30e86aa10d5ef3546601c09cde4765e381da377" dependencies: backo2 "1.0.2" component-bind "1.0.0" @@ -4456,7 +5296,7 @@ socket.io-client@1.7.3: socket.io-parser@2.3.1: version "2.3.1" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-2.3.1.tgz#dd532025103ce429697326befd64005fcfe5b4a0" + resolved "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.3.1.tgz#dd532025103ce429697326befd64005fcfe5b4a0" dependencies: component-emitter "1.1.2" debug "2.2.0" @@ -4465,7 +5305,7 @@ socket.io-parser@2.3.1: socket.io@1.7.3: version "1.7.3" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-1.7.3.tgz#b8af9caba00949e568e369f1327ea9be9ea2461b" + resolved "https://registry.npmjs.org/socket.io/-/socket.io-1.7.3.tgz#b8af9caba00949e568e369f1327ea9be9ea2461b" dependencies: debug "2.3.3" engine.io "1.8.3" @@ -4477,64 +5317,64 @@ socket.io@1.7.3: source-list-map@^1.1.1: version "1.1.2" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-1.1.2.tgz#9889019d1024cce55cdc069498337ef6186a11a1" + resolved "https://registry.npmjs.org/source-list-map/-/source-list-map-1.1.2.tgz#9889019d1024cce55cdc069498337ef6186a11a1" -source-map-support@^0.4.2: - version "0.4.15" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" +source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" dependencies: source-map "^0.5.6" source-map@^0.4.4: version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" dependencies: amdefine ">=0.0.4" -source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" +source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3, source-map@~0.5.6: + version "0.5.7" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" source-map@~0.1.38: version "0.1.43" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" dependencies: amdefine ">=0.0.4" source-map@~0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" dependencies: amdefine ">=0.0.4" spawn-sync@^1.0.5: version "1.0.15" - resolved "https://registry.yarnpkg.com/spawn-sync/-/spawn-sync-1.0.15.tgz#b00799557eb7fb0c8376c29d44e8a1ea67e57476" + resolved "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz#b00799557eb7fb0c8376c29d44e8a1ea67e57476" dependencies: concat-stream "^1.4.7" os-shim "^0.1.2" spdx-correct@~1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" dependencies: spdx-license-ids "^1.0.2" spdx-expression-parse@~1.0.0: version "1.0.4" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + resolved "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" spdx-license-ids@^1.0.2: version "1.2.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + resolved "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" sprintf-js@~1.0.2: version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.0.tgz#ff2a3e4fd04497555fed97b39a0fd82fafb3a33c" + version "1.13.1" + resolved "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" @@ -4543,13 +5383,12 @@ sshpk@^1.7.0: optionalDependencies: bcrypt-pbkdf "^1.0.0" ecc-jsbn "~0.1.1" - jodid25519 "^1.0.0" jsbn "~0.1.0" tweetnacl "~0.14.0" standard-engine@^4.0.0: version "4.1.3" - resolved "https://registry.yarnpkg.com/standard-engine/-/standard-engine-4.1.3.tgz#7a31aad54f03d9f39355f43389ce0694f4094155" + resolved "https://registry.npmjs.org/standard-engine/-/standard-engine-4.1.3.tgz#7a31aad54f03d9f39355f43389ce0694f4094155" dependencies: defaults "^1.0.2" deglob "^1.0.0" @@ -4562,7 +5401,7 @@ standard-engine@^4.0.0: standard-format@^2.1.1: version "2.2.4" - resolved "https://registry.yarnpkg.com/standard-format/-/standard-format-2.2.4.tgz#b90fb39a635f749cd4fd117fe4730d31179aaeef" + resolved "https://registry.npmjs.org/standard-format/-/standard-format-2.2.4.tgz#b90fb39a635f749cd4fd117fe4730d31179aaeef" dependencies: deglob "^1.0.0" esformatter "^0.9.0" @@ -4576,31 +5415,35 @@ standard-format@^2.1.1: minimist "^1.1.0" stdin "0.0.1" -"statuses@>= 1.3.1 < 2", statuses@~1.3.1: +"statuses@>= 1.3.1 < 2": + version "1.4.0" + resolved "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + +statuses@~1.3.1: version "1.3.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + resolved "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" stdin@*, stdin@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/stdin/-/stdin-0.0.1.tgz#d3041981aaec3dfdbc77a1b38d6372e38f5fb71e" + resolved "https://registry.npmjs.org/stdin/-/stdin-0.0.1.tgz#d3041981aaec3dfdbc77a1b38d6372e38f5fb71e" stream-browserify@^2.0.0, stream-browserify@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + resolved "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" dependencies: inherits "~2.0.1" readable-stream "^2.0.2" stream-combiner2@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" + resolved "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" dependencies: duplexer2 "~0.1.0" readable-stream "^2.0.2" -stream-http@^2.0.0, stream-http@^2.3.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.1.tgz#546a51741ad5a6b07e9e31b0b10441a917df528a" +stream-http@^2.0.0, stream-http@^2.7.2: + version "2.7.2" + resolved "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz#40a050ec8dc3b53b33d9909415c02c0bf1abfbad" dependencies: builtin-status-codes "^3.0.0" inherits "^2.0.1" @@ -4610,14 +5453,14 @@ stream-http@^2.0.0, stream-http@^2.3.1: stream-splicer@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/stream-splicer/-/stream-splicer-2.0.0.tgz#1b63be438a133e4b671cc1935197600175910d83" + resolved "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz#1b63be438a133e4b671cc1935197600175910d83" dependencies: inherits "^2.0.1" readable-stream "^2.0.2" string-replace-webpack-plugin@0.0.5: version "0.0.5" - resolved "https://registry.yarnpkg.com/string-replace-webpack-plugin/-/string-replace-webpack-plugin-0.0.5.tgz#64fd917b84066e8da9785c4d1729a8839af7aa89" + resolved "https://registry.npmjs.org/string-replace-webpack-plugin/-/string-replace-webpack-plugin-0.0.5.tgz#64fd917b84066e8da9785c4d1729a8839af7aa89" dependencies: async "~0.2.10" loader-utils "~0.2.3" @@ -4628,112 +5471,124 @@ string-replace-webpack-plugin@0.0.5: string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + resolved "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" string-width@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" + version "2.1.1" + resolved "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: is-fullwidth-code-point "^2.0.0" - strip-ansi "^3.0.0" + strip-ansi "^4.0.0" string.prototype.endswith@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/string.prototype.endswith/-/string.prototype.endswith-0.2.0.tgz#a19c20dee51a98777e9a47e10f09be393b9bba75" - -string_decoder@^0.10.25, string_decoder@~0.10.0, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + resolved "https://registry.npmjs.org/string.prototype.endswith/-/string.prototype.endswith-0.2.0.tgz#a19c20dee51a98777e9a47e10f09be393b9bba75" -string_decoder@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.0.tgz#f06f41157b664d86069f84bdbdc9b0d8ab281667" +string_decoder@^1.0.0, string_decoder@~1.0.0, string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" dependencies: - buffer-shims "~1.0.0" + safe-buffer "~5.1.0" + +string_decoder@~0.10.0, string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" -stringstream@~0.0.4: +stringstream@~0.0.4, stringstream@~0.0.5: version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + resolved "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" strip-ansi@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-2.0.1.tgz#df62c1aa94ed2f114e1d0f21fd1d50482b79a60e" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz#df62c1aa94ed2f114e1d0f21fd1d50482b79a60e" dependencies: ansi-regex "^1.0.0" strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" dependencies: ansi-regex "^2.0.0" +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + strip-bom@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" dependencies: is-utf8 "^0.2.0" +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + dependencies: + is-hex-prefixed "1.0.0" + strip-indent@^1.0.0, strip-indent@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + resolved "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" dependencies: get-stdin "^4.0.1" strip-json-comments@~0.1.1: version "0.1.3" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-0.1.3.tgz#164c64e370a8a3cc00c9e01b539e569823f0ee54" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-0.1.3.tgz#164c64e370a8a3cc00c9e01b539e569823f0ee54" strip-json-comments@~1.0.1: version "1.0.4" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" strip-json-comments@~2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" style-loader@^0.8.3: version "0.8.3" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.8.3.tgz#f4f92eb7db63768748f15065cd6700f5a1c85357" + resolved "https://registry.npmjs.org/style-loader/-/style-loader-0.8.3.tgz#f4f92eb7db63768748f15065cd6700f5a1c85357" dependencies: loader-utils "^0.2.5" subarg@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2" + resolved "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2" dependencies: minimist "^1.1.0" supports-color@^1.3.1: version "1.3.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-1.3.1.tgz#15758df09d8ff3b4acc307539fabe27095e1042d" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-1.3.1.tgz#15758df09d8ff3b4acc307539fabe27095e1042d" supports-color@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" supports-color@^3.1.0: version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" dependencies: has-flag "^1.0.0" sync-exec@^0.5.0: version "0.5.0" - resolved "https://registry.yarnpkg.com/sync-exec/-/sync-exec-0.5.0.tgz#3f7258e4a5ba17245381909fa6a6f6cf506e1661" + resolved "https://registry.npmjs.org/sync-exec/-/sync-exec-0.5.0.tgz#3f7258e4a5ba17245381909fa6a6f6cf506e1661" syntax-error@^1.1.1: version "1.3.0" - resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.3.0.tgz#1ed9266c4d40be75dc55bf9bb1cb77062bb96ca1" + resolved "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz#1ed9266c4d40be75dc55bf9bb1cb77062bb96ca1" dependencies: acorn "^4.0.3" table@^3.7.8: version "3.8.3" - resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" + resolved "https://registry.npmjs.org/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" dependencies: ajv "^4.7.0" ajv-keywords "^1.0.0" @@ -4742,13 +5597,22 @@ table@^3.7.8: slice-ansi "0.0.4" string-width "^2.0.0" -tapable@^0.2.5, tapable@~0.2.5: - version "0.2.6" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.6.tgz#206be8e188860b514425375e6f1ae89bfb01fd8d" +tapable@^0.2.7, tapable@~0.2.5: + version "0.2.8" + resolved "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" + +tar-fs@^1.13.0: + version "1.16.0" + resolved "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.0.tgz#e877a25acbcc51d8c790da1c57c9cf439817b896" + dependencies: + chownr "^1.0.1" + mkdirp "^0.5.1" + pump "^1.0.0" + tar-stream "^1.1.2" tar-pack@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" + version "3.4.1" + resolved "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" dependencies: debug "^2.2.0" fstream "^1.0.10" @@ -4759,9 +5623,18 @@ tar-pack@^3.4.0: tar "^2.2.1" uid-number "^0.0.6" +tar-stream@^1.1.2: + version "1.5.5" + resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.5.tgz#5cad84779f45c83b1f2508d96b09d88c7218af55" + dependencies: + bl "^1.0.0" + end-of-stream "^1.0.0" + readable-stream "^2.0.0" + xtend "^4.0.0" + tar@^2.2.1: version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + resolved "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" dependencies: block-stream "*" fstream "^1.0.2" @@ -4769,119 +5642,123 @@ tar@^2.2.1: text-table@~0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" throttleit@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" + resolved "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" through2@^2.0.0: version "2.0.3" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + resolved "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" dependencies: readable-stream "^2.1.5" xtend "~4.0.1" "through@>=2.2.7 <3", through@^2.3.6, through@^2.3.8: version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" through@~2.2.7: version "2.2.7" - resolved "https://registry.yarnpkg.com/through/-/through-2.2.7.tgz#6e8e21200191d4eb6a99f6f010df46aa1c6eb2bd" + resolved "https://registry.npmjs.org/through/-/through-2.2.7.tgz#6e8e21200191d4eb6a99f6f010df46aa1c6eb2bd" timers-browserify@^1.0.1: version "1.4.2" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d" + resolved "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d" dependencies: process "~0.11.0" -timers-browserify@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.2.tgz#ab4883cf597dcd50af211349a00fbca56ac86b86" +timers-browserify@^2.0.4: + version "2.0.4" + resolved "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.4.tgz#96ca53f4b794a5e7c0e1bd7cc88a372298fa01e6" dependencies: setimmediate "^1.0.4" -tmp@0.0.31, tmp@0.0.x: +tmp@0.0.31: version "0.0.31" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" + resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" dependencies: os-tmpdir "~1.0.1" +tmp@0.0.x: + version "0.0.33" + resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + to-array@0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" + resolved "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" to-arraybuffer@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + resolved "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" -to-fast-properties@^1.0.1: +to-fast-properties@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" -tough-cookie@~2.3.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" +tough-cookie@~2.3.0, tough-cookie@~2.3.3: + version "2.3.3" + resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" dependencies: punycode "^1.4.1" trim-newlines@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" trim-right@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + resolved "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" tryit@^1.0.1: version "1.0.3" - resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" + resolved "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" tty-browserify@0.0.0, tty-browserify@~0.0.0: version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + resolved "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" tunnel-agent@^0.6.0: version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" dependencies: safe-buffer "^5.0.1" tunnel-agent@~0.4.1: version "0.4.3" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" type-check@~0.3.1, type-check@~0.3.2: version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" dependencies: prelude-ls "~1.1.2" -type-is@~1.6.14: +type-is@~1.6.15: version "1.6.15" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" + resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" dependencies: media-typer "0.3.0" mime-types "~2.1.15" -typedarray@~0.0.5: +typedarray@^0.0.6, typedarray@~0.0.5: version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typeforce@^1.5.5: - version "1.11.1" - resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.11.1.tgz#ab66f3b094856d00ed0c8913b0742d3dabfafe62" - dependencies: - inherits "^2.0.1" +typeforce@^1.5.5, typeforce@^1.8.7: + version "1.12.0" + resolved "https://registry.npmjs.org/typeforce/-/typeforce-1.12.0.tgz#ca40899919f1466d7819e37be039406beb912a2e" uglify-js@^2.6, uglify-js@^2.8.5: - version "2.8.23" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.23.tgz#8230dd9783371232d62a7821e2cf9a817270a8a0" + version "2.8.29" + resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" dependencies: source-map "~0.5.1" yargs "~3.10.0" @@ -4890,104 +5767,128 @@ uglify-js@^2.6, uglify-js@^2.8.5: uglify-to-browserify@~1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + resolved "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" uid-number@^0.0.6: version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + resolved "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" ultron@1.0.x: version "1.0.2" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" + resolved "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" ultron@~1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.0.tgz#b07a2e6a541a815fc6a34ccd4533baec307ca864" + resolved "https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz#b07a2e6a541a815fc6a34ccd4533baec307ca864" umd@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.1.tgz#8ae556e11011f63c2596708a8837259f01b3d60e" + resolved "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz#8ae556e11011f63c2596708a8837259f01b3d60e" uniq@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + resolved "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" unorm@^1.3.3, unorm@^1.4.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.4.1.tgz#364200d5f13646ca8bcd44490271335614792300" + resolved "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz#364200d5f13646ca8bcd44490271335614792300" unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +unzip-response@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz#b984f0877fc0a89c2c773cc1ef7b5b232b5b06fe" url@^0.11.0, url@~0.11.0: version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + resolved "https://registry.npmjs.org/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" dependencies: punycode "1.3.2" querystring "0.2.0" -user-home@^1.0.0: +user-home@^1.0.0, user-home@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" + resolved "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" user-home@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" + resolved "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" dependencies: os-homedir "^1.0.0" useragent@^2.1.12: - version "2.1.13" - resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.1.13.tgz#bba43e8aa24d5ceb83c2937473e102e21df74c10" + version "2.2.1" + resolved "https://registry.npmjs.org/useragent/-/useragent-2.2.1.tgz#cf593ef4f2d175875e8bb658ea92e18a4fd06d8e" dependencies: lru-cache "2.2.x" tmp "0.0.x" +utf8@^2.1.1: + version "2.1.2" + resolved "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz#1fa0d9270e9be850d9b05027f63519bf46457d96" + util-deprecate@~1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" util@0.10.3, util@^0.10.3, util@~0.10.1: version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + resolved "https://registry.npmjs.org/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" dependencies: inherits "2.0.1" -utils-merge@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" -uuid@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" +uuid@^2.0.1: + version "2.0.3" + resolved "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + +uuid@^3.0.0, uuid@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" + +v8flags@^2.0.10, v8flags@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" + dependencies: + user-home "^1.1.1" validate-npm-package-license@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" dependencies: spdx-correct "~1.0.0" spdx-expression-parse "~1.0.0" -verror@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" +varuint-bitcoin@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.0.4.tgz#d812c5dae16e32f60544b6adee1d4be1307d0283" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" dependencies: - extsprintf "1.0.2" + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" vm-browserify@0.0.4, vm-browserify@~0.0.1: version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + resolved "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" dependencies: indexof "0.0.1" void-elements@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + resolved "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" watchify@~3.9.0: version "3.9.0" - resolved "https://registry.yarnpkg.com/watchify/-/watchify-3.9.0.tgz#f075fd2e8a86acde84cedba6e5c2a0bedd523d9e" + resolved "https://registry.npmjs.org/watchify/-/watchify-3.9.0.tgz#f075fd2e8a86acde84cedba6e5c2a0bedd523d9e" dependencies: anymatch "^1.3.0" browserify "^14.0.0" @@ -4998,23 +5899,23 @@ watchify@~3.9.0: xtend "^4.0.0" watchpack@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.3.1.tgz#7d8693907b28ce6013e7f3610aa2a1acf07dad87" + version "1.4.0" + resolved "https://registry.npmjs.org/watchpack/-/watchpack-1.4.0.tgz#4a1472bcbb952bd0a9bb4036801f954dfb39faac" dependencies: async "^2.1.2" - chokidar "^1.4.3" + chokidar "^1.7.0" graceful-fs "^4.1.2" webpack-sources@^0.2.3: version "0.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.2.3.tgz#17c62bfaf13c707f9d02c479e0dcdde8380697fb" + resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-0.2.3.tgz#17c62bfaf13c707f9d02c479e0dcdde8380697fb" dependencies: source-list-map "^1.1.1" source-map "~0.5.3" webpack@2.5.*: version "2.5.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.5.1.tgz#61742f0cf8af555b87460a9cd8bba2f1e3ee2fce" + resolved "https://registry.npmjs.org/webpack/-/webpack-2.5.1.tgz#61742f0cf8af555b87460a9cd8bba2f1e3ee2fce" dependencies: acorn "^5.0.0" acorn-dynamic-import "^2.0.0" @@ -5040,109 +5941,115 @@ webpack@2.5.*: whatwg-fetch@>=0.10.0: version "2.0.3" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" + resolved "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" which-module@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + resolved "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@^1.0.5, which@^1.1.1, which@^1.2.4, which@~1.2.10: - version "1.2.14" - resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" +which@^1.0.5, which@^1.1.1, which@^1.2.1, which@^1.2.10, which@^1.2.4: + version "1.3.0" + resolved "https://registry.npmjs.org/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" dependencies: isexe "^2.0.0" wide-align@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" + version "1.1.2" + resolved "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" dependencies: - string-width "^1.0.1" + string-width "^1.0.2" wif@^1.1.0: version "1.2.1" - resolved "https://registry.yarnpkg.com/wif/-/wif-1.2.1.tgz#aa81a57dc1fec86b484fbe74f4ab5f65fb51e043" + resolved "https://registry.npmjs.org/wif/-/wif-1.2.1.tgz#aa81a57dc1fec86b484fbe74f4ab5f65fb51e043" dependencies: bs58check "^1.0.6" +wif@^2.0.1: + version "2.0.6" + resolved "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz#08d3f52056c66679299726fade0d432ae74b4704" + dependencies: + bs58check "<3.0.0" + window-size@0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + resolved "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" wordwrap@0.0.2: version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" wordwrap@^1.0.0, wordwrap@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" wordwrap@~0.0.2: version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" wrap-ansi@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" wrappy@1: version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" write@^0.2.1: version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + resolved "https://registry.npmjs.org/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" dependencies: mkdirp "^0.5.1" ws@1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.2.tgz#8a244fa052401e08c9886cf44a85189e1fd4067f" + resolved "https://registry.npmjs.org/ws/-/ws-1.1.2.tgz#8a244fa052401e08c9886cf44a85189e1fd4067f" dependencies: options ">=0.0.5" ultron "1.0.x" ws@2.0.*: version "2.0.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-2.0.3.tgz#532fd499c3f7d7d720e543f1f807106cfc57d9cb" + resolved "https://registry.npmjs.org/ws/-/ws-2.0.3.tgz#532fd499c3f7d7d720e543f1f807106cfc57d9cb" dependencies: ultron "~1.1.0" wtf-8@1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a" + resolved "https://registry.npmjs.org/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a" xml-escape@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/xml-escape/-/xml-escape-1.0.0.tgz#00963d697b2adf0c185c4e04e73174ba9b288eb2" + resolved "https://registry.npmjs.org/xml-escape/-/xml-escape-1.0.0.tgz#00963d697b2adf0c185c4e04e73174ba9b288eb2" xmlhttprequest-ssl@1.5.3: version "1.5.3" - resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz#185a888c04eca46c3e4070d99f7b49de3528992d" + resolved "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz#185a888c04eca46c3e4070d99f7b49de3528992d" + +xtend@4.0.1, xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" xtend@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-3.0.0.tgz#5cce7407baf642cba7becda568111c493f59665a" - -xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + resolved "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz#5cce7407baf642cba7becda568111c493f59665a" y18n@^3.2.1: version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + resolved "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" yargs-parser@^4.2.0: version "4.2.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" dependencies: camelcase "^3.0.0" yargs@^6.0.0: version "6.6.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + resolved "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" dependencies: camelcase "^3.0.0" cliui "^3.2.0" @@ -5160,7 +6067,7 @@ yargs@^6.0.0: yargs@~3.10.0: version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + resolved "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" dependencies: camelcase "^1.0.2" cliui "^2.1.0" @@ -5169,10 +6076,10 @@ yargs@~3.10.0: yauzl@2.4.1: version "2.4.1" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" + resolved "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" dependencies: fd-slicer "~1.0.1" yeast@0.1.2: version "0.1.2" - resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" + resolved "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"