code: def decode(s, checksum=True):
      
      v, prefix = to_long(
          BASE58_BASE, lambda c: BASE58_LOOKUP[c], s.encode("utf8"))
  
      data = from_long(v, prefix, 256, lambda x: x)
  
      if checksum:
          data, the_hash = data[:-4], data[-4:]
          if utils.hash256(data)[:4] == the_hash:
              return data
          raise ValueError("hashed base58 has bad checksum %s" % s)
  
      return data
docs: Convert base58 to binary using BASE58_ALPHABET.