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

**Inherits:** `Object`

TAAL returns pre-configured Provider instances using the TAAL infrastructure.

Mainnet composes two protocols:
*   ARC at <code>https://arc.taal.com</code> for standard ARC operations
*   TAALBinary at <code>https://api.taal.com</code> for binary broadcast

ARC is registered first, so <code>:broadcast</code> is served by ARC
(first-registered wins). TAALBinary registers its own <code>:broadcast</code>
command but will not win the index. To use TAALBinary directly, call
+provider.protocol_for(:broadcast)+ on the TAALBinary instance via
<code>provider.protocols.last</code>, or build a custom Provider.

TAAL requires an API key for production use. The default rate limit is `nil`
(unconstrained) because the effective limit depends on the subscription tier.

There is no TAAL testnet default — TAAL does not publish a supported testnet
ARC URL.

## Example

    provider = BSV::Network::Providers::TAAL.mainnet(auth: { bearer: 'mainnet_...' })
    provider.call(:broadcast, tx)

    # Legacy api_key: shorthand — still supported
    provider = BSV::Network::Providers::TAAL.mainnet(api_key: 'mainnet_...')

## Constants
### `DEFAULT_RATE_LIMIT` <a id="constant-DEFAULT_RATE_LIMIT"></a> <a id="DEFAULT_RATE_LIMIT-constant"></a>
Default requests-per-second limit. `nil` because the effective limit depends
on the TAAL subscription tier.

## 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+ (nil)
- **@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 ARC and TAALBinary.

Auth is forwarded to both protocols. ARC uses Bearer tokens; TAALBinary uses
raw API keys. Each protocol's constructor handles the translation appropriate
to its endpoint.
- **@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+ (nil)
- **@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 ARC only.
- **@param** `auth` [Hash, Symbol, nil] auth config forwarded to Provider and ARC protocol
- **@param** `rate_limit` [Numeric, nil] requests per second; defaults to +DEFAULT_RATE_LIMIT+ (nil)
- **@param** `opts` [Hash] keyword arguments forwarded to the ARC protocol constructor
- **@return** [Provider]
