// This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.12.0.

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

import '../../frb_generated.dart';
import '../../signal/engine.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';

class RustSignal {
  const RustSignal();

  static Future<Uint8List> decrypt({
    required String name,
    required int deviceId,
    required List<int> ciphertext,
  }) => RustLib.instance.api.crateBridgeWrapperSignalRustSignalDecrypt(
    name: name,
    deviceId: deviceId,
    ciphertext: ciphertext,
  );

  static Future<Uint8List> encrypt({
    required String name,
    required int deviceId,
    required List<int> plaintext,
  }) => RustLib.instance.api.crateBridgeWrapperSignalRustSignalEncrypt(
    name: name,
    deviceId: deviceId,
    plaintext: plaintext,
  );

  static Future<FrbPreKeyBundle> generateBundle() =>
      RustLib.instance.api.crateBridgeWrapperSignalRustSignalGenerateBundle();

  static Future<List<FrbPqcPreKey>> generatePqcPrekeys() => RustLib.instance.api
      .crateBridgeWrapperSignalRustSignalGeneratePqcPrekeys();

  static Future<void> processPrekeyBundle({
    required String name,
    required int deviceId,
    required FrbPreKeyBundle bundle,
  }) => RustLib.instance.api
      .crateBridgeWrapperSignalRustSignalProcessPrekeyBundle(
        name: name,
        deviceId: deviceId,
        bundle: bundle,
      );

  @override
  int get hashCode => 0;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is RustSignal && runtimeType == other.runtimeType;
}
