Signing overview
Every app integration follows the same pipeline:
Never embed mnemonics in production apps. Use Cosmos Kit, SecureStore (mobile), or hardware keys.
- Web (CosmJS)
- React Native
- Flutter (CosmJS)
import { SigningStargateClient, assertIsDeliverTxSuccess } from '@cosmjs/stargate';
const client = await SigningStargateClient.connectWithSigner(RPC, offlineSigner, {
gasPrice: { denom: 'usaf', amount: '0.05' },
});
const result = await client.signAndBroadcast(address, [msg], 'auto');
assertIsDeliverTxSuccess(result);
With Cosmos Kit, offlineSigner comes from getOfflineSigner(chainId).
Same CosmJS APIs. Load mnemonic from expo-secure-store only in self-custody wallets; prefer WalletConnect for external signers.
const result = await client.signAndBroadcast(address, [msg], 'auto');
assertIsDeliverTxSuccess(result);
import { SigningStargateClient, assertIsDeliverTxSuccess } from '@cosmjs/stargate';
const client = await SigningStargateClient.connectWithSigner(RPC, offlineSigner, {
gasPrice: { denom: 'usaf', amount: '0.05' },
});
const result = await client.signAndBroadcast(address, [msg], 'auto');
assertIsDeliverTxSuccess(result);
Same CosmJS APIs as web and React Native. For Keplr / Leap Mobile, use Cosmos Kit WalletConnect.
Signer sources
| Path | When |
|---|---|
| Cosmos Kit | Browser dApp or mobile via WalletConnect |
CosmJS DirectSecp256k1HdWallet | RN, Flutter (JS bridge), scripts, dev only |
safrochaind tx | Debugging, CI, operators |
Advanced authorization
| Feature | Infra docs |
|---|---|
| Fee grants (sponsor gas) | CLI tx, feegrant module |
| Authz (delegate msgs) | CLI tx, authz module |
| FeePay sponsored txs | feepay module |