Method: IOSTSdk::Main#initialize

Defined in:
lib/iost_sdk.rb

#initialize(endpoint:) ⇒ Main

Returns a new instance of Main.

Parameters:

  • endpoint (String)

    a URL of the JSON RPC endpoint of IOST



39
40
41
42
43
44
45
46
# File 'lib/iost_sdk.rb', line 39

def initialize(endpoint:)
  @endpoint = endpoint
  @client = IOSTSdk::Http::Client.new(base_url: @endpoint)

  DEFAULTS.each do |k, v|
    instance_variable_set("@#{k}".to_sym, v)
  end
end