Go to file
Jae Kwon 7b1ebb9245 Update README.md 2015-12-03 15:47:20 -08:00
cmd Change server listener addr to 0.0.0.0 2015-12-02 00:25:39 -08:00
example Change port 8080 to 46658 2015-12-01 15:27:50 -08:00
server interactive tmsp console 2015-11-30 20:56:36 -05:00
types Refactor Application to Application & AppContext 2015-11-29 14:22:30 -08:00
.gitignore Add .gitignore file 2015-11-27 09:57:08 -08:00
LICENSE.md Add Apache2.0 license 2015-11-27 08:51:49 -08:00
README.md Update README.md 2015-12-03 15:47:20 -08:00
test.sh tmsp batch and some tests 2015-12-01 01:49:54 -05:00

README.md

Tendermint Socket Protocol (TMSP)

TMSP is a socket protocol, which means applications can be written in any programming language. TMSP is an asynchronous protocol: message responses are written back asynchronously to the platform.

Applications must be deterministic.

Message types

AppendTx

  • Arguments:
    • TxBytes ([]byte)
  • Returns:
    • RetCode (int8)
  • Usage:
    Append and run a transaction. The transaction may or may not be final.

GetHash

  • Returns:
    • RetCode (int8)
    • Hash ([]byte)
  • Usage:
    Return a Merkle root hash of the application state

Commit

  • Returns:
    • RetCode (int8)
  • Usage:
    Finalize all appended transactions

Rollback

  • Returns:
    • RetCode (int8)
  • Usage:
    Roll back to the last commit

AddListener

  • Arguments:
    • EventKey (string)
  • Returns:
    • RetCode (int8)
  • Usage:
    Add event listener callback for events with given key.

RemoveListener

  • Arguments:
    • EventKey (string)
  • Returns:
    • RetCode (int8)
  • Usage:
    Remove event listener callback for events with given key.

Flush

  • Usage:
    Flush the response queue. Applications that implement types.Application need not implement this message -- it's handled by the project.

Info

  • Returns:
    • Data ([]string)
  • Usage:
    Return an array of strings about the application state. Application specific.

SetOption

  • Arguments:
    • Key (string)
    • Value (string)
  • Returns:
    • RetCode (int8)
  • Usage:
    Set application options. E.g. Key="mode", Value="mempool" for a mempool connection, or Key="mode", Value="consensus" for a consensus connection. Other options are application specific.