Bitcoin Forum
May 27, 2024, 07:44:10 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why bitcoin send operation is throwing error ?  (Read 1343 times)
retweeting (OP)
Jr. Member
*
Offline Offline

Activity: 58
Merit: 2


View Profile
January 08, 2016, 10:47:20 PM
 #1

I am trying to send bitcoin implementing blockcypher API having difficulty in using the following code snippet...

i. http://blockcypher.github.io/php-client/sample/doc/transaction-api/CreateTransaction.html
ii. http://blockcypher.github.io/php-client/sample/doc/transaction-api/CreateAndSignAndSendTransaction.html

The transaction is being perfectly created, but following error is being thrown while trying to send it...

Catchable fatal error: 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 /www/myserver.com/blockcypher/lib/BlockCypher/Crypto/PrivateKeyList.php on line 42 and defined in /www/myserver.com/blockcypher/lib/BlockCypher/Crypto/PrivateKeyList.php on line 53

How do I solve this ?
siameze
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000



View Profile
January 08, 2016, 11:47:30 PM
 #2

What version of php are you using? This was mentioned a few months back on github: https://github.com/blockcypher/php-client/issues/1

I did some work for someone with an Arch linux server, was forced to downgrade php version to get it to work, it seems their API breaks against some upgrades. Undecided


                     ▀▀█████████▀████████████████▄
                        ████▄      ▄████████████████
                     ▄██████▀  ▄  ███████████████████
                  ▄█████████▄████▄███████████████████
                ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀████████
                                               ▀▀███▀
    ▄█▀█       ▄▀  ▄▀▀█  ▄▀   █████████████████▄ ██▀         ▄▀█
   ▄█ ▄▀      ▀█▀ █▀ █▀ ▀█▀  ███████████████████ █▀ ▀▀      ▄▀▄▀
  ▄█    ▄███  █     █   █   ████████████████████  ▄█     ▄▀▀██▀ ▄███
███▄▄▄  █▄▄▄ █▄▄ ▄▄▀   █▄▄ ██████████████████▀▀   █▄▄ ▄▄ █▄▄█▄▄▄█▄▄▄
                           ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                            ▀▀█████████████▄
                                █████████████▄
                                  █████████████▄
                                    ▀███████▀▀▀▀▀
                                      ▀████▀
                                        ▀█▀
LetItRideINNOVATIVE ▬▬▬
DICE GAME
                        ▄███████████▄
                       ██  ██████████▄
                     ▄█████████████  ██▄
            ▄▄▀█▄▄▄▄▄████████████████████▄
        ▄▄█▀   ███████████  █████  ████  █
    ▄██████ ▄▄███████████████████████████▀
 ▄▀▀ ██████████████████████████  ████  █
█  ▄███████████▀▀▀█████████████████████
██████████████    ████████▀▀██████  █▀
██████████████▄▄▄██████████   ▀▀▀▀▀▀▀
███▀ ▀██████████████████████
██    ███████████████████████
██▄▄██████████████████████████
██████████████▀   ██████████
  █████████████   ▄██████▀▀
     ▀▀██████████████▀▀
         ▀▀██████▀▀
PROVABLY
F A I R
▄█████████████▀ ▄█
██            ▄█▀
██          ▄██ ▄█
██ ▄█▄    ▄███  ██
██ ▀███▄ ▄███   ██
██  ▀███████    ██
██    █████     ██
██     ███      ██
██      ▀       ██
██              ██
▀████████████████▀
BUY  BACK
PLANS
[BTC]
retweeting (OP)
Jr. Member
*
Offline Offline

Activity: 58
Merit: 2


View Profile
January 10, 2016, 01:28:53 AM
 #3

What version of php are you using? This was mentioned a few months back on github: https://github.com/blockcypher/php-client/issues/1

I did some work for someone with an Arch linux server, was forced to downgrade php version to get it to work, it seems their API breaks against some upgrades. Undecided
Thanks for the pointer. That issue resolved after upgrading the version, but a new one has popped up. Now it is throwing...

Fatal error: Uncaught exception 'BlockCypher\Exception\BlockCypherSignatureException' with message '1 private keys do not correspond to any input. Please check private keys provided.' in /www/myserver.com/blockcypher1/php-client/blockcypher/php-client/lib/BlockCypher/Api/TXSkeleton.php:148 Stack trace: #0 /www/myserver.com/blockcypher1/php-client/blockcypher/php-client/lib/BlockCypher/Api/TXSkeleton.php(96): BlockCypher\Api\TXSkeleton->generateSignatures(Object(BlockCypher\Crypto\PrivateKeyList), 'btc') #1 /www/myserver.com/blockcypher1/php-client/blockcypher/php-client/lib/BlockCypher/Client/TXClient.php(35): BlockCypher\Api\TXSkeleton->sign(Array, 'btc') #2 /www/myserver.com/blockcypher1/send.php(19): BlockCypher\Client\TXClient->sign(Object(BlockCypher\Api\TXSkeleton), Array) #3 {main} thrown in /www/myserver.com/blockcypher1/php-client/blockcypher/php-client/lib/BlockCypher/Api/TXSkeleton.php on line 148

But, I have provided unencrypted Hex private key of my address. Also tried with WIF. None is working!
retweeting (OP)
Jr. Member
*
Offline Offline

Activity: 58
Merit: 2


View Profile
January 13, 2016, 05:22:36 PM
 #4

What version of php are you using? This was mentioned a few months back on github: https://github.com/blockcypher/php-client/issues/1

I did some work for someone with an Arch linux server, was forced to downgrade php version to get it to work, it seems their API breaks against some upgrades. Undecided
Thanks for the pointer. That issue resolved after upgrading the version, but a new one has popped up. Now it is throwing...

Fatal error: Uncaught exception 'BlockCypher\Exception\BlockCypherSignatureException' with message '1 private keys do not correspond to any input. Please check private keys provided.' in /www/myserver.com/blockcypher1/php-client/blockcypher/php-client/lib/BlockCypher/Api/TXSkeleton.php:148 Stack trace: #0 /www/myserver.com/blockcypher1/php-client/blockcypher/php-client/lib/BlockCypher/Api/TXSkeleton.php(96): BlockCypher\Api\TXSkeleton->generateSignatures(Object(BlockCypher\Crypto\PrivateKeyList), 'btc') #1 /www/myserver.com/blockcypher1/php-client/blockcypher/php-client/lib/BlockCypher/Client/TXClient.php(35): BlockCypher\Api\TXSkeleton->sign(Array, 'btc') #2 /www/myserver.com/blockcypher1/send.php(19): BlockCypher\Client\TXClient->sign(Object(BlockCypher\Api\TXSkeleton), Array) #3 {main} thrown in /www/myserver.com/blockcypher1/php-client/blockcypher/php-client/lib/BlockCypher/Api/TXSkeleton.php on line 148

But, I have provided unencrypted Hex private key of my address. Also tried with WIF. None is working!
This issue is still unresolved. Undecided
retweeting (OP)
Jr. Member
*
Offline Offline

Activity: 58
Merit: 2


View Profile
January 25, 2016, 06:10:27 PM
 #5

Solved Smiley
cr1776
Legendary
*
Offline Offline

Activity: 4046
Merit: 1303


View Profile
January 25, 2016, 06:25:37 PM
 #6

Solved Smiley

You should probably post how it was solved so that if someone finds this discussion with the same problem it will be helpful.  ;-)
HarHarHar9965
Hero Member
*****
Offline Offline

Activity: 994
Merit: 1000


View Profile
January 27, 2016, 04:33:05 AM
 #7

Solved Smiley

Bro could I know how its got solve, because when fatal error occurs When updating any softwares. that we can't easily resolve it.
Some bypass issue will araise in that. Please let me know for understanding on that.
avw1982
Hero Member
*****
Offline Offline

Activity: 644
Merit: 500



View Profile
January 27, 2016, 08:30:17 AM
 #8

Solved Smiley

Hey dude please let me about it. I am using multibit for long time. I have 32 addresses in that.  Whenever I am btc to anyone. That time I am getting error dude. Please let me how you solved.  It would helpful to me.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!