Class BSV::Network::Providers::GorillaPool ¶
Inherits: Object
GorillaPool returns pre-configured Provider instances using the GorillaPool Arcade infrastructure for broadcasting, the GorillaPool Ordinals API for transaction and merkle path lookups, and JungleBus for indexed transaction data and block headers.
Mainnet composes three protocols: * Arcade at https://arcade.gorillapool.io * Ordinals at https://ordinals.gorillapool.io * JungleBus at https://junglebus.gorillapool.io
Testnet composes two protocols: * Arcade at https://testnet.arcade.gorillapool.io * JungleBus at https://testnet.junglebus.gorillapool.io
Example¶
provider = BSV::Network::Providers::GorillaPool.mainnet
provider.call(:broadcast, tx)
provider = BSV::Network::Providers::GorillaPool.mainnet(auth: { bearer: 'token' })
provider.call(:broadcast, tx)
# Legacy api_key: shorthand — still supported
provider = BSV::Network::Providers::GorillaPool.testnet(api_key: 'my-key')
Constants¶
DEFAULT_RATE_LIMIT ¶
Default requests-per-second limit for unauthenticated use.
Public Class Methods¶
default(testnet: = false, auth: = nil, rate_limit: = DEFAULT_RATE_LIMIT, **opts) ¶
Returns a mainnet or testnet Provider depending on the testnet: flag. - @param testnet [Boolean] when true, returns the testnet Provider - @param auth [Hash, Symbol, nil] auth config forwarded to Provider and all protocols - @param rate_limit [Numeric, nil] requests per second; defaults to +DEFAULT_RATE_LIMIT+ - @param opts [Hash] keyword arguments forwarded to each protocol constructor - @return [Provider]
mainnet(auth: = nil, rate_limit: = DEFAULT_RATE_LIMIT, **opts) ¶
Returns a mainnet Provider configured with Arcade, Ordinals, and JungleBus.
Auth is forwarded to all three protocols so each can authenticate independently. - @param auth [Hash, Symbol, nil] auth config forwarded to Provider and all protocols - @param rate_limit [Numeric, nil] requests per second; defaults to +DEFAULT_RATE_LIMIT+ - @param opts [Hash] keyword arguments forwarded to each protocol constructor - @return [Provider]
testnet(auth: = nil, rate_limit: = DEFAULT_RATE_LIMIT, **opts) ¶
Returns a testnet Provider configured with Arcade only. - @param auth [Hash, Symbol, nil] auth config forwarded to Provider and all protocols - @param rate_limit [Numeric, nil] requests per second; defaults to +DEFAULT_RATE_LIMIT+ - @param opts [Hash] keyword arguments forwarded to each protocol constructor - @return [Provider]