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
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
-
Do you know how can I use bitcoin-cli locally and not as a full node? if it is possible. Commented Jun 23, 2021 at 14:02
-
2bitcoin-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)– FedFranzCommented Jun 23, 2021 at 14:17
-
1If 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 DCommented 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? 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– FedFranzCommented Jul 26, 2021 at 11:21