Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Warning] gmp_add(): Unable to convert variable to GMP #37

Open
elliot-sawyer opened this issue Jan 22, 2019 · 1 comment
Open

[Warning] gmp_add(): Unable to convert variable to GMP #37

elliot-sawyer opened this issue Jan 22, 2019 · 1 comment

Comments

@elliot-sawyer
Copy link

Thanks for this module, you've done amazing work with it!

We're receiving the above warning when a user attempts to validate a CashAddr formatted address with this module, I'd guess due to the presence of non-base58 characters. Could the module detect this and throw a catchable Exception before gmp throws a warning? Happy to raise a pull request if you're happy with that!

@Beakerboy
Copy link

Beakerboy commented Jul 1, 2019

The library does not support cashaddr formatted addresses. I've used submtd/cashaddr-converter together with bitcoin-php/bitcoin-ecdsa like this:

use BitcoinPHP\BitcoinECDSA\BitcoinECDSA;
use Submtd\CashaddrConverter\CashaddrConverter;
$converter = new CashaddrConverter();
$legacy_address = $converter->convertFromCashaddr($address);
$bitcoinECDSA = new BitcoinECDSA();
return $bitcoinECDSA->checkSignatureForMessage($legacy_address, $signature, $message);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants