src/util.js
function isValidWIF (key, network) {
	try {
	let dec = wif.decode(key);

	if (network) {
		return dec.version === network.wif
	} else {
		return true
	}
} catch (e) {
	console.error(e);
	return false
}
}
function isValidWIF (key, network) {
	try {
	let dec = wif.decode(key);

	if (network) {
		return dec.version === network.wif
	} else {
		return true
	}
} catch (e) {
	console.error(e);
	return false
}
}
function isValidWIF ( key , network ) { try { let dec = wif . decode ( key ) ; if ( network ) { return dec . version === network . wif } else { return true } } catch ( e ) { console . error ( e ) ; return false } }
Check if a WIF is valid for a specific CoinNetwork
@param  {string} key - Base58 WIF Private Key
@param  {CoinNetwork} network
@return {Boolean}
Check if a WIF is valid for a specific CoinNetwork