Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/portal/redirects.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ const reactNativeRedirects = {

const unityRedirects = {
// top level
"/unity": "/unity/v5",
"/unity": "/unity/v6",
// blocks
"/unity/blocks/getblock": "/unity/v4/blocks/getblock",
"/unity/blocks/getblockwithtransactions":
Expand Down
55 changes: 55 additions & 0 deletions apps/portal/src/app/dotnet/api/quickstart/page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import { Details, createMetadata } from "@doc";

export const metadata = createMetadata({
title: "ThirdwebApi | Thirdweb .NET SDK",
description:
"Low-level interaction with the Thirdweb API for enhanced SDK functionality and extensions.",
});

# [ThirdwebApi](/reference) .NET Integration
`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.

## What you unlock with ThirdwebApi

| Capability | Why teams use it |
| --- | --- |
| **Authentication** | Orchestrate SMS/email codes, SIWE, OAuth redirects, and passkeys from your own backend before handing off JWTs to wallets. |
| **Wallet services** | Look up user/server wallets, enumerate tokens/NFTs, stream transaction history, sign messages, or send value programmatically. |
| **Smart contracts** | Batch read/write invocations, fetch metadata & signatures, deploy bytecode, and capture emitted events with pagination. |
| **Transactions pipeline** | Queue, monitor, and introspect Engine-backed transactions with execution metadata and status tracking. |
| **Tokens & bridge** | Launch ERC20s, list circulating assets, price fiat ↔ crypto, or bridge/swap liquidity across chains. |
| **Payments & x402** | Spin up hosted purchases, reconcile payment history, and prepare X402 machine-payable requests. |
| **AI assistant** | Embed natural-language orchestration that can read state, prepare contract calls, swap assets, or route transactions for end-users.

> **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.

## When to reach for ThirdwebApi
- You need endpoints that aren't yet wrapped by the higher-level SDK helpers.
- You're building backend services that must authenticate with a Thirdweb secret key.
- You want full visibility into contract metadata, ABI definitions, and compilation artifacts.
- You plan to orchestrate auth, payments, or cross-chain flows without managing disparate providers.

## Quickstart workflow

### Instantiate an authenticated client
Create a reusable `ThirdwebClient` instance with your backend secret key. This unlocks every raw API surface exposed by Thirdweb.

```csharp
// Program.cs / dependency container registration
var client = ThirdwebClient.Create(secretKey: Environment.GetEnvironmentVariable("THIRDWEB_SECRET_KEY"));
```

### Example operation
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.

```csharp
// using Newtonsoft.Json;

var metadata = await client.Api.GetContractMetadataAsync(
chainId: 1,
address: "0xBd3531dA5CF5857e7CfAA92426877b022e612cf8"
);

Console.WriteLine($"ABI: {JsonConvert.SerializeObject(metadata.Result.Output.Abi, Formatting.Indented)}");
Console.WriteLine($"Compiler version: {metadata.Result.Compiler.Version}");
```
6 changes: 1 addition & 5 deletions apps/portal/src/app/dotnet/contracts/extensions/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,4 @@ var calldata = contract.CreateCallData("myFunction", param1, param2);

## Available Contract Extensions

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.

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.


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.
51 changes: 0 additions & 51 deletions apps/portal/src/app/dotnet/contracts/prepare/page.mdx

This file was deleted.

8 changes: 4 additions & 4 deletions apps/portal/src/app/dotnet/getting-started/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ Check the SDK documentation for more advanced features like interacting with sma
<Stack>

<ArticleIconCard
href="/dotnet/godot"
href="/unity"
icon={GraduationCap}
title="Godot Integration"
title="Unity Integration"
/>

<ArticleIconCard
href="/unity/v5"
href="/dotnet/godot"
icon={GraduationCap}
title="Unity Integration"
title="Godot Integration"
/>

</Stack>
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="2.4.0" />
<PackageReference Include="Thirdweb" Version="3.0.0" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Incorrect NuGet version reference

As of September 27, 2025, the latest published Thirdweb NuGet package is 2.25.1; 3.0.0 does not exist, so following this instruction will cause restore failures. Please revert to the actual version (or add guidance to check NuGet for the current release) before publishing. (nuget.org)

-  <PackageReference Include="Thirdweb" Version="3.0.0" />
+  <PackageReference Include="Thirdweb" Version="2.25.1" />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<PackageReference Include="Thirdweb" Version="3.0.0" />
<PackageReference Include="Thirdweb" Version="2.25.1" />
🤖 Prompt for AI Agents
In apps/portal/src/app/dotnet/godot/page.mdx around line 27 the PackageReference
pins a non-existent Thirdweb version "3.0.0", causing NuGet restore failures;
change the Version to the actual published package (e.g., "2.25.1") or replace
the hardcoded version with a note/instruction to check nuget.org for the current
release and update the PackageReference accordingly (prefer pinning a known-good
exact version for reproducible builds or adding guidance to fetch the latest
before publishing).

<!-- Update with the latest version when necessary -->
</ItemGroup>
```
Expand Down
98 changes: 0 additions & 98 deletions apps/portal/src/app/dotnet/insight/quickstart/page.mdx

This file was deleted.

100 changes: 0 additions & 100 deletions apps/portal/src/app/dotnet/nebula/quickstart/page.mdx

This file was deleted.

Loading
Loading