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

|  |  |
| --- | --- |
| **Inherits** | Object |
| **Defined in** | gem/bsv-sdk/lib/bsv/network/providers/bsv_association.rb |

BSVAssociation returns pre-configured Provider instances for the BSV
Association's public BSV Broadcaster (formerly Arcade) hosts, the same ones
the TypeScript wallet-toolbox uses (`publicArcadeUrl`).

This provider is opt-in: no default in the SDK uses it. It is named after the
operator, like the other providers; the hosts also serve Chaintracks, which a
later change can add here.

*   Mainnet: Arcade at <code>https://arcade-v2-us-1.bsvblockchain.tech</code>
*   Testnet: Arcade at
    <code>https://arcade-v2-testnet-us-1.bsvblockchain.tech</code>

No key is required: anonymous use is rate-limited per IP address. Any
credentials supplied are forwarded to the Arcade protocol only.

## Example

    provider = BSV::Network::Providers::BSVAssociation.mainnet
    provider.call(:broadcast, tx)

    provider = BSV::Network::Providers::BSVAssociation.testnet(auth: { bearer: 'token' })

## Constants
### `DEFAULT_RATE_LIMIT` <a id="constant-DEFAULT_RATE_LIMIT"></a> <a id="DEFAULT_RATE_LIMIT-constant"></a>
The anonymous per-IP limit is not published, so none is assumed.

## 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 Arcade
- **@param** `rate_limit` [Numeric, nil] requests per second; defaults to +DEFAULT_RATE_LIMIT+ (nil)
- **@param** `opts` [Hash] keyword arguments forwarded to the Arcade 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.
- **@param** `auth` [Hash, Symbol, nil] auth config forwarded to Provider and Arcade
- **@param** `rate_limit` [Numeric, nil] requests per second; defaults to +DEFAULT_RATE_LIMIT+ (nil)
- **@param** `opts` [Hash] keyword arguments forwarded to the Arcade 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.
- **@param** `auth` [Hash, Symbol, nil] auth config forwarded to Provider and Arcade
- **@param** `rate_limit` [Numeric, nil] requests per second; defaults to +DEFAULT_RATE_LIMIT+ (nil)
- **@param** `opts` [Hash] keyword arguments forwarded to the Arcade constructor
- **@return** [Provider]
