Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pay fee from transaction #174

Open
enty8080 opened this issue Dec 5, 2022 · 1 comment
Open

Pay fee from transaction #174

enty8080 opened this issue Dec 5, 2022 · 1 comment

Comments

@enty8080
Copy link

enty8080 commented Dec 5, 2022

@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?

@kuopassa
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants