// 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 '../../bridge.dart';
import '../../frb_generated.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';

// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`

class UserDiscoveryStoreFlutter {
  const UserDiscoveryStoreFlutter();

  Future<AnnouncedUser?> getAnnouncedUserByPublicId({
    required PlatformInt64 publicId,
  }) => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryStoreFlutterGetAnnouncedUserByPublicId(
        that: this,
        publicId: publicId,
      );

  Future<String> getConfig() => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryStoreFlutterGetConfig(
        that: this,
      );

  Future<Uint8List?> getContactPromotion({
    required PlatformInt64 contactId,
  }) => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryStoreFlutterGetContactPromotion(
        that: this,
        contactId: contactId,
      );

  Future<Uint8List?> getContactVersion({
    required PlatformInt64 contactId,
  }) => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryStoreFlutterGetContactVersion(
        that: this,
        contactId: contactId,
      );

  Future<List<OtherPromotion>> getOtherPromotionsByPublicId({
    required PlatformInt64 publicId,
  }) => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryStoreFlutterGetOtherPromotionsByPublicId(
        that: this,
        publicId: publicId,
      );

  Future<List<Uint8List>> getOwnPromotionsAfterVersion({
    required int version,
  }) => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryStoreFlutterGetOwnPromotionsAfterVersion(
        that: this,
        version: version,
      );

  Future<Uint8List> getShareForContact({
    required PlatformInt64 contactId,
  }) => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryStoreFlutterGetShareForContact(
        that: this,
        contactId: contactId,
      );

  Future<void> pushNewUserRelation({
    required PlatformInt64 fromContactId,
    required AnnouncedUser announcedUser,
    PlatformInt64? publicKeyVerifiedTimestamp,
  }) => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryStoreFlutterPushNewUserRelation(
        that: this,
        fromContactId: fromContactId,
        announcedUser: announcedUser,
        publicKeyVerifiedTimestamp: publicKeyVerifiedTimestamp,
      );

  Future<void> pushOwnPromotionAndClearOldVersion({
    required PlatformInt64 contactId,
    required int version,
    required List<int> promotion,
  }) => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryStoreFlutterPushOwnPromotionAndClearOldVersion(
        that: this,
        contactId: contactId,
        version: version,
        promotion: promotion,
      );

  Future<void> setContactVersion({
    required PlatformInt64 contactId,
    required List<int> update,
  }) => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryStoreFlutterSetContactVersion(
        that: this,
        contactId: contactId,
        update: update,
      );

  Future<void> setShares({required List<Uint8List> shares}) => RustLib
      .instance
      .api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryStoreFlutterSetShares(
        that: this,
        shares: shares,
      );

  Future<void> storeOtherPromotion({
    required OtherPromotion promotion,
  }) => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryStoreFlutterStoreOtherPromotion(
        that: this,
        promotion: promotion,
      );

  Future<void> updateConfig({required String update}) => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryStoreFlutterUpdateConfig(
        that: this,
        update: update,
      );

  @override
  int get hashCode => 0;

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

class UserDiscoveryUtilsFlutter {
  const UserDiscoveryUtilsFlutter();

  Future<Uint8List> signData({required List<int> inputData}) => RustLib
      .instance
      .api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryUtilsFlutterSignData(
        that: this,
        inputData: inputData,
      );

  Future<bool> verifySignature({
    required List<int> inputData,
    required List<int> pubkey,
    required List<int> signature,
  }) => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryUtilsFlutterVerifySignature(
        that: this,
        inputData: inputData,
        pubkey: pubkey,
        signature: signature,
      );

  Future<bool> verifyStoredPubkey({
    required PlatformInt64 fromContactId,
    required List<int> pubkey,
  }) => RustLib.instance.api
      .crateBridgeCallbacksUserDiscoveryUserDiscoveryUtilsFlutterVerifyStoredPubkey(
        that: this,
        fromContactId: fromContactId,
        pubkey: pubkey,
      );

  @override
  int get hashCode => 0;

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