Docs

.NET/Unity - AA 0.7 Support & Enhanced APIs

Firekeeper

What's Changed

Support for Account Abstraction 0.7.0 (EntryPoint 0.7.0)

You may now opt to use our new Account Factories that are built on top of the 0.7.0 ERC-4337 standard release, by passing Constants.ENTRYPOINT_ADDRESS_V07 as your entryPoint parameter in SmartWallet.Create or through the ThirdwebManager's ConnectWallet function. Note that we will continue supporting AA 0.6.0 - so no rush.

Among various other things, this unlocks:

  • Improved gas costs when interacting with Smart Wallets due to packed UserOp structs and more changes.
  • Improved gas limit estimations and faster simulation.
  • Token Paymasters - though not live on 0.7 until a little later, the API has been exposed to pass a TokenPaymaster (enum) when creating a Smart Wallet and choose which ERC20 you want users to pay gas with. This is an alternative to the default gasless flow where you sponsor gas for your users.

We've also added support for Abstract Testnet's native account abstraction (ZkSync-based chain).

Authentication

The new API for authenticating with your backend through SIWE in a single call looks like this now.

public static async Task<T> Authenticate<T>(
this IThirdwebWallet wallet,
string domain,
BigInteger chainId,
string authPayloadPath = "/auth/payload",
string authLoginPath = "/auth/login",
string authPayloadMethod = "GET",
string authLoginMethod = "POST",
bool separatePayloadAndSignatureInBody = false,
IThirdwebHttpClient httpClientOverride = null
)

We've made it a little more flexible so you can hopefully get rid of any custom authentication code you might have and use this helper instead to unlock backend thirdweb auth with any wallet easily.

We've also fixed an issue with some older variants of Smart Wallet factories which resulted in "Invalid SIgnature" being thrown upon personal signing (and by extension, authenticating).

API Improvements

  • Low Level - Added IThirdwebWallet.ExecuteTransaction support for external and smart wallets to execute raw low level transaction input rather than going through ThirdwebTransaction.
  • Low Level - Simplified the ThirdwebTransactionInput by adding a constructor with user friendly types.
  • Mid Level - Added ThirdwebTransaction.Prepare, allowing you to have a quick way to estimate, simulate and populate a transaction without sending it.
  • High Level - Deprecated Utils.FetchThirdwebChainAsync, please use Utils.GetChainMetadata as the former will be removed in a future version.

General Improvements

  • Stricter coding standards were implemented, making sure the core won't fail you regardless of which .NET version or platform you're on.
  • Improved performance and stability across the board.
  • Various minor bugfixes were implemented and a couple properties were renamed to improve DX.

.NET Docs: https://portal.thirdweb.com/dotnet
Unity v5 Docs: https://portal.thirdweb.com/unity/v5

.NET Nuget: https://www.nuget.org/packages/Thirdweb
Unity Release: https://github.com/thirdweb-dev/unity-sdk/releases/tag/v5.0.0-beta.4