Class BSV::Network::Protocols::JungleBus ¶
Inherits: BSV::Network::Protocol
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)
- @see
https://junglebus.gorillapool.io/docs/JungleBus API documentation
Public Instance Methods¶
initialize(base_url:, api_key: = nil, auth: = nil, http_client: = nil) ¶
- @param
base_url[String] base URL for the JungleBus API - @param
api_key[String, nil] legacy API key shorthand — use +auth:+ for new code - @param
auth[Hash, Symbol, nil] auth config; takes precedence over +api_key:+ - @param
http_client[Object, nil] injectable HTTP client for testing - @return [JungleBus] a new instance of JungleBus