Class BSV::Network::Providers::TAAL ¶
Inherits: Object
TAAL returns pre-configured Provider instances using the TAAL infrastructure.
Mainnet composes two protocols: * ARC at https://arc.taal.com for standard ARC operations * TAALBinary at https://api.taal.com for binary broadcast
ARC is registered first, so :broadcast is served by ARC (first-registered wins). TAALBinary registers its own :broadcast command but will not win the index. To use TAALBinary directly, call +provider.protocol_for(:broadcast)+ on the TAALBinary instance via provider.protocols.last, 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 ¶
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) ¶
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+ (nil) - @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 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) ¶
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]