4

In JavaScript SDK we have method isValidEd25519PublicKey for Stellar address validation. But in Java SDK there is no such method.

How can I validate Stellar address with Java SDK?

3

You can use StrKey.decodeStellarAccountId() wrapped with a try-catch block. If the expression throws an exception, the account id is invalid.

  • yeah, thanks you so much. – Thái Ngô Jan 10 at 14:08

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.