Skip to content

Class BSV::Overlay::OverlayBroadcastResult

Inherits: Object

Result of broadcasting a transaction to an Overlay Services host.

Attributes

code [R]

  • @return [String, nil] machine-readable error code

description [R]

  • @return [String, nil] human-readable error description

message [R]

  • @return [String, nil] human-readable result message

status [R]

  • @return [String] result status ('success' or 'error')

txid [R]

Overlay API boundary: display-order hex txid echoed from the broadcast response. - @return [String, nil] transaction identifier (present on success)

Public Instance Methods

initialize(status:, txid: = nil, message: = nil, code: = nil, description: = nil)

  • @param status [String]
  • @param txid [String, nil]
  • @param message [String, nil]
  • @param code [String, nil]
  • @param description [String, nil]
  • @return [OverlayBroadcastResult] a new instance of OverlayBroadcastResult

raise_if_error!()

Raise the appropriate {OverlayError} subclass when {#success?} is false. Lets callers treat a broadcast failure as an exception rather than silently swallowing the result object — used by Identity and Registry clients which terminate on broadcast failure regardless. - @raise [NoCompetentHostsError] for +ERR_NO_HOSTS_INTERESTED+ - @raise [AllHostsRejectedError] for +ERR_ALL_HOSTS_REJECTED+ - @raise [AcknowledgementError] for +ERR_REQUIRE_ACK__FAILED+ - @raise [OverlayError] for any other non-success status - @return* [self] when the result is a success (chainable)

success?()

  • @return [Boolean] true when the broadcast reached at least one competent host and satisfied any acknowledgement requirements.