Cannot create a raw transaction using bitcoin-ruby
Cannot create a raw transaction using bitcoin-ruby Im using bitcoin-ruby to create a raw transaction then broadcast it through block-cypher. I follow their tutorial # use testnet so you don't accidentally blow your whole money! Bitcoin.network = :testnet3 # make the DSL methods available in your scope include Bitcoin::Builder # the previous transaction that has an output to your address prev_hash = "6c44b284c20fa22bd69c57a9dbff91fb71deddc8c54fb2f5aa41fc78c96c1ad1" # the number of the output you want to use prev_out_index = 0 # fetch the tx from whereever you like and parse it prev_tx = Bitcoin::P::Tx.from_json(open("http://ift.tt/2BZU9Ti")) # the key needed to sign an input that spends the previous output key = Bitcoin::Key.from_base58("92ZRu28m2GHSKaaF2W7RswJ2iJYpTzVhBaN6ZLs7TENCs4b7ML8") # create a new transaction (and sign the inputs) new_tx = build_tx do |t| # add the input you picked out earlier t.input do |i| i.prev_out prev_tx ...