import 'package:meta/meta.dart'; import 'package:omemo_dart/src/omemo/encrypted_key.dart'; import 'package:omemo_dart/src/omemo/errors.dart'; @immutable class EncryptionResult { const EncryptionResult( this.ciphertext, this.encryptedKeys, this.deviceEncryptionErrors, this.newRatchets, this.replacedRatchets, this.canSend, ); /// The actual message that was encrypted. final List? ciphertext; /// Mapping of the device Id to the key for decrypting ciphertext, encrypted /// for the ratchet with said device Id. final Map> encryptedKeys; /// Mapping of a JID to final Map> deviceEncryptionErrors; /// Mapping of JIDs to a list of device ids for which we created a new ratchet session. final Map> newRatchets; /// Similar to [newRatchets], but the ratchets listed in [replacedRatchets] where also existent before /// and replaced with the new ratchet. final Map> replacedRatchets; /// A flag indicating that the message could be sent like that, i.e. we were able /// to encrypt to at-least one device per recipient. final bool canSend; }