Bitcoin Forum
October 18, 2017, 11:16:17 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Bitcoin cookbook  (Read 1092 times)
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1470


View Profile
October 12, 2012, 07:21:05 PM
 #1

This thread was created as a meta-thread, intended to help collect various bitcoin "recipes."  What is recipe?  It is a concrete example with step-by-step instructions, understandable to programmers, that describes how to execute a specific type of bitcoin-enabled transaction.

Everyone understands the simple, popular send-bitcoins-to-pubkey transaction, but bitcoin offers so much more.  This cookbook, it is hoped, will showcase some of the less common, advanced uses of bitcoin.

If you would like to contribute a recipe, please start your own thread, and then post a link in this thread.  The OP will be updated as needed.  It would be great if these recipes were copied to / linked in the wiki, but since discussion facilities on the forum are better, this seemed like a better home for the cookbook.

Another goal is to eventually have a set of scripts which demonstrate these features.


Recipe:  2-of-2 escrow, using multisig

Link: https://people.xiph.org/~greg/escrowexample.txt

Bob wants to pay Alice 50tnbtc but prevent Alice from cheating him.  A good example of using multisig from start to finish.


Recipe: Trading between two bitcoin-like chains

Link: https://en.bitcoin.it/wiki/Contracts#Example_5:_Trading_across_chains

Currencies that implement the same ideas as Bitcoin can be traded freely against each other without trust.


Recipe:  Atomic Coin Swapping

Link: https://bitcointalk.org/index.php?topic=112007.0

Two parties negotiate to swap bitcoins between themselves.   This is presented in the context of atomically exchanging payment for smartcoins (colored coins), but is not limited to that use case.  P2P mixing was another example use case someone suggested.


Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!