Bitcoin Forum
May 13, 2024, 07:08:39 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin cookbook  (Read 1199 times)
jgarzik (OP)
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


View Profile
October 12, 2012, 07:21:05 PM
Last edit: October 12, 2012, 07:32:03 PM by jgarzik
 #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, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!