# lol.trq.alts > A consumer-agnostic account library for Minecraft: Java Edition, for launchers, tools, the host applications of bots, and account managers. Sign-in by Microsoft browser login (PKCE), device code, OAuth refresh token, cookie text, cookie file, session token, or offline, with silent renewal of a stored session; account management over a token (profile, entitlements, name, skin, cape, attributes, chat-signing certificate, blocklist) and anonymous profile lookup; paced bulk operations; an encrypted local store with an optional host-supplied key; per-account proxy routing; a shared vault on the Alt Vault Protocol 0.5 with client-side encryption and verification; and async avatar and game-stats caches. Pure JDK plus Gson, Java 25, with no Minecraft or renderer types of its own. Current version: 1.0.0. Coordinate: `com.github.trq-lol:lol.trq.alts` on JitPack, with the release tag (`v1.0.0`) as the version. Gson is an ordinary `api` dependency that a host receives transitively. The jar is the named module `lol.trq.alts` (a `module-info.java`; no `Automatic-Module-Name`), which `requires transitive com.google.gson`, exports the twelve API packages and nothing under `lol.trq.alts.internal`, and is sealed. The exported API is frozen for 1.x by a committed dump, `api/lol.trq.alts.api`, which the build checks. The library is host-agnostic. A host supplies a few seams from `lol.trq.alts.spi` (session injection, storage directory, main-thread executor and notifications are required; texture upload, avatar source, stats source, proxy provider and store key provider are optional, and a device-code prompt is passed per sign-in) and builds one `AltsRuntime` through its `Builder`. The runtime owns everything it builds: an `AccountStore` (`alts.store()`) and a `HostSecrets` (`alts.secrets()`) on the host's directory, a transport with the host's proxy provider, and an executor (the host's, or one it creates). Nothing is process-wide, so two runtimes on two directories share nothing, and each store file is locked to one runtime: a second runtime on the same directory fails `build()` with `CONFLICT`. `build()` loads the stores, so `alts.store().accounts()` is populated as soon as it returns. `AltsRuntime` is `AutoCloseable`: `close()` flushes and unlocks the stores, closes the transport, shuts down an executor it created, and ends whatever still waits on the runtime. Microsoft login takes the host's own Azure client id; the library ships no default, and `MicrosoftAuthConfig.legacyMsa` speaks the pre-Azure MSA dialect. Every failure is an `AltsFailure` (in `lol.trq.alts`): a `kind()` from the one enum `AltsFailure.Kind` (`NETWORK`, `RATE_LIMITED`, `UNAUTHORIZED`, `REAUTH_REQUIRED`, `NOT_ENTITLED`, `NOT_FOUND`, `XBOX_DENIED`, `DECLINED`, `TIMED_OUT`, `CANCELLED`, `INVALID_INPUT`, `CONFLICT`, `NOT_CONFIGURED`, `STORAGE`, `CRYPTO`, `PROTOCOL`, `UNKNOWN`), a message the library builds, the stated wait (`retryAfter()`, `retryAt()`), the decoded Xbox Live refusal (`xstsError()`), and `retryable()`. A result a host branches on (`LoginResult`, `AccountStatus`, `NameChangeResult`, `ProfileCreationResult`, `ClaimResult`, `BulkEntryResult`) carries it as `Optional failure()`; everything else throws the unchecked `AltsException`, and a library future completes exceptionally with nothing else. A host branches on the kind, never on the message. A refused credential, an unreachable service and a rate limit are always classified apart. `AltLoginService` is the whole sign-in surface: seven routes (`loginMicrosoft`, `loginDeviceCode`, `loginRefreshToken`, `loginCookie`, `loginCookieFile`, `loginSession`, `loginOffline`) plus `loginAccount`, which reuses a stored session while it is live and otherwise renews it from the account's refresh token, and `routed(tag)`, a view whose requests carry a route tag for the proxy provider. Every route returns a `LoginResult` and never throws at the caller. The device-code flow and the cookie chain were tested against loopback and scripted servers only, not against the live services. `AltAccountService` (`check`, `refresh`) validates and renews a stored account without installing a session; `check` is read-only, and is the one to use when only looking, because the token endpoint rotates the refresh token on every redemption. `AccountStatus.State` is `VALID`, `RENEWED`, `EXPIRED`, `REAUTH_REQUIRED`, `NOT_ENTITLED` (which includes an Xbox Live refusal), `UNREACHABLE` (an outage or a rate limit; the failure's kind tells them apart) or `UNKNOWN`. `lol.trq.alts.account` is the surface over a live token, reached as `alts.accountServices(account)`: the full profile (and creating one for an entitled account that has none), entitlements as a product set, name availability, eligibility, change and a scheduled claim, skin and cape changes (with local skin validation), player attributes and platform ban status, the chat-signing certificate, and the blocklist. None of it installs a session or touches the store. A read throws `AltsException`; a mutation whose refusal is an ordinary outcome returns a classified result. `alts.profileLookup()` resolves a player by name or UUID with no token, ten names per request for a list. `Builder#accountEndpoints` points both at another base. `lol.trq.alts.bulk` runs `checkAll`, `refreshAll`, `entitlementsAll` and `importCredentials` over many accounts with bounded concurrency, spacing between starts, a retry budget that only retries transient failures, per-entry progress, and cancellation. A rate limit, with or without a stated wait, stops the run by default or pauses it when the host opts out of stopping. Every entry is reported, a run cut short reporting the rest as `CANCELLED`. Result labels are usernames or positional (`entry 4`) and never the input line. Requests leave through the runtime's transport and nowhere else: finite timeouts, a 1 MiB cap on JSON and text bodies, no redirect following except a bounded, credential-stripping one for images, header checks (no control characters, no caller-set `Proxy-Authorization`), and the runtime's `ProxyProvider`, which receives a `NetworkScope` (purpose, account, route tag) and returns a `ProxyRoute`. Proxy resolution fails closed. An HTTPS target behind an HTTP proxy is tunnelled by the library, which sends the proxy credential on the `CONNECT` only and keeps connections apart per proxy identity; the JVM still resolves the target host name locally on that path. All blocking work runs on the runtime's executor (a virtual thread per task, or the host's executor), never on the common pool. The stores (`AccountStore`, `HostSecrets`) are AES-256-GCM files written atomically with a rolling backup and coalesced for 100 ms; `flush()` writes at once. The default key is derived from machine properties and is obfuscation; a `StoreKeyProvider` supplies real key material, for that runtime only. A file that cannot be read is never treated as empty or written over: it is reported on `loadError()` (kind `STORAGE`), copied aside to `.unreadable.