|
74 | 74 |
|
75 | 75 | #region Ecosystem Wallet
|
76 | 76 |
|
77 |
| -// var ecosystemWallet = await EcosystemWallet.Create(client: client, ecosystemId: "ecosystem.the-bonfire", authProvider: AuthProvider.Google); |
| 77 | +// var ecosystemWallet = await EcosystemWallet.Create(client: client, ecosystemId: "ecosystem.the-bonfire", email: "firekeeper+linkeco@thirdweb.com"); |
78 | 78 |
|
79 | 79 | // if (!await ecosystemWallet.IsConnected())
|
80 | 80 | // {
|
81 |
| -// _ = await ecosystemWallet.LoginWithOauth( |
82 |
| -// isMobile: false, |
83 |
| -// (url) => |
84 |
| -// { |
85 |
| -// var psi = new ProcessStartInfo { FileName = url, UseShellExecute = true }; |
86 |
| -// _ = Process.Start(psi); |
87 |
| -// }, |
88 |
| -// "thirdweb://", |
89 |
| -// new InAppWalletBrowser() |
90 |
| -// ); |
| 81 | +// _ = await ecosystemWallet.SendOTP(); |
| 82 | +// Console.WriteLine("Enter OTP:"); |
| 83 | +// var otp = Console.ReadLine(); |
| 84 | +// _ = await ecosystemWallet.LoginWithOtp(otp: otp); |
91 | 85 | // }
|
92 | 86 | // var ecosystemWalletAddress = await ecosystemWallet.GetAddress();
|
93 | 87 | // Console.WriteLine($"Ecosystem Wallet address: {ecosystemWalletAddress}");
|
|
103 | 97 | // );
|
104 | 98 | // Console.WriteLine($"Ecosystem Wallet typed sign: {ecosystemTypedSignature}");
|
105 | 99 |
|
| 100 | +// var siweSigner = await PrivateKeyWallet.Generate(client: client); |
| 101 | +// var ecosystemWalletOther = await EcosystemWallet.Create(client: client, ecosystemId: "ecosystem.the-bonfire", authProvider: AuthProvider.Siwe, siweSigner: siweSigner); |
| 102 | +// var linkedAccounts = await ecosystemWallet.LinkAccount(walletToLink: ecosystemWalletOther, chainId: 421614); |
| 103 | +// Console.WriteLine($"Linked accounts: {JsonConvert.SerializeObject(linkedAccounts, Formatting.Indented)}"); |
| 104 | + |
106 | 105 | // var ecosystemSmartWallet = await SmartWallet.Create(ecosystemWallet, 421614);
|
107 | 106 |
|
108 | 107 | // var ecosystemTx = await ThirdwebTransaction.Create(wallet: ecosystemSmartWallet, txInput: new ThirdwebTransactionInput(chainId: 421614, to: await ecosystemWallet.GetAddress()));
|
|
166 | 165 |
|
167 | 166 | #endregion
|
168 | 167 |
|
| 168 | +#region Guest Login |
| 169 | + |
| 170 | +// var guestWallet = await EcosystemWallet.Create(ecosystemId: "ecosystem.the-bonfire", client: client, authProvider: AuthProvider.Guest); |
| 171 | +// if (!await guestWallet.IsConnected()) |
| 172 | +// { |
| 173 | +// _ = await guestWallet.LoginWithGuest(); |
| 174 | +// } |
| 175 | +// var address = await guestWallet.GetAddress(); |
| 176 | +// Console.WriteLine($"Guest address: {address}"); |
| 177 | + |
| 178 | +// var oldLinkedAccounts = await guestWallet.GetLinkedAccounts(); |
| 179 | +// Console.WriteLine($"Old linked accounts: {JsonConvert.SerializeObject(oldLinkedAccounts, Formatting.Indented)}"); |
| 180 | + |
| 181 | +// var emailWalletFresh = await EcosystemWallet.Create(ecosystemId: "ecosystem.the-bonfire", client: client, email: "firekeeper+guestupgrade5@thirdweb.com"); |
| 182 | +// _ = await emailWalletFresh.SendOTP(); |
| 183 | +// Console.WriteLine("Enter OTP:"); |
| 184 | +// var otp = Console.ReadLine(); |
| 185 | + |
| 186 | +// var linkedAccounts = await guestWallet.LinkAccount(walletToLink: emailWalletFresh, otp: otp); |
| 187 | +// Console.WriteLine($"Linked accounts: {JsonConvert.SerializeObject(linkedAccounts, Formatting.Indented)}"); |
| 188 | + |
| 189 | +#endregion |
| 190 | + |
169 | 191 | #region Account Linking
|
170 | 192 |
|
171 | 193 | // var inAppWalletMain = await InAppWallet.Create(client: client, authProvider: AuthProvider.Google);
|
|
0 commit comments