This is a .NET MAUI application that integrates with Thirdweb’s .NET SDK to interact with blockchain wallets and smart contracts. This project demonstrates in-app wallet login and fetching wallet addresses using Google, Discord, and Telegram.
9dcf10afe69ea4f90039cd448cb7cd7d.mp4
- .NET SDK 8.0 or higher (Install .NET SDK)
- Visual Studio 2022 with the following workloads:
- .NET Multi-platform App UI development (MAUI)
- Windows App SDK (for Windows-specific features)
- Windows SDK version 10.0.19041.0 or later (Download Windows SDK)
- Thirdweb .NET SDK version 2.4.0 or later
-
Clone the repository:
git clone https://github.com/thirdweb-dev/dotnet-maui.git cd dotnet-maui
-
Install .NET dependencies:
Run the following command to restore the required .NET dependencies:
dotnet restore
-
Set up Thirdweb Client:
Ensure that you have your Thirdweb Client ID in place. Open
MainPage.xaml.cs
and set your Client ID for the Thirdweb client.client = ThirdwebClient.Create( clientId: "your-client-id", // Replace with your actual Thirdweb client ID bundleId: "com.thirdweb.maui" // Replace with your bundle id, if building to android also set it as a schema );
- Open the solution in Visual Studio 2022.
- Select the target platform (Windows, Android, iOS, etc.) depending on your development environment.
- Run the project by pressing
F5
or using theRun
button in Visual Studio.
To run the project from the command line for Windows:
dotnet build -f net8.0-windows10.0.19041.0 -c Debug -p:PublishReadyToRun=true -p:WindowsPackageType=None
dotnet run -f net8.0-windows10.0.19041.0 -c Debug -p:PublishReadyToRun=true -p:WindowsPackageType=None
- Login with Google, Discord, and Telegram via in-app wallets using Thirdweb SDK.
- Fetch and display wallet address with link to Arbiscan for verification.
- Ensure you have the correct versions of .NET, Visual Studio, and the Windows SDK installed.
- If the app fails to start, check for missing dependencies or SDKs. You may need to install the Windows App SDK or update your
.csproj
file to reference the correct version. - If you encounter
TypeInitializationException
, ensure the WindowsAppSDK is installed and updated.