com.miracl.miracltrust.storage

Types

UserStorage

interface UserStorage

A type representing storage, where already registered users will be kept between app launches.

By default this SDK uses a concrete implementation of this interface RoomUserStorage.

Methods of this interface must not be called outside of the SDK, as they are intended to be only for internal usage.

Keep in mind, that this interface doesn’t provide any data encryption and developers should take care of this by themselves.

Functions

add

abstract fun add(user: User): Unit

Adds a registered user to the user storage

Parameters

user - registered user.

delete

abstract fun delete(user: User): Unit

Deletes a registered user from the user storage

Parameters

user - The registered user to delete.

getAll

abstract fun getAll(): List<User>

Returns all users from the user storage.

loadStorage

abstract fun loadStorage(): Unit

Prepares the user storage to be used.

Called once on initialization of the SDK.

userExists

abstract fun userExists(userId: String): Boolean

Checks whether there is a user with the same Id in the user storage.

Parameters

userId - Id to check for

Return True if the user already exists in the storage, False otherwise.