Terra Connect
Early accessDeep links
On a phone, your dApp can open Terra Wallet directly with your WalletConnect pairing, instead of showing a QR code the user cannot scan. This works today with the Terra Wallet app.
Pair: open Terra Wallet with a WalletConnect URI#
Your WalletConnect library gives you a pairing URI that starts with wc: (the same text a QR code holds). URL-encode it and open:
terrawallet://wc?uri=<encodeURIComponent(wc: URI)>In React Native:
TSX
import { Linking } from "react-native"; export async function openTerraWallet(wcUri: string) { await Linking.openURL(`terrawallet://wc?uri=${encodeURIComponent(wcUri)}`);}The app also opens raw wc: links, so a generic "open in wallet" button reaches Terra Wallet when it is the user's chosen handler for wc:.
Wake: bring Terra Wallet forward for a request#
After pairing, when your dApp sends a signing request, bring the wallet to the foreground so the user sees it:
Text
terrawallet://wc?requestId=<id>&sessionTopic=<topic>terrawallet:// on its own also just opens the wallet.
Returning to your dApp#
Terra Wallet's WalletConnect metadata sets its redirect to the native scheme terrawallet://. To bring users back to your dApp after they approve, set your own metadata.redirect (for example { native: "yourapp://" }) in your WalletConnect setup.
Notes#
- Only WalletConnect v2 URIs are accepted. A v1 URI shows an "older WalletConnect code" message.
- Expired pairings are refused with a message asking for a new code.
- The app does not handle
httpsapp links, so use theterrawallet://scheme. Rawwc:URIs andhttps://terrawallet.us/wc?uri=...are also recognised when a user scans them inside Terra Wallet. - A deep link only opens the pairing screen. The user still reviews and approves the connection.