Skip to main content

Overview

Cosmos SDK chains use the secp256k1 elliptic curve — the same as Ethereum. You recover the compressed public key from the EVM wallet, then derive bech32-encoded addresses. The same key works across all Cosmos chains by changing the bech32 prefix (e.g., cosmos for Cosmos Hub).

Dependencies

Add to pubspec.yaml:

Derive Address

Recover the compressed secp256k1 public key from the EVM wallet, then compute RIPEMD-160(SHA-256(pubkey)) and bech32-encode. Public key recovery is done once per session using EIP-191 signing:
Cache the compressedPubkey — key recovery only needs to happen once per session.

Sign a Message

Cosmos message signing uses the Amino sign/MsgSignData format:

Sign a Transaction

Build an Amino JSON sign document, sign the SHA-256 hash, normalize to low-S, then encode in Protobuf for broadcasting:
For full Protobuf transaction serialization and broadcasting, see the flutter-multichain-demo cosmos.dart.

Check Balance

Last modified on March 28, 2026