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, bitcoin, find, #initialize, #save!, to_create_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
287 288 289 |
# File 'lib/counterparty/resources.rb', line 287 def asset @asset end |
#block_index ⇒ Object
(integer): The block index (block number in the block chain)
270 271 272 |
# File 'lib/counterparty/resources.rb', line 270 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.
278 279 280 |
# File 'lib/counterparty/resources.rb', line 278 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.
284 285 286 |
# File 'lib/counterparty/resources.rb', line 284 def of @of end |
#source ⇒ Object
(string): The source address of the call back (should be the current owner of the asset)
274 275 276 |
# File 'lib/counterparty/resources.rb', line 274 def source @source end |
#tx_hash ⇒ Object
(string): The transaction hash
267 268 269 |
# File 'lib/counterparty/resources.rb', line 267 def tx_hash @tx_hash end |
#tx_index ⇒ Object
(integer): The transaction index
264 265 266 |
# File 'lib/counterparty/resources.rb', line 264 def tx_index @tx_index end |
#validity ⇒ Object
(string): Set to “valid” if a valid send. Any other setting signifies an invalid/improper send
291 292 293 |
# File 'lib/counterparty/resources.rb', line 291 def validity @validity end |