Skip to content

Commit 2c84ac4

Browse files
authored
[Portal] .NET v3 & Unity v6 Documentation (#8140)
1 parent 5ee449f commit 2c84ac4

File tree

36 files changed

+1845
-1508
lines changed

36 files changed

+1845
-1508
lines changed

apps/portal/redirects.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ const reactNativeRedirects = {
414414

415415
const unityRedirects = {
416416
// top level
417-
"/unity": "/unity/v5",
417+
"/unity": "/unity/v6",
418418
// blocks
419419
"/unity/blocks/getblock": "/unity/v4/blocks/getblock",
420420
"/unity/blocks/getblockwithtransactions":
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import { Details, createMetadata } from "@doc";
2+
3+
export const metadata = createMetadata({
4+
title: "ThirdwebApi | Thirdweb .NET SDK",
5+
description:
6+
"Low-level interaction with the Thirdweb API for enhanced SDK functionality and extensions.",
7+
});
8+
9+
# [ThirdwebApi](/reference) .NET Integration
10+
`ThirdwebApi` is the low-level HTTP client that powers the higher-level Thirdweb .NET SDK. Reach for it when you need to call https://api.thirdweb.com directly, build custom extensions, or inspect raw API payloads. The client works everywhere .NET runs, including Unity and MAUI.
11+
12+
## What you unlock with ThirdwebApi
13+
14+
| Capability | Why teams use it |
15+
| --- | --- |
16+
| **Authentication** | Orchestrate SMS/email codes, SIWE, OAuth redirects, and passkeys from your own backend before handing off JWTs to wallets. |
17+
| **Wallet services** | Look up user/server wallets, enumerate tokens/NFTs, stream transaction history, sign messages, or send value programmatically. |
18+
| **Smart contracts** | Batch read/write invocations, fetch metadata & signatures, deploy bytecode, and capture emitted events with pagination. |
19+
| **Transactions pipeline** | Queue, monitor, and introspect Engine-backed transactions with execution metadata and status tracking. |
20+
| **Tokens & bridge** | Launch ERC20s, list circulating assets, price fiat ↔ crypto, or bridge/swap liquidity across chains. |
21+
| **Payments & x402** | Spin up hosted purchases, reconcile payment history, and prepare X402 machine-payable requests. |
22+
| **AI assistant** | Embed natural-language orchestration that can read state, prepare contract calls, swap assets, or route transactions for end-users.
23+
24+
> **Backend first** — All of the above accept your project secret via `x-secret-key`. Client-side use cases can opt into `x-client-id` + user JWT flows where supported.
25+
26+
## When to reach for ThirdwebApi
27+
- You need endpoints that aren't yet wrapped by the higher-level SDK helpers.
28+
- You're building backend services that must authenticate with a Thirdweb secret key.
29+
- You want full visibility into contract metadata, ABI definitions, and compilation artifacts.
30+
- You plan to orchestrate auth, payments, or cross-chain flows without managing disparate providers.
31+
32+
## Quickstart workflow
33+
34+
### Instantiate an authenticated client
35+
Create a reusable `ThirdwebClient` instance with your backend secret key. This unlocks every raw API surface exposed by Thirdweb.
36+
37+
```csharp
38+
// Program.cs / dependency container registration
39+
var client = ThirdwebClient.Create(secretKey: Environment.GetEnvironmentVariable("THIRDWEB_SECRET_KEY"));
40+
```
41+
42+
### Example operation
43+
Contract metadata is the canonical example for low-level reads. The same pattern applies to other namespaces like `/v1/wallets/*`, `/v1/payments/*`, or `/ai/chat`—swap the method call but keep your authenticated client.
44+
45+
```csharp
46+
// using Newtonsoft.Json;
47+
48+
var metadata = await client.Api.GetContractMetadataAsync(
49+
chainId: 1,
50+
address: "0xBd3531dA5CF5857e7CfAA92426877b022e612cf8"
51+
);
52+
53+
Console.WriteLine($"ABI: {JsonConvert.SerializeObject(metadata.Result.Output.Abi, Formatting.Indented)}");
54+
Console.WriteLine($"Compiler version: {metadata.Result.Compiler.Version}");
55+
```

apps/portal/src/app/dotnet/contracts/extensions/page.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,4 @@ var calldata = contract.CreateCallData("myFunction", param1, param2);
3636

3737
## Available Contract Extensions
3838

39-
Please refer to the `ThirdwebExtensions` [full reference](https://thirdweb-dev.github.io/dotnet/docs/Thirdweb.ThirdwebExtensions.html) for a complete list of available contract extensions.
40-
41-
If you are using our [Marketplace](https://thirdweb.com/thirdweb.eth/MarketplaceV3) contract, check out our [Marketplace-specific](https://thirdweb-dev.github.io/dotnet/docs/Thirdweb.ThirdwebMarketplaceExtensions.html) extensions.
42-
43-
39+
Please refer to the `ThirdwebExtensions` [full reference](https://thirdweb-dev.github.io/dotnet/docs/Thirdweb.ThirdwebExtensions.html) for a complete list of available contract extensions.

apps/portal/src/app/dotnet/contracts/prepare/page.mdx

Lines changed: 0 additions & 51 deletions
This file was deleted.

apps/portal/src/app/dotnet/getting-started/page.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ Check the SDK documentation for more advanced features like interacting with sma
7777
<Stack>
7878

7979
<ArticleIconCard
80-
href="/dotnet/godot"
80+
href="/unity"
8181
icon={GraduationCap}
82-
title="Godot Integration"
82+
title="Unity Integration"
8383
/>
8484

8585
<ArticleIconCard
86-
href="/unity/v5"
86+
href="/dotnet/godot"
8787
icon={GraduationCap}
88-
title="Unity Integration"
88+
title="Godot Integration"
8989
/>
9090

9191
</Stack>

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="2.4.0" />
27+
<PackageReference Include="Thirdweb" Version="3.0.0" />
2828
<!-- Update with the latest version when necessary -->
2929
</ItemGroup>
3030
```

apps/portal/src/app/dotnet/insight/quickstart/page.mdx

Lines changed: 0 additions & 98 deletions
This file was deleted.

apps/portal/src/app/dotnet/nebula/quickstart/page.mdx

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)