tendermint/types/application.go

29 lines
561 B
Go
Raw Normal View History

2015-11-02 07:39:53 -08:00
package types
type Application interface {
// Echo a message
Echo(message string) string
// Return application info
Info() []string
2015-11-02 07:39:53 -08:00
2015-11-27 10:14:46 -08:00
// Set application option (e.g. mode=mempool, mode=consensus)
SetOption(key string, value string) RetCode
// Append a tx
AppendTx(tx []byte) ([]Event, RetCode)
2015-11-02 07:39:53 -08:00
// Validate a tx for the mempool
CheckTx(tx []byte) RetCode
2015-11-02 07:39:53 -08:00
// Return the application Merkle root hash
GetHash() ([]byte, RetCode)
// Add event listener
AddListener(key string) RetCode
// Remove event listener
RemListener(key string) RetCode
}