Skip to main content
Wallets like Keplr and Leap use Amino JSON signing (SIGN_MODE_LEGACY_AMINO_JSON) by default. If your custom module needs to support these wallets, you must provide Amino converters that translate between protobuf field names (camelCase) and Amino field names (snake_case).

Defining Converters

An AminoConverter maps a protobuf type URL to its Amino type string and provides toAmino/fromAmino transform functions:
Each converter has three parts:
The aminoType string must match exactly what the chain’s x/ module registers on the server side. A mismatch causes signature verification failures. Check your module’s Go source for the registered Amino type name.

Handling Type Conversions

Amino JSON uses different representations for some types. Common conversions you’ll encounter: Example with multiple type conversions:

Passing Converters to the Signing Client

Merge your custom converters with the defaults using AminoTypes:
The client automatically selects the signing mode based on the wallet:
  • OfflineDirectSigner (e.g. DirectSecp256k1HdWallet) uses SIGN_MODE_DIRECT — protobuf encoding, Amino converters not needed
  • OfflineAminoSigner (e.g. Secp256k1HdWallet, Keplr, Leap) uses SIGN_MODE_LEGACY_AMINO_JSON — requires Amino converters for all message types in the transaction
If you only use DirectSecp256k1HdWallet and never need Keplr/Leap support, you can skip Amino converters entirely. But adding them makes your code compatible with all Cosmos wallets.

Next Steps

Custom Protobuf Types

Register the protobuf types that your Amino converters translate.

Custom Modules

See a complete module integration that ties types, queries, and Amino converters together.

Direct vs Amino Signing

Understand how the two signing modes work and when each is used.