clementine_core::builder::transaction::challenge

Function create_watchtower_challenge_timeout_txhandler

Source
pub fn create_watchtower_challenge_timeout_txhandler(
    kickoff_txhandler: &TxHandler,
    watchtower_idx: usize,
    paramset: &'static ProtocolParamset,
) -> Result<TxHandler, BridgeError>
Expand description

Creates a TxHandler for the watchtower_challenge_timeout_tx.

This transaction is sent by an operator if a watchtower does not submit a challenge in time, allowing the operator to claim a timeout. This way, operators do not need to reveal their preimage, and do not need to use the watchtowers longest chain proof in their bridge proof.

§Inputs

  1. KickoffTx: WatchtowerChallenge utxo (for the given watchtower)
  2. KickoffTx: WatchtowerChallengeAck utxo (for the given watchtower)

§Outputs

  1. Anchor output for CPFP

§Arguments

  • kickoff_txhandler - The kickoff transaction handler the watchtower challenge timeout belongs to.
  • watchtower_idx - The index of the watchtower in the deposit submitting the challenge.
  • paramset - Protocol parameter set.

§Returns

A TxHandler for the watchtower challenge timeout transaction, or a BridgeError if construction fails.