getAllHmacKeys method

  1. @override
Future<List<Map<String, dynamic>>> getAllHmacKeys()
override

Aggregate HMAC keys for every conversation the client knows about (including stitched duplicate DMs). Each entry: {topic: String, hmacKey: Uint8List, thirtyDayPeriodsSinceEpoch: int}. libxmtp returns 3 keys per conversation (prior / current / next epoch). Feed these to the notif server's subscribeWithMetadata so it can filter listener traffic without breaking E2E.

Implementation

@override
Future<List<Map<String, dynamic>>> getAllHmacKeys() async {
  await _ensureInitialized();
  final entries = await rust_push.getAllHmacKeys();
  return entries
      .map((e) => <String, dynamic>{
            'topic': e.topic,
            'hmacKey': e.hmacKey,
            'thirtyDayPeriodsSinceEpoch': e.thirtyDayPeriodsSinceEpoch,
          })
      .toList();
}