clementine_core::builder::transaction

Function create_replacement_deposit_txhandler

Source
pub fn create_replacement_deposit_txhandler(
    old_move_txid: Txid,
    input_outpoint: OutPoint,
    nofn_xonly_pk: XOnlyPublicKey,
    paramset: &'static ProtocolParamset,
    security_council: SecurityCouncil,
) -> Result<TxHandler, BridgeError>
Expand description

Creates a TxHandler for the replacement_deposit_tx.

This transaction replaces a previous deposit with a new deposit. In the its script, it commits the old move_to_vault txid that it replaces.

§Arguments

  • old_move_txid - The txid of the old move_to_vault transaction that is being replaced.
  • input_outpoint - The outpoint of the input to the replacement deposit tx that holds bridge amount.
  • nofn_xonly_pk - The N-of-N XOnlyPublicKey for the deposit.
  • paramset - The protocol paramset.
  • security_council - The security council.

§Returns

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