Skip to content

Instantly share code, notes, and snippets.

@WietseWind
Last active February 2, 2021 01:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WietseWind/9a7c0eacea80567b19af82998ae58006 to your computer and use it in GitHub Desktop.
Save WietseWind/9a7c0eacea80567b19af82998ae58006 to your computer and use it in GitHub Desktop.
Convert address/secret from non XRPL to XRPL (if different alphabet)
const bx = require('base-x')
const cCSC = bx('cpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2brdeCg65jkm8oFqi1tuvAxyz')
const cXRP = bx('rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz')
const csc_decoded = cCSC.decode('sssssssssssssssssssssss')
console.log({csc_decoded})
const xrp_encoded = cXRP.encode(csc_decoded)
console.log({xrp_encoded})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment