Prerequisites
- Proto Signer
- Amino Signer
Use the Proto signer for transaction operations like sending tokens, staking, and IBC transfers.
Install
@getpara/cosmjs-v0-integration is a separate package — install it alongside @getpara/react-native-wallet.Usage
- Hook (React)
- Direct (Non-React)
Use the hook to create a CosmJS
OfflineDirectSigner for your user’s Para embedded wallet or external wallet. The hook wraps signAndBroadcast in a React Query mutation.Wallet Resolution
When noaddress or walletId is passed, the hook resolves the wallet in this order:- Selected wallet — if the user selected a Cosmos wallet in the UI. If there is only one Cosmos wallet in the session, it is already selected by default
- First Cosmos wallet — the first available Cosmos wallet on the account
Metro Configuration
@cosmjs/crypto depends on libsodium-wrappers-sumo, a WASM-based cryptography library that is incompatible with React Native. Since Para handles signing server-side via MPC, this library is not needed at runtime. However, Metro will still bundle it and crash when the WASM module loads.
To fix this, stub out the module in your metro.config.js using a custom resolveRequest:
metro.config.js
lib/empty-module.js