That wraps it up for the steps to create a Raw Transaction by leveraging commands from the Bitcoin Protocol.
We used UTXO from an existing transaction as the inputs, signed our transaction, and viewed it to make it it went through correctly.
Now that you have hands-on experience making a transaction, In the remainder of the course, we will understand the idea of embedding data into a transaction beyond transactional data and whether or not this is an ethical practice.
Steps and Commands Used In This Exercise
- Step 1 - View all unspent confirmed UTXO in the wallet
- listunspent
- Show all the unspent confirmed outputs in our wallet)
- listunspent
- Step 2 - View Details about a Specific UTXO
- gettxout
- Get the details of this unspent output above
- gettxout
- Step 3 - Create a Raw Transaction
- createrawtransaction
- Create a transaction
- createrawtransaction
- Step 4 - Decode the Raw Transaction (to double-check it went through correctly)
- decoderawtransaction
- View raw hex string that encodes the transaction details we supplied
- decoderawtransaction
- Step 5 - Sign the Raw Transaction
- signrawtransaction
- Sign the transaction
- signrawtransaction
- Step 6 - Submit the Raw Transaction to the Network
- sendrawtransction
- Takes the raw hex string produced by signrawtransaction and returns a transaction hash (txid) as it submits the transaction on the network.
- sendrawtransction
- Step 7 - Query the TxID of the Transaction we sent
- gettransaction
- Query the TxID and view details. Similar to online block explorer
- gettransaction