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.

28 lines
561 B

9 years ago
9 years ago
9 years ago
9 years ago
  1. package types
  2. type Application interface {
  3. // Echo a message
  4. Echo(message string) string
  5. // Return application info
  6. Info() []string
  7. // Set application option (e.g. mode=mempool, mode=consensus)
  8. SetOption(key string, value string) RetCode
  9. // Append a tx
  10. AppendTx(tx []byte) ([]Event, RetCode)
  11. // Validate a tx for the mempool
  12. CheckTx(tx []byte) RetCode
  13. // Return the application Merkle root hash
  14. GetHash() ([]byte, RetCode)
  15. // Add event listener
  16. AddListener(key string) RetCode
  17. // Remove event listener
  18. RemListener(key string) RetCode
  19. }