Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function toCashAddress(originalAddress) {
const a = new bsv.Address(originalAddress)
const ac = a.toCashAddress()
return ac.replace("bitcoincash:","")
}
function toOriginalAddress(cashAddress) {
function toOriginalAddress(cashAddress) {
return (new bsv.Address(cashAddress)).toLegacyAddress()
}