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?
Stellar Stack Exchange is a question and answer site for developers and users of Stellar and the Stellar Distributed Exchange. It only takes a minute to sign up.
Sign up to join this communityYou can use StrKey.decodeStellarAccountId()
wrapped with a try-catch block. If the expression throws an exception, the account id is invalid.