Class: BSV::Transaction::Beef::ProvenTxEntry
- Defined in:
- lib/bsv/transaction/beef.rb
Overview
A BEEF entry containing a raw transaction with an associated BUMP index.
Instance Attribute Summary collapse
-
#bump_index ⇒ Integer
readonly
Index into the BEEF bumps array.
-
#transaction ⇒ Transaction
readonly
The transaction.
Instance Method Summary collapse
-
#format_flag ⇒ Integer
FORMAT_RAW_TX_AND_BUMP wire-protocol flag.
-
#initialize(transaction:, bump_index:) ⇒ ProvenTxEntry
constructor
A new instance of ProvenTxEntry.
-
#wtxid ⇒ String
Wire-order wtxid delegated to the transaction.
Methods inherited from BeefTx
Constructor Details
#initialize(transaction:, bump_index:) ⇒ ProvenTxEntry
Returns a new instance of ProvenTxEntry.
111 112 113 114 115 116 117 118 |
# File 'lib/bsv/transaction/beef.rb', line 111 def initialize(transaction:, bump_index:) raise ArgumentError, 'ProvenTxEntry requires a transaction' if transaction.nil? raise ArgumentError, 'ProvenTxEntry requires a bump_index' if bump_index.nil? super() @transaction = transaction @bump_index = bump_index end |
Instance Attribute Details
#bump_index ⇒ Integer (readonly)
Returns index into the BEEF bumps array.
106 107 108 |
# File 'lib/bsv/transaction/beef.rb', line 106 def bump_index @bump_index end |
#transaction ⇒ Transaction (readonly)
Returns the transaction.
103 104 105 |
# File 'lib/bsv/transaction/beef.rb', line 103 def transaction @transaction end |
Instance Method Details
#format_flag ⇒ Integer
Returns FORMAT_RAW_TX_AND_BUMP wire-protocol flag.
126 127 128 |
# File 'lib/bsv/transaction/beef.rb', line 126 def format_flag FORMAT_RAW_TX_AND_BUMP end |
#wtxid ⇒ String
Returns wire-order wtxid delegated to the transaction.
121 122 123 |
# File 'lib/bsv/transaction/beef.rb', line 121 def wtxid @transaction.wtxid end |