You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Thirdweb/Thirdweb.Wallets/InAppWallet/EcosystemWallet/EcosystemWallet.cs
+38-9
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ public partial class EcosystemWallet : IThirdwebWallet
25
25
internalreadonlystringPhoneNumber;
26
26
internalreadonlystringAuthProvider;
27
27
internalreadonlystringLegacyEncryptionKey;
28
+
internalreadonlystringWalletSecret;
28
29
29
30
internalstringAddress;
30
31
@@ -46,7 +47,8 @@ internal EcosystemWallet(
46
47
stringphoneNumber,
47
48
stringauthProvider,
48
49
IThirdwebWalletsiweSigner,
49
-
stringlegacyEncryptionKey
50
+
stringlegacyEncryptionKey,
51
+
stringwalletSecret
50
52
)
51
53
{
52
54
this.Client=client;
@@ -59,6 +61,7 @@ string legacyEncryptionKey
59
61
this.PhoneNumber=phoneNumber;
60
62
this.AuthProvider=authProvider;
61
63
this.SiweSigner=siweSigner;
64
+
this.WalletSecret=walletSecret;
62
65
}
63
66
64
67
#region Creation
@@ -75,6 +78,7 @@ string legacyEncryptionKey
75
78
/// <param name="storageDirectoryPath">The path to the storage directory.</param>
76
79
/// <param name="siweSigner">The SIWE signer wallet for SIWE authentication.</param>
77
80
/// <param name="legacyEncryptionKey">The encryption key that is no longer required but was used in the past. Only pass this if you had used custom auth before this was deprecated.</param>
81
+
/// <param name="walletSecret">The wallet secret for Backend authentication.</param>
78
82
/// <returns>A task that represents the asynchronous operation. The task result contains the created in-app wallet.</returns>
79
83
/// <exception cref="ArgumentException">Thrown when required parameters are not provided.</exception>
80
84
publicstaticasyncTask<EcosystemWallet>Create(
@@ -86,7 +90,8 @@ public static async Task<EcosystemWallet> Create(
returnstring.IsNullOrEmpty(jwt)?thrownewArgumentException(nameof(jwt),"JWT cannot be null or empty."):awaitthis.EmbeddedWallet.SignInWithJwtAsync(jwt).ConfigureAwait(false);
779
+
returnstring.IsNullOrEmpty(jwt)?thrownewArgumentException("JWT cannot be null or empty.",nameof(jwt)):awaitthis.EmbeddedWallet.SignInWithJwtAsync(jwt).ConfigureAwait(false);
750
780
}
751
781
752
782
publicasyncTask<string>LoginWithJWT(stringjwt)
753
783
{
754
-
varserverRes=string.IsNullOrEmpty(jwt)?thrownewArgumentException("JWT cannot be null or empty.",nameof(jwt)):awaitthis.EmbeddedWallet.SignInWithJwtAsync(jwt).ConfigureAwait(false);
/// <param name="storageDirectoryPath">The path to the storage directory.</param>
34
35
/// <param name="siweSigner">The SIWE signer wallet for SIWE authentication.</param>
35
36
/// <param name="legacyEncryptionKey">The encryption key that is no longer required but was used in the past. Only pass this if you had used custom auth before this was deprecated.</param>
37
+
/// <param name="walletSecret">The wallet secret for backend authentication.</param>
36
38
/// <returns>A task that represents the asynchronous operation. The task result contains the created in-app wallet.</returns>
37
39
/// <exception cref="ArgumentException">Thrown when required parameters are not provided.</exception>
38
40
publicstaticasyncTask<InAppWallet>Create(
@@ -42,11 +44,12 @@ public static async Task<InAppWallet> Create(
0 commit comments