Skip to content
Merged

v3 #157

Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d19304d
Add social OAuth endpoint and update payments API
0xFirekeeper Sep 8, 2025
f096e7b
Remove User model and related code from EmbeddedWallet
0xFirekeeper Sep 8, 2025
bf6809e
Refactor RPC types and update namespace usage
0xFirekeeper Sep 8, 2025
88d44e4
Remove unused Nethereum import in ThirdwebBundler
0xFirekeeper Sep 8, 2025
7e89bb1
Remove Nethereum.RLP dependency and refactor RLP usage
0xFirekeeper Sep 8, 2025
4047d93
Refactor tests to use guest wallet instead of private key wallet
0xFirekeeper Sep 8, 2025
0bffbe3
Remove deprecated EngineWallet implementation
0xFirekeeper Sep 8, 2025
d81764e
Remove deprecated ThirdwebPay payment module
0xFirekeeper Sep 8, 2025
438e324
Remove Thirdweb AI and Indexer modules
0xFirekeeper Sep 8, 2025
13c7997
Remove commented Indexer and AI demo code
0xFirekeeper Sep 8, 2025
c15edc6
Remove Nebula AI tests and rename API client file
0xFirekeeper Sep 8, 2025
53eeaec
Remove unused exception and enum, refactor DataStorage
0xFirekeeper Sep 8, 2025
03a824c
Move EIP712 and RLP utilities to Utils folder
0xFirekeeper Sep 8, 2025
75c1f55
Refactor namespaces and consolidate type files
0xFirekeeper Sep 8, 2025
28a0b1c
Add Makefile and generator, update API client
0xFirekeeper Sep 24, 2025
6367923
Remove Thirdweb.Bridge and related constants
0xFirekeeper Sep 24, 2025
899a4f8
Update Makefile help text and remove generate-api alias
0xFirekeeper Sep 24, 2025
7ae8427
Remove marketplace extensions and update wallet flows
0xFirekeeper Sep 24, 2025
1c9894c
Comment out social auth example and remove marketplace tests
0xFirekeeper Sep 24, 2025
8c45dc2
Merge branch 'main' into v3
0xFirekeeper Sep 24, 2025
602e6eb
Update guest account logic and codecov ignore paths
0xFirekeeper Sep 24, 2025
cd1d59d
Make ThirdwebTransactionInput properties public and auto-implemented
0xFirekeeper Sep 24, 2025
098c1a6
Fix property backing fields in ThirdwebTransactionInput
0xFirekeeper Sep 24, 2025
9ef0d3d
Add extension methods for sending transactions
0xFirekeeper Sep 24, 2025
7123619
Fix missing await in LoginWithGuest call in tests
0xFirekeeper Sep 24, 2025
1c59cf3
Update Nethereum packages and remove AA silent revert tests
0xFirekeeper Sep 24, 2025
a816486
Refactor transaction input handling and remove ThirdwebApi
0xFirekeeper Sep 24, 2025
018ec19
Remove MinimalForwarder signature support
0xFirekeeper Sep 24, 2025
2edf6ef
Use cts.Token for delay in transaction polling
0xFirekeeper Sep 24, 2025
d2fc677
Update Program.cs
0xFirekeeper Sep 27, 2025
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 .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ root = true
###############################

# Exclude Thirdweb.Api generated files from all linting and formatting rules
[Thirdweb/Thirdweb.Api/GeneratedClient.cs]
[Thirdweb/Thirdweb.Api/ThirdwebApi.cs]
generated_code = true
dotnet_analyzer_diagnostic.severity = none
dotnet_style_qualification_for_field = false
Expand Down
184 changes: 184 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
# Thirdweb Makefile
# Cross-platform targets to mirror tw.bat functionality
# Requires: GNU Make, dotnet SDK, optional CSharpier

# Use bash for consistent behavior across platforms (Git Bash/MSYS2/WSL/macOS/Linux)
SHELL := bash
.SHELLFLAGS := -o pipefail -c

# Default target
.DEFAULT_GOAL := help

# Tools and paths
DOTNET := dotnet
API_CLIENT := Thirdweb/Thirdweb.Api/ThirdwebApi.cs
CONSOLE_PROJ := Thirdweb.Console
GENERATOR_PROJ := Thirdweb.Generator
LIB_PROJ := Thirdweb/Thirdweb.csproj

# Defaults for publishing/building
CONFIG ?= Release
TFM ?= netstandard2.1
RID ?=
OUT ?=

# Colors (best effort; will be empty if tput is unavailable)
C_RST := $(shell tput sgr0 2>/dev/null || echo "")
C_BOLD := $(shell tput bold 2>/dev/null || echo "")
C_DIM := $(shell tput dim 2>/dev/null || echo "")
C_RED := $(shell tput setaf 1 2>/dev/null || echo "")
C_GRN := $(shell tput setaf 2 2>/dev/null || echo "")
C_YEL := $(shell tput setaf 3 2>/dev/null || echo "")
C_BLU := $(shell tput setaf 4 2>/dev/null || echo "")
C_MAG := $(shell tput setaf 5 2>/dev/null || echo "")
C_CYN := $(shell tput setaf 6 2>/dev/null || echo "")

# Icons
IC_BUILD := BUILD
IC_CLEAN := CLEAN
IC_RESTORE := RESTORE
IC_TEST := TEST
IC_PACK := PACK
IC_RUN := RUN
IC_GEN := GEN
IC_INFO := INFO
IC_OK := OK
IC_WARN := WARN
IC_ERR := ERR
IC_FMT := FMT
IC_PUB := PUBLISH

hr = printf '$(C_DIM)%s$(C_RST)\n' '--------------------------------------------------------------------'
msg = printf '%s[%s]%s %s\n' '$(1)' '$(2)' '$(C_RST)' '$(3)'

.PHONY: help
help:
@printf '\n$(C_CYN)$(C_BOLD)%s$(C_RST)\n' 'Thirdweb Tools'
@$(hr)
@printf 'Usage: $(C_BOLD)make$(C_RST) $(C_CYN)[target]$(C_RST)\n\n'
@printf '$(C_BOLD)Targets:$(C_RST)\n'
@printf ' $(C_CYN)%-12s$(C_RST) - %s\n' 'build' 'Generate API and build the solution'
@printf ' $(C_CYN)%-12s$(C_RST) - %s\n' 'clean' 'Clean build artifacts'
@printf ' $(C_CYN)%-12s$(C_RST) - %s\n' 'restore' 'Restore NuGet packages'
@printf ' $(C_CYN)%-12s$(C_RST) - %s\n' 'test' 'Run tests'
@printf ' $(C_CYN)%-12s$(C_RST) - %s\n' 'pack' 'Generate API (if needed) and create NuGet package'
@printf ' $(C_CYN)%-12s$(C_RST) - %s\n' 'publish' 'Publish the Thirdweb project (dotnet publish)'
@printf ' $(C_CYN)%-12s$(C_RST) - %s\n' 'run' 'Run the console application'
@printf ' $(C_CYN)%-12s$(C_RST) - %s\n' 'generate' 'Generate API client from OpenAPI spec'
@printf ' $(C_CYN)%-12s$(C_RST) - %s\n' 'lint' 'Check code formatting (dry run)'
@printf ' $(C_CYN)%-12s$(C_RST) - %s\n' 'fix' 'Fix code formatting issues'
@printf ' $(C_CYN)%-12s$(C_RST) - %s\n' 'help' 'Show this help message'
@$(hr)

.PHONY: publish
# Publish the Thirdweb library project
# Usage examples:
# make publish # Release publish
# make publish CONFIG=Debug # Debug config
# make publish RID=win-x64 # Target runtime
# make publish OUT=artifacts/publish # Custom output dir
publish:
@if [ ! -f '$(API_CLIENT)' ]; then \
$(call msg,$(C_YEL),$(IC_WARN),API client not found, generating it first) ; \
$(MAKE) --no-print-directory generate ; \
fi
@$(call msg,$(C_BLU),$(IC_INFO),$(IC_PUB) Publishing Thirdweb project)
@CMD="$(DOTNET) publish '$(LIB_PROJ)' -c '$(CONFIG)' -f '$(TFM)'"; \
if [ -n "$(RID)" ]; then CMD="$$CMD -r '$(RID)'"; fi; \
if [ -n "$(OUT)" ]; then CMD="$$CMD -o '$(OUT)'"; fi; \
echo $$CMD; eval $$CMD && \
$(call msg,$(C_GRN),$(IC_OK),Publish succeeded) || \
$(call msg,$(C_RED),$(IC_ERR),Publish failed)

.PHONY: generate
# Clean previous file and generate API client
generate:
@$(call msg,$(C_BLU),$(IC_INFO),$(IC_GEN) Cleaning generated API files)
@rm -f '$(API_CLIENT)' 2>/dev/null || true
@$(call msg,$(C_BLU),$(IC_INFO),$(IC_GEN) Generating Thirdweb API client with custom generator)
@$(DOTNET) run --project '$(GENERATOR_PROJ)' --no-build >/dev/null 2>&1 \
|| ( \
$(call msg,$(C_MAG),>> ,Building generator) ; \
$(DOTNET) build '$(GENERATOR_PROJ)' ; \
$(call msg,$(C_MAG),>> ,Running generator) ; \
$(DOTNET) run --project '$(GENERATOR_PROJ)' \
)
@$(call msg,$(C_GRN),$(IC_OK),API client generation complete)

.PHONY: build
build:
@$(MAKE) --no-print-directory generate
@$(call msg,$(C_BLU),$(IC_INFO),$(IC_BUILD) Building with dotnet build)
@$(DOTNET) build && \
$(call msg,$(C_GRN),$(IC_OK),Build succeeded) || \
$(call msg,$(C_RED),$(IC_ERR),Build failed)

.PHONY: clean
clean:
@$(call msg,$(C_BLU),$(IC_INFO),$(IC_CLEAN) Cleaning with dotnet clean)
@$(DOTNET) clean && \
$(call msg,$(C_GRN),$(IC_OK),Clean completed) || \
$(call msg,$(C_RED),$(IC_ERR),Clean failed)

.PHONY: restore
restore:
@$(call msg,$(C_BLU),$(IC_INFO),$(IC_RESTORE) Restoring with dotnet restore)
@$(DOTNET) restore && \
$(call msg,$(C_GRN),$(IC_OK),Restore completed) || \
$(call msg,$(C_RED),$(IC_ERR),Restore failed)

.PHONY: test
test:
@$(call msg,$(C_BLU),$(IC_INFO),$(IC_TEST) Running dotnet test)
@$(DOTNET) test && \
$(call msg,$(C_GRN),$(IC_OK),All tests passed) || \
$(call msg,$(C_RED),$(IC_ERR),Some tests failed)

.PHONY: pack
pack:
@if [ ! -f '$(API_CLIENT)' ]; then \
$(call msg,$(C_YEL),$(IC_WARN),API client not found, generating it first) ; \
$(MAKE) --no-print-directory generate ; \
fi
@$(call msg,$(C_BLU),$(IC_INFO),$(IC_BUILD) Building Release)
@$(DOTNET) build --configuration Release || { $(call msg,$(C_RED),$(IC_ERR),Build (Release) failed); exit 1; }
@$(call msg,$(C_BLU),$(IC_INFO),$(IC_PACK) Packing NuGet package(s))
@$(DOTNET) pack --configuration Release && \
$(call msg,$(C_GRN),$(IC_OK),Pack completed) || \
$(call msg,$(C_RED),$(IC_ERR),Packing failed)

.PHONY: run
run:
@$(call msg,$(C_BLU),$(IC_INFO),$(IC_RUN) dotnet run --project $(CONSOLE_PROJ))
@$(DOTNET) run --project '$(CONSOLE_PROJ)' && \
$(call msg,$(C_GRN),$(IC_OK),Application exited) || \
$(call msg,$(C_RED),$(IC_ERR),Application exited with errors)

.PHONY: lint
lint:
@$(call msg,$(C_BLU),$(IC_INFO),$(IC_FMT) Checking code formatting with CSharpier)
@csharpier --help >/dev/null 2>&1 || { \
$(call msg,$(C_YEL),$(IC_WARN),CSharpier is not installed) ; \
printf ' Install it with: dotnet tool install -g csharpier\n' ; \
exit 0 ; \
}
@csharpier check . >/dev/null 2>&1 || { \
$(call msg,$(C_YEL),$(IC_WARN),Formatting issues found) ; \
printf ' Run "make fix" to automatically fix them.\n' ; \
exit 0 ; \
}
@$(call msg,$(C_GRN),$(IC_OK),Code formatting is correct)

.PHONY: fix
fix:
@$(call msg,$(C_BLU),$(IC_INFO),$(IC_FMT) Running CSharpier formatter)
@csharpier --help >/dev/null 2>&1 || { \
$(call msg,$(C_YEL),$(IC_WARN),CSharpier is not installed) ; \
printf ' Install it with: dotnet tool install -g csharpier\n' ; \
exit 0 ; \
}
@csharpier format . >/dev/null 2>&1 || { \
$(call msg,$(C_RED),$(IC_ERR),CSharpier formatting failed) ; \
exit 1 ; \
}
@$(call msg,$(C_GRN),$(IC_OK),Code formatting completed)
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,21 @@

The Thirdweb .NET SDK is a comprehensive and easy to use library that allows developers to interact with the blockchain using the .NET framework. It simplifies the integration of all [thirdweb](https://thirdweb.com/) functionality with a minimal set of dependencies.

## Features
## Core Features

- **Connect to any EVM network:** Easily connect to Ethereum and other EVM-compatible networks.
- **Query blockchain data:** Use Thirdweb RPC to fetch blockchain data efficiently.
- **Connect to any EVM network:** Easily connect to blockchain network with its chain id alone.
- **Interact with smart contracts:** Simplified read and write operations for smart contracts, with various out-of-the-box extensions provided.
- **In-App Wallets:** Integrate user-friendly wallets within your applications, supporting email, phone, and OAuth login.
- **In-App Wallets:** Integrate user-friendly wallets within your applications, supporting email, phone, OAuth login or plug your own auth in.
- **Ecosystem Wallets:** Basically In-App Wallets functionality wise, with the added benefit of being able to securely share your wallets with third party partners.
- **Account Abstraction:** Simplify complex account management tasks with smart wallets.
- **Gasless Transactions:** Enable transactions without requiring users to pay gas fees.
- **Storage Solutions:** Download and upload files using IPFS.
- **Account Abstraction:** Turn any wallet into a programmable smart wallet (EIP-4337 or EIP-7702) with built-in gas sponsorship and granular session key features.
- **Storage Solutions:** Download and upload files using IPFS or HTTPS.
- **Transaction Builder:** Create, manipulate and send low level transactions.
- **Session Keys:** Advanced control for smart wallets to manage permissions and session durations.
- **Thirdweb Bridge:** Universal interface to use any asset onchain.
- **Thirdweb Nebula:** Create blockchain-powered AI Agents.
- **Thirdweb Insight:** Query blockchain data at the speed of light.
- **Thirdweb Engine:** Interact in creative ways from your backend.
- **Unity Compatibility**: This SDK has been tested successfully in [Unity 2021.3+](https://portal.thirdweb.com/unity/v5) (Standalone, Mobile and WebGL).
- **Unity Compatibility**: This SDK has been tested successfully in [Unity 2022.3+](https://portal.thirdweb.com/unity/v5) (All build targets).
- **Godot Compatibility**: This SDK has been tested successfully in [Godot .NET](https://portal.thirdweb.com/dotnet/godot)
- **MAUI Compatibility**: This SDK has been tested successfully in [MAUI](https://portal.thirdweb.com/dotnet/maui)

Expand Down
Loading
Loading