clementine_core::builder::transaction::operator_reimburse

Function create_reimburse_txhandler

Source
pub fn create_reimburse_txhandler(
    move_txhandler: &TxHandler,
    round_txhandler: &TxHandler,
    kickoff_txhandler: &TxHandler,
    kickoff_idx: usize,
    paramset: &'static ProtocolParamset,
    operator_reimbursement_address: &Address,
) -> Result<TxHandler, BridgeError>
Expand description

Creates a TxHandler for the reimburse_tx.

This transaction is sent by the operator if no challenge was sent, or a challenge was sent but no disprove was sent, to reimburse the operator for their payout.

§Inputs

  1. MoveToVaultTx: Utxo containing the deposit
  2. KickoffTx: Reimburse connector utxo in the kickoff
  3. RoundTx: Reimburse connector utxo in the round (for the given kickoff index)

§Outputs

  1. Reimbursement output to the operator
  2. Anchor output for CPFP

§Arguments

  • move_txhandler - The move-to-vault transaction handler for the deposit.
  • round_txhandler - The round transaction handler for the round.
  • kickoff_txhandler - The kickoff transaction handler for the kickoff.
  • kickoff_idx - The kickoff index of the operator’s kickoff.
  • paramset - Protocol parameter set.
  • operator_reimbursement_address - The address to reimburse the operator.

§Returns

A TxHandler for the reimburse transaction, or a BridgeError if construction fails.