Skip to content

Commit 9c17bf1

Browse files
committed
[Portal] MAUI Template & Link Updates
1 parent 5c6f288 commit 9c17bf1

File tree

5 files changed

+155
-3
lines changed

5 files changed

+155
-3
lines changed

apps/portal/src/app/dotnet/godot/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To add the Thirdweb .NET SDK to your Godot project, you will need to manually ed
2424
```xml
2525
<ItemGroup>
2626
<!-- Other NuGet package references -->
27-
<PackageReference Include="Thirdweb" Version="1.0.0" />
27+
<PackageReference Include="Thirdweb" Version="2.4.0" />
2828
<!-- Update with the latest version when necessary -->
2929
</ItemGroup>
3030
```
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { OpenSourceCard, DocImage, createMetadata } from "@doc";
2+
3+
export const metadata = createMetadata({
4+
title: "Thirdweb .NET SDK in MAUI",
5+
description:
6+
"A guide on how to integrate the Thirdweb .NET SDK into your MAUI projects to add blockchain functionality.",
7+
});
8+
9+
# Integrating into MAUI Projects
10+
11+
To integrate the Thirdweb .NET SDK into your MAUI projects, you will need to add the Thirdweb SDK package directly to your MAUI project's `.csproj` file. This enables you to use the SDK's functionalities within your MAUI application, allowing for blockchain interactions such as connecting to user's wallets, interacting with smart contracts, and more.
12+
13+
## Configuration
14+
15+
### Adding the Package to Your Project
16+
17+
To add the Thirdweb .NET SDK to your MAUI project, you will need to manually edit your project's `.csproj` file to include the Thirdweb NuGet package as a dependency. Here is how you can do it:
18+
19+
1. Close your MAUI project if it's open in the MAUI editor.
20+
2. Locate your project's `.csproj` file in your project directory.
21+
3. Open the `.csproj` file in a text editor.
22+
4. Add the following `PackageReference` inside the `<ItemGroup>` tag that contains other `PackageReference` entries:
23+
24+
```xml
25+
<ItemGroup>
26+
<!-- Other NuGet package references -->
27+
<PackageReference Include="Thirdweb" Version="2.4.0" />
28+
<!-- Update with the latest version when necessary -->
29+
</ItemGroup>
30+
```
31+
32+
## Example Project
33+
34+
An example MAUI project integrating the Thirdweb .NET SDK is available below.
35+
36+
<OpenSourceCard
37+
title="MAUI Template"
38+
description="A MAUI project template with the Thirdweb .NET SDK integrated."
39+
href="https://github.com/thirdweb-example/dotnet-maui"
40+
isLibrary={false}
41+
/>

apps/portal/src/app/dotnet/sidebar.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ export const sidebar: SideBar = {
252252
name: "Unity Integration",
253253
href: "/unity/v5",
254254
},
255+
{
256+
name: "MAUI Integration",
257+
href: "/dotnet/maui",
258+
},
255259
{
256260
name: "Core",
257261
isCollapsible: false,
@@ -287,7 +291,7 @@ export const sidebar: SideBar = {
287291
{ separator: true },
288292
{
289293
name: "Full Reference",
290-
href: "https://thirdweb-dev.github.io/thirdweb-dotnet/index.html",
294+
href: "https://thirdweb-dev.github.io/dotnet/index.html",
291295
},
292296
],
293297
};

apps/portal/src/app/dotnet/utils/page.mdx

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,105 @@ Useful for passing the zero address to various functions.
1515

1616
A `string` representing the native token address `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`.
1717

18-
Useful for passing the native token address to various functions.
18+
Useful for passing the native token address (ETH or equivalent) to various functions.
19+
20+
## Constants.DECIMALS_18
21+
22+
A `double` representing the value `1000000000000000000`.
23+
24+
Useful for converting values between different decimal places.
25+
26+
## Constants.ENTRYPOINT_ADDRESS_V06
27+
28+
A `string` representing the entrypoint address for Account Abstraction 0.7.0 `0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789`.
29+
30+
## Constants.ENTRYPOINT_ADDRESS_V07
31+
32+
A `string` representing the entrypoint address for Account Abstraction 0.7.0 `0x0000000071727De22E5E9d8BAf0edAc6f37da032`.
33+
34+
## GetSocialProfiles
35+
36+
Fetches the social profiles for the given address or ENS using a Thirdweb client.
37+
38+
```csharp
39+
var socialProfiles = await Utils.GetSocialProfiles(client, addressOrEns);
40+
```
41+
42+
<Details summary="Parameters">
43+
44+
### client
45+
46+
A `ThirdwebClient` object representing the client to use for fetching social profiles.
47+
48+
### addressOrEns
49+
50+
A `string` representing the wallet address or ENS to fetch social profiles for.
51+
52+
</Details>
53+
54+
<Details summary="Return Value">
55+
56+
### socialProfiles
57+
58+
A `SocialProfiles` object containing the fetched social profiles.
59+
60+
</Details>
61+
62+
## GetENSFromAddress
63+
64+
Fetches the ENS name for the given address using a Thirdweb client.
65+
66+
```csharp
67+
var ensName = await Utils.GetENSFromAddress(client, address);
68+
```
69+
70+
<Details summary="Parameters">
71+
72+
### client
73+
74+
A `ThirdwebClient` object representing the client to use for fetching the ENS name.
75+
76+
### address
77+
78+
A `string` representing the wallet address to fetch the ENS name for.
79+
80+
</Details>
81+
82+
<Details summary="Return Value">
83+
84+
### ensName
85+
86+
A `string` representing the fetched ENS name.
87+
88+
</Details>
89+
90+
## GetAddressFromENS
91+
92+
Fetches the address for the given ENS name using a Thirdweb client.
93+
94+
```csharp
95+
var address = await Utils.GetAddressFromENS(client, ensName);
96+
```
97+
98+
<Details summary="Parameters">
99+
100+
### client
101+
102+
A `ThirdwebClient` object representing the client to use for fetching the address.
103+
104+
### ensName
105+
106+
A `string` representing the ENS name to fetch the address for.
107+
108+
</Details>
109+
110+
<Details summary="Return Value">
111+
112+
### address
113+
114+
A `string` representing the fetched address.
115+
116+
</Details>
19117

20118
## GetChainMetadata
21119

apps/portal/src/app/unity/v5/sidebar.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@ export const sidebar: SideBar = {
7979
name: "Interacting with Contracts",
8080
href: `${sdkSlug}/contracts`,
8181
},
82+
{ separator: true },
83+
{
84+
name: ".NET SDK Portal",
85+
href: "/dotnet",
86+
},
87+
{
88+
name: "Full Reference",
89+
href: "https://thirdweb-dev.github.io/dotnet/index.html",
90+
},
8291
],
8392
},
8493
],

0 commit comments

Comments
 (0)