from bitcoinrpc import BitcoinRPC from math import sin, pi from time import sleep rpc = BitcoinRPC("user", "pass", "localhost", 8332) # Use 18332 for testnet target_block = 901839 # Adjust for testnet (e.g., current height + 100) utxo_txid = "your_funded_utxo_txid" # 0.0005 BTC (mainnet) or testnet UTXO utxo_vout = 0 tx_count = 10 # 1000 for testnet # Wait for target block while rpc.getblockcount() < target_block: sleep(60) # Tx1: Start wave tx1 = create_transaction( inputs=[{"txid": utxo_txid, "vout": utxo_vout}], outputs=[ {"script": f"OP_1 OP_CHECKSIGVERIFY 1 OP_CHECKSEQUENCEVERIFY OP_RETURN WAVE1_SIN0_BLOCK{target_block}", "value": 0.00000546}, {"address": "your_change_address", "value": 0.0003454} # Adjust for fee ], locktime=target_block ) tx1_id = rpc.sendrawtransaction(tx1) # Tx2–Tx10 (or Tx1000 for testnet) for i in range(2, tx_count + 1): while rpc.getblockcount() < target_block + i - 1: sleep(60) prev_txid = get_last_txid() sine_value = round(sin((i - 1) * pi / 5), 2) # One sine cycle over 10 tx tx = create_transaction( inputs=[{"txid": prev_txid, "vout": 0}], outputs=[{"script": f"OP_1 OP_CHECKSIGVERIFY 1 OP_CHECKSEQUENCEVERIFY OP_RETURN WAVE{i}_SIN{sine_value}_BLOCK{target_block+i-1}", "value": 0.00000546}] ) tx_id = rpc.sendrawtransaction(tx)