Method: Hive::Broadcast.withdraw_vesting

Defined in:
lib/hive/broadcast.rb

.withdraw_vesting(options, &block) ⇒ Object

At any given point in time an account can be withdrawing from their vesting shares.

Hive::Broadcast.withdraw_vesting(wif: wif, params: {account: , vesting_shares: vesting_shares}) do |result|
  puts result
end

Parameters:

  • options (Hash)

    options

Options Hash (options):

  • :wif (String)

    Active wif

  • :params (Hash)
    • :account (String)

    • :vesting_shares (String)

  • :pretend (Boolean)

    Just validate, do not broadcast.

See Also:



339
340
341
342
343
344
345
346
347
348
349
# File 'lib/hive/broadcast.rb', line 339

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