Bitcoin-related functions I wrote or copied while learning Python