// Unity - InAppWallet
var iawOptions = new WalletOptions(
provider: WalletProvider.InAppWallet,
chainId: 421614,
inAppWalletOptions: new InAppWalletOptions(authprovider: AuthProvider.X)
);
var iaw = await ThirdwebManager.Instance.ConnectWallet(iawOptions) as InAppWallet;
// Unity - EcosystemWallet
var ecoOptions = new WalletOptions(
provider: WalletProvider.EcosystemWallet,
chainId: 421614,
ecosystemWalletOptions: new EcosystemWalletOptions(
ecosystemId: "ecosystem.the-bonfire",
authprovider: AuthProvider.X
)
);
var eco = await ThirdwebManager.Instance.ConnectWallet(ecoOptions) as EcosystemWallet;
// .NET - InAppWallet (Windows Console Example)
var inAppWalletOAuth = await InAppWallet.Create(
client: client,
authProvider: AuthProvider.X
);
if (!await inAppWalletOAuth.IsConnected())
{
_ = await inAppWalletOAuth.LoginWithOauth(
isMobile: false,
(url) =>
{
var psi = new ProcessStartInfo { FileName = url, UseShellExecute = true };
_ = Process.Start(psi);
},
);
}
var inAppWalletOAuthAddress = await inAppWalletOAuth.GetAddress();
Console.WriteLine($"InAppWallet OAuth address: {inAppWalletOAuthAddress}");
// .NET - EcosystemWallet (Windows Console Example)
var ecosystemWalletOAuth = await EcosystemWallet.Create(
ecosystemId: "ecosystem.the-bonfire",
client: client,
authProvider: AuthProvider.X
);
if (!await ecosystemWalletOAuth.IsConnected())
{
_ = await ecosystemWalletOAuth.LoginWithOauth(
isMobile: false,
(url) =>
{
var psi = new ProcessStartInfo { FileName = url, UseShellExecute = true };
_ = Process.Start(psi);
}
);
}
var ecosystemWalletOAuthAddress = await ecosystemWalletOAuth.GetAddress();
Console.WriteLine($"EcosystemWallet OAuth address: {ecosystemWalletOAuthAddress}");