What could this Python Assertion error mean?

0

When I run the code below, sending a BTC transaction to the blockchain (using blockcypher api) I get an Assertion Error. I am not sure what an Assertion error means.

enter image description here

The code: enter image description here

Btw the address had only around 5000 satoshi left.... Link to api documentation

https://www.blockcypher.com/dev/bitcoin/#creating-transactions

Thanks

thomas1988

Posted 2018-08-13T21:49:56.773

Reputation: 1

I'm voting to close this question as off-topic because it is about general programming, not bitcoinRaghav Sood 2018-08-13T21:55:37.543

1This error means the checksum in your private key is incorrect.Pieter Wuille 2018-08-13T22:45:40.970

Answers

1

This comes from the code where the checksum of your private key is validated, and suggests that the key is not valid. However, the private key shown in your code seems to pass validation on bitaddress.org, so the Python library you're using might have a bug.

(By the way, please don't reveal the private keys to real addresses! It looks like all the coins were moved out of that address (1LLZQ...) a couple hours ago, hopefully by you, but any further coins sent to that address are likely to be stolen immediately.)

Nate Eldredge

Posted 2018-08-13T21:49:56.773

Reputation: 21 420