
@namespace("keybase.1")
protocol account {
  import idl "passphrase_common.avdl";

  /**
    Change the passphrase from old to new. If old isn't set, and force is false,
    then prompt at the UI for it. If old isn't set and force is true, then we'll
    try to force a passphrase change.
   */
  void passphraseChange(int sessionID, string oldPassphrase, string passphrase, boolean force);

  GetPassphraseRes passphrasePrompt(int sessionID, GUIEntryArg guiArg);

  /**
   * change email to the new given email by signing a statement.
   */
  void emailChange(int sessionID, string newEmail);

  /**
   * Whether the logged-in user has uploaded private keys
   * Will error if not logged in.
   */
  HasServerKeysRes hasServerKeys(int sessionID);
  record HasServerKeysRes {
    boolean hasServerKeys;
  }

  void resetAccount(int sessionID);
}
