SignalKeys

Defines all the APIs for managing the signal-protocol compliant keys.

Functions

Link copied to clipboard

Blocking-call variant of SignalKeys.countKeys.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract suspend fun countKeys(targetAccount: UUID, deviceId: Int): HubPayload<Int>

Counts the number of remaining keys for the target's account device.

Link copied to clipboard
abstract suspend fun getKeys(targetAccount: UUID): HubPayload<AccountKeyBundle>

Retrieves a key-bundle which contains all the target's devices keys to initiate a signal-session. The Hub-server deletes the retrieved 'oneTimeKeys' as are meant to be one-time use.

abstract suspend fun getKeys(targetAccount: UUID, deviceId: Int): HubPayload<AccountKeyBundle>

Retrieves a key-bundle to initiate a signal-session. The Hub-server deletes the retrieved 'oneTimeKey' as it meant to be one-time use.

Link copied to clipboard
fun <T> HubClientCoroutineContextStrategy.runBlockingWithContext(block: suspend CoroutineScope.() -> T): T

Runs a new coroutine in HubClientCoroutineContextStrategy.clientCoroutineContext context and blocks the current thread until its completion. This function should not be used from a coroutine.

Link copied to clipboard
abstract suspend fun setKeys(keyBundle: SetupDeviceKeyBundle): HubPayload<String>

Sets the given keyBundle for account with deviceId.

Properties

Link copied to clipboard

The hubClient's-coroutine-context. It can be used to explicit define in which CoroutineContext the new client will run.