# Pre-requisite Readings
Every Cosmos SDK application exposes a global
codec to marshal/unmarshal structs and interfaces in order to store and/or transfer them. As of now, the
codec used in the Cosmos SDK is go-amino (opens new window), which possesses the following important properties:
- Interface support.
- Deterministic encoding of value (which is required considering that blockchains are deterministic replicated state-machines).
- Upgradeable schemas.
Alternatively, it is possible to use
MustUnmarshalBinaryLengthPrefixed instead of
MustUnmarshalBinaryBare for the same encoding prefixed by a
uvarint encoding of the object to encode.
Another important use of the
codec is the encoding and decoding of transactions. Transactions are defined at the Cosmos SDK level, but passed to the underlying consensus engine in order to be relayed to other peers. Since the underlying consensus engine is agnostic to the application, it only accepts transactions in the form of
byte. The encoding is done by an object called
TxEncoder and the decoding by an object called
A standard implementation of both these objects can be found in the
auth module (opens new window):
Learn about events