bitcoin

Bitcoin address validator by Gavin Andresen. https://bitcointalk.org/index.php?topic=1026.0;all

Gratipay changes:

  • Removed Django field
  • Replaced pycrypto with hashlib
  • Added self-test with remote Bitcoin dataset
  • Added cmdline interface for checking address: utils.bitcoin.py -i [hash]

https://github.com/gratipay/gratipay.com/pull/2886

gratipay.utils.bitcoin.b58encode(v)[source]

encode v, which is a string of bytes, to base58.

gratipay.utils.bitcoin.b58decode(v, length)[source]

decode v into a string of len bytes

gratipay.utils.bitcoin.get_bcaddress_version(strAddress)[source]

Returns None if strAddress is invalid. Otherwise returns integer version of address.