Method: Hive::Broadcast.custom

Defined in:
lib/hive/broadcast.rb

.custom(options, &block) ⇒ Object

Provides a generic way to add higher level protocols on top of witness consensus.

Parameters:

  • options (Hash)

    options

Options Hash (options):

  • :wif (String)

    Active wif

  • :params (Hash)
    • :required_auths (Array<String>)

    • :id (String)

    • :data (String)

  • :pretend (Boolean)

    Just validate, do not broadcast.

See Also:


799
800
801
802
803
804
805
806
807
# File 'lib/hive/broadcast.rb', line 799

def self.custom(options, &block)
  required_fields = %i(required_auths id data)
  params = options[:params]
  check_required_fields(params, *required_fields)
  
  ops = [[:custom, params]]
  
  process(options.merge(ops: ops), &block)
end