@luxfi/brand-types
v0.2.0
Published
Neutral TypeScript types for white-label brand identity, app descriptors, and federation discovery.
Keywords
Readme
@luxfi/brand-types
Neutral TypeScript types for white-label brand identity, application descriptors, and federation discovery.
What's inside
BrandConfig,BrandTheme— runtime brand identity (name, domains, social, theme overlay)AppKind,AppDescriptor— describes one application surface (market / exchange / explorer / etc.)FederationPeer,ChainBinding,MergedBrand— federation discovery glueWellKnownBrand— payload at/.well-known/brand.json(identity only, owned by brand team)WellKnownApp— payload at/.well-known/<appId>.json(federation graph, references the brand by URL)
What it is not
- Not a runtime: importing this at runtime is an empty module (types are erased).
- Not opinionated about transport: how you fetch
brand.jsonor/.well-known/<app>.jsonis up to you. - Not branded: this package contains zero literal brand names. Consumers supply the values.
Install
pnpm add -D @luxfi/brand-types # or: bun add -D, npm i -DUse
import type { BrandConfig, MergedBrand, AppKind } from '@luxfi/brand-types'
const brand: BrandConfig = {
name: 'Example',
title: 'Example — App',
description: 'An example deployment.',
shortName: 'EX',
appDomain: 'app.example.test',
}To add app-specific fields, extend locally:
import type { BrandConfig as CanonicalBrandConfig } from '@luxfi/brand-types'
export interface BrandConfig extends CanonicalBrandConfig {
walletConnectProjectId?: string
insightsHost?: string
}Specs
Implements the schema referenced by:
- LP-0010 — Lux Brand Discovery
- HIP-0303 — Hanzo Brand Discovery
- ZIP-0031 — Zoo Brand Discovery
License
BSD-3-Clause. See LICENSE.
