lib/bitcoin/protocol/tx.rb
# output transaction in raw binary format with witness
output transaction in raw binary format with witness
output transaction in raw binary format with witness
def to_witness_payload
        buf = [@ver, MARKER, FLAG].pack('Vcc')
        buf << Protocol.pack_var_int(@in.length) << @in.map(&:to_payload).join
        buf << Protocol.pack_var_int(@out.length) << @out.map(&:to_payload).join
        buf << witness_payload << [@lock_time].pack('V')
        buf
      end
def to_witness_payload buf = [ @ver , MARKER , FLAG ] . pack ( 'Vcc' ) buf << Protocol . pack_var_int ( @in . length ) << @in . map ( & :to_payload ) . join buf << Protocol . pack_var_int ( @out . length ) << @out . map ( & :to_payload ) . join buf << witness_payload << [ @lock_time ] . pack ( 'V' ) buf end
output transaction in raw binary format with witness
output transaction in raw binary format with witness