Class: ArkEcosystem::Client::API::One::Accounts

Inherits:
Base
  • Object
show all
Defined in:
lib/arkecosystem/client/api/one/accounts.rb

Overview

Methods for the Accounts API

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ArkEcosystem::Client::API::Base

Instance Method Details

#account(address) ⇒ Faraday::Response

Get the account by the given address.

Parameters:

  • address (String)

Returns:

  • (Faraday::Response)


51
52
53
# File 'lib/arkecosystem/client/api/one/accounts.rb', line 51

def (address)
  @client.get('accounts', address: address)
end

#balance(address) ⇒ Faraday::Response

Get the balance for the given address.

Parameters:

  • address (String)

Returns:

  • (Faraday::Response)


17
18
19
# File 'lib/arkecosystem/client/api/one/accounts.rb', line 17

def balance(address)
  @client.get('accounts/getBalance', address: address)
end

#delegate(address) ⇒ Faraday::Response

Get the delegate by the given address.

Parameters:

  • address (String)

Returns:

  • (Faraday::Response)


35
36
37
# File 'lib/arkecosystem/client/api/one/accounts.rb', line 35

def delegate(address)
  @client.get('accounts/delegates', address: address)
end

#delegates_feeFaraday::Response

Get the delegate registration fee.

Returns:

  • (Faraday::Response)


42
43
44
# File 'lib/arkecosystem/client/api/one/accounts.rb', line 42

def delegates_fee
  @client.get('accounts/delegates/fee')
end

#public_key(address) ⇒ Faraday::Response

Get the public key for the given address.

Parameters:

  • address (String)

Returns:

  • (Faraday::Response)


26
27
28
# File 'lib/arkecosystem/client/api/one/accounts.rb', line 26

def public_key(address)
  @client.get('accounts/getPublickey', address: address)
end