Docs

WalletConnect

Prompt users to connect to your app with their WalletConnect-compatible wallet.

Usage

using Thirdweb;

public async void ConnectWallet()
{
    // Reference to your Thirdweb SDK
    var sdk = ThirdwebManager.Instance.SDK;

    // Configure the connection
    var connection = new WalletConnection(
      provider: WalletProvider.WalletConnect,     // The wallet provider you want to connect to (Required)
      chainId: 1                                  // The chain you want to connect to (Required)
    );

    // Connect the wallet
    string address = await sdk.wallet.Connect(connection);
}

Behavior

WebGL

Displays the WalletConnect modal with recommended wallets.

Standalone

Instantiates the customizable WalletProvider_WalletConnect UI prefab, displaying a QR code and deep link button. Scan the QR code with your Metamask mobile app to connect.

Mobile

Instantiates the customizable WalletProvider_WalletConnect UI prefab, displaying a QR code and deep link button. Click the deep link button to connect to your Metamask mobile app.

Miscellaneous

You may customize the WalletProvider_WalletConnect prefab to fit your app's design. The prefab is located at Assets/Thirdweb/Core/Prefabs and referenced in the ThirdwebManager prefab.

Additional Options

You may set the your WalletConnect Project ID (all platforms) and explorer recommended wallet ids (WebGL only) in the ThirdwebManager prefab.