Utility functions for the Haskoin project