You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.6 KiB

9 years ago
  1. # Tendermint Streaming Protocol (TMSP)
  2. **TMSP** is a socket protocol, which means applications can be written in any programming language.
  3. TMSP is an asynchronous streaming protocol: message responses are written back asynchronously to the platform.
  4. *Applications must be deterministic.*
  5. ## Message types
  6. #### AppendTx
  7. * __Arguments__:
  8. * `TxBytes ([]byte)`
  9. * __Returns__:
  10. * `RetCode (int8)`
  11. * __Usage__:<br/>
  12. Append and run a transaction. The transaction may or may not be final.
  13. #### GetHash
  14. * __Returns__:
  15. * `RetCode (int8)`
  16. * `Hash ([]byte)`
  17. * __Usage__:<br/>
  18. Return a Merkle root hash of the application state
  19. #### Commit
  20. * __Returns__:
  21. * `RetCode (int8)`
  22. * __Usage__:<br/>
  23. Finalize all appended transactions
  24. #### Rollback
  25. * __Returns__:
  26. * `RetCode (int8)`
  27. * __Usage__:<br/>
  28. Roll back to the last commit
  29. #### SetEventsMode
  30. * __Arguments__:
  31. * `EventsMode (int8)`:
  32. * `EventsModeOff (0)`: Events are not reported. Used for mempool.
  33. * `EventsModeCached (1)`: Events are cached.
  34. * `EventsModeOn (2)`: Flush cache and report events.
  35. * __Returns__:
  36. * `RetCode (int8)`
  37. * __Usage__:<br/>
  38. Set event reporting mode for future transactions
  39. #### AddListener
  40. * __Arguments__:
  41. * `EventKey (string)`
  42. * __Returns__:
  43. * `RetCode (int8)`
  44. * __Usage__:<br/>
  45. Add event listener callback for events with given key.
  46. #### RemoveListener
  47. * __Arguments__:
  48. * `EventKey (string)`
  49. * __Returns__:
  50. * `RetCode (int8)`
  51. * __Usage__:<br/>
  52. Remove event listener callback for events with given key.