This guide covers the breaking changes introduced when migrating from the pre‑1.0 Unity SDK to v1.0.Documentation Index
Fetch the complete documentation index at: https://docs.privy.io/llms.txt
Use this file to discover all available pages before exploring further.
Initialization and readiness
What changed
PrivyManager.Initialize(...)now returns anIPrivyinstance immediately and begins initialization in the background.- v1.0 removes the
PrivyManager.AwaitReady()method. - The SDK now ensures readiness when your app calls
GetAuthState()orGetUser().
Migration
Old (pre‑1.0):IPrivy API changes (user and auth access)
User access
- v1.0 removes the
Userproperty. - Your app should call
await privy.GetUser()instead.
Auth state
- v1.0 removes the
AuthStateproperty. - Your app should call
await privy.GetAuthState()instead.
Auth state change callback
- v1.0 removes the
SetAuthStateChangeCallback(...)method. - Your app should subscribe to the
AuthStateChangedevent instead.
Namespace and type relocations
Many public types now live in more specific namespaces to reduce collisions and improve discoverability.| Old namespace | New namespace | Notes |
|---|---|---|
Privy | Privy.Core | IPrivy, PrivyManager |
Privy | Privy.Config | PrivyConfig |
Privy | Privy.Auth / Privy.Auth.Models | Auth APIs, IPrivyUser, AuthState |
Privy | Privy.Wallets | Embedded wallet APIs |
Privy | Privy.Utils | Exceptions, logging, utilities |
Embedded wallet API changes
Wallet collection property
- v1.0 renames
EmbeddedWalletstoEmbeddedEthereumWallets(the old name is now marked[Obsolete]).
Wallet creation methods
| Old | New |
|---|---|
CreateWallet(...) | CreateEthereumWallet(...) |
CreateWalletAtHdIndex(...) | CreateEthereumWalletAtHdIndex(...) |
| (new) | CreateSolanaWallet(...) |
RPC provider interface
- v1.0 removes
IRpcProvider. - Your app should use
IEmbeddedEthereumWalletProvider(inPrivy.Wallets) instead.
Example (signing a message)
Old:Exception type changes
v1.0 refactors the exception hierarchy and moves exceptions toPrivy.Utils.
| Old | New |
|---|---|
PrivyException.AuthenticationException | PrivyAuthenticationException |
PrivyException.EmbeddedWalletException | PrivyWalletException |
Configuration object changes
PrivyConfig now uses auto-properties and lives in Privy.Config.
Old:
Quick migration checklist
- Update
usingstatements to reference the new namespaces (e.g.Privy.Core,Privy.Auth,Privy.Wallets,Privy.Utils). - Replace
await PrivyManager.AwaitReady()withawait PrivyManager.Instance.GetAuthState()orawait PrivyManager.Instance.GetUser(). - Replace
PrivyManager.Instance.Userwithawait PrivyManager.Instance.GetUser(). - Replace
SetAuthStateChangeCallback(...)withAuthStateChanged += .... - Replace embedded wallet API calls using
CreateWallet/EmbeddedWalletswithCreateEthereumWallet/EmbeddedEthereumWallets(and optionallyCreateSolanaWallet). - Update exception handling to catch
PrivyAuthenticationExceptionandPrivyWalletException.
For compilation errors after upgrading, search for old types in the project (e.g.
IPrivyManager,
IRpcProvider, PrivyException.AuthenticationException) and update them as described above. See
the Unity SDK setup guide and the Unity
changelog for additional reference.
