Class: BSV::Network::Protocols::Arcade
- Inherits:
-
BSV::Network::Protocol
- Object
- BSV::Network::Protocol
- BSV::Network::Protocols::Arcade
- Defined in:
- lib/bsv/network/protocols/arcade.rb
Overview
Arcade protocol implementation for submitting transactions to the BSV network.
Arcade is a sibling to ARC — both subclass Protocol directly. The request and response shapes diverge enough to rule out a shared abstract base: Arcade uses a narrower status taxonomy and a different broadcast response structure (no txid on fresh submission; idempotent re-submit returns status plus txid plus state).
Example
arcade = BSV::Network::Protocols::Arcade.new(
base_url: 'https://arcade.gorillapool.io'
)
result = arcade.call(:broadcast, tx)
result.http_success? # => true
result.data['status'] # => "submitted"
Constant Summary collapse
- REJECTED_STATUSES =
Arcade response statuses that indicate a transaction was NOT accepted. Narrower than ARC’s taxonomy — Arcade has a single explicit rejection signal.
%w[REJECTED].freeze
Instance Attribute Summary
Attributes inherited from BSV::Network::Protocol
#api_key, #auth, #base_url, #http_client, #network
Instance Method Summary collapse
-
#initialize(base_url:, api_key: nil, auth: nil, network: nil, http_client: nil, callback_url: nil, callback_token: nil) ⇒ Arcade
constructor
A new instance of Arcade.
Methods inherited from BSV::Network::Protocol
#call, commands, #default_call, endpoint, endpoints, inherited, subscription, subscriptions
Constructor Details
#initialize(base_url:, api_key: nil, auth: nil, network: nil, http_client: nil, callback_url: nil, callback_token: nil) ⇒ Arcade
Returns a new instance of Arcade.
42 43 44 45 46 47 |
# File 'lib/bsv/network/protocols/arcade.rb', line 42 def initialize(base_url:, api_key: nil, auth: nil, network: nil, http_client: nil, callback_url: nil, callback_token: nil) super(base_url: base_url, api_key: api_key, auth: auth, network: network, http_client: http_client) @callback_url = callback_url @callback_token = callback_token end |