Skip to content

IPC Channel Reference ​

ProtocolAccessPreload

All communication between the Renderer Process (DOM) and the Main Process (Node.js) is gated behind a static whitelist enforced in preload.js. Invocations targeting unlisted channels are rejected with a security exception.


1. Authentication Channels (src/main/ipc-auth.js) ​

IPC ChannelTypeArgumentsDescription
auth:start-device-flowinvokeNoneStarts Microsoft Device Code Flow, returning the user code and login URI.
auth:poll-device-flowinvokedeviceCodePolls the token endpoint until the user confirms authorization in browser.
auth:save-accountinvokeaccountDataEncrypts and persists credentials in local secure storage.
auth:get-accountsinvokeNoneLists saved accounts with sensitive secrets redacted.
auth:remove-accountinvokeuuidDeletes saved credentials and revokes cached tokens on disk.
auth:proxy-skininvokeskinUrlActs as an HTTPS proxy to load remote skin textures without CORS errors.

2. Launch and Runtime Channels (src/main/ipc-game.js) ​

IPC ChannelTypeArgumentsDescription
game:launch-instanceinvokeinstanceConfigResolves game libraries, checks hashes, builds JVM flags, and executes Java.
game:kill-processinvokeinstanceIdDispatches SIGTERM followed by SIGKILL to running Minecraft instances.
game:detect-javainvokeNoneScans common system directories and returns installed JDK / JRE runtimes.
game:download-javainvokemajorVersionDownloads and unpacks an official Adoptium Temurin Java archive.
game:stream-logssend / onStream payloadForwards Minecraft standard out and error streams to the UI console.

3. System and File Operations (src/main/ipc-system.js) ​

IPC ChannelTypeArgumentsDescription
system:show-in-folderinvoketargetPathReveals the file or folder in native Explorer, Finder, or Nautilus.
system:open-dialog-fileinvokeoptionsOpens a native dialog to choose a file (.zip, .jar).
system:open-dialog-folderinvokeoptionsOpens a native dialog to pick a destination folder.
system:copy-image-to-sandboxinvokesrcPath, destName, subDirValidates file extension and Magic Bytes before writing into the sandbox.
system:discord-set-activityinvokeactivityPayloadEmits Rich Presence status updates to the local Discord client over Named Pipe.
system:discord-clearinvokeNoneClears the current active game status on Discord.

4. Horizon Engine Channels (src/main/ipc-horizon.js) ​

IPC ChannelTypeArgumentsDescription
horizon:checkinvokeNoneQueries remote cloud index and reports synchronization differences.
horizon:logininvokeproviderNameTriggers OAuth2 authorization for Google Drive, Dropbox, or OneDrive.
horizon:syncinvokeinstanceNamePulls and chronologically applies missing delta packages to the local instance.
horizon:uploadinvokeinstanceNameScans local changes, builds a differential delta archive, and uploads to cloud.
horizon:quotainvokeNoneQueries total, used, and free storage from the connected cloud provider.
horizon:rollbackinvokeinstanceName, deltaIdRestores an instance to a selected historical snapshot.
horizon:purge-lockinvokeNoneRemoves an orphaned horizon.lock file following process verification.

5. Auto-Updater Channels (src/main/updater.js) ​

IPC ChannelTypeArgumentsDescription
updater:check-for-updatesinvokeNoneQueries GitHub Releases to determine whether an update is available.
updater:download-updateinvokeNoneDownloads the installer in the background with progress feedback.
updater:quit-and-installinvokeNoneQuits the launcher and applies the new update bundle.

Released under the MIT License. Developed for the Gens Ecosystem.