from bitcoin import * # Transaction details from_address = "bc1pymwzkgrzd2zp6w027f70qpdld7l9axgp69ycer493qk6u9al04nqenwruu" to_address = "bc1pymwzkgrzd2zp6w027f70qpdld7l9axgp69ycer493qk6u9al04nqenwruu" rune_id = "152873:37" total_supply = 40000 op_return_data = f"[Rune Transfer] Rune ID: {rune_id} | Total Supply: {total_supply} | From: {from_address} | To: {to_address}" # Create a new transaction tx = mktx([], [{'value': 0, 'address': to_address}]) # Add OP_RETURN output op_return_output = serialize_script([OP_RETURN, op_return_data.encode('utf-8')]) tx = mktx(tx, [{'value': 0, 'script': op_return_output}]) # Sign and broadcast the transaction (additional setup required for private keys and broadcasting) # signed_tx = sign(tx, 0, private_key) # broadcast_tx(signed_tx) print(f"Created transaction: {tx}")