Module: Harmony::Api::V1::Staking::Validator

Included in:
Client
Defined in:
lib/harmony/api/v1/staking/validator.rb

Instance Method Summary collapse

Instance Method Details

#get_all_validator_addressesObject



12
13
14
# File 'lib/harmony/api/v1/staking/validator.rb', line 12

def get_all_validator_addresses
  response(post('getAllValidatorAddresses'))
end

#get_all_validator_information(page: -1)) ⇒ Object



24
25
26
# File 'lib/harmony/api/v1/staking/validator.rb', line 24

def get_all_validator_information(page: -1)
  response(post('getAllValidatorInformation', params: [page]))
end

#get_all_validator_information_by_block_number(page: -1,, block_number: 0) ⇒ Object



28
29
30
31
# File 'lib/harmony/api/v1/staking/validator.rb', line 28

def get_all_validator_information_by_block_number(page: -1, block_number: 0)
  params = [page, Harmony::Api::Utilities.int_to_hex(block_number)]
  response(post('getAllValidatorInformationByBlockNumber', params: params))
end

#get_delegations_by_validator(address) ⇒ Object



38
39
40
# File 'lib/harmony/api/v1/staking/validator.rb', line 38

def get_delegations_by_validator(address)
  response(post('getDelegationsByValidator', params: [address]))
end

#get_elected_validator_addressesObject



16
17
18
# File 'lib/harmony/api/v1/staking/validator.rb', line 16

def get_elected_validator_addresses
  response(post('getElectedValidatorAddresses'))
end

#get_validator_information(address) ⇒ Object



20
21
22
# File 'lib/harmony/api/v1/staking/validator.rb', line 20

def get_validator_information(address)
  response(post('getValidatorInformation', params: [address]))
end

#get_validators(epoch) ⇒ Object



8
9
10
# File 'lib/harmony/api/v1/staking/validator.rb', line 8

def get_validators(epoch)
  response(post('getValidators', params: [epoch]))
end

#is_block_signer(address, block_number: 0) ⇒ Object



33
34
35
36
# File 'lib/harmony/api/v1/staking/validator.rb', line 33

def is_block_signer(address, block_number: 0)
  params = [Harmony::Api::Utilities.int_to_hex(block_number), address]
  response(post('isBlockSigner', params: params))
end