Closed AdvancedStyle closed 6 years ago
Check out ripple-address-codec module. It has is*Valid methods
Thanks, here's my final script if anyone else needs it:
const api = require('ripple-address-codec');
const args = process.argv.slice(2);
try {
const result = api.isValidAccountID(args[0]);
console.log(JSON.stringify({"success":result}));
}catch(error){
console.log(JSON.stringify({"success":false, "error":error}));
}
I'm looking for a simple way to validate an account format (without having to connect to a server).
For example something like this (not correct attempt just an example of what I'm trying to do):