Method: Bitcoin::Tx#to_h

Defined in:
lib/bitcoin/tx.rb

#to_hObject



250
251
252
253
254
255
# File 'lib/bitcoin/tx.rb', line 250

def to_h
  {
      txid: txid, hash: witness_hash.rhex, version: version, size: size, vsize: vsize, locktime: lock_time,
      vin: inputs.map(&:to_h), vout: outputs.map.with_index{|tx_out, index| tx_out.to_h.merge({n: index})}
  }
end