Class: BSV::Transaction::Beef::BeefTx Abstract
- Inherits:
-
Object
- Object
- BSV::Transaction::Beef::BeefTx
- Defined in:
- lib/bsv/transaction/beef.rb
Overview
This class is abstract.
Subclass and implement #wtxid and #format_flag.
Abstract base class for a single entry in a BEEF bundle.
Subclasses represent the three wire formats:
-
RawTxEntry — raw transaction without a merkle proof
-
ProvenTxEntry — raw transaction with an associated BUMP index
-
TxidOnlyEntry — transaction ID only (no raw data)
Direct Known Subclasses
Instance Method Summary collapse
-
#dtxid ⇒ String?
Display-order transaction ID as a hex string.
-
#format_flag ⇒ Integer
abstract
Wire-protocol format integer for serialisation.
-
#initialize ⇒ BeefTx
constructor
A new instance of BeefTx.
-
#wtxid ⇒ String?
abstract
Wire-order transaction ID.
Constructor Details
#initialize ⇒ BeefTx
Returns a new instance of BeefTx.
48 |
# File 'lib/bsv/transaction/beef.rb', line 48 def initialize; end |
Instance Method Details
#dtxid ⇒ String?
Display-order transaction ID as a hex string.
dtxid always returns a 64-char hex string suitable for JSON and UI boundaries.
63 64 65 |
# File 'lib/bsv/transaction/beef.rb', line 63 def dtxid wtxid&.reverse&.unpack1('H*') end |
#format_flag ⇒ Integer
This method is abstract.
Wire-protocol format integer for serialisation.
70 71 72 |
# File 'lib/bsv/transaction/beef.rb', line 70 def format_flag raise NotImplementedError, "#{self.class}#format_flag is not implemented" end |
#wtxid ⇒ String?
This method is abstract.
Wire-order transaction ID.
53 54 55 |
# File 'lib/bsv/transaction/beef.rb', line 53 def wtxid raise NotImplementedError, "#{self.class}#wtxid is not implemented" end |