example from bitcoin-ruby