Method: Hive::Broadcast.delegate_vesting_shares

Defined in:
lib/hive/broadcast.rb

.delegate_vesting_shares(options, &block) ⇒ Object

Delegate vesting shares from one account to the other.

Parameters:

  • options (Hash)

    options

Options Hash (options):

  • :wif (String)

    Active wif

  • :params (Hash)
    • :delegator (String)

    • :delegatee (String)

    • :vesting_shares (String)

  • :pretend (Boolean)

    Just validate, do not broadcast.

See Also:



1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
# File 'lib/hive/broadcast.rb', line 1173

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