Method: Hive::Broadcast.transfer_to_vesting

Defined in:
lib/hive/broadcast.rb

.transfer_to_vesting(options, &block) ⇒ Object

This operation converts HIVE into VFS (Vesting Fund Shares) at the current exchange rate.

options = {
  wif: wif,
  params: {
    from: from,
    to: to,
    amount: amount,
  }
}

Hive::Broadcast.transfer_to_vesting(options) do |result|
  puts result
end

Parameters:

  • options (Hash)

    options

Options Hash (options):

  • :wif (String)

    Active wif

  • :params (Hash)
    • :from (String)

    • :to (String)

    • :amount (String)

  • :pretend (Boolean)

    Just validate, do not broadcast.

See Also:



313
314
315
316
317
318
319
320
321
322
323
# File 'lib/hive/broadcast.rb', line 313

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