O'Reilly logo

Learning Bitcoin by Richard Caetano

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building an Escrow contract

Now that we've illustrated some ways in which we can program Bitcoin, let's apply it to a common example in the real world.

When buying and selling goods over the internet, the two parties involved may choose to exchange the payment through an Escrow account. The purpose of the account is to hold the payment until the item is delivered as agreed. If there is a dispute, a refund is requested or a moderator is introduced to resolve the issue.

Using the Blockchain, we can build a solution that empowers each party with a private key. A multi-signature address is created to hold the payment without the need for a third party to hold the funds. To generate the address, three keys are issued, one each to the buyer, the seller, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required