Skip to content

Class BSV::Network::ARC

Inherits: Object

ARC broadcaster for submitting transactions to the BSV network.

Any object responding to #broadcast(tx) can serve as a broadcaster; this class implements that contract using the ARC API.

The HTTP client is injectable for testability. It must respond to

request(uri, request) and return an object with #code and #body.

Constants

REJECTED_STATUSES

Not documented.

Public Instance Methods

broadcast(tx)

Submit a transaction to ARC. Returns BroadcastResponse on success, raises BroadcastError on failure.

initialize(url, api_key: = nil, http_client: = nil)

  • @return [ARC] a new instance of ARC

status(txid)

Query the status of a previously submitted transaction. Returns BroadcastResponse on success, raises BroadcastError on failure.