registerAccount

abstract suspend fun registerAccount(account: RegisterAccount): HubPayload<Account>

Registers an account to hub-server and creates a linked device with empty keys.

Returns a HubPayload which encapsulates the outcome. In case it is successful the value is the resulted Account or the error if it is failure.

Implementation detail

Only one active mobile-device per msisdn is allowed. If the msisdn has already a registered account and an active device, this call will return "account already registered error". In that case the user can replace his old-device with the current one, see Registration.replaceMasterDevice, without the need to register his account again.