Two days ago I've found a few articles, about using raw bitcoin protocol, and now I'm still trying to send a transaction.
My code is based on this class, and
if I understand all of this bitcoin magic right, I need to sign my raw input transaction with the private key for address 1LwPhYQi4BRBuuyWSGVeb6kPrTqpSVmoYz
and add my public key right after it - and it will be a valid unlocking script?
Here's a part of my code, which I have completely copied from the previous link:
tx_in_count = struct.pack("<B", 1)
tx_in = {} tx_in["outpoint_hash"] = flip_byte_order(previous_output_hash).decode("hex")
tx_in["outpoint_index"] = struct.pack("<L", 1)
tx_in["script"] = ("76a914%s88ac" % private_key).decode("hex")
tx_in["script_bytes"] = struct.pack("<B", (len(tx_in["script"])))
tx_in["sequence"] = "ffffffff".decode("hex")
I'm not sure about tx_in["script"]
line, because there is nothing about signing transaction or public keys, so probably it's the reason for my failures.
Thanks for any answers :)