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, 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

#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.



571
572
573
# File 'lib/counterparty/resources.rb', line 571

def bindings
  @bindings
end

#block_indexObject

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



558
559
560
# File 'lib/counterparty/resources.rb', line 558

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).



563
564
565
# File 'lib/counterparty/resources.rb', line 563

def category
  @category
end

#commandObject

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



567
568
569
# File 'lib/counterparty/resources.rb', line 567

def command
  @command
end

#message_indexObject

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



554
555
556
# File 'lib/counterparty/resources.rb', line 554

def message_index
  @message_index
end