Class: BSV::Network::BroadcastResponse
- Inherits:
-
Object
- Object
- BSV::Network::BroadcastResponse
- Defined in:
- lib/bsv/network/broadcast_response.rb
Instance Attribute Summary collapse
-
#block_hash ⇒ Object
readonly
Returns the value of attribute block_hash.
-
#block_height ⇒ Object
readonly
Returns the value of attribute block_height.
-
#competing_txs ⇒ Object
readonly
Returns the value of attribute competing_txs.
-
#extra_info ⇒ Object
readonly
Returns the value of attribute extra_info.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#tx_status ⇒ Object
readonly
Returns the value of attribute tx_status.
-
#txid ⇒ Object
readonly
Returns the value of attribute txid.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ BroadcastResponse
constructor
A new instance of BroadcastResponse.
- #mined? ⇒ Boolean
- #success? ⇒ Boolean
Constructor Details
#initialize(attrs = {}) ⇒ BroadcastResponse
Returns a new instance of BroadcastResponse.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/bsv/network/broadcast_response.rb', line 8 def initialize(attrs = {}) @txid = attrs[:txid] @tx_status = attrs[:tx_status] @message = attrs[:message] @extra_info = attrs[:extra_info] @block_hash = attrs[:block_hash] @block_height = attrs[:block_height] @timestamp = attrs[:timestamp] @competing_txs = attrs[:competing_txs] end |
Instance Attribute Details
#block_hash ⇒ Object (readonly)
Returns the value of attribute block_hash.
6 7 8 |
# File 'lib/bsv/network/broadcast_response.rb', line 6 def block_hash @block_hash end |
#block_height ⇒ Object (readonly)
Returns the value of attribute block_height.
6 7 8 |
# File 'lib/bsv/network/broadcast_response.rb', line 6 def block_height @block_height end |
#competing_txs ⇒ Object (readonly)
Returns the value of attribute competing_txs.
6 7 8 |
# File 'lib/bsv/network/broadcast_response.rb', line 6 def competing_txs @competing_txs end |
#extra_info ⇒ Object (readonly)
Returns the value of attribute extra_info.
6 7 8 |
# File 'lib/bsv/network/broadcast_response.rb', line 6 def extra_info @extra_info end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/bsv/network/broadcast_response.rb', line 6 def @message end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
6 7 8 |
# File 'lib/bsv/network/broadcast_response.rb', line 6 def @timestamp end |
#tx_status ⇒ Object (readonly)
Returns the value of attribute tx_status.
6 7 8 |
# File 'lib/bsv/network/broadcast_response.rb', line 6 def tx_status @tx_status end |
#txid ⇒ Object (readonly)
Returns the value of attribute txid.
6 7 8 |
# File 'lib/bsv/network/broadcast_response.rb', line 6 def txid @txid end |
Instance Method Details
#mined? ⇒ Boolean
23 24 25 |
# File 'lib/bsv/network/broadcast_response.rb', line 23 def mined? tx_status == 'MINED' end |
#success? ⇒ Boolean
19 20 21 |
# File 'lib/bsv/network/broadcast_response.rb', line 19 def success? true end |