Method: Hive::Broadcast.convert

Defined in:
lib/hive/broadcast.rb

.convert(options, &block) ⇒ Object

This operation instructs the blockchain to start a conversion between HIVE and HBD, the funds are deposited after 3.5 days.

Parameters:

  • options (Hash)

    options

Options Hash (options):

  • :wif (String)

    Active wif

  • :params (Hash)
    • :owner (String)

    • :requestid (String)

    • :amount (String)

  • :pretend (Boolean)

    Just validate, do not broadcast.

See Also:



441
442
443
444
445
446
447
448
449
450
451
# File 'lib/hive/broadcast.rb', line 441

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