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
+145-4Lines changed: 145 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -450,6 +450,19 @@ public string GenerateExternalLoginLink(string redirectUrl)
450
450
return$"{redirectUrl}{queryString}";
451
451
}
452
452
453
+
/// <summary>
454
+
/// Creates a session key for the user wallet. This is only supported for EIP7702 and EIP7702Sponsored execution modes.
455
+
/// </summary>
456
+
/// <param name="chainId">The chain ID for the session key.</param>
457
+
/// <param name="signerAddress">The address of the signer for the session key.</param>
458
+
/// <param name="durationInSeconds">Duration in seconds for which the session key will be valid.</param>
459
+
/// <param name="grantFullPermissions">Whether to grant full permissions to the session key. If false, only the specified call and transfer policies will be applied.</param>
460
+
/// <param name="callPolicies">List of call policies to apply to the session key. If null, no call policies will be applied.</param>
461
+
/// <param name="transferPolicies">List of transfer policies to apply to the session key. If null, no transfer policies will be applied.</param>
462
+
/// <param name="uid">A unique identifier for the session key. If null, a new GUID will be generated.</param>
463
+
/// <returns>A task that represents the asynchronous operation. The task result contains the transaction receipt for the session key creation.</returns>
464
+
/// <exception cref="InvalidOperationException">Thrown when the execution mode is not EIP7702 or EIP7702Sponsored.</exception>
465
+
/// <exception cref="ArgumentException">Thrown when the signer address is null or empty, or when the duration is less than or equal to zero.</exception>
/// Checks if the signer has full permissions on the EIP7702 account.
507
+
/// </summary>
508
+
/// <param name="chainId">The chain ID of the EIP7702 account.</param>
509
+
/// <param name="signerAddress">The address of the signer to check permissions for.</param>
510
+
/// <returns>A task that represents the asynchronous operation. The task result contains a boolean indicating whether the signer has full permissions.</returns>
511
+
/// <exception cref="InvalidOperationException">Thrown when the execution mode is not EIP7702 or EIP7702Sponsored.</exception>
512
+
/// <exception cref="ArgumentException">Thrown when the signer address is null or empty.</exception>
/// Gets the complete session state for a specific signer on the EIP7702 account, including remaining limits and usage information.
599
+
/// </summary>
600
+
/// <param name="chainId">The chain ID of the EIP7702 account.</param>
601
+
/// <param name="signerAddress">The address of the signer to get session state for.</param>
602
+
/// <returns>A task that represents the asynchronous operation. The task result contains the session state with transfer value limits, call value limits, and call parameter limits.</returns>
603
+
/// <exception cref="InvalidOperationException">Thrown when the execution mode is not EIP7702 or EIP7702Sponsored.</exception>
604
+
/// <exception cref="ArgumentException">Thrown when the signer address is null or empty.</exception>
thrownewInvalidOperationException("This operation requires a delegated account. Please ensure you have transacted at least once with the account to set up delegation.");
0 commit comments