···11+import "@tlex/emitter";
22+33+namespace com.atproto.server.activateAccount {
44+ @doc("Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup.")
55+ @procedure
66+ op main(): void;
77+}
···11+import "@tlex/emitter";
22+33+namespace com.atproto.server.checkAccountStatus {
44+ @doc("Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself.")
55+ @query
66+ op main(): {
77+ @required activated: boolean;
88+ @required validDid: boolean;
99+ @required repoCommit: cid;
1010+ @required repoRev: string;
1111+ @required repoBlocks: integer;
1212+ @required indexedRecords: integer;
1313+ @required privateStateValues: integer;
1414+ @required expectedBlobs: integer;
1515+ @required importedBlobs: integer;
1616+ };
1717+}
···11+import "@tlex/emitter";
22+33+namespace com.atproto.server.createAccount {
44+ model InvalidHandle {}
55+ model InvalidPassword {}
66+ model InvalidInviteCode {}
77+ model HandleNotAvailable {}
88+ model UnsupportedDomain {}
99+ model UnresolvableDid {}
1010+ model IncompatibleDidDoc {}
1111+1212+ @doc("Account login session returned on successful account creation.")
1313+ @inline
1414+ model Output {
1515+ @required accessJwt: string;
1616+ @required refreshJwt: string;
1717+ @required handle: handle;
1818+1919+ @doc("The DID of the new account.")
2020+ @required
2121+ did: did;
2222+2323+ @doc("Complete DID document.")
2424+ didDoc?: unknown;
2525+ }
2626+2727+ @doc("Create an account. Implemented by PDS.")
2828+ @procedure
2929+ @errors(InvalidHandle, InvalidPassword, InvalidInviteCode, HandleNotAvailable, UnsupportedDomain, UnresolvableDid, IncompatibleDidDoc)
3030+ op main(input: {
3131+ email?: string;
3232+3333+ @doc("Requested handle for the account.")
3434+ @required
3535+ handle: handle;
3636+3737+ @doc("Pre-existing atproto DID, being imported to a new account.")
3838+ did?: did;
3939+4040+ inviteCode?: string;
4141+ verificationCode?: string;
4242+ verificationPhone?: string;
4343+4444+ @doc("Initial account password. May need to meet instance-specific password strength requirements.")
4545+ password?: string;
4646+4747+ @doc("DID PLC rotation key (aka, recovery key) to be included in PLC creation operation.")
4848+ recoveryKey?: string;
4949+5050+ @doc("A signed DID PLC operation to be submitted as part of importing an existing account to this instance. NOTE: this optional field may be updated when full account migration is implemented.")
5151+ plcOp?: unknown;
5252+ }): Output;
5353+}
···11+import "@tlex/emitter";
22+33+namespace com.atproto.server.deactivateAccount {
44+ @doc("Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.")
55+ @procedure
66+ op main(input: {
77+ @doc("A recommendation to server as to how long they should hold onto the deactivated account before deleting.")
88+ deleteAfter?: datetime;
99+ }): void;
1010+}
···11+import "@tlex/emitter";
22+33+namespace com.atproto.server.deleteAccount {
44+ model ExpiredToken {}
55+ model InvalidToken {}
66+77+ @doc("Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth.")
88+ @procedure
99+ @errors(ExpiredToken, InvalidToken)
1010+ op main(input: {
1111+ @required did: did;
1212+ @required password: string;
1313+ @required token: string;
1414+ }): void;
1515+}
···11+import "@tlex/emitter";
22+33+namespace com.atproto.server.getServiceAuth {
44+ @doc("Indicates that the requested expiration date is not a valid. May be in the past or may be reliant on the requested scopes.")
55+ model BadExpiration {}
66+77+ @doc("Get a signed token on behalf of the requesting DID for the requested service.")
88+ @query
99+ @errors(BadExpiration)
1010+ op main(
1111+ @doc("The DID of the service that the token will be used to authenticate with")
1212+ @required
1313+ aud: did,
1414+1515+ @doc("The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope.")
1616+ exp?: integer,
1717+1818+ @doc("Lexicon (XRPC) method to bind the requested token to")
1919+ lxm?: nsid
2020+ ): {
2121+ @required token: string;
2222+ };
2323+}
···11+import "@tlex/emitter";
22+33+namespace com.atproto.server.requestAccountDelete {
44+ @doc("Initiate a user account deletion via email.")
55+ @procedure
66+ op main(): void;
77+}
···11+import "@tlex/emitter";
22+33+namespace com.atproto.server.requestEmailConfirmation {
44+ @doc("Request an email with a code to confirm ownership of email.")
55+ @procedure
66+ op main(): void;
77+}
···11+import "@tlex/emitter";
22+33+namespace com.atproto.server.reserveSigningKey {
44+ @doc("Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.")
55+ @procedure
66+ op main(input: {
77+ @doc("The DID to reserve a key for.")
88+ did?: did;
99+ }): {
1010+ @doc("The public key for the reserved signing key, in did:key serialization.")
1111+ @required
1212+ signingKey: string;
1313+ };
1414+}