std::string getAccountSeed(const std::string& secret) { RippleAddress addr; addr.SetString(secret, VER_FAMILY_SEED); uint128 seed = addr.getSeed(); return seed.GetHex(); }
std::string rippleGetAddressFromSecret(const std::string& secretkey) { RippleAddress secret; if (!secret.SetString(secretkey, VER_FAMILY_SEED)) return ""; RippleAddress masterGenerator = createGeneratorPublic(secret); RippleAddress masterAccountPublic; masterAccountPublic.setAccountPublic(masterGenerator.getAccountPublic(), 0); return masterAccountPublic.humanAccountID(); }
bool rippleValidateAddress(const std::string& address) { RippleAddress addr; return addr.SetString(address, VER_ACCOUNT_ID); }