Module: Radiator::Mixins::ActsAsWallet
- Included in:
- Chain
- Defined in:
- lib/radiator/mixins/acts_as_wallet.rb
Instance Method Summary collapse
-
#claim_reward_balance(options) ⇒ Object
Create a claim_reward_balance operation.
-
#claim_reward_balance!(permlink) ⇒ Object
Create a claim_reward_balance operation and broadcasts it right away.
-
#transfer(options = {}) ⇒ Object
Create a transfer operation.
-
#transfer!(options = {}) ⇒ Object
Create a transfer operation and broadcasts it right away.
Instance Method Details
#claim_reward_balance(options) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/radiator/mixins/acts_as_wallet.rb', line 16 def claim_reward_balance() reward_steem = [:reward_steem] || '0.000 STEEM' reward_sbd = [:reward_sbd] || '0.000 SBD' reward_vests = [:reward_vests] || '0.000000 VESTS' @operations << { type: :claim_reward_balance, account: account_name, reward_steem: reward_steem, reward_sbd: reward_sbd, reward_vests: reward_vests } self end |
#claim_reward_balance!(permlink) ⇒ Object
40 |
# File 'lib/radiator/mixins/acts_as_wallet.rb', line 40 def claim_reward_balance!(permlink); claim_reward_balance(permlink).broadcast!(true); end |
#transfer(options = {}) ⇒ Object
52 53 54 55 56 |
# File 'lib/radiator/mixins/acts_as_wallet.rb', line 52 def transfer( = {}) @operations << .merge(type: :transfer, from: account_name) self end |
#transfer!(options = {}) ⇒ Object
64 |
# File 'lib/radiator/mixins/acts_as_wallet.rb', line 64 def transfer!( = {}); transfer().broadcast!(true); end |