@@ -215,6 +215,9 @@ public abstract class ThirdwebManagerBase : MonoBehaviour
215
215
[ field: SerializeField ]
216
216
protected List < RpcOverride > RpcOverrides { get ; set ; } = null ;
217
217
218
+ [ field: SerializeField ]
219
+ protected List < string > SiweExternalForcedWalletIds { get ; set ; } = null ;
220
+
218
221
public ThirdwebClient Client { get ; protected set ; }
219
222
public IThirdwebWallet ActiveWallet { get ; protected set ; }
220
223
public bool Initialized { get ; protected set ; }
@@ -286,6 +289,10 @@ public virtual async void Initialize()
286
289
Initialized = true ;
287
290
}
288
291
292
+ // ------------------------------------------------------
293
+ // Contract Methods
294
+ // ------------------------------------------------------
295
+
289
296
public virtual async Task < ThirdwebContract > GetContract ( string address , BigInteger chainId , string abi = null )
290
297
{
291
298
if ( ! Initialized )
@@ -296,6 +303,10 @@ public virtual async Task<ThirdwebContract> GetContract(string address, BigInteg
296
303
return await ThirdwebContract . Create ( Client , address , chainId , abi ) ;
297
304
}
298
305
306
+ // ------------------------------------------------------
307
+ // Active Wallet Methods
308
+ // ------------------------------------------------------
309
+
299
310
public virtual IThirdwebWallet GetActiveWallet ( )
300
311
{
301
312
return ActiveWallet ;
@@ -331,6 +342,10 @@ public virtual void RemoveWallet(string address)
331
342
}
332
343
}
333
344
345
+ // ------------------------------------------------------
346
+ // Connection Methods
347
+ // ------------------------------------------------------
348
+
334
349
public virtual async Task < IThirdwebWallet > ConnectWallet ( WalletOptions walletOptions )
335
350
{
336
351
if ( walletOptions == null )
@@ -420,11 +435,20 @@ public virtual async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOpt
420
435
_ = await inAppWallet . LoginWithAuthEndpoint ( walletOptions . InAppWalletOptions . JwtOrPayload ) ;
421
436
break ;
422
437
case AuthProvider . Guest :
423
- _ = await inAppWallet . LoginWithGuest ( ) ;
438
+ _ = await inAppWallet . LoginWithGuest ( SystemInfo . deviceUniqueIdentifier ) ;
424
439
break ;
425
440
case AuthProvider . Backend :
426
441
_ = await inAppWallet . LoginWithBackend ( ) ;
427
442
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 ;
428
452
default :
429
453
_ = await inAppWallet . LoginWithOauth (
430
454
isMobile : Application . isMobilePlatform ,
@@ -458,11 +482,20 @@ public virtual async Task<IThirdwebWallet> ConnectWallet(WalletOptions walletOpt
458
482
_ = await ecosystemWallet . LoginWithAuthEndpoint ( walletOptions . EcosystemWalletOptions . JwtOrPayload ) ;
459
483
break ;
460
484
case AuthProvider . Guest :
461
- _ = await ecosystemWallet . LoginWithGuest ( ) ;
485
+ _ = await ecosystemWallet . LoginWithGuest ( SystemInfo . deviceUniqueIdentifier ) ;
462
486
break ;
463
487
case AuthProvider . Backend :
464
488
_ = await ecosystemWallet . LoginWithBackend ( ) ;
465
489
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 ;
466
499
default :
467
500
_ = await ecosystemWallet . LoginWithOauth (
468
501
isMobile : Application . isMobilePlatform ,
0 commit comments