I get this error message "1 private keys do not correspond to any input. Please check private keys provided." using blockcypher PHP API

Although I am using the right private key for the right input address.

Here is the input address used on bitcoin testnet:

$input = new \BlockCypher\Api\TXInput();
$input->addAddress("n1pkuGNEfazCQ3wrStEQCgYXT56aWynZTU");

and then after finishing inputs and outputs i create the transaction:

$txSkeleton = $txClient->create($tx);

that works fine, then adding the private key for the input address:

$privateKeys = array("PRIVATE KEY");

Then when I try to sign and send the transaction I get the mentioned error:

$txClient->sign($txSkeleton,  $privateKeys);
$txSkeleton = $txClient->send($txSkeleton);

All the keys are generated using the blockcypher api.

Any Help? Thanks

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.