import { Capacitor } from '@capacitor/core'; /** * Is the app running inside a native (Capacitor) shell — iOS / Android / desktop * WebView — rather than a plain web browser? * * This matters for networking: a native WebView is NOT subject to browser CORS * rules, so it can talk to any Cashu mint directly (including mint.minibits.cash, * which sends no CORS headers). In a plain browser we must use a CORS-enabled * mint. `Capacitor.isNativePlatform()` is web-safe and simply returns `false` * when there's no native runtime. */ export function isNativePlatform(): boolean { try { return Capacitor.isNativePlatform(); } catch { return false; } } /** 'ios' | 'android' | 'web' */ export function getPlatform(): string { try { return Capacitor.getPlatform(); } catch { return 'web'; } } /** Canonical Zapstore listing for this app (install + updates). Android only. */ export const APP_INSTALL_URL = 'https://zapstore.dev/apps/org.skatespots.app'; /** * SkateSpots platform Lightning address. Receives Sasquatch Pro passes AND * marketplace listing fees — the same address, deliberately. Single source of * truth: never re-type it elsewhere (a typo would send money nowhere). */ export const PLATFORM_LIGHTNING_ADDRESS = 'skatespots@minibits.cash';