createAccountAsync
suspend fun createAccountAsync(signupJWT: String, displayName: String = "", deviceName: String = "", privateKeys: PreGeneratedKeys? = null, expireAfter: Duration = Duration.ofDays(365 * 5)): AccountInfo
Create a new Seald SDK account for this Seald SDK instance. This function can only be called if the current SDK instance does not have an account yet.
Return
An AccountInfo instance, containing the Seald ID of the newly created Seald user, the device ID, and the date at which the current device keys will expire.
Parameters
signupJWT | The JWT to allow this SDK instance to create an account. |
displayName | An optional name for the user to create. This is metadata, useful on the Seald Dashboard for recognizing this user. |
deviceName | An optional name for the device to create. This is metadata, useful on the Seald Dashboard for recognizing this device. |
privateKeys | Optional. Pre-generated private keys, returned by a call to generatePrivateKeys or generatePrivateKeysAsync. |
expireAfter | The duration during which the created device key will be valid without renewal. Optional, defaults to 5 years. |
Throws
SealdException |