tendermint/types/application.go

23 lines
556 B
Go
Raw Normal View History

2015-11-02 07:39:53 -08:00
package types
type Application interface {
// Return application info
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) (log string)
2015-11-27 10:14:46 -08:00
// Append a tx
AppendTx(tx []byte) (code CodeType, result []byte, log string)
2015-11-02 07:39:53 -08:00
// Validate a tx for the mempool
CheckTx(tx []byte) (code CodeType, result []byte, log string)
2015-11-02 07:39:53 -08:00
// Return the application Merkle root hash
2016-02-14 13:11:06 -08:00
Commit() (hash []byte, log string)
2016-01-18 14:37:42 -08:00
// Query for state
Query(query []byte) (code CodeType, result []byte, log string)
2015-11-02 07:39:53 -08:00
}