Docs

WalletConnect

A wallet configurator for Wallet Connect which allows integrating the wallet with React Native

import { walletConnect } from "@thirdweb-dev/react-native";
const walletConnectConfig = walletConnect(options);

options

Usage with ConnectWallet

To allow users to connect to this wallet using the ConnectWallet component, you can add it to ThirdwebProvider's supportedWallets prop.

<ThirdwebProvider
supportedWallets={[walletConnect()]}
clientId="your-client-id"
>
<YourApp />
</ThirdwebProvider>;

Usage with useConnect

You can use the useConnect hook to programmatically connect to the wallet without using the ConnectWallet component.

The wallet also needs to be added in ThirdwebProvider's supportedWallets if you want the wallet to auto-connect on next page load.

const walletConnectConfig = walletConnect();
function App() {
const connect = useConnect();
const handleConnect = async () => {
await connect(walletConnectConfig, connectOptions);
};
return <div> ... </div>;
}

connectOptions

{ chainId?: number } | undefined