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.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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