# Class BSV::Network::Providers::GorillaPool <a id="class-BSV-Network-Providers-GorillaPool"></a>

**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 <code>https://arcade.gorillapool.io</code>
*   Ordinals at <code>https://ordinals.gorillapool.io</code>
*   JungleBus at <code>https://junglebus.gorillapool.io</code>

Testnet composes two protocols:
*   Arcade at <code>https://testnet.arcade.gorillapool.io</code>
*   JungleBus at <code>https://testnet.junglebus.gorillapool.io</code>

## 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` <a id="constant-DEFAULT_RATE_LIMIT"></a> <a id="DEFAULT_RATE_LIMIT-constant"></a>
Default requests-per-second limit for unauthenticated use.

## Public Class Methods
### `default(testnet: = false, auth: = nil, rate_limit: = DEFAULT_RATE_LIMIT, **opts)` <a id="method-c-default"></a> <a id="default-class_method"></a>
Returns a mainnet or testnet Provider depending on the <code>testnet:</code>
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)` <a id="method-c-mainnet"></a> <a id="mainnet-class_method"></a>
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)` <a id="method-c-testnet"></a> <a id="testnet-class_method"></a>
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]
