Method: Hive::Broadcast.claim_reward_balance

Defined in:
lib/hive/broadcast.rb

.claim_reward_balance(options, &block) ⇒ Object

Parameters:

  • options (Hash)

    options

Options Hash (options):

  • :wif (String)

    Posting wif

  • :params (Hash)
    • :account (String) Account claiming rewards.

    • :reward_hive (Amount) Amount of HIVE to claim.

    • :reward_hbd (Amount) Amount of HBD to claim.

    • :reward_vests (Amount) Amount of VESTS to claim.

  • :pretend (Boolean)

    Just validate, do not broadcast.

See Also:



1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
# File 'lib/hive/broadcast.rb', line 1254

def self.claim_reward_balance(options, &block)
  required_fields = %i(account)
  params = options[:params]
  
  check_required_fields(params, *required_fields)
  
  params[:reward_hive] = normalize_amount(options.merge amount: params[:reward_hive])
  params[:reward_hbd] = normalize_amount(options.merge amount: params[:reward_hbd])
  params[:reward_vests] = normalize_amount(options.merge amount: params[:reward_vests])
  
  ops = [[:claim_reward_balance, params]]
  
  process(options.merge(ops: ops), &block)
end