Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function hextoBase58 (hex) {
return addressCodec.encodeNodePublic(toBytes(hex))
}
const normalizePubKey = pubKeyStr => {
if (pubKeyStr.length > 50 && pubKeyStr[0] === 'n') {
return pubKeyStr;
}
return ripple.encodeNodePublic(Buffer.from(pubKeyStr, 'base64'));
}