bit icon indicating copy to clipboard operation
bit copied to clipboard

Pay fee from transaction

Open enty8080 opened this issue 3 years ago • 1 comments

@ofek

Is it possible to pay fee from transaction and not the whole amount of available currency?

For instance, when you send 0.01 BTC you pay a fee from your wallet, but I want to pay fee from this exact amount and the client will receive 0.01 - fee BTC.

How can I do this?

enty8080 avatar Dec 05 '22 19:12 enty8080

Idea: attempt to calculate transaction size, then get a fee estimate (satoshis per byte) using get_fee(fast=True). After that you can use tx size + fee per byte to guesstimate the sum, which you need to add to the total. Of course this spergtech even after 13-14 years has no easy way to calculate transaction size.

kuopassa avatar Mar 28 '23 18:03 kuopassa