1

I have a segwit address (starts with bc...) and its private key, that holds some BTC value. Using node.js I would like to transfer all my funds to another address. This should be pretty straight forward - create a transaction and broadcast to the network. I've found a few libraries that does it but for some reason was not able to successfully execute.

2 questions:

  1. Must I have a running Bitcoin node for that or is there some "public" node which I can work with?
  2. Is there a working code reference for this simple transaction? Suppose that my wallet has 0.001 (unspent) BTC, how do I transfer this amount to another address? How does the fee calculation come to place?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.