@@ -215,6 +215,9 @@ public abstract class ThirdwebManagerBase : MonoBehaviour
215215 [ field: SerializeField ]
216216 protected List < RpcOverride > RpcOverrides { get ; set ; } = null ;
217217
218+ [ field: SerializeField ]
219+ protected List < string > SiweExternalForcedWalletIds { get ; set ; } = null ;
220+
218221 public ThirdwebClient Client { get ; protected set ; }
219222 public IThirdwebWallet ActiveWallet { get ; protected set ; }
220223 public bool Initialized { get ; protected set ; }
@@ -286,6 +289,10 @@ public virtual async void Initialize()
286289 Initialized = true ;
287290 }
288291
292+ // ------------------------------------------------------
293+ // Contract Methods
294+ // ------------------------------------------------------
295+
289296 public virtual async Task < ThirdwebContract > GetContract ( string address , BigInteger chainId , string abi = null )
290297 {
291298 if ( ! Initialized )
@@ -296,6 +303,10 @@ public virtual async Task<ThirdwebContract> GetContract(string address, BigInteg
296303 return await ThirdwebContract . Create ( Client , address , chainId , abi ) ;
297304 }
298305
306+ // ------------------------------------------------------
307+ // Active Wallet Methods
308+ // ------------------------------------------------------
309+
299310 public virtual IThirdwebWallet GetActiveWallet ( )
300311 {
301312 return ActiveWallet ;
@@ -331,6 +342,10 @@ public virtual void RemoveWallet(string address)
331342 }
332343 }
333344
345+ // ------------------------------------------------------
346+ // Connection Methods
347+ // ------------------------------------------------------
348+
334349 public virtual async Task < IThirdwebWallet > ConnectWallet ( WalletOptions walletOptions )
335350 {
336351 if ( walletOptions == null )
@@ -420,11 +435,20 @@ public virtual async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOpt
420435 _ = await inAppWallet . LoginWithAuthEndpoint ( walletOptions . InAppWalletOptions . JwtOrPayload ) ;
421436 break ;
422437 case AuthProvider . Guest :
423- _ = await inAppWallet . LoginWithGuest ( ) ;
438+ _ = await inAppWallet . LoginWithGuest ( SystemInfo . deviceUniqueIdentifier ) ;
424439 break ;
425440 case AuthProvider . Backend :
426441 _ = await inAppWallet . LoginWithBackend ( ) ;
427442 break ;
443+ case AuthProvider . SiweExternal :
444+ _ = await inAppWallet . LoginWithSiweExternal (
445+ isMobile : Application . isMobilePlatform ,
446+ browserOpenAction : ( url ) => Application . OpenURL ( url ) ,
447+ forceWalletIds : SiweExternalForcedWalletIds == null || SiweExternalForcedWalletIds . Count == 0 ? null : SiweExternalForcedWalletIds ,
448+ mobileRedirectScheme : MobileRedirectScheme ,
449+ browser : new CrossPlatformUnityBrowser ( RedirectPageHtmlOverride )
450+ ) ;
451+ break ;
428452 default :
429453 _ = await inAppWallet . LoginWithOauth (
430454 isMobile : Application . isMobilePlatform ,
@@ -458,11 +482,20 @@ public virtual async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOpt
458482 _ = await ecosystemWallet . LoginWithAuthEndpoint ( walletOptions . EcosystemWalletOptions . JwtOrPayload ) ;
459483 break ;
460484 case AuthProvider . Guest :
461- _ = await ecosystemWallet . LoginWithGuest ( ) ;
485+ _ = await ecosystemWallet . LoginWithGuest ( SystemInfo . deviceUniqueIdentifier ) ;
462486 break ;
463487 case AuthProvider . Backend :
464488 _ = await ecosystemWallet . LoginWithBackend ( ) ;
465489 break ;
490+ case AuthProvider . SiweExternal :
491+ _ = await ecosystemWallet . LoginWithSiweExternal (
492+ isMobile : Application . isMobilePlatform ,
493+ browserOpenAction : ( url ) => Application . OpenURL ( url ) ,
494+ forceWalletIds : SiweExternalForcedWalletIds == null || SiweExternalForcedWalletIds . Count == 0 ? null : SiweExternalForcedWalletIds ,
495+ mobileRedirectScheme : MobileRedirectScheme ,
496+ browser : new CrossPlatformUnityBrowser ( RedirectPageHtmlOverride )
497+ ) ;
498+ break ;
466499 default :
467500 _ = await ecosystemWallet . LoginWithOauth (
468501 isMobile : Application . isMobilePlatform ,
0 commit comments