Fee script calculator #8978

issue diadal opened this issue on October 20, 2016
  1. diadal commented at 8:48 AM on October 20, 2016: none

    am working on bitcoin project am stock at fee i want user to know and see their fee before sending bitcoin i will be glad if anyone can help me with the script to use or follow am using bitcoin core 13 for the project thanks

  2. jonasschnelli commented at 8:51 AM on October 20, 2016: contributor

    createrawtransaction -> fundrawtransaction -> check fee, show it to user -> signrawtransaction-> sendrawtransaction

    Maybe consider a max-delay time for "check fee, show it to user".

  3. jonasschnelli added the label Wallet on Oct 20, 2016
  4. jonasschnelli commented at 8:52 AM on October 20, 2016: contributor

    Also, this question is more about using bitcoin-core, try IRC #bitcoin or bitcoin.stackexchange.com, etc.

  5. jonasschnelli closed this on Oct 20, 2016

  6. diadal commented at 4:41 PM on October 20, 2016: none

    have done a lot of research most say is bad idea to create createrawtransaction -> fundrawtransaction -> check fee, show it to user -> signrawtransaction-> sendrawtransaction is there any other way to do this or script that can help

  7. jonasschnelli commented at 4:46 PM on October 20, 2016: contributor

    @diadal: Can you elaborate why it would be a bad idea?

  8. diadal commented at 8:31 PM on October 20, 2016: none

    @jonasschnelli am not saying is bad i said most people said is bad idea i chat @ IRC #bitcoin like you advice i reply need help me this if i can get script that explain more about this

  9. jonasschnelli commented at 7:05 AM on October 21, 2016: contributor

    It probably depends on your use-case. But in general I think it's a good idea to...

    1. Set outputs with createrawtransaction
    2. Run coin selection and add inputs with fundrawtransaction
    3. Maybe use decoderawtransaction to get json compatible output
    4. Check transaction size, check fees
    5. Maybe adjust the feerate (fundrawtransaction has a feerate option in master)
    6. If you accept the transaction, use signrawtransaction.
    7. Eventually use sendrawtransaction

    This would also allow to decouple the signing/privatkey from your node. fundrawtransaction can work with watch-only-addresses and supports a custom change address (in master), signrawtransaction could be done on an offline-machine.

  10. diadal commented at 10:07 AM on October 21, 2016: none

    thanks so much for your brake down i will work with this and get back to you

  11. diadal commented at 11:12 AM on October 26, 2016: none

    how to create

    createrawtransaction

    if want to send like 1 btc and can only get the total in listunspent like 3 or more how do i createrawtransaction as 1 thanks

  12. jnewbery commented at 2:19 PM on October 26, 2016: member

    @diadal - I recommend you move this discussion to bitcoin.stackexchange.com, where there are plenty of people who are happy to help answer technical questions. You can also message me directly with the link to your question on stackexchange and I'll be happy to answer there (I've done some work on getrawtransaction and bitcoin-tx recently so I'm quite familiar with the code).

    how do i know the txid

    The first argument for getrawtransaction is list of objects representing the inputs. txid here is the transaction id of the transaction containing the input that your new transaction is spending.

  13. diadal commented at 2:36 PM on October 26, 2016: none

    @ jnewbery what is your username @ bitcoin.stackexchange.com

  14. jnewbery commented at 2:49 PM on October 26, 2016: member

    http://bitcoin.stackexchange.com/users/26940/jonnynewbs . Put a link to your question in this issue and I'll be happy to help you.

  15. diadal commented at 2:55 PM on October 26, 2016: none

    ok thanks but don't know what send you msg my id on there is bitotm

  16. sipa commented at 3:40 PM on October 26, 2016: member

    Just ask your question on SE, no need to specifically ask for one person to answer.

  17. jnewbery commented at 3:59 PM on October 26, 2016: member

    Sorry - I caused confusion by suggesting you message me. Just ask the question on SE (and optionally put a link to it here).

  18. diadal commented at 4:19 PM on October 26, 2016: none

    if you can fixed this if you are on Skype i don't mind paying for your service

  19. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me