Class: BSV::Network::Protocols::JungleBus
- Inherits:
-
BSV::Network::Protocol
- Object
- BSV::Network::Protocol
- BSV::Network::Protocols::JungleBus
- Defined in:
- lib/bsv/network/protocols/jungle_bus.rb
Overview
JungleBus implements the GorillaPool JungleBus REST API as a Protocol subclass.
JungleBus is a blockchain indexer that indexes all BSV transactions and provides parsed transaction data, address lookups, and block headers. The get_tx endpoint returns both the full transaction (base64-encoded) and a TSC merkle proof in a single call.
Usage
jb = BSV::Network::Protocols::JungleBus.new(
base_url: 'https://junglebus.gorillapool.io'
)
result = jb.call(:get_tx, 'abc123...')
result.data['transaction'] # => base64-encoded raw tx
result.data['merkle_proof'] # => base64-encoded TSC proof (or nil)
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, http_client: nil) ⇒ JungleBus
constructor
A new instance of JungleBus.
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, http_client: nil) ⇒ JungleBus
Returns a new instance of JungleBus.
46 47 48 |
# File 'lib/bsv/network/protocols/jungle_bus.rb', line 46 def initialize(base_url:, api_key: nil, auth: nil, http_client: nil) super end |