Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
nomachine
on 01/08/2024, 10:46:05 UTC
Thoughts, comments, questions?

Could it be done this way?

Code:
from bitcoin import *

# Example inputs
txid = 'your_input_txid'  # Replace with your input transaction ID
vout = 0  # Replace with the correct output index
scriptPubKey = 'your_scriptPubKey'  # Replace with your scriptPubKey
amount = 0.01  # Replace with the amount in BTC from your input transaction
destination_address = 'your_destination_address'  # Replace with the recipient's Bitcoin address
privkey = 'your_private_key'  # Replace with your private key

# Fee calculation
fee_rate = 8  # sats/vByte
tx_size = 200  # estimated size in bytes
fee = (fee_rate * tx_size) / 1e8  # Convert fee from sats to BTC

# Create transaction inputs and outputs
inputs = [{'txid': txid, 'vout': vout, 'scriptPubKey': scriptPubKey, 'amount': amount}]
outputs = {destination_address: amount - fee}

# Create and sign the raw transaction
raw_tx = mktx(inputs, outputs)
signed_tx = sign(raw_tx, 0, privkey)

# Output the signed transaction hex
print(signed_tx)


If you don't send them an email, how long would it take?