Closed gitzhou closed 5 years ago
Unless I'm missing something, we already have this.
https://ofek.github.io/bit/guide/transactions.html#transfer-funds
I hope that's a little bit easier ;).
Unless I'm missing something, we already have this.
https://ofek.github.io/bit/guide/transactions.html#transfer-funds
I hope that's a little bit easier ;).
WOW! Seems this is what I need. I will try this. Thanks for teaching đ
No problem! :)
Sorry I've been busy. If this suits your needs can just add a simple send_all() function anyway because it'll be more intuitive to find etc (as we have demonstrated here!).
Hi @teran-mckinney and @AustEcon, I've tried and everything's fine. This is exactly what I need. Thank you very much Close this issue.
Hi @AustEcon, per our discussion in Slack, raising this issue.
Currently, it's not easy to send all the amount of several unspents since the fee is calculated inside the functions. Below code is my way, not clean and elegant, but works...
Already read the code of
estimate_tx_fee
andsanitize_tx_data
It seems that I need to recalculate the total OP_RETURN size again by myself at least, also need many related parameters, which means repeated code(not sure).
So I'm wondering whether bitsv could expose some functions that calculate the fee ahead of time or just give out a function like
create_transaction
andsend
, which will send all the amount of inputs.Thanks đ