How can I get transaction size before sending BTC to an external address?
I am using Bitcoin core to make the transactions, and I was trying to calculate transaction size. So that I can use it to estimate transaction fee. But couldn't find a way
Could you tell me its logic and method to do it?
You can sign the transaction locally in your code, instead of using
bitcoind
. Then you simply measure the size of the transaction serialised as a byte stream.