0

I am currently working on a project that requires multiple users using lightning network to generate and pay invoices through my website but I want to be able to calculate each user's transaction fee when he/she wants to withdraw his/her balance from the platform central lightning balance.

2
  • What have you tried so far and how did the outcome differ from your goal? Are you stuck on calculating the size of the transaction in advance, on getting the feerate that would let the transaction confirmed in a timely fashion, or getting the fee information before building the transaction? Have you considered a flat fee? Have you had a look at other topics, e.g. bitcoin.stackexchange.com/a/110419/5406, bitcoin.stackexchange.com/a/102378/5406
    – Murch
    Nov 6, 2023 at 15:42
  • @Murch So far, I was able to get the estimated fee rate based on the number of blocks however, I need to be able to calculate the size in order to determine the fee. If there's a way I can get the number of inputs utxos for the transaction, I know fully well that the max output I can have is 2 so I can determine the fee to pay before making the transaction.
    – Topman
    Nov 7, 2023 at 16:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.