clementine_core::builder::transaction

Function create_round_nth_txhandler

Source
pub fn create_round_nth_txhandler(
    operator_xonly_pk: XOnlyPublicKey,
    input_outpoint: OutPoint,
    input_amount: Amount,
    index: RoundIndex,
    pubkeys: &KickoffWinternitzKeys,
    paramset: &'static ProtocolParamset,
) -> Result<(TxHandler, TxHandler), BridgeError>
Expand description

Creates the nth (1-indexed) round_txhandler and reimburse_generator_txhandler pair for a specific operator.

§Arguments

  • operator_xonly_pk - The operator’s x-only public key.
  • input_outpoint - The outpoint to use as input for the first round.
  • input_amount - The amount for the input outpoint.
  • index - The index of the round to create.
  • pubkeys - Winternitz keys for all rounds.
  • paramset - Protocol parameter set.

§Returns

A tuple of (TxHandler for the round, TxHandler for ready-to-reimburse), or a BridgeError if construction fails.