2015-11-02 07:39:53 -08:00
|
|
|
package types
|
|
|
|
|
|
|
|
type Application interface {
|
|
|
|
|
2015-11-09 16:29:45 -08:00
|
|
|
// Return application info
|
2016-01-25 08:01:18 -08:00
|
|
|
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)
|
2016-01-25 08:01:18 -08:00
|
|
|
SetOption(key string, value string) (log string)
|
2015-11-27 10:14:46 -08:00
|
|
|
|
2016-01-08 16:52:02 -08:00
|
|
|
// Append a tx
|
2016-01-31 20:39:43 -08:00
|
|
|
AppendTx(tx []byte) (code CodeType, result []byte, log string)
|
2015-11-02 07:39:53 -08:00
|
|
|
|
2016-01-08 16:52:02 -08:00
|
|
|
// Validate a tx for the mempool
|
2016-01-31 20:39:43 -08:00
|
|
|
CheckTx(tx []byte) (code CodeType, result []byte, log string)
|
2016-01-08 16:52:02 -08:00
|
|
|
|
2015-11-02 07:39:53 -08:00
|
|
|
// Return the application Merkle root hash
|
2016-01-25 08:01:18 -08:00
|
|
|
GetHash() (hash []byte, log string)
|
2016-01-18 14:37:42 -08:00
|
|
|
|
|
|
|
// Query for state
|
2016-01-31 20:39:43 -08:00
|
|
|
Query(query []byte) (code CodeType, result []byte, log string)
|
2015-11-02 07:39:53 -08:00
|
|
|
}
|