Bitcoin-related functions implemented in pure JavaScript