saveAll

suspend fun saveAll(userKeys: List<UserKey>)

Saves multiple user keys in a batch operation, adding only new users.

This method efficiently adds multiple user keys while avoiding duplicates. Only keys for users that don't already exist in storage are added. Existing user keys are preserved unchanged.

This operation is useful for:

  • Migrating keys from other storage systems

  • Bulk importing user keys

  • Adding multiple keys without overwriting existing ones

If the input list is empty, no operation is performed.

Parameters

userKeys

List of UserKey objects to save