Sha256: dd5dd979ab6db317ffd3d58fe5621a644fb0f8a6a9584d59b57edfdaa2b2949f

Contents?: true

Size: 1.04 KB

Versions: 5

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

module Harmony
  module Api
    class Configuration
      attr_accessor :networks, :faraday, :verbose

      def initialize
        self.networks = {
          mainnet: {
            shards: 4,
            url: 'https://api.s%d.t.hmny.io'
          },
          testnet: {
            shards: 3,
            url: 'https://api.s%d.lrtn.hmny.io'
          },
          tnet: {
            shards: 2,
            url: 'https://api.s%d.tn.hmny.io'
          },
          os: {
            shards: 4,
            url: 'https://api.s%d.os.hmny.io'
          },
          ps: {
            shards: 2,
            url: 'https://api.s%d.ps.hmny.io'
          },
          stn: {
            shards: 2,
            url: 'https://api.s%d.stn.hmny.io'
          },
          pga: {
            shards: 2,
            url: 'https://api.s%d.pga.hmny.io'
          }
        }

        self.faraday = {
          adapter: :net_http,
          timeout: 120,
          open_timeout: 60
        }

        self.verbose = false
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
harmony-api-0.1.4 lib/harmony/api/configuration.rb
harmony-api-0.1.3 lib/harmony/api/configuration.rb
harmony-api-0.1.2 lib/harmony/api/configuration.rb
harmony-api-0.1.1 lib/harmony/api/configuration.rb
harmony-api-0.1.0 lib/harmony/api/configuration.rb