EcosystemWallet.GetSessionStateForSigner
Gets the complete session state for a specific signer on the EIP-7702 account, including remaining limits and usage information. This provides a comprehensive view of what the signer can still do within their session limits.
// Get complete session state for a signervar sessionState = await ecosystemWallet.GetSessionStateForSigner(chainId: 1,signerAddress: "0x1234567890123456789012345678901234567890");// Check remaining transfer limitsConsole.WriteLine("Transfer Limits:");foreach (var limit in sessionState.TransferValue){string tokenType = limit.Target == "0x0000000000000000000000000000000000000000"? "ETH": $"Token {limit.Target}";Console.WriteLine($" {tokenType}: {limit.Remaining} remaining");}// Check remaining call value limitsConsole.WriteLine("\nCall Value Limits:");foreach (var limit in sessionState.CallValue){Console.WriteLine($" {limit.Target}.{BitConverter.ToString(limit.Selector)}: {limit.Remaining} ETH remaining");}// Check parameter constraint limitsConsole.WriteLine("\nParameter Constraints:");foreach (var limit in sessionState.CallParams){Console.WriteLine($" {limit.Target}.{BitConverter.ToString(limit.Selector)} param[{limit.Index}]: {limit.Remaining} remaining");}
An object containing the current session state with three arrays:
LimitState[]
: Remaining limits for token transfers- Each entry shows remaining transfer amounts for specific tokens
LimitState[]
: Remaining ETH value limits for contract calls- Each entry shows remaining ETH that can be sent with function calls
LimitState[]
: Remaining limits for constrained function parameters- Each entry shows remaining usage for specific parameter constraints
Remaining
: Amount remaining for this limitTarget
: Contract or token addressSelector
: Function selector (for calls only)Index
: Parameter index (for parameter constraints only)