Skip to content

Commit a47c7c3

Browse files
committed
Expose UserStatusResponse fields
1 parent e5c2aa7 commit a47c7c3

File tree

3 files changed

+34
-7
lines changed

3 files changed

+34
-7
lines changed

Thirdweb/Thirdweb.Wallets/InAppWallet/EcosystemWallet/EcosystemWallet.Types.cs

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,40 @@ namespace Thirdweb;
55

66
public partial class EcosystemWallet
77
{
8+
/// <summary>
9+
/// User linked account details.
10+
/// </summary>
811
public class UserStatusResponse
912
{
13+
/// <summary>
14+
/// The user's linked accounts.
15+
/// </summary>
1016
[JsonProperty("linkedAccounts")]
11-
internal List<LinkedAccount> LinkedAccounts { get; set; }
17+
public List<LinkedAccount> LinkedAccounts { get; set; }
1218

19+
/// <summary>
20+
/// The user's wallets, generally only one wallet is returned.
21+
/// </summary>
1322
[JsonProperty("wallets")]
14-
internal List<ShardedOrEnclaveWallet> Wallets { get; set; }
23+
public List<ShardedOrEnclaveWallet> Wallets { get; set; }
1524
}
1625

17-
internal class ShardedOrEnclaveWallet
26+
/// <summary>
27+
/// Represents a user's embedded wallet.
28+
/// </summary>
29+
public class ShardedOrEnclaveWallet
1830
{
31+
/// <summary>
32+
/// The public address of the wallet.
33+
/// </summary>
1934
[JsonProperty("address")]
20-
internal string Address { get; set; }
35+
public string Address { get; set; }
2136

37+
/// <summary>
38+
/// The wallet's creation date.
39+
/// </summary>
2240
[JsonProperty("createdAt")]
23-
internal DateTime CreatedAt { get; set; }
41+
public DateTime CreatedAt { get; set; }
2442

2543
[JsonProperty("type")]
2644
internal string Type { get; set; }

Thirdweb/Thirdweb.Wallets/InAppWallet/EcosystemWallet/EcosystemWallet.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ private async Task<string> MigrateShardToEnclave(Server.VerifyResult authResult)
285285
#region Wallet Specific
286286

287287
/// <summary>
288-
/// Gets the user details from the enclave wallet.
288+
/// Gets the user details from the enclave wallet. For auth provider specific details use GetUserAuthDetails.
289289
/// </summary>
290290
/// <returns>A task that represents the asynchronous operation. The task result contains the user details.</returns>
291291
public async Task<UserStatusResponse> GetUserDetails()
@@ -294,7 +294,7 @@ public async Task<UserStatusResponse> GetUserDetails()
294294
}
295295

296296
/// <summary>
297-
/// Gets the user auth details from the corresponding auth provider.
297+
/// Gets the user auth details from the corresponding auth provider. For linked account details use GetUserDetails or GetLinkedAccounts.
298298
/// </summary>
299299
/// <returns>The user auth details as a JObject</returns>
300300
public JObject GetUserAuthDetails()

Thirdweb/Thirdweb.Wallets/InAppWallet/InAppWallet.Types.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,21 @@ public enum AuthProvider
3131
/// </summary>
3232
public struct LinkedAccount
3333
{
34+
/// <summary>
35+
/// The auth provider method used to create or link this account.
36+
/// </summary>
3437
[JsonProperty("type")]
3538
public string Type { get; set; }
3639

40+
/// <summary>
41+
/// Additional details about the linked account.
42+
/// </summary>
3743
[JsonProperty("details")]
3844
public LinkedAccountDetails Details { get; set; }
3945

46+
/// <summary>
47+
/// The email, address, phone and id related to the linked account, where applicable.
48+
/// </summary>
4049
public struct LinkedAccountDetails
4150
{
4251
[JsonProperty("email")]

0 commit comments

Comments
 (0)