mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-25 17:22:13 +00:00
77 lines
2.6 KiB
Dart
77 lines
2.6 KiB
Dart
// 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 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
|
|
|
class RustKeyManager {
|
|
const RustKeyManager();
|
|
|
|
static Future<Uint8List> getLoginToken() => RustLib.instance.api
|
|
.crateBridgeWrapperKeyManagerRustKeyManagerGetLoginToken();
|
|
|
|
static Future<(Uint8List, PlatformInt64)> getSignalIdentity() => RustLib
|
|
.instance
|
|
.api
|
|
.crateBridgeWrapperKeyManagerRustKeyManagerGetSignalIdentity();
|
|
|
|
static Future<PlatformInt64?> getUserId() => RustLib.instance.api
|
|
.crateBridgeWrapperKeyManagerRustKeyManagerGetUserId();
|
|
|
|
static Future<void> importSignalIdentity({
|
|
required List<int> identityKeyPairStructure,
|
|
required PlatformInt64 registrationId,
|
|
required Map<PlatformInt64, Uint8List> signedPreKeyStore,
|
|
}) => RustLib.instance.api
|
|
.crateBridgeWrapperKeyManagerRustKeyManagerImportSignalIdentity(
|
|
identityKeyPairStructure: identityKeyPairStructure,
|
|
registrationId: registrationId,
|
|
signedPreKeyStore: signedPreKeyStore,
|
|
);
|
|
|
|
static Future<Uint8List?> loadSignedPrekey({
|
|
required PlatformInt64 signedPreKeyId,
|
|
}) => RustLib.instance.api
|
|
.crateBridgeWrapperKeyManagerRustKeyManagerLoadSignedPrekey(
|
|
signedPreKeyId: signedPreKeyId,
|
|
);
|
|
|
|
static Future<Map<PlatformInt64, Uint8List>> loadSignedPrekeys() => RustLib
|
|
.instance
|
|
.api
|
|
.crateBridgeWrapperKeyManagerRustKeyManagerLoadSignedPrekeys();
|
|
|
|
static Future<void> removeKeyManager() => RustLib.instance.api
|
|
.crateBridgeWrapperKeyManagerRustKeyManagerRemoveKeyManager();
|
|
|
|
static Future<void> removeSignedPrekey({
|
|
required PlatformInt64 signedPreKeyId,
|
|
}) => RustLib.instance.api
|
|
.crateBridgeWrapperKeyManagerRustKeyManagerRemoveSignedPrekey(
|
|
signedPreKeyId: signedPreKeyId,
|
|
);
|
|
|
|
static Future<void> setUserId({required PlatformInt64 userId}) => RustLib
|
|
.instance
|
|
.api
|
|
.crateBridgeWrapperKeyManagerRustKeyManagerSetUserId(userId: userId);
|
|
|
|
static Future<void> storeSignedPrekey({
|
|
required PlatformInt64 signedPreKeyId,
|
|
required List<int> record,
|
|
}) => RustLib.instance.api
|
|
.crateBridgeWrapperKeyManagerRustKeyManagerStoreSignedPrekey(
|
|
signedPreKeyId: signedPreKeyId,
|
|
record: record,
|
|
);
|
|
|
|
@override
|
|
int get hashCode => 0;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is RustKeyManager && runtimeType == other.runtimeType;
|
|
}
|