Skip to content

v0.6.1-rc.2

Choose a tag to compare

@coreyphillips coreyphillips released this 06 Jul 14:46
696a5f2

Description

This release adds the ability to calculate transaction fees without broadcasting, allowing users to estimate costs before committing to a transaction.

What's New

  • New calculate_total_fee method on OnchainPayment that simulates creating a transaction and returns the total fee in satoshis
  • calculate_total_fee uses the same validation as send_to_address - checks UTXOs, reserves, and fund availability

Usage

let fee = node.onchain_payment().calculate_total_fee(
    &address,
    amount_sats,
    fee_rate,
    utxos_to_spend
)?;