cosmos-sdk/types/codec.go
Jae Kwon ba2b4f0f21 WIP: refactor
Refactor

* No more decorators, but rather types.AntiHandler
* No more handlers, but rather types.MsgHandler
* Ability to pass "stores" in NewXYZHandler()
* Coins live in types, and Accounts have coins
* Coinstore -> bank
2018-01-12 19:17:17 -08:00

15 lines
271 B
Go

package types
// A generic codec for a fixed type.
type Codec interface {
// Returns a prototype (empty) object.
Prototype() interface{}
// Encodes the object.
Encode(o interface{}) ([]byte, error)
// Decodes an object.
Decode(bz []byte) (interface{}, error)
}