Class: Counterparty::Callback

Inherits:
CounterResource show all
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

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

#assetObject

asset (string): The asset being called back



287
288
289
# File 'lib/counterparty/resources.rb', line 287

def asset
  @asset
end

#block_indexObject

(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

#fractionObject

(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

#ofObject

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

#sourceObject

(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_hashObject

(string): The transaction hash



267
268
269
# File 'lib/counterparty/resources.rb', line 267

def tx_hash
  @tx_hash
end

#tx_indexObject

(integer): The transaction index



264
265
266
# File 'lib/counterparty/resources.rb', line 264

def tx_index
  @tx_index
end

#validityObject

(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