Class: BSV::Transaction::Beef::RawTxEntry

Inherits:
BeefTx
  • Object
show all
Defined in:
lib/bsv/transaction/beef.rb

Overview

A BEEF entry containing a raw transaction without a merkle proof.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BeefTx

#dtxid

Constructor Details

#initialize(transaction:) ⇒ RawTxEntry

Returns a new instance of RawTxEntry.

Parameters:

Raises:

  • (ArgumentError)

    if transaction is nil



82
83
84
85
86
87
# File 'lib/bsv/transaction/beef.rb', line 82

def initialize(transaction:)
  raise ArgumentError, 'RawTxEntry requires a transaction' if transaction.nil?

  super()
  @transaction = transaction
end

Instance Attribute Details

#transactionTransaction (readonly)

Returns the transaction.

Returns:



78
79
80
# File 'lib/bsv/transaction/beef.rb', line 78

def transaction
  @transaction
end

Instance Method Details

#format_flagInteger

Returns FORMAT_RAW_TX wire-protocol flag.

Returns:

  • (Integer)

    FORMAT_RAW_TX wire-protocol flag



95
96
97
# File 'lib/bsv/transaction/beef.rb', line 95

def format_flag
  FORMAT_RAW_TX
end

#wtxidString

Returns wire-order wtxid delegated to the transaction.

Returns:

  • (String)

    wire-order wtxid delegated to the transaction



90
91
92
# File 'lib/bsv/transaction/beef.rb', line 90

def wtxid
  @transaction.wtxid
end