Book Image

Learning Bitcoin

Book Image

Learning Bitcoin

Overview of this book

Table of Contents (16 chapters)
Learning Bitcoin
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Keys, transactions, and blocks


To help you understand how Bitcoin transactions work, we'll need to explain how some of its basic mechanisms work with various cryptographic algorithms. With the classic example of sending money between Alice and Bob, we will illustrate how the Bitcoin network confirms a transaction.

Creating a transaction

Let's start with an example where Alice wants to send 4.0BTC to Bob. Alice has a bitcoin wallet with two addresses along with the corresponding private keys that control the two amounts 1.2BTC and 2.8BTC. To receive the money, Bob will generate a private key with a Bitcoin address:

Figure 4.1 - Alice has a wallet with two addresses. Bob has a wallet with one address. Alice wants to send 4.0BTC to Bob.

To transfer the bitcoin, we need to create a valid transaction and broadcast it to the Bitcoin network for confirmation. If confirmed by the network, the transferred amount will be available for spending by the receiver.

The transaction can record a transfer between...