bitcoin-lib-php icon indicating copy to clipboard operation
bitcoin-lib-php copied to clipboard

Namespace Issue

Open droplister opened this issue 5 years ago • 3 comments

I get this error when using verifyMessage on 1.1.0. Looks like the namespacing has changed.

Argument 5 passed to BitWasp\BitcoinLib\BitcoinLib::recoverPubKey() must be an instance of Mdanter\Ecc\GeneratorPoint, instance of Mdanter\Ecc\Primitives\GeneratorPoint given, called in /home/forge/bitcorns.com/releases/20181003123600/vendor/bitwasp/bitcoin-lib/src/BitcoinLib.php on line 1005

droplister avatar Oct 03 '18 18:10 droplister

Err, probably a version constraint somewhere didn't follow semver. Try fixing the mdanter/ecc version to something low, 0.2.x or 0.3.x?

If you've only found this library now, you should drop this and use http://github.com/bit-wasp/bitcoin-php

afk11 avatar Oct 04 '18 20:10 afk11

I am using this repo just for verifyMessage, I couldn't find that as a feature of bitcoin-php.

droplister avatar Oct 04 '18 20:10 droplister

It's implemented here: https://github.com/Bit-Wasp/bitcoin-php/blob/master/src/MessageSigner/MessageSigner.php

afk11 avatar Oct 10 '18 20:10 afk11