Refactoring into Haskoin.Crypto module