Ana içeriğe geç

Auto Updates

Monolythium wallets and applications include built-in update mechanisms to ensure users are always running the latest version with the newest features and security patches.


Overview

ApplicationUpdate MethodDelivery
Desktop WalletTauri auto-updaterGitHub Releases (signed)
MonoLandsBackground check via GitHub APIGitHub Releases
Browser WalletChrome Web StoreAutomatic
Mobile WalletExpo OTA Updatesexpo-updates

Desktop Wallet

The Desktop Wallet uses Tauri's built-in auto-updater, which checks for new versions on launch and notifies the user with an in-app banner.

Update Check Flow

App Launch

├── Fetch latest.json from GitHub
│ (mono-labs-org/downloads)

├── Compare local version with remote version

├── If newer version available:
│ └── Show update banner in UI
│ ├── [Download] → Download + install + restart
│ └── [Dismiss] → Skip until next launch

└── If current version is latest:
└── Continue normally (no UI shown)

Signed Updates

All Desktop Wallet updates are cryptographically signed using Ed25519 to prevent tampering.

PropertyDetails
Signature AlgorithmEd25519
Manifest Filelatest.json
Manifest Locationmono-labs-org/downloads GitHub repository
VerificationTauri verifies signature before applying update

The latest.json manifest contains version information, download URLs, and signatures for each platform:

{
"version": "0.2.0",
"notes": "Bug fixes and performance improvements",
"pub_date": "2026-03-01T00:00:00Z",
"platforms": {
"darwin-aarch64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6...",
"url": "https://github.com/mono-labs-org/downloads/releases/download/desktop-wallet-v0.2.0/Monolythium-Wallet_0.2.0_aarch64.app.tar.gz"
},
"linux-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6...",
"url": "https://github.com/mono-labs-org/downloads/releases/download/desktop-wallet-v0.2.0/monolythium-wallet_0.2.0_amd64.AppImage.tar.gz"
},
"windows-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6...",
"url": "https://github.com/mono-labs-org/downloads/releases/download/desktop-wallet-v0.2.0/Monolythium-Wallet_0.2.0_x64-setup.nsis.zip"
}
}
}
uyarı

If the signature verification fails, the update is rejected and the user remains on their current version. This protects against corrupted downloads and supply-chain attacks.

Update Banner UI

When a new version is detected, a non-intrusive banner appears at the top of the wallet interface:

┌─────────────────────────────────────────────────────────┐
│ New version available (v0.2.0) [Download] [Dismiss] │
└─────────────────────────────────────────────────────────┘
  • Download -- Downloads the update package, verifies the Ed25519 signature, applies the update, and prompts for an application restart.
  • Dismiss -- Hides the banner for the current session. The check runs again on the next app launch.

Tauri Configuration

The auto-updater is configured in tauri.conf.json:

{
"plugins": {
"updater": {
"active": true,
"dialog": false,
"endpoints": [
"https://github.com/mono-labs-org/downloads/releases/latest/download/latest.json"
],
"pubkey": "<Ed25519 public key>"
}
}
}
bilgi

The createUpdaterArtifacts setting must be set to "v1Compatible" in the Tauri build configuration for the updater to function correctly.

Version Display

The current application version is displayed on the Settings page. The version string is retrieved dynamically at runtime:

import { getVersion } from "@tauri-apps/api/app";

const version = await getVersion(); // e.g., "0.2.0"

MonoLands

MonoLands (the Rust/Bevy game client) performs a background version check against GitHub Releases on startup.

Update Check Flow

App Launch

├── Spawn background thread

├── HTTP GET to GitHub Releases API
│ (ureq → github.com/api/v3/repos/monoplay-xyz/monolands/releases/latest)

├── Parse latest tag_name from response

├── Compare with compiled-in version

└── If newer:
└── Send result via mpsc channel → Main thread
└── Show update notification in game UI

Implementation Details

The update checker runs in a separate thread to avoid blocking the game's render loop. Results are communicated back to the main Bevy thread via an mpsc channel.

use std::sync::{mpsc, Mutex};

#[derive(Resource)]
struct UpdateReceiver(Mutex<mpsc::Receiver<UpdateInfo>>);

fn check_for_updates(sender: mpsc::Sender<UpdateInfo>) {
std::thread::spawn(move || {
let response = ureq::get(
"https://api.github.com/repos/monoplay-xyz/monolands/releases/latest"
)
.call();

if let Ok(resp) = response {
let release: GitHubRelease = resp.into_json().unwrap();
let latest = release.tag_name.trim_start_matches('v');
let current = env!("CARGO_PKG_VERSION");

if latest != current {
let _ = sender.send(UpdateInfo {
version: latest.to_string(),
url: release.html_url,
});
}
}
});
}
ipucu

The mpsc::Receiver must be wrapped in a Mutex to satisfy Bevy's Resource trait requirements, since Receiver is not Sync by default.

In-Game Notification

When a new version is available, a notification panel appears in the game UI with a link to download the latest release from GitHub.


Browser Wallet

The Monolythium Browser Wallet is distributed as a Chrome extension. Updates are handled entirely by the Chrome Web Store infrastructure.

How It Works

  1. Chrome periodically checks the Web Store for extension updates (typically every few hours).
  2. When a new version is published, Chrome downloads and installs it automatically.
  3. The extension is reloaded with the new version on the next browser restart (or immediately if the "update_url" manifest field triggers a background update).

No User Action Required

Users do not need to manually check for updates. Chrome manages the entire lifecycle:

EventAction
New version publishedChrome detects within ~5 hours
DownloadAutomatic (background)
InstallationAutomatic (on next browser restart or idle)
RollbackChrome can roll back if the new version crashes

Version Pinning

For enterprise deployments or testing, Chrome allows pinning extensions to specific versions via group policy. This is not recommended for general users.


Mobile Wallet

The Monolythium Mobile Wallet uses Expo's over-the-air (OTA) update system (expo-updates) to deliver updates without requiring App Store or Google Play review cycles.

How OTA Updates Work

App Launch

├── Check Expo update server for new bundle

├── If update available:
│ ├── Download JS bundle in background
│ ├── Verify bundle integrity
│ └── Apply on next app restart

└── If no update:
└── Continue with current bundle

Update Types

Update TypeDeliveryReview RequiredSpeed
OTA (JS bundle)expo-updatesNoMinutes
Native (binary)App Store / Google PlayYesDays

OTA updates can modify JavaScript code, styles, and assets. Changes to native modules (camera, biometrics, etc.) require a full binary release through the app stores.

Configuration

// app.config.js
export default {
expo: {
updates: {
enabled: true,
checkAutomatically: "ON_LOAD",
fallbackToCacheTimeout: 5000,
},
},
};

Checking for Updates Programmatically

import * as Updates from "expo-updates";

async function checkForUpdate() {
const update = await Updates.checkForUpdateAsync();

if (update.isAvailable) {
await Updates.fetchUpdateAsync();
await Updates.reloadAsync(); // Restart with new bundle
}
}

Version Display

All Monolythium applications display their current version in the Settings page or About section.

ApplicationLocationMethod
Desktop WalletSettings pagegetVersion() from @tauri-apps/api/app
MonoLandsMain menuenv!("CARGO_PKG_VERSION") compiled in
Browser WalletExtension popup footerchrome.runtime.getManifest().version
Mobile WalletSettings screenexpo-constants Constants.expoConfig.version

Security

Supply Chain Protection

  • Desktop Wallet: Ed25519 signatures on all update artifacts. The public key is compiled into the application binary and cannot be changed without a manual reinstall.
  • MonoLands: Update checker is read-only (no auto-install). Users download updates manually from GitHub, where releases are tagged and checksummed.
  • Browser Wallet: Chrome Web Store verifies developer identity and scans extensions for malware.
  • Mobile Wallet: Expo signs OTA bundles. The app only accepts bundles signed with the project's Expo credentials.

Downgrade Prevention

None of the update mechanisms allow downgrading to a previous version through the auto-update path. Users who need to run an older version must manually download and install it.


Troubleshooting

Desktop Wallet Not Showing Update Banner

  1. Check network connectivity -- The app must be able to reach github.com to fetch latest.json.
  2. Verify version -- Open Settings to see the current version. Compare with the latest release on GitHub.
  3. Cache -- Restart the application to trigger a fresh update check.

MonoLands Update Check Fails Silently

The update checker runs in a background thread and does not surface network errors to the UI. If you suspect it is failing:

  1. Check your internet connection.
  2. Verify that api.github.com is reachable.
  3. The check only runs once per launch. Restart the application to retry.

Mobile Wallet Not Receiving OTA Updates

  1. Ensure the app has internet access.
  2. Force-close and reopen the app to trigger a fresh check.
  3. OTA updates only work for JS changes. If the update includes native module changes, check the App Store or Google Play for a new binary release.