Saturday, July 31, 2021

How to send Bitcoin/Money

How to send Bitcoin/Money

Assuming that you have implemented P2P communication, mechanisms for creating digital identities (private and public keys), and provided ways for users to sign documents using their private keys, you are ready to start sending information to your peers.

Since we do not have a central authority that will validate how much money you have, the system will have to ask you about it every time, and then check if you lied or not. So, your transaction record might contain the following information:

  1. I have 100 Top coins
  2. I want to send 10 coins to my pharmacist for the medication (you would include your pharmacists public key here)
  3. I want to give one coin as transaction fee to the system (we will come back to this later)
  4. I want to keep the remaining 89 coins

The only thing left to do is digitally sign the transaction record with your private key and transmit the transaction record to your peers in the network. At that point, everyone will receive the information that someone (your virtual identity) is sending money to someone else (your pharmacist’s virtual identity).

Your job is done. However, your medication will not be paid for until the whole network agrees that you really did have 100 coins, and therefore could execute this transaction. Only after your transaction is validated will your pharmacist get the funds and send you the medication.

No comments: