Programming Bitcoin Script Transaction (Crypto) Contracts Step-by-Step (in Ruby)

Gerald Bauer <[email protected]>
Newsgroups gmane.comp.lang.ruby.general
Message-ID <CAAxEZd9uxtoZpKhA_EpHKwSE3_jPqQ-WZE9+NbpqrCpFoPbNsg@mail.gmail.com>
Hello,

  I've started a new (free online) book(let) titled
  Programming Bitcoin Script Transaction (Crypto) Contracts
Step-by-Step (in Ruby) [1].

  Let's start with building your own bitcoin stack machine from zero /
scratch and let's run your own bitcoin ops (operations)...
  Example:

  ## A simple stack machine
  def op_add( stack )
    left  = stack.pop
    right = stack.pop
    stack.push( left + right )
  end

  def op_2( stack )
    stack.push( 2 )
  end

  ## Let's run!

  stack = []
  op_2( stack )     #=> stack = [2]
  op_2( stack )     #=> stack = [2,2]
  op_add( stack )   #=> stack = [4]


  Unlock the ?+2=4 puzzle on your own computer and
  win "unspent transaction outputs" (UTXOs) on your own testnet.

   Happy bitcoin scripting with ruby.

[1]  https://github.com/openblockchains/programming-bitcoin-script

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.