Skip to content

Class BSV::Network::Protocols::Ordinals

Inherits: BSV::Network::Protocol

Ordinals implements the GorillaPool Ordinals API as a Protocol subclass.

Provides raw transaction hex lookup and Merkle path (proof) retrieval via the GorillaPool Ordinals REST API. Pure DSL — no escape hatches needed.

Usage

ord = BSV::Network::Protocols::Ordinals.new(base_url: 'https://ordinals.gorillapool.io')
result = ord.call(:get_tx, 'abc123...')
result.data  # => "01000000..."  (raw hex string)

result = ord.call(:get_merkle_path, 'abc123...')
result.data  # => { 'index' => 0, 'path' => [...] }

Public Instance Methods

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

  • @param base_url [String] base URL for the Ordinals API
  • @param api_key [String, nil] optional Bearer API key
  • @param http_client [Object, nil] injectable HTTP client for testing
  • @return [Ordinals] a new instance of Ordinals