@namespace("keybase.1") protocol account { import idl "passphrase_common.avdl"; import idl "../gregor1" as gregor1; /** 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); /** * Check if user passphrase matches argument. Launches SecretUI prompt if * passphrase argument is empty. Returns `true` if passphrase is correct, * false if not, or an error if something else went wrong. */ boolean passphraseCheck(int sessionID, string passphrase); /** * 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; } /** resetAccount resets the user's account. It is used in the CLI. passphrase is optional and will be prompted for if not supplied. */ void resetAccount(int sessionID, string passphrase); record LockdownHistory { @jsonkey("status") boolean status; @jsonkey("ctime") Time creationTime; @jsonkey("device_id") DeviceID deviceID; string deviceName; } record GetLockdownResponse { array history; boolean status; } GetLockdownResponse getLockdownMode(int sessionID); void setLockdownMode(int sessionID, boolean enabled); // Call an API handler that will send an e-mail the user with their // Keybase username. void recoverUsernameWithEmail(int sessionID, string email); // Call an API handler that will SMS the user with their // Keybase username. void recoverUsernameWithPhone(int sessionID, PhoneNumber phone); /** Start reset process for the user based on their username or email. If neither are known the user will be prompted for their passphrase to start the process. TODO: change this to just username */ void enterResetPipeline(int sessionID, string usernameOrEmail, string passphrase, boolean interactive); /** Aborts the reset process */ void cancelReset(int sessionID); void timeTravelReset(int sessionID, string username, gregor1.DurationSec duration); // Returns a 2-letter country code. string guessCurrentLocation(int sessionID, string defaultCountry); record TeamContactSettings { @jsonkey("team_id") TeamID teamID; @jsonkey("enabled") boolean enabled; } record ContactSettings { @jsonkey("version") union { null, int } version; @jsonkey("allow_followee_degrees") int allowFolloweeDegrees; @jsonkey("allow_good_teams") boolean allowGoodTeams; @jsonkey("enabled") boolean enabled; @jsonkey("teams") array teams; } ContactSettings userGetContactSettings(); void userSetContactSettings(ContactSettings settings); }