Skip to main content

Architecture

The Wallet SDK allows you to create and connect wallets to your app. It allows you to easily integrate an existing wallet providers with thirdweb's Typescript, React, React Native, and Unity SDKs or create your own custom wallet connectors.

If you are working in React, React Native, or Unity, you can use the ConnectWallet component to connect & create wallets. The ConnectWallet component is a pre-built component which uses the Wallet SDK under the hood. If you'd like to connect wallets in a back-end environment, or if you'd like full control on how wallets are created or handled, you can use the Wallet SDK directly.

Using the Wallet SDK Directly

You can use the Wallet SDK directly in any environment that supports TypeScript. The Wallet SDK enables you to connect and create wallets which you can then use in your app to sign transactions as you usually would. There are two main instances in which you would use the Wallet SDK directly:

  1. Connecting wallets in a back-end environment such as Node.js script to sign transactions without passing a private key. Instead, a browser popup would be initiated to sign the transaction.

  2. In projects where you need low-level control of the wallet

  • Example: Needing to pass custom configuration options such as specifying a custom execute method for smartWallet e.g. in this template.

ConnectWallet

If you are in a React, React Native, or Unity environment, you can use the ConnectWallet component to connect & create wallets. This component is a pre-built component which uses the Wallet SDK under the hood and works out of the box!

ConnectWallet has a customizable UI and allows you to connect to any of the supported wallets in the Wallet SDK. Read the ConnectWallet documentation to learn more.