Skip to content

Commit

Permalink
[Portal] MAUI Template & Link Updates (#4929)
Browse files Browse the repository at this point in the history
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on enhancing the `.NET SDK Portal` and its documentation, updating package versions, and adding new features related to MAUI integration, while also improving the sidebar navigation.

### Detailed summary
- Added `.NET SDK Portal` link to the sidebar in `sidebar.tsx`.
- Updated `Thirdweb` package version from `1.0.0` to `2.4.0` in `page.mdx`.
- Added `MAUI Integration` link to the sidebar in `sidebar.tsx`.
- Updated reference link for `Full Reference` in `sidebar.tsx`.
- Introduced new content for MAUI integration in `page.mdx`.
- Enhanced documentation with new constants and functions in `utils/page.mdx`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
  • Loading branch information
0xFirekeeper committed Oct 5, 2024
1 parent 5c6f288 commit 11de1f3
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/portal/src/app/dotnet/godot/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To add the Thirdweb .NET SDK to your Godot project, you will need to manually ed
```xml
<ItemGroup>
<!-- Other NuGet package references -->
<PackageReference Include="Thirdweb" Version="1.0.0" />
<PackageReference Include="Thirdweb" Version="2.4.0" />
<!-- Update with the latest version when necessary -->
</ItemGroup>
```
Expand Down
32 changes: 32 additions & 0 deletions apps/portal/src/app/dotnet/maui/page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { OpenSourceCard, DocImage, createMetadata } from "@doc";

export const metadata = createMetadata({
title: "Thirdweb .NET SDK in MAUI",
description:
"A guide on how to integrate the Thirdweb .NET SDK into your MAUI projects to add blockchain functionality.",
});

# Integrating into MAUI Projects

Thirdweb's .NET SDK is fully compatible with .NET MAUI, allowing you to integrate wallets and blockchain functionality into your cross-platform applications.

## Configuration

### Adding the Package to Your Project

To add the Thirdweb .NET SDK to your MAUI project, you'll simply need to run:

```bash
dotnet add package Thirdweb
```

## Example Project

An example MAUI project integrating the Thirdweb .NET SDK is available below.

<OpenSourceCard
title="MAUI Template"
description="A MAUI project template with the Thirdweb .NET SDK integrated."
href="https://github.com/thirdweb-example/dotnet-maui"
isLibrary={false}
/>
6 changes: 5 additions & 1 deletion apps/portal/src/app/dotnet/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ export const sidebar: SideBar = {
name: "Unity Integration",
href: "/unity/v5",
},
{
name: "MAUI Integration",
href: "/dotnet/maui",
},
{
name: "Core",
isCollapsible: false,
Expand Down Expand Up @@ -287,7 +291,7 @@ export const sidebar: SideBar = {
{ separator: true },
{
name: "Full Reference",
href: "https://thirdweb-dev.github.io/thirdweb-dotnet/index.html",
href: "https://thirdweb-dev.github.io/dotnet/index.html",
},
],
};
100 changes: 99 additions & 1 deletion apps/portal/src/app/dotnet/utils/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,105 @@ Useful for passing the zero address to various functions.

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

Useful for passing the native token address to various functions.
Useful for passing the native token address (ETH or equivalent) to various functions.

## Constants.DECIMALS_18

A `double` representing the value `1000000000000000000`.

Useful for converting values between different decimal places.

## Constants.ENTRYPOINT_ADDRESS_V06

A `string` representing the entrypoint address for Account Abstraction 0.7.0 `0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789`.

## Constants.ENTRYPOINT_ADDRESS_V07

A `string` representing the entrypoint address for Account Abstraction 0.7.0 `0x0000000071727De22E5E9d8BAf0edAc6f37da032`.

## GetSocialProfiles

Fetches the social profiles for the given address or ENS using a Thirdweb client.

```csharp
var socialProfiles = await Utils.GetSocialProfiles(client, addressOrEns);
```

<Details summary="Parameters">

### client

A `ThirdwebClient` object representing the client to use for fetching social profiles.

### addressOrEns

A `string` representing the wallet address or ENS to fetch social profiles for.

</Details>

<Details summary="Return Value">

### socialProfiles

A `SocialProfiles` object containing the fetched social profiles.

</Details>

## GetENSFromAddress

Fetches the ENS name for the given address using a Thirdweb client.

```csharp
var ensName = await Utils.GetENSFromAddress(client, address);
```

<Details summary="Parameters">

### client

A `ThirdwebClient` object representing the client to use for fetching the ENS name.

### address

A `string` representing the wallet address to fetch the ENS name for.

</Details>

<Details summary="Return Value">

### ensName

A `string` representing the fetched ENS name.

</Details>

## GetAddressFromENS

Fetches the address for the given ENS name using a Thirdweb client.

```csharp
var address = await Utils.GetAddressFromENS(client, ensName);
```

<Details summary="Parameters">

### client

A `ThirdwebClient` object representing the client to use for fetching the address.

### ensName

A `string` representing the ENS name to fetch the address for.

</Details>

<Details summary="Return Value">

### address

A `string` representing the fetched address.

</Details>

## GetChainMetadata

Expand Down
9 changes: 9 additions & 0 deletions apps/portal/src/app/unity/v5/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ export const sidebar: SideBar = {
name: "Interacting with Contracts",
href: `${sdkSlug}/contracts`,
},
{ separator: true },
{
name: ".NET SDK Portal",
href: "/dotnet",
},
{
name: "Full Reference",
href: "https://thirdweb-dev.github.io/dotnet/index.html",
},
],
},
],
Expand Down

0 comments on commit 11de1f3

Please sign in to comment.