export interface ViaProxySaveV4 { accountsV4: AccountV4[]; ui: Record; } export type AccountV4 = MicrosoftAccountV4 | BedrockAccountV4; export interface SaveVersioned { _saveVersion: number; } export interface MsaApplicationConfigV4 extends SaveVersioned { clientId: string; scope: string; environment: "LIVE" | string; } export interface EcKeyPairV4 { algorithm: "EC"; publicKey: string; privateKey: string; } export interface RsaKeyPairV4 { algorithm: "RSA"; publicKey: string; privateKey: string; } export interface ExpiringTokenV4 extends SaveVersioned { expireTimeMs: number; token: string; } export interface MsaTokenV4 extends SaveVersioned { expireTimeMs: number; accessToken: string; refreshToken: string; } export interface XblDeviceTokenV4 extends SaveVersioned { expireTimeMs: number; token: string; deviceId: string; } export interface XblUserTokenV4 extends SaveVersioned { expireTimeMs: number; token: string; userHash: string; } export interface XblTitleTokenV4 extends SaveVersioned { expireTimeMs: number; token: string; titleId: string; } export interface XstsTokenV4 extends SaveVersioned { expireTimeMs: number; token: string; userHash: string; } export interface MinecraftTokenV4 extends SaveVersioned { expireTimeMs: number; type: "Bearer" | string; token: string; } export interface MinecraftProfileV4 extends SaveVersioned { id: string; name: string; } export interface MinecraftPlayerCertificatesV4 extends SaveVersioned { expireTimeMs: number; keyPair: RsaKeyPairV4; publicKeySignature: string; legacyPublicKeySignature: string; } export interface PlayFabTokenV4 extends SaveVersioned { expireTimeMs: number; entityId: string; entityToken: string; playFabId: string; sessionTicket: string; } export interface MinecraftSessionV4 extends SaveVersioned { expireTimeMs: number; authorizationHeader: string; } export interface MinecraftMultiplayerTokenV4 extends SaveVersioned { expireTimeMs: number; token: string; } export interface MinecraftCertificateChainV4 extends SaveVersioned { mojangJwt: string; identityJwt: string; } export interface MicrosoftAccountV4 extends SaveVersioned { accountType: "net.raphimc.viaproxy.saves.impl.accounts.MicrosoftAccount"; msaApplicationConfig: MsaApplicationConfigV4; deviceType: "Win32" | "Android" | string; deviceKeyPair: EcKeyPairV4; deviceId: string; msaToken: MsaTokenV4; xblDeviceToken: XblDeviceTokenV4; xblUserToken: XblUserTokenV4; xblTitleToken: XblTitleTokenV4; javaXstsToken: XstsTokenV4; minecraftToken: MinecraftTokenV4; minecraftProfile: MinecraftProfileV4; minecraftPlayerCertificates: MinecraftPlayerCertificatesV4; } export interface BedrockAccountV4 extends SaveVersioned { accountType: "net.raphimc.viaproxy.saves.impl.accounts.BedrockAccount"; msaApplicationConfig: MsaApplicationConfigV4; deviceType: "Android" | "Win32" | string; deviceKeyPair: EcKeyPairV4; deviceId: string; sessionKeyPair: EcKeyPairV4 | EcdsaP384KeyPairV4; msaToken: MsaTokenV4; xblDeviceToken: XblDeviceTokenV4; xblUserToken: XblUserTokenV4; xblTitleToken: XblTitleTokenV4; bedrockXstsToken: XstsTokenV4; playFabXstsToken: XstsTokenV4; playFabToken: PlayFabTokenV4; minecraftSession: MinecraftSessionV4; minecraftMultiplayerToken: MinecraftMultiplayerTokenV4; minecraftCertificateChain: MinecraftCertificateChainV4; } export interface EcdsaP384KeyPairV4 { algorithm: "EC"; publicKey: string; privateKey: string; }