Open yegor256 opened 5 years ago
I guess I know what's wrong. The tx['script']
is not a text, but a hash. That's why it can't be parsed. How do I convert hash160 script into its text format?
Sorry for necroposting but your prev_out in the tx.input block cannot be the new tx instance: it must be the tx id of the utxo being spent, in hex format.
What is wrong with my code?
I'm getting:
I suspect there is something wrong with the format of the signature key but would be great to get a more meaningful message or at least fail sometime earlier when I'm building the transaction.
Cross-posted to SO: https://stackoverflow.com/questions/55595070/why-i-cant-sign-a-bitcoin-transaction-in-ruby