revokeSession method

void Function(Transaction) revokeSession({
  1. required String wrapperId,
  2. required String session,
})

Remove session's grant. Owner-signed, like authorizeSession. Deliberately takes no SessionsConfig: revocation is not version-gated, so it keeps working after the package is retired. Revoking an address that holds no grant is a silent no-op — it neither aborts nor emits, so read before and after if you need to distinguish "revoked" from "was never granted".

Implementation

void Function(Transaction) revokeSession({
  required String wrapperId,
  required String session,
}) =>
    (tx) {
      sessions.revokeSession(
        config: _generatedConfig,
        arguments: {'wrapper': wrapperId, 'session': session},
      )(tx);
    };