EmailManager

interface EmailManager

Provides ability to store and retrieve data related to the duck address feature such as personal username, if signed in, next alias etc...

Functions

Link copied to clipboard
abstract fun getAlias(): String?

Get the next available private duck address alias

Link copied to clipboard
abstract fun getCohort(): String

Get the cohort

Link copied to clipboard
abstract fun getEmailAddress(): String?

Get the user's full, personal duck address

Link copied to clipboard
abstract fun getLastUsedDate(): String

Return last used date

Link copied to clipboard
abstract fun getToken(): String?

Get the stored auth token

Link copied to clipboard
abstract fun getUserData(): String

Get the user's duck address data in a format that can be passed to JS

Link copied to clipboard

Determines if duck address can be used on this device

Link copied to clipboard
abstract fun isSignedIn(): Boolean

Indicates if the user is signed in or not

Link copied to clipboard
abstract fun setNewLastUsedDate()

Updates the last used date

Link copied to clipboard
abstract fun signedInFlow(): StateFlow<Boolean>

Indicates if the user is signed in or not. This is a flow so that it can be observed.

Link copied to clipboard
abstract fun signOut()

Signs out of using duck addresses on this device

Link copied to clipboard
abstract fun storeCredentials(token: String, username: String, cohort: String)

Store the credentials for the user's duck address