diff --git a/lib/bitcoin/tx_in.rb b/lib/bitcoin/tx_in.rb
index <HASH>..<HASH> 100644
--- a/lib/bitcoin/tx_in.rb
+++ b/lib/bitcoin/tx_in.rb
@@ -75,6 +75,12 @@ module Bitcoin
       to_payload == other.to_payload
     end
 
+    # return previous output hash (not txid)
+    def prev_hash
+      return nil unless out_point
+      out_point.hash
+    end
+
   end
 
 end
Add Bitcoin::TxIn#prev_hash which returns outpoint hash