Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

wrong class for private key when signing transaction #1

Closed
christian-trummer opened this issue Sep 10, 2015 · 4 comments
Closed

wrong class for private key when signing transaction #1

christian-trummer opened this issue Sep 10, 2015 · 4 comments
Assignees
Labels

Comments

@christian-trummer
Copy link

i am using blockcypher to sign transactions locally. it works fine and doesnt throw an exception when i use the sample code of CreateAndSignAndSendTransaction.php also the transaction gets send but i do get the following PHP error!

PHP Error: 4096 - Argument 1 passed to BlockCypher\Crypto\PrivateKeyList::addPrivateKey() must be an instance of BitWasp\Bitcoin\Key\PrivateKeyInterface, instance of BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Key\PrivateKey given, called in XXX\vendor\blockcypher\php-client\lib\BlockCypher\Crypto\PrivateKeyList.php on line 42 and defined

i habe passed an hex private key.

@christian-trummer
Copy link
Author

looks like BitWasp has changed something in their interface

@josecelano
Copy link
Contributor

hi @christian-trummer It seems BitWasp/bitocin-php library has been refactored. Our composer.json is configured to upgrade only minor versions (0.0.*) but in this case even new minor versions break the API. I am going to fix the composer to require only 0.0.7 which is the last version which works fine. I wil try to release the new version asap.

@josecelano josecelano added the bug label Sep 14, 2015
@josecelano josecelano self-assigned this Sep 14, 2015
@josecelano
Copy link
Contributor

hi @christian-trummer I have released v1.2.2. You should not get that error with this new version. Is there anything else I can do for you? Please, let me know if I can close the issue.

@christian-trummer
Copy link
Author

thank you. everything is working fine now!

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

No branches or pull requests

2 participants