pub fn create_kickoff_txhandler(
kickoff_data: KickoffData,
round_txhandler: &TxHandler,
move_txhandler: &TxHandler,
deposit_data: &mut DepositData,
operator_xonly_pk: XOnlyPublicKey,
assert_scripts: AssertScripts<'_>,
disprove_path: DisprovePath<'_>,
additional_disprove_script: Vec<u8>,
latest_blockhash_script: AssertScripts<'_>,
operator_unlock_hashes: &[[u8; 20]],
paramset: &'static ProtocolParamset,
) -> Result<TxHandler, BridgeError>
Expand description
Creates a TxHandler
for the kickoff_tx
.
This transaction is sent by the operator to initialize protocol state for a round, when operator fronted a peg-out and wants reimbursement. It sets up all outputs needed for subsequent protocol steps (challenge, reimbursement, asserts, etc.).
§Inputs
- RoundTx: Kickoff utxo (for the given kickoff index)
§Outputs
- Operator challenge output (for challenge or no-challenge path)
- Kickoff finalizer connector
- Reimburse connector (to be used in reimburse transaction)
- Disprove output (Taproot, for BitVM disprove path)
- Latest blockhash output (for latest blockhash assertion using winternitz signatures)
- Multiple assert outputs (for BitVM assertions, currently 33)
- For each watchtower 2 outputs:
- Watchtower challenge output
- Operator challenge ack/nack output
- OP_RETURN output (with move-to-vault txid and operator xonly pubkey)
- Anchor output for CPFP
§Arguments
kickoff_data
- Data to identify the kickoff.round_txhandler
- The round transaction handler providing the input.move_txhandler
- The move-to-vault transaction handler.deposit_data
- Mutable reference to deposit data.operator_xonly_pk
- The operator’s x-only public key.assert_scripts
- Actual assertion scripts or tapnode hashes (for faster creation of assert utxos) for BitVM assertion.disprove_root_hash
- Root hash for BitVM disprove scripts.additional_disprove_script
- Additional disprove script bytes (for additional disprove script specific to Clementine).latest_blockhash_script
- Actual script or tapnode hash for latest blockhash assertion.operator_unlock_hashes
- Unlock hashes for operator preimage reveals for OperatorChallengeAck transactions.paramset
- Protocol parameter set.
§Returns
A TxHandler
for the kickoff transaction, or a BridgeError
if construction fails.