Expand description
Transaction utilities
Constants§
- MAX_
VALUE_ MSAT - The maximum value of an input or output in milli satoshi
- MIN_
CHAN_ DUST_ LIMIT_ SATOSHIS - The minimum value of the dust limit in satoshis - for segwit in general This is also the minimum negotiated dust limit
- MIN_
DUST_ LIMIT_ SATOSHIS - The minimum value of the dust limit in satoshis - for p2wsh outputs (such as anchors)
Functions§
- create_
spending_ transaction - Create a spending transaction, helper function used in [
KeysManagerClient::spend_spendable_outputs
]. - decode_
commitment_ number - Decode a commitment transaction and return the commitment number if it is a commitment tx
- decode_
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.
- maybe_
add_ change_ output - 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.