Method: Hive::Broadcast.claim_account

Defined in:
lib/hive/broadcast.rb

.claim_account(options, &block) ⇒ Object

Parameters:

  • options (Hash)

    options

Options Hash (options):

  • :wif (String)

    Active wif

  • :params (Hash)
    • :creator (String)

    • :fee (String)

    • :extensions (Array)

  • :pretend (Boolean)

    Just validate, do not broadcast.

See Also:



1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
# File 'lib/hive/broadcast.rb', line 1231

def self.(options, &block)
  required_fields = %i(creator fee)
  params = options[:params]
  
  check_required_fields(params, *required_fields)
  
  params[:fee] = normalize_amount(options.merge amount: params[:fee])
  params[:extensions] ||= []
  
  ops = [[:claim_account, params]]
  
  process(options.merge(ops: ops), &block)
end