You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{// Flag, which indicates that the address is valid“isValid”: boolean}
Python implementation
defisValidAddress(address):
""" Validate Skycoin address. """addressObj=skycoin.cipher__Address()
error=skycoin.SKY_cipher_DecodeBase58Address(
address.encode(), addressObj)
returnerror==0@api.route('/addresses/<string:address>/validity', methods=['GET'])defaddress_valid(address):
""" Check if an address is valid A SKY address uses an alphanumeric base58 encoding, without 0, O, I or l. Important note: the last four bytes are a checksum check. They are the first four bytes of a double SHA-256 digest of the previous 21 bytes Read the first twenty-one bytes, compute the checksum, and check that it corresponds to the last four bytes. """returnjsonify({"isValid": isValidAddress(address)})
The text was updated successfully, but these errors were encountered:
Implement [GET] /api/addresses/{address}/validity
Should check and return address validity.
Should check and return wallet address validity
Response:
Python implementation
The text was updated successfully, but these errors were encountered: