Method: Hive::Broadcast.escrow_release

Defined in:
lib/hive/broadcast.rb

.escrow_release(options, &block) ⇒ Object

This operation can be used by anyone associated with the escrow transfer to release funds if they have permission.

Parameters:

  • options (Hash)

    options

Options Hash (options):

  • :wif (String)

    Active wif

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

    • :to (String)

    • :agent (String)

    • :who (String)

    • :receiver (String)

    • :escrow_id (String)

    • :hbd_amount (String)

    • :hive_amount (String)

  • :pretend (Boolean)

    Just validate, do not broadcast.

See Also:



1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
# File 'lib/hive/broadcast.rb', line 1039

def self.escrow_release(options, &block)
  required_fields = %i(from to agent who receiver escrow_id)
  params = options[:params]
  check_required_fields(params, *required_fields)
  
  params[:hbd_amount] = normalize_amount(options.merge amount: params[:hbd_amount])
  params[:hive_amount] = normalize_amount(options.merge amount: params[:hive_amount])

  ops = [[:escrow_release, params]]
  
  process(options.merge(ops: ops), &block)
end