Method: Hive::Broadcast.witness_update
- Defined in:
- lib/hive/broadcast.rb
.witness_update(options, &block) ⇒ Object
Users who wish to become a witness must pay a fee acceptable to the current witnesses to apply for the position and allow voting to begin.
= {
wif: wif,
params: {
owner: witness_account_name,
url: '',
block_signing_key: 'STM8ZSyzjPm48GmUuMSRufkVYkwYbZzbxeMysAVp7KFQwbTf98TcG',
props: {
account_creation_fee: '0.000 HIVE',
maximum_block_size: 131072,
hbd_interest_rate:1000
},
fee: '0.000 HIVE',
}
}
Hive::Broadcast.witness_update()
667 668 669 670 671 672 673 674 675 676 677 678 679 |
# File 'lib/hive/broadcast.rb', line 667 def self.witness_update(, &block) required_fields = %i(owner block_signing_key props fee) params = [:params] check_required_fields(params, *required_fields) account_creation_fee = params[:props][:account_creation_fee] rescue nil params[:props][:account_creation_fee] = normalize_amount(.merge amount: account_creation_fee) params[:fee] = normalize_amount(.merge amount: params[:fee]) ops = [[:witness_update, params]] process(.merge(ops: ops), &block) end |