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



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

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:



76
77
78
# File 'lib/bsv/transaction/beef.rb', line 76

def transaction
  @transaction
end

Instance Method Details

#format_flagInteger

Returns FORMAT_RAW_TX wire-protocol flag.

Returns:

  • (Integer)

    FORMAT_RAW_TX wire-protocol flag



93
94
95
# File 'lib/bsv/transaction/beef.rb', line 93

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



88
89
90
# File 'lib/bsv/transaction/beef.rb', line 88

def wtxid
  @transaction.wtxid
end