class Algorand::AlgodClient

Attributes

host[R]
token[R]

Public Class Methods

new(host: Configuration.algod_host, token:) click to toggle source
# File lib/algorand/algod_client.rb, line 7
def initialize(host: Configuration.algod_host,  token:)
  @host = host
  @token = token
end

Public Instance Methods

test() click to toggle source
# File lib/algorand/algod_client.rb, line 12
def test
  HTTParty.get("http://#{host}/v2/status", headers: headers)
end

Private Instance Methods

headers() click to toggle source
# File lib/algorand/algod_client.rb, line 19
def headers
  {
    'X-Algo-API-Token' => token
  }
end