Class: Counterparty::Message

Inherits:
CounterResource show all
Defined in:
lib/counterparty/resources.rb

Overview

An object that describes a specific event in the counterpartyd message feed (which can be used by 3rd party applications to track state changes to the counterpartyd database on a block-by-block basis).

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

#bindingsObject

(string): A JSON-encoded object containing the message data. The properties in this object match the columns in the table referred to by category.



590
591
592
# File 'lib/counterparty/resources.rb', line 590

def bindings
  @bindings
end

#block_indexObject

(integer): The block index (block number in the block chain) this event occurred on



577
578
579
# File 'lib/counterparty/resources.rb', line 577

def block_index
  @block_index
end

#categoryObject

(string): A string denoting the entity that the message relates to, e.g. “credits”, “burns”, “debits”. The category matches the relevant table name in counterpartyd (see blocks.py for more info).



582
583
584
# File 'lib/counterparty/resources.rb', line 582

def category
  @category
end

#commandObject

(string): The operation done to the table noted in category. This is either “insert”, or “update”.



586
587
588
# File 'lib/counterparty/resources.rb', line 586

def command
  @command
end

#message_indexObject

(integer): The message index (i.e. transaction index)



573
574
575
# File 'lib/counterparty/resources.rb', line 573

def message_index
  @message_index
end