@@ -55,7 +55,6 @@ public class EcosystemWalletOptions
5555 public string PhoneNumber ;
5656 public AuthProvider AuthProvider ;
5757 public string JwtOrPayload ;
58- public string EncryptionKey ;
5958 public string StorageDirectoryPath ;
6059 public IThirdwebWallet SiweSigner ;
6160
@@ -66,7 +65,6 @@ public EcosystemWalletOptions(
6665 string phoneNumber = null ,
6766 AuthProvider authprovider = AuthProvider . Default ,
6867 string jwtOrPayload = null ,
69- string encryptionKey = null ,
7068 string storageDirectoryPath = null ,
7169 IThirdwebWallet siweSigner = null
7270 )
@@ -77,7 +75,6 @@ public EcosystemWalletOptions(
7775 PhoneNumber = phoneNumber ;
7876 AuthProvider = authprovider ;
7977 JwtOrPayload = jwtOrPayload ;
80- EncryptionKey = encryptionKey ;
8178 StorageDirectoryPath = storageDirectoryPath ?? Path . Combine ( Application . persistentDataPath , "Thirdweb" , "EcosystemWallet" ) ;
8279 SiweSigner = siweSigner ;
8380 }
@@ -154,7 +151,7 @@ public class ThirdwebManager : MonoBehaviour
154151 [ field: SerializeField ]
155152 private bool OptOutUsageAnalytics { get ; set ; } = false ;
156153
157- [ field: SerializeField , Header ( "Wallet Settings" ) ]
154+ [ field: SerializeField , Header ( "WalletConnect Settings" ) ]
158155 private ulong [ ] SupportedChains { get ; set ; } = new ulong [ ] { 421614 } ;
159156
160157 public ThirdwebClient Client { get ; private set ; }
@@ -305,9 +302,9 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
305302 {
306303 throw new ArgumentException ( "EcosystemWalletOptions must be provided for EcosystemWallet provider." ) ;
307304 }
308- if ( string . IsNullOrEmpty ( walletOptions . EcosystemWalletOptions . EcosystemId ) || string . IsNullOrEmpty ( walletOptions . EcosystemWalletOptions . EcosystemPartnerId ) )
305+ if ( string . IsNullOrEmpty ( walletOptions . EcosystemWalletOptions . EcosystemId ) )
309306 {
310- throw new ArgumentException ( "EcosystemId and EcosystemPartnerId must be provided for EcosystemWallet provider." ) ;
307+ throw new ArgumentException ( "EcosystemId must be provided for EcosystemWallet provider." ) ;
311308 }
312309 wallet = await EcosystemWallet . Create (
313310 client : Client ,
@@ -343,6 +340,14 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
343340 {
344341 _ = await inAppWallet . LoginWithSiwe ( walletOptions . ChainId ) ;
345342 }
343+ else if ( walletOptions . InAppWalletOptions . AuthProvider == AuthProvider . JWT )
344+ {
345+ _ = await inAppWallet . LoginWithJWT ( walletOptions . InAppWalletOptions . JwtOrPayload , walletOptions . InAppWalletOptions . EncryptionKey ) ;
346+ }
347+ else if ( walletOptions . InAppWalletOptions . AuthProvider == AuthProvider . AuthEndpoint )
348+ {
349+ _ = await inAppWallet . LoginWithAuthEndpoint ( walletOptions . InAppWalletOptions . JwtOrPayload , walletOptions . InAppWalletOptions . EncryptionKey ) ;
350+ }
346351 else
347352 {
348353 _ = await inAppWallet . LoginWithOauth (
@@ -369,6 +374,14 @@ public async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOptions)
369374 {
370375 _ = await ecosystemWallet . LoginWithSiwe ( walletOptions . ChainId ) ;
371376 }
377+ else if ( walletOptions . EcosystemWalletOptions . AuthProvider == AuthProvider . JWT )
378+ {
379+ _ = await ecosystemWallet . LoginWithJWT ( walletOptions . EcosystemWalletOptions . JwtOrPayload ) ;
380+ }
381+ else if ( walletOptions . EcosystemWalletOptions . AuthProvider == AuthProvider . AuthEndpoint )
382+ {
383+ _ = await ecosystemWallet . LoginWithAuthEndpoint ( walletOptions . EcosystemWalletOptions . JwtOrPayload ) ;
384+ }
372385 else
373386 {
374387 _ = await ecosystemWallet . LoginWithOauth (
0 commit comments