import { IdentityFields } from "./IdentityAPI"; export { Error, ErrorKind, ServerKind as ServerError, SDKKind as SDKError } from "./Error"; /** * Register a new DataPeps identity. * @param identity The description of the identity to register. * The login MUST be a peps email address, i.e. @ * @param secret The secret of the identity. * @return(p) a promise that rejects with an {@link Error} with kind * - `IdentityInvalidLogin` if identity.login is not a valid login. * - `IdentityAlreadyExists` if identity.login already exists. */ export declare function register(identity: IdentityFields, secret: string | Uint8Array): Promise; /** * Register a new external identity, using a preallocated token from {@link sendRegisterLink}. * @param identity The description of the identity to register. * The login MUST be the email address associated with the token, i.e. @ * @param secret The secret of the identity. * @return(p) a promise that rejects with an {@link Error} with kind * - `IdentityInvalidLogin` if identity.login is not the one associated with the token. * - `IdentityAlreadyExists` if identity.login already exists. * - `RegisterTokenNotFound` if `token` is not found. */ export declare function registerWithToken(token: string | Uint8Array, identity: IdentityFields, secret: string | Uint8Array): Promise; /** * Send an email to register a new identity. * The email sent will contain a registration link and a registration * token which can be used by {@link registerWithToken} * @param email The email address recipient for the registration email. * @return(p) On success the promise will be resolved with void. * On error the promise will be rejected with an {@link Error} with kind * - `RegisterInvalidEmail` if the `email` is badly formatted. */ export declare function sendRegisterLink(email: string): Promise;