Module lightning_signer::util::transaction_utils

source ·
Expand description

Transaction utilities

Constants§

Functions§

  • Decode a commitment transaction and return the commitment number if it is a commitment tx
  • Decode a commitment transaction and return the outputs that we need to watch. Our main output index and any HTLC output indexes are returned.
  • Possibly adds a change output to the given transaction, always doing so if there are excess funds available beyond the requested feerate. Assumes at least one input will have a witness (ie spends a segwit output). Returns an Err(()) if the requested feerate cannot be met.