parameters: (address)
return_statement: return None
docstring: Returns None if address is invalid. Otherwise returns integer version of address.
docstring_summary: Returns None if address is invalid. Otherwise returns integer version of address.
docstring_tokens: Returns None if address is invalid . Otherwise returns integer version of address .
function: def get_bcaddress_version(address):
    """ Returns None if address is invalid. Otherwise returns integer version of address. """
    addr = b58decode(address,25)
    if addr is None: return None
    version = addr[0]
    checksum = addr[-4:]
    vh160 = addr[:-4] # Version plus hash160 is what is checksummed
    h3=hashlib.sha256(hashlib.sha256(vh160).digest()).digest()
    if h3[0:4] == checksum:
        return ord(version)
    return None
function_tokens: def get_bcaddress_version ( address ) : addr = b58decode ( address , 25 ) if addr is None : return None version = addr [ 0 ] checksum = addr [ - 4 : ] vh160 = addr [ : - 4 ] # Version plus hash160 is what is checksummed h3 = hashlib . sha256 ( hashlib . sha256 ( vh160 ) . digest ( ) ) . digest ( ) if h3 [ 0 : 4 ] == checksum : return ord ( version ) return None