Skip to content

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.

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

Example

provider = BSV::Network::Providers::TAAL.mainnet(api_key: 'mainnet_...')
provider.call(:broadcast, tx)

Public Class Methods

default(testnet: = false, **opts)

Returns a mainnet or testnet Provider depending on the testnet: flag. - @param testnet [Boolean] when true, returns the testnet Provider - @param opts [Hash] keyword arguments forwarded to each protocol constructor - @return [Provider]

mainnet(**opts)

Returns a mainnet Provider configured with ARC and TAALBinary. - @param opts [Hash] keyword arguments forwarded to each protocol constructor - @return [Provider]

testnet(**opts)

Returns a testnet Provider configured with ARC only. - @param opts [Hash] keyword arguments forwarded to each protocol constructor - @return [Provider]