https://github.com/dcousens/bitcoinjs-lib/commit/3d427e23aaf257151595355a32849a120f5e9b84