Skip to main content
Amino is the legacy signing format where the sign document is deterministic JSON rather than Protobuf binary. It is still required for Ledger hardware wallets and some older chains.

AminoMsg vs EncodeObject

An Amino message looks like:

StdSignDoc

The Amino sign document is a JSON object with sorted keys:
Signing flow:
  1. Build StdSignDoc with makeSignDoc()
  2. Sort all keys deterministically with sortedJsonStringify()
  3. Escape &, <, > characters
  4. Convert to UTF-8 bytes
  5. Hash with SHA-256 and sign

AminoTypes: Converting Between Formats

AminoTypes (from @cosmjs/stargate) bridges the two worlds. It converts EncodeObjectAminoMsg using registered converters:
Each converter defines the mapping between Protobuf and Amino representations:
When the signing client detects an Amino signer, it:
  1. Converts each EncodeObject to AminoMsg via aminoTypes.toAmino()
  2. Builds a StdSignDoc and signs it
  3. Converts the signed messages back via aminoTypes.fromAmino()
  4. Encodes the final transaction as Protobuf (even Amino-signed transactions are broadcast as Protobuf TxRaw)