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.

22 lines
554 B

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. package types
  2. type Application interface {
  3. // Return application info
  4. Info() (info string)
  5. // Set application option (e.g. mode=mempool, mode=consensus)
  6. SetOption(key string, value string) (log string)
  7. // Append a tx
  8. AppendTx(tx []byte) (code RetCode, result []byte, log string)
  9. // Validate a tx for the mempool
  10. CheckTx(tx []byte) (code RetCode, result []byte, log string)
  11. // Return the application Merkle root hash
  12. GetHash() (hash []byte, log string)
  13. // Query for state
  14. Query(query []byte) (code RetCode, result []byte, log string)
  15. }