Bitcoin Raw Transaction Made Easy

Raw Transaction on Bitcoin-core lets you create and broadcast transaction through its Application Programming Interface and Command Line Interface (or on a shell for nix users). In this short post… we will be using few bitcoin-core commands such as, listunpent, createrawtransaction, signrawtransaction andsignrawtransaction. But before we start, make sure your blockchain is fully synced and you have enough bitcoin to play with.

In this example, we will send all spendable amount of bitcoins to wallet address 17P4XJi2wg9sps23Vs4kPLrmwmAsGhgypt with 0.00001 of bitcoin reward to miners for processing our transaction.

Step 1: Pick which set of Bitcoins you want to send. Use listunpsent command to get the transaction ID and vout index number.

Take note of the Transaction ID on RED and Output Index on GREEN. And also the 0.001 Bitcoins

My spendable amount from previous transactions is 0.001 BTC and I’m sending 0.00099 to wallet address “17P4XJi2wg9sps23Vs4kPLrmwmAsGhgypt“. The rest of bitcoins (0.00001) will be the “transaction fee” or the miners reward for processing our transaction.

BUT! WHAT IF your spendable amount is 1 .0 BTC and you’re just sending 0.5 BTC? All remaining 0.5 BTC will be considered as “transaction fee”… so say goodbye 0.5 BTC!!! If you don’t like this to happen…. you have to specify your “change” wallet address.

That’s all it! We sent a bitcoin raw transaction in four easy steps. With this, it gives us a low-level access for creating and broadcasting bitcoin transaction. It allows us pick which bitcoin to spent, create multiple recipient or specify change wallet address, adjust miners fee each transactions and defer or push a transaction to the network.