Class: BSV::Network::Protocols::Ordinals
- Inherits:
-
BSV::Network::Protocol
- Object
- BSV::Network::Protocol
- BSV::Network::Protocols::Ordinals
- Defined in:
- lib/bsv/network/protocols/ordinals.rb
Overview
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' => [...] }
Instance Attribute Summary
Attributes inherited from BSV::Network::Protocol
#api_key, #base_url, #http_client, #network
Instance Method Summary collapse
-
#initialize(base_url:, api_key: nil, http_client: nil) ⇒ Ordinals
constructor
A new instance of Ordinals.
Methods inherited from BSV::Network::Protocol
#call, commands, #default_call, endpoint, endpoints, inherited, subscription, subscriptions
Constructor Details
#initialize(base_url:, api_key: nil, http_client: nil) ⇒ Ordinals
Returns a new instance of Ordinals.
26 27 28 |
# File 'lib/bsv/network/protocols/ordinals.rb', line 26 def initialize(base_url:, api_key: nil, http_client: nil) super end |