Skip to main content
In browser environments, users typically sign transactions through a wallet extension like Keplr, Leap, or Cosmostation. These extensions inject a global object (e.g. window.keplr) that can produce an OfflineSigner for any supported chain.

Basic Integration

The key insight: once you have an OfflineSigner, the rest of the code is identical whether the keys come from a mnemonic, Keplr, Leap, or a Ledger device. This is the power of the OfflineSigner abstraction.

Choosing the Signing Mode

Keplr and similar wallets offer multiple signer variants:
For most applications, getOfflineSigner is the right choice. It synchronously returns a signer that implements both OfflineDirectSigner and OfflineAminoSigner. Use getOfflineSignerAuto when you need async auto-detection — it returns Promise<OfflineSigner> and automatically selects Amino for Ledger-based accounts.

Detecting the Extension

Wallet extensions need a moment to inject their global object. A common pattern:

Suggesting a Chain

If the user’s wallet doesn’t know about your chain yet, you can suggest it: