1

I have made a raw transaction (based on Bitcoin rules) for my own for sending on Bitcoin network. I would like to submit it on the Bitcoin network. How can I do it ? (preferably command line based).

1 Answer 1

2

Using Bitcoin Core (bitcoin-cli), the standard sequence of commands to create and broadcast a transaction would be:

createrawtransaction
signrawtransactionwithkey
sendrawtransaction

You can find information on the commands by executing bitcoin-cli help

You might also want to see this question: https://stackoverflow.com/q/38493893

5
  • Do you know how can I use bitcoin-cli locally and not as a full node? if it is possible.
    – Ruholla Kh
    Commented Jun 23, 2021 at 14:02
  • 2
    bitcoin-cli simply alllows you to interact with a running instance of bitcoind via RPC. if you want to perform tests on a local network you need to use Regtest (add -regtest to both bitcoind and bitcoin-cli)
    – FedFranz
    Commented Jun 23, 2021 at 14:17
  • 1
    If you don’t want to run a node you can use a third party service that will broadcast your transaction for you, for example blockchain.com/btc/pushtx
    – Mike D
    Commented Jun 23, 2021 at 14:45
  • Thanks both. My question actually is can I use bitcoin-cli or bitcoind as a SPV to send transactions on the network or I have to installed whole of around 500 G for running it?
    – Ruholla Kh
    Commented Jun 26, 2021 at 4:36
  • There's no SPV mode in Core, but you can use pruning to limit the amount of memory used to store the blockchain. Note that however you will still need to download each block at first. See this question: bitcoin.stackexchange.com/q/48882/35577
    – FedFranz
    Commented Jul 26, 2021 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.