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
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
-
#block_height ⇒ Object
readonly
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
-
#competing_txs ⇒ Object
readonly
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
-
#extra_info ⇒ Object
readonly
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
-
#message ⇒ Object
readonly
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
-
#timestamp ⇒ Object
readonly
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
-
#tx_status ⇒ Object
readonly
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
-
#txid ⇒ Object
readonly
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
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.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/bsv/network/broadcast_response.rb', line 9 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)
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
7 8 9 |
# File 'lib/bsv/network/broadcast_response.rb', line 7 def block_hash @block_hash end |
#block_height ⇒ Object (readonly)
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
7 8 9 |
# File 'lib/bsv/network/broadcast_response.rb', line 7 def block_height @block_height end |
#competing_txs ⇒ Object (readonly)
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
7 8 9 |
# File 'lib/bsv/network/broadcast_response.rb', line 7 def competing_txs @competing_txs end |
#extra_info ⇒ Object (readonly)
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
7 8 9 |
# File 'lib/bsv/network/broadcast_response.rb', line 7 def extra_info @extra_info end |
#message ⇒ Object (readonly)
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
7 8 9 |
# File 'lib/bsv/network/broadcast_response.rb', line 7 def @message end |
#timestamp ⇒ Object (readonly)
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
7 8 9 |
# File 'lib/bsv/network/broadcast_response.rb', line 7 def @timestamp end |
#tx_status ⇒ Object (readonly)
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
7 8 9 |
# File 'lib/bsv/network/broadcast_response.rb', line 7 def tx_status @tx_status end |
#txid ⇒ Object (readonly)
ARC API boundary: display-order hex txid as returned by the ARC broadcast endpoint.
7 8 9 |
# File 'lib/bsv/network/broadcast_response.rb', line 7 def txid @txid end |
Instance Method Details
#mined? ⇒ Boolean
24 25 26 |
# File 'lib/bsv/network/broadcast_response.rb', line 24 def mined? tx_status == 'MINED' end |
#success? ⇒ Boolean
20 21 22 |
# File 'lib/bsv/network/broadcast_response.rb', line 20 def success? true end |