Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
displayDNS(argv) {
const address = process.env.ADDRESS,
privKey = bsv.PrivateKey.fromWIF(process.env.PRIVATE),
hostname = argv.hostname,
signature = Message.sign(argv.hostname, privKey);
console.log( '\n' + chalk.gray('Host:\t'), chalk.white(hostname) )
console.log( chalk.gray('Type:\t'), chalk.white('CNAME') )
console.log( chalk.gray('Data:\t'), chalk.white('dns.preserve.bitpaste.app') )
console.log( '\n' + chalk.gray('Host:\t'), chalk.white(`id._bsv.${ hostname }`) )
console.log( chalk.gray('Type:\t'), chalk.white('TXT') )
console.log( chalk.gray('Data:\t'), chalk.white(`a=${ address }; s=${ signature }`) )
console.log('\n 🌐', 'View site at:', chalk.blue.bold('http://'+hostname))
}
}