DevHeads.net

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

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] <a href="https://github.com/openblockchains/programming-bitcoin-script" title="https://github.com/openblockchains/programming-bitcoin-script">https://github.com/openblockchains/programming-bitcoin-script</a>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>