activeSessions static method
Grants from decodeSessions that are still live at nowMs (int or
BigInt, ms since epoch).
Implementation
static List<SessionGrant> activeSessions(
List<SessionGrant> grants, Object nowMs) {
final now = _toBigInt(nowMs);
// The chain asserts `now < expiresAtMs`, so a grant is dead AT its
// expiry.
return grants.where((g) => now < g.expiresAtMs).toList();
}