I am using python-sdk to perform stellar operations. Now I need to validate a stellar address. I know that the JS sdk has got a function StrKey.isValidEd25519PublicKey(address); however I cannot find the same in Python SDK.

Any idea, how I can do this?


check this out: https://github.com/StellarCN/py-stellar-base/blob/6329db3658c9b646a69c567019d95b41b7363eee/stellar_base/utils.py#L251

def is_valid_address(address):
    return decode_check('account', address)
except (DecodeError, TypeError):
    raise StellarAddressInvalidError('Invalid Stellar Address: {}'.format(address))
| improve this answer | |

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.