-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ecosystem Wallet Linking & Guest Login (#65)
- Loading branch information
1 parent
fd38705
commit 5f9b5c2
Showing
10 changed files
with
367 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,20 +74,14 @@ | |
|
||
#region Ecosystem Wallet | ||
|
||
// var ecosystemWallet = await EcosystemWallet.Create(client: client, ecosystemId: "ecosystem.the-bonfire", authProvider: AuthProvider.Google); | ||
// var ecosystemWallet = await EcosystemWallet.Create(client: client, ecosystemId: "ecosystem.the-bonfire", email: "[email protected]"); | ||
|
||
// if (!await ecosystemWallet.IsConnected()) | ||
// { | ||
// _ = await ecosystemWallet.LoginWithOauth( | ||
// isMobile: false, | ||
// (url) => | ||
// { | ||
// var psi = new ProcessStartInfo { FileName = url, UseShellExecute = true }; | ||
// _ = Process.Start(psi); | ||
// }, | ||
// "thirdweb://", | ||
// new InAppWalletBrowser() | ||
// ); | ||
// _ = await ecosystemWallet.SendOTP(); | ||
// Console.WriteLine("Enter OTP:"); | ||
// var otp = Console.ReadLine(); | ||
// _ = await ecosystemWallet.LoginWithOtp(otp: otp); | ||
// } | ||
// var ecosystemWalletAddress = await ecosystemWallet.GetAddress(); | ||
// Console.WriteLine($"Ecosystem Wallet address: {ecosystemWalletAddress}"); | ||
|
@@ -103,6 +97,11 @@ | |
// ); | ||
// Console.WriteLine($"Ecosystem Wallet typed sign: {ecosystemTypedSignature}"); | ||
|
||
// var siweSigner = await PrivateKeyWallet.Generate(client: client); | ||
// var ecosystemWalletOther = await EcosystemWallet.Create(client: client, ecosystemId: "ecosystem.the-bonfire", authProvider: AuthProvider.Siwe, siweSigner: siweSigner); | ||
// var linkedAccounts = await ecosystemWallet.LinkAccount(walletToLink: ecosystemWalletOther, chainId: 421614); | ||
// Console.WriteLine($"Linked accounts: {JsonConvert.SerializeObject(linkedAccounts, Formatting.Indented)}"); | ||
|
||
// var ecosystemSmartWallet = await SmartWallet.Create(ecosystemWallet, 421614); | ||
|
||
// var ecosystemTx = await ThirdwebTransaction.Create(wallet: ecosystemSmartWallet, txInput: new ThirdwebTransactionInput(chainId: 421614, to: await ecosystemWallet.GetAddress())); | ||
|
@@ -166,6 +165,29 @@ | |
|
||
#endregion | ||
|
||
#region Guest Login | ||
|
||
// var guestWallet = await EcosystemWallet.Create(ecosystemId: "ecosystem.the-bonfire", client: client, authProvider: AuthProvider.Guest); | ||
// if (!await guestWallet.IsConnected()) | ||
// { | ||
// _ = await guestWallet.LoginWithGuest(); | ||
// } | ||
// var address = await guestWallet.GetAddress(); | ||
// Console.WriteLine($"Guest address: {address}"); | ||
|
||
// var oldLinkedAccounts = await guestWallet.GetLinkedAccounts(); | ||
// Console.WriteLine($"Old linked accounts: {JsonConvert.SerializeObject(oldLinkedAccounts, Formatting.Indented)}"); | ||
|
||
// var emailWalletFresh = await EcosystemWallet.Create(ecosystemId: "ecosystem.the-bonfire", client: client, email: "[email protected]"); | ||
// _ = await emailWalletFresh.SendOTP(); | ||
// Console.WriteLine("Enter OTP:"); | ||
// var otp = Console.ReadLine(); | ||
|
||
// var linkedAccounts = await guestWallet.LinkAccount(walletToLink: emailWalletFresh, otp: otp); | ||
// Console.WriteLine($"Linked accounts: {JsonConvert.SerializeObject(linkedAccounts, Formatting.Indented)}"); | ||
|
||
#endregion | ||
|
||
#region Account Linking | ||
|
||
// var inAppWalletMain = await InAppWallet.Create(client: client, authProvider: AuthProvider.Google); | ||
|
Oops, something went wrong.