Class: BSV::Network::Providers::GorillaPool
- Inherits:
-
Object
- Object
- BSV::Network::Providers::GorillaPool
- Defined in:
- lib/bsv/network/providers/gorilla_pool.rb
Overview
GorillaPool returns pre-configured Provider instances using the GorillaPool ARCADE infrastructure for ARC and Chaintracks, and the GorillaPool Ordinals API for transaction and merkle path lookups.
Mainnet composes three protocols:
-
ARC at
https://arcade.gorillapool.io -
Chaintracks at
https://arcade.gorillapool.io -
Ordinals at
https://ordinals.gorillapool.io
Testnet provides ARC only at https://testnet.arcade.gorillapool.io.
Example
provider = BSV::Network::Providers::GorillaPool.mainnet
provider.call(:broadcast, tx)
provider = BSV::Network::Providers::GorillaPool.testnet(api_key: 'my-key')
provider.call(:broadcast, tx)
Class Method Summary collapse
-
.default(testnet: false, **opts) ⇒ Provider
Returns a mainnet or testnet Provider depending on the
testnet:flag. -
.mainnet(**opts) ⇒ Provider
Returns a mainnet Provider configured with ARC, Chaintracks, and Ordinals.
-
.testnet(**opts) ⇒ Provider
Returns a testnet Provider configured with ARC and Chaintracks.
Class Method Details
.default(testnet: false, **opts) ⇒ Provider
Returns a mainnet or testnet Provider depending on the testnet: flag.
55 56 57 |
# File 'lib/bsv/network/providers/gorilla_pool.rb', line 55 def self.default(testnet: false, **opts) testnet ? testnet(**opts) : mainnet(**opts) end |
.mainnet(**opts) ⇒ Provider
Returns a mainnet Provider configured with ARC, Chaintracks, and Ordinals.
29 30 31 32 33 34 35 36 |
# File 'lib/bsv/network/providers/gorilla_pool.rb', line 29 def self.mainnet(**opts) common = opts.slice(:api_key, :http_client) Provider.new('GorillaPool') do |p| p.protocol Protocols::ARC, base_url: 'https://arcade.gorillapool.io', **opts p.protocol Protocols::Chaintracks, base_url: 'https://arcade.gorillapool.io', **common p.protocol Protocols::Ordinals, base_url: 'https://ordinals.gorillapool.io', **common end end |
.testnet(**opts) ⇒ Provider
Returns a testnet Provider configured with ARC and Chaintracks.
42 43 44 45 46 47 48 |
# File 'lib/bsv/network/providers/gorilla_pool.rb', line 42 def self.testnet(**opts) common = opts.slice(:api_key, :http_client) Provider.new('GorillaPool') do |p| p.protocol Protocols::ARC, base_url: 'https://testnet.arcade.gorillapool.io', **opts p.protocol Protocols::Chaintracks, base_url: 'https://testnet.arcade.gorillapool.io', **common end end |