/** * Brand configuration types for Lux deployments. * These types define the shape of brand.json — the single source of truth * for Lux branding, theming, chain config, and service endpoints. * * Used by: * - @luxfi/brand (this package) * - Runtime consumers in Lux apps */ /** Theme color overrides for a single color scheme (light or dark). * All fields optional — only override what you want to customize. * The exchange UI is monochrome by default; accent1 is the primary brand color. */ interface BrandTheme { /** Primary accent color (buttons, links, active states) */ accent1?: string; /** Accent hover state */ accent1Hovered?: string; /** Secondary accent (auto-derived from accent1 + surface1 if not set) */ accent2?: string; /** Tertiary accent */ accent3?: string; /** Primary background */ surface1?: string; /** Secondary background (cards, panels) */ surface2?: string; /** Tertiary background (inputs, wells) */ surface3?: string; /** Primary text */ neutral1?: string; /** Secondary text */ neutral2?: string; /** Tertiary text */ neutral3?: string; /** Text on accent backgrounds (auto-derived from accent1 if not set) */ neutralContrast?: string; /** Page background (defaults to surface1) */ background?: string; /** Success color */ statusSuccess?: string; /** Error color */ statusCritical?: string; /** Warning color */ statusWarning?: string; /** Overlay/scrim color */ scrim?: string; } /** Full brand identity configuration. */ interface BrandConfig { name: string; title: string; description: string; shortName: string; labsName: string; legalEntity: string; walletName: string; protocolName: string; copyrightHolder: string; appDomain: string; /** Optional app subdomain (e.g. "app.lux.financial") — when the marketing surface * lives at appDomain and the product UI lives at appSubdomain. */ appSubdomain?: string; docsDomain: string; infoDomain: string; gatewayDomain: string; wsDomain: string; helpUrl: string; termsUrl: string; privacyUrl: string; downloadUrl: string; complianceEmail: string; supportEmail: string; phone?: string; ceo?: string; physicalAddress?: string; mailingAddress?: string; corpNumber?: string; twitter: string; farcaster: string; linkedin: string; tiktok: string; github: string; discord: string; logoUrl: string; faviconUrl: string; primaryColor: string; defaultChainId: number; supportedChainIds: number[]; walletConnectProjectId: string; insightsHost: string; insightsApiKey: string; theme?: { light?: BrandTheme; dark?: BrandTheme; }; } /** Runtime configuration loaded from brand.json / config.json */ interface RuntimeConfig { brand: Partial; chains: { defaultChainId: number; supported: number[]; }; rpc: Record; api: { graphql: string; gateway: string; insights: string; }; iam?: { provider: string; clientId: string; }; walletConnect: { projectId: string; }; } /** * Mutable brand singleton — populated by loadBrand() from /brand.json. * Import this in your app to read brand values after loading. * * Usage (in any Lux app — exchange, bridge, explorer, wallet, pay): * import { brand, loadBrand } from '@luxfi/brand/loader' * await loadBrand() * console.log(brand.name) // "Lux Exchange" */ declare const brand: BrandConfig; declare let runtimeConfig: RuntimeConfig | null; /** Named brand sources shipped in this package. */ type NamedBrandSource = 'brand' | 'bridge' | 'financial'; /** Options for resolveBrand / loadBrand. */ interface LoadBrandOptions { /** Pick a shipped brand JSON by name, or a fetch-able URL/path. */ source?: NamedBrandSource | string; /** Absolute path to a tenant brand JSON on disk (Node only). */ overridePath?: string; /** Already-parsed tenant config — highest precedence after the literal object. */ overrideJson?: RuntimeConfig; } /** * Resolution order for resolveBrand / loadBrand — highest precedence first. * This is the **only** place precedence is defined; both Node and browser * paths route through resolveBrand for consistency. * * 1. opts.overrideJson — inline parsed RuntimeConfig * 2. opts.overridePath — JSON file on disk (Node) * 3. env LUX_BRAND_INLINE — inline JSON string (or base64 prefixed "base64:") * 4. env LUX_BRAND_OVERRIDE — path to JSON file on disk (Node) * 5. opts.source — named bundled brand ('brand'|'bridge'|'financial') * or a fetch-able URL/relative path * 6. default — bundled brand.json (Lux Exchange) * * Tenants white-labelling Lux Pay supply (2) or (3) at build time. * Multi-tenant deployments select per-hostname at request time by passing * (1) or (5) to resolveBrand at render time. */ declare function resolveBrand(opts?: LoadBrandOptions): Promise; /** * Load brand config, populate the `brand` singleton, and apply DOM side-effects * (document.title, favicon, CSS variables). Browser entry point. */ declare function loadBrand(opts?: LoadBrandOptions): Promise; /** Apply a resolved config to the brand singleton (no DOM writes). */ declare function applyConfig(config: RuntimeConfig): void; /** Validate a parsed tenant config. Fails loud on missing required fields. */ declare function validate(config: RuntimeConfig): RuntimeConfig; declare function getBrandUrl(path: string): string; declare function getAppUrl(path: string): string; declare function getDocsUrl(path: string): string; declare function getGatewayUrl(path: string): string; declare function getWsUrl(path: string): string; declare function getRpcUrl(chainId: number): string | undefined; export { type BrandConfig as B, type LoadBrandOptions as L, type NamedBrandSource as N, type RuntimeConfig as R, type BrandTheme as a, applyConfig as b, getBrandUrl as c, getDocsUrl as d, getGatewayUrl as e, getRpcUrl as f, getAppUrl as g, getWsUrl as h, brand as i, runtimeConfig as j, loadBrand as l, resolveBrand as r, validate as v };