Class: Counterparty::Callback
- Inherits:
-
CounterResource
- Object
- CounterResource
- Counterparty::Callback
- Defined in:
- lib/counterparty/resources.rb,
lib/counterparty/resources.rb
Overview
An object that describes a specific asset callback (i.e. the exercising of a call option on an asset owned by the source address).
Instance Attribute Summary collapse
-
#asset ⇒ Object
asset (string): The asset being called back.
-
#block_index ⇒ Object
(integer): The block index (block number in the block chain).
-
#fraction ⇒ Object
(integer): A floating point number greater than zero but less than or equal to 1, where 0% is for a callback of 0% of the balance of each of the asset’s holders, and 1 would be for a callback of 100%).
-
#of ⇒ Object
of the balance of each of the asset’s holders, and 1 would be for a callback of 100%).
-
#source ⇒ Object
(string): The source address of the call back (should be the current owner of the asset).
-
#tx_hash ⇒ Object
(string): The transaction hash.
-
#tx_index ⇒ Object
(integer): The transaction index.
-
#validity ⇒ Object
(string): Set to “valid” if a valid send.
Attributes inherited from CounterResource
#allow_unconfirmed_inputs, #encoding, #fee, #fee_per_kb, #pubkey, #result_attributes
Method Summary
Methods inherited from CounterResource
#==, api_name, find, #initialize, #save!, to_create_request, to_do_request, to_get_request, #to_raw_tx, #to_signed_tx
Constructor Details
This class inherits a constructor from Counterparty::CounterResource
Instance Attribute Details
#asset ⇒ Object
asset (string): The asset being called back
268 269 270 |
# File 'lib/counterparty/resources.rb', line 268 def asset @asset end |
#block_index ⇒ Object
(integer): The block index (block number in the block chain)
251 252 253 |
# File 'lib/counterparty/resources.rb', line 251 def block_index @block_index end |
#fraction ⇒ Object
(integer): A floating point number greater than zero but less than or equal to 1, where 0% is for a callback of 0% of the balance of each of the asset’s holders, and 1 would be for a callback of 100%). For example, 0.56 would be 56%. Each holder of the called asset will be paid the call price for the asset, times the number of units of that asset that were called back from them.
259 260 261 |
# File 'lib/counterparty/resources.rb', line 259 def fraction @fraction end |
#of ⇒ Object
of the balance of each of the asset’s holders, and 1 would be for a callback of 100%). For example, 0.56 would be 56%. Each holder of the called asset will be paid the call price for the asset, times the number of units of that asset that were called back from them.
265 266 267 |
# File 'lib/counterparty/resources.rb', line 265 def of @of end |
#source ⇒ Object
(string): The source address of the call back (should be the current owner of the asset)
255 256 257 |
# File 'lib/counterparty/resources.rb', line 255 def source @source end |
#tx_hash ⇒ Object
(string): The transaction hash
248 249 250 |
# File 'lib/counterparty/resources.rb', line 248 def tx_hash @tx_hash end |
#tx_index ⇒ Object
(integer): The transaction index
245 246 247 |
# File 'lib/counterparty/resources.rb', line 245 def tx_index @tx_index end |
#validity ⇒ Object
(string): Set to “valid” if a valid send. Any other setting signifies an invalid/improper send
272 273 274 |
# File 'lib/counterparty/resources.rb', line 272 def validity @validity end |